npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@managed-api/monday-v2024-04-core

v1.2.0

Published

Adaptavist Managed API for monday.com

Downloads

13

Readme

Managed API for monday.com

Managed API for monday.com is an API Client for monday.com by Adaptavist primarily designed for the use in ScriptRunner Connect. You can read more about Managed APIs here.

This is a runtime agnostic version of the Managed API (with core suffix) that makes it easy to port it to any runtime you may want to use this Managed API on.

Platform specific ports

Supported API calls

Porting to other runtimes

While the primary reason for creating Managed APIs was to use them in ScriptRunner Connect runtime, then you can easily port them to any runtime of your choosing.

You can do so by extending the *Core Managed API class where you'll be asked to provide implementation for getPlatformImplementation function. In this implementation you have yo specify how to perform buffer encoding/decoding operations and how to perform HTTP calls:

{
    buffer: {
        encode(input: string): ArrayBuffer;
        decode(input: ArrayBuffer): string;
    },
    performHttpCall(request: Request): Promise<Response>
}

Here is an example how to create a Node port of the Managed API:

import { MondayApiCore } from "@managed-api/monday-core";
import { PlatformImplementation, Request, Response, Headers } from "@managed-api/commons-core";
import fetch from "node-fetch";

export class MondayApi extends MondayApiCore {
    constructor(private baseUrl: string, private authToken: string) {
        super();
    }

    protected getPlatformImplementation(): PlatformImplementation {
        return {
            buffer: {
                encode: (input) => Buffer.from(input, 'utf-8'),
                decode: (input) => Buffer.from(input).toString('utf-8')
            },
            performHttpCall: (request) => this.performHttpCall(request)
        };
    }

    private async performHttpCall(request: Request): Promise<Response> {
        const requestUrl = `${this.baseUrl}${request.url}`; // Substitute base URL
        request.headers.set('Authorization', `Basic ${this.authToken}`); // Substitute auth token
        const response = await fetch(requestUrl, {
            method: request.method,
            headers: request.headers as any,
            body: request.method.toLowerCase() !== 'get' ? Buffer.from((await request.arrayBuffer()) ?? new ArrayBuffer(0)) : undefined
        });

        const apiHeaders = new Headers();
        response.headers.forEach((value, key) => apiHeaders.append(key, value));

        const body = await response.arrayBuffer();

        return super.buildResponse(response.url, response.status, response.statusText, apiHeaders, body);
    }
}

Please note that the authentication handling details may not be accurate and serve as an example. If you wish yo use these Managed APIs without having to concern yourself how to deal with and secure authentication details when working with APIs, then feel free to evaluate ScriptRunner Connect platform.

Contact

At this time Managed APIs are unlicensed and close sourced, but feel free to drop an email to [email protected] for ideas, suggestions and improvements.

Changelog

2.28.0

  • Updated development setup instructions

2.27.0

  • Pass update_id as ID in Update.likeUpdate.

2.26.0

  • Add build script for local development and testing.

2.25.0

  • Fix issue where column_value.column was incorrectly labelled as an array.

2.24.0

  • Add missing type options related to nested items_page.
  • Pass API version down to nested types.

2.23.0

  • Update Group queries and mutations to return an items_page instead of items.

2.22.0

  • Fix getWebhooks response.

2.21.0

  • Add is_default_workspace field to workspace queries.

2.20.0

  • Add relative_to and position_relative_method to Item.createItem.

2.19.0

  • Add display_name field to version queries.
  • Update kind enum values in version queries.

2.18.0

  • Convert id arguments in all managed APIs to use ID type.
  • Add missing after_column_id arg to Column.createColumn.
  • Fix return type of item.id.

2.17.0

  • Update common cores package to version 0.3.14.

2.16.0

  • Support for the following Team methods:

    • addUsersToTeam that can be used as Team.addUsersToTeam or All.addUsersToTeam.
    • removeUsersFromTeam that can be used as Team.removeUsersFromTeam or All.removeUsersFromTeam.

2.15.0

  • Added support for the following Workspace methods:

    • updateWorkspace that can be used as Workspace.updateWorkspace or All.updateWorkspace

2.14.0

