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

@gavdi/cap-bpa-client

v1.0.1

Published

SAP BPA Workflow service library

Readme

@gavdi/cap-bpa-client - SAP Build Process Automation Workflow API Client For CAP

This package contains a predefined client that can be used with the CAP remote service connection system, to easily query the SAP BPA Workflow API. It makes use of a custom query builder, to help you target exactly the properties you need from the different API endpoints.

On top of this, the package also comes with full object type definitions for any objects returned by the workflow API, helping you with added type safety for any calls. This comes with alongside a full request range setup, such that you can easily start, stop, delete, fetch, or any action on the API.

How To Use

This package strives to be an easy to use drop-in tool, to help get you off the ground as fast as possible.

It works by using the service binding you've provided to CAP, like in this example here:

/* Your package.json file or .cdsrc.json */
{
    ...
    "cds": {
        "requires": {
            "workflow-api": {
                "kind": "rest",
                "credentials": {
                    "destination": "<your-wf-api-destination>"
                }
            }
        }
    }
}

With that binding, which you can name whatever you like but in this example is named 'workflow-api', we can then create a WorkflowServiceClient instance which targets that specific binding.

Once your client is configured and ready, you can then target any available endpoint using it. And should you wish to perform custom queries against an endpoint, you can use the built-in QueryBuilder to help you construct a proper query.

/* Your logic file */
import { WorkflowServiceClient, TaskInstanceList, QueryBuilder, TaskQueryArgs } from "@gavdi/cap-bpa-client";

// Prepare your client
const workflowClient = new WorkflowServiceClient("workflow-api");

async function fetchTasksDueToday(): Promise<TaskInstanceList> {
    try {
        const today = new Date().toISOString();

        // Create an instance of the query builder
        const queryBuilder = new QueryBuilder();

        // Construct the argument you wish to use, depending on your endpoint
        // In this instance we use the TaskQueryArgs as we're targeting the Task Instance endpoint
        const argument: TaskQueryArgs = {
            top: 200,
            skip: 100,
            dueDate: today,
        };

        // Add your argument to the query (multiple can be added)
        queryBuilder.addArgument(argument);

        // And finally, fire away!
        const result = await workflowClient.getTaskList(queryBuilder);
        return result;
    } catch(e) {
        // Handle your errors!
    }
}

Resources

All available endpoints configured for this client can be found on the official SAP API documentation page.

TODO

  • [ ] Expand documentation to include all available options and how to use them
  • [x] Allow for custom direct string query injection without using query builder (Done for 1.0.1)

(c) Copyright by Gavdi Labs 2024 - All Rights Reserved