swagger: split the Visa/Master tag and document payment-history in Turkmen
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

visa-master-payment-orders mixed order CRUD with the GBÜS payment flow;
they are now visa-master-orders and visa-master-payment. payment-history
summaries, descriptions and params are in Turkmen with one shape
(what it returns, Tertip, Bellik), and its tag description lists the
endpoints in the order they are used.

@securityDefinitions.apikey moves to the end of the general info block:
swag read every line after it as its attributes, so @schemes and all
@tag.* declarations were silently dropped from the spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 23:21:07 +05:00
parent 78e1976e53
commit d7e5d1f989
7 changed files with 377 additions and 198 deletions

View File

@@ -6498,42 +6498,42 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns a paginated, branch-scoped audit trail of visa/master/sber payout attempts (paid, failed, or pending), across orders",
"description": "Ähli sargytlaryň Visa/Master we Sber töleg synanyşyklaryny (tölenen, şowsuz, garaşylýan) sahypalap gaýtarýar. Tertip: sort/order boýunça (adaty ýagdaýda iň täzesi birinji). Bellik: diňe ulanyjynyň öz şahamçasynyň tölegleri görünýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List payment history",
"summary": "Tölegleriň taryhy",
"parameters": [
{
"type": "integer",
"description": "Filter by order ID",
"description": "Sargyt ID-si boýunça süzmek",
"name": "order_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"description": "Şahamça ID-si boýunça süzmek",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by order owner (client) user ID",
"description": "Sargyt eýesiniň (müşderiniň) ulanyjy ID-si boýunça süzmek",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by gateway status (pending, success, failed)",
"description": "GBÜS statusy boýunça süzmek (pending, success, failed)",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Filter by passport name/surname or order unique ID",
"description": "Pasport ady/familiýasy ýa-da sargydyň unique ID-si boýunça gözlemek",
"name": "search",
"in": "query"
},
@@ -6546,7 +6546,7 @@ const docTemplate = `{
],
"type": "string",
"default": "id",
"description": "Sort column",
"description": "Tertiplenýän sütün",
"name": "sort",
"in": "query"
},
@@ -6557,21 +6557,21 @@ const docTemplate = `{
],
"type": "string",
"default": "desc",
"description": "Sort direction",
"description": "Tertip ugry",
"name": "order",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"description": "Sahypa belgisi",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"description": "Bir sahypadaky ýazgy sany",
"name": "limit",
"in": "query"
},
@@ -6584,7 +6584,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6618,18 +6618,18 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns one visa/master/sber payout attempt by its payment ID, with the raw GBÜS response - the detail view behind a payment-history list row",
"description": "Töleg ID-si boýunça bir Visa/Master ýa-da Sber töleg synanyşygyny GBÜS-iň soňky jogaby (gatewayResponse) bilen gaýtarýar. Tertip: ýeke ýazgy. Bellik: taryh sanawyndaky bir setiriň jikme-jik görnüşi.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Get a single payment attempt",
"summary": "Bir tölegiň jikme-jikligi",
"parameters": [
{
"type": "integer",
"description": "Payment ID",
"description": "Töleg ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6643,7 +6643,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6689,18 +6689,18 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns every payment of one order, newest first, the way the per-order payment table shows them - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - each together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments with their HALKBANK responses",
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6714,7 +6714,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6763,18 +6763,18 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns every visa/master/sber payout attempt of one order, newest first - one row per payment with whether it was paid (paid/gatewayStatus), the card it was paid from (cardholderName/maskedPan, once GBÜS reports them), its time (createdAt) and period (paymentPeriod). The raw GBÜS response of a row is at /payment-history/payments/{id}, of every row at once at /payment-history/{id}/gateway; the step-by-step logs are at /payment-history/{id}/logs.",
"description": "Bir sargydyň ähli Visa/Master we Sber töleg synanyşyklaryny gaýtarýar: her töleg üçin bir setir - tölendimi (paid/gatewayStatus), haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt) we döwri (paymentPeriod). Tertip: iň täzesi birinji. Bellik: bir tölegiň GBÜS jogaby /payment-history/payments/{id}, ähli tölegleriňki /payment-history/{id}/gateway, ädimme-ädim loglar /payment-history/{id}/logs salgysynda.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments",
"summary": "Sargydyň tölegleri",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6788,7 +6788,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6837,18 +6837,18 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns every payment of one order, newest first, the way the per-order payment table shows them - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - each together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments with their HALKBANK responses",
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6862,7 +6862,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -6911,18 +6911,18 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout, newest first - evidence of what actually happened, independent of the summary rows returned by /payment-history/{id}",
"description": "Sargydyň tölegi işlenende ýazylan ähli ädimleri (visa_master_payment_logs) gaýtarýar. Tertip: iň täzesi birinji. Bellik: /payment-history/{id} setirlerinden garaşsyz, hakykatda näme bolandygynyň subutnamasy.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Get payment logs for an order",
"summary": "Sargydyň töleg loglary",
"parameters": [
{
"type": "integer",
"description": "Order ID",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
@@ -6936,7 +6936,7 @@ const docTemplate = `{
],
"type": "string",
"default": "tm",
"description": "Language of localized fields; all returns the full {en, ru, tm} objects",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
@@ -9361,7 +9361,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "List visa/master payment orders",
"parameters": [
@@ -9464,7 +9464,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Create visa/master payment order",
"parameters": [
@@ -9520,7 +9520,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "GBÜS payment callback",
"parameters": [
@@ -9567,7 +9567,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "List sber payment orders",
"parameters": [
@@ -9663,7 +9663,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Get visa/master payment order by ID",
"parameters": [
@@ -9729,7 +9729,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Update visa/master payment order",
"parameters": [
@@ -9801,7 +9801,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-orders"
],
"summary": "Delete visa/master payment order",
"parameters": [
@@ -9869,7 +9869,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Start a visa/master/sber payout",
"parameters": [
@@ -9943,7 +9943,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Quote a visa/master/sber payment",
"parameters": [
@@ -10008,7 +10008,7 @@ const docTemplate = `{
"application/json"
],
"tags": [
"visa-master-payment-orders"
"visa-master-payment"
],
"summary": "Re-check a visa/master/sber order's latest payment attempt",
"parameters": [
@@ -13152,7 +13152,73 @@ const docTemplate = `{
"name": "Authorization",
"in": "header"
}
}
},
"tags": [
{
"description": "Authentication",
"name": "auth"
},
{
"description": "Provinces",
"name": "province"
},
{
"description": "Branches",
"name": "branches"
},
{
"description": "Payment cards",
"name": "payment-card"
},
{
"description": "Reason cards",
"name": "reason-card"
},
{
"description": "Loan types",
"name": "loan-type"
},
{
"description": "Loan required documents",
"name": "loan-document"
},
{
"description": "Loan repayments",
"name": "loans-repayment"
},
{
"description": "Card orders",
"name": "card-orders"
},
{
"description": "Card rekwizit (card details) orders",
"name": "card-rekwizit-orders"
},
{
"description": "User activity audit trail",
"name": "activity-logs"
},
{
"description": "Visa/Master and Sber student-transfer orders: list, view, create, edit, delete",
"name": "visa-master-orders"
},
{
"description": "Paying a Visa/Master or Sber order through GBÜS (HALKBANK): quote, pay, status re-check, bank callback",
"name": "visa-master-payment"
},
{
"description": "Visa/Master we Sber töleg synanyşyklarynyň taryhy. Ulanylyş tertibi: 1) GET /payment-history - ähli tölegler; 2) GET /payment-history/{id} - bir sargydyň tölegleri; 3) GET /payment-history/payments/{id} - bir tölegiň jikme-jikligi; 4) GET /payment-history/{id}/gateway - sargydyň tölegleri GBÜS jogaplary bilen; 5) GET /payment-history/{id}/logs - sargydyň ädimme-ädim töleg loglary",
"name": "payment-history"
},
{
"description": "Database SQL backups",
"name": "backups"
},
{
"description": "Currency exchange rates",
"name": "currencies"
}
]
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
@@ -13160,7 +13226,7 @@ var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "localhost:5005",
BasePath: "/api/admin",
Schemes: []string{},
Schemes: []string{"http"},
Title: "Service APIs",
Description: "Online payment system admin API. Localized fields ({en, ru, tm} objects) come back as a plain string in the language of the `lang` query parameter: tm, ru or en (default tm), falling back to tm, ru, en when that translation is empty. lang=all returns the full {en, ru, tm} objects (for edit forms); any other value is 400.",
InfoInstanceName: "swagger",