2.13.0

2.12.0

  • Support version 2024-04 of Monday API.
  • Support url field in boards and items.

2.11.0

  • Added support for the following Team methods:

2.10.0

2.9.0

  • Fixing response objects for ItemsPage.getItemsPage.

2.8.0

  • Allow access to __typename field in returned GraphQL objects.

2.7.0

  • Fix issue with items_page managed API preventing Monday from accepting query_params arguments.

2.6.0

2.5.0

  • Support for complexity queries to monitor the cost of each operation you make

2.4.0

  • Using api version 2023-10 as default. Removing support for 2023-07

2.2.0

  • Added support for the following Folder methods:

    • getFolders that can be used as Folder.getFolders or All.getFolders
    • createFolder that can be used as Folder.createFolder or All.createFolder
    • updateFolder that can be used as Folder.updateFolder or All.updateFolder
    • deleteFolder that can be used as Folder.deleteFolder or All.deleteFolder

2.0.0

  • Converted all enum types to union types, for easier autocompletion suggestions

1.18.0

  • Added support for the following Webhook methods:

    • getWebhooks that can be used as Webhook.getWebhooks or All.getWebhooks
    • createWebhook that can be used as Webhook.createWebhook or All.createWebhook
    • deleteWebhook that can be used as Webhook.deleteWebhook or All.deleteWebhook

1.17.0

  • Added column fields to column_values return type.

1.16.0

  • Added support for the following Version methods:

    • getVersion that can be used as Version.getVersion or All.getVersion
    • getVersions that can be used as Version.getVersions or All.getVersions

1.15.0

  • Added support for the following Tag methods:

    • getTags that can be used as Tag.getTags or All.getTags
    • getTags that can be used as Board.Tag.getTags
    • createOrGetTag that can be used as Tag.createOrGetTag or All.createOrGetTag

1.14.0

  • Added support for the following Doc methods:

    • getDocs that can be used as Doc.getDocs or All.getDocs
    • createDoc that can be used as Doc.createDoc or All.createDoc
  • Added support for the following DocBlock methods:

    • getDocBlocks that can be used as Doc.DocBlock.getDocBlocks or All.getDocBlocks
    • createDocBlock that can be used as Doc.DocBlock.createDocBlock or All.createDocBlock
    • updateDocBlock that can be used as Doc.DocBlock.updateDocBlock or All.updateDocBlock
    • deleteDocBlock that can be used as Doc.DocBlock.deleteDocBlock or All.deleteDocBlock

1.13.0

  • Added support for all managed API methods for api 2023-10

1.11.0

  • Added support for the following ItemsPage methods:

    • getItemsPage that can be used as Board.ItemsPage.getItemsPage or All.getItemsPage
    • getNextItemsPage that can be used as Board.getNextItemsPage or All.getNextItemsPage
    • getItemsPageByColumnValues that can be used as Board.getItemsPageByColumnValues or All.getItemsPageByColumnValues

1.9.0

  • Added support for the following Team methods:

    • getTeams that can be used as Team.getTeams or All.getTeams
    • addTeamsToBoard that can be used as Team.addTeamsToBoard or All.addTeamsToBoard
    • addTeamsToWorkspace that can be used as Team.addTeamsToWorkspace or All.addTeamsToWorkspace
    • deleteTeamsFromWorkspace that can be used as Team.deleteTeamsFromWorkspace or All.deleteTeamsFromWorkspace

1.8.0

  • Added support for the following Update methods:

    • getUpdates that can be used as Update.getUpdates or All.getUpdates.
    • createUpdate that can be used as Update.createUpdate or All.createUpdate.
    • likeUpdate that can be used as Update.likeUpdate or All.likeUpdate.
    • deleteUpdate that can be used as Update.deleteUpdate or All.deleteUpdate.

1.7.0

  • Added support for the following Item methods:

    • moveItemToBoard that can be used as Item.moveItemToBoard or All.moveItemToBoard.

1.6.0

  • Added support for the following Group methods:

    • updateGroup that can be used as Board.Group.updateGroup or All.updateGroup.
    • archiveGroup that can be used as Board.Group.archiveGroup or All.archiveGroup.
    • duplicateGroup that can be used as Board.Group.duplicateGroup or All.duplicateGroup.
    • deleteGroup that can be used as Board.Group.deleteGroup or All.deleteGroup.

