New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rock.so-sdk

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rock.so-sdk

## BASIC USAGE

latest
Source
npmnpm
Version
1.0.15
Version published
Maintainers
1
Created
Source

ROCK.SO API SDK

BASIC USAGE

import { RockAPi } from 'rock.so-sdk'

const rockApi = new RockApi(process.env.ROCK_BOT_TOKEN)

rockApi.sendMessage('Hello!')

This SDK is highly typed, with all methods from Rock.so Public Api being mapped and exported!

METHODS

All methods available on Rock.so Public Api are available on the SDK, i.e.:

MethodDescription
sendMessageThe sendMessage method allows you to send a new message.
createNoteCreate note.
createTaskCreate a new task.
getBotInfoAllows you to retrieve basic information about the public API bot.
getCustomFieldsAllows you to retrieve information about custom fields defined for the tasks in bot’s space.
getTaskListsAllows you to retrieve information about tasks lists defined in the bot’s space.
listLabelsThe listLabels method can be used to retrieve the list of labels assigned to tasks. Note that labels are created and deleted "on the fly"; when there are no more tasks with a given label (either the label was removed from all tasks, or all tasks with the label were deleted), that label is deleted.
listSpaceMembersThe listSpaceMembers method can be used to retrieve a list of space members, including both people and bots.
listSprintsThe listSprints method can be used to retrieve a list of sprints defined in the space.

USING ALL METHODS

Send Message

await rockApi.sendMessage('Hello')

Create note

await rockApi.createNote({
  body: [{ text: "hello world" }],
  labels: ["label"], //Optional
  watchersIds: ["abcd123"], //Optional
});

Create a task

import { ListIdStatusEnum, PriorityEnum } from "rock.so-sdk";

await rockApi.createTask({
  body: [{ text: "hello world" }],
  listId: ListIdStatusEnum.TO_DO,
  priority: PriorityEnum.HIGH,
  title: "hello world",
  start: 123456789, //Optional
  due: 123456789, //Optional
  owners: ["abcd123"], //Optional
  checkList: ["abcd123"], //Optional
  severity: 1, //Optional
  sprint: 1, //Optional
  customFields: ["abcd123"], //Optional
  labels: ["abcd123"], //Optional
  recurringSchedule: { //Optional
    dayOfMonth: 1,
    daysOfWeek: {
      monday: true,
      tuesday: true,
      wednesday: true,
      thursday: true,
      friday: true,
      saturday: true,
      sunday: true,
    },
    targetListId: "abcd123",
    type: 1,
    workdaysOnly: true,
  },
  watchersIds: ["abcd123"], //Optional,
});

Get Bot Info

const { data } = await rockApi.getBotInfo();

Get Custom Fields

const { data } = await rockApi.getCustomFields();

Get Task Lists

const { data } = await rockApi.getTaskLists();

List Labels

const { data } = await rockApi.listLabels();

List Space Members

const { data } = await rockApi.listSpaceMembers();

List Sprints

const { data } = await rockApi.listSprints();

FAQs

Package last updated on 26 Mar 2025

Did you know?

Socket

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

Install

Related posts