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

form-service-api

v1.1.5

Published

Includes APIs for RuleService, FunctionService and FormService.

Readme

API endpoints for FormService ※ choose operator here: ['>', '>=', '<', '<=', '=', 'contains'];

  1. Form

1.1. post

  • Endpoint: FormService.post(data, form_type)
  • Params: #data:
    type:json, value: { target_field:'', data:{...} } ex:{ target_field: '$.Computer.Dell', data: { name: 'Dell', detail: { price: 10000, color: 'red', } }, }, #form_type: type: String, value:'form'
  • Description: Store form data on the blockchain.

1.2. getAll

  • Endpoint: FormService.getAll(form_type)
  • Params: #form_type: type:String, value:'form'
  • Return: Array of Object
  • Description: Return all form data stored on the blockchain.

1.3. getOne

  • Endpoint: FormService.getOne(target_field, form_type)
  • Params: #target_field: type:String, value:"" ex:'$.Computer.Hp' #form_type: type:'form'
  • Return: Object
  • Description: Return certain form data according to target_field on the blockchain

1.4. getMany

  • Endpoint: FormService.getMany(filter_array, form_type)
  • Params: #filter_array: type:Array of Object, value:[{key:'', operator:'', value:''}, {....}] ex: [ {key: 'price', operator: '>=', value: '100'}, {key: 'price', operator: '<=', value: '500'}, ] #form_type: type:String, value:'form'
  • Return: Array of Object
  • Description: Return several form data according to filter array on the blockchain

1.5. putOne

  • Endpoint: FormService.putOne(data, form_type)
  • Params: #data: type:json, value:{ target_field:'', data:[{key:'', value:''}, {...}] } ex: { target_field: '$.Computer.Dell', data: [ {key: 'price', value: '200'}, {key: 'color', value: 'red'}, ], }, #form_type: type:String, value:'form'
  • Return: True / False
  • Description: Update one form data according to target_field on the blockchain

1.6. putMany

  • Endpoint: FormService.putMany(find_array, set_array, form_type)
  • Params: #find_array: type: Array of Object, value:[{key:'', operator:'', value:''}, {...}] ex: [ {key: 'price', operator: '>=', value: '100'}, {key: 'price', operator: '<=', value: '500'}, ] #set_array: type: Array of Object, value:[{key:'', operator:'', value:''}, {...}] ex: [ {key: 'price', operator: '>=', value: '100'}, {key: 'price', operator: '<=', value: '500'}, ] #form_type: type:String, value:'form'
  • Return: True / False
  • Description: Update several form data according to filter array on the blockchain

1.7. deleteOne

  • Endpoint: FormService.putMany(target_field, form_type)

  • Params: #target_field: type: String, value:'' ex:'$.Computer.Dell'

    #form_type: type:String, value:'form'

  • Return: True / False

  • Description: Delete certain form data according to target_field on the blockchain

1.8. deleteMany

  • Endpoint: FormService.deleteMany(filter_array, form_type)
  • Params: #filter_array: type: Array of Object, value:[{key:'', operator:'', value:''}, {...}] ex: [ {key: 'price', operator: '>=', value: '10'}, {key: 'price', operator: '<=', value: '100'} ] #form_type: type:String, value:'form'
  • Return: True / False
  • Description: Delete several json data according to filter array

1.9. deleteAll

  • Endpoint: FormService.deleteAll(form_type)
  • Params: #form_type: type:String, value:'form'
  • Return: True / False
  • Description: Delete all form data on the blockchain
  1. Function

2.1. post

  • Endpoint: FormService.post(data, form_type)
  • Params: #data: type:json, value:{ name:'', data:{ category:'', library:'', name:'', params:[], return_type:'' } } ex: { name: 'function2', data: { category: 'Logistics', library: 'Standard', name: 'Greater than', params: [ '20', { category: 'Math', library: 'Standard', name: 'Sum', params: ['25', '30'], return_type: 'numeric' }, ], return_type: 'numeric', } }, #form_type: type:String, value:'function'
  • Description: Store function on the blockchain

2.2. getOne

  • Endpoint: FormService.getOne(function_name, form_type)
  • Params: #function_name: type:String, value:'' ex:'function2' #form_type: type:String value:'function'
  • Return: Object
  • Description: Return a function according to given name on the blockchain

2.3. getAll

  • Endpoint: FormService.getAll(form_type)
  • Params: #form_type: type:String, value:'function'
  • Return: Array of Object
  • Description: Return all functions on the blockchain

