### Install Dependencies and Start Server Source: https://github.com/miroapp/api-clients/blob/main/apps/client-test-app/README.md After setting up the environment variables and local tunnel, run these commands to install project dependencies and start the development server. The server will auto-reload, but the webpage will not. ```shell yarn && yarn dev ``` -------------------------------- ### Complete Miro App Example Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md A full example demonstrating Express.js setup, session management, OAuth 2.0 flow, and Miro API integration for rendering boards. ```javascript const express = require('express') const {Miro} = require('@mirohq/miro-api') const session = require('express-session') const miro = new Miro() const app = express() app.use( session({ secret: '', resave: false, saveUninitialized: true, }), ) app.get('/', async (req, res) => { if (!(await miro.isAuthorized(req.session.id))) { res.redirect(miro.getAuthUrl()) return } res.contentType('html') res.write('List of boards available to the team:') res.write('') res.send() }) app.get('/auth/miro/callback', async (req, res) => { await miro.exchangeCodeForAccessToken(req.session.id, req.query.code) res.redirect('/') }) app.listen(4000, () => console.log('Started server on http://127.0.0.1:4000')) ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/miroapp/api-clients/blob/main/CONTRIBUTING.md Run this command after cloning the repository to install all necessary project dependencies. ```bash yarn ``` -------------------------------- ### Install Miro Node.js Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md Install the Miro Node.js client library using npm. ```bash npm install @mirohq/miro-api ``` -------------------------------- ### Start LocalTunnel for Development Source: https://github.com/miroapp/api-clients/blob/main/apps/client-test-app/README.md Use this command to start a local tunnel and get a public URL for your development server. This is necessary because localhost is not accepted as a callback URL for the authentication API. Pass a preferred subdomain to the start command. ```shell npx localtunnel --port 3000 --subdomain mettins-node-test-app ``` -------------------------------- ### Install a Preview Package Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Install a preview version of the Miro Node.js API client from GitHub Packages. Replace the version number with the actual version from the PR comment. ```bash npm install @miroapp/miro-api@2.2.4-pr123.a1cf07f ``` -------------------------------- ### Environment Configuration Example Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/example/README.md Configure your Miro API credentials and redirect URL using a .env file. Ensure the redirect URL matches your local development server address. ```bash MIRO_CLIENT_ID='123456789' MIRO_CLIENT_SECRET='abcdefghijklmnopqrstuvwxyz' MIRO_REDIRECT_URL='http://localhost:5000' ``` -------------------------------- ### Install Miro API Client and Dependencies Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Install the Miro Node.js client library, Express web framework, and express-session for managing user sessions. These are essential for building the Miro application. ```bash npm install @mirohq/miro-api express express-session ``` -------------------------------- ### Install Miro API with pip Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Install the miro_api package using pip. ```bash pip install miro_api ``` -------------------------------- ### Install Dependencies with Poetry Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/CONTRIBUTING.md Use this command to install project dependencies using Poetry. Ensure Poetry is installed and configured. ```bash poetry install ``` -------------------------------- ### Run Miro App from Command Line Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md Execute the main application file using Node.js to start the Miro app. ```bash node index.js ``` -------------------------------- ### Implement Custom Miro Storage Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Implement the Miro storage interface with 'get' and 'set' methods for persistent token storage. This example shows the abstract class definition. ```python from abc import ABC, abstractmethod from typing import Optional # Assuming State is defined elsewhere # class State: pass class Storage(ABC): """Abstract class used by the stateful client to set and get State.""" @abstractmethod def set(self, state: Optional[State]) -> None: pass @abstractmethod def get(self) -> Optional[State]: pass ``` -------------------------------- ### Install Dependencies with Pip Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/example/README.md Use pip to install the necessary Python libraries for the Miro API client, Flask, and environment variable management. ```bash pip install miro_api flask python-dotenv ``` -------------------------------- ### Install Git Commit Hooks Source: https://github.com/miroapp/api-clients/blob/main/CONTRIBUTING.md Execute this command to set up git commit hooks for the project. ```bash yarn prepare ``` -------------------------------- ### Install Miro API with Poetry Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Add the miro_api package to your project using poetry. ```bash poetry add miro_api ``` -------------------------------- ### Example Miro API Response (Board Object) Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md This is an example of the JSON response received after running the app, detailing a single Miro board accessible to the user. It includes board properties, creator information, and team details. ```typescript Board { _api: MiroApi { accessToken: '', basePath: 'https://api.miro.com', logger: undefined, httpTimeout: undefined }, id: 'uZyVOJkVFXk=', createdAt: 2022-09-08T15:04:41.000Z, createdBy: UserInfoShort { id: '3074457351234567890', name: 'Keyser Söze', type: 'user' }, currentUserMembership: BoardMember { id: '3074457351234567890', name: 'Keyser Söze', role: 'owner', type: 'board_member' }, description: 'Public board to test vague plans for world domination', modifiedAt: 2022-09-08T15:05:54.000Z, modifiedBy: UserInfoShort { id: '3074457351234567890', name: 'Keyser Söze', type: 'user' }, name: 'A very secret public board', owner: UserInfoShort { id: '3074457351234567890', name: 'Keyser Söze', type: 'user' }, picture: undefined, policy: BoardPolicy { permissionsPolicy: BoardPermissionsPolicy { collaborationToolsStartAccess: 'all_editors', copyAccess: 'team_editors', sharingAccess: 'team_members_with_editing_rights' }, sharingPolicy: BoardSharingPolicy { inviteToAccountAndBoardLinkAccess: 'editor', organizationAccess: 'private', access: 'view', teamAccess: 'private' } }, team: Team { id: '3074457359876543210', name: 'The usual suspects', picture: undefined, type: 'team' }, type: 'board', viewLink: 'https://miro.com/app/board/uZyVOJkVFXk=' } ``` -------------------------------- ### Install Dependencies with Poetry Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/example/README.md Use Poetry to add the required Python libraries for the Miro API client, Flask, and environment variable management to your project. ```bash poetry add miro_api flask python-dotenv ``` -------------------------------- ### Render a List of Boards Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md After obtaining an access token, use the `as` method to get a MiroApi instance. Then, use `getAllBoards` to fetch and display a list of accessible boards. ```javascript res.contentType('html') res.write('List of boards available to the team:') res.write('') res.send() ``` -------------------------------- ### Get All Boards Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Retrieves a list of all boards accessible by the authenticated user. ```APIDOC ## Get All Boards ### Description Fetches all boards that the currently authenticated user has access to. ### Method `getAllBoards(): AsyncIterable` ### Response #### Success Response (AsyncIterable) - An asynchronous iterable of board objects. ``` -------------------------------- ### Run Flask Development Server Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/example/README.md Start the Flask development server to run the Miro API client web application locally. Access the application through your web browser. ```bash flask --app app run ``` -------------------------------- ### Get Board by ID Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Retrieves a specific board by its unique identifier. ```APIDOC ## Get Board by ID ### Description Retrieves the details of a specific board using its unique ID. ### Method `getBoard(boardId: string): Promise` ### Parameters #### Path Parameters - **boardId** (string) - Required - The unique identifier of the board. ### Response #### Success Response (Board) - The board object with its details. ``` -------------------------------- ### Get Authorization URL Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Generates the URL to redirect the user to for authorizing the application. ```APIDOC ## Get Authorization URL ### Description Retrieves the URL that the user needs to visit to grant authorization to your application. ### Method `getAuthUrl(): string` ### Response #### Success Response (string) - The authorization URL to redirect the user to. ``` -------------------------------- ### Fastify App with Miro API Integration Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md A complete example of a Fastify application that integrates with the Miro API. It handles user authorization, token exchange, and API calls to fetch board data. ```javascript import {Miro} from '@mirohq/miro-api' import Fastify from 'fastify' import fastifyCookie from '@fastify/cookie' const miro = new Miro() const app = Fastify() app.register(fastifyCookie) // Generate user IDs for new sessions app.addHook('preHandler', (request, reply, next) => { if (!request.cookies.userId) { const userId = Math.random() reply.setCookie('userId', userId) request.cookies.userId = userId } next() }) // Exchange the temp code for an access token in the OAuth2 redirect handler app.get('/auth/miro/callback', async (req, reply) => { await miro.exchangeCodeForAccessToken(req.cookies.userId, req.query.code) reply.redirect('/') }) app.get('/', async (req, reply) => { // If user did not authorize the app, then redirect them to auth url if (!(await miro.isAuthorized(req.cookies.userId))) { reply.redirect(miro.getAuthUrl()) return } // Initialize the API for the current user const api = miro.as(req.cookies.userId) // Print the detail about first returned board for await (const board of api.getAllBoards()) { return board } }) await app.listen({port: 4000}) ``` -------------------------------- ### Implement Express Session Storage for Miro API Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/implement-storage.md This example shows how to use express-session middleware to store Miro API client state within a user's session. It creates a new Miro instance per request and loads/saves state from req.session. ```javascript // Set up session middleware before: 'app.use(session({...}))' app.use((req, res, next) => { // Create a separate 'Miro' instance for each request req.miro = new Miro({ // Define the storage implementation inline storage: { // Load the 'Miro' state from the session object, if it exists get(_userId) { return req.session.state }, // Store the 'Miro' state in the session object set(_userId, state) { req.session.state = state }, }, }) next() }) ``` ```javascript app.get('/', async (req, res) => { if (!await req.miro.isAuthorized(req.session.id)) { res.redirect(req.miro.getAuthUrl()) return } // ... } ``` -------------------------------- ### Miro Storage Interface Definition Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Implement this interface to provide custom persistent storage for Miro user tokens. It requires `get` and `set` methods to manage token state. ```typescript export interface Storage { get(userId: ExternalUserId): Promise set(userId: ExternalUserId, state: State): Awaitable } ``` -------------------------------- ### Miro Client Initialization Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Demonstrates how to initialize the Miro client, either by using environment variables or by passing configuration options directly. ```APIDOC ## Miro Client Initialization ### Description Initialize the Miro client using environment variables (`MIRO_CLIENT_ID`, `MIRO_CLIENT_SECRET`, `MIRO_REDIRECT_URL`) or by providing these values directly during instantiation. ### Code Example ```typescript import {Miro} from '@mirohq/miro-api' // Using environment variables (default) const miroClient = new Miro() // Providing options directly const miroClientWithOptions = new Miro({ clientId: '>', clientSecret: '', redirectUrl: 'https://example.com/miro_redirect_url', }) ``` ``` -------------------------------- ### Initialize Node.js Project Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md Initialize a new Node.js project using npm. Press Enter to accept default values or provide custom ones. ```bash npm init ``` -------------------------------- ### Create Project Directory Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md Use these commands to create and navigate into your project's root directory. ```bash mkdir my-miro-app cd my-miro-app ``` -------------------------------- ### Build Client Documentation Source: https://github.com/miroapp/api-clients/blob/main/CONTRIBUTING.md Use this command to build the client documentation using TypeDoc. The output will be in the 'docs-out' directory. ```bash yarn build:docs ``` -------------------------------- ### Initialize High-Level Miro Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Import and create a new instance of the high-level Miro client. Configuration is automatically loaded from environment variables. ```python import miro_api miro = miro_api.Miro() print(miro.auth_url) ``` -------------------------------- ### Initialize Miro Client with Custom Storage Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Initialize the high-level Miro client, passing a custom storage implementation to the constructor. ```python miro = miro_api.Miro( storage=CustomMiroStorage(), ) ``` -------------------------------- ### Initialize Miro Client with Options Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Instantiate the Miro client by providing your application's client ID, client secret, and redirect URL. This configuration can also be loaded from environment variables. ```typescript import {Miro} from '@mirohq/miro-api' const miro = new Miro({ clientId: '>', clientSecret: '', redirectUrl: 'https://example.com/miro_redirect_url', }) ``` -------------------------------- ### Initialize High-Level Miro Client with Custom Configuration Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Initialize the high-level Miro client with custom client ID, client secret, and redirect URL. ```python import miro_api miro = miro_api.Miro( client_id='>', client_secret='', redirect_url='https://example.com/miro/redirect/url', ) print(miro.auth_url) ``` -------------------------------- ### Import and Initialize Dependencies (Node.js) Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Import and initialize the Miro Node.js client and Express libraries. The Miro client uses environment variables for configuration. ```javascript const {Miro} = require('@mirohq/miro-api') const express = require('express') const session = require('express-session') ``` ```javascript const miro = new Miro() ``` ```javascript const app = express() app.use( session({ secret: '', resave: false, saveUninitialized: true, }), ) ``` -------------------------------- ### Initialize Node.js Project Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Initialize a new Node.js project in your application directory using npm. This creates a package.json file to manage project dependencies. ```bash npm init -y ``` -------------------------------- ### Initialize Low-Level MiroApi Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/README.md Import and create a new instance of the low-level MiroApi client using an access token. ```python import miro_api api = miro_api.MiroApi('') print(api.get_boards()) ``` -------------------------------- ### Initialize Miro Client with Custom Storage Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Pass a custom storage implementation to the Miro constructor to manage user access and refresh tokens persistently. This is recommended for production deployments. ```typescript const miro = new Miro({ storage: new CustomMiroStorage(), }) ``` -------------------------------- ### Handle App Entry Point and Authorization Redirect (Node.js) Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Check if the user is authorized. If not, redirect them to the Miro authorization URL. This handler is for the app's root path. ```javascript app.get('/', async (req, res) => { if (!(await miro.isAuthorized(req.session.id))) { res.redirect(miro.getAuthUrl()) return } // TODO: see step 7. }) ``` -------------------------------- ### Configure npm for GitHub Packages (Preview Packages) Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Set up your npm configuration to access preview packages from GitHub Packages. ```bash @miroapp:registry=https://npm.pkg.github.com //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN ``` -------------------------------- ### Import and Instantiate Miro High-Level Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Import the 'Miro' object and create a new instance for interacting with Miro users and triggering authorization flows. ```typescript // Import the 'Miro' object import {Miro} from "@mirohq/miro-api" // Create a new instance of the Miro object const miro = new Miro() /* * The 'as' method returns a high-level instance of * 'Api' for a specific user. * This makes all the methods that enable interacting with * boards and board items available to the specified user */ miro.as(userId: ExternalUserId): MiroApi ``` -------------------------------- ### Listen to Server Port Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Configure your web server to listen for incoming requests on a specific port, typically 4000 for local development. ```javascript app.listen(4000, () => console.log('Started server on http://127.0.0.1:4000')) ``` -------------------------------- ### Run Unit Tests with Poetry Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api-python/CONTRIBUTING.md Execute the project's unit tests using the Poetry run command. This ensures code quality and functionality. ```bash poetry run python -m unittest ``` -------------------------------- ### Fetch All Boards with Miro API Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart.md This JavaScript code snippet initializes the Miro API client with an access token and retrieves a list of all boards the user has access to. Replace the placeholder with your actual app access token. ```javascript const {MiroApi} = require('@mirohq/miro-api') const api = new MiroApi('') const app = (async function () { for await (const board of await api.getAllBoards()) { console.log(board) } })() ``` -------------------------------- ### Import and Instantiate Miro Low-Level Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Import the 'MiroApi' object and create a new instance, passing the OAuth access token. This client is used for backend-to-backend communication and automation scripts. ```typescript // Import the 'MiroApi' object import {MiroApi} from './index.ts' // Create a new instance of the 'MiroApi' object, // and pass the OAuth access token as a parameter const api = new MiroApi('') // Use the 'MiroApi' instance to send a request to the Miro REST API, // and to create a new board in the team where the App is installed const boards = await api.createBoard() ``` -------------------------------- ### Paginate Over Boards with AsyncGenerator Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Use the `getAllBoards` method with an `async for...of` loop to automatically paginate through all boards. Use `break` to stop requesting additional pages. ```typescript for await (const board of api.getAllBoards()) { console.log(board.viewLink) if (shouldStop()) { // Stop requesting additional pages from the API break } } ``` -------------------------------- ### Implement Redis Storage for Miro API Client Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/implement-storage.md This class implements the Storage interface using Redis as a backend. It handles connecting to Redis, fetching, saving, and deleting state. Use this for production deployments requiring persistent storage. ```javascript const redis = require('redis') class RedisStorage { // Initiate a connection to the Redis instance. // On subsequent calls, it returns the same Redis connection async _getClient() { if (!this.redisClient) { const client = redis.createClient() await client.connect() this.redisClient = client } return this.redisClient } // Return the state from Redis, if this data exists async get(userId) { const client = await this._getClient() const value = await client.get(userId.toString()) if (!value) return undefined return JSON.parse(value) } // Store the state in Redis. // If the state is undefined, the corresponding Redis key is deleted async set(userId, state) { const client = await this._getClient() // Delete the state, if it's undefined if (!state) return await client.del(userId.toString()) // Store the state in Redis await client.set(userId.toString(), JSON.stringify(state)) } } ``` ```javascript const miro = new Miro({ storage: new RedisStorage(), }) ``` -------------------------------- ### Generate Miro API Client Source: https://github.com/miroapp/api-clients/blob/main/CONTRIBUTING.md This command generates the low-level and high-level client methods and models based on the OpenAPI specification. ```bash yarn build ``` -------------------------------- ### Set Environment Variables Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Configure and export the necessary environment variables for your Miro app, including client ID, client secret, and redirect URL. ```bash export MIRO_CLIENT_ID="" export MIRO_CLIENT_SECRET="" export MIRO_REDIRECT_URL="http://127.0.0.1:4000/auth/miro/callback" ``` -------------------------------- ### Configure npm for GitHub Packages Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Configure npm to use GitHub Packages for the @miroapp scope by creating or updating the .npmrc file. ```ini @miroapp:registry=https://npm.pkg.github.com ``` -------------------------------- ### Handle OAuth Callback and Exchange Code (Node.js) Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/docs/quickstart-auth.md Handle the callback from Miro after user authorization. This route exchanges the temporary OAuth code for an access token and associates it with the user's session. ```javascript app.get('/auth/miro/callback', async (req, res) => { await miro.exchangeCodeForAccessToken(req.session.id, req.query.code) res.redirect('/') }) ``` -------------------------------- ### Specific Item Type Operations (AppCardItem, CardItem, StickyNoteItem) Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations specific to AppCardItem, CardItem, and StickyNoteItem, including tag management. ```APIDOC ## AppCardItem, CardItem, StickyNoteItem ### Description These classes represent specific item types on a Miro board and provide methods for managing their associated tags. ### Methods - **getAllTags()**: Retrieves all tags associated with the item. - **removeTag()**: Removes a tag from the item. - **attachTag()**: Attaches a tag to the item. ``` -------------------------------- ### Add GitHub Token to .npmrc Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Add your GitHub Personal Access Token to the .npmrc file for authentication with GitHub Packages. Ensure this token is kept secure and not committed to version control. ```ini //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN ``` -------------------------------- ### API Calls on Behalf of a User Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Makes API calls using the client instance configured for a specific user. ```APIDOC ## API Calls on Behalf of a User ### Description Allows you to make API calls to Miro on behalf of a specific user after they have authorized your application. ### Method `as(userId: string): MiroApi` ### Parameters #### Path Parameters - **userId** (string) - Required - The unique identifier of the user for whom the API calls will be made. ### Response #### Success Response (MiroApi) - An API client instance configured to make calls for the specified user. ``` -------------------------------- ### Item Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Base operations for all item types on a board, including updating and deleting. ```APIDOC ## Item ### Description Represents a generic item on a Miro board, providing fundamental operations like updating and deleting. ### Methods - **update()**: Updates the item. - **delete()**: Deletes the item. - **connectTo()**: Connects this item to another item using a connector. ``` -------------------------------- ### Connector Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for managing connectors between items on a board. ```APIDOC ## Connector ### Description Represents a connector between two items on a Miro board, with methods to update or delete the connector. ### Methods - **update()**: Updates the connector. - **delete()**: Deletes the connector. ``` -------------------------------- ### FrameItem Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for FrameItem, including creating nested items and retrieving all items within the frame. ```APIDOC ## FrameItem ### Description Represents a frame on a Miro board, allowing for the creation of nested items and retrieval of all items contained within it. ### Methods - **createAppCard()**: Creates a new app card within the frame. - **createCard()**: Creates a new card within the frame. - **createDocument()**: Creates a new document within the frame. - **createEmbed()**: Creates a new embed within the frame. - **createImage()**: Creates a new image within the frame. - **createShape()**: Creates a new shape within the frame. - **createStickyNote()**: Creates a new sticky note within the frame. - **createText()**: Creates a new text item within the frame. - **getAllItems()**: Retrieves all items contained within the frame. ``` -------------------------------- ### Exchange Code for Access Token Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Exchanges a temporary authorization code for an access token. ```APIDOC ## Exchange Code for Access Token ### Description Exchanges the temporary authorization code received during the OAuth flow for a permanent access token. ### Method `exchangeCodeForAccessToken(userId: string, code: string): Promise` ### Parameters #### Path Parameters - **userId** (string) - Required - The unique identifier of the user. - **code** (string) - Required - The temporary authorization code obtained from the redirect. ### Response #### Success Response (void) Indicates successful exchange of the code for an access token. ``` -------------------------------- ### Check Authorization Status Source: https://github.com/miroapp/api-clients/blob/main/packages/miro-api/README.md Checks if a specific user has already authorized the application. ```APIDOC ## Check Authorization Status ### Description Verifies if the current user has granted the application the necessary permissions. ### Method `isAuthorized(userId: string): Promise` ### Parameters #### Path Parameters - **userId** (string) - Required - The unique identifier of the user. ### Response #### Success Response (boolean) - **true** if the user has authorized the app. - **false** if the user has not authorized the app. ``` -------------------------------- ### Board Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for managing boards, including creating and retrieving various item types and board-level configurations. ```APIDOC ## Board ### Description Represents a Miro board, offering methods to create, retrieve, and manage various items, connectors, tags, members, and board settings. ### Methods - **createAppCard()**: Creates a new app card. - **createCard()**: Creates a new card. - **createConnector()**: Creates a new connector. - **createDocument()**: Creates a new document. - **createEmbed()**: Creates a new embed. - **createFrame()**: Creates a new frame. - **createImage()**: Creates a new image. - **createShape()**: Creates a new shape. - **createStickyNote()**: Creates a new sticky note. - **createText()**: Creates a new text item. - **getAppCard()**: Retrieves a specific app card. - **getCard()**: Retrieves a specific card. - **getConnector()**: Retrieves a specific connector. - **getAllConnectors()**: Retrieves all connectors on the board. - **getDocument()**: Retrieves a specific document. - **getEmbed()**: Retrieves a specific embed. - **getFrame()**: Retrieves a specific frame. - **getImage()**: Retrieves a specific image. - **getShape()**: Retrieves a specific shape. - **getStickyNote()**: Retrieves a specific sticky note. - **getText()**: Retrieves a specific text item. - **getItem()**: Retrieves a generic item. - **createTag()**: Creates a new tag. - **getTag()**: Retrieves a specific tag. - **getAllTags()**: Retrieves all tags on the board. - **getAllItems()**: Retrieves all items on the board. - **getMember()**: Retrieves a specific board member. - **getAllMembers()**: Retrieves all board members. - **copy()**: Copies the board. - **share()**: Shares the board. - **update()**: Updates the board. - **delete()**: Deletes the board. - **removeMember()**: Removes a member from the board. - **removeTag()**: Removes a tag from the board. - **findItem()**: Finds an item on the board. ``` -------------------------------- ### Tag Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for managing tags on a Miro board, including updating, deleting, and retrieving tagged items. ```APIDOC ## Tag ### Description Represents a tag that can be applied to items on a Miro board, with methods for management and retrieval of tagged items. ### Methods - **update()**: Updates the tag. - **delete()**: Deletes the tag. - **getAllTaggedItems()**: Retrieves all items associated with this tag. ``` -------------------------------- ### Organization Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for managing organizations and teams within the Miro API. ```APIDOC ## Organization ### Description Represents an organization within Miro, offering methods for team and data classification management. ### Methods - **createTeam()**: Creates a new team within the organization. - **getTeam()**: Retrieves a specific team. - **getAllTeams()**: Retrieves a list of all teams in the organization. - **getDataClassification()**: Retrieves the data classification settings for the organization. - **getDefaultTeamSettings()**: Retrieves the default team settings. - **getOrganizationMember()**: Retrieves a specific organization member. - **getOrganizationMembers()**: Retrieves a list of all organization members. ``` -------------------------------- ### Api Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations available on the Api client for managing boards and organizations. ```APIDOC ## Api ### Description Provides methods for interacting with the Miro API, including board and organization management. ### Methods - **createBoard()**: Creates a new board. - **getBoard()**: Retrieves a specific board. - **getOrganization()**: Retrieves organization details. - **getAllBoards()**: Retrieves a list of all boards. ``` -------------------------------- ### TeamMember Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for updating team member information. ```APIDOC ## TeamMember ### Description Represents a member of a team, with methods to update their information. ### Methods - **update()**: Updates the team member's information. ``` -------------------------------- ### BoardMember Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for updating board member information. ```APIDOC ## BoardMember ### Description Represents a member of a board, with methods to update their role or permissions. ### Methods - **update()**: Updates the board member's information. ``` -------------------------------- ### Team Operations Source: https://github.com/miroapp/api-clients/blob/main/MODELS.md Operations for managing teams, team members, and board data classification. ```APIDOC ## Team ### Description Represents a team within Miro, providing functionalities for managing team members, settings, and board data classification. ### Methods - **updateTeam()**: Updates an existing team. - **inviteTeamMember()**: Invites a new member to the team. - **deleteTeam()**: Deletes the team. - **deleteTeamMember()**: Removes a member from the team. - **getTeamMember()**: Retrieves a specific team member. - **getAllTeamMembers()**: Retrieves a list of all team members. - **getBoardDataClassification()**: Retrieves the data classification for a board. - **setBoardDataClassification()**: Sets the data classification for a board. - **setBoardDataClassificationBulk()**: Sets data classification for multiple boards. - **getDataClassification()**: Retrieves data classification settings. - **setDataClassification()**: Sets data classification settings. - **getTeamSettings()**: Retrieves team settings. - **updateTeamSettings()**: Updates team settings. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.