2024-05-14 13:07:09 +00:00
|
|
|
// 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": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/agents": {
|
2024-06-01 00:29:11 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"AuthBearerAdmin": []
|
2024-06-01 00:29:11 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins"
|
2024-06-01 00:29:11 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Get all agents by admin",
|
2024-06-01 00:29:11 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminagentparam.GetAllAgentResponse"
|
2024-06-06 17:54:56 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxes": {
|
2024-07-09 17:17:04 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "Retrieves a list of all KindBoxes with filtering, sorting, and pagination options",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxes"
|
2024-07-09 17:17:04 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
},
|
2024-07-21 13:38:54 +00:00
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "Filter by deliver refer time ID",
|
|
|
|
"name": "filter_deliver_refer_time_id",
|
|
|
|
"in": "query"
|
|
|
|
},
|
2024-07-09 17:17:04 +00:00
|
|
|
{
|
|
|
|
"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",
|
2024-07-21 13:38:54 +00:00
|
|
|
"deliver_address_id",
|
|
|
|
"deliver_refer_time_id"
|
2024-07-09 17:17:04 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxes/{id}": {
|
|
|
|
"get": {
|
2024-07-01 17:13:28 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "This endpoint retrieves a specific kind box by admin",
|
2024-07-01 17:13:28 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxes"
|
2024-07-01 17:13:28 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Get a specific kind box by admin",
|
2024-07-01 17:13:28 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Kind box ID",
|
2024-07-01 17:13:28 +00:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxparam.KindBoxGetResponse"
|
|
|
|
}
|
2024-07-01 17:13:28 +00:00
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxes/{id}/assign-receiver-agent": {
|
|
|
|
"patch": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxes"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Admin assign receiver agent to kindbox",
|
2024-07-03 17:18:06 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "KindBox ID",
|
2024-07-03 17:18:06 +00:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "Assign Receiver Agent Request Body",
|
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxparam.AssignReceiverRequest"
|
|
|
|
}
|
2024-07-03 17:18:06 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"204": {
|
|
|
|
"description": "No Content"
|
2024-07-03 17:18:06 +00:00
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxes/{id}/enumerate": {
|
2024-07-23 21:37:27 +00:00
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxes"
|
2024-07-23 21:37:27 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs": {
|
|
|
|
"get": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Retrieves a list of all KindBox requests with filtering, sorting, and pagination options",
|
2024-07-03 17:18:06 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Admin get all kindboxreq",
|
2024-07-03 17:18:06 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"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"
|
2024-07-03 17:18:06 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqGetAllResponse"
|
2024-07-03 17:18:06 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Bad Request",
|
2024-07-03 17:18:06 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"401": {
|
|
|
|
"description": "invalid or expired jwt",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"type": "string"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
|
|
|
"403": {
|
|
|
|
"description": "user not allowed",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"type": "string"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"422": {
|
|
|
|
"description": "Unprocessable Entity",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/httpmsg.ErrorResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "something went wrong",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
|
|
|
"post": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Add a new kind box request for a benefactor by admin",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "New kind box request details",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAddRequest"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAddResponse"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/awaiting-delivery": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"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": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
|
|
|
"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": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"on-table",
|
|
|
|
"cylindrical",
|
|
|
|
"stand-up"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-07-03 17:18:06 +00:00
|
|
|
"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/adminkindboxreqparam.DeliveryAwaitingGetAllResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/awaiting-delivery/{id}": {
|
2024-06-10 22:54:16 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-06-10 22:54:16 +00:00
|
|
|
],
|
|
|
|
"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/adminkindboxreqparam.DeliveryAwaitingGetResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/{id}": {
|
|
|
|
"get": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Get a specific kind box req by ID",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "KindBoxReq ID",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.GetKindBoxReqResponse"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Bad Request",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"401": {
|
|
|
|
"description": "invalid or expired jwt",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"type": "string"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
|
|
|
"403": {
|
|
|
|
"description": "user not allowed",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"type": "string"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"422": {
|
|
|
|
"description": "Unprocessable Entity",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/httpmsg.ErrorResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"500": {
|
|
|
|
"description": "something went wrong",
|
2024-05-15 07:38:39 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
2024-07-10 01:21:03 +00:00
|
|
|
"put": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-07-10 01:21:03 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/{id}/accept-kind-box-req": {
|
|
|
|
"patch": {
|
2024-06-10 14:49:13 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
2024-06-10 14:49:13 +00:00
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse"
|
2024-06-10 14:49:13 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/{id}/assign-sender-agent": {
|
|
|
|
"patch": {
|
2024-07-21 13:10:22 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-07-21 13:10:22 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Admin Assign Sender Agent to kindboxreq",
|
2024-07-21 13:10:22 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "KindBoxReq ID",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
2024-07-21 13:10:22 +00:00
|
|
|
},
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Assign Sender Agent Request Body",
|
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderRequest"
|
|
|
|
}
|
2024-07-21 13:10:22 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderResponse"
|
2024-07-21 13:10:22 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Bad request",
|
2024-07-21 13:10:22 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/admins/kindboxreqs/{id}/deliver-kind-box-req": {
|
|
|
|
"patch": {
|
2024-07-21 14:16:01 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins KindBoxReqs"
|
2024-07-21 14:16:01 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Admin deliver a kindboxreq",
|
2024-07-21 14:16:01 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "KindBoxReq ID",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
2024-08-27 17:49:34 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"description": "KindBoxReq deliver request details",
|
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.DeliverKindBoxReqRequest"
|
|
|
|
}
|
2024-07-21 14:16:01 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.DeliverKindBoxReqResponse"
|
2024-07-21 14:16:01 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Bad request",
|
2024-07-21 14:16:01 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/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
|
2024-07-21 14:16:01 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
{
|
|
|
|
"description": "KindBoxReq Reject Request Body",
|
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
2024-07-21 14:16:01 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectRequest"
|
2024-07-21 14:16:01 +00:00
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
2024-07-21 14:16:01 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectResponse"
|
2024-07-21 14:16:01 +00:00
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
2024-07-21 14:16:01 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"/admins/login-by-phone": {
|
|
|
|
"post": {
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Admin login by\tPhoneNumber",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Admin login request body",
|
2024-05-15 07:38:39 +00:00
|
|
|
"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/register": {
|
|
|
|
"post": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
2024-05-15 07:38:39 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Admins"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Register an admin by super-admin",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Admin Register Request Body",
|
2024-05-15 07:38:39 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-14 08:58:37 +00:00
|
|
|
"/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": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Agents KindBoxes"
|
2024-07-14 08:58:37 +00:00
|
|
|
],
|
|
|
|
"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": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"on-table",
|
|
|
|
"cylindrical",
|
|
|
|
"stand-up"
|
2024-07-14 08:58:37 +00:00
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-07-14 08:58:37 +00:00
|
|
|
"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",
|
2024-08-27 17:49:34 +00:00
|
|
|
"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
|
2024-07-14 08:58:37 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/agentkindboxparam.GetKindBoxResponse"
|
2024-07-14 08:58:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/agents/kindboxes/{id}/return": {
|
2024-07-16 11:47:09 +00:00
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Agents KindBoxes"
|
2024-07-16 11:47:09 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/addresses": {
|
2024-07-13 12:33:07 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"AuthBearerBenefactor": []
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors Addresses"
|
2024-07-13 12:33:07 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"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",
|
2024-07-13 12:33:07 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-08-27 17:49:34 +00:00
|
|
|
"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"
|
|
|
|
}
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactors/addresses/cities": {
|
|
|
|
"get": {
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
|
|
|
"Benefactors Addresses"
|
2024-07-13 12:33:07 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Get all cities",
|
2024-07-13 12:33:07 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"$ref": "#/definitions/addressparam.GetAllCitiesResponse"
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"description": "Bad request",
|
2024-07-13 12:33:07 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/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"
|
|
|
|
}
|
2024-07-13 12:33:07 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
2024-07-13 12:33:07 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/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"
|
|
|
|
}
|
2024-07-13 12:33:07 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
2024-07-13 12:33:07 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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"
|
2024-07-13 12:33:07 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
2024-07-13 12:33:07 +00:00
|
|
|
"schema": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"type": "string"
|
2024-07-13 12:33:07 +00:00
|
|
|
}
|
2024-08-27 17:49:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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"
|
2024-07-13 12:33:07 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
2024-07-13 12:33:07 +00:00
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/kindboxes": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
2024-07-21 13:38:54 +00:00
|
|
|
"description": "Retrieves a list of all KindBoxes with filtering, sorting, and pagination options",
|
2024-05-15 07:38:39 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxes"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-07-21 13:38:54 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
2024-05-15 07:38:39 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-07-21 13:38:54 +00:00
|
|
|
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetAllResponse"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/kindboxes/{id}": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "This endpoint retrieves a specific kind box associated with an authenticated benefactor.",
|
2024-05-15 07:38:39 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxes"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Get a specific kind box for a benefactor",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Kind box ID",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/kindboxes/{id}/emptying-requests": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxes"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/kindboxreqs": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "Retrieves a list of all KindBox requests with filtering, sorting, and pagination options",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxReqs"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
|
|
|
"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": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"on-table",
|
|
|
|
"cylindrical",
|
|
|
|
"stand-up"
|
2024-07-03 17:18:06 +00:00
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-07-03 17:18:06 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"post": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxReqs"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Add a new kind box request for a benefactor",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "New kind box request details",
|
2024-05-15 07:38:39 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/kindboxreqs/{id}": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxReqs"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Get a kind box request for a benefactor",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Kind box request ID",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/benefactorkindboxreqparam.KindBoxReqGetResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-31 14:49:04 +00:00
|
|
|
},
|
2024-07-23 19:21:02 +00:00
|
|
|
"put": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxReqs"
|
2024-07-23 19:21:02 +00:00
|
|
|
],
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-31 14:49:04 +00:00
|
|
|
"delete": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": "This endpoint is used to delete benefactor's kindboxreq at pending status",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors KindBoxReqs"
|
2024-05-31 14:49:04 +00:00
|
|
|
],
|
2024-08-27 17:49:34 +00:00
|
|
|
"summary": "Delete kindboxreq by benefactor",
|
2024-05-31 14:49:04 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/login-register": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"post": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "This endpoint is used to authenticate an existing benefactor account or register a new one.",
|
2024-05-14 13:07:09 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors"
|
2024-05-14 13:07:09 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Login or register a benefactor",
|
2024-05-14 13:07:09 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Login or register request details",
|
2024-05-14 13:07:09 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"/benefactors/send-otp": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"post": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "This endpoint sends an OTP to the benefactor's phone number for verification purposes.",
|
2024-05-14 13:07:09 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-08-27 17:49:34 +00:00
|
|
|
"Benefactors"
|
2024-05-14 13:07:09 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Send OTP to benefactor",
|
2024-05-14 13:07:09 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Send OTP request details",
|
2024-05-14 13:07:09 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"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
|
|
|
|
},
|
2024-05-30 12:57:33 +00:00
|
|
|
"name": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "home"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"postal_code": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "1234567890"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"addressparam.BenefactorAddAddressResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"address": {
|
|
|
|
"$ref": "#/definitions/entity.Address"
|
2024-08-01 10:20:18 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-06-01 00:29:11 +00:00
|
|
|
"addressparam.GetAddressResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"address": {
|
|
|
|
"$ref": "#/definitions/entity.Address"
|
2024-08-01 10:20:18 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-06-01 00:29:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-06-01 18:01:00 +00:00
|
|
|
"addressparam.GetAllAddressesResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_addresses": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.Address"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"addressparam.GetAllCitiesResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"cities": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.City"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"addressparam.GetAllProvincesResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"provinces": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.Province"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-06-06 17:54:56 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-08-01 10:20:18 +00:00
|
|
|
"adminagentparam.Agent": {
|
|
|
|
"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": {
|
|
|
|
"agents": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/adminagentparam.Agent"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-02 20:17:40 +00:00
|
|
|
"adminkindboxparam.AssignReceiverRequest": {
|
2024-07-01 17:13:28 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-02 20:17:40 +00:00
|
|
|
"receiver_agent_id": {
|
2024-07-01 17:13:28 +00:00
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-23 21:37:27 +00:00
|
|
|
"adminkindboxparam.EnumerateKindBoxRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-09 17:17:04 +00:00
|
|
|
"adminkindboxparam.KindBoxGetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_kind_box": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBox"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-09 17:17:04 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"adminkindboxparam.KindBoxGetResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-07-12 21:25:20 +00:00
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxReqID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"receiverAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"returnReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnedAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"serialNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminkindboxreqparam.AssignSenderRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"sender_agent_id": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-17 20:16:28 +00:00
|
|
|
"adminkindboxreqparam.AssignSenderResponse": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-17 20:16:28 +00:00
|
|
|
},
|
2024-07-12 21:25:20 +00:00
|
|
|
"adminkindboxreqparam.DeliverKindBoxReqRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"serial_numbers": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"example": [
|
|
|
|
"1",
|
|
|
|
"2",
|
|
|
|
"3"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminkindboxreqparam.DeliverKindBoxReqResponse": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"adminkindboxreqparam.DeliveryAwaitingGetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_awaiting_kind_box_req": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-06-10 22:54:16 +00:00
|
|
|
"adminkindboxreqparam.DeliveryAwaitingGetResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countAccepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countRequested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-07-21 14:16:01 +00:00
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-21 14:16:01 +00:00
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.GetKindBoxReqResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countAccepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countRequested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-06-10 22:54:16 +00:00
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-06-10 22:54:16 +00:00
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminkindboxreqparam.KindBoxReqAcceptRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"count_accepted": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqAcceptResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"count_accepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"count_requested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliver_address_id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliver_refer_date": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"kind_box_req_id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kind_box_req_status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"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-02 15:04:05"
|
|
|
|
},
|
|
|
|
"kind_box_type": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "on-table"
|
2024-07-03 17:18:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqAddResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"kindBoxReq": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminkindboxreqparam.KindBoxReqGetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-07-03 17:18:06 +00:00
|
|
|
"all_awaiting_kind_box_req": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqRejectRequest": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"description": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "description"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqRejectResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"benefactor_id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-14 13:07:09 +00:00
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"count_requested": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-14 13:07:09 +00:00
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"deliver_address_id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-14 13:07:09 +00:00
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"deliver_refer_date": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "2025-01-02 15:04:05"
|
2024-05-14 13:07:09 +00:00
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"description": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "description"
|
2024-05-14 13:07:09 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"kind_box_type": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "on-table"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"status": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "pending"
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-10 01:21:03 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "cylindrical"
|
2024-07-10 01:21:03 +00:00
|
|
|
},
|
|
|
|
"sender_agent_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-21 16:57:21 +00:00
|
|
|
"adminserviceparam.AdminInfo": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"description": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "This is a description"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"email": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "example@gmail.com"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"first_name": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "John"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"gender": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.Gender"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "male"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"id": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"last_name": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "Doe"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"phone_number": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "09123456789"
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"role": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.AdminRole"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 2
|
2024-05-21 16:57:21 +00:00
|
|
|
},
|
|
|
|
"status": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.AdminStatus"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "active"
|
2024-06-10 14:49:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminserviceparam.LoginWithPhoneNumberRequest": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"password": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "password123"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"phone_number": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "09123456789"
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminserviceparam.LoginWithPhoneNumberResponse": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-21 16:57:21 +00:00
|
|
|
"admin_info": {
|
|
|
|
"$ref": "#/definitions/adminserviceparam.AdminInfo"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"tokens": {
|
|
|
|
"$ref": "#/definitions/adminserviceparam.Tokens"
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminserviceparam.RegisterRequest": {
|
2024-05-14 13:07:09 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"description": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "this is a description"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"email": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "miaad.66@gmail.com"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"first_name": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "miaad"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"gender": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.Gender"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "male"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"last_name": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "shahi"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"password": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "Abc123456"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"phone_number": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
|
|
|
"example": "09183723447"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"role": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.AdminRole"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 2
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"status": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.AdminStatus"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "active"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminserviceparam.RegisterResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"admin": {
|
|
|
|
"$ref": "#/definitions/entity.Admin"
|
2024-08-01 10:20:18 +00:00
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminserviceparam.Tokens": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"access_token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"refresh_token": {
|
|
|
|
"type": "string"
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-14 08:58:37 +00:00
|
|
|
"agentkindboxparam.GetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_kind_boxes": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBox"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-14 08:58:37 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-16 11:47:09 +00:00
|
|
|
"agentkindboxparam.GetKindBoxResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-16 11:47:09 +00:00
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxReqID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"receiverAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"returnReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnedAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"serialNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"agentkindboxparam.ReturnKindBoxRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"serial_number": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"benefactoreparam.BenefactroInfo": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"first_name": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "mehdi"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
},
|
|
|
|
"last_name": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "rez"
|
|
|
|
},
|
|
|
|
"role": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.UserRole"
|
|
|
|
}
|
|
|
|
],
|
2024-05-14 13:07:09 +00:00
|
|
|
"example": "benefactor"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactoreparam.LoginOrRegisterRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"phone_number": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "09198829528"
|
|
|
|
},
|
|
|
|
"verification_code": {
|
|
|
|
"type": "string",
|
2024-05-17 20:16:28 +00:00
|
|
|
"example": "12345"
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactoreparam.LoginOrRegisterResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactore_info": {
|
|
|
|
"$ref": "#/definitions/benefactoreparam.BenefactroInfo"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"tokens": {
|
|
|
|
"$ref": "#/definitions/benefactoreparam.Tokens"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"phone_number": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "09198829528"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactoreparam.Tokens": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"access_token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"refresh_token": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-21 13:38:54 +00:00
|
|
|
"benefactorkindboxparam.KindBoxGetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_kind_box": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBox"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-21 13:38:54 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"benefactorkindboxparam.KindBoxGetResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-07-12 21:25:20 +00:00
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxReqID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"receiverAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-06-25 21:58:11 +00:00
|
|
|
"returnReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"returnedAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"serialNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
2024-07-03 17:18:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxparam.KindBoxRegisterEmptyingRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"return_address_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"return_refer_date": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "2025-01-02T15:04:05Z"
|
|
|
|
},
|
|
|
|
"return_refer_time_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.GetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"all_kind_box_req": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
},
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"pagination": {
|
|
|
|
"$ref": "#/definitions/param.PaginationResponse"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.KindBoxReqAddRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"count_requested": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 2
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"deliver_address_id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"deliver_refer_date": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "string",
|
2024-05-31 12:36:48 +00:00
|
|
|
"example": "2025-01-02T15:04:05Z"
|
|
|
|
},
|
|
|
|
"deliver_refer_time_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-07-03 17:18:06 +00:00
|
|
|
"kind_box_type": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "on-table"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.KindBoxReqAddResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"kind_box_req": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-31 14:49:04 +00:00
|
|
|
"benefactorkindboxreqparam.KindBoxReqDeleteResponse": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-31 14:49:04 +00:00
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"benefactorkindboxreqparam.KindBoxReqGetResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-08-27 17:49:34 +00:00
|
|
|
"field_errors": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2024-05-21 22:10:16 +00:00
|
|
|
"kind_box_req": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-07-23 19:21:02 +00:00
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
2024-08-01 10:20:18 +00:00
|
|
|
"example": "cylindrical"
|
2024-07-23 19:21:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"entity.Address": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"address": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"cityID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"lat": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"lon": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
2024-05-30 12:57:33 +00:00
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"postalCode": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"provinceID": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"entity.Admin": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"email": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"firstName": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"gender": {
|
|
|
|
"$ref": "#/definitions/entity.Gender"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"lastName": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"phoneNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"role": {
|
|
|
|
"$ref": "#/definitions/entity.AdminRole"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.AdminStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"entity.AdminRole": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"AdminSuperAdminRole",
|
|
|
|
"AdminAdminRole",
|
|
|
|
"AdminAgentRole"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.AdminStatus": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-05-15 07:38:39 +00:00
|
|
|
"enum": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"active",
|
|
|
|
"inactive"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"AdminActiveStatus",
|
|
|
|
"AdminInactiveStatus"
|
|
|
|
]
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"entity.City": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"provinceID": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"entity.Gender": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-05-15 07:38:39 +00:00
|
|
|
"enum": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"male",
|
|
|
|
"female"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"MaleGender",
|
|
|
|
"FemaleGender"
|
|
|
|
]
|
|
|
|
},
|
2024-07-09 17:17:04 +00:00
|
|
|
"entity.KindBox": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"amount": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-07-12 21:25:20 +00:00
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-07-09 17:17:04 +00:00
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxReqID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"receiverAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"returnReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnedAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"serialNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"entity.KindBoxReq": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countAccepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countRequested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-05-31 12:36:48 +00:00
|
|
|
"deliverReferTimeID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"entity.KindBoxReqStatus": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-05-15 07:38:39 +00:00
|
|
|
"enum": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"pending",
|
|
|
|
"accepted",
|
|
|
|
"assigned-sender-agent",
|
|
|
|
"rejected",
|
|
|
|
"delivered"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"KindBoxReqPendingStatus",
|
|
|
|
"KindBoxReqAcceptedStatus",
|
|
|
|
"KindBoxReqAssignedSenderAgentStatus",
|
|
|
|
"KindBoxReqRejectedStatus",
|
|
|
|
"KindBoxReqDeliveredStatus"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.KindBoxStatus": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-05-15 07:38:39 +00:00
|
|
|
"enum": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"delivered",
|
|
|
|
"ready-to-return",
|
|
|
|
"assigned-receiver-agent",
|
|
|
|
"returned",
|
|
|
|
"enumerated"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"KindBoxDeliveredStatus",
|
|
|
|
"KindBoxReadyToReturnStatus",
|
|
|
|
"KindBoxAssignedReceiverAgentStatus",
|
|
|
|
"KindBoxReturnedStatus",
|
|
|
|
"KindBoxEnumeratedStatus"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.KindBoxType": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"type": "string",
|
2024-05-15 07:38:39 +00:00
|
|
|
"enum": [
|
2024-08-01 10:20:18 +00:00
|
|
|
"on-table",
|
|
|
|
"cylindrical",
|
|
|
|
"stand-up"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"KindBoxOnTable",
|
|
|
|
"KindBoxCylindrical",
|
|
|
|
"KindBoxStandUp"
|
|
|
|
]
|
|
|
|
},
|
2024-05-14 13:07:09 +00:00
|
|
|
"entity.Province": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-08-01 10:20:18 +00:00
|
|
|
"entity.UserRole": {
|
|
|
|
"type": "string",
|
|
|
|
"enum": [
|
|
|
|
"benefactor"
|
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"UserBenefactorRole"
|
|
|
|
]
|
|
|
|
},
|
2024-07-21 13:10:22 +00:00
|
|
|
"httpmsg.ErrorResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"errors": {
|
|
|
|
"type": "object",
|
|
|
|
"additionalProperties": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"param.PaginationResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"page_number": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
2024-05-21 22:10:16 +00:00
|
|
|
"page_size": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 10
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"total": {
|
2024-05-21 22:10:16 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 100
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"securityDefinitions": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"AuthBearerAdmin": {
|
2024-08-01 10:20:18 +00:00
|
|
|
"description": "Type the word 'Bearer' followed by a space and Admin JWT token.",
|
2024-05-15 07:38:39 +00:00
|
|
|
"type": "apiKey",
|
2024-05-17 20:16:28 +00:00
|
|
|
"name": "Authorization",
|
2024-05-15 07:38:39 +00:00
|
|
|
"in": "header"
|
|
|
|
},
|
|
|
|
"AuthBearerBenefactor": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Type the word 'Bearer' followed by a space and Benefactor JWT token",
|
2024-05-14 13:07:09 +00:00
|
|
|
"type": "apiKey",
|
2024-05-17 20:16:28 +00:00
|
|
|
"name": "Authorization",
|
2024-05-14 13:07:09 +00:00
|
|
|
"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)
|
|
|
|
}
|