diff options
| author | Adrien Hopkins <[email protected]> | 2021-08-18 13:45:18 -0500 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-30 16:04:48 -0700 |
| commit | e8d703a78577abc4df8af4747a6408474a848450 (patch) | |
| tree | 10184b130e269482346d1c6ba6bccf983c1481a8 /apidoc/api_data.js | |
| parent | f507d67b69e94d486e6cb6e4ba246dad2e3897a5 (diff) | |
| download | coinos-server-e8d703a78577abc4df8af4747a6408474a848450.tar.gz coinos-server-e8d703a78577abc4df8af4747a6408474a848450.zip | |
Compiled existing api docs to ./apidoc/
Diffstat (limited to 'apidoc/api_data.js')
| -rw-r--r-- | apidoc/api_data.js | 705 |
1 files changed, 705 insertions, 0 deletions
diff --git a/apidoc/api_data.js b/apidoc/api_data.js new file mode 100644 index 00000000..961f82a7 --- /dev/null +++ b/apidoc/api_data.js @@ -0,0 +1,705 @@ +define({ "api": [ + { + "type": "get", + "url": "/accounts", + "title": "Retrieve list of accounts", + "name": "accounts", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of accounts</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"accounts\" : [\n { \"user\": 'Adam', \"account_id\": '123', balance: 500 ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/deposits", + "title": "Retrieve summary of deposits", + "name": "deposits", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of deposits</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"deposits\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/users", + "title": "Retrieve user list", + "name": "getUsers", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "users", + "description": "<p>List of users</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'John Doe', \"email\": '[email protected]', ...},\n { \"username\": 'Jane Doe', \"email\": '[email protected]', ...}\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/invoices", + "title": "Retrieve summary of invoices", + "name": "invoices", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of invoices</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"invoices\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/orders", + "title": "Retrieve summary of orders", + "name": "orders", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of orders</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"orders\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/payments", + "title": "Retrieve summary of payments", + "name": "payments", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of payments</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"payments\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/referrals", + "title": "Retrieve list of referral tokens", + "name": "referrals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of referral tokens</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/referrals", + "title": "Retrieve list of referral tokens", + "name": "referrals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of referral tokens</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/user_kyc", + "title": "Retrieve user kyc details", + "name": "user_kyc", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of kyc details for each user</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'Adam', \"email\": '[email protected]', ... kyc_data... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/transactions", + "title": "Retrieve summary of user transactions", + "name": "user_transactions", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of invoices, payments, orders for users</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"transactions\" : [\n { \"username\": 'Adam', \"email\": '[email protected]', invoices: 1, orders: 0, payments: 2 },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/withdrawals", + "title": "Retrieve summary of withdrawals", + "name": "withdrawals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "<p>list of withdrawals</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"withdrawals\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "post", + "url": "/grant", + "title": "Grant Referral code", + "name": "Grant", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "<p>of member generating referral code.</p>" + }, + { + "group": "Parameter", + "type": "expiry", + "optional": false, + "field": "optional", + "description": "<p>expiry date for token.</p>" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "token", + "description": "<p>referral token</p>" + }, + { + "group": "Success 200", + "type": "Date", + "optional": false, + "field": "expiry", + "description": "<p>optional expiry</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/grant", + "title": "Grant Referral code (variation using get)", + "name": "Grant", + "group": "Referrals", + "permission": [ + { + "name": "member" + }, + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "<p>of member generating referral code.</p>" + }, + { + "group": "Parameter", + "type": "expiry", + "optional": false, + "field": "optional", + "description": "<p>expiry date for token.</p>" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "token", + "description": "<p>referral token</p>" + }, + { + "group": "Success 200", + "type": "Status", + "optional": false, + "field": "status", + "description": "<p>referral status</p>" + }, + { + "group": "Success 200", + "type": "Date", + "optional": false, + "field": "expiry", + "description": "<p>optional expiry</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/checkTokens/:sponsor_id", + "title": "Retrieve list of referral tokens generated by this user", + "name": "checkTokens", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "<p>of member generating referral code.</p>" + }, + { + "group": "Parameter", + "type": "status", + "optional": false, + "field": "optional", + "description": "<p>token status.</p>" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "tokens", + "description": "<p>array of token objects</p>" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"tokens\": [\n {\"token\": \"*********\", \"status\": \"available\", \"expiry\": null}\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/isReferred/:user_id", + "title": "Check if user is referred", + "name": "isReferred", + "group": "Referrals", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "user_id", + "optional": false, + "field": "user", + "description": "<p>id</p>" + } + ] + } + }, + "success": { + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n true\n}", + "type": "json" + } + ] + }, + "description": "<p>returns boolean indicating if user is referred or not</p>", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "post", + "url": "/joinQueue", + "title": "Join waiting list (track email & phone)", + "name": "joinQueue", + "group": "Referrals", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "email", + "optional": false, + "field": "email", + "description": "<p>address</p>" + }, + { + "group": "Parameter", + "type": "phone", + "optional": false, + "field": "phone", + "description": "<p>number</p>" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "verified", + "defaultValue": "true", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"success\": true\n \"message\": 'Added to waiting list'\n}", + "type": "json" + } + ] + }, + "description": "<p>referral token is updated with existing user_id</p>", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/verify/:user_id", + "title": "Verify token and apply to existing user", + "name": "verify", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "user_id", + "optional": false, + "field": "Current", + "description": "<p>user</p>" + }, + { + "group": "Parameter", + "type": "token", + "optional": false, + "field": "Token", + "description": "<p>to validate</p>" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "verified", + "defaultValue": "true", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"verified\": true\n}", + "type": "json" + } + ] + }, + "description": "<p>referral token is updated with existing user_id</p>", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + } +] }); |