2.4. putOne

  • Endpoint: FormService.putOne(data, form_type)
  • Params: #data: type:json, value:{ id: int, name:'', data:{ category:'', library:'', name:'', params:[], return_type:'' } } ex: {
    id:0, name: 'function3', data: { category: 'Logistics', library: 'Standard', name: 'Greater than', params: [ '20', { category: 'Math', library: 'Standard', name: 'Sum', params: ['25', '30'], return_type: 'numeric', }, ], return_type: 'numeric', }, }, #form_type: type:String, value:'function'
  • Return: True/False
  • Description: Update one function according to given name on the blockchain

2.5. deleteOne

  • Endpoint: FormService.deleteOne(function_name, form_type)

  • Params: #function_name: type:String, value:'' ex:'function3'

    #form_type: type:String, value:'function'

  • Return: True / False

  • Description: Delete one function according to given name on the blockchain

2.6. deleteAll

  • Endpoint: FormService.deleteAll(form_type)
  • Params: #form_type: type:String, value:'function'
  • Return: True / False
  • Description: Delete all functions on the blockchain

2.7. runFunction

  • Endpoint: FormService.runFunction(full_function)
  • Params: #full_function: type:String, value:'' ex:'SumOfPrices(10,20,30)'
  • Description: Calcualte function on the blockchain
  1. Rule

3.1. post

  • Endpoint: FormService.post(data, form_type)
  • Params: #data: type:json, value:{ name:'', condition:{ left:int, operator:'', right:{ category:'', library:'', name:'', params:[], return_type:'' }/int }, actions:[ { action_type:'', target_field:'', filter:{}/[{key:'', operator:'', value:''}] data:{key:'', value:''} },.... ] } ex: { name: 'rule_1', condition: { left: 100, operator: '>', right: { category: 'Math', library: 'Standard', name: 'Sum', params: ['20', '30'], return_type: 'numeric', }, }, actions: [ { action_type: 'Put', target_field: '', filter: [ { key: 'price', operator: '>', value: 'SumOfPrices(10, 20, 400)', }, ], data: {color: 'grey'}, }, ], }, #form_type: type:String, value:'rule'
  • Description: Store a JSON data for rule on the blockchain.

3.2. getAll

  • Endpoint: FormService.getAll(form_type)
  • Params: #form_type: type:String, value:'rule'
  • Return: Array of Object
  • Description: Return all rules on the blockchain

3.3. getOne

  • Endpoint: FormService.getOne(rule_name, form_type)
  • Params: #rule_name: type:String, value:'' ex:'rule_1' #form_type: type:String, value:'rule'
  • Return: Object
  • Description: Return one rule according to given name on the blockchain

3.4. putOne

  • Endpoint: FormService.putOne(data, form_type)

  • Params: #data: type:json, value:{
    id:int, name:'', condition:{ left:int, operator:'', right:{ category:'', library:'', name:'', params:[], return_type:'' }/int }, actions:[ { action_type:'', target_field:'', filter:{}/[{key:'', operator:'', value:''}] data:{key:'', value:''}

                          },{...}
                      ]
          }
          ex:  {
                  name: 'rule_1',
                  condition: {
                  left: 100,
                  operator: '>',
                  right: {
                      category: 'Math',
                      library: 'Standard',
                      name: 'Sum',
                      params: ['20', '30'],
                      return_type: 'numeric',
                  },
                  },
                  actions: [
                  {
                      action_type: 'Put',
                      target_field: '',
                      filter: [
                      {
                          key: 'price',
                          operator: '>',
                          value: 'SumOfPrices(10, 20, 400)',
                      },
                      ],
                      data: {color: 'grey'},
                  },
                  ],
              },

    #form_type: type:String, value:'rule'

  • Return: True/False

  • Description: Update certain rule according to given id on the blockchain

3.5. deleteOne

  • Endpoint: FormService.deleteOne(rule_name, form_type)
  • Params: #rule_name: type:String, value:'', ex:'rule_1' #form_type: type:String, value:'rule'
  • Return: True/False
  • Description: Delete certain rule according to given name on the blockchain

3.6. deleteAll

  • Endpoint: FormService.deleteAll(form_type)
  • Params: #form_type: type:String, value:'rule'
  • Return: True / False
  • Description: Delete all rules on the blockchain

3.7 runRule

  • Endpoint: FormService.runRule(id)
  • Params: #id: type:int, value: ex:0, 1...
  • Description: Run rule and invokes all actions according to id on the blockchain