2024-05-14 13:07:09 +00:00
|
|
|
{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"contact": {}
|
|
|
|
},
|
|
|
|
"paths": {
|
|
|
|
"/address/": {
|
|
|
|
"post": {
|
|
|
|
"security": [
|
|
|
|
{
|
2024-05-15 07:38:39 +00:00
|
|
|
"AuthBearerBenefactor": []
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "This endpoint allows an authenticated benefactor to add a new address to their account.",
|
2024-05-14 13:07:09 +00:00
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"Address"
|
2024-05-14 13:07:09 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Add a new address for a benefactor",
|
2024-05-14 13:07:09 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "New address details",
|
2024-05-14 13:07:09 +00:00
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/addressparam.BenefactorAddAddressRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"201": {
|
|
|
|
"description": "Created",
|
2024-05-14 13:07:09 +00:00
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/addressparam.BenefactorAddAddressResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/address/cities": {
|
|
|
|
"get": {
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"Address"
|
2024-05-14 13:07:09 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Get all cities",
|
2024-05-14 13:07:09 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/addressparam.GetAllCitiesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/address/provinces": {
|
|
|
|
"get": {
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"Address"
|
2024-05-14 13:07:09 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Get all provinces",
|
2024-05-14 13:07:09 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/addressparam.GetAllProvincesResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"/admin/kindboxreqs/": {
|
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Admin get all kindboxreq",
|
2024-05-15 07:38:39 +00:00
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "page_number",
|
|
|
|
"name": "page_number",
|
|
|
|
"in": "query"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "page_size",
|
|
|
|
"name": "page_size",
|
|
|
|
"in": "query"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqGetAllResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/admin/kindboxreqs/accept-kind-box-req/{id}": {
|
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Accept kind box request by admin",
|
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
|
|
|
|
},
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Accept KindBoxReq Request Body",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/admin/kindboxreqs/assign-sender-agent/{id}": {
|
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Admin Assign Sender Agent to kindboxreq",
|
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
|
|
|
|
},
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "Assign Sender Agent Request Body",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.AssignSenderResponse"
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/admin/kindboxreqs/deliver-kind-box-req/{id}": {
|
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Admin deliver a kindboxreq",
|
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": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.DeliverKindBoxReqResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/admin/kindboxreqs/reject-kind-box-req/{id}": {
|
|
|
|
"patch": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerAdmin": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Reject a kindboxreq by admin",
|
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
|
|
|
|
},
|
|
|
|
{
|
2024-05-17 20:16:28 +00:00
|
|
|
"description": "KindBoxReq Reject Request Body",
|
2024-05-15 07:38:39 +00:00
|
|
|
"name": "Request",
|
|
|
|
"in": "body",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectRequest"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/adminkindboxreqparam.KindBoxReqRejectResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/admins/login-by-phone": {
|
|
|
|
"post": {
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"Admin"
|
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-05-17 20:16:28 +00:00
|
|
|
"Admin"
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactor/kindboxes/": {
|
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBox"
|
2024-05-15 07:38:39 +00:00
|
|
|
],
|
2024-05-17 20:16:28 +00:00
|
|
|
"summary": "Get all kind boxes for a benefactor",
|
2024-05-15 07:38:39 +00:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/benefactorkindboxparam.KindBoxGetResponse"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad request",
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactor/kindboxes/{id}": {
|
|
|
|
"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-05-17 20:16:28 +00:00
|
|
|
"KindBox"
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactor/kindboxreqs/": {
|
|
|
|
"post": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactor/kindboxreqs/{id}": {
|
|
|
|
"get": {
|
|
|
|
"security": [
|
|
|
|
{
|
|
|
|
"AuthBearerBenefactor": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"tags": [
|
2024-05-17 20:16:28 +00:00
|
|
|
"KindBoxReq"
|
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-14 13:07:09 +00:00
|
|
|
"/benefactor/login-register": {
|
|
|
|
"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-05-17 20:16:28 +00:00
|
|
|
"Benefactor"
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/benefactor/send-otp": {
|
|
|
|
"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-05-17 20:16:28 +00:00
|
|
|
"Benefactor"
|
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"
|
|
|
|
},
|
|
|
|
"benefactor_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
},
|
|
|
|
"city_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
},
|
|
|
|
"lat": {
|
|
|
|
"type": "number",
|
|
|
|
"example": 22.23
|
|
|
|
},
|
|
|
|
"lon": {
|
|
|
|
"type": "number",
|
|
|
|
"example": 22.22
|
|
|
|
},
|
|
|
|
"postal_code": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "1234567890"
|
|
|
|
},
|
|
|
|
"province_id": {
|
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"addressparam.BenefactorAddAddressResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"address": {
|
|
|
|
"$ref": "#/definitions/entity.Address"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.AssignSenderRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"kind_box_req_id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"sender_agent_id": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-05-17 20:16:28 +00:00
|
|
|
"adminkindboxreqparam.AssignSenderResponse": {
|
|
|
|
"type": "object"
|
|
|
|
},
|
2024-05-15 07:38:39 +00:00
|
|
|
"adminkindboxreqparam.DeliverKindBoxReqResponse": {
|
|
|
|
"type": "object"
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqAcceptRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"count_accepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"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"
|
|
|
|
},
|
|
|
|
"kind_box_req_id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kind_box_req_status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminkindboxreqparam.KindBoxReqGetAllResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"allKindBoxReq": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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-14 13:07:09 +00:00
|
|
|
},
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"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-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"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"status": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 1
|
2024-05-14 13:07:09 +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-15 07:38:39 +00:00
|
|
|
"admin": {
|
|
|
|
"$ref": "#/definitions/entity.Admin"
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 1
|
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"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminserviceparam.RegisterResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"admin": {
|
|
|
|
"$ref": "#/definitions/entity.Admin"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"adminserviceparam.Tokens": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"access_token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"refresh_token": {
|
|
|
|
"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": {
|
|
|
|
"type": "string",
|
|
|
|
"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"
|
|
|
|
},
|
|
|
|
"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"
|
|
|
|
},
|
|
|
|
"phone_number": {
|
|
|
|
"type": "string",
|
|
|
|
"example": "09198829528"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactoreparam.Tokens": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"access_token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"refresh_token": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
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"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxReqID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"receiverAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"returnReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"returnedAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"serialNumber": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxStatus"
|
|
|
|
},
|
|
|
|
"type": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.KindBoxReqAddRequest": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactor_id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"type": "integer",
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"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",
|
|
|
|
"example": "2025-01-02 15:04:05"
|
2024-05-15 07:38:39 +00:00
|
|
|
},
|
|
|
|
"type_id": {
|
2024-05-17 20:16:28 +00:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"example": 1
|
2024-05-15 07:38:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.KindBoxReqAddResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"kind_box_req": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReq"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"benefactorkindboxreqparam.KindBoxReqGetResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countAccepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countRequested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
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"
|
|
|
|
},
|
|
|
|
"isMain": {
|
|
|
|
"type": "boolean"
|
|
|
|
},
|
|
|
|
"lat": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"lon": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"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": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"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": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2
|
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"MaleGender",
|
|
|
|
"FemaleGender"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.KindBoxReq": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"benefactorID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countAccepted": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"countRequested": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverAddressID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"deliverReferDate": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"deliveredAt": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"description": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"kindBoxType": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxType"
|
|
|
|
},
|
|
|
|
"senderAgentID": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"$ref": "#/definitions/entity.KindBoxReqStatus"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"entity.KindBoxReqStatus": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"KindBoxReqPendingStatus",
|
|
|
|
"KindBoxReqAcceptedStatus",
|
|
|
|
"KindBoxReqAssignedSenderAgentStatus",
|
|
|
|
"KindBoxReqRejectedStatus",
|
|
|
|
"KindBoxReqDeliveredStatus"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.KindBoxStatus": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3,
|
|
|
|
4,
|
|
|
|
5
|
|
|
|
],
|
|
|
|
"x-enum-varnames": [
|
|
|
|
"KindBoxDeliveredStatus",
|
|
|
|
"KindBoxReadyToReturnStatus",
|
|
|
|
"KindBoxAssignedReceiverAgentStatus",
|
|
|
|
"KindBoxReturnedStatus",
|
|
|
|
"KindBoxEnumeratedStatus"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"entity.KindBoxType": {
|
|
|
|
"type": "integer",
|
|
|
|
"enum": [
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3
|
|
|
|
],
|
|
|
|
"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
|
|
|
},
|
|
|
|
"param.PaginationResponse": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"pageNumber": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"pageSize": {
|
|
|
|
"type": "integer"
|
|
|
|
},
|
|
|
|
"total": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
2024-05-14 13:07:09 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"securityDefinitions": {
|
2024-05-15 07:38:39 +00:00
|
|
|
"AuthBearerAdmin": {
|
2024-05-17 20:16:28 +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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|