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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@uipath/coded-action-app

v1.0.0-beta.2

Published

UiPath package to be used for viewing coded action apps in Action Center

Downloads

607

Readme

@uipath/coded-action-app

An SDK enabling coded apps to be the UI for tasks within UiPath Action Center. SDK handles bi-directional communication between the coded app and UiPath Action Center host using window.postMessage events.

Installation

npm install @uipath/coded-action-app

Overview

Action Center renders a coded action app within an iframe. @uipath/coded-action-app provides service CodedActionAppService which offers below capabilities:

  • Receive - getTask() - On app load, UiPath Action Center provides the task details.
  • Notify - setTaskData() - Notify Action Center when task data changes (e.g. to enable the Save button).
  • Complete - completeTask() - Completes the task when user clicks on submit buttons (e.g. 'Approve' or 'Reject' buttons)
  • Display - showMessage() - Displays toast messages inside Action Center.

Usage

Initialise the service

import { CodedActionAppService } from '@uipath/coded-action-app';

const service = new CodedActionAppService();

The class is also exported under the alias CodedActionApp for convenience:

import { CodedActionApp } from '@uipath/coded-action-app';

const service = new CodedActionApp();

Get task details from Action Center

Call this once when the app loads. It sends an AC.init event to Action Center and waits for the task data to be posted back. (Recommended: Do not call it more than once in your app)

const taskData = await service.getTask();

console.log(taskData.taskId);     // number
console.log(taskData.title);      // string
console.log(taskData.status);     // TaskStatus enum
console.log(taskData.isReadOnly); // boolean
console.log(taskData.data);       // the task's form data
console.log(taskData.folderId);   // number
console.log(taskData.folderName); // string
console.log(taskData.theme);      // Theme enum — the UI theme Action Center is currently using

Note: This call will reject with an error if Action Center does not respond within 3 seconds, or if the parent origin is not trusted.


Notify Action Center of data changes

Call this whenever the user modifies the task form data. Action Center uses this signal to enable its Save button. Make sure to pass the full current task data.

service.setTaskData({ field: 'updatedValue' });

Complete a task

Call this when the user submits the form to mark the task as complete. Provide the action taken (e.g. "Approve" or "Reject") and the final data payload. The call returns a Promise<TaskCompleteResponse> that resolves once Action Center confirms the completion.

const result = await service.completeTask('Approve', { approved: true, notes: 'Looks good' });

if (!result.success) {
  console.error(result.errorMessage);
}

Note: Only one completeTask call may be in flight at a time. Calling it again before the previous call resolves will throw an error: "A completeTask call is already in progress".


Display a message in Action Center

Show a toast notification inside Action Center using one of the four severity levels.

import { MessageSeverity } from '@uipath/coded-action-app';

service.showMessage('Validation successful', MessageSeverity.Success);
service.showMessage('Validation failed', MessageSeverity.Error);
service.showMessage('Please review the details', MessageSeverity.Warning);
service.showMessage('User information', MessageSeverity.Info);

API Reference

CodedActionAppService

| Method | Description | |---|---| | getTask() | Returns a Promise<Task> with the current task's metadata and form data. | | setTaskData(data) | Sends updated data to Action Center to signal that the form has changed. | | completeTask(actionTaken, data) | Marks the task as complete with the given action label and final data. Returns Promise<TaskCompleteResponse>. Throws if a call is already in progress. | | showMessage(msg, type) | Displays a toast message in Action Center with the given severity. |


Task

type Task = {
  taskId: number;
  title: string;
  status: TaskStatus;
  isReadOnly: boolean;
  action: string | null;
  data: unknown;
  folderId: number;
  folderName: string;
  theme: Theme;
};

TaskStatus

enum TaskStatus {
  Unassigned = 'Unassigned',
  Pending    = 'Pending',
  Completed  = 'Completed',
}

Theme

The UI theme that Action Center is currently using, passed to the coded action app on load via getTask. Apply this to your app's styling so it matches the Action Center host.

enum Theme {
  AutoTheme         = 'autoTheme',
  Light             = 'light',
  Dark              = 'dark',
  LightHighContrast = 'light-hc',
  DarkHighContrast  = 'dark-hc',
}

TaskCompleteResponse

Returned by completeTask when Action Center responds.

type TaskCompleteResponse = {
  success: boolean;
  errorCode: number | null;
  errorMessage: string | null;
};

MessageSeverity

enum MessageSeverity {
  Info    = 'info',
  Success = 'success',
  Warning = 'warning',
  Error   = 'error',
}