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

business-rule-editor1

v1.1.4

Published

Includes APIs for RuleService, FunctionService and FormService.

Downloads

2

Readme

API endpoints for Business Rule Editor

  1. RuleService

1.1. getAll

  • Endpoint: RuleService.getAll()
  • Params: NULL
  • Return: ids - type: BusinessRule[]
  • Description: Return all rules which were defined on blockchain network by BusinessRuleEditor app.
  • Data Structure: BusinessRule = { uint id; string name; Action[] actions; Formula.Param[] params; } 1.2. runRule
  • Endpoint: RuleService.runRule(id)
  • Params: id - type: unit256
  • Return: NULL
  • Description: Run business rule for the given ID.
  • Data Structure:
  1. FunctionService

2.1. getAll

  • Endpoint: FunctionService.getAll()
  • Params: NULL
  • Return: ids- type: CustomFunction[]
  • Description: Return all functions in blockchain network.
  • Data Structure: CustomFunction = { uint id; string name; Param[] params; }

2.2. getOne

  • Endpoint: FunctionService.getOne(id)
  • Params: id: type: unit256
  • Return: function- type: CustomFunction
  • Description: Return a function for the given id in blockchain network.
  • Data Structure: CustomFunction = { uint id; string name; Param[] params; }

2.3. runFunction

  • Endpoint: FunctionService.runFunction(id)
  • Params: id: type: unit256
  • Return: True / False
  • Description: Run a function for the given id in blockchain network.
  • Data Structure:
  1. FormService

3.1. createOne

  • Endpoint: FormService.createOne(category, name, data)
  • Params: category- type: String name- type: String data- type: Node[]
  • Return: TRUE / FALSE
  • Description: Create a JSON data to Blockchain network.
  • Data Structure: Node = { uint primaryId; string id; uint parentId; string name; string key; string value; string query; string datatype; string children; }

3.2. getAll // wrong return params

  • Endpoint: FormService.getAll()
  • Params: NULL
  • Return: product_data- type: [Node [] ]
  • Description: Returns all JSON data in Blockchain network.
  • Data Structure: struct Node{ uint primaryId; string id; uint parentId; string name; string key; string value; string query; string datatype; string children; }

3.3. getMany

  • Endpoint: FormService.getMany(query_pairs)
  • Params: query_pairs- type: Query[]
  • Return: product_data- type: [Node [] ]
  • Description: Return Product data (JSON) on the given Queries
  • Data Structure: Query = { string key; string value; } struct Node{ uint primaryId; string id; uint parentId; string name; string key; string value; string query; string datatype; string children; }

3.4. getOne

  • Endpoint: FormService.getOne(_name)
  • Params: _name- type: string
  • Return: product_data- type: [Node [] ]
  • Description: Return Product data(JSON) on the given product name.
  • Data Structure:

3.5. deleteOne

  • Endpoint: FormService.deleteOne(_name)
  • Params: _name- type: String
  • Return: TRUE / FALSE
  • Description: Remove a Product data(JSON) on the given name.
  • Data Structure:

3.6. deleteMany

  • Endpoint: FormService.deleteMany(query_pairs)
  • Params: query_pairs- type: Query[]
  • Return: TRUE / FALSE
  • Description: Remove Product data(JSONs) on the given queries.
  • Data Structure: Query = { string key; string value; }

3.7. deleteAll

  • Endpoint: FormService.deleteAll()
  • Params: NULL
  • Return: TRUE / FALSE
  • Description: Remove all Product data (Form data) in blockchain network.
  • Data Structure:

3.8. updateOne

  • Endpoint: FormService.updateOne(name, query_pairs)
  • Params: name- type: String query_pairs- type: Query[]
  • Return: TRUE / FALSE
  • Description: Modify a Product data using the given product name and queries.
  • Data Structure: Query = { string key; string value; }

3.9. updateMany

  • Endpoint: FormService.updateMany(from_query_pairs, to_query_pairs)

  • Params: from_query_pairs- type: Query[] to_query_pairs- type: Query[]

  • Return:

  • Description: Modify Product data on given from_query_pairs to to_query_pairs.

  • Data Structure:

**** Deprecations

3.2. getRawData // deprecated

  • Endpoint: FormService.getRawData()

  • Params: NULL

  • Return: result- type: [{tree_child: tree_child, nodes: nodes}]

  • Description:

  • Data Structure: tree_child = { string id; string name; string category; string product_id; string query; // sample=> '$.' + category + '.' + name, array children; node[] nodes; };

    node = { string id; string name; string value; string datatype; string primaryId; string parentId; string key; string query; array children; }