This commit is contained in:
parent
1c3a2dea19
commit
a0cd1f9a25
333
docs/index.html
333
docs/index.html
@ -3,164 +3,233 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Cargo ERP Backend API Docs</title>
|
<title>Cargo ERP Backend API Documentation</title>
|
||||||
<style>
|
<style>
|
||||||
*{margin:0;padding:0;box-sizing:border-box}
|
*{margin:0;padding:0;box-sizing:border-box}
|
||||||
:root{--bg:#0f172a;--bg2:#1e293b;--bg3:#334155;--text:#e2e8f0;--text2:#94a3b8;--border:#475569;--get:#3b82f6;--post:#22c55e;--put:#f59e0b;--delete:#ef4444;--accent:#60a5fa}
|
:root{--bg:#0f172a;--bg2:#1e293b;--bg3:#334155;--text:#e2e8f0;--text2:#94a3b8;--border:#475569;--get:#3b82f6;--post:#22c55e;--put:#f59e0b;--delete:#ef4444;--accent:#60a5fa;--green:#86efac;--red:#fca5a5;--yellow:#fde68a}
|
||||||
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,monospace;background:var(--bg);color:var(--text);display:flex;min-height:100vh}
|
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,monospace;background:var(--bg);color:var(--text);display:flex;min-height:100vh}
|
||||||
.sidebar{width:280px;background:var(--bg2);border-right:1px solid var(--border);position:fixed;top:0;left:0;bottom:0;overflow-y:auto;padding:16px 0;z-index:10}
|
.sidebar{width:280px;background:var(--bg2);border-right:1px solid var(--border);position:fixed;top:0;left:0;bottom:0;overflow-y:auto;padding:16px 0;z-index:10}
|
||||||
.sidebar h2{padding:0 16px 12px;font-size:16px;color:var(--accent);border-bottom:1px solid var(--border);margin-bottom:8px}
|
.sidebar h2{padding:0 16px 12px;font-size:16px;color:var(--accent);border-bottom:1px solid var(--border);margin-bottom:8px}
|
||||||
.sidebar .search{margin:12px 16px}
|
.sidebar .info{padding:0 16px 8px;font-size:11px;color:var(--text2)}
|
||||||
.sidebar input{width:100%;padding:8px 12px;border-radius:6px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:13px}
|
.sidebar .search{margin:8px 16px 12px}
|
||||||
.sidebar nav a{display:block;padding:6px 16px;color:var(--text2);text-decoration:none;font-size:12px;border-left:3px solid transparent;transition:.15s}
|
.sidebar input{width:100%;padding:8px 12px;border-radius:6px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:13px;outline:none}
|
||||||
|
.sidebar input:focus{border-color:var(--accent)}
|
||||||
|
.sidebar nav a{display:flex;align-items:center;gap:8px;padding:5px 16px;color:var(--text2);text-decoration:none;font-size:12px;border-left:3px solid transparent;transition:.15s}
|
||||||
.sidebar nav a:hover{background:var(--bg3);color:var(--text)}
|
.sidebar nav a:hover{background:var(--bg3);color:var(--text)}
|
||||||
.sidebar nav .cat{font-size:13px;font-weight:700;color:var(--text);padding:12px 16px 4px;text-transform:uppercase;letter-spacing:.5px}
|
.sidebar nav a .dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
|
||||||
|
.sidebar nav .cat{font-size:12px;font-weight:700;color:var(--text);padding:14px 16px 4px;text-transform:uppercase;letter-spacing:.5px}
|
||||||
|
.sidebar nav .count{font-size:10px;color:var(--text2);font-weight:400;margin-left:auto}
|
||||||
.main{margin-left:280px;flex:1;padding:24px 32px;max-width:960px}
|
.main{margin-left:280px;flex:1;padding:24px 32px;max-width:960px}
|
||||||
.main h1{font-size:24px;margin-bottom:8px}
|
.main h1{font-size:24px;margin-bottom:4px}
|
||||||
.main .subtitle{color:var(--text2);margin-bottom:24px;font-size:14px}
|
.main .subtitle{color:var(--text2);margin-bottom:20px;font-size:13px;line-height:1.5}
|
||||||
.server-bar{display:flex;gap:12px;margin-bottom:24px;flex-wrap:wrap}
|
.server-bar{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}
|
||||||
.server-bar .srv{padding:8px 14px;border-radius:6px;background:var(--bg2);border:1px solid var(--border);font-size:13px;cursor:pointer;transition:.15s}
|
.server-bar .srv{padding:6px 12px;border-radius:6px;background:var(--bg2);border:1px solid var(--border);font-size:12px;cursor:pointer;transition:.15s;color:var(--text2)}
|
||||||
.server-bar .srv.active{border-color:var(--accent);color:var(--accent)}
|
.server-bar .srv.active{border-color:var(--accent);color:var(--accent)}
|
||||||
.endpoints{display:flex;flex-direction:column;gap:12px}
|
.server-bar .srv:hover{border-color:var(--accent)}
|
||||||
.ep{background:var(--bg2);border:1px solid var(--border);border-radius:8px;overflow:hidden}
|
.stats{display:flex;gap:16px;margin-bottom:24px;flex-wrap:wrap}
|
||||||
.ep-head{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer}
|
.stat{padding:10px 16px;border-radius:8px;background:var(--bg2);border:1px solid var(--border);font-size:12px;color:var(--text2)}
|
||||||
.ep-head:hover{background:var(--bg3)}
|
.stat strong{color:var(--text);font-size:18px;display:block}
|
||||||
.method{padding:3px 10px;border-radius:4px;font-size:12px;font-weight:700;color:#fff;min-width:64px;text-align:center;text-transform:uppercase}
|
.cat-section{margin-top:28px}
|
||||||
.method.get{background:var(--get)}.method.post{background:var(--post)}.method.put{background:var(--put)}.method.delete{background:var(--delete)}
|
|
||||||
.ep-path{font-size:14px;font-family:monospace;color:var(--text)}
|
|
||||||
.ep-summary{color:var(--text2);font-size:12px;margin-left:auto}
|
|
||||||
.ep-body{display:none;padding:16px;border-top:1px solid var(--border);font-size:13px;line-height:1.6}
|
|
||||||
.ep.open .ep-body{display:block}
|
|
||||||
.section-label{color:var(--accent);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin:12px 0 6px}
|
|
||||||
.section-label:first-child{margin-top:0}
|
|
||||||
.params table{width:100%;border-collapse:collapse}
|
|
||||||
.params td,.params th{text-align:left;padding:6px 10px;border-bottom:1px solid var(--border);font-size:13px}
|
|
||||||
.params th{color:var(--text2);font-size:11px;text-transform:uppercase}
|
|
||||||
pre{background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:12px 16px;overflow-x:auto;font-size:12px;line-height:1.5;margin-bottom:8px}
|
|
||||||
pre code{color:var(--text2)}
|
|
||||||
.cat-section{margin-top:24px}
|
|
||||||
.cat-title{font-size:18px;font-weight:700;color:var(--accent);margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}
|
.cat-title{font-size:18px;font-weight:700;color:var(--accent);margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border)}
|
||||||
.footer{text-align:center;padding:32px;color:var(--text2);font-size:12px}
|
.endpoints{display:flex;flex-direction:column;gap:8px}
|
||||||
|
.ep{background:var(--bg2);border:1px solid var(--border);border-radius:8px;overflow:hidden;transition:border-color .15s}
|
||||||
|
.ep:hover{border-color:var(--text2)}
|
||||||
|
.ep-head{display:flex;align-items:center;gap:10px;padding:10px 14px;cursor:pointer}
|
||||||
|
.ep-head:hover{background:var(--bg3)}
|
||||||
|
.method{padding:2px 8px;border-radius:4px;font-size:11px;font-weight:700;color:#fff;min-width:56px;text-align:center;text-transform:uppercase;flex-shrink:0}
|
||||||
|
.method.get{background:var(--get)}.method.post{background:var(--post)}.method.put{background:var(--put)}.method.delete{background:var(--delete)}
|
||||||
|
.ep-path{font-size:13px;font-family:monospace;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||||
|
.ep-path .param{color:var(--accent)}
|
||||||
|
.ep-summary{color:var(--text2);font-size:11px;margin-left:auto;white-space:nowrap}
|
||||||
|
.ep-body{display:none;padding:14px;border-top:1px solid var(--border);font-size:12px;line-height:1.6}
|
||||||
|
.ep.open .ep-body{display:block}
|
||||||
|
.section-label{color:var(--accent);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;margin:10px 0 4px}
|
||||||
|
.section-label:first-child{margin-top:0}
|
||||||
|
.params table{width:100%;border-collapse:collapse;margin-bottom:8px}
|
||||||
|
.params td,.params th{text-align:left;padding:5px 8px;border-bottom:1px solid var(--border);font-size:12px}
|
||||||
|
.params th{color:var(--text2);font-size:10px;text-transform:uppercase}
|
||||||
|
.badge-r{color:var(--red)}.badge-o{color:var(--text2)}
|
||||||
|
.req-fields{margin-bottom:8px}
|
||||||
|
.req-fields table{width:100%;border-collapse:collapse;margin-bottom:8px}
|
||||||
|
.req-fields td,.req-fields th{text-align:left;padding:6px 10px;border-bottom:1px solid var(--border);font-size:12px}
|
||||||
|
.req-fields th{color:var(--text2);font-size:10px;text-transform:uppercase}
|
||||||
|
.req-fields .required-val{color:var(--red)}
|
||||||
|
pre{background:var(--bg);border:1px solid var(--border);border-radius:6px;padding:10px 14px;overflow-x:auto;font-size:11px;line-height:1.5;margin-bottom:8px;color:var(--text2);white-space:pre-wrap;word-break:break-all}
|
||||||
|
pre .k{color:#93c5fd}pre .s{color:#86efac}pre .n{color:#fbbf24}pre .b{color:#c084fc}
|
||||||
|
.footer{text-align:center;padding:32px;color:var(--text2);font-size:11px}
|
||||||
@media(max-width:768px){.sidebar{display:none}.main{margin-left:0;padding:16px}}
|
@media(max-width:768px){.sidebar{display:none}.main{margin-left:0;padding:16px}}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<h2>Cargo ERP API</h2>
|
<h2>Cargo ERP API</h2>
|
||||||
|
<div class="info">67 endpoints across 8 modules</div>
|
||||||
<div class="search"><input type="text" id="search" placeholder="Search endpoints..."></div>
|
<div class="search"><input type="text" id="search" placeholder="Search endpoints..."></div>
|
||||||
<nav id="nav"></nav>
|
<nav id="nav"></nav>
|
||||||
</div>
|
</div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<h1>Cargo ERP Backend API</h1>
|
<h1>Cargo ERP Backend API Documentation</h1>
|
||||||
<p class="subtitle">Master Data, Cost Components, Basic Pricing. Auth ignored for docs.</p>
|
<p class="subtitle">Complete reference for all API endpoints. No authentication required for testing.</p>
|
||||||
<div class="server-bar">
|
<div class="server-bar">
|
||||||
<div class="srv active" onclick="setBase('http://localhost:8080')">Local (localhost:8080)</div>
|
<div class="srv active" onclick="setBase(0)">Local (localhost:8080)</div>
|
||||||
<div class="srv" onclick="setBase('http://145.79.11.200:8080')">VPS (145.79.11.200:8080)</div>
|
<div class="srv" onclick="setBase(1)">VPS (145.79.11.200:8080)</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="eps"></div>
|
<div class="stats" id="stats"></div>
|
||||||
<div class="footer">Cargo ERP Backend API Docs</div>
|
<div id="content"></div>
|
||||||
|
<div class="footer">Cargo ERP Backend API Documentation</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
let BASE='http://localhost:8080';
|
const URLS=["http://localhost:8080","http://145.79.11.200:8080"];
|
||||||
function setBase(u){BASE=u;document.querySelectorAll('.srv').forEach(s=>s.classList.toggle('active',s.textContent.includes(u.split(':')[1]||'localhost')));render()}
|
let BASE=URLS[0];
|
||||||
|
function setBase(i){BASE=URLS[i];document.querySelectorAll(".srv").forEach((s,j)=>s.classList.toggle("active",j===i));render()}
|
||||||
const E=[
|
const E=[
|
||||||
{cat:"Auth",method:"get",path:"/ping",summary:"Health Check",params:[],req:null},
|
{cat:"Auth",m:"get",p:"/ping",s:"Health check",q:[],rb:null,rbe:"{\n \"message\": \"pong\"\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"get",path:"/master-data/provinces/",summary:"Get All Province",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Auth",m:"post",p:"/login",s:"Login — get session token",q:[],rb:"{\n \"email\": \"admin@example.com\",\n \"password\": \"secret123\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"token\": \"eyJhbGciOiJIUzI1NiJ9...\"\n }\n}",rf:["email","password"]},
|
||||||
{cat:"Master Data / Province",method:"post",path:"/master-data/provinces/",summary:"Create Province",params:[],req:"ProvinceCreateRequest"},
|
{cat:"Auth",m:"post",p:"/logout",s:"Logout — destroy session",q:[],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"You are logged out\"\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"post",path:"/master-data/provinces/list",summary:"Get Province List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / Province",m:"get",p:"/master-data/provinces/",s:"Get all provinces",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"id",t:"string",req:false,d:"Filter by ID"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"get",path:"/master-data/provinces/<id>",summary:"Get Province by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Province",m:"post",p:"/master-data/provinces/list",s:"Province list (DataTable pagination)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"put",path:"/master-data/provinces/<id>",summary:"Update Province",params:[{n:"id",t:"string",req:true,d:"id"}],req:"ProvinceCreateRequest"},
|
{cat:"Master Data / Province",m:"get",p:"/master-data/provinces/:id",s:"Get province by ID",q:[{n:"id",t:"string",req:true,d:"Province ID (26-char ULID)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Jawa Barat\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"delete",path:"/master-data/provinces/<id>",summary:"Delete Province",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Province",m:"post",p:"/master-data/provinces/",s:"Create province",q:[],rb:"{\n \"name\": \"Jawa Barat\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Jawa Barat\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name"]},
|
||||||
{cat:"Master Data / Province",method:"get",path:"/master-data/provinces/template",summary:"Download Province Import Template",params:[],req:null},
|
{cat:"Master Data / Province",m:"put",p:"/master-data/provinces/:id",s:"Update province",q:[{n:"id",t:"string",req:true,d:"Province ID"}],rb:"{\n \"name\": \"Jawa Barat\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Jawa Barat\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name"]},
|
||||||
{cat:"Master Data / Province",method:"post",path:"/master-data/provinces/import",summary:"Import Province Data",params:[],req:"_multipart_"},
|
{cat:"Master Data / Province",m:"delete",p:"/master-data/provinces/:id",s:"Delete province",q:[{n:"id",t:"string",req:true,d:"Province ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"province deleted\"\n}",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"post",path:"/master-data/provinces/import/stop",summary:"Stop Province Import",params:[],req:"StopImportRequest"},
|
{cat:"Master Data / Province",m:"get",p:"/master-data/provinces/template",s:"Download province CSV template",q:[],rb:null,rbe:"<i>Returns CSV file (Content-Type: text/csv)</i>",rf:[]},
|
||||||
{cat:"Master Data / Province",method:"get",path:"/master-data/provinces/import/status/<jobId>",summary:"Get Province Import Job Status",params:[{n:"jobId",t:"string",req:true,d:"jobId"}],req:null},
|
{cat:"Master Data / Province",m:"post",p:"/master-data/provinces/import",s:"Import provinces from CSV",q:[],rb:"_MULTIPART_",rbe:"{\n \"success\": true,\n \"data\": {\n \"job_id\": \"job_abc123def456\",\n \"total_rows\": 100,\n \"imported\": 95,\n \"skipped\": 5,\n \"logs\": [\n {\n \"row\": 2,\n \"status\": \"skipped\",\n \"data\": \"Jawa Barat\",\n \"message\": \"duplicate\"\n }\n ],\n \"errors\": [],\n \"is_async\": false\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"get",path:"/master-data/cities/",summary:"Get All City",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"province_id",t:"string",req:false,d:"province_id"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"},{n:"port",t:"string",req:false,d:"port"}],req:null},
|
{cat:"Master Data / Province",m:"post",p:"/master-data/provinces/import/stop",s:"Stop province import job",q:[],rb:"{\n \"job_id\": \"job_abc123def456\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Job stopped\"\n}",rf:["job_id"]},
|
||||||
{cat:"Master Data / City",method:"post",path:"/master-data/cities/",summary:"Create City",params:[],req:"CityCreateRequest"},
|
{cat:"Master Data / Province",m:"get",p:"/master-data/provinces/import/status/:jobId",s:"Check province import job status",q:[{n:"jobId",t:"string",req:true,d:"Async job ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"job\": {\n \"id\": \"job_abc123def456\",\n \"status\": \"completed\",\n \"total\": 100,\n \"imported\": 95,\n \"skipped\": 5\n },\n \"logs\": []\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"post",path:"/master-data/cities/list",summary:"Get City List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / City",m:"get",p:"/master-data/cities/",s:"Get all citys",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"province_id",t:"string",req:false,d:"Filter by province"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"get",path:"/master-data/cities/<id>",summary:"Get City by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / City",m:"post",p:"/master-data/cities/list",s:"City list (DataTable pagination)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"put",path:"/master-data/cities/<id>",summary:"Update City",params:[{n:"id",t:"string",req:true,d:"id"}],req:"CityCreateRequest"},
|
{cat:"Master Data / City",m:"get",p:"/master-data/cities/:id",s:"Get city by ID",q:[{n:"id",t:"string",req:true,d:"City ID (26-char ULID)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kota Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"port\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"port\": \"BDO\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"delete",path:"/master-data/cities/<id>",summary:"Delete City",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / City",m:"post",p:"/master-data/cities/",s:"Create city",q:[],rb:"{\n \"name\": \"Kota Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"port\": \"BDO\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kota Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"port\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"port\": \"BDO\"\n }\n}",rf:["name","province_id"]},
|
||||||
{cat:"Master Data / City",method:"get",path:"/master-data/cities/template",summary:"Download City Import Template",params:[],req:null},
|
{cat:"Master Data / City",m:"put",p:"/master-data/cities/:id",s:"Update city",q:[{n:"id",t:"string",req:true,d:"City ID"}],rb:"{\n \"name\": \"Kota Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"port\": \"BDO\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kota Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"port\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"port\": \"BDO\"\n }\n}",rf:["name","province_id"]},
|
||||||
{cat:"Master Data / City",method:"post",path:"/master-data/cities/import",summary:"Import City Data",params:[],req:"_multipart_"},
|
{cat:"Master Data / City",m:"delete",p:"/master-data/cities/:id",s:"Delete city",q:[{n:"id",t:"string",req:true,d:"City ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"city deleted\"\n}",rf:[]},
|
||||||
{cat:"Master Data / City",method:"post",path:"/master-data/cities/import/stop",summary:"Stop City Import",params:[],req:"StopImportRequest"},
|
{cat:"Master Data / City",m:"get",p:"/master-data/cities/template",s:"Download city CSV template",q:[],rb:null,rbe:"<i>Returns CSV file (Content-Type: text/csv)</i>",rf:[]},
|
||||||
{cat:"Master Data / City",method:"get",path:"/master-data/cities/import/status/<jobId>",summary:"Get City Import Job Status",params:[{n:"jobId",t:"string",req:true,d:"jobId"}],req:null},
|
{cat:"Master Data / City",m:"post",p:"/master-data/cities/import",s:"Import citys from CSV",q:[],rb:"_MULTIPART_",rbe:"{\n \"success\": true,\n \"data\": {\n \"job_id\": \"job_abc123def456\",\n \"total_rows\": 100,\n \"imported\": 95,\n \"skipped\": 5,\n \"logs\": [\n {\n \"row\": 2,\n \"status\": \"skipped\",\n \"data\": \"Jawa Barat\",\n \"message\": \"duplicate\"\n }\n ],\n \"errors\": [],\n \"is_async\": false\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"get",path:"/master-data/districts/",summary:"Get All District",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"province_id",t:"string",req:false,d:"province_id"},{n:"city_id",t:"string",req:false,d:"city_id"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Master Data / City",m:"post",p:"/master-data/cities/import/stop",s:"Stop city import job",q:[],rb:"{\n \"job_id\": \"job_abc123def456\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Job stopped\"\n}",rf:["job_id"]},
|
||||||
{cat:"Master Data / District",method:"post",path:"/master-data/districts/",summary:"Create District",params:[],req:"DistrictCreateRequest"},
|
{cat:"Master Data / City",m:"get",p:"/master-data/cities/import/status/:jobId",s:"Check city import job status",q:[{n:"jobId",t:"string",req:true,d:"Async job ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"job\": {\n \"id\": \"job_abc123def456\",\n \"status\": \"completed\",\n \"total\": 100,\n \"imported\": 95,\n \"skipped\": 5\n },\n \"logs\": []\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"post",path:"/master-data/districts/list",summary:"Get District List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / District",m:"get",p:"/master-data/districts/",s:"Get all districts",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"city_id",t:"string",req:false,d:"Filter by city"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"get",path:"/master-data/districts/<id>",summary:"Get District by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / District",m:"post",p:"/master-data/districts/list",s:"District list (DataTable pagination)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"put",path:"/master-data/districts/<id>",summary:"Update District",params:[{n:"id",t:"string",req:true,d:"id"}],req:"DistrictCreateRequest"},
|
{cat:"Master Data / District",m:"get",p:"/master-data/districts/:id",s:"Get district by ID",q:[{n:"id",t:"string",req:true,d:"District ID (26-char ULID)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kabupaten Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"delete",path:"/master-data/districts/<id>",summary:"Delete District",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / District",m:"post",p:"/master-data/districts/",s:"Create district",q:[],rb:"{\n \"name\": \"Kabupaten Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kabupaten Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","province_id","city_id"]},
|
||||||
{cat:"Master Data / District",method:"get",path:"/master-data/districts/template",summary:"Download District Import Template",params:[],req:null},
|
{cat:"Master Data / District",m:"put",p:"/master-data/districts/:id",s:"Update district",q:[{n:"id",t:"string",req:true,d:"District ID"}],rb:"{\n \"name\": \"Kabupaten Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kabupaten Bandung\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","province_id","city_id"]},
|
||||||
{cat:"Master Data / District",method:"post",path:"/master-data/districts/import",summary:"Import District Data",params:[],req:"_multipart_"},
|
{cat:"Master Data / District",m:"delete",p:"/master-data/districts/:id",s:"Delete district",q:[{n:"id",t:"string",req:true,d:"District ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"district deleted\"\n}",rf:[]},
|
||||||
{cat:"Master Data / District",method:"post",path:"/master-data/districts/import/stop",summary:"Stop District Import",params:[],req:"StopImportRequest"},
|
{cat:"Master Data / District",m:"get",p:"/master-data/districts/template",s:"Download district CSV template",q:[],rb:null,rbe:"<i>Returns CSV file (Content-Type: text/csv)</i>",rf:[]},
|
||||||
{cat:"Master Data / District",method:"get",path:"/master-data/districts/import/status/<jobId>",summary:"Get District Import Job Status",params:[{n:"jobId",t:"string",req:true,d:"jobId"}],req:null},
|
{cat:"Master Data / District",m:"post",p:"/master-data/districts/import",s:"Import districts from CSV",q:[],rb:"_MULTIPART_",rbe:"{\n \"success\": true,\n \"data\": {\n \"job_id\": \"job_abc123def456\",\n \"total_rows\": 100,\n \"imported\": 95,\n \"skipped\": 5,\n \"logs\": [\n {\n \"row\": 2,\n \"status\": \"skipped\",\n \"data\": \"Jawa Barat\",\n \"message\": \"duplicate\"\n }\n ],\n \"errors\": [],\n \"is_async\": false\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"get",path:"/master-data/subdistricts/",summary:"Get All Subdistrict",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"province_id",t:"string",req:false,d:"province_id"},{n:"city_id",t:"string",req:false,d:"city_id"},{n:"district_id",t:"string",req:false,d:"district_id"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Master Data / District",m:"post",p:"/master-data/districts/import/stop",s:"Stop district import job",q:[],rb:"{\n \"job_id\": \"job_abc123def456\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Job stopped\"\n}",rf:["job_id"]},
|
||||||
{cat:"Master Data / Subdistrict",method:"post",path:"/master-data/subdistricts/",summary:"Create Subdistrict",params:[],req:"SubdistrictCreateRequest"},
|
{cat:"Master Data / District",m:"get",p:"/master-data/districts/import/status/:jobId",s:"Check district import job status",q:[{n:"jobId",t:"string",req:true,d:"Async job ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"job\": {\n \"id\": \"job_abc123def456\",\n \"status\": \"completed\",\n \"total\": 100,\n \"imported\": 95,\n \"skipped\": 5\n },\n \"logs\": []\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"post",path:"/master-data/subdistricts/list",summary:"Get Subdistrict List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / Subdistrict",m:"get",p:"/master-data/subdistricts/",s:"Get all subdistricts",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"district_id",t:"string",req:false,d:"Filter by district"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"get",path:"/master-data/subdistricts/<id>",summary:"Get Subdistrict by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Subdistrict",m:"post",p:"/master-data/subdistricts/list",s:"Subdistrict list (DataTable pagination)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"put",path:"/master-data/subdistricts/<id>",summary:"Update Subdistrict",params:[{n:"id",t:"string",req:true,d:"id"}],req:"SubdistrictCreateRequest"},
|
{cat:"Master Data / Subdistrict",m:"get",p:"/master-data/subdistricts/:id",s:"Get subdistrict by ID",q:[{n:"id",t:"string",req:true,d:"Subdistrict ID (26-char ULID)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kecamatan Bandung Wetan\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"delete",path:"/master-data/subdistricts/<id>",summary:"Delete Subdistrict",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Subdistrict",m:"post",p:"/master-data/subdistricts/",s:"Create subdistrict",q:[],rb:"{\n \"name\": \"Kecamatan Bandung Wetan\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kecamatan Bandung Wetan\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","province_id","city_id","district_id"]},
|
||||||
{cat:"Master Data / Subdistrict",method:"get",path:"/master-data/subdistricts/template",summary:"Download Subdistrict Import Template",params:[],req:null},
|
{cat:"Master Data / Subdistrict",m:"put",p:"/master-data/subdistricts/:id",s:"Update subdistrict",q:[{n:"id",t:"string",req:true,d:"Subdistrict ID"}],rb:"{\n \"name\": \"Kecamatan Bandung Wetan\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Kecamatan Bandung Wetan\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","province_id","city_id","district_id"]},
|
||||||
{cat:"Master Data / Subdistrict",method:"post",path:"/master-data/subdistricts/import",summary:"Import Subdistrict Data",params:[],req:"_multipart_"},
|
{cat:"Master Data / Subdistrict",m:"delete",p:"/master-data/subdistricts/:id",s:"Delete subdistrict",q:[{n:"id",t:"string",req:true,d:"Subdistrict ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"subdistrict deleted\"\n}",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"post",path:"/master-data/subdistricts/import/stop",summary:"Stop Subdistrict Import",params:[],req:"StopImportRequest"},
|
{cat:"Master Data / Subdistrict",m:"get",p:"/master-data/subdistricts/template",s:"Download subdistrict CSV template",q:[],rb:null,rbe:"<i>Returns CSV file (Content-Type: text/csv)</i>",rf:[]},
|
||||||
{cat:"Master Data / Subdistrict",method:"get",path:"/master-data/subdistricts/import/status/<jobId>",summary:"Get Subdistrict Import Job Status",params:[{n:"jobId",t:"string",req:true,d:"jobId"}],req:null},
|
{cat:"Master Data / Subdistrict",m:"post",p:"/master-data/subdistricts/import",s:"Import subdistricts from CSV",q:[],rb:"_MULTIPART_",rbe:"{\n \"success\": true,\n \"data\": {\n \"job_id\": \"job_abc123def456\",\n \"total_rows\": 100,\n \"imported\": 95,\n \"skipped\": 5,\n \"logs\": [\n {\n \"row\": 2,\n \"status\": \"skipped\",\n \"data\": \"Jawa Barat\",\n \"message\": \"duplicate\"\n }\n ],\n \"errors\": [],\n \"is_async\": false\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"get",path:"/master-data/postal-codes/",summary:"Get All Postal Code",params:[{n:"id",t:"string",req:false,d:"id"},{n:"postal_code",t:"string",req:false,d:"postal_code"},{n:"province_id",t:"string",req:false,d:"province_id"},{n:"city_id",t:"string",req:false,d:"city_id"},{n:"district_id",t:"string",req:false,d:"district_id"},{n:"subdistrict_id",t:"string",req:false,d:"subdistrict_id"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Master Data / Subdistrict",m:"post",p:"/master-data/subdistricts/import/stop",s:"Stop subdistrict import job",q:[],rb:"{\n \"job_id\": \"job_abc123def456\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Job stopped\"\n}",rf:["job_id"]},
|
||||||
{cat:"Master Data / Postal Code",method:"post",path:"/master-data/postal-codes/",summary:"Create Postal Code",params:[],req:"PostalCodeCreateRequest"},
|
{cat:"Master Data / Subdistrict",m:"get",p:"/master-data/subdistricts/import/status/:jobId",s:"Check subdistrict import job status",q:[{n:"jobId",t:"string",req:true,d:"Async job ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"job\": {\n \"id\": \"job_abc123def456\",\n \"status\": \"completed\",\n \"total\": 100,\n \"imported\": 95,\n \"skipped\": 5\n },\n \"logs\": []\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"post",path:"/master-data/postal-codes/list",summary:"Get Postal Code List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / Postal Code",m:"get",p:"/master-data/postal-codes/",s:"Get all postal codes",q:[{n:"postal_code",t:"string",req:false,d:"Filter by postal code"},{n:"city_id",t:"string",req:false,d:"Filter by city"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"get",path:"/master-data/postal-codes/<id>",summary:"Get Postal Code by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Postal Code",m:"post",p:"/master-data/postal-codes/list",s:"Postal Code list (DataTable pagination)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"put",path:"/master-data/postal-codes/<id>",summary:"Update Postal Code",params:[{n:"id",t:"string",req:true,d:"id"}],req:"PostalCodeCreateRequest"},
|
{cat:"Master Data / Postal Code",m:"get",p:"/master-data/postal-codes/:id",s:"Get postal code by ID",q:[{n:"id",t:"string",req:true,d:"Postal Code ID (26-char ULID)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"postal_code\": \"01HXYZ123456789012345678\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"delete",path:"/master-data/postal-codes/<id>",summary:"Delete Postal Code",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Postal Code",m:"post",p:"/master-data/postal-codes/",s:"Create postal code",q:[],rb:"{\n \"postal_code\": \"40111\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"postal_code\": \"01HXYZ123456789012345678\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["postal_code","province_id","city_id","district_id","subdistrict_id"]},
|
||||||
{cat:"Master Data / Postal Code",method:"get",path:"/master-data/postal-codes/template",summary:"Download Postal Code Import Template",params:[],req:null},
|
{cat:"Master Data / Postal Code",m:"put",p:"/master-data/postal-codes/:id",s:"Update postal code",q:[{n:"id",t:"string",req:true,d:"Postal Code ID"}],rb:"{\n \"postal_code\": \"40111\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"postal_code\": \"01HXYZ123456789012345678\",\n \"province_id\": \"01HXYZ123456789012345678\",\n \"city_id\": \"01HXYZ123456789012345678\",\n \"district_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["postal_code","province_id","city_id","district_id","subdistrict_id"]},
|
||||||
{cat:"Master Data / Postal Code",method:"post",path:"/master-data/postal-codes/import",summary:"Import Postal Code Data",params:[],req:"_multipart_"},
|
{cat:"Master Data / Postal Code",m:"delete",p:"/master-data/postal-codes/:id",s:"Delete postal code",q:[{n:"id",t:"string",req:true,d:"Postal Code ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"postal code deleted\"\n}",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"post",path:"/master-data/postal-codes/import/stop",summary:"Stop Postal Code Import",params:[],req:"StopImportRequest"},
|
{cat:"Master Data / Postal Code",m:"get",p:"/master-data/postal-codes/template",s:"Download postal code CSV template",q:[],rb:null,rbe:"<i>Returns CSV file (Content-Type: text/csv)</i>",rf:[]},
|
||||||
{cat:"Master Data / Postal Code",method:"get",path:"/master-data/postal-codes/import/status/<jobId>",summary:"Get Postal Code Import Job Status",params:[{n:"jobId",t:"string",req:true,d:"jobId"}],req:null},
|
{cat:"Master Data / Postal Code",m:"post",p:"/master-data/postal-codes/import",s:"Import postal codes from CSV",q:[],rb:"_MULTIPART_",rbe:"{\n \"success\": true,\n \"data\": {\n \"job_id\": \"job_abc123def456\",\n \"total_rows\": 100,\n \"imported\": 95,\n \"skipped\": 5,\n \"logs\": [\n {\n \"row\": 2,\n \"status\": \"skipped\",\n \"data\": \"Jawa Barat\",\n \"message\": \"duplicate\"\n }\n ],\n \"errors\": [],\n \"is_async\": false\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Cost Component",method:"get",path:"/master-data/cost-components/",summary:"Get All Cost Component",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"code",t:"string",req:false,d:"code"},{n:"component_type",t:"string",req:false,d:"component_type"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Master Data / Postal Code",m:"post",p:"/master-data/postal-codes/import/stop",s:"Stop postal code import job",q:[],rb:"{\n \"job_id\": \"job_abc123def456\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Job stopped\"\n}",rf:["job_id"]},
|
||||||
{cat:"Master Data / Cost Component",method:"post",path:"/master-data/cost-components/",summary:"Create Cost Component",params:[],req:"CostComponentCreateRequest"},
|
{cat:"Master Data / Postal Code",m:"get",p:"/master-data/postal-codes/import/status/:jobId",s:"Check postal code import job status",q:[{n:"jobId",t:"string",req:true,d:"Async job ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"job\": {\n \"id\": \"job_abc123def456\",\n \"status\": \"completed\",\n \"total\": 100,\n \"imported\": 95,\n \"skipped\": 5\n },\n \"logs\": []\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Cost Component",method:"post",path:"/master-data/cost-components/list",summary:"Get Cost Component List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Master Data / Cost Component",m:"get",p:"/master-data/cost-components/",s:"Get all cost components",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"code",t:"string",req:false,d:"Filter by code"},{n:"component_type",t:"integer",req:false,d:"Filter by type (0=Input, 1=Formula)"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": [\n {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Biaya Pengiriman\",\n \"code\": \"SHIP\",\n \"inc\": 1,\n \"value\": \"15000\",\n \"component_type\": 0,\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n ]\n}",rf:[]},
|
||||||
{cat:"Master Data / Cost Component",method:"get",path:"/master-data/cost-components/<id>",summary:"Get Cost Component by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Cost Component",m:"post",p:"/master-data/cost-components/list",s:"Cost component list (DataTable)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Cost Component",method:"put",path:"/master-data/cost-components/<id>",summary:"Update Cost Component",params:[{n:"id",t:"string",req:true,d:"id"}],req:"CostComponentCreateRequest"},
|
{cat:"Master Data / Cost Component",m:"get",p:"/master-data/cost-components/:id",s:"Get cost component by ID",q:[{n:"id",t:"string",req:true,d:"Cost component ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Biaya Pengiriman\",\n \"code\": \"SHIP\",\n \"inc\": 1,\n \"value\": \"15000\",\n \"component_type\": 0,\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:[]},
|
||||||
{cat:"Master Data / Cost Component",method:"delete",path:"/master-data/cost-components/<id>",summary:"Delete Cost Component",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Master Data / Cost Component",m:"post",p:"/master-data/cost-components/",s:"Create cost component",q:[],rb:"{\n \"name\": \"Biaya Pengiriman\",\n \"code\": \"SHIP\",\n \"value\": \"15000\",\n \"component_type\": 0\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Biaya Pengiriman\",\n \"code\": \"SHIP\",\n \"inc\": 1,\n \"value\": \"15000\",\n \"component_type\": 0,\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","code","value"]},
|
||||||
{cat:"Master Data / Cost Component",method:"post",path:"/master-data/cost-components/sortup",summary:"Sort Up Cost Component",params:[],req:"SortRequest"},
|
{cat:"Master Data / Cost Component",m:"put",p:"/master-data/cost-components/:id",s:"Update cost component",q:[{n:"id",t:"string",req:true,d:"Cost component ID"}],rb:"{\n \"name\": \"Biaya Pengiriman Updated\",\n \"code\": \"SHIP\",\n \"value\": \"20000\",\n \"component_type\": 0\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Biaya Pengiriman Updated\",\n \"code\": \"SHIP\",\n \"inc\": 1,\n \"value\": \"20000\",\n \"component_type\": 0,\n \"merchant_id\": \"01HXYZ123456789012345678\"\n }\n}",rf:["name","code","value"]},
|
||||||
{cat:"Master Data / Cost Component",method:"post",path:"/master-data/cost-components/sortdown",summary:"Sort Down Cost Component",params:[],req:"SortRequest"},
|
{cat:"Master Data / Cost Component",m:"delete",p:"/master-data/cost-components/:id",s:"Delete cost component",q:[{n:"id",t:"string",req:true,d:"Cost component ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"cost component deleted\"\n}",rf:[]},
|
||||||
{cat:"Basic Pricing",method:"get",path:"/basic-pricings/",summary:"Get All Basic Pricing",params:[{n:"id",t:"string",req:false,d:"id"},{n:"name",t:"string",req:false,d:"name"},{n:"province_source_id",t:"string",req:false,d:"province_source_id"},{n:"city_source_id",t:"string",req:false,d:"city_source_id"},{n:"district_source_id",t:"string",req:false,d:"district_source_id"},{n:"subdistrict_source_id",t:"string",req:false,d:"subdistrict_source_id"},{n:"postal_code_source_id",t:"string",req:false,d:"postal_code_source_id"},{n:"province_destination_id",t:"string",req:false,d:"province_destination_id"},{n:"city_destination_id",t:"string",req:false,d:"city_destination_id"},{n:"district_destination_id",t:"string",req:false,d:"district_destination_id"},{n:"subdistrict_destination_id",t:"string",req:false,d:"subdistrict_destination_id"},{n:"postal_code_destination_id",t:"string",req:false,d:"postal_code_destination_id"},{n:"package_type_id",t:"string",req:false,d:"package_type_id"},{n:"moda_id",t:"string",req:false,d:"moda_id"},{n:"merchant_id",t:"string",req:false,d:"merchant_id"}],req:null},
|
{cat:"Master Data / Cost Component",m:"post",p:"/master-data/cost-components/sortup",s:"Move cost component up in sort order",q:[],rb:"{\n \"id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Sorting Up Success\"\n}",rf:["id"]},
|
||||||
{cat:"Basic Pricing",method:"post",path:"/basic-pricings/",summary:"Create Basic Pricing",params:[],req:"BasicPricingCreateRequest"},
|
{cat:"Master Data / Cost Component",m:"post",p:"/master-data/cost-components/sortdown",s:"Move cost component down in sort order",q:[],rb:"{\n \"id\": \"01HXYZ123456789012345678\"\n}",rbe:"{\n \"success\": true,\n \"message\": \"Sorting Down Success\"\n}",rf:["id"]},
|
||||||
{cat:"Basic Pricing",method:"post",path:"/basic-pricings/list",summary:"Get Basic Pricing List (DataTable)",params:[],req:"DataTableRequest"},
|
{cat:"Basic Pricing",m:"get",p:"/basic-pricings/",s:"Get all basic pricings",q:[{n:"name",t:"string",req:false,d:"Filter by name"},{n:"province_source_id",t:"string",req:false,d:"Source province ID"},{n:"city_source_id",t:"string",req:false,d:"Source city ID"},{n:"package_type_id",t:"string",req:false,d:"Package type ID"},{n:"moda_id",t:"string",req:false,d:"Transport mode ID"}],rb:null,rbe:"{\\n \"success\": true,\\n \"data\": [\\n { ... }\\n ]\\n}",rf:[]},
|
||||||
{cat:"Basic Pricing",method:"get",path:"/basic-pricings/<id>",summary:"Get Basic Pricing by ID",params:[{n:"id",t:"string",req:true,d:"id"}],req:null},
|
{cat:"Basic Pricing",m:"post",p:"/basic-pricings/list",s:"Basic pricing list (DataTable)",q:[],rb:"_DT_",rbe:"{\n \"success\": true,\n \"data\": {\n \"draw\": 1,\n \"recordsTotal\": 34,\n \"recordsFiltered\": 34,\n \"data\": [\n { \"id\": \"01HXYZ123456789012345678\", \"name\": \"...\" }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Basic Pricing",method:"put",path:"/basic-pricings/<id>",summary:"Update Basic Pricing",params:[{n:"id",t:"string",req:true,d:"id"}],req:"BasicPricingCreateRequest"},
|
{cat:"Basic Pricing",m:"get",p:"/basic-pricings/:id",s:"Get basic pricing by ID",q:[{n:"id",t:"string",req:true,d:"Basic pricing ID"}],rb:null,rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Basic Price Bandung-Jakarta\",\n \"province_source_id\": \"01HXYZ123456789012345678\",\n \"city_source_id\": \"01HXYZ123456789012345678\",\n \"district_source_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_source_id\": \"01HXYZ123456789012345678\",\n \"postal_code_source_id\": \"01HXYZ123456789012345678\",\n \"province_destination_id\": \"01HXYZ123456789012345678\",\n \"city_destination_id\": \"01HXYZ123456789012345678\",\n \"district_destination_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_destination_id\": \"01HXYZ123456789012345678\",\n \"postal_code_destination_id\": \"01HXYZ123456789012345678\",\n \"package_type_id\": \"01HXYZ123456789012345678\",\n \"moda_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"components\": [\n {\n \"id\": \"01HXYZ123456789012345678\",\n \"cost_component_id\": \"01HXYZ123456789012345678\",\n \"value\": 15000\n }\n ]\n }\n}",rf:[]},
|
||||||
{cat:"Basic Pricing",method:"delete",path:"/basic-pricings/<id>",summary:"Delete Basic Pricing",params:[{n:"id",t:"string",req:true,d:"id"}],req:null}];
|
{cat:"Basic Pricing",m:"post",p:"/basic-pricings/",s:"Create basic pricing",q:[],rb:"{\n \"name\": \"Basic Price Bandung-Jakarta\",\n \"province_source_id\": \"01HXYZ123456789012345678\",\n \"city_source_id\": \"01HXYZ123456789012345678\",\n \"district_source_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_source_id\": \"01HXYZ123456789012345678\",\n \"postal_code_source_id\": \"01HXYZ123456789012345678\",\n \"province_destination_id\": \"01HXYZ123456789012345678\",\n \"city_destination_id\": \"01HXYZ123456789012345678\",\n \"district_destination_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_destination_id\": \"01HXYZ123456789012345678\",\n \"postal_code_destination_id\": \"01HXYZ123456789012345678\",\n \"package_type_id\": \"01HXYZ123456789012345678\",\n \"moda_id\": \"01HXYZ123456789012345678\",\n \"components\": [\n {\n \"cost_component_id\": \"01HXYZ123456789012345678\",\n \"value\": 15000\n }\n ]\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Basic Price Bandung-Jakarta\",\n \"province_source_id\": \"01HXYZ123456789012345678\",\n \"city_source_id\": \"01HXYZ123456789012345678\",\n \"district_source_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_source_id\": \"01HXYZ123456789012345678\",\n \"postal_code_source_id\": \"01HXYZ123456789012345678\",\n \"province_destination_id\": \"01HXYZ123456789012345678\",\n \"city_destination_id\": \"01HXYZ123456789012345678\",\n \"district_destination_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_destination_id\": \"01HXYZ123456789012345678\",\n \"postal_code_destination_id\": \"01HXYZ123456789012345678\",\n \"package_type_id\": \"01HXYZ123456789012345678\",\n \"moda_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"components\": [\n {\n \"id\": \"01HXYZ123456789012345678\",\n \"cost_component_id\": \"01HXYZ123456789012345678\",\n \"value\": 15000\n }\n ]\n }\n}",rf:["name"]},
|
||||||
const schemas={"AuthRequest": ["email", "password"], "AuthResponse": ["token"], "ProvinceCreateRequest": ["name"], "ProvinceResponse": ["id", "name", "merchant_id"], "CityCreateRequest": ["name", "province_id", "port"], "CityResponse": ["id", "name", "province_id", "merchant_id", "port"], "DistrictCreateRequest": ["name", "province_id", "city_id"], "DistrictResponse": ["id", "name", "province_id", "city_id", "merchant_id"], "SubdistrictCreateRequest": ["name", "province_id", "city_id", "district_id"], "SubdistrictResponse": ["id", "name", "province_id", "city_id", "district_id", "merchant_id"], "PostalCodeCreateRequest": ["postal_code", "province_id", "city_id", "district_id", "subdistrict_id"], "PostalCodeResponse": ["id", "postal_code", "province_id", "city_id", "district_id", "subdistrict_id", "merchant_id"], "CostComponentCreateRequest": ["name", "code", "value", "component_type"], "CostComponentResponse": ["id", "name", "code", "inc", "value", "component_type", "merchant_id"], "BasicPricingComponentRequest": ["cost_component_id", "value"], "BasicPricingComponentResponse": ["id", "cost_component_id", "value"], "BasicPricingCreateRequest": ["name", "province_source_id", "city_source_id", "district_source_id", "subdistrict_source_id", "postal_code_source_id", "province_destination_id", "city_destination_id", "district_destination_id", "subdistrict_destination_id", "postal_code_destination_id", "package_type_id", "moda_id", "components"], "BasicPricingResponse": ["id", "name", "province_source_id", "city_source_id", "district_source_id", "subdistrict_source_id", "postal_code_source_id", "province_destination_id", "city_destination_id", "district_destination_id", "subdistrict_destination_id", "postal_code_destination_id", "package_type_id", "moda_id", "merchant_id", "components"]};
|
{cat:"Basic Pricing",m:"put",p:"/basic-pricings/:id",s:"Update basic pricing",q:[{n:"id",t:"string",req:true,d:"Basic pricing ID"}],rb:"{\n \"name\": \"Basic Price Bandung-Jakarta\",\n \"province_source_id\": \"01HXYZ123456789012345678\",\n \"city_source_id\": \"01HXYZ123456789012345678\",\n \"district_source_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_source_id\": \"01HXYZ123456789012345678\",\n \"postal_code_source_id\": \"01HXYZ123456789012345678\",\n \"province_destination_id\": \"01HXYZ123456789012345678\",\n \"city_destination_id\": \"01HXYZ123456789012345678\",\n \"district_destination_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_destination_id\": \"01HXYZ123456789012345678\",\n \"postal_code_destination_id\": \"01HXYZ123456789012345678\",\n \"package_type_id\": \"01HXYZ123456789012345678\",\n \"moda_id\": \"01HXYZ123456789012345678\",\n \"components\": [\n {\n \"cost_component_id\": \"01HXYZ123456789012345678\",\n \"value\": 15000\n }\n ]\n}",rbe:"{\n \"success\": true,\n \"data\": {\n \"id\": \"01HXYZ123456789012345678\",\n \"name\": \"Basic Price Bandung-Jakarta\",\n \"province_source_id\": \"01HXYZ123456789012345678\",\n \"city_source_id\": \"01HXYZ123456789012345678\",\n \"district_source_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_source_id\": \"01HXYZ123456789012345678\",\n \"postal_code_source_id\": \"01HXYZ123456789012345678\",\n \"province_destination_id\": \"01HXYZ123456789012345678\",\n \"city_destination_id\": \"01HXYZ123456789012345678\",\n \"district_destination_id\": \"01HXYZ123456789012345678\",\n \"subdistrict_destination_id\": \"01HXYZ123456789012345678\",\n \"postal_code_destination_id\": \"01HXYZ123456789012345678\",\n \"package_type_id\": \"01HXYZ123456789012345678\",\n \"moda_id\": \"01HXYZ123456789012345678\",\n \"merchant_id\": \"01HXYZ123456789012345678\",\n \"components\": [\n {\n \"id\": \"01HXYZ123456789012345678\",\n \"cost_component_id\": \"01HXYZ123456789012345678\",\n \"value\": 15000\n }\n ]\n }\n}",rf:["name"]},
|
||||||
|
{cat:"Basic Pricing",m:"delete",p:"/basic-pricings/:id",s:"Delete basic pricing",q:[{n:"id",t:"string",req:true,d:"Basic pricing ID"}],rb:null,rbe:"{\n \"success\": true,\n \"message\": \"basic pricing deleted\"\n}",rf:[]}
|
||||||
|
];
|
||||||
|
function fmtMethod(m){return m.toUpperCase()}
|
||||||
|
function methodColor(m){return{get:"var(--get)",post:"var(--post)",put:"var(--put)",delete:"var(--delete)"}[m]||"var(--text2)"}
|
||||||
|
function fmtPath(p){return p.replace(/\{([^}]+)\}/g,'<span class="param">:$1</span>')}
|
||||||
|
function render(){
|
||||||
|
const q=document.getElementById("search").value.toLowerCase();
|
||||||
|
const cats={};let order=[];
|
||||||
|
E.forEach((e,i)=>{
|
||||||
|
if(q&&!e.p.toLowerCase().includes(q)&&!e.s.toLowerCase().includes(q)&&!e.cat.toLowerCase().includes(q))return;
|
||||||
|
if(!cats[e.cat]){cats[e.cat]=[];order.push(e.cat)}
|
||||||
|
cats[e.cat].push({...e,idx:i});
|
||||||
|
});
|
||||||
|
let html="";
|
||||||
|
const stats=document.getElementById("stats");
|
||||||
|
let counts={};E.forEach(e=>{counts[e.m]=(counts[e.m]||0)+1});
|
||||||
|
stats.innerHTML='<div class="stat"><strong>'+E.length+'</strong>Total Endpoints</div>'+
|
||||||
|
'<div class="stat"><strong>'+(counts.get||0)+'</strong><span style="color:var(--get)">GET</span></div>'+
|
||||||
|
'<div class="stat"><strong>'+(counts.post||0)+'</strong><span style="color:var(--post)">POST</span></div>'+
|
||||||
|
'<div class="stat"><strong>'+(counts.put||0)+'</strong><span style="color:var(--put)">PUT</span></div>'+
|
||||||
|
'<div class="stat"><strong>'+(counts.delete||0)+'</strong><span style="color:var(--delete)">DELETE</span></div>';
|
||||||
|
|
||||||
function render() {
|
order.forEach(cat=>{
|
||||||
const eps=document.getElementById('eps');
|
html+='<div class="cat-section"><div class="cat-title">'+esc(cat)+'</div><div class="endpoints">';
|
||||||
const q=document.getElementById('search').value.toLowerCase();
|
cats[cat].forEach(e=>{
|
||||||
let html='';
|
let body="";
|
||||||
let lastCat='';
|
|
||||||
E.forEach((e,i)=>{
|
// Params
|
||||||
if(q && !e.path.toLowerCase().includes(q) && !e.summary.toLowerCase().includes(q) && !e.cat.toLowerCase().includes(q)) return;
|
if(e.q&&e.q.length){
|
||||||
if(e.cat!==lastCat){lastCat=e.cat;html+='<div class="cat-section"><div class="cat-title">'+e.cat+'</div></div>';}
|
body+='<div class="section-label">Parameters</div><div class="params"><table><tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>';
|
||||||
let body='';
|
e.q.forEach(p=>{
|
||||||
if(e.params&&e.params.length){
|
body+='<tr><td><code>'+esc(p.n)+'</code></td><td>'+esc(p.t)+'</td><td>'+(p.req?'<span class="badge-r">required</span>':'<span class="badge-o">optional</span>')+'</td><td>'+esc(p.d)+'</td></tr>';
|
||||||
body+='<div class="section-label">Parameters</div><div class="params"><table><tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>';
|
});
|
||||||
e.params.forEach(p=>{body+='<tr><td>'+p.n+'</td><td>'+p.t+'</td><td>'+(p.req?'<span style="color:#fca5a5">Yes</span>':'No')+'</td><td>'+p.d+'</td></tr>'});
|
body+='</table></div>';
|
||||||
body+='</table></div>';
|
|
||||||
}
|
|
||||||
if(e.req){
|
|
||||||
body+='<div class="section-label">Request Body</div>';
|
|
||||||
if(e.req==='_multipart_'){
|
|
||||||
body+='<pre><code>multipart/form-data\nfield: file (CSV)</code></pre>';
|
|
||||||
} else if(schemas[e.req]){
|
|
||||||
body+='<pre><code>{\n';
|
|
||||||
schemas[e.req].forEach(k=>{body+=' \"'+k+'\": ...\n'});
|
|
||||||
body+='}</code></pre>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
body+='<div class="section-label">Response (200)</div><pre><code>{\n \"success\": true,\n \"data\": {...}\n}</code></pre>';
|
|
||||||
html+='<div class="ep" id="ep-'+i+'"><div class="ep-head" onclick="document.getElementById('ep-'+i+'').classList.toggle('open')"><span class="method '+e.method+'">'+e.method+'</span><span class="ep-path">'+e.path+'</span><span class="ep-summary">'+e.summary+'</span></div><div class="ep-body">'+body+'</div></div>';
|
|
||||||
});
|
|
||||||
eps.innerHTML=html;
|
|
||||||
}
|
}
|
||||||
document.getElementById('search').addEventListener('input',render);
|
|
||||||
|
// Request body
|
||||||
|
if(e.rb){
|
||||||
|
body+='<div class="section-label">Request Body</div>';
|
||||||
|
if(e.rf&&e.rf.length){
|
||||||
|
body+='<div class="req-fields"><table><tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>';
|
||||||
|
e.rf.forEach(f=>{
|
||||||
|
body+='<tr><td><code>'+esc(f)+'</code></td><td>string</td><td><span class="required-val">required</span></td><td></td></tr>';
|
||||||
|
});
|
||||||
|
body+='</table></div>';
|
||||||
|
}
|
||||||
|
if(e.rb==="_DT_"){
|
||||||
|
body+='<pre>'+esc(DT_BODY)+'</pre>';
|
||||||
|
}else if(e.rb==="_MULTIPART_"){
|
||||||
|
body+='<pre>Content-Type: multipart/form-data\nfield: file (CSV file upload)</pre>';
|
||||||
|
}else{
|
||||||
|
body+='<pre>'+esc(e.rb)+'</pre>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response
|
||||||
|
body+='<div class="section-label">Response (200)</div>';
|
||||||
|
if(e.rbe){
|
||||||
|
body+='<pre>'+esc(e.rbe)+'</pre>';
|
||||||
|
}else{
|
||||||
|
body+='<pre>{\n "success": true,\n "data": { ... }\n}</pre>';
|
||||||
|
}
|
||||||
|
|
||||||
|
html+='<div class="ep" id="ep-'+e.idx+'"><div class="ep-head" onclick="document.getElementById(\'ep-'+e.idx+'\').classList.toggle(\'open\')"><span class="method '+e.m+'" style="background:'+methodColor(e.m)+'">'+fmtMethod(e.m)+'</span><span class="ep-path">'+fmtPath(esc(e.p))+'</span><span class="ep-summary">'+esc(e.s)+'</span></div><div class="ep-body">'+body+'</div></div>';
|
||||||
|
});
|
||||||
|
html+='</div></div>';
|
||||||
|
});
|
||||||
|
document.getElementById("content").innerHTML=html;
|
||||||
|
// nav
|
||||||
|
let navHtml='';
|
||||||
|
order.forEach(cat=>{
|
||||||
|
navHtml+='<div class="cat">'+esc(cat)+'<span class="count">'+cats[cat].length+'</span></div>';
|
||||||
|
cats[cat].forEach(e=>{
|
||||||
|
navHtml+='<a href="#ep-'+e.idx+'"><span class="dot" style="background:'+methodColor(e.m)+'"></span>'+fmtMethod(e.m)+' '+esc(e.p.split('/').pop()||'/')+'</a>';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.getElementById("nav").innerHTML=navHtml;
|
||||||
|
}
|
||||||
|
function esc(s){return String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}
|
||||||
|
document.getElementById("search").addEventListener("input",render);
|
||||||
|
const DT_BODY="{\n \"draw\": 1,\n \"start\": 0,\n \"length\": 10,\n \"search\": { \"value\": \"\" },\n \"order\": [{ \"column\": 0, \"dir\": \"asc\" }],\n \"columns\": [{\n \"data\": \"name\",\n \"searchable\": true,\n \"orderable\": true,\n \"search\": { \"value\": \"\" }\n }]\n}";
|
||||||
render();
|
render();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package dto
|
|||||||
type CreateCityRequest struct {
|
type CreateCityRequest struct {
|
||||||
Name string `json:"name" binding:"required,min=2"`
|
Name string `json:"name" binding:"required,min=2"`
|
||||||
ProvinceID string `json:"province_id" binding:"required"`
|
ProvinceID string `json:"province_id" binding:"required"`
|
||||||
Port string `json:"port"`
|
Port string `json:"port" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCityResponse struct {
|
type CreateCityResponse struct {
|
||||||
@ -25,7 +25,7 @@ type CityFilterAllRequest struct {
|
|||||||
type UpdateCityRequest struct {
|
type UpdateCityRequest struct {
|
||||||
Name string `json:"name" binding:"required,min=2"`
|
Name string `json:"name" binding:"required,min=2"`
|
||||||
ProvinceID string `json:"province_id" binding:"required"`
|
ProvinceID string `json:"province_id" binding:"required"`
|
||||||
Port string `json:"port"`
|
Port string `json:"port" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ImportCityResponse struct {
|
type ImportCityResponse struct {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ type CreateCostComponentRequest struct {
|
|||||||
Name string `json:"name" binding:"required,min=2"`
|
Name string `json:"name" binding:"required,min=2"`
|
||||||
Code string `json:"code" binding:"required"`
|
Code string `json:"code" binding:"required"`
|
||||||
Value string `json:"value" binding:"required"`
|
Value string `json:"value" binding:"required"`
|
||||||
ComponentType int32 `json:"component_type"`
|
ComponentType int32 `json:"component_type" binding:""`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateCostComponentResponse struct {
|
type CreateCostComponentResponse struct {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user