1.5.0

  • Added support for the following Group methods:

    • createGroup that can be used as Board.Group.createGroup or All.createGroup.

1.4.0

  • Added support for the following Workspace methods:

    • createWorkspace that can be used as Workspace.createWorkspace or All.createWorkspace.
    • deleteWorkspace that can be used as Workspace.deleteWorkspace or All.deleteWorkspace.
    • getWorkspaces that can be used as Workspace.getWorkspaces or All.getWorkspaces.

1.3.0

  • Added support for the following Group methods:

1.2.0

  • Added support for the following Notification methods:

    • createNotification that can be used as Notification.createNotification or All.createNotification.

0.10.0

  • Changed type from number[] to string[] of ids field in groups arguments for Board fields.

0.8.0

  • Added support for the following Column methods:

    • changeColumnMetadata that can be used as Column.changeColumnMetadata or All.changeColumnMetadata.
    • changeColumnTitle that can be used as Column.changeColumnTitle or All.changeColumnTitle.
    • changeColumnValue that can be used as Column.changeColumnValue or All.changeColumnValue.
    • changeMultipleColumnValues that can be used as Column.changeMultipleColumnValues or All.changeMultipleColumnValues.
    • changeSimpleColumnValue that can be used as Column.changeSimpleColumnValue or All.changeSimpleColumnValue.
    • createColumn that can be used as Column.createColumn or All.createColumn.
    • deleteColumn that can be used as Column.deleteColumn or All.deleteColumn.

0.5.0

  • Added support for the following Board methods:

    • archiveBoard that can be used as Board.archiveBoard or All.archiveBoard.
    • createBoard that can be used as Board.createBoard or All.createBoard.
    • deleteBoard that can be used as Board.deleteBoard or All.deleteBoard.
    • deleteSubscribersFromBoard that can be used as Board.deleteSubscribersFromBoard or All.deleteSubscribersFromBoard.
    • duplicateBoard that can be used as Board.duplicateBoard or All.duplicateBoard.
    • getBoards that can be used as Board.getBoards or All.getBoards.
    • updateBoard that can be used as Board.updateBoard or All.updateBoard.
  • Added support for the following Board.View methods:

    • getViews that can be used as Board.View.getViews or All.getBoardViews.
  • Added support for the following File methods:

    • addFileToColumn that can be used as File.addFileToColumn or All.addFileToColumn.
    • addFileToUpdate that can be used as File.addFileToUpdate or All.addFileToUpdate.
    • getAssets that can be used as File.getAssets or All.getAssets.
  • Added support for the following Item methods:

    • archiveItem that can be used as Item.archiveItem or All.archiveItem.
    • clearUpdates that can be used as Item.clearUpdates or All.clearItemUpdates.
    • createItem that can be used as Item.createItem or All.createItem.
    • deleteItem that can be used as Item.deleteItem or All.deleteItem.
    • duplicateItem that can be used as Item.duplicateItem or All.duplicateItem.
    • getItems that can be used as Item.getItems or All.getItems.
    • moveItemToGroup that can be used as Item.moveItemToGroup or All.moveItemToGroup.
  • Added support for the following Item.Subitem methods:

    • createSubitem that can be used as Item.Subitem.createSubitem or All.createSubitem.
    • getSubitems that can be used as Item.Subitem.getSubitems or All.getSubitems.
  • Added support for the following Me methods:

    • getUserDetails that can be used as Me.getUserDetails or All.getUserDetails.
  • Added support for the following User methods:

    • addUsersToBoard that can be used as User.addUsersToBoard or All.addUsersToBoard.
    • addUsersToWorkspace that can be used as User.addUsersToWorkspace or All.addUsersToWorkspace.
    • deleteUsersFromWorkspace that can be used as User.deleteUsersFromWorkspace or All.deleteUsersFromWorkspace.
    • getUsers that can be used as User.getUsers or All.getUsers.

Copyright Adaptavist 2023 (c) All rights reserved