forked from ebhomengo/niki
1
0
Fork 0
niki/docs/docs.go

4110 lines
138 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/admins/agents": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins"
],
"summary": "Get all agents by admin",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminagentparam.GetAllAgentResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxes": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"description": "Retrieves a list of all KindBoxes with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxes"
],
"summary": "Get all KindBoxes by admin",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by KindBox request ID",
"name": "filter_kind_box_req_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"description": "Filter by KindBox type",
"name": "filter_kind_box_type",
"in": "query"
},
{
"type": "integer",
"description": "Filter by amount",
"name": "filter_amount",
"in": "query"
},
{
"type": "string",
"description": "Filter by serial number",
"name": "filter_serial_number",
"in": "query"
},
{
"enum": [
"delivered",
"ready-to-return",
"assigned-receiver-agent",
"returned",
"enumerated"
],
"type": "string",
"description": "Filter by status",
"name": "filter_status",
"in": "query"
},
{
"type": "string",
"format": "date-time",
"description": "Filter by delivered at",
"name": "filter_delivered_at",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return refer time ID",
"name": "filter_return_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by return refer date",
"name": "filter_return_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return address ID",
"name": "filter_return_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by receiver agent ID",
"name": "filter_receiver_agent_id",
"in": "query"
},
{
"type": "string",
"format": "date-time",
"description": "Filter by returned at",
"name": "filter_returned_at",
"in": "query"
},
{
"type": "integer",
"description": "Filter by sender agent ID",
"name": "filter_sender_agent_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by deliver refer date",
"name": "filter_deliver_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver address ID",
"name": "filter_deliver_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver refer time ID",
"name": "filter_deliver_refer_time_id",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"kind_box_req_id",
"benefactor_id",
"kind_box_type",
"amount",
"serial_number",
"status",
"delivered_at",
"return_refer_time_id",
"return_refer_date",
"return_address_id",
"receiver_agent_id",
"returned_at",
"sender_agent_id",
"deliver_refer_date",
"deliver_address_id",
"deliver_refer_time_id"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxparam.KindBoxGetAllResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxes/update/{id}": {
"put": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxes"
],
"summary": "Update kind Box by admin",
"parameters": [
{
"type": "integer",
"description": "Kind Box ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update KindBox Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxparam.KindBoxUpdateRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxes/{id}": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"description": "This endpoint retrieves a specific kind box by admin",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxes"
],
"summary": "Get a specific kind box by admin",
"parameters": [
{
"type": "integer",
"description": "Kind box ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxparam.KindBoxGetResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxes/{id}/assign-receiver-agent": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxes"
],
"summary": "Admin assign receiver agent to kindbox",
"parameters": [
{
"type": "integer",
"description": "KindBox ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Assign Receiver Agent Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxparam.AssignReceiverRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxes/{id}/enumerate": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxes"
],
"summary": "Admin enumerate kindbox",
"parameters": [
{
"type": "integer",
"description": "KindBox ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Request",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxparam.EnumerateKindBoxRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxreqs": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"description": "Retrieves a list of all KindBox requests with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Admin get all kindboxreq",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by sender agent ID",
"name": "filter_sender_agent_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"format": "enum",
"description": "Filter by KindBox type",
"name": "filter_kind_box_type",
"in": "query"
},
{
"enum": [
"pending",
"accepted",
"assigned-sender-agent",
"rejected",
"delivered"
],
"type": "string",
"format": "enum",
"description": "Filter by KindBoxReq status",
"name": "filter_status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count requested",
"name": "filter_count_requested",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count accepted",
"name": "filter_count_accepted",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver refer time ID",
"name": "filter_deliver_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by deliver refer date",
"name": "filter_deliver_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver address ID",
"name": "filter_deliver_address_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by delivered at",
"name": "filter_delivered_at",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"benefactor_id",
"sender_agent_id",
"kind_box_type",
"status",
"count_requested",
"count_accepted",
"deliver_refer_time_id",
"deliver_refer_date",
"deliver_address_id",
"delivered_at"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqGetAllResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
},
"post": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Add a new kind box request for a benefactor by admin",
"parameters": [
{
"description": "New kind box request details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAddRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAddResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxreqs/{id}": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Get a specific kind box req by ID",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.GetKindBoxReqResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
},
"put": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Update kind box request by admin",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update KindBoxReq Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqUpdateRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxreqs/{id}/accept-kind-box-req": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Accept kind box request by admin",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Accept KindBoxReq Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxreqs/{id}/assign-sender-agent": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Admin Assign Sender Agent to kindboxreq",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Assign Sender Agent Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/kindboxreqs/{id}/reject-kind-box-req": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins KindBoxReqs"
],
"summary": "Reject a kindboxreq by admin",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "KindBoxReq Reject Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/login-by-phone": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins"
],
"summary": "Admin login by\tPhoneNumber",
"parameters": [
{
"description": "Admin login request body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminserviceparam.LoginWithPhoneNumberRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminserviceparam.LoginWithPhoneNumberResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/refresh-access": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins"
],
"summary": "Get a new access token by providing a refresh token",
"parameters": [
{
"description": "Refresh access request body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminserviceparam.RefreshAccessRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminserviceparam.RefreshAccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"422": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/admins/register": {
"post": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Admins"
],
"summary": "Register an admin by super-admin",
"parameters": [
{
"description": "Admin Register Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adminserviceparam.RegisterRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adminserviceparam.RegisterResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxes": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"description": "Retrieves a list of all awaiting return KindBoxes for agent with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxes"
],
"summary": "Get all awaiting return KindBoxes by agent",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"format": "enum",
"description": "Filter by KindBox type",
"name": "filter_type",
"in": "query"
},
{
"type": "string",
"description": "Filter by serial number",
"name": "filter_serial_number",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return refer time ID",
"name": "filter_return_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by return refer date",
"name": "filter_return_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return address ID",
"name": "filter_return_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"benefactor_id",
"type",
"serial_number",
"return_refer_time_id",
"return_refer_date",
"return_address_id"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/agentkindboxparam.GetAllResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxes/{id}": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxes"
],
"summary": "Get a kind box that is awaiting return by agent",
"parameters": [
{
"type": "integer",
"description": "KindBox ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/agentkindboxparam.GetKindBoxResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxes/{id}/return": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxes"
],
"summary": "Return KindBox from benefactor by agent",
"parameters": [
{
"type": "integer",
"description": "KindBox ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Return KindBox Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/agentkindboxparam.ReturnKindBoxRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxreqs/awaiting-delivery": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"description": "Retrieves a list of all awaiting KindBox requests with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxReqs"
],
"summary": "Get all awaiting delivery KindBox requests",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"format": "enum",
"description": "Filter by KindBox type",
"name": "filter_kind_box_type",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count requested",
"name": "filter_count_requested",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count accepted",
"name": "filter_count_accepted",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver refer time ID",
"name": "filter_deliver_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by deliver refer date",
"name": "filter_deliver_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver address ID",
"name": "filter_deliver_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"benefactor_id",
"kind_box_type",
"count_requested",
"count_accepted",
"deliver_refer_time_id",
"deliver_refer_date",
"deliver_address_id"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/agentkindboxreqparam.DeliveryAwaitingGetAllResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxreqs/awaiting-delivery/{id}": {
"get": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxReqs"
],
"summary": "Get a kind box reqs that is awaiting delivery by agent",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/agentkindboxreqparam.DeliveryAwaitingGetResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/agents/kindboxreqs/{id}/deliver-kind-box-req": {
"patch": {
"security": [
{
"AuthBearerAdmin": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Agents KindBoxReqs"
],
"summary": "Agent deliver a kindboxreq",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "KindBoxReq deliver request details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/agentkindboxreqparam.DeliverKindBoxReqRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/agentkindboxreqparam.DeliverKindBoxReqResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/addresses": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Get all benefactor addresses",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/addressparam.GetAllAddressesResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
},
"post": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "This endpoint allows an authenticated benefactor to add a new address to their account.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Add a new address for a benefactor",
"parameters": [
{
"description": "New address details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addressparam.BenefactorAddAddressRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/addressparam.BenefactorAddAddressResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/addresses/cities": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Get all cities",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/addressparam.GetAllCitiesResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/addresses/provinces": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Get all provinces",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/addressparam.GetAllProvincesResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/addresses/{id}": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Get a benefactor address",
"parameters": [
{
"type": "integer",
"description": "Address ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/addressparam.GetAddressResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
},
"put": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors Addresses"
],
"summary": "Update benefactor address",
"parameters": [
{
"type": "integer",
"description": "Address ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Edit address details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/addressparam.UpdateAddressRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "This endpoint is used to delete an address by benefactor",
"tags": [
"Benefactors Addresses"
],
"summary": "Delete address by benefactor",
"parameters": [
{
"type": "integer",
"description": "Address ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/kindboxes": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "Retrieves a list of all KindBoxes with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxes"
],
"summary": "Get all KindBoxes by benefactor",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by KindBox request ID",
"name": "filter_kind_box_req_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"description": "Filter by KindBox type",
"name": "filter_kind_box_type",
"in": "query"
},
{
"type": "integer",
"description": "Filter by amount",
"name": "filter_amount",
"in": "query"
},
{
"type": "string",
"description": "Filter by serial number",
"name": "filter_serial_number",
"in": "query"
},
{
"enum": [
"delivered",
"ready-to-return",
"assigned-receiver-agent",
"returned",
"enumerated"
],
"type": "string",
"description": "Filter by status",
"name": "filter_status",
"in": "query"
},
{
"type": "string",
"format": "date-time",
"description": "Filter by delivered at",
"name": "filter_delivered_at",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return refer time ID",
"name": "filter_return_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by return refer date",
"name": "filter_return_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by return address ID",
"name": "filter_return_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by receiver agent ID",
"name": "filter_receiver_agent_id",
"in": "query"
},
{
"type": "string",
"format": "date-time",
"description": "Filter by returned at",
"name": "filter_returned_at",
"in": "query"
},
{
"type": "integer",
"description": "Filter by sender agent ID",
"name": "filter_sender_agent_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by deliver refer date",
"name": "filter_deliver_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver address ID",
"name": "filter_deliver_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver refer time ID",
"name": "filter_deliver_refer_time_id",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"kind_box_req_id",
"benefactor_id",
"kind_box_type",
"amount",
"serial_number",
"status",
"delivered_at",
"return_refer_time_id",
"return_refer_date",
"return_address_id",
"receiver_agent_id",
"returned_at",
"sender_agent_id",
"deliver_refer_date",
"deliver_address_id",
"deliver_refer_time_id"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetAllResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/kindboxes/{id}": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "This endpoint retrieves a specific kind box associated with an authenticated benefactor.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxes"
],
"summary": "Get a specific kind box for a benefactor",
"parameters": [
{
"type": "integer",
"description": "Kind box ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/kindboxes/{id}/emptying-requests": {
"patch": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxes"
],
"summary": "Register a new emptying request for a kind box by benefactor",
"parameters": [
{
"type": "integer",
"description": "KindBox ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Request body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactorkindboxparam.KindBoxRegisterEmptyingRequest"
}
}
],
"responses": {
"204": {
"description": "No content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/kindboxreqs": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "Retrieves a list of all KindBox requests with filtering, sorting, and pagination options",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxReqs"
],
"summary": "Get all KindBox requests",
"parameters": [
{
"type": "integer",
"description": "Filter by ID",
"name": "filter_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by benefactor ID",
"name": "filter_benefactor_id",
"in": "query"
},
{
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"type": "string",
"format": "enum",
"description": "Filter by KindBox type",
"name": "filter_kind_box_type",
"in": "query"
},
{
"enum": [
"pending",
"accepted",
"assigned-sender-agent",
"rejected",
"delivered"
],
"type": "string",
"description": "Filter by KindBoxReq Status",
"name": "filter_status",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count requested",
"name": "filter_count_requested",
"in": "query"
},
{
"type": "integer",
"description": "Filter by count accepted",
"name": "filter_count_accepted",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver refer time ID",
"name": "filter_deliver_refer_time_id",
"in": "query"
},
{
"type": "string",
"format": "date",
"description": "Filter by deliver refer date",
"name": "filter_deliver_refer_date",
"in": "query"
},
{
"type": "integer",
"description": "Filter by deliver address ID",
"name": "filter_deliver_address_id",
"in": "query"
},
{
"type": "integer",
"description": "Page number",
"name": "page_number",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "page_size",
"in": "query"
},
{
"enum": [
"id",
"benefactor_id",
"kind_box_type",
"count_requested",
"count_accepted",
"deliver_refer_time_id",
"deliver_refer_date",
"deliver_address_id"
],
"type": "string",
"description": "Sort by field",
"name": "sort_field",
"in": "query"
},
{
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort order",
"name": "sort_direction",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.GetAllResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
},
"post": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxReqs"
],
"summary": "Add a new kind box request for a benefactor",
"parameters": [
{
"description": "New kind box request details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqAddRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqAddResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/kindboxreqs/{id}": {
"get": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxReqs"
],
"summary": "Get a kind box request for a benefactor",
"parameters": [
{
"type": "integer",
"description": "Kind box request ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqGetResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
},
"put": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxReqs"
],
"summary": "Update kind box request by benefactor",
"parameters": [
{
"type": "integer",
"description": "KindBoxReq ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update KindBoxReq Request Body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqUpdateRequest"
}
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"401": {
"description": "invalid or expired jwt",
"schema": {
"type": "string"
}
},
"403": {
"description": "user not allowed",
"schema": {
"type": "string"
}
},
"422": {
"description": "Unprocessable Entity",
"schema": {
"$ref": "#/definitions/httpmsg.ErrorResponse"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
},
"delete": {
"security": [
{
"AuthBearerBenefactor": []
}
],
"description": "This endpoint is used to delete benefactor's kindboxreq at pending status",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors KindBoxReqs"
],
"summary": "Delete kindboxreq by benefactor",
"parameters": [
{
"type": "integer",
"description": "Kind box request ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqDeleteResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/login-register": {
"post": {
"description": "This endpoint is used to authenticate an existing benefactor account or register a new one.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors"
],
"summary": "Login or register a benefactor",
"parameters": [
{
"description": "Login or register request details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactoreparam.LoginOrRegisterRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactoreparam.LoginOrRegisterResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/refresh-access": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors"
],
"summary": "Get a new access token by providing your refresh token",
"parameters": [
{
"description": "Refresh access token request body",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactoreparam.RefreshAccessRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactoreparam.RefreshAccessResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "string"
}
},
"500": {
"description": "something went wrong",
"schema": {
"type": "string"
}
}
}
}
},
"/benefactors/send-otp": {
"post": {
"description": "This endpoint sends an OTP to the benefactor's phone number for verification purposes.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Benefactors"
],
"summary": "Send OTP to benefactor",
"parameters": [
{
"description": "Send OTP request details",
"name": "Request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/benefactoreparam.SendOtpRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/benefactoreparam.SendOtpResponse"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"addressparam.BenefactorAddAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string",
"example": "tehran"
},
"city_id": {
"type": "integer",
"example": 1
},
"lat": {
"type": "number",
"example": 22.23
},
"lon": {
"type": "number",
"example": 22.22
},
"name": {
"type": "string",
"example": "home"
},
"postal_code": {
"type": "string",
"example": "1234567890"
}
}
},
"addressparam.BenefactorAddAddressResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/addressparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"addressparam.Data": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"benefactor_id": {
"type": "integer"
},
"city_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"lat": {
"type": "number"
},
"lon": {
"type": "number"
},
"name": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"province_id": {
"type": "integer"
}
}
},
"addressparam.GetAddressResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/addressparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"addressparam.GetAllAddressesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/addressparam.Data"
}
}
}
},
"addressparam.GetAllCitiesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.City"
}
}
}
},
"addressparam.GetAllProvincesResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/entity.Province"
}
}
}
},
"addressparam.UpdateAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string",
"example": "Zanjan Province, Zanjan, Etemadieh, 6th St, Iran"
},
"city_id": {
"type": "integer",
"example": 163
},
"lat": {
"type": "number",
"example": 123.456
},
"lon": {
"type": "number",
"example": 123.456
},
"name": {
"type": "string",
"example": "Home"
},
"postal_code": {
"type": "string",
"example": "1234567890"
}
}
},
"adminagentparam.Data": {
"type": "object",
"properties": {
"first_name": {
"type": "string",
"example": "John"
},
"id": {
"type": "integer",
"example": 1
},
"last_name": {
"type": "string",
"example": "Doe"
},
"phone_number": {
"type": "string",
"example": "09123456789"
}
}
},
"adminagentparam.GetAllAgentResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/adminagentparam.Data"
}
}
}
},
"adminkindboxparam.AssignReceiverRequest": {
"type": "object",
"properties": {
"receiver_agent_id": {
"type": "integer"
}
}
},
"adminkindboxparam.Data": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"benefactor_id": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_req_id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"receiver_agent_id": {
"type": "integer"
},
"return_address_id": {
"type": "integer"
},
"return_refer_date": {
"type": "string"
},
"return_refer_time_id": {
"type": "integer"
},
"returned_at": {
"type": "string"
},
"sender_agent_id": {
"type": "integer"
},
"serial_number": {
"type": "string"
},
"status": {
"$ref": "#/definitions/entity.KindBoxStatus"
}
}
},
"adminkindboxparam.EnumerateKindBoxRequest": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
}
}
},
"adminkindboxparam.KindBoxGetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/adminkindboxparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"adminkindboxparam.KindBoxGetResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminkindboxparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxparam.KindBoxUpdateRequest": {
"type": "object",
"properties": {
"amount": {
"type": "integer",
"example": 3
},
"benefactor_id": {
"type": "integer",
"example": 1
},
"receiver_agent_id": {
"type": "integer",
"example": 23
},
"return_address_id": {
"type": "integer",
"example": 1
},
"return_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"return_refere_time_id": {
"type": "integer",
"example": 3
}
}
},
"adminkindboxreqparam.AssignSenderRequest": {
"type": "object",
"properties": {
"sender_agent_id": {
"type": "integer"
}
}
},
"adminkindboxreqparam.AssignSenderResponse": {
"type": "object",
"properties": {
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxreqparam.Data": {
"type": "object",
"properties": {
"benefactor_id": {
"type": "integer"
},
"count_accepted": {
"type": "integer"
},
"count_requested": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"sender_agent_id": {
"type": "integer"
},
"status": {
"$ref": "#/definitions/entity.KindBoxReqStatus"
}
}
},
"adminkindboxreqparam.GetKindBoxReqResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxreqparam.KindBoxReqAcceptRequest": {
"type": "object",
"properties": {
"count_accepted": {
"type": "integer"
}
}
},
"adminkindboxreqparam.KindBoxReqAcceptResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxreqparam.KindBoxReqAddRequest": {
"type": "object",
"properties": {
"benefactor_id": {
"type": "integer",
"example": 1
},
"count_requested": {
"type": "integer",
"example": 2
},
"deliver_address_id": {
"type": "integer",
"example": 1
},
"deliver_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"deliver_refer_time_id": {
"type": "integer",
"example": 1
},
"kind_box_type": {
"allOf": [
{
"$ref": "#/definitions/entity.KindBoxType"
}
],
"example": "on-table"
}
}
},
"adminkindboxreqparam.KindBoxReqAddResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxreqparam.KindBoxReqGetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/adminkindboxreqparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"adminkindboxreqparam.KindBoxReqRejectRequest": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "description"
}
}
},
"adminkindboxreqparam.KindBoxReqRejectResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminkindboxreqparam.KindBoxReqUpdateRequest": {
"type": "object",
"properties": {
"count_accepted": {
"type": "integer",
"example": 3
},
"count_requested": {
"type": "integer",
"example": 5
},
"deliver_address_id": {
"type": "integer",
"example": 1
},
"deliver_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"deliver_refer_time_id": {
"type": "integer",
"example": 1
},
"description": {
"type": "string",
"example": "description"
},
"kind_box_type": {
"allOf": [
{
"$ref": "#/definitions/entity.KindBoxType"
}
],
"example": "cylindrical"
},
"sender_agent_id": {
"type": "integer",
"example": 1
}
}
},
"adminserviceparam.Data": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "This is a description"
},
"email": {
"type": "string",
"example": "example@gmail.com"
},
"first_name": {
"type": "string",
"example": "John"
},
"gender": {
"allOf": [
{
"$ref": "#/definitions/entity.Gender"
}
],
"example": "male"
},
"id": {
"type": "integer",
"example": 1
},
"last_name": {
"type": "string",
"example": "Doe"
},
"phone_number": {
"type": "string",
"example": "09123456789"
},
"role": {
"allOf": [
{
"$ref": "#/definitions/entity.AdminRole"
}
],
"example": 2
},
"status": {
"allOf": [
{
"$ref": "#/definitions/entity.AdminStatus"
}
],
"example": "active"
}
}
},
"adminserviceparam.LoginWithPhoneNumberRequest": {
"type": "object",
"properties": {
"password": {
"type": "string",
"example": "password123"
},
"phone_number": {
"type": "string",
"example": "09123456789"
}
}
},
"adminserviceparam.LoginWithPhoneNumberResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminserviceparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"tokens": {
"$ref": "#/definitions/adminserviceparam.Tokens"
}
}
},
"adminserviceparam.RefreshAccessRequest": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string"
}
}
},
"adminserviceparam.RefreshAccessResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
}
},
"adminserviceparam.RegisterRequest": {
"type": "object",
"properties": {
"description": {
"type": "string",
"example": "this is a description"
},
"email": {
"type": "string",
"example": "miaad.66@gmail.com"
},
"first_name": {
"type": "string",
"example": "miaad"
},
"gender": {
"allOf": [
{
"$ref": "#/definitions/entity.Gender"
}
],
"example": "male"
},
"last_name": {
"type": "string",
"example": "shahi"
},
"password": {
"type": "string",
"example": "Abc123456"
},
"phone_number": {
"type": "string",
"example": "09183723447"
},
"role": {
"allOf": [
{
"$ref": "#/definitions/entity.AdminRole"
}
],
"example": 2
},
"status": {
"allOf": [
{
"$ref": "#/definitions/entity.AdminStatus"
}
],
"example": "active"
}
}
},
"adminserviceparam.RegisterResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/adminserviceparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"adminserviceparam.Tokens": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
},
"agentkindboxparam.Data": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"benefactor_id": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_req_id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"receiver_agent_id": {
"type": "integer"
},
"return_address_id": {
"type": "integer"
},
"return_refer_date": {
"type": "string"
},
"return_refer_time_id": {
"type": "integer"
},
"returned_at": {
"type": "string"
},
"sender_agent_id": {
"type": "integer"
},
"serial_number": {
"type": "string"
},
"status": {
"$ref": "#/definitions/entity.KindBoxStatus"
}
}
},
"agentkindboxparam.GetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/agentkindboxparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"agentkindboxparam.GetKindBoxResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/agentkindboxparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"agentkindboxparam.ReturnKindBoxRequest": {
"type": "object",
"properties": {
"serial_number": {
"type": "string"
}
}
},
"agentkindboxreqparam.Data": {
"type": "object",
"properties": {
"benefactor_id": {
"type": "integer"
},
"count_accepted": {
"type": "integer"
},
"count_requested": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"sender_agent_id": {
"type": "integer"
},
"status": {
"$ref": "#/definitions/entity.KindBoxReqStatus"
}
}
},
"agentkindboxreqparam.DeliverKindBoxReqRequest": {
"type": "object",
"properties": {
"serial_numbers": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"1",
"2",
"3"
]
}
}
},
"agentkindboxreqparam.DeliverKindBoxReqResponse": {
"type": "object",
"properties": {
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"agentkindboxreqparam.DeliveryAwaitingGetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/agentkindboxreqparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"agentkindboxreqparam.DeliveryAwaitingGetResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/agentkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"benefactoreparam.Data": {
"type": "object",
"properties": {
"first_name": {
"type": "string",
"example": "mehdi"
},
"id": {
"type": "integer",
"example": 1
},
"last_name": {
"type": "string",
"example": "rez"
},
"role": {
"allOf": [
{
"$ref": "#/definitions/entity.UserRole"
}
],
"example": "benefactor"
}
}
},
"benefactoreparam.LoginOrRegisterRequest": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"example": "09198829528"
},
"verification_code": {
"type": "string",
"example": "12345"
}
}
},
"benefactoreparam.LoginOrRegisterResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/benefactoreparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"tokens": {
"$ref": "#/definitions/benefactoreparam.Tokens"
}
}
},
"benefactoreparam.RefreshAccessRequest": {
"type": "object",
"properties": {
"refresh_token": {
"type": "string"
}
}
},
"benefactoreparam.RefreshAccessResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
}
}
},
"benefactoreparam.SendOtpRequest": {
"type": "object",
"properties": {
"phone_number": {
"type": "string",
"example": "09198829528"
}
}
},
"benefactoreparam.SendOtpResponse": {
"type": "object",
"properties": {
"code": {
"description": "this just use in test .env\n\t\tTODO - remove it after test",
"type": "string"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"phone_number": {
"type": "string",
"example": "09198829528"
}
}
},
"benefactoreparam.Tokens": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
}
}
},
"benefactorkindboxparam.Data": {
"type": "object",
"properties": {
"amount": {
"type": "integer"
},
"benefactor_id": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_req_id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"receiver_agent_id": {
"type": "integer"
},
"return_address_id": {
"type": "integer"
},
"return_refer_date": {
"type": "string"
},
"return_refer_time_id": {
"type": "integer"
},
"returned_at": {
"type": "string"
},
"sender_agent_id": {
"type": "integer"
},
"serial_number": {
"type": "string"
},
"status": {
"$ref": "#/definitions/entity.KindBoxStatus"
}
}
},
"benefactorkindboxparam.KindBoxGetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/benefactorkindboxparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"benefactorkindboxparam.KindBoxGetResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/benefactorkindboxparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"benefactorkindboxparam.KindBoxRegisterEmptyingRequest": {
"type": "object",
"properties": {
"return_address_id": {
"type": "integer",
"example": 1
},
"return_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"return_refer_time_id": {
"type": "integer",
"example": 1
}
}
},
"benefactorkindboxreqparam.Data": {
"type": "object",
"properties": {
"benefactor_id": {
"type": "integer"
},
"count_accepted": {
"type": "integer"
},
"count_requested": {
"type": "integer"
},
"deliver_address_id": {
"type": "integer"
},
"deliver_refer_date": {
"type": "string"
},
"deliver_refer_time_id": {
"type": "integer"
},
"delivered_at": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "integer"
},
"kind_box_type": {
"$ref": "#/definitions/entity.KindBoxType"
},
"sender_agent_id": {
"type": "integer"
},
"status": {
"$ref": "#/definitions/entity.KindBoxReqStatus"
}
}
},
"benefactorkindboxreqparam.GetAllResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/benefactorkindboxreqparam.Data"
}
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"pagination": {
"$ref": "#/definitions/param.PaginationResponse"
}
}
},
"benefactorkindboxreqparam.KindBoxReqAddRequest": {
"type": "object",
"properties": {
"count_requested": {
"type": "integer",
"example": 2
},
"deliver_address_id": {
"type": "integer",
"example": 1
},
"deliver_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"deliver_refer_time_id": {
"type": "integer",
"example": 1
},
"kind_box_type": {
"allOf": [
{
"$ref": "#/definitions/entity.KindBoxType"
}
],
"example": "on-table"
}
}
},
"benefactorkindboxreqparam.KindBoxReqAddResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/benefactorkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"benefactorkindboxreqparam.KindBoxReqDeleteResponse": {
"type": "object",
"properties": {
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"benefactorkindboxreqparam.KindBoxReqGetResponse": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/benefactorkindboxreqparam.Data"
},
"field_errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"benefactorkindboxreqparam.KindBoxReqUpdateRequest": {
"type": "object",
"properties": {
"count_requested": {
"type": "integer",
"example": 5
},
"deliver_address_id": {
"type": "integer",
"example": 1
},
"deliver_refer_date": {
"type": "string",
"example": "2025-01-02T15:04:05Z"
},
"deliver_refer_time_id": {
"type": "integer",
"example": 1
},
"description": {
"type": "string",
"example": "description"
},
"kind_box_type": {
"allOf": [
{
"$ref": "#/definitions/entity.KindBoxType"
}
],
"example": "cylindrical"
}
}
},
"entity.AdminRole": {
"type": "integer",
"enum": [
1,
2,
3
],
"x-enum-varnames": [
"AdminSuperAdminRole",
"AdminAdminRole",
"AdminAgentRole"
]
},
"entity.AdminStatus": {
"type": "string",
"enum": [
"active",
"inactive"
],
"x-enum-varnames": [
"AdminActiveStatus",
"AdminInactiveStatus"
]
},
"entity.City": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"provinceID": {
"type": "integer"
}
}
},
"entity.Gender": {
"type": "string",
"enum": [
"male",
"female"
],
"x-enum-varnames": [
"MaleGender",
"FemaleGender"
]
},
"entity.KindBoxReqStatus": {
"type": "string",
"enum": [
"pending",
"accepted",
"assigned-sender-agent",
"rejected",
"delivered"
],
"x-enum-varnames": [
"KindBoxReqPendingStatus",
"KindBoxReqAcceptedStatus",
"KindBoxReqAssignedSenderAgentStatus",
"KindBoxReqRejectedStatus",
"KindBoxReqDeliveredStatus"
]
},
"entity.KindBoxStatus": {
"type": "string",
"enum": [
"delivered",
"ready-to-return",
"assigned-receiver-agent",
"returned",
"enumerated"
],
"x-enum-varnames": [
"KindBoxDeliveredStatus",
"KindBoxReadyToReturnStatus",
"KindBoxAssignedReceiverAgentStatus",
"KindBoxReturnedStatus",
"KindBoxEnumeratedStatus"
]
},
"entity.KindBoxType": {
"type": "string",
"enum": [
"on-table",
"cylindrical",
"stand-up"
],
"x-enum-varnames": [
"KindBoxOnTable",
"KindBoxCylindrical",
"KindBoxStandUp"
]
},
"entity.Province": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"entity.UserRole": {
"type": "string",
"enum": [
"benefactor"
],
"x-enum-varnames": [
"UserBenefactorRole"
]
},
"httpmsg.ErrorResponse": {
"type": "object",
"properties": {
"errors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"message": {
"type": "string"
}
}
},
"param.PaginationResponse": {
"type": "object",
"properties": {
"page_number": {
"type": "integer",
"example": 1
},
"page_size": {
"type": "integer",
"example": 10
},
"total": {
"type": "integer",
"example": 100
}
}
}
},
"securityDefinitions": {
"AuthBearerAdmin": {
"description": "Type the word 'Bearer' followed by a space and Admin JWT token.",
"type": "apiKey",
"name": "Authorization",
"in": "header"
},
"AuthBearerBenefactor": {
"description": "Type the word 'Bearer' followed by a space and Benefactor JWT token",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}