To use this cli, we need to first Install Nodejs, then run the following command.
npm i -g namirasoft-balance-api-v1
Returns the application health status
ns-balance healthz get
Returns the value list of a given table and column
ns-balance value list {table} {column}
Returns the transaction list
ns-balance transaction list {asset_id} {filters} {page} {size} {user_id}
Creates a new transaction
ns-balance transaction create
--product_id (String)
--txn_id (String)
--asset_id (String)
--type (Enum)
--category (String)
--description (String)
--amount (Integer)
--seen (Boolean)
Seens transaction
ns-balance transaction seen
Returns the current user
ns-balance user current
Returns the summary list
ns-balance summary list {asset_id} {filters} {page} {size} {user_id}
Returns the asset list
ns-balance asset list {filters} {page} {size} {user_id}
Returns an asset by an id
ns-balance asset get {id}
{  "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    }  }}
{  "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    }  }}
{  "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    }  }}
{  "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    }  }}
{  "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    }  }}
Asset
Liability
Equity
Revenue
Expense
Count
Money
Time
©Copyright 2010 to 2024 Namira Software Corporation. All rights reserved.