Namirasoft Balance API V1

Namira Software Corporation Balance API Version 1 (1.4.0)

Install


To use this cli, we need to first Install Nodejs, then run the following command.

npm i -g namirasoft-balance-api-v1

Copied!

Commands


Healthz

Get

Returns the application health status

ns-balance healthz get

Copied!

Value

List

Returns the value list of a given table and column

ns-balance value list {table} {column}

Copied!

Transaction

List

Returns the transaction list

ns-balance transaction list {asset_id} {filters} {page} {size} {user_id}

Copied!

Create

Creates a new transaction

ns-balance transaction create

Copied!

--product_id (String)

--txn_id (String)

--asset_id (String)

--type (Enum)

--category (String)

--description (String)

--amount (Integer)

--seen (Boolean)

Seen

Seens transaction

ns-balance transaction seen

Copied!

User

Current

Returns the current user

ns-balance user current

Copied!

Summary

List

Returns the summary list

ns-balance summary list {asset_id} {filters} {page} {size} {user_id}

Copied!

Asset

List

Returns the asset list

ns-balance asset list {filters} {page} {size} {user_id}

Copied!

Get

Returns an asset by an id

ns-balance asset get {id}

Copied!

Schemas


Transaction

{
  "name": "Transaction",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "txn_id": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "asset_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "type": {
      "name": "TransactionType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Asset",
        "Liability",
        "Equity",
        "Revenue",
        "Expense"
      ]
    },
    "category": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "amount": {
      "type": "Integer",
      "required": true
    },
    "seen": {
      "type": "Boolean",
      "required": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

TransactionInput

{
  "name": "TransactionInput",
  "type": "Object",
  "required": true,
  "fields": {
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "txn_id": {
      "type": "String",
      "required": false,
      "allowEmpty": true
    },
    "asset_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "type": {
      "name": "TransactionType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Asset",
        "Liability",
        "Equity",
        "Revenue",
        "Expense"
      ]
    },
    "category": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "description": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "amount": {
      "type": "Integer",
      "required": true
    },
    "seen": {
      "type": "Boolean",
      "required": true
    }
  }
}

User

{
  "name": "User",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "balance": {
      "type": "Integer",
      "required": true
    },
    "new_transaction": {
      "type": "Integer",
      "required": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Summary

{
  "name": "Summary",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "user_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "asset_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "year": {
      "type": "Integer",
      "required": true
    },
    "month": {
      "type": "Integer",
      "required": true
    },
    "previous_balance": {
      "type": "Integer",
      "required": true
    },
    "total_cost": {
      "type": "Integer",
      "required": true
    },
    "total_revenue": {
      "type": "Integer",
      "required": true
    },
    "total_equity": {
      "type": "Integer",
      "required": true
    },
    "total_payment": {
      "type": "Integer",
      "required": true
    },
    "total_debt": {
      "type": "Integer",
      "required": true
    },
    "total_credit": {
      "type": "Integer",
      "required": true
    },
    "final_balance": {
      "type": "Integer",
      "required": true
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Asset

{
  "name": "Asset",
  "type": "Object",
  "required": true,
  "fields": {
    "id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "product_id": {
      "type": "String",
      "required": true,
      "min": 20,
      "max": 20,
      "allowEmpty": false
    },
    "name": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "type": {
      "name": "AssetType",
      "type": "Enum",
      "required": true,
      "valids": [
        "Count",
        "Money",
        "Time"
      ]
    },
    "description": {
      "type": "String",
      "required": true,
      "allowEmpty": false
    },
    "created_at": {
      "type": "DateTime",
      "required": true
    },
    "updated_at": {
      "type": "DateTime",
      "required": true
    }
  }
}

Enums

TransactionType

Asset

Liability

Equity

Revenue

Expense

AssetType

Count

Money

Time

Namira Software Corporation

©Copyright 2010 to 2024 Namira Software Corporation. All rights reserved.