18070 lines
1.3 MiB
18070 lines
1.3 MiB
{
|
|
"spec": {
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Foodsharing API",
|
|
"description": "https://devdocs.foodsharing.de",
|
|
"version": "1.0.0"
|
|
},
|
|
"paths": {
|
|
"/api/achievements/region/{regionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Get all achievements that belong to a region",
|
|
"operationId": "get_foodsharing_restapi_achievementrest_getachievementsfromregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of achievements scoped to this region.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Achievement"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/achievements": {
|
|
"post": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Add a new achievement",
|
|
"operationId": "post_foodsharing_restapi_achievementrest_addachievement",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Achievement"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created achievement",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/achievements/{achievementId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Delete an existing achievement",
|
|
"operationId": "delete_foodsharing_restapi_achievementrest_deleteachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "achievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data"
|
|
},
|
|
"404": {
|
|
"description": "Achievement does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Edit an existing achievement",
|
|
"operationId": "patch_foodsharing_restapi_achievementrest_updateachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "achievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Achievement"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"422": {
|
|
"description": "Invalid data"
|
|
},
|
|
"404": {
|
|
"description": "Achievement does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/achievements/{achievementId}/users": {
|
|
"get": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Get details about all users that have a specific achievement",
|
|
"operationId": "get_foodsharing_restapi_achievementrest_getawardedusersforachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "achievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of awarded achievements.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AwardedAchievementWithUserDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/achievements/{achievementId}/users/{userId}": {
|
|
"post": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Award an achievement to a user",
|
|
"operationId": "post_foodsharing_restapi_achievementrest_awardachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "achievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AwardedAchievementDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AwardedAchievementWithUserDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/achievements/awarded/{awardedAchievementId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Revoke an achievement from a user",
|
|
"operationId": "delete_foodsharing_restapi_achievementrest_revokeachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "awardedAchievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"achievement"
|
|
],
|
|
"summary": "Edit an awarded achievement of a user",
|
|
"operationId": "patch_foodsharing_restapi_achievementrest_editawardedachievement",
|
|
"parameters": [
|
|
{
|
|
"name": "awardedAchievementId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AwardedAchievementDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AwardedAchievementWithUserDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/activities/filters": {
|
|
"get": {
|
|
"tags": [
|
|
"activities"
|
|
],
|
|
"summary": "Returns the filters for all dashboard activities for the current user",
|
|
"operationId": "get_foodsharing_restapi_activityrest_getactivityfilters",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"activities"
|
|
],
|
|
"summary": "Sets which dashboard activities should be deactivated for the current user.",
|
|
"operationId": "patch_foodsharing_restapi_activityrest_setactivityfilters",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActivityFilterModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Incomplete or incorrect request parameters"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/activities/updates": {
|
|
"get": {
|
|
"tags": [
|
|
"activities"
|
|
],
|
|
"summary": "Returns the updates to display on the dashboard",
|
|
"operationId": "get_foodsharing_restapi_activityrest_getactivityupdates",
|
|
"parameters": [
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": 0,
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of achievements scoped to this region.",
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ActivityUpdate"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/ActivityUpdateMailbox"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}/applications/{userId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Declines an application for a work group",
|
|
"operationId": "delete_foodsharing_restapi_applicationrest_declineapplication",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Workgroup does not exist"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Accepts an application for a work group",
|
|
"operationId": "patch_foodsharing_restapi_applicationrest_acceptapplication",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Workgroup does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}/applications": {
|
|
"get": {
|
|
"tags": [
|
|
"application"
|
|
],
|
|
"summary": "Returns all pending applications for a working group",
|
|
"operationId": "get_foodsharing_restapi_applicationrest_listapplications",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of pending applicants.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Workgroup does not exist"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"groups"
|
|
],
|
|
"summary": "Requests to join a group and provides motivation, ability, experience, and selected time message for mail to group.",
|
|
"operationId": "post_foodsharing_restapi_workinggrouprest_sendgrouprequest",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendGroupRequestData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not permitted to access these achievements"
|
|
},
|
|
"404": {
|
|
"description": "Not permitted to access these achievements"
|
|
},
|
|
"400": {
|
|
"description": "Malformed data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{recipientId}/bananas": {
|
|
"post": {
|
|
"tags": [
|
|
"banana"
|
|
],
|
|
"summary": "Gives a banana to a user",
|
|
"operationId": "post_foodsharing_restapi_bananarest_addbanana",
|
|
"parameters": [
|
|
{
|
|
"name": "recipientId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BananaMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Banana"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User to rate does not exist."
|
|
},
|
|
"403": {
|
|
"description": "Not allowed to give a banana to this user."
|
|
},
|
|
"400": {
|
|
"description": "Invalid parameters."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{recipientId}/bananas/{senderId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"banana"
|
|
],
|
|
"operationId": "delete_foodsharing_restapi_bananarest_deletebanana",
|
|
"parameters": [
|
|
{
|
|
"name": "recipientId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "senderId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/bananas/meta": {
|
|
"get": {
|
|
"tags": [
|
|
"banana"
|
|
],
|
|
"summary": "Returns basic metadata about the bananas of a user",
|
|
"operationId": "get_foodsharing_restapi_bananarest_getbananametadata",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BananaMetadata"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{recipientId}/bananas/received": {
|
|
"get": {
|
|
"tags": [
|
|
"banana"
|
|
],
|
|
"summary": "Returns the bananas given to a user",
|
|
"operationId": "get_foodsharing_restapi_bananarest_getreceivedbananas",
|
|
"parameters": [
|
|
{
|
|
"name": "recipientId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Banana"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{senderId}/bananas/sent": {
|
|
"get": {
|
|
"tags": [
|
|
"banana"
|
|
],
|
|
"summary": "Returns the bananas given by a user",
|
|
"operationId": "get_foodsharing_restapi_bananarest_getsentbananas",
|
|
"parameters": [
|
|
{
|
|
"name": "senderId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Banana"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "User does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/baskets": {
|
|
"get": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Returns all current baskets of the user",
|
|
"operationId": "get_foodsharing_restapi_basketrest_listbaskets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BasketForOwnerMenu"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/baskets/nearby": {
|
|
"get": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Returns a list of baskets close to a given location.",
|
|
"description": "If no valid location is given, the user's home location is used. If the user has no home location, lat and lon paramters are required.\u003Cbr\u003EBaskets created by the current user are excluded.",
|
|
"operationId": "get_foodsharing_restapi_basketrest_listnearbybaskets",
|
|
"parameters": [
|
|
{
|
|
"name": "lat",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "lon",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "distance",
|
|
"in": "query",
|
|
"description": "Distance in kilometers.",
|
|
"required": false,
|
|
"allowEmptyValue": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": 30,
|
|
"maximum": 50,
|
|
"minimum": 1
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BasketForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Location missing"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/baskets/{basketId}": {
|
|
"get": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Returns details of a basket",
|
|
"operationId": "get_foodsharing_restapi_basketrest_getbasket",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Basket not available"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Removes a new basket",
|
|
"operationId": "delete_foodsharing_restapi_basketrest_removebasket",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "Basket not available"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Updates an existing basket",
|
|
"operationId": "patch_foodsharing_restapi_basketrest_editbasket",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Basket not available"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/baskets": {
|
|
"post": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Adds a new basket",
|
|
"operationId": "post_foodsharing_restapi_basketrest_addbasket",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid basket data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/baskets/{basketId}/requests": {
|
|
"post": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Requests a basket",
|
|
"operationId": "post_foodsharing_restapi_basketrest_requestbasket",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Basket not available"
|
|
},
|
|
"403": {
|
|
"description": "Request was denied"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Withdraws a basket requests",
|
|
"operationId": "delete_foodsharing_restapi_basketrest_withdrawbasketrequest",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Basket"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Basket not available"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/baskets/{basketId}/requests/{requesterId}/status": {
|
|
"patch": {
|
|
"tags": [
|
|
"basket"
|
|
],
|
|
"summary": "Updates the status of a basket request",
|
|
"description": "The creator of a basket can set the request status for their basket (e.g. mark as picked up, not picked up, denied etc.).",
|
|
"operationId": "patch_foodsharing_restapi_basketrest_updaterequeststatus",
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"maximum": 5,
|
|
"minimum": 2
|
|
}
|
|
},
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "requesterId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Request not available"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/bells": {
|
|
"get": {
|
|
"tags": [
|
|
"bells"
|
|
],
|
|
"summary": "Returns all bells for the current user",
|
|
"operationId": "get_foodsharing_restapi_bellrest_listbells",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BellForList"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"bells"
|
|
],
|
|
"summary": "Deletes bells for the current user",
|
|
"operationId": "delete_foodsharing_restapi_bellrest_deletebells",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/IDList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "At least one of the bells was successfully deleted"
|
|
},
|
|
"404": {
|
|
"description": "The user does not have a bell with that ID"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/bells/readStatus": {
|
|
"patch": {
|
|
"tags": [
|
|
"bells"
|
|
],
|
|
"summary": "Sets the read status of one or more bells as unread/read",
|
|
"operationId": "patch_foodsharing_restapi_bellrest_setbellreadstatus",
|
|
"parameters": [
|
|
{
|
|
"name": "isRead",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"maximum": 1,
|
|
"minimum": 0
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/IDList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Bells were successfully marked or already had that status."
|
|
},
|
|
"404": {
|
|
"description": "The user does not have a bell with that ID"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/blog": {
|
|
"get": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Returns blog posts.",
|
|
"operationId": "get_foodsharing_restapi_blogpostrest_getblogposts",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaginatedBlogPosts"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Adds a new blog post",
|
|
"description": "The post will be publicly visible immediately.",
|
|
"operationId": "post_foodsharing_restapi_blogpostrest_addblogpost",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlogPostData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlogPost"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/blog/{blogPostId}": {
|
|
"get": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Returns a specific blog post.",
|
|
"operationId": "get_foodsharing_restapi_blogpostrest_getblogpost",
|
|
"parameters": [
|
|
{
|
|
"name": "blogPostId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlogPost"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Blog post not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/blog/{blogId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Removes a blogpost.",
|
|
"operationId": "delete_foodsharing_restapi_blogpostrest_removeblogpost",
|
|
"parameters": [
|
|
{
|
|
"name": "blogId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Blog post not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Edit a specific blog post.",
|
|
"operationId": "patch_foodsharing_restapi_blogpostrest_editblogpost",
|
|
"parameters": [
|
|
{
|
|
"name": "blogId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BlogPostData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"404": {
|
|
"description": "Blog post not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/blog/{blogId}/published": {
|
|
"put": {
|
|
"tags": [
|
|
"blog"
|
|
],
|
|
"summary": "Sets a specific blog posts published status.",
|
|
"operationId": "put_foodsharing_restapi_blogpostrest_setblogpostpublished",
|
|
"parameters": [
|
|
{
|
|
"name": "isPublished",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
{
|
|
"name": "blogId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Blog post not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/buddies": {
|
|
"post": {
|
|
"tags": [
|
|
"buddy"
|
|
],
|
|
"summary": "Sends a buddy request to a user.",
|
|
"operationId": "post_foodsharing_restapi_buddyrest_sendrequest",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isBuddy": {
|
|
"description": "whether the other user is now this user's buddy",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Already send a request to that user."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"buddy"
|
|
],
|
|
"summary": "Removes a buddy request to a user.",
|
|
"operationId": "delete_foodsharing_restapi_buddyrest_removerequest",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "There was no request to be removed."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/buddies": {
|
|
"get": {
|
|
"tags": [
|
|
"buddy"
|
|
],
|
|
"summary": "Returns a list of all buddies with id, name, and photo.",
|
|
"operationId": "get_foodsharing_restapi_buddyrest_listbuddies",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BuddyList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/calendar/token": {
|
|
"get": {
|
|
"tags": [
|
|
"calendar"
|
|
],
|
|
"summary": "Returns the user's current access token",
|
|
"operationId": "get_foodsharing_restapi_calendarrest_gettoken",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"token": {
|
|
"type": "string",
|
|
"example": "fbb17c571c69affd1f18"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"404": {
|
|
"description": "No access token created"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"calendar"
|
|
],
|
|
"summary": "Creates a new random access token for the user, replacing the old one",
|
|
"operationId": "put_foodsharing_restapi_calendarrest_createtoken",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"token": {
|
|
"description": "the newly created calendar access token",
|
|
"type": "string",
|
|
"example": "fbb17c571c69affd1f18"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"calendar"
|
|
],
|
|
"summary": "Removes the user's access token",
|
|
"operationId": "delete_foodsharing_restapi_calendarrest_deletetoken",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - deleted or nothing to delete"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/calendar/{token}": {
|
|
"get": {
|
|
"tags": [
|
|
"calendar"
|
|
],
|
|
"summary": "Returns the user's foodsharing calendar as iCal",
|
|
"operationId": "get_foodsharing_restapi_calendarrest_listappointments",
|
|
"parameters": [
|
|
{
|
|
"name": "formatting",
|
|
"in": "query",
|
|
"description": "How to format description texts.\u003Cbr\u003EOne of `alt` (default), `html` or `text`",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "events",
|
|
"in": "query",
|
|
"description": "What events to include in the calendar.\u003Cbr\u003EOne of `every` (default), `invitations`, `maybe`, `accepted` or `none`",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "pickups",
|
|
"in": "query",
|
|
"description": "Whether to include pickups in the calendar.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "history",
|
|
"in": "query",
|
|
"description": "Whether to include past entries (up to 2 weeks back) in the calendar.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "reminders",
|
|
"in": "query",
|
|
"description": "List of reminder times in minutes. These reminders are applied to each calendar event.",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"example": "15,120"
|
|
},
|
|
{
|
|
"name": "token",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9a-f]+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Access token invalid"
|
|
},
|
|
"400": {
|
|
"description": "Invalid query parameters"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/categories/{type}": {
|
|
"get": {
|
|
"tags": [
|
|
"categories"
|
|
],
|
|
"summary": "Returns all existing categories of the given type",
|
|
"operationId": "get_foodsharing_restapi_categoriesrest_getcategories",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Category"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Invalid category type"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"categories"
|
|
],
|
|
"summary": "Adds a category",
|
|
"operationId": "post_foodsharing_restapi_categoriesrest_addcategory",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CategoryWithType"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CategoryWithType"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Invalid category type"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/categories/{type}/{id}": {
|
|
"delete": {
|
|
"tags": [
|
|
"categories"
|
|
],
|
|
"summary": "Deletes a category",
|
|
"operationId": "delete_foodsharing_restapi_categoriesrest_deletecategory",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Category doesn't exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Invalid category type"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"categories"
|
|
],
|
|
"summary": "Changes a category",
|
|
"operationId": "patch_foodsharing_restapi_categoriesrest_updatecategory",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CategoryWithType"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Category doesn't exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Invalid category type"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/categories/{type}/{sourceId}/merges/{targetId}": {
|
|
"post": {
|
|
"tags": [
|
|
"categories"
|
|
],
|
|
"summary": "Merge two categories",
|
|
"operationId": "post_foodsharing_restapi_categoriesrest_mergecategories",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "sourceId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "Number of duplicates removed",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Category doesn't exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Invalid category type"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/contents": {
|
|
"get": {
|
|
"tags": [
|
|
"content"
|
|
],
|
|
"summary": "Returns a list of all content entries.",
|
|
"operationId": "get_foodsharing_restapi_contentrest_getcontentlist",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Content"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"content"
|
|
],
|
|
"summary": "Adds a new content entry",
|
|
"operationId": "post_foodsharing_restapi_contentrest_addcontent",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ContentEntry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created content",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Content doesn't exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/contents/{contentId}": {
|
|
"get": {
|
|
"tags": [
|
|
"content"
|
|
],
|
|
"summary": "Returns the content entry for a specific id.",
|
|
"operationId": "get_foodsharing_restapi_contentrest_getcontent",
|
|
"parameters": [
|
|
{
|
|
"name": "contentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Content doesn't exist"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"content"
|
|
],
|
|
"operationId": "delete_foodsharing_restapi_contentrest_deletecontent",
|
|
"parameters": [
|
|
{
|
|
"name": "contentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"content"
|
|
],
|
|
"summary": "Updates the content entry with the specific id.",
|
|
"operationId": "patch_foodsharing_restapi_contentrest_editcontent",
|
|
"parameters": [
|
|
{
|
|
"name": "contentId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ContentEntry"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Content doesn't exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/donation-goal": {
|
|
"get": {
|
|
"tags": [
|
|
"donation"
|
|
],
|
|
"summary": "Returns cached information of foodsharing donation-goal via third service provider twingle.",
|
|
"operationId": "get_foodsharing_restapi_donationgoalrest_getinformation",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DonationGoalInformation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "Currently unavailable because there is no donation campaign"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/email-verification": {
|
|
"put": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Sends a new verification email to a specified address if an account with that address exists and is not yet verified",
|
|
"operationId": "put_foodsharing_restapi_emailverificationrest_requestverificationemail",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/VerificationEmailRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/events/{eventId}/invitation": {
|
|
"put": {
|
|
"tags": [
|
|
"events"
|
|
],
|
|
"summary": "Updates the user's response to an invitation.",
|
|
"operationId": "put_foodsharing_restapi_eventrest_setresponse",
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": []
|
|
},
|
|
{
|
|
"name": "eventId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Event doesn't exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/region/{regionId}/events": {
|
|
"get": {
|
|
"tags": [
|
|
"events"
|
|
],
|
|
"summary": "List events for region and groups.",
|
|
"operationId": "get_foodsharing_restapi_eventrest_listevents",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/EventForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/events": {
|
|
"post": {
|
|
"tags": [
|
|
"events"
|
|
],
|
|
"summary": "Add a new event.",
|
|
"operationId": "post_foodsharing_restapi_eventrest_addevents",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Event"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created event",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions for this region"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/events/{eventId}": {
|
|
"patch": {
|
|
"tags": [
|
|
"events"
|
|
],
|
|
"summary": "Edit an event.",
|
|
"operationId": "patch_foodsharing_restapi_eventrest_editevents",
|
|
"parameters": [
|
|
{
|
|
"name": "eventId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Event"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Event doesn't exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/feature-toggles": {
|
|
"get": {
|
|
"tags": [
|
|
"feature-toggle"
|
|
],
|
|
"summary": "Returns all feature toggles",
|
|
"operationId": "get_foodsharing_restapi_featuretogglerest_getallfeaturetoggles",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FeatureToggle"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/feature-toggles/{featureToggle}": {
|
|
"get": {
|
|
"tags": [
|
|
"feature-toggle"
|
|
],
|
|
"summary": "Checks if a feature toggle is active or not",
|
|
"operationId": "get_foodsharing_restapi_featuretogglerest_isfeaturetoggleactive",
|
|
"parameters": [
|
|
{
|
|
"name": "featureToggle",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[a-zA-Z]+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FeatureToggle"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Feature toggle is not defined"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"feature-toggle"
|
|
],
|
|
"summary": "Changes a feature toggle state",
|
|
"operationId": "patch_foodsharing_restapi_featuretogglerest_togglefeaturetoggle",
|
|
"parameters": [
|
|
{
|
|
"name": "newState",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "featureToggle",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[a-zA-Z]+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "Feature toggle is not defined"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/food-share-points/{foodSharePointId}": {
|
|
"get": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Returns details of the food share point with the given ID.",
|
|
"operationId": "get_foodsharing_restapi_foodsharepointrest_getfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FoodSharePointDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Delete an existing food share point.",
|
|
"operationId": "delete_foodsharing_restapi_foodsharepointrest_removefoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Edit an existing food share point.",
|
|
"operationId": "patch_foodsharing_restapi_foodsharepointrest_editfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FoodSharePointEditData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"400": {
|
|
"description": "Invalid region type for the food share point"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/food-share-points": {
|
|
"get": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Returns a list of all food share points in a region and all its subregions.",
|
|
"operationId": "get_foodsharing_restapi_foodsharepointrest_listfoodsharepoints",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FoodSharePointForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Adds or suggests a new food share point.",
|
|
"operationId": "post_foodsharing_restapi_foodsharepointrest_addfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FoodSharePointForCreation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddFoodSharePointResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"400": {
|
|
"description": "Invalid region type for the food share point"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/food-share-points/{foodSharePointId}/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Returns the permissions the logged in user has for the given food share point",
|
|
"operationId": "get_foodsharing_restapi_foodsharepointrest_foodsharepointpermissions",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FoodSharePointPermission"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/food-share-points/{foodSharePointId}/followers": {
|
|
"post": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Follow a food share point",
|
|
"operationId": "post_foodsharing_restapi_foodsharepointrest_followfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "sendMails",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Unfollow a food share point",
|
|
"operationId": "delete_foodsharing_restapi_foodsharepointrest_unfollowfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/food-share-points/{foodSharePointId}/status": {
|
|
"patch": {
|
|
"tags": [
|
|
"foodSharePoints"
|
|
],
|
|
"summary": "Accept a suggested food share point",
|
|
"operationId": "patch_foodsharing_restapi_foodsharepointrest_acceptfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"404": {
|
|
"description": "Food share point not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{foodsaverId}/agenda/{date}": {
|
|
"get": {
|
|
"tags": [
|
|
"foodsaver"
|
|
],
|
|
"summary": "Lists a users agenda on a specific day, including pickups and events",
|
|
"operationId": "get_foodsharing_restapi_foodsaverrest_listsamedayagenda",
|
|
"parameters": [
|
|
{
|
|
"name": "foodsaverId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "date",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PickupAgendaEntry"
|
|
},
|
|
{
|
|
"$ref": "#/components/schemas/EventAgendaEntry"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid date"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/forum/subscriptions": {
|
|
"get": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Get forum following status.",
|
|
"operationId": "get_foodsharing_restapi_forumrest_getisfollowingforum",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isFollowing": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Set forum following status.",
|
|
"operationId": "put_foodsharing_restapi_forumrest_setfollowingforum",
|
|
"parameters": [
|
|
{
|
|
"name": "isFollowing",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this forum"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/forum/threads": {
|
|
"get": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "List threads of a forum",
|
|
"operationId": "get_foodsharing_restapi_forumrest_listthreads",
|
|
"parameters": [
|
|
{
|
|
"name": "subforumId",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PaginatedForumThreadsForListView"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this forum"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Create a thread inside a forum.",
|
|
"operationId": "post_foodsharing_restapi_forumrest_createthread",
|
|
"parameters": [
|
|
{
|
|
"name": "subforumId",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateThreadData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/threads/{threadId}": {
|
|
"get": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Returns a forum thread including all posts",
|
|
"operationId": "get_foodsharing_restapi_forumrest_getthread",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ForumThread"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this thread"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Deletes a non-activated forum thread",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_deletethread",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "Thread does not exist"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Change attributes for a thread: Stickiness, activate thread, status.",
|
|
"operationId": "patch_foodsharing_restapi_forumrest_patchthread",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PatchThreadData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/threads/{threadId}/follow/email": {
|
|
"post": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Request email notifications for activities in at thread.",
|
|
"operationId": "post_foodsharing_restapi_forumrest_followthreadbyemail",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Removes email notifications for activities in a thread.",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_unfollowthreadbyemail",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/threads/{threadId}/follow/bell": {
|
|
"post": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Request bell notifications for activities in a thread.",
|
|
"operationId": "post_foodsharing_restapi_forumrest_followthreadbybell",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Removes bell notifications for activities in a thread.",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_unfollowthreadbybell",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/threads/{threadId}/posts": {
|
|
"post": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Creates a post inside a thread.",
|
|
"operationId": "post_foodsharing_restapi_forumrest_createpost",
|
|
"parameters": [
|
|
{
|
|
"name": "threadId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreatePostData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/posts/{postId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Deletes a forum post.",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_deletepost",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/posts/{postId}/hidden": {
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Restore a hidden forum post",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_restorepost",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "success"
|
|
},
|
|
"400": {
|
|
"description": "Post is not hidden."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Hide a forum post.",
|
|
"operationId": "patch_foodsharing_restapi_forumrest_hidepost",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PatchPostData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Post is already hidden."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/forum/posts/{postId}/reactions/{emoji}": {
|
|
"post": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Adds an emoji reaction to a post. An emoji is an arbitrary string but needs to be supported by the frontend.",
|
|
"operationId": "post_foodsharing_restapi_forumrest_addreaction",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "emoji",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"forum"
|
|
],
|
|
"summary": "Remove an emoji reaction the logged in user has given from a post.",
|
|
"operationId": "delete_foodsharing_restapi_forumrest_deletereaction",
|
|
"parameters": [
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "emoji",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the properties of a specific region.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionForAdministration"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Delete a region or a working group.",
|
|
"operationId": "delete_foodsharing_restapi_grouprest_deletegroup",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"409": {
|
|
"description": "Unit contains subelements preventing the deletion"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Edits the region using the given data.",
|
|
"operationId": "patch_foodsharing_restapi_regionrest_editregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionForAdministration"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/conference": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the join URL of a given groups conference.",
|
|
"operationId": "get_foodsharing_restapi_grouprest_joinconference",
|
|
"parameters": [
|
|
{
|
|
"name": "redirect",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ConferenceRoom"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"302": {
|
|
"description": "Redirect to personalized conference URL"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Region doesn't have a confernece"
|
|
},
|
|
"503": {
|
|
"description": "Conferences currently not available"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/locale": {
|
|
"get": {
|
|
"tags": [
|
|
"locale"
|
|
],
|
|
"summary": "Returns the locale setting for the current session.",
|
|
"operationId": "get_foodsharing_restapi_localerest_getlocale",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"locale": {
|
|
"type": "string",
|
|
"example": "de"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"locale"
|
|
],
|
|
"summary": "Sets the locale for the current session.",
|
|
"operationId": "put_foodsharing_restapi_localerest_setlocale",
|
|
"parameters": [
|
|
{
|
|
"name": "locale",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"locale": {
|
|
"description": "The newly set locale.",
|
|
"type": "string",
|
|
"example": "de"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/mailboxes/mails/{mailId}": {
|
|
"get": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Return a mail from mailbox.",
|
|
"operationId": "get_foodsharing_restapi_mailboxrest_getmail",
|
|
"parameters": [
|
|
{
|
|
"name": "mailId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Email"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Moves an email to the trash folder or deletes it, if it is already in the trash.",
|
|
"operationId": "delete_foodsharing_restapi_mailboxrest_deleteemail",
|
|
"parameters": [
|
|
{
|
|
"name": "mailId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Changes properties of an email.",
|
|
"operationId": "patch_foodsharing_restapi_mailboxrest_setemailproperties",
|
|
"parameters": [
|
|
{
|
|
"name": "mailId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PatchEmailModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/mailboxes/unread-count": {
|
|
"get": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Returns the number of unread mails for the sending user.",
|
|
"operationId": "get_foodsharing_restapi_mailboxrest_getunreadmailcount",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"unreadCount": {
|
|
"description": "Number of unread mails",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/mailboxes/{mailboxId}/folders/{folderId}/mails": {
|
|
"get": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Returns mails from a mailbox.",
|
|
"operationId": "get_foodsharing_restapi_mailboxrest_getallmailsfrommailbox",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "mailboxId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "folderId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Email"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/mailboxes/{mailboxId}/mails": {
|
|
"post": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Sends an email from a mailbox.",
|
|
"operationId": "post_foodsharing_restapi_mailboxrest_sendmail",
|
|
"parameters": [
|
|
{
|
|
"name": "mailboxId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailSendData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Email"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too many requests"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"400": {
|
|
"description": "Invalid recipients"
|
|
},
|
|
"404": {
|
|
"description": "Attachment not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/mailboxes": {
|
|
"get": {
|
|
"tags": [
|
|
"mailbox"
|
|
],
|
|
"summary": "Returns all regions and their email addresses.",
|
|
"operationId": "get_foodsharing_restapi_mailboxrest_listregions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Region"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/baskets": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns all basket markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_getbasketmarkers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/food-share-points": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns all food share point markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_getfoodsharepointmarkers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/regions": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns all region markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_getregionmarkers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/stores": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns all store markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_getstoremarkers",
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "help",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "scope",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/users": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns all user markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_getusermarkers",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "role",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "activity",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "member",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/events": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns of all event markers.",
|
|
"operationId": "get_foodsharing_restapi_maprest_geteventmarkers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MapMarker"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/regions/{regionId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a region marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_getregionbubble",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionMapBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The region does not exist or does not have a region pin."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/food-share-points/{foodSharePointId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a food share point marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_getfoodsharepoint",
|
|
"parameters": [
|
|
{
|
|
"name": "foodSharePointId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FoodSharePointMapBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The food share point does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/baskets/{basketId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a basket marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_getbasketbubble",
|
|
"parameters": [
|
|
{
|
|
"name": "basketId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BasketBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The basket does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/stores/{storeId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a store marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_getstorebubble",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreMapBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The store does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/events/{eventId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a event marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_geteventbubble",
|
|
"parameters": [
|
|
{
|
|
"name": "eventId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EventMapBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "The event does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/map/markers/users/{userId}": {
|
|
"get": {
|
|
"tags": [
|
|
"map"
|
|
],
|
|
"summary": "Returns details on a user marker",
|
|
"operationId": "get_foodsharing_restapi_maprest_getuserbubble",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UserMapBubbleData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The user does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/conversations/{conversationId}/read-status": {
|
|
"put": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Mark conversation as read/unread",
|
|
"operationId": "put_foodsharing_restapi_messagerest_markconversationread",
|
|
"parameters": [
|
|
{
|
|
"name": "isRead",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
{
|
|
"name": "conversationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this conversation."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/conversations/{conversationId}/messages": {
|
|
"get": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Get messages from a conversation",
|
|
"operationId": "get_foodsharing_restapi_messagerest_getconversationmessages",
|
|
"parameters": [
|
|
{
|
|
"name": "olderThanId",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "conversationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MessageCollection"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this conversation."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Send a message in a conversation",
|
|
"operationId": "post_foodsharing_restapi_messagerest_sendmessage",
|
|
"parameters": [
|
|
{
|
|
"name": "conversationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ChatMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this conversation."
|
|
},
|
|
"400": {
|
|
"description": "Message body cannot be empty."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/conversations/{conversationId}": {
|
|
"get": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Get a conversation including some messages",
|
|
"operationId": "get_foodsharing_restapi_messagerest_getconversation",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "markAsRead",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "conversationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"conversation": {
|
|
"$ref": "#/components/schemas/Conversation"
|
|
},
|
|
"profiles": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to access this conversation."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Rename a conversation",
|
|
"operationId": "patch_foodsharing_restapi_messagerest_patchconversation",
|
|
"parameters": [
|
|
{
|
|
"name": "conversationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditChatData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to edit this conversation."
|
|
},
|
|
"400": {
|
|
"description": "Conversation is locked and cannot be renamed."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/conversations/lookup": {
|
|
"post": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Returns the conversation ID for a conversation between the current user and given others. The conversion is created if it does not exist yet.",
|
|
"operationId": "post_foodsharing_restapi_messagerest_getconversationid",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/IDList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "The conversation ID",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "At least one of the members could not be found."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/conversations": {
|
|
"get": {
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "Get the list of conversations for the current user",
|
|
"operationId": "get_foodsharing_restapi_messagerest_getconversations",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"conversations": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Conversation"
|
|
}
|
|
},
|
|
"profiles": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/notifications": {
|
|
"get": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Get the general notification settings",
|
|
"operationId": "get_foodsharing_restapi_notificationsrest_getgeneralnotificationsettings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GeneralNotificationSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Update the general notification settings",
|
|
"operationId": "patch_foodsharing_restapi_notificationsrest_patchgeneralnotificationsettings",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GeneralNotificationSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/notifications/threads": {
|
|
"get": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Get the threads notification settings",
|
|
"operationId": "get_foodsharing_restapi_notificationsrest_getthreadsnotificationsettings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/NotificationSettingWithRegion"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Update the threads notification settings",
|
|
"operationId": "patch_foodsharing_restapi_notificationsrest_patchthreadsnotificationsettings",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationSettingsPatch"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/notifications/food-share-points": {
|
|
"get": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Get the food share points notification settings",
|
|
"operationId": "get_foodsharing_restapi_notificationsrest_getfoodsharepointsnotificationsettings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/NotificationSetting"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Update the food share points notification settings",
|
|
"operationId": "patch_foodsharing_restapi_notificationsrest_patchfoodsharepointsnotificationsettings",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationSettingsPatch"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid notification pattern (currently it is not possible to revieve emails without bells)."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/notifications/regions": {
|
|
"get": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Get the region notification settings",
|
|
"operationId": "get_foodsharing_restapi_notificationsrest_getregionsnotificationsettings",
|
|
"parameters": [
|
|
{
|
|
"name": "groups",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/NotificationSetting"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"notifications"
|
|
],
|
|
"summary": "Update the regions notification settings",
|
|
"operationId": "patch_foodsharing_restapi_notificationsrest_patchregionsnotificationsettings",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NotificationSettingsPatch"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/admin/oauthclients": {
|
|
"get": {
|
|
"operationId": "get_foodsharing_restapi_oauthadminrest_listclients",
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "post_foodsharing_restapi_oauthadminrest_createclient",
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/admin/oauthclients/{identifier}": {
|
|
"get": {
|
|
"operationId": "get_foodsharing_restapi_oauthadminrest_getclient",
|
|
"parameters": [
|
|
{
|
|
"name": "identifier",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "delete_foodsharing_restapi_oauthadminrest_deleteclient",
|
|
"parameters": [
|
|
{
|
|
"name": "identifier",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "patch_foodsharing_restapi_oauthadminrest_updateclient",
|
|
"parameters": [
|
|
{
|
|
"name": "identifier",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/registration/options": {
|
|
"post": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Generate registration options for creating a new passkey",
|
|
"operationId": "post_foodsharing_restapi_passkeyrest_registrationoptions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - returns registration options"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/registration/verify": {
|
|
"post": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Verify and save a new passkey credential",
|
|
"operationId": "post_foodsharing_restapi_passkeyrest_verifyregistration",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PasskeyRegistrationRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - passkey registered"
|
|
},
|
|
"400": {
|
|
"description": "Invalid credential data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/authentication/options": {
|
|
"post": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Generate authentication options for passkey login",
|
|
"operationId": "post_foodsharing_restapi_passkeyrest_authenticationoptions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - returns authentication options"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/authentication/verify": {
|
|
"post": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Verify passkey authentication and log in the user",
|
|
"operationId": "post_foodsharing_restapi_passkeyrest_verifyauthentication",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PasskeyAuthenticationRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - user authenticated"
|
|
},
|
|
"400": {
|
|
"description": "Invalid assertion data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/list": {
|
|
"get": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "List all passkeys for the current user",
|
|
"operationId": "get_foodsharing_restapi_passkeyrest_listpasskeys",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - returns list of passkeys"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/passkey/{id}": {
|
|
"delete": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Delete a passkey",
|
|
"operationId": "delete_foodsharing_restapi_passkeyrest_deletepasskey",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[a-zA-Z0-9]+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - passkey deleted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"404": {
|
|
"description": "Passkey not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"passkey"
|
|
],
|
|
"summary": "Rename a passkey",
|
|
"operationId": "patch_foodsharing_restapi_passkeyrest_renamepasskey",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[a-zA-Z0-9]+"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PasskeyRenameRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success - passkey renamed"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"404": {
|
|
"description": "Passkey not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/petition": {
|
|
"get": {
|
|
"tags": [
|
|
"petition"
|
|
],
|
|
"summary": "Returns possibly cached information of foodsharing petition at bundestag.",
|
|
"operationId": "get_foodsharing_restapi_petitionrest_getsignaturescount",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"href": {
|
|
"description": "Link to the petition page.",
|
|
"type": "string"
|
|
},
|
|
"signatures": {
|
|
"description": "Number of online signatures.",
|
|
"type": "integer"
|
|
},
|
|
"daysLeft": {
|
|
"description": "Number of days left to sign the petition.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "No active petition."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups/{pickupDate}/users/current": {
|
|
"post": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Join a pickup slot",
|
|
"operationId": "post_foodsharing_restapi_pickuprest_joinpickup",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "pickupDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isConfirmed": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to join pickup"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups/{pickupDate}/users/{userId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Remove a user from a pickup",
|
|
"operationId": "delete_foodsharing_restapi_pickuprest_leavepickup",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "pickupDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PickupLeaveMessageOptions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Confirm a pickup slot",
|
|
"operationId": "patch_foodsharing_restapi_pickuprest_editpickupslot",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "pickupDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/pickups": {
|
|
"delete": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Remove a user from all his pickups",
|
|
"operationId": "delete_foodsharing_restapi_pickuprest_leaveallpickups",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PickupLeaveMessageOptions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/regular-pickups": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Get the regular pickups for a store",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_getregularpickup",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RegularPickup"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access pickups"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Set the regular pickups for a store",
|
|
"operationId": "put_foodsharing_restapi_pickuprest_editregularpickup",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegularPickups"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups/{pickupDate}": {
|
|
"put": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Create or modify a manual pick up for a store",
|
|
"operationId": "put_foodsharing_restapi_pickuprest_editpickup",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "pickupDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditPickupData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isNewlyCreated": {
|
|
"description": "Indicates whether a new pickup was created (true) or an existing one was updated (false).",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to change pickup"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "List pickups for a store",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_listpickups",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"totalSlots": {
|
|
"type": "integer",
|
|
"example": 5
|
|
},
|
|
"occupiedSlots": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"isConfirmed": {
|
|
"type": "boolean"
|
|
},
|
|
"profile": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"isSleeping": {
|
|
"type": "boolean"
|
|
},
|
|
"mobile": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"landline": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"isManager": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"isAvailable": {
|
|
"type": "boolean"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access pickups"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups/history/{fromDate}/{toDate}": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "List pickup history for a store",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_listpickuphistory",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "fromDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
},
|
|
{
|
|
"name": "toDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"confirmed": {
|
|
"type": "integer"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"date_ts": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"profile": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"isSleeping": {
|
|
"type": "boolean"
|
|
},
|
|
"mobile": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"landline": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"isManager": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access pickup history"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/pickups/history": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Get past pickups for a user",
|
|
"description": "Can be restricted (to the last month or one entry at least) depending on the requesting users permissions.",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_listpastpickups",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PickupOption"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/pickups/registered": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Get future registered pickups for a user",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_listregisteredpickups",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PickupOption"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/pickups/options": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Get all pickup options a user has, including already registered slots",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_listpickupoptions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PickupOption"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/pickups/{pickupDate}/eligibility": {
|
|
"get": {
|
|
"tags": [
|
|
"pickup"
|
|
],
|
|
"summary": "Check if a user may enter a specific pickup based on pickup rules",
|
|
"operationId": "get_foodsharing_restapi_pickuprest_passespickuprule",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "pickupDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isEligible": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/push-notification/{type}/server-information": {
|
|
"get": {
|
|
"tags": [
|
|
"push-notification"
|
|
],
|
|
"summary": "Returns information necessary for registering subscribing to push notifications with this handler",
|
|
"operationId": "get_foodsharing_restapi_pushnotificationsubscriptionrest_getserverinformation",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"key": {
|
|
"description": "the public key to be used for subscribing, or null if not applicable",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"404": {
|
|
"description": "Handler type does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/push-notification/{type}/subscription": {
|
|
"post": {
|
|
"tags": [
|
|
"push-notification"
|
|
],
|
|
"summary": "Subscribes to push notifications with the specified handler",
|
|
"operationId": "post_foodsharing_restapi_pushnotificationsubscriptionrest_subscribe",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "the ID of the created subscription",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"404": {
|
|
"description": "Handler type does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/push-notification/{type}/subscription/{subscriptionId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"push-notification"
|
|
],
|
|
"summary": "Unsubscribes from push notifications with the specified handler",
|
|
"operationId": "delete_foodsharing_restapi_pushnotificationsubscriptionrest_unsubscribe",
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "subscriptionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"404": {
|
|
"description": "Handler type does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}": {
|
|
"post": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Starts a new quiz session",
|
|
"operationId": "post_foodsharing_restapi_quizrest_startquizsession",
|
|
"parameters": [
|
|
{
|
|
"name": "isTimed",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "isTest",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}/status": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns the status of the users current quiz progress",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getquizstatus",
|
|
"parameters": [
|
|
{
|
|
"name": "isTest",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/QuizStatus"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}/question": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns the next question of the quiz for the currently answering user.",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getnextquestion",
|
|
"parameters": [
|
|
{
|
|
"name": "isTest",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActiveQuestion"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}/answer": {
|
|
"post": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Answer the current quiz question",
|
|
"operationId": "post_foodsharing_restapi_quizrest_answernextquestion",
|
|
"parameters": [
|
|
{
|
|
"name": "isTest",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SelectedAnswers"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"solution": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Answer"
|
|
}
|
|
},
|
|
"timedOut": {
|
|
"description": "Whether the answer was given in time.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}/results": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns the results of the last time the current user finished the quiz",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getquizresults",
|
|
"parameters": [
|
|
{
|
|
"name": "isTest",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/QuizSession"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/quiz-sessions/{quizId}/confirmation": {
|
|
"post": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Confirm the finalization of a passed quiz",
|
|
"operationId": "post_foodsharing_restapi_quizrest_confirmquiz",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/quiz-sessions": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns a users quiz sessions",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getquizsessions",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"properties": {
|
|
"quiz": {
|
|
"$ref": "#/components/schemas/CommonLabel"
|
|
},
|
|
"sessions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/QuizSession"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quiz-session/{sessionId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Deletes a quiz session",
|
|
"operationId": "delete_foodsharing_restapi_quizrest_deletequizsession",
|
|
"parameters": [
|
|
{
|
|
"name": "sessionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quizzes/{quizId}": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns the details of a quiz",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getquizdetails",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Quiz"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Changes the properties of a quiz",
|
|
"operationId": "patch_foodsharing_restapi_quizrest_updatequiz",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Quiz"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quizzes/{quizId}/questions": {
|
|
"get": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Returns all questions of a quiz including answers",
|
|
"operationId": "get_foodsharing_restapi_quizrest_getquestions",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Question"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Adds a new question to a quiz",
|
|
"operationId": "post_foodsharing_restapi_quizrest_addquestion",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Question"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created question",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quizzes/{quizId}/questions/{questionId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Removes a quiz question",
|
|
"operationId": "delete_foodsharing_restapi_quizrest_deletequestions",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "questionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Updates a quiz question",
|
|
"operationId": "patch_foodsharing_restapi_quizrest_updatequestion",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "questionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Question"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quizzes/{quizId}/questions/{questionId}/answers": {
|
|
"post": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Adds a new answer to a question",
|
|
"operationId": "post_foodsharing_restapi_quizrest_addanswer",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "questionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Answer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created answer",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/quizzes/{quizId}/questions/{questionId}/answers/{answerId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Removes an answer",
|
|
"operationId": "delete_foodsharing_restapi_quizrest_deleteanswer",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "questionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "answerId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"quiz"
|
|
],
|
|
"summary": "Updates an answer",
|
|
"operationId": "patch_foodsharing_restapi_quizrest_updateanswer",
|
|
"parameters": [
|
|
{
|
|
"name": "quizId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "questionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "answerId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Answer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions."
|
|
},
|
|
"400": {
|
|
"description": "Invalid request"
|
|
},
|
|
"404": {
|
|
"description": "Not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/users/current": {
|
|
"put": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Join a region.",
|
|
"operationId": "put_foodsharing_restapi_regionrest_joinregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Removes the current user from a region.",
|
|
"operationId": "delete_foodsharing_restapi_regionrest_leaveregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"409": {
|
|
"description": "Still a store member in that region"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/options": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the region options for a specific region.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getregionoptions",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionOptions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Sets the options for region.",
|
|
"operationId": "patch_foodsharing_restapi_regionrest_setregionoptions",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionOptionsPatch"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/options/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the user's permissions for setting the region options.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getregionoptionpermissions",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"maySetRegionOptionsReportButtons": {
|
|
"type": "boolean"
|
|
},
|
|
"maySetRegionOptionsRegionPickupRule": {
|
|
"type": "boolean"
|
|
},
|
|
"regionPickupRuleActiveStoreList": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommonLabel"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/public": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the public region data.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getpublicregiondata",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PublicRegionData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Unavailable for working groups"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Sets the public data for a region.",
|
|
"operationId": "patch_foodsharing_restapi_regionrest_setpublicregiondata",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PublicRegionPatch"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/children": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns a list of all subregions including working groups of a region.",
|
|
"description": "The result is empty if the region does not exist.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_listregionchildren",
|
|
"parameters": [
|
|
{
|
|
"name": "includeWorkingGroups",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RegionForTreeNavigation"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/users": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns a list of all members for a region.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_listmembers",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/UnitMember"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/users/{userId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Removes a member from a region or working group.",
|
|
"description": "If the user was not a member of the region/group, nothing happens.",
|
|
"operationId": "delete_foodsharing_restapi_regionrest_removemember",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"409": {
|
|
"description": "User is still a store member in that region"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/users/{userId}/admin": {
|
|
"put": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Sets an user as Admin / Ambassador of a region / workgroup.",
|
|
"operationId": "put_foodsharing_restapi_regionrest_setadminorambassador",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Removes a user as Admin / Ambassador of a region / workgroup.",
|
|
"operationId": "delete_foodsharing_restapi_regionrest_removeadminorambassador",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/users/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the permissions that this user has concerning administration of the members in the region.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getregionmemberpermissions",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"mayEditMembers": {
|
|
"type": "boolean"
|
|
},
|
|
"maySetAdminOrAmbassador": {
|
|
"type": "boolean"
|
|
},
|
|
"mayRemoveAdminOrAmbassador": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions": {
|
|
"post": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Adds a region using the given data.",
|
|
"operationId": "post_foodsharing_restapi_regionrest_addregion",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionForAdministration"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"regionId": {
|
|
"description": "The id of the newly created region",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid data"
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/menu": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns the region menu data.",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getregionmenu",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The data required to display the region or working group menu.",
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/redirects": {
|
|
"get": {
|
|
"tags": [
|
|
"region"
|
|
],
|
|
"summary": "Returns all ancestors of a region until the first accessible one (region or group with membership)",
|
|
"operationId": "get_foodsharing_restapi_regionrest_getinaccessibleregionredirects",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegionWithMembership"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Login required"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Requested region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/reports": {
|
|
"get": {
|
|
"tags": [
|
|
"report"
|
|
],
|
|
"summary": "List reports for a region",
|
|
"operationId": "get_foodsharing_restapi_reportrest_listreportsforregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ReportForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/reports": {
|
|
"get": {
|
|
"tags": [
|
|
"report"
|
|
],
|
|
"summary": "List reports for a user",
|
|
"operationId": "get_foodsharing_restapi_reportrest_listreportsforuser",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ReportForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"report"
|
|
],
|
|
"summary": "Add a new report",
|
|
"operationId": "post_foodsharing_restapi_reportrest_addreport",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddReportData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/reports/{reportId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"report"
|
|
],
|
|
"summary": "Delete a report",
|
|
"operationId": "delete_foodsharing_restapi_reportrest_deletereport",
|
|
"parameters": [
|
|
{
|
|
"name": "reportId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources/categories": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Get the list of resource categories.",
|
|
"operationId": "get_foodsharing_restapi_resourcerest_getresourcecategories",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of resource categories.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommonLabel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/resources": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Get the list of resources available in a given region.",
|
|
"operationId": "get_foodsharing_restapi_resourcerest_getresourcesforregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of resources available in the given region.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceForDisplay"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources/own": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Get the list of resources of the logged in user",
|
|
"operationId": "get_foodsharing_restapi_resourcerest_getownresources",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"description": "The list of resources provided by the logged in user.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ResourceForDisplay"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources": {
|
|
"post": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Add a new resource for the logged in user.",
|
|
"operationId": "post_foodsharing_restapi_resourcerest_addownresource",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResourceForDisplay"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources/commons": {
|
|
"post": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Add a new commons resource for the given region.",
|
|
"operationId": "post_foodsharing_restapi_resourcerest_addcommonsresource",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResourceForDisplay"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources/{resourceId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Delete a resource.",
|
|
"operationId": "delete_foodsharing_restapi_resourcerest_deleteresource",
|
|
"parameters": [
|
|
{
|
|
"name": "resourceId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "The resource does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Edit a resource.",
|
|
"operationId": "patch_foodsharing_restapi_resourcerest_editresource",
|
|
"parameters": [
|
|
{
|
|
"name": "resourceId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Resource"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResourceForDisplay"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The resource does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/resources/{resourceId}/favorite": {
|
|
"post": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Favorite a resource.",
|
|
"operationId": "post_foodsharing_restapi_resourcerest_favoriteresource",
|
|
"parameters": [
|
|
{
|
|
"name": "resourceId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Unfavorite a resource.",
|
|
"operationId": "delete_foodsharing_restapi_resourcerest_unfavoriteresource",
|
|
"parameters": [
|
|
{
|
|
"name": "resourceId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/resources/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"resource"
|
|
],
|
|
"summary": "Get the current users permissions related to resources in a given region.",
|
|
"operationId": "get_foodsharing_restapi_resourcerest_getresourcepermissionsforregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"mayEditCommonsResourcesInRegion": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/search/users": {
|
|
"get": {
|
|
"tags": [
|
|
"search"
|
|
],
|
|
"summary": "Search for users",
|
|
"operationId": "get_foodsharing_restapi_searchrest_listuserresults",
|
|
"parameters": [
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "/^.+$/"
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/SimplifiedUserSearchResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to search in that region"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/search/all": {
|
|
"get": {
|
|
"tags": [
|
|
"search"
|
|
],
|
|
"summary": "General search endpoint",
|
|
"description": "Returns all kinds of searchable entry types",
|
|
"operationId": "get_foodsharing_restapi_searchrest_search",
|
|
"parameters": [
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "/^.+$/"
|
|
}
|
|
},
|
|
{
|
|
"name": "global",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MixedSearchResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/search/index": {
|
|
"get": {
|
|
"tags": [
|
|
"search"
|
|
],
|
|
"summary": "Search index for quick local search of likely searched entities",
|
|
"operationId": "get_foodsharing_restapi_searchrest_searchindex",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MixedSearchResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/search/regions/{regionId}/forum": {
|
|
"get": {
|
|
"tags": [
|
|
"search"
|
|
],
|
|
"summary": "Search threads in a specific forum",
|
|
"operationId": "get_foodsharing_restapi_searchrest_searchforumtitle",
|
|
"parameters": [
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "/^.+$/"
|
|
}
|
|
},
|
|
{
|
|
"name": "searchBody",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "subforumId",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ThreadSearchResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to search in that forum"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/sleep-mode": {
|
|
"patch": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Sets the current users sleep mode.",
|
|
"description": "For the temporary mode, both \"from\" and \"to\" need to be given. Both are assumed to be in the format \"d.m.Y\". For other modes the two fields will be ignored. Optionally, a message can be added.",
|
|
"operationId": "patch_foodsharing_restapi_settingsrest_setsleepstatus",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SleepStatusRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid mode or parameters"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/email": {
|
|
"patch": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Requests that the users login email address will be changed.",
|
|
"description": "This does not permanently change the address yet, but sends\n out the confirmation email. Every user can change their own email address.\n Changing someone elses address requires certain permissions.",
|
|
"operationId": "patch_foodsharing_restapi_settingsrest_requestemailchange",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailChangeRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Empty or invalid parameters"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted or wrong password"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/password": {
|
|
"patch": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Changes the user's password.",
|
|
"operationId": "patch_foodsharing_restapi_settingsrest_requestpasswordchange",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PasswordChangeRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "The new password is too short"
|
|
},
|
|
"403": {
|
|
"description": "The old password or second factor are wrong"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/2fa": {
|
|
"post": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Request 2FA secret, backup codes and QR code.",
|
|
"operationId": "post_foodsharing_restapi_settingsrest_generatetwofa",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TOTPProposal"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/2fa": {
|
|
"patch": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Edit 2FA settings.",
|
|
"operationId": "patch_foodsharing_restapi_settingsrest_toggletwofa",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TwoFARequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid parameters"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/profile-settings": {
|
|
"get": {
|
|
"tags": [
|
|
"settings"
|
|
],
|
|
"summary": "Get the user profile information.",
|
|
"operationId": "get_foodsharing_restapi_settingsrest_getuserprofilesettings",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ReadableProfileSettings"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request."
|
|
},
|
|
"404": {
|
|
"description": "User not found."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/statistics/gender": {
|
|
"get": {
|
|
"tags": [
|
|
"statistics"
|
|
],
|
|
"summary": "Returns the gender distribution from a region.",
|
|
"description": "If home region is set only the home region of foodsavers from this regionId are considered.",
|
|
"operationId": "get_foodsharing_restapi_statisticsrest_listregiongenderstatistic",
|
|
"parameters": [
|
|
{
|
|
"name": "onlyHomeRegion",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StatisticsGender"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/statistics/age-band": {
|
|
"get": {
|
|
"tags": [
|
|
"statistics"
|
|
],
|
|
"summary": "Returns the age band distribution from a region.",
|
|
"description": "If home region is set only the home region of foodsavers from this regionId are considered.",
|
|
"operationId": "get_foodsharing_restapi_statisticsrest_listregionagebandstatistic",
|
|
"parameters": [
|
|
{
|
|
"name": "onlyHomeRegion",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StatisticsAgeBand"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Region does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/statistics/pickups": {
|
|
"get": {
|
|
"tags": [
|
|
"statistics"
|
|
],
|
|
"summary": "Returns the age band distribution from a region.",
|
|
"operationId": "get_foodsharing_restapi_statisticsrest_listregionpickupsstatistics",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "Foodsharing\\Modules\\Region\\DTO\\RegionPickupStatistics"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Region does not exist"
|
|
},
|
|
"403": {
|
|
"description": "Pick-up statistics are currently not available for countries"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/statistics": {
|
|
"get": {
|
|
"tags": [
|
|
"statistics"
|
|
],
|
|
"summary": "Returns the age band distribution from a region.",
|
|
"operationId": "get_foodsharing_restapi_statisticsrest_listoverallstatistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StatisticModel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/chains": {
|
|
"get": {
|
|
"tags": [
|
|
"chain"
|
|
],
|
|
"summary": "Returns the list of store chains",
|
|
"operationId": "get_foodsharing_restapi_storechainrest_getstorechains",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreChainForChainList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"chain"
|
|
],
|
|
"summary": "Creates a new store",
|
|
"description": "The name must not be empty. All other parameters are optional. Returns the created store chain.",
|
|
"operationId": "post_foodsharing_restapi_storechainrest_createchain",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreChainData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/chains/{chainId}": {
|
|
"get": {
|
|
"tags": [
|
|
"chain"
|
|
],
|
|
"summary": "Returns a specific store chain",
|
|
"operationId": "get_foodsharing_restapi_storechainrest_getstorechain",
|
|
"parameters": [
|
|
{
|
|
"name": "chainId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreChainForChainList"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Store chain does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"chain"
|
|
],
|
|
"summary": "Updates a store chain",
|
|
"operationId": "patch_foodsharing_restapi_storechainrest_updatechain",
|
|
"parameters": [
|
|
{
|
|
"name": "chainId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreChainData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "Store chain does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/chains/{chainId}/stores": {
|
|
"get": {
|
|
"tags": [
|
|
"chain"
|
|
],
|
|
"summary": "Returns the list of stores that are part of a given chain",
|
|
"operationId": "get_foodsharing_restapi_storechainrest_getchainstores",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "chainId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/MinimalStoreIdentifier"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Missing permissions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/meta-data": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get general store metadata",
|
|
"operationId": "get_foodsharing_restapi_storerest_getcommonstoremetadata",
|
|
"parameters": [
|
|
{
|
|
"name": "version",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "hasChains",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CommonStoreMetadata"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"304": {
|
|
"description": "User has the current version"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/stores": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the stores where a user is member of",
|
|
"operationId": "get_foodsharing_restapi_storerest_getstoresofuser",
|
|
"parameters": [
|
|
{
|
|
"name": "format",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "excludeInactive",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"oneOf": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreTeamMembershipWithPickupStatus"
|
|
}
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreListInformation"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to see store list"
|
|
},
|
|
"404": {
|
|
"description": "User not found"
|
|
},
|
|
"400": {
|
|
"description": "Cannot filter for inactive stores when format is location"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/stores": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the stores of a region",
|
|
"operationId": "get_foodsharing_restapi_storerest_getstoresofregion",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreListInformation"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to see store list"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Create a new store",
|
|
"description": "Chat channels for the team and standby team members will\n be created alongside the store. The calling user will be added as the only member and be made store manager.\n All members of the region are notified via bell about the new store.",
|
|
"operationId": "post_foodsharing_restapi_storerest_addstore",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateStoreModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the newly created store",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to create store for this region"
|
|
},
|
|
"404": {
|
|
"description": "Region not found"
|
|
},
|
|
"400": {
|
|
"description": "Invalid region type for stores"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/details": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get detailed information about a store",
|
|
"operationId": "get_foodsharing_restapi_storerest_getstoreinformation",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Store"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Edit store details",
|
|
"operationId": "patch_foodsharing_restapi_storerest_editstore",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PatchStore"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "No permission to edit this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"400": {
|
|
"description": "Invalid input or no settings to change"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/members": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the members of a store team",
|
|
"operationId": "get_foodsharing_restapi_storerest_getstoremembers",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreStandbyTeamMember"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the permissions of the logged in user for a store",
|
|
"operationId": "get_foodsharing_restapi_storerest_getstorepermissions",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StorePermissions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "No permission to access this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/requests": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the requests to a store team",
|
|
"operationId": "get_foodsharing_restapi_storerest_liststoreteammembershiprequests",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreApplication"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Request to join a store team",
|
|
"operationId": "post_foodsharing_restapi_storerest_requeststoreteammembership",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreApplicationMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "No permission to join this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"422": {
|
|
"description": "User has already applied or is already a member"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/requests/{userId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Decline a request to join a store team",
|
|
"operationId": "delete_foodsharing_restapi_storerest_declinestorerequest",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted for this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found or request does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Accept a request to join a store team",
|
|
"operationId": "patch_foodsharing_restapi_storerest_acceptstorerequest",
|
|
"parameters": [
|
|
{
|
|
"name": "moveToStandby",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted for this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found or request does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/invitations": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get the invitations to a store team",
|
|
"operationId": "get_foodsharing_restapi_storerest_liststoreteaminvitations",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreInvitation"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/invitations/{userId}": {
|
|
"post": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Invite a user to a store team",
|
|
"operationId": "post_foodsharing_restapi_storerest_invitestoremember",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StoreInvitation"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted for this store"
|
|
},
|
|
"404": {
|
|
"description": "Store or user not found"
|
|
},
|
|
"422": {
|
|
"description": "User cannot be invited to this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Withdraw an invitation to a store team",
|
|
"operationId": "delete_foodsharing_restapi_storerest_withdrawstoreteaminvitation",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/invitations/current": {
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"operationId": "delete_foodsharing_restapi_storerest_declinestoreteaminvitation",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Accept an invitation to a store team",
|
|
"operationId": "patch_foodsharing_restapi_storerest_acceptstoreteaminvitation",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to accept the invitation"
|
|
},
|
|
"404": {
|
|
"description": "Not invited to this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/members/{userId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Remove a user from a store team",
|
|
"operationId": "delete_foodsharing_restapi_storerest_removestoremember",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to manage this store team"
|
|
},
|
|
"404": {
|
|
"description": "Store does not exist or user is not a member of it"
|
|
},
|
|
"422": {
|
|
"description": "User cannot currently leave this team"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/managers/{userId}": {
|
|
"post": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Make a user a store manager",
|
|
"operationId": "post_foodsharing_restapi_storerest_addstoremanager",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to manage this store team"
|
|
},
|
|
"404": {
|
|
"description": "Store does not exist"
|
|
},
|
|
"422": {
|
|
"description": "User cannot become manager of this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Demote a user from store manager to regular store team member",
|
|
"operationId": "delete_foodsharing_restapi_storerest_removestoremanager",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to manage this store team"
|
|
},
|
|
"404": {
|
|
"description": "Store does not exist or user is not a member of it"
|
|
},
|
|
"422": {
|
|
"description": "User cannot lose responsibility for this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/members/{userId}/standby": {
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Move a store team member to the regular team",
|
|
"operationId": "delete_foodsharing_restapi_storerest_moveusertoregularteam",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to manage this store team"
|
|
},
|
|
"404": {
|
|
"description": "Store not found or user is not a member of this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Move a store team member to the standby team",
|
|
"operationId": "patch_foodsharing_restapi_storerest_movemembertostandbyteam",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to manage this store team"
|
|
},
|
|
"404": {
|
|
"description": "Store not found or user is not a member of this store"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}/log/{fromDate}/{toDate}/actions/{storeLogActionIds}": {
|
|
"get": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Get store log entries for the given time range and action types",
|
|
"operationId": "get_foodsharing_restapi_storerest_showstoreloghistory",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "fromDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
},
|
|
{
|
|
"name": "toDate",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9]{4}-((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01])|(0[469]|11)-(0[1-9]|[12][0-9]|30)|(02)-(0[1-9]|[12][0-9]))T(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[1-5][0-9]):(0[0-9]|[1-5][0-9])\\.[0-9]{3,6}Z"
|
|
}
|
|
},
|
|
{
|
|
"name": "storeLogActionIds",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\d+(,\\d+)*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreLogEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to access store log"
|
|
},
|
|
"400": {
|
|
"description": "Cannot access store log more than 6 months back"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/stores/{storeId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"stores"
|
|
],
|
|
"summary": "Delete a store",
|
|
"description": "Only allowed for stores that never had any pickup.",
|
|
"operationId": "delete_foodsharing_restapi_storerest_deletestore",
|
|
"parameters": [
|
|
{
|
|
"name": "storeId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to delete this store"
|
|
},
|
|
"404": {
|
|
"description": "Store not found"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/support/ticket": {
|
|
"post": {
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Creates a new support ticket",
|
|
"operationId": "post_foodsharing_restapi_supportpagerest_createticket",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Successful"
|
|
},
|
|
"503": {
|
|
"description": "Support API is not available"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/uploads/{uuid}": {
|
|
"get": {
|
|
"tags": [
|
|
"upload"
|
|
],
|
|
"summary": "Returns the image with the requested UUID. Width and height must both be given or can be set both to 0 to indicate no resizing.",
|
|
"operationId": "get_foodsharing_restapi_uploadsrest_getimage",
|
|
"parameters": [
|
|
{
|
|
"name": "w",
|
|
"in": "query",
|
|
"description": "Max image width",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "h",
|
|
"in": "query",
|
|
"description": "Max image height",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
},
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"description": "Image quality (between 1 and 100)",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "uuid",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Tried resizing for a non-image file"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "UUID does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/uploads/{uuid}/metadata": {
|
|
"get": {
|
|
"tags": [
|
|
"upload"
|
|
],
|
|
"operationId": "get_foodsharing_restapi_uploadsrest_getimagemetadata",
|
|
"parameters": [
|
|
{
|
|
"name": "uuid",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[13-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Tried resizing for a non-image file"
|
|
},
|
|
"404": {
|
|
"description": "UUID does not exist"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/uploads": {
|
|
"post": {
|
|
"tags": [
|
|
"upload"
|
|
],
|
|
"operationId": "post_foodsharing_restapi_uploadsrest_uploadfile",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/FileUpload"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid data provided"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "MIME type not allowed"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}": {
|
|
"get": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Lists basic information for a user",
|
|
"operationId": "get_foodsharing_restapi_userrest_user",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"404": {
|
|
"description": "User with that id not found"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Deletes a user account",
|
|
"operationId": "delete_foodsharing_restapi_userrest_deleteuser",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeleteProfileRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid input data"
|
|
},
|
|
"401": {
|
|
"description": "Password required when deleting own account"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/details": {
|
|
"get": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Lists detailed information for the current user",
|
|
"operationId": "get_foodsharing_restapi_userrest_currentuserdetails",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProfileDetails"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/login": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Logs in a user with email and password",
|
|
"operationId": "post_foodsharing_restapi_userrest_login",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LoginRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Invalid email or password"
|
|
},
|
|
"403": {
|
|
"description": "2FA code required"
|
|
},
|
|
"409": {
|
|
"description": "The account was not activated yet"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/logout": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Logs out the current user",
|
|
"operationId": "post_foodsharing_restapi_userrest_logout",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/registration/email-checker": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Tests if an email address is valid for registration",
|
|
"operationId": "post_foodsharing_restapi_userrest_testregisteremail",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isValid": {
|
|
"description": "Whether the email is valid for registration",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Email is malformed or from a blacklisted domain"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Registers a new user",
|
|
"operationId": "post_foodsharing_restapi_userrest_registeruser",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/RegisterData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid input data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/photo": {
|
|
"put": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Sets a previously uploaded picture as the user's profile photo",
|
|
"operationId": "put_foodsharing_restapi_userrest_setprofilepicture",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UUID"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "File does not exist or is not a valid upload"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/email-bounce": {
|
|
"delete": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Removes the user from the email bounce list",
|
|
"operationId": "delete_foodsharing_restapi_userrest_removefrombouncelist",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userIds}/names": {
|
|
"get": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Gets the names of multiple users by their IDs",
|
|
"operationId": "get_foodsharing_restapi_userrest_getusernames",
|
|
"parameters": [
|
|
{
|
|
"name": "userIds",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\d+(,\\d+)*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/CommonLabel"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/profile": {
|
|
"patch": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Updates the user profile information.",
|
|
"operationId": "patch_foodsharing_restapi_userrest_patchuserprofile",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9]\\d*|current"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditableProfileDTO"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditableProfileDTO"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
},
|
|
"400": {
|
|
"description": "Bad Request."
|
|
},
|
|
"404": {
|
|
"description": "User not found."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/password-reset": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Request a password reset by email",
|
|
"operationId": "post_foodsharing_restapi_userrest_requestpasswordreset",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAddress"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid email address"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/password-reset/confirmation": {
|
|
"post": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Reset password using a reset token.",
|
|
"operationId": "post_foodsharing_restapi_userrest_resetpassword",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PasswordResetRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid or expired reset token, invalid password or invalid TOTP code"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/password-reset/validation": {
|
|
"get": {
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Validate a password reset token.",
|
|
"operationId": "get_foodsharing_restapi_userrest_validateresettoken",
|
|
"parameters": [
|
|
{
|
|
"name": "token",
|
|
"in": "query",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"isValid": {
|
|
"description": "Whether the reset token is valid",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/verifications": {
|
|
"get": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Returns a users (de-)verification history",
|
|
"operationId": "get_foodsharing_restapi_verificationrest_getverificationhistory",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/VerificationHistoryEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to view this users history."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Changes verification status of one user to verified",
|
|
"operationId": "post_foodsharing_restapi_verificationrest_verifyuser",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OptionalMessage"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to verify this user."
|
|
},
|
|
"404": {
|
|
"description": "User not found."
|
|
},
|
|
"422": {
|
|
"description": "Already verified."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Changes verification status of one user to deverified",
|
|
"operationId": "delete_foodsharing_restapi_verificationrest_deverifyuser",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success."
|
|
},
|
|
"400": {
|
|
"description": "Has future pickups."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to deverify this user."
|
|
},
|
|
"404": {
|
|
"description": "User not found."
|
|
},
|
|
"422": {
|
|
"description": "Already deverified."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/{userId}/pass-history": {
|
|
"get": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Returns a users pass history",
|
|
"operationId": "get_foodsharing_restapi_verificationrest_getpasshistory",
|
|
"parameters": [
|
|
{
|
|
"name": "userId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PassHistoryEntry"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to view this users history."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/passport": {
|
|
"get": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Returns the current users foodsaver passport",
|
|
"operationId": "get_foodsharing_restapi_verificationrest_createasuser",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/pdf": {
|
|
"schema": {
|
|
"description": "Passport as PDF-File",
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create own passport."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/regions/{regionId}/passports": {
|
|
"post": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Create foodsaver passports for given users in region",
|
|
"operationId": "post_foodsharing_restapi_verificationrest_createasambassador",
|
|
"parameters": [
|
|
{
|
|
"name": "regionId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateRegionPassportModel"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/pdf": {
|
|
"schema": {
|
|
"description": "Passport as PDF-File",
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"204": {
|
|
"description": "Success, no pdf generated"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create passport as ambassador in region."
|
|
},
|
|
"404": {
|
|
"description": "User not found."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/wallets/{walletType}": {
|
|
"get": {
|
|
"tags": [
|
|
"verification"
|
|
],
|
|
"summary": "Returns the wallet URL for the current user",
|
|
"operationId": "get_foodsharing_restapi_verificationrest_getwallet",
|
|
"parameters": [
|
|
{
|
|
"name": "walletType",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "google|apple",
|
|
"enum": [
|
|
"google",
|
|
"apple"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"example": "https://pay.google.com/gp/v/save/eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ..."
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create own passport."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/polls/{pollId}": {
|
|
"get": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Returns the details of a poll.",
|
|
"operationId": "get_foodsharing_restapi_votingrest_getpoll",
|
|
"parameters": [
|
|
{
|
|
"name": "pollId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Poll"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permission to see the poll"
|
|
},
|
|
"404": {
|
|
"description": "Poll does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Deletes a poll.",
|
|
"operationId": "delete_foodsharing_restapi_votingrest_deletepoll",
|
|
"parameters": [
|
|
{
|
|
"name": "pollId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to delete that poll."
|
|
},
|
|
"404": {
|
|
"description": "Poll does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Updates an existing poll.",
|
|
"description": "This can change a poll's title, description, and options. Updating is only possible before the voting phase starts",
|
|
"operationId": "patch_foodsharing_restapi_votingrest_editpoll",
|
|
"parameters": [
|
|
{
|
|
"name": "pollId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditPollRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Poll"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid parameters"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to edit that poll"
|
|
},
|
|
"404": {
|
|
"description": "Poll does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}/polls": {
|
|
"get": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Lists all polls in a region or working group.",
|
|
"operationId": "get_foodsharing_restapi_votingrest_listpolls",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PollForListView"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permission to list polls in that group."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/users/current/polls": {
|
|
"get": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Lists all polls the user is invited to.",
|
|
"operationId": "get_foodsharing_restapi_votingrest_listcurrentpolls",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Poll"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/polls/{pollId}/vote": {
|
|
"post": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Vote in a poll.",
|
|
"description": "The request body needs to be a list mapping option indices to the vote values. Depending on the voting type, not all options might need to be included.",
|
|
"operationId": "post_foodsharing_restapi_votingrest_vote",
|
|
"parameters": [
|
|
{
|
|
"name": "pollId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/VoteRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"400": {
|
|
"description": "Invalid options."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to vote in that polls."
|
|
},
|
|
"404": {
|
|
"description": "Poll does not exist."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/polls": {
|
|
"post": {
|
|
"tags": [
|
|
"polls"
|
|
],
|
|
"summary": "Creates a new poll.",
|
|
"description": "The poll and all its options will be assigned valid IDs and option indices by the server. Options must be passed as an array of strings for the options' texts. The order of the options will be kept.",
|
|
"operationId": "post_foodsharing_restapi_votingrest_createpoll",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreatePollRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Poll"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid parameters."
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions to create a poll in that region."
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/walls/{target}/{targetId}": {
|
|
"get": {
|
|
"tags": [
|
|
"wall"
|
|
],
|
|
"summary": "Get posts of a wall.",
|
|
"operationId": "get_foodsharing_restapi_wallrest_getposts",
|
|
"parameters": [
|
|
{
|
|
"name": "limit",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "integer",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"posts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WallPost"
|
|
}
|
|
},
|
|
"mayPost": {
|
|
"description": "Whether the user is permitted to post to this wall",
|
|
"type": "boolean"
|
|
},
|
|
"mayDelete": {
|
|
"description": "whether the user is permitted to delete all posts on this wall",
|
|
"type": "boolean"
|
|
},
|
|
"mayReact": {
|
|
"description": "whether the user is permitted to react to posts on this wall",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to read this wall"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"wall"
|
|
],
|
|
"summary": "Add a post to a wall.",
|
|
"operationId": "post_foodsharing_restapi_wallrest_addpost",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WallPost"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WallPost"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to post to this wall or to use the upload UUIDs"
|
|
},
|
|
"400": {
|
|
"description": "Invalid post data"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/walls/{target}/{targetId}/posts/{postId}": {
|
|
"delete": {
|
|
"tags": [
|
|
"wall"
|
|
],
|
|
"summary": "Delete a post from a wall.",
|
|
"operationId": "delete_foodsharing_restapi_wallrest_deletepost",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to delete this post"
|
|
},
|
|
"404": {
|
|
"description": "The post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/walls/{target}/{targetId}/posts/{postId}/reactions/{key}": {
|
|
"post": {
|
|
"tags": [
|
|
"wall"
|
|
],
|
|
"summary": "Adds a reactions to a post.",
|
|
"description": "The reaction type key can be any emoji name supported by the frontend.",
|
|
"operationId": "post_foodsharing_restapi_wallrest_addreaction",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "key",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"403": {
|
|
"description": "Not permitted to react on this post"
|
|
},
|
|
"404": {
|
|
"description": "The post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/walls/{target}/{targetId}/posts/{postId}/reactions/{reactionKey}": {
|
|
"delete": {
|
|
"tags": [
|
|
"wall"
|
|
],
|
|
"summary": "Removes one of your a reactions from a post.",
|
|
"description": "The reaction type key can be any emoji name supported by the frontend.",
|
|
"operationId": "delete_foodsharing_restapi_wallrest_deletereaction",
|
|
"parameters": [
|
|
{
|
|
"name": "target",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
},
|
|
{
|
|
"name": "targetId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "postId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "reactionKey",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "\\w+"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"404": {
|
|
"description": "The post does not exist"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}/members/{memberId}": {
|
|
"post": {
|
|
"tags": [
|
|
"groups"
|
|
],
|
|
"summary": "Adds a member to a working group.",
|
|
"description": "If the user is already a member of the group, nothing happens.\n This endpoint can be used for adding someone else to a working group if you\n are allowed to edit that group or for joining a group if you are allowed to do so.",
|
|
"operationId": "post_foodsharing_restapi_workinggrouprest_addmember",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
},
|
|
{
|
|
"name": "memberId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"401": {
|
|
"description": "Not logged in"
|
|
},
|
|
"403": {
|
|
"description": "Insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Group not found"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}": {
|
|
"patch": {
|
|
"tags": [
|
|
"groups"
|
|
],
|
|
"operationId": "patch_foodsharing_restapi_workinggrouprest_editworkinggroup",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"pattern": "[1-9][0-9]*"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EditWorkGroupData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/groups/{groupId}/mail": {
|
|
"post": {
|
|
"tags": [
|
|
"groups"
|
|
],
|
|
"summary": "Sends a message to a group via email, including a custom message from the contact form.",
|
|
"operationId": "post_foodsharing_restapi_workinggrouprest_sendmailfromcontactform",
|
|
"parameters": [
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SendMailData"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success, send will happen asynchroneously"
|
|
},
|
|
"404": {
|
|
"description": "Group not found or group has no email address"
|
|
},
|
|
"400": {
|
|
"description": "Malformed data"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/debug/server": {
|
|
"get": {
|
|
"summary": "Simple debug API returning server time and HTTPS flag.",
|
|
"operationId": "get_api_debug_server",
|
|
"responses": {
|
|
"default": {
|
|
"description": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"Achievement": {
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Food Hygiene Certificate"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Awarded for completing a food hygiene course"
|
|
},
|
|
"icon": {
|
|
"type": "string",
|
|
"example": "fas fa-hands-wash"
|
|
},
|
|
"validityInDaysAfterAssignment": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true,
|
|
"example": "356"
|
|
},
|
|
"visibilityType": {
|
|
"default": 3,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/VisibilityType"
|
|
}
|
|
]
|
|
},
|
|
"duplicateMode": {
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/DuplicateMode"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AwardedAchievementDetails": {
|
|
"properties": {
|
|
"validUntil": {
|
|
"description": "Date until which this is valid, or 'infinite'",
|
|
"type": "string",
|
|
"example": "infinite"
|
|
},
|
|
"notice": {
|
|
"description": "Optional notice associated with the awarded achievement",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityFilterModel": {
|
|
"description": "All activities that are to be hidden in the overview",
|
|
"properties": {
|
|
"excluded": {
|
|
"title": "List of all activities not to be displayed.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityFilterItem"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BananaMessage": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"minLength": 100
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Basket": {
|
|
"required": [
|
|
"description",
|
|
"pictures",
|
|
"lat",
|
|
"lon",
|
|
"weightInGrams"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"pictures": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"contactTypes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"default": [],
|
|
"minItems": 1
|
|
},
|
|
"mobile": {
|
|
"type": "string",
|
|
"pattern": ".*\\+?[0-9\\-/ ]+.*"
|
|
},
|
|
"telephone": {
|
|
"type": "string",
|
|
"pattern": ".*\\+?[0-9\\-/ ]+.*"
|
|
},
|
|
"lat": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"lon": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"lifeTimeInDays": {
|
|
"type": "integer",
|
|
"maximum": 21,
|
|
"minimum": 1
|
|
},
|
|
"weightInGrams": {
|
|
"type": "integer",
|
|
"maximum": 100000,
|
|
"minimum": 0
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"creator": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"created": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updated": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"until": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"requestCount": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"OptionalMessage": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"IDList": {
|
|
"required": [
|
|
"ids"
|
|
],
|
|
"properties": {
|
|
"ids": {
|
|
"description": "A list of IDs",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BlogPostData": {
|
|
"description": "Contains data for adding or editing a blog post",
|
|
"properties": {
|
|
"id": {
|
|
"description": "Id of the blog post when editing an existing post. Can be null when adding a new post",
|
|
"type": "integer"
|
|
},
|
|
"regionId": {
|
|
"description": "Id of the region with which this post is associated.",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"description": "Title of the post",
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"minLength": 1
|
|
},
|
|
"teaser": {
|
|
"description": "Short teaser text that is shown in the list of blog posts",
|
|
"type": "string",
|
|
"maxLength": 500
|
|
},
|
|
"content": {
|
|
"description": "The full content of the post",
|
|
"type": "string",
|
|
"maxLength": 16777215
|
|
},
|
|
"picture": {
|
|
"description": "UUID of an uploaded picture. If null, the post will have no picture.",
|
|
"type": "string"
|
|
},
|
|
"isPublished": {
|
|
"description": "Whether the post is published and visible to the public",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CategoryWithType": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"subType": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ContentEntry": {
|
|
"required": [
|
|
"name",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "A unique name for the entry that is not shown on the website",
|
|
"type": "string",
|
|
"example": "news-from-it"
|
|
},
|
|
"title": {
|
|
"description": "Human readable title of the content entry",
|
|
"type": "string",
|
|
"example": "Aktuelle Fehler und St\u00f6rungen"
|
|
},
|
|
"body": {
|
|
"description": "The body of this content entry. This is usually HTML or markdown text.",
|
|
"type": "string",
|
|
"example": "Lorem ipsum"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"VerificationEmailRequest": {
|
|
"required": [
|
|
"address"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"description": "The email address to which the new verification email will be sent.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Event": {
|
|
"required": [
|
|
"regionId",
|
|
"name",
|
|
"startDate",
|
|
"endDate",
|
|
"description",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true,
|
|
"example": 1
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"example": 1
|
|
},
|
|
"regionName": {
|
|
"type": "string",
|
|
"example": "G\u00f6ttingen"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Event Name"
|
|
},
|
|
"startDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"example": "2024-05-31T12:45:00Z"
|
|
},
|
|
"endDate": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"example": "2024-05-31T15:00:00Z"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Event Description"
|
|
},
|
|
"type": {
|
|
"example": 1,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/EventType"
|
|
}
|
|
]
|
|
},
|
|
"address": {
|
|
"$ref": "#/components/schemas/Address"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"locationDetails": {
|
|
"type": "string"
|
|
},
|
|
"isPublic": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointForCreation": {
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"regionId": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Test-Fairteiler"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Test-Beschreibung"
|
|
},
|
|
"picture": {
|
|
"type": "string",
|
|
"example": "/api/uploads/12345678"
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"example": "Beispielstra\u00dfe 1"
|
|
},
|
|
"postalCode": {
|
|
"type": "string",
|
|
"example": "12345"
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"example": "Musterstadt"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointEditData": {
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"regionId": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Test-Fairteiler"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Test-Beschreibung"
|
|
},
|
|
"picture": {
|
|
"type": "string",
|
|
"example": "/api/uploads/12345678"
|
|
},
|
|
"address": {
|
|
"type": "string",
|
|
"example": "Beispielstra\u00dfe 1"
|
|
},
|
|
"postalCode": {
|
|
"type": "string",
|
|
"example": "12345"
|
|
},
|
|
"city": {
|
|
"type": "string",
|
|
"example": "Musterstadt"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"managerIds": {
|
|
"description": "IDs of all users who are responsible for the food share point",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "int",
|
|
"example": 1
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CreateThreadData": {
|
|
"description": "Data for creating a new forum thread",
|
|
"required": [
|
|
"body",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"body": {
|
|
"description": "Text of the post",
|
|
"type": "string",
|
|
"example": "Example content of a forum post"
|
|
},
|
|
"title": {
|
|
"description": "Title of the thread",
|
|
"type": "string",
|
|
"maxLength": 260,
|
|
"example": "Forum thread title"
|
|
},
|
|
"sendMail": {
|
|
"description": "If a notification e-mail should be sent to all members of the forum",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchThreadData": {
|
|
"description": "Data for modifying an existing forum thread",
|
|
"properties": {
|
|
"stickiness": {
|
|
"description": "If the thread should be pinned to the top of forum",
|
|
"type": "integer",
|
|
"maximum": 10,
|
|
"minimum": -1
|
|
},
|
|
"isActive": {
|
|
"description": "If the thread in a moderated forum should be activated",
|
|
"type": "boolean"
|
|
},
|
|
"status": {
|
|
"description": "If the thread is open or closed",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"description": "Title of the thread",
|
|
"type": "string",
|
|
"maxLength": 260,
|
|
"example": "Forum thread title"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CreatePostData": {
|
|
"description": "Data for creating a new forum post",
|
|
"required": [
|
|
"body"
|
|
],
|
|
"properties": {
|
|
"body": {
|
|
"description": "Text of the post",
|
|
"type": "string",
|
|
"example": "Example content of a forum post"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchPostData": {
|
|
"description": "Data for modifying an existing forum post",
|
|
"required": [
|
|
"reason"
|
|
],
|
|
"properties": {
|
|
"reason": {
|
|
"description": "Explanation why the post was hidden",
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"example": "Post contains spam"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchEmailModel": {
|
|
"properties": {
|
|
"folder": {
|
|
"title": "if not null, this specifies a folder to which the email shall be moved",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
"isRead": {
|
|
"title": "if not null, this sets the email's new read status",
|
|
"type": "boolean",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EmailSendData": {
|
|
"properties": {
|
|
"subject": {
|
|
"title": "Subject of the email. Can be empty but not null.",
|
|
"type": "string",
|
|
"default": "",
|
|
"maxLength": 65535,
|
|
"example": "Testbetreff"
|
|
},
|
|
"body": {
|
|
"title": "Body of this email.",
|
|
"type": "string",
|
|
"example": "Inhalt der Email"
|
|
},
|
|
"attachments": {
|
|
"title": "Optional list of previously uploaded files that will be used as attachments. Can be empty or null.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/EmailSendAttachment"
|
|
},
|
|
"maxItems": 10,
|
|
"nullable": true
|
|
},
|
|
"replyEmailId": {
|
|
"title": "Id of the email to which this email is an answer. The original email will be marked as answered.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ChatMessage": {
|
|
"required": [
|
|
"body"
|
|
],
|
|
"properties": {
|
|
"body": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EditChatData": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"GeneralNotificationSettings": {
|
|
"properties": {
|
|
"emailOnChatMessage": {
|
|
"description": "Whether emails are sent when the user recieves chat messages. Can be sent as null to keep the current value.",
|
|
"type": "boolean"
|
|
},
|
|
"emailOnNewsletter": {
|
|
"description": "Whether the user recieves the newsletter via email. Can be sent as null to keep the current value.",
|
|
"type": "boolean"
|
|
},
|
|
"emailOnStoreManagerPickupReminder": {
|
|
"description": "Whether the user is reminded on open pickup slots in their managed stores. Can be sent as null to keep the current value. Only set for store managers.",
|
|
"type": "boolean"
|
|
},
|
|
"bellOnMention": {
|
|
"description": "Whether bells are sent when the user is mentioned via @\u003Cid\u003E. Can be sent as null to keep the current value.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"NotificationSettingsPatch": {
|
|
"properties": [],
|
|
"type": "object"
|
|
},
|
|
"PasskeyRegistrationRequest": {
|
|
"required": [
|
|
"credential"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Optional name for the passkey",
|
|
"type": "string",
|
|
"example": "My YubiKey"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PasskeyAuthenticationRequest": {
|
|
"required": [
|
|
"credential"
|
|
],
|
|
"properties": [],
|
|
"type": "object"
|
|
},
|
|
"PasskeyRenameRequest": {
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "New name for the passkey",
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 1,
|
|
"example": "My iPhone"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PickupLeaveMessageOptions": {
|
|
"properties": {
|
|
"message": {
|
|
"title": "Message why a user is removed from pickup.",
|
|
"type": "string",
|
|
"default": "",
|
|
"maxLength": 3000
|
|
},
|
|
"sendKickMessage": {
|
|
"title": "Inform removed user about removin.",
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegularPickups": {
|
|
"properties": {
|
|
"regularPickups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RegularPickup"
|
|
},
|
|
"default": []
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EditPickupData": {
|
|
"required": [
|
|
"totalSlots"
|
|
],
|
|
"properties": {
|
|
"totalSlots": {
|
|
"description": "Maximum allowed users on this pickup.",
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"example": 4
|
|
},
|
|
"description": {
|
|
"description": "Description of this pickup.",
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"example": "Please come to the back door."
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SelectedAnswers": {
|
|
"properties": {
|
|
"ids": {
|
|
"description": "A list of answer IDs, or null if the question wasn't answered in time",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Quiz": {
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Foodsaver Quiz"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "This is the description of this quiz."
|
|
},
|
|
"isDescriptionHtmlEncoded": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"example": false
|
|
},
|
|
"maxFailurePointsToSucceed": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"example": 2
|
|
},
|
|
"questionCountTimed": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true,
|
|
"example": 10
|
|
},
|
|
"questionCountUntimed": {
|
|
"type": "integer",
|
|
"example": 20
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Question": {
|
|
"required": [
|
|
"text",
|
|
"durationInSeconds",
|
|
"wikilink"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"example": "You are at a store for a pickup. What should you do?"
|
|
},
|
|
"durationInSeconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true,
|
|
"example": 60
|
|
},
|
|
"wikilink": {
|
|
"type": "string",
|
|
"pattern": "https://[\\d\\w]+\\.[\\d\\w]+.*",
|
|
"example": "https://wiki.foodsharing.de/some_page"
|
|
},
|
|
"failurePoints": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"example": 2
|
|
},
|
|
"isMandatory": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"answers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Answer"
|
|
}
|
|
},
|
|
"commentCount": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Answer": {
|
|
"required": [
|
|
"text",
|
|
"explanation",
|
|
"answerRating"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"example": "Take every thing I see with me."
|
|
},
|
|
"explanation": {
|
|
"type": "string",
|
|
"example": "You should not do that. Obviously."
|
|
},
|
|
"answerRating": {
|
|
"example": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AnswerRating"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionOptionsPatch": {
|
|
"properties": {
|
|
"isReportButtonEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isMediationButtonEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isRegionPickupRuleActive": {
|
|
"type": "boolean"
|
|
},
|
|
"regionPickupRuleTimespanDays": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"regionPickupRuleLimitNumber": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"regionPickupRuleLimitDayNumber": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"regionPickupRuleInactiveHours": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"selectedReportReasonOptions": {
|
|
"type": "integer",
|
|
"maximum": 2,
|
|
"minimum": 1
|
|
},
|
|
"isReportReasonOtherEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isAddressChangeNotificationEnabled": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PublicRegionPatch": {
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"showPin": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionForAdministration": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Region identifier",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of region.",
|
|
"type": "string",
|
|
"default": "",
|
|
"example": "G\u00f6ttingen"
|
|
},
|
|
"type": {
|
|
"description": "Type of the region",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"example": 7
|
|
},
|
|
"adminIds": {
|
|
"description": "User identifiers of the regions admins / ambassadors",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "int",
|
|
"example": 1
|
|
},
|
|
"default": []
|
|
},
|
|
"parentId": {
|
|
"description": "Region identifier of the parent region",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"example": 1
|
|
},
|
|
"masterId": {
|
|
"description": "Region identifier of the master region",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"example": 1
|
|
},
|
|
"mailbox": {
|
|
"description": "Mailbox name without @foodsharing.network ending",
|
|
"type": "string",
|
|
"default": "",
|
|
"pattern": "[\\w.\\-_]+",
|
|
"example": "goettingen"
|
|
},
|
|
"emailName": {
|
|
"description": "Email sender name",
|
|
"type": "string",
|
|
"default": "",
|
|
"example": "foodsharing G\u00f6ttingen"
|
|
},
|
|
"workgroupFunction": {
|
|
"description": "Identifier of the GOALS working group function",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"example": 4
|
|
},
|
|
"allowHidingInForum": {
|
|
"description": "Whether moderators of the region are allowed to delete forum posts",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"example": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AddReportData": {
|
|
"required": [
|
|
"reason",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"reason": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ReportReason"
|
|
}
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"storeId": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Resource": {
|
|
"required": [
|
|
"name",
|
|
"images"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 35,
|
|
"example": "Programming"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Proficient in PHP and Vue"
|
|
},
|
|
"isPrivate": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"openness": {
|
|
"type": "integer",
|
|
"maximum": 5,
|
|
"minimum": 1,
|
|
"example": 3
|
|
},
|
|
"images": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SleepStatusRequest": {
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"properties": {
|
|
"mode": {
|
|
"type": "integer"
|
|
},
|
|
"from": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"to": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"maxLength": 5000
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EmailChangeRequest": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PasswordChangeRequest": {
|
|
"properties": {
|
|
"oldPassword": {
|
|
"type": "string"
|
|
},
|
|
"newPassword": {
|
|
"type": "string"
|
|
},
|
|
"totpCode": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TwoFARequest": {
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"enable": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreChainData": {
|
|
"required": [
|
|
"name",
|
|
"status",
|
|
"headquartersZip",
|
|
"headquartersCity",
|
|
"headquartersCountry",
|
|
"allowPress",
|
|
"forumThread"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"title": "Name of the chain.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 120,
|
|
"minLength": 1
|
|
},
|
|
"status": {
|
|
"title": "Indicates the cooperation status of this chain.",
|
|
"description": "- '0' - Not Cooperating\n- '1' - Waiting, i.e. in negotiation\n- '2' - Cooperating.",
|
|
"type": "integer",
|
|
"maximum": 2,
|
|
"minimum": 0
|
|
},
|
|
"headquartersZip": {
|
|
"title": "ZIP code of the chains headquater.",
|
|
"type": "string",
|
|
"maxLength": 5,
|
|
"minLength": 1
|
|
},
|
|
"headquartersCity": {
|
|
"title": "City of the chains headquater.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 50,
|
|
"minLength": 1
|
|
},
|
|
"headquartersCountry": {
|
|
"title": "Country of the chains headquater.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"allowPress": {
|
|
"title": "Whether the chain can be referred to in press releases.",
|
|
"type": "boolean"
|
|
},
|
|
"forumThread": {
|
|
"title": "Identifier of a forum thread related to this chain.",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"notes": {
|
|
"title": "Miscellaneous notes.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"commonStoreInformation": {
|
|
"title": "Information about the chain to be displayed on every related stores page.",
|
|
"type": "string",
|
|
"maxLength": 16777215
|
|
},
|
|
"kams": {
|
|
"title": "Identifiers of key account managers.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"estimatedStoreCount": {
|
|
"title": "Count of estimated stores.",
|
|
"description": "Only visible to members of AG store chain",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CreateStoreModel": {
|
|
"required": [
|
|
"store"
|
|
],
|
|
"properties": {
|
|
"store": {
|
|
"title": "Information about the new store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CreateStoreInformationModel"
|
|
}
|
|
]
|
|
},
|
|
"firstPost": {
|
|
"title": "Optional first comment in store wall of the new store.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchStore": {
|
|
"properties": {
|
|
"name": {
|
|
"title": "String which is the name of store.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"regionId": {
|
|
"title": "Identifier of region which manages and responsible for this store.",
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true
|
|
},
|
|
"location": {
|
|
"title": "Object with geographic location of store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PatchGeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"address": {
|
|
"title": "Object with address of store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PatchAddress"
|
|
}
|
|
]
|
|
},
|
|
"publicInfo": {
|
|
"title": "String with public information about the store which is visible\nfor users which are looking for a store.",
|
|
"type": "string",
|
|
"maxLength": 520
|
|
},
|
|
"publicTime": {
|
|
"title": "Enum which represents the expected pickup time range.",
|
|
"description": "- 0: NOT_SET\n- 1: IN_THE_MORNING\n- 2: AT_NOON_IN_THE_AFTERNOON\n- 3: IN_THE_EVENING\n- 4: AT_NIGHT",
|
|
"type": "integer",
|
|
"maximum": 4,
|
|
"minimum": 0
|
|
},
|
|
"categoryId": {
|
|
"title": "Identifier of the store category.",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"chainId": {
|
|
"title": "Identifier of the store chain.",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"cooperationStatus": {
|
|
"title": "Enum which represents the current state of cooperation between foodsharing and store.",
|
|
"description": "- 0: UNCLEAR\n- 1: NO_CONTACT\n- 2: IN_NEGOTIATION\n- 4: DOES_NOT_WANT_TO_WORK_WITH_US\n- 5:COOPERATION_ESTABLISHED\n- 6: GIVES_TO_OTHER_CHARITY\n- 7: PERMANENTLY_CLOSED",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"description": {
|
|
"title": "String which describes the store.",
|
|
"type": "string",
|
|
"maxLength": 16777215
|
|
},
|
|
"contact": {
|
|
"title": "Object with all contact information of store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PatchContactData"
|
|
}
|
|
]
|
|
},
|
|
"cooperationStart": {
|
|
"title": "Date of cooperation between store and foodsharing.",
|
|
"type": "string"
|
|
},
|
|
"calendarInterval": {
|
|
"title": "Duration in seconds before user can register to a pickup slot before pickup.",
|
|
"description": "- 604800: 1 Week\n- 1209600: 2 Weeks\n- 1814400: 3 Weeks\n- 2419200: 4 Weeks",
|
|
"type": "integer",
|
|
"maximum": 10000000000,
|
|
"minimum": 0
|
|
},
|
|
"weight": {
|
|
"title": "Enum which category of weight per pickup.",
|
|
"description": "- 0: UNCLEAR\n- 1: 1-3 kg\n- 2: 3-5 kg\n- 3: 5-10 kg\n- 4: 10-20 kg\n- 5: 20-30 kg\n- 6: 30-40 kg\n- 7: 40-50 kg\n- 8: more than 50 kg",
|
|
"type": "integer",
|
|
"maximum": 8,
|
|
"minimum": 0
|
|
},
|
|
"effort": {
|
|
"title": "Enum which represents the effort to create the cooperation betwee store and foodsharing.",
|
|
"description": "- 0: NOT_SET\n- 1: NO_PROBLEM_AT_ALL\n- 2: AFTER_SOME_PERSUASION\n- 3: DIFFICULT_NEGOTIATION\n- 4: LOOKED_BAD_BUT_WORKED",
|
|
"type": "integer",
|
|
"maximum": 4,
|
|
"minimum": 0
|
|
},
|
|
"showsSticker": {
|
|
"title": "Boolean which mark store that they shows foodsharing sticker on the store.",
|
|
"description": "{@see \\StickerStatus}",
|
|
"type": "integer",
|
|
"maximum": 2,
|
|
"minimum": 0
|
|
},
|
|
"publicity": {
|
|
"title": "Boolean which represents that store allows using for foodsharing publicity.",
|
|
"description": "{@see \\PublicityStatus}",
|
|
"type": "integer",
|
|
"maximum": 2,
|
|
"minimum": 0
|
|
},
|
|
"teamStatus": {
|
|
"title": "Enum which represent the state of searching members.",
|
|
"description": "- CLOSED = 0 No new members accepted\n- OPEN = 1 Open for members\n- OPEN_SEARCHING = 2 Requires new members",
|
|
"type": "integer",
|
|
"maximum": 2,
|
|
"minimum": 0
|
|
},
|
|
"options": {
|
|
"title": "Object with options for managing the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PatchStoreOptionModel"
|
|
}
|
|
]
|
|
},
|
|
"groceries": {
|
|
"title": "List of grocerie which are provided by the store.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"isHygieneRequired": {
|
|
"title": "Whether a valid hygiene certificate is required for the store.",
|
|
"type": "boolean"
|
|
},
|
|
"isVerifiedRequired": {
|
|
"title": "Whether users are required to be verified to apply to the store.",
|
|
"type": "boolean"
|
|
},
|
|
"isPhoneRequired": {
|
|
"title": "Whether users are required to have a valid phone number to apply to the store.",
|
|
"type": "boolean"
|
|
},
|
|
"isApplyTextRequired": {
|
|
"title": "Whether users are required to have a non-empty apply text to apply to the store.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreApplicationMessage": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TicketModel": {
|
|
"properties": {
|
|
"emailAddress": {
|
|
"description": "Email address of the user who sent the request.",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"subject": {
|
|
"description": "Subject of the support ticket.",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"body": {
|
|
"description": "The content of the ticket.",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"firstName": {
|
|
"description": "The first name of the user",
|
|
"type": "string"
|
|
},
|
|
"attachments": {
|
|
"description": "Optional list of attached files",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/TicketAttachment"
|
|
}
|
|
},
|
|
"userAgent": {
|
|
"description": "The user agent (browser version and OS) of the user",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FileUpload": {
|
|
"required": [
|
|
"filename"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"description": "Name of the uploaded file",
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"body": {
|
|
"description": "Base64 encoded content of the file",
|
|
"type": "string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"LoginRequest": {
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"description": "email",
|
|
"type": "string",
|
|
"example": "user@example.com"
|
|
},
|
|
"password": {
|
|
"description": "password",
|
|
"type": "string",
|
|
"example": "Password123!"
|
|
},
|
|
"code": {
|
|
"description": "2FA code (optional)",
|
|
"type": "string",
|
|
"example": null
|
|
},
|
|
"rememberMe": {
|
|
"description": "Whether to keep the session alive for longer",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"example": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EmailAddress": {
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "user@example.com"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegisterData": {
|
|
"required": [
|
|
"firstName",
|
|
"lastName",
|
|
"email",
|
|
"password",
|
|
"gender"
|
|
],
|
|
"properties": {
|
|
"firstName": {
|
|
"type": "string",
|
|
"example": "Melanie"
|
|
},
|
|
"lastName": {
|
|
"type": "string",
|
|
"example": "Musterfrau"
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"example": "melanie.musterfrau@example.com"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "Password123!"
|
|
},
|
|
"gender": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
0
|
|
],
|
|
"example": 2
|
|
},
|
|
"birthdate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"mobilePhone": {
|
|
"type": "string",
|
|
"example": "+491234567890"
|
|
},
|
|
"subscribeNewsletter": {
|
|
"description": "Whether the user wants to subscribe to the newsletter",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"DeleteProfileRequest": {
|
|
"required": [
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string",
|
|
"example": "This account was deleted because..."
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "Password123!"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"UUID": {
|
|
"description": "Contains a UUID denoting an uploaded file",
|
|
"required": [
|
|
"uuid"
|
|
],
|
|
"properties": {
|
|
"uuid": {
|
|
"description": "UUID of an uploaded picture",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EditableProfileDTO": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "User identifier in foodsharing.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"firstName": {
|
|
"title": "First name of the user.",
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"title": "Last name of the user.",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "integer"
|
|
},
|
|
"position": {
|
|
"type": "string"
|
|
},
|
|
"regionId": {
|
|
"type": "integer"
|
|
},
|
|
"gender": {
|
|
"type": "integer"
|
|
},
|
|
"birthday": {
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"mobile": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/Address"
|
|
},
|
|
"coordinate": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"aboutMePublic": {
|
|
"type": "string"
|
|
},
|
|
"aboutMeInternal": {
|
|
"type": "string"
|
|
},
|
|
"noAutoDelete": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PasswordResetRequest": {
|
|
"required": [
|
|
"password",
|
|
"resetToken"
|
|
],
|
|
"properties": {
|
|
"password": {
|
|
"type": "string",
|
|
"example": "newpassword123"
|
|
},
|
|
"totpCode": {
|
|
"type": "string",
|
|
"example": "720312"
|
|
},
|
|
"resetToken": {
|
|
"type": "string",
|
|
"example": "96D2-DB1C-C203"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CreateRegionPassportModel": {
|
|
"description": "Data for creating a region passport",
|
|
"required": [
|
|
"renew",
|
|
"usePaperSizeDinA4"
|
|
],
|
|
"properties": {
|
|
"userIds": {
|
|
"title": "Users for passport generation as array.",
|
|
"description": "Users for passport generation",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"default": []
|
|
},
|
|
"createPdf": {
|
|
"description": "Flag to create PDF",
|
|
"type": "boolean"
|
|
},
|
|
"renew": {
|
|
"description": "Flag to renew the passport",
|
|
"type": "boolean"
|
|
},
|
|
"informUser": {
|
|
"description": "Flag to create bell and mail",
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"usePaperSizeDinA4": {
|
|
"description": "Flag for automatic paper selection. If true, passport size is used for a single passport,\n DIN A4 for multiple. If false, DIN A4 is always used.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"VoteRequest": {
|
|
"required": [
|
|
"options"
|
|
],
|
|
"properties": {
|
|
"options": {
|
|
"description": "A list that maps option indices to the vote values",
|
|
"type": "object",
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CreatePollRequest": {
|
|
"required": [
|
|
"name",
|
|
"description"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"description": "Title of the poll",
|
|
"type": "string",
|
|
"example": "Test poll"
|
|
},
|
|
"description": {
|
|
"description": "Description of the poll",
|
|
"type": "string",
|
|
"example": "This is a test poll"
|
|
},
|
|
"startDate": {
|
|
"description": "Date and time at which voting starts",
|
|
"type": "datetime",
|
|
"example": "2105-01-01 01:23:45"
|
|
},
|
|
"endDate": {
|
|
"description": "Date and time at which voting ends",
|
|
"type": "datetime",
|
|
"example": "2152-01-01 12:34:56"
|
|
},
|
|
"regionId": {
|
|
"description": "Region to which the poll belongs",
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"exclusiveMinimum": true,
|
|
"example": 1
|
|
},
|
|
"scope": {
|
|
"description": "Who will be eligible to vote",
|
|
"type": "integer",
|
|
"maximum": 4,
|
|
"minimum": 0,
|
|
"example": 1
|
|
},
|
|
"type": {
|
|
"description": "The voting type, i.e. how options can be chosen",
|
|
"type": "integer",
|
|
"maximum": 3,
|
|
"minimum": 0,
|
|
"example": 1
|
|
},
|
|
"options": {
|
|
"description": "All options that can be voted for",
|
|
"type": "array\u003Cstring\u003E"
|
|
},
|
|
"notifyVoters": {
|
|
"description": "If all users who are eligible to vote shall be noticed by email",
|
|
"type": "boolean"
|
|
},
|
|
"shuffleOptions": {
|
|
"description": "If the options shall be displayed in random order when voting",
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EditPollRequest": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "New title of the poll, or null if the title should not be changed.",
|
|
"type": "string",
|
|
"example": "Test poll"
|
|
},
|
|
"description": {
|
|
"description": "New description of the poll, or null if the description should not be changed.",
|
|
"type": "string",
|
|
"example": "This is a new description of the poll."
|
|
},
|
|
"options": {
|
|
"description": "A new list of options for the poll, or null if the options should not be changed",
|
|
"type": "array\u003Cstring\u003E",
|
|
"minItems": 1
|
|
},
|
|
"shuffleOptions": {
|
|
"description": "Whether the options should be shuffled for voters.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"example": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"WallPost": {
|
|
"required": [
|
|
"body"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of the wall post",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"body": {
|
|
"title": "Text of the wall post",
|
|
"type": "string",
|
|
"example": "Hello world!"
|
|
},
|
|
"time": {
|
|
"title": "The posts time of creation",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"pictures": {
|
|
"title": "Pictures associated with the post",
|
|
"description": "Image urls. Legacy images get returned as file identifier from which urls to differently sized images can be generated",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "/api/uploads/bcb57ea1-ed73-4fde-849b-c88b11393690"
|
|
}
|
|
},
|
|
"author": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EditWorkGroupData": {
|
|
"properties": {
|
|
"name": {
|
|
"title": "The working group's title.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"description": {
|
|
"title": "The group's description text.",
|
|
"type": "string"
|
|
},
|
|
"applyType": {
|
|
"title": "Denotes who is allowed to apply for this group.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"maximum": 3,
|
|
"minimum": 0
|
|
},
|
|
"requiredBananas": {
|
|
"title": "If the apply type is REQUIRES_PROPERTIES, a foodsaver must have this many bananas before being allowed to apply\nfor this group.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"maximum": 20,
|
|
"minimum": 0
|
|
},
|
|
"requiredPickups": {
|
|
"title": "If the apply type is REQUIRES_PROPERTIES, a foodsaver must have been to this many pickups before being allowed\nto apply for this group.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"maximum": 100,
|
|
"minimum": 0
|
|
},
|
|
"requiredWeeks": {
|
|
"title": "If the apply type is REQUIRES_PROPERTIES, a foodsaver must have been registered this many weeks before being\nallowed to apply for this group.",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"maximum": 52,
|
|
"minimum": 0
|
|
},
|
|
"photo": {
|
|
"title": "Filename of the working group's photo.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SendMailData": {
|
|
"description": "Class that represents the data of a mail to a group, in a format in which it is sent to the client.",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"description": "Message for mail to group.",
|
|
"type": "string",
|
|
"maxLength": 16777215,
|
|
"example": "Hey, I have a question. ...."
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SendGroupRequestData": {
|
|
"description": "Class that represents the data of a join request, in a format in which it is sent to the client.",
|
|
"required": [
|
|
"motivation",
|
|
"selectedTime"
|
|
],
|
|
"properties": {
|
|
"motivation": {
|
|
"description": "Motivation message for mail to group.",
|
|
"type": "string",
|
|
"maxLength": 16777215,
|
|
"example": "I like to join this workgroup to support foodsharing."
|
|
},
|
|
"ability": {
|
|
"description": "Ability message for mail to group.",
|
|
"type": "string"
|
|
},
|
|
"experience": {
|
|
"description": "Experience message for mail to group.",
|
|
"type": "string"
|
|
},
|
|
"selectedTime": {
|
|
"description": "Selected time message for mail to group.",
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AwardedAchievementWithUserDetails": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"reviewer": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"achievementId": {
|
|
"type": "integer"
|
|
},
|
|
"notice": {
|
|
"type": "string"
|
|
},
|
|
"validUntil": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityModel": {
|
|
"description": "A list of all activities that the logged-in user has hidden",
|
|
"properties": {
|
|
"index": {
|
|
"title": "The type of activity",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "name of the activity",
|
|
"type": "string"
|
|
},
|
|
"shortName": {
|
|
"title": "short name of the activity",
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"title": "the individual elements of the activity",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityFilter"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityUpdate": {
|
|
"properties": {
|
|
"type": {
|
|
"title": "Type of the Update",
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"title": "The Time of the Update",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"title": "The Name of the Update",
|
|
"type": "string"
|
|
},
|
|
"desc": {
|
|
"title": "a more detailed description",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"title": "The Source of the Update",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"source_suffix": {
|
|
"title": "Suffix of the source of the update",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"icon": {
|
|
"title": "Icon path for the update",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"gallery": {
|
|
"title": "The Gallery",
|
|
"type": "array",
|
|
"items": [],
|
|
"nullable": true
|
|
},
|
|
"fs_id": {
|
|
"title": "Id from Creator",
|
|
"type": "integer"
|
|
},
|
|
"fs_name": {
|
|
"title": "The Name from Creator",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"entity_id": {
|
|
"title": "id from Update",
|
|
"type": "integer"
|
|
},
|
|
"region_id": {
|
|
"title": "id of the associated region",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
"forum_post": {
|
|
"title": "the id of the corresponding forum post",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
"forum_type": {
|
|
"title": "Type of forum",
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityUpdateMailbox": {
|
|
"properties": {
|
|
"type": {
|
|
"title": "Type of the Update",
|
|
"type": "string",
|
|
"default": "mailbox"
|
|
},
|
|
"time": {
|
|
"title": "The Time of the Update",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"title": "The Name of the Update",
|
|
"type": "string"
|
|
},
|
|
"desc": {
|
|
"title": "a more detailed description",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"title": "The Source of the Update",
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"title": "Icon path for the update",
|
|
"type": "string",
|
|
"default": "fas fa-envelope"
|
|
},
|
|
"entity_id": {
|
|
"title": "the e-mail id",
|
|
"type": "integer"
|
|
},
|
|
"sender_email": {
|
|
"title": "Sender of the email",
|
|
"type": "string"
|
|
},
|
|
"mailboxId": {
|
|
"title": "id of the mailbox",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Profile": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 342528
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Franzi"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"example": "/api/uploads/99d1fb45-9748-3510-ac02-87b46c40048c"
|
|
},
|
|
"isSleeping": {
|
|
"description": "Whether the user is currently using the sleeping hat function",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Banana": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"title": "May represent the sender or recipient depending on the context.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"title": "Time the banana was given.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BananaMetadata": {
|
|
"properties": {
|
|
"receivedCount": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"mayGiveBanana": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayDeleteBananas": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BasketForOwnerMenu": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"picture": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BasketForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"picture": {
|
|
"type": "string"
|
|
},
|
|
"until": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"distanceInKm": {
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"creator": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BellForList": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"key": {
|
|
"description": "translation key for the bell body",
|
|
"type": "string",
|
|
"example": "event_post.many"
|
|
},
|
|
"title": {
|
|
"description": "translation key for the bell title",
|
|
"type": "string",
|
|
"example": "event_post_title"
|
|
},
|
|
"href": {
|
|
"description": "The destination of the bell when clicked on",
|
|
"type": "string",
|
|
"example": "event_post_title"
|
|
},
|
|
"payload": {
|
|
"description": "The variables used in the translations",
|
|
"type": "object",
|
|
"additionalProperties": []
|
|
},
|
|
"icon": {
|
|
"description": "CSS class of the bell's icon",
|
|
"type": "string",
|
|
"example": "fas fa-calendar"
|
|
},
|
|
"image": {
|
|
"description": "Relative URL to an image to be used as an icon.\u003Cbr\u003EOnly one of $image and $icon are supported.",
|
|
"type": "string",
|
|
"example": null
|
|
},
|
|
"createdAt": {
|
|
"description": "The time of the bell \u2013 usually the creation time, but some bells use different times for this attribute.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"isCloseable": {
|
|
"type": "boolean"
|
|
},
|
|
"isRead": {
|
|
"description": "Whether the foodsharer, for whom the bell is displayed, has already clicked on it.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PaginatedBlogPosts": {
|
|
"properties": {
|
|
"totalCount": {
|
|
"description": "The total number of entries that are available, not only the count of entities included.",
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"offset": {
|
|
"description": "The 0-based index of the first entry that is included.",
|
|
"type": "integer",
|
|
"example": 20
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/BlogPost"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BlogPost": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"teaser": {
|
|
"type": "string"
|
|
},
|
|
"publishedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"authorName": {
|
|
"title": "Name of this post's author or null if the author's profile was deleted.",
|
|
"type": "string"
|
|
},
|
|
"picture": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BuddyList": {
|
|
"properties": {
|
|
"buddies": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"myRequests": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"requestsToMe": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Category": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"usageCount": {
|
|
"type": "integer"
|
|
},
|
|
"subType": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Content": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"lastModified": {
|
|
"title": "Date and time in UTC timezone at which this content was modified.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"DonationGoalInformation": {
|
|
"properties": {
|
|
"donators": {
|
|
"description": "amount of donators",
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"receivedDonationsInEuros": {
|
|
"description": "amount of recevied donations in euros",
|
|
"type": "number",
|
|
"format": "float",
|
|
"example": 1337
|
|
},
|
|
"goalInEuros": {
|
|
"description": "amount of donation-goal in euros",
|
|
"type": "integer",
|
|
"example": 2000
|
|
},
|
|
"percentOfGoalReached": {
|
|
"description": "procentual amount of donation-goal reached",
|
|
"type": "number",
|
|
"format": "float",
|
|
"example": 66.85
|
|
},
|
|
"isGoalReached": {
|
|
"description": "is donation-goal reached",
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EventForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"startDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FeatureToggle": {
|
|
"properties": {
|
|
"identifier": {
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointDetails": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"regionId": {
|
|
"type": "integer"
|
|
},
|
|
"picture": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/components/schemas/ActivationStatus"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"$ref": "#/components/schemas/Address"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"creator": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"regionName": {
|
|
"type": "string"
|
|
},
|
|
"followerCount": {
|
|
"type": "integer"
|
|
},
|
|
"managers": {
|
|
"description": "IDs of all users who are responsible for the food share point",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"picture": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AddFoodSharePointResponse": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isAdded": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointPermission": {
|
|
"properties": {
|
|
"isFollower": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayEdit": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayDelete": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PickupAgendaEntry": {
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"isConfirmed": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EventAgendaEntry": {
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"end": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PaginatedForumThreadsForListView": {
|
|
"properties": {
|
|
"totalCount": {
|
|
"description": "The total number of entries that are available, not only the count of entities included.",
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"offset": {
|
|
"description": "The 0-based index of the first entry that is included.",
|
|
"type": "integer",
|
|
"example": 20
|
|
},
|
|
"entries": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ForumThreadForListView"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ForumThread": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"regionId": {
|
|
"type": "integer"
|
|
},
|
|
"subforumId": {
|
|
"description": "Subforum identifier. 1 is the ambassador forum, 0 the normal forum.",
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Beta Testing: API refactoring"
|
|
},
|
|
"pinnedLevel": {
|
|
"description": "Pinned level from -1 (end of list) to 10 (top of list)",
|
|
"type": "integer",
|
|
"example": 3
|
|
},
|
|
"isLocked": {
|
|
"type": "boolean"
|
|
},
|
|
"isActive": {
|
|
"description": "Whether the thread is active, or needs to be checked by a moderator first",
|
|
"type": "boolean"
|
|
},
|
|
"creatorId": {
|
|
"description": "Id of the user who initially created the thread",
|
|
"type": "integer"
|
|
},
|
|
"lastPostId": {
|
|
"description": "Id of the last post in this thread",
|
|
"type": "integer"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/components/schemas/ForumThreadPermissions"
|
|
},
|
|
"subscriptionsStatus": {
|
|
"$ref": "#/components/schemas/SubscriptionsStatus"
|
|
},
|
|
"posts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ForumPost"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ConferenceRoom": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"dialin": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Email": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Internal unique ID of this email. This is only used in the foodsharing mailbox system.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"mailboxId": {
|
|
"title": "ID of the mailbox in which this email is.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"mailboxFolder": {
|
|
"title": "Folder in the mailbox in which this email is, see {@link MailboxFolder}.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"from": {
|
|
"title": "The sender's email address.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/EmailAddress2"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"title": "Time at which this email was sent or received.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"subject": {
|
|
"title": "Subject of the email. Can be empty but not null.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"body": {
|
|
"title": "Body of this email.",
|
|
"type": "string"
|
|
},
|
|
"bodyHtml": {
|
|
"title": "Body of this email in which HTML tags have not been stripped.",
|
|
"type": "string"
|
|
},
|
|
"isRead": {
|
|
"title": "Whether this email has been read.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isAnswered": {
|
|
"title": "Whether this email has been answered.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Region": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"parentId": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
},
|
|
"emailAddress": {
|
|
"type": "string"
|
|
},
|
|
"emailName": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MapMarker": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "ID of the object with which the marker is associated.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name of the object. Can be displayed as tooltip.",
|
|
"type": "string"
|
|
},
|
|
"lat": {
|
|
"title": "latitude of the marker.",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"lon": {
|
|
"title": "longitude of the marker.",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"categoryType": {
|
|
"title": "Category Type of the object.",
|
|
"description": "May be null for objects without category.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreCategoryType"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionMapBubbleData": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "G\u00f6ttingen"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Wilkommen in **G\u00f6ttingen**!"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointMapBubbleData": {
|
|
"properties": {
|
|
"name": {
|
|
"description": "The name of the Foodsharepoint",
|
|
"type": "string",
|
|
"example": "Demo Foodsharepoint"
|
|
},
|
|
"description": {
|
|
"description": "Detailed description of the Foodsharepoint",
|
|
"type": "string",
|
|
"example": "This meeting is for demonstration purposes only. There is nothing to get here."
|
|
},
|
|
"street": {
|
|
"description": "The street with house number where the point is located",
|
|
"type": "string",
|
|
"example": "Examplestreet 25"
|
|
},
|
|
"zipCode": {
|
|
"description": "The Zip Code",
|
|
"type": "string",
|
|
"example": "12345"
|
|
},
|
|
"city": {
|
|
"description": "The place where the point is located",
|
|
"type": "string",
|
|
"example": "Sample town"
|
|
},
|
|
"picture": {
|
|
"description": "Path of the header picture of the point or null",
|
|
"type": "string",
|
|
"example": "/img/foodSharePointHead.jpg"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"BasketBubbleData": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id of the basket.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"description": {
|
|
"title": "Optional description text. Can be empty or null if the basket does not have a description.",
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"title": "Date at which the basket was created. This is null if the current user does not have permission to see the\ndetails.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"creator": {
|
|
"title": "The user who created the basket. This is null if the current user does not have permission to see the details.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreMapBubbleData": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id of the store.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"title": "Name of the store.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"regionName": {
|
|
"title": "Name of the region the store belongs to.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"teamMemberCount": {
|
|
"title": "The number of foodsavers in the store's team without the standby list.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"standbyCount": {
|
|
"title": "The number of foodsavers in the store's standby list.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"pickupCount": {
|
|
"title": "The number of pickup dates assigned to the store since its creation.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"pickupWeightInKg": {
|
|
"title": "The estimated total weight of food that was picked up at the store in total.",
|
|
"type": "number",
|
|
"format": "float",
|
|
"default": 0
|
|
},
|
|
"cooperationStart": {
|
|
"title": "The date at which the cooperation with the store started. Can be null if the store is not cooperating yet.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"statusDate": {
|
|
"title": "The date of the last status change. This is relevant for stores that have been closed or changed their cooperation status.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"publicInformation": {
|
|
"title": "Any public information text that will be visible in the store's bubble on the map as well as on the store page.",
|
|
"type": "string"
|
|
},
|
|
"publicPickupTime": {
|
|
"title": "Approximate time of day at which pickups at this store usually are.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PublicTimes"
|
|
}
|
|
]
|
|
},
|
|
"teamSearchStatus": {
|
|
"title": "The team search indicates whether the store's team is looking for new members.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/TeamSearchStatus"
|
|
}
|
|
]
|
|
},
|
|
"cooperationStatus": {
|
|
"title": "The cooperation status indicates whether the store is currently cooperating with Foodsharing.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CooperationStatus"
|
|
}
|
|
]
|
|
},
|
|
"mayAccessStorePage": {
|
|
"title": "Whether the user is allowed to access the store's page.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"maySendRequest": {
|
|
"title": "Whether the user is allowed to send a request for joining the store team.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayAcceptInvitation": {
|
|
"title": "Whether the user is allowed to accept an invitation for joining the store team.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayWithdrawRequest": {
|
|
"title": "Whether the user has sent a request for joining the store team and is allowed to withdraw it.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"location": {
|
|
"title": "Position of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"isHygieneRequired": {
|
|
"title": "Whether users are required to have a hygiene certificate to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"hasHygieneCertificate": {
|
|
"title": "Whether the user currently has a valid hygiene certificate. Only set if a hygiene certificate is required.",
|
|
"type": "boolean"
|
|
},
|
|
"hasCompleteProfile": {
|
|
"title": "Whether user has a complete profile.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"hasHomeRegion": {
|
|
"title": "Whether user has a home region.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isMemberOfRegion": {
|
|
"title": "Whether user is member of the store's region.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"requireVerification": {
|
|
"title": "Whether users are required to be verified to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"requirePhone": {
|
|
"title": "Whether users are required to have a valid phone number to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"requireApplyText": {
|
|
"title": "Whether users are required to have a text in their application to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isInvited": {
|
|
"title": "Whether the user is invited to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"regionId": {
|
|
"title": "The ID of the region this store belongs to.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"categoryType": {
|
|
"title": "The type of the store category.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreCategoryType"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EventMapBubbleData": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id of the event.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"title": "Name of the event.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"description": {
|
|
"title": "Description of the event in (markdown formatted).",
|
|
"type": "string"
|
|
},
|
|
"startDate": {
|
|
"title": "The date time at which the event starts.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endDate": {
|
|
"title": "The date time at which the event ends.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"UserMapBubbleData": {
|
|
"properties": {
|
|
"profile": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"aboutMeIntern": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MessageCollection": {
|
|
"properties": {
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
},
|
|
"profiles": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Message": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"sentAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"authorId": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Conversation": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"storeId": {
|
|
"type": "integer"
|
|
},
|
|
"unreadMessages": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"lastMessage": {
|
|
"$ref": "#/components/schemas/Message"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Message"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"NotificationSettingWithRegion": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"bell": {
|
|
"description": "Whether a notification via bell is activated. May be null, meaning the default value is used",
|
|
"type": "boolean"
|
|
},
|
|
"email": {
|
|
"description": "Whether a notification via email is activated",
|
|
"type": "boolean"
|
|
},
|
|
"region": {
|
|
"description": "The region this settings entry is associated with",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CommonLabel"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"NotificationSetting": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"bell": {
|
|
"description": "Whether a notification via bell is activated. May be null, meaning the default value is used",
|
|
"type": "boolean"
|
|
},
|
|
"email": {
|
|
"description": "Whether a notification via email is activated",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegularPickup": {
|
|
"required": [
|
|
"weekday",
|
|
"startTimeOfPickup",
|
|
"maxCountOfSlots"
|
|
],
|
|
"properties": {
|
|
"weekday": {
|
|
"title": "Weekday of pickup.",
|
|
"description": "0=Sunday, 1=Monday, ...",
|
|
"type": "integer",
|
|
"maximum": 6,
|
|
"minimum": 0
|
|
},
|
|
"startTimeOfPickup": {
|
|
"title": "Time of pickup (UTC).",
|
|
"type": "string"
|
|
},
|
|
"maxCountOfSlots": {
|
|
"title": "Count of maximum allowed foodsavers for pickup.",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"description": {
|
|
"title": "Description of the pickup slot.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PickupOption": {
|
|
"properties": {
|
|
"date": {
|
|
"title": "Date time of the pickup.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"store": {
|
|
"title": "Store in which the pickup will happen.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MinimalStoreIdentifier"
|
|
}
|
|
]
|
|
},
|
|
"isConfirmed": {
|
|
"title": "Whether the users pickup slot is confirmed. null if the user currently has no pickup slot.",
|
|
"type": "boolean"
|
|
},
|
|
"slots": {
|
|
"title": "Total number of slots in the pickup.",
|
|
"description": "null for past pickups.",
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"title": "Description of the pickup. null if the pickup has no additional text.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"QuizStatus": {
|
|
"properties": {
|
|
"currentWaitTime": {
|
|
"description": "The number of days until the user can try the quiz again. -1 if the user is disqualified to ever try again. Only set if the user had to wait after the last try.",
|
|
"type": "integer",
|
|
"example": 10
|
|
},
|
|
"waitTimeAfterFailure": {
|
|
"description": "The wait time the user will get, if the quiz is failed the next time. -1 if the user gets disqualified after failing the next time.",
|
|
"type": "integer",
|
|
"example": -1
|
|
},
|
|
"lastSessionStatus": {
|
|
"description": "Status of the last quiz session. Null if no session was ever started",
|
|
"example": 2,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SessionStatus"
|
|
}
|
|
]
|
|
},
|
|
"expirationTime": {
|
|
"description": "The number of days until the quiz expires and the user has to pass again. 0 if it is already expired, -1 if it will not expire soon.",
|
|
"type": "integer",
|
|
"default": -1,
|
|
"example": -1
|
|
},
|
|
"questionCount": {
|
|
"description": "Total questions in the running quiz session. Only set if a quiz session is running.",
|
|
"type": "integer",
|
|
"example": 10
|
|
},
|
|
"questionsAnswered": {
|
|
"description": "Number of questions already answered in the running quiz session. Only set if a quiz session is running.",
|
|
"type": "integer",
|
|
"example": 4
|
|
},
|
|
"isTimed": {
|
|
"description": "Whether the running quiz session is timed. Only set if a quiz session is running.",
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"confirmed": {
|
|
"description": "Whether the quiz has been confirmed. Only set if last session was passed and the quiz needs to be confirmed.",
|
|
"type": "boolean",
|
|
"example": null
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActiveQuestion": {
|
|
"properties": {
|
|
"question": {
|
|
"$ref": "#/components/schemas/Question"
|
|
},
|
|
"questionAge": {
|
|
"description": "Time already spent on this question. Only set if current quiz session is timed.",
|
|
"type": "integer",
|
|
"example": 10
|
|
},
|
|
"timedOut": {
|
|
"description": "Whether the last question was skipped because it timed out.",
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"QuizSession": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"foodsaverId": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"quizId": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"status": {
|
|
"default": null,
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SessionStatus"
|
|
}
|
|
]
|
|
},
|
|
"questionsAnswered": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"startTime": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"endTime": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"failurePoints": {
|
|
"type": "number",
|
|
"format": "float",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"maxFailurePointsToSucceed": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"isTimed": {
|
|
"type": "boolean"
|
|
},
|
|
"isTest": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CommonLabel": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionOptions": {
|
|
"properties": {
|
|
"isReportButtonEnabled": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isMediationButtonEnabled": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isRegionPickupRuleActive": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"regionPickupRuleTimespanDays": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"regionPickupRuleLimitNumber": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"regionPickupRuleLimitDayNumber": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"regionPickupRuleInactiveHours": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"allowHidingInForum": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"selectedReportReasonOptions": {
|
|
"type": "integer",
|
|
"default": 1
|
|
},
|
|
"isReportReasonOtherEnabled": {
|
|
"type": "boolean",
|
|
"default": true
|
|
},
|
|
"isAddressChangeNotificationEnabled": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PublicRegionData": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"hasAmbassador": {
|
|
"type": "boolean"
|
|
},
|
|
"location": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"statistics": {
|
|
"title": "Null if statistics for this region do not exist, e.g. if the region is a working group.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/BasicRegionStatistics"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionForTreeNavigation": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"hasChildren": {
|
|
"type": "boolean"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"UnitMember": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 342528
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Franzi"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"example": "/api/uploads/99d1fb45-9748-3510-ac02-87b46c40048c"
|
|
},
|
|
"isSleeping": {
|
|
"description": "Whether the user is currently using the sleeping hat function",
|
|
"type": "boolean"
|
|
},
|
|
"isAdminOrAmbassadorOfRegion": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionWithMembership": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"isMember": {
|
|
"type": "boolean"
|
|
},
|
|
"type": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ReportForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"reportedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"store": {
|
|
"$ref": "#/components/schemas/MinimalStoreIdentifier"
|
|
},
|
|
"reporter": {
|
|
"$ref": "#/components/schemas/ProfileWithMail"
|
|
},
|
|
"reported": {
|
|
"$ref": "#/components/schemas/ProfileWithMail"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ResourceForDisplay": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"regionId": {
|
|
"type": "integer"
|
|
},
|
|
"isHomeRegion": {
|
|
"type": "boolean"
|
|
},
|
|
"isUserActive": {
|
|
"type": "boolean"
|
|
},
|
|
"isPrivate": {
|
|
"type": "boolean"
|
|
},
|
|
"isFavorite": {
|
|
"type": "boolean"
|
|
},
|
|
"openness": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SimplifiedUserSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of the user represented by the search result.",
|
|
"type": "integer"
|
|
},
|
|
"value": {
|
|
"title": "String representation of the resulting user.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MixedSearchResult": {
|
|
"properties": {
|
|
"regions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RegionSearchResult"
|
|
}
|
|
},
|
|
"workingGroups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/WorkingGroupSearchResult"
|
|
}
|
|
},
|
|
"stores": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/StoreSearchResult"
|
|
}
|
|
},
|
|
"foodSharePoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/FoodSharePointSearchResult"
|
|
}
|
|
},
|
|
"chats": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ChatSearchResult"
|
|
}
|
|
},
|
|
"threads": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ThreadSearchResult"
|
|
}
|
|
},
|
|
"users": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/UserSearchResult"
|
|
}
|
|
},
|
|
"mails": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/MailSearchResult"
|
|
}
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/EventSearchResult"
|
|
}
|
|
},
|
|
"polls": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PollSearchResult"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ThreadSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"lastPostSentAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"pinnedLevel": {
|
|
"description": "Whether the thread is pinned. Higher values for higher priority.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"isClosed": {
|
|
"type": "boolean"
|
|
},
|
|
"isInsideAmbassadorForum": {
|
|
"description": "Whether the thread is located in the ambassador forum.",
|
|
"type": "boolean"
|
|
},
|
|
"postId": {
|
|
"description": "Unique identifier of the post that was matched.",
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"regionId": {
|
|
"description": "Unique identifier of the forums region.",
|
|
"type": "integer"
|
|
},
|
|
"regionName": {
|
|
"description": "Name of the forums region.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"body": {
|
|
"description": "The body of the forum thread. Only included when searching by post content.",
|
|
"type": "string",
|
|
"example": "This is the body of the thread"
|
|
},
|
|
"relevance": {
|
|
"description": "The relevance score of the thread.",
|
|
"type": "number",
|
|
"format": "float",
|
|
"example": 0.85
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TOTPProposal": {
|
|
"properties": {
|
|
"reused": {
|
|
"description": "How often the same setup proposal has been reused from the session",
|
|
"type": "integer",
|
|
"example": 0
|
|
},
|
|
"secret": {
|
|
"description": "Base32-encoded TOTP secret",
|
|
"type": "string",
|
|
"example": "JBSWY3DPEHPK3PXP"
|
|
},
|
|
"qrCode": {
|
|
"description": "QR code as data URI (PNG)",
|
|
"type": "string",
|
|
"example": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAA..."
|
|
},
|
|
"backupCodes": {
|
|
"description": "One-time-use backup codes for account recovery",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"example": "A9F3-4C2B-91D8"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ReadableProfileSettings": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "User identifier in foodsharing.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"firstName": {
|
|
"title": "First name of the user.",
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"lastName": {
|
|
"title": "Last name of the user.",
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"photo": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"role": {
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Role"
|
|
}
|
|
]
|
|
},
|
|
"position": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"regionName": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"gender": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"birthday": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"mobile": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"address": {
|
|
"$ref": "#/components/schemas/Address"
|
|
},
|
|
"coordinate": {
|
|
"default": null,
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"aboutMePublic": {
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"aboutMeInternal": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"noAutoDelete": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"targetRole": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"isOnTeamPage": {
|
|
"type": "boolean"
|
|
},
|
|
"mayChangeVerifiedData": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"mayChangeEmailImmediately": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"twoFactorEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"numBackupCodes": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StatisticsGender": {
|
|
"description": "Represents one entry in the result of gender Region query.",
|
|
"properties": {
|
|
"gender": {
|
|
"description": "Gender of the user.\u003Cbr\u003E\n 0 = not selected\u003Cbr\u003E\n 1 = Male\u003Cbr\u003E\n 2 = Female\u003Cbr\u003E\n 3 = Divers",
|
|
"type": "integer"
|
|
},
|
|
"numberOfGender": {
|
|
"description": "count of gender",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StatisticsAgeBand": {
|
|
"description": "Represents one entry in the result of age band Region query.",
|
|
"properties": {
|
|
"ageBand": {
|
|
"description": "The age Band",
|
|
"type": "string",
|
|
"format": "from-to"
|
|
},
|
|
"numberOfAgeBand": {
|
|
"description": "number of persons in the age group",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StatisticModel": {
|
|
"description": "Includes general statistical information and activity ladder of regions and foodsavers",
|
|
"properties": {
|
|
"generalStatistic": {
|
|
"$ref": "#/components/schemas/GeneralStatistic"
|
|
},
|
|
"regionsActivity": {
|
|
"$ref": "#/components/schemas/PickupModel"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreChainForChainList": {
|
|
"properties": {
|
|
"chain": {
|
|
"$ref": "#/components/schemas/StoreChain"
|
|
},
|
|
"storeCount": {
|
|
"title": "The number of stores that are part of this chain.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MinimalStoreIdentifier": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"CommonStoreMetadata": {
|
|
"properties": {
|
|
"maxCountPickupSlot": {
|
|
"title": "Maximum count of slots per pickup.",
|
|
"description": "The count of slots are limited by the foodsharing platform.",
|
|
"type": "integer",
|
|
"default": 50
|
|
},
|
|
"version": {
|
|
"title": "The version of the cache.",
|
|
"description": "When the data is changed, the version number is increased.\nUsed to decide when data needs to be refetched.\n\nShould be removed when we switch to HTTP caching by Symfony.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreTeamMembershipWithPickupStatus": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"isManaging": {
|
|
"type": "boolean"
|
|
},
|
|
"membershipStatus": {
|
|
"type": "integer"
|
|
},
|
|
"categoryType": {
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreCategoryType"
|
|
}
|
|
]
|
|
},
|
|
"pickupStatus": {
|
|
"type": "integer",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreListInformation": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of the store in database.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name of the store.",
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"title": "Region which is manages and is responsible for this store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MinimalRegionIdentifier"
|
|
}
|
|
]
|
|
},
|
|
"location": {
|
|
"title": "Location of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"street": {
|
|
"title": "Street name with number of store location.",
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"title": "City name of store location",
|
|
"type": "string"
|
|
},
|
|
"zipCode": {
|
|
"title": "Zip code of store location",
|
|
"type": "string"
|
|
},
|
|
"cooperationStatus": {
|
|
"title": "Cooperation status of store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CooperationStatus"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"title": "Data of creation of store in database.",
|
|
"description": "The create date and the first cooperation can be different.\n\nThe value is a date \"Y-m-d\"",
|
|
"type": "string"
|
|
},
|
|
"categoryType": {
|
|
"title": "Category type of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreCategoryType"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Store": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of the store in database.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name of the store.",
|
|
"type": "string"
|
|
},
|
|
"region": {
|
|
"title": "Region which is manages and is responsible for this store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MinimalRegionIdentifier"
|
|
}
|
|
]
|
|
},
|
|
"location": {
|
|
"title": "Location of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"address": {
|
|
"title": "Street name with street number.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Address"
|
|
}
|
|
]
|
|
},
|
|
"publicInfo": {
|
|
"title": "Public information about the store which is visible\nfor users which are looking for a store.",
|
|
"type": "string"
|
|
},
|
|
"publicTime": {
|
|
"title": "Enum which represents the expected pickup time range.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PublicTimes"
|
|
}
|
|
]
|
|
},
|
|
"category": {
|
|
"title": "Identifier of the store category.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/MinimalIdentifier"
|
|
}
|
|
]
|
|
},
|
|
"chain": {
|
|
"title": "Information about the store chain.",
|
|
"description": "Only set if store is related to a store chain.",
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreChainInformation"
|
|
}
|
|
]
|
|
},
|
|
"cooperationStatus": {
|
|
"title": "Enum which represents the current state of cooperation between foodsharing and store.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CooperationStatus"
|
|
}
|
|
]
|
|
},
|
|
"cooperationStart": {
|
|
"title": "Date of cooperation between store and foodsharing.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"description": {
|
|
"title": "String which describes the store.",
|
|
"description": "Only visible to store team members",
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"contact": {
|
|
"title": "Contact information for store contact.",
|
|
"description": "Only visible to store managers or organaisators",
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ContactData"
|
|
}
|
|
]
|
|
},
|
|
"calendarInterval": {
|
|
"title": "Duration in seconds before user can register to a pickup slot before pickup.",
|
|
"description": "- 0 : not set\n- 604800: 1 Week\n- 1209600: 2 Weeks\n- 1814400: 3 Weeks\n- 2419200: 4 Weeks",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"weight": {
|
|
"title": "Enum which category of weight per pickup.",
|
|
"description": "- 0: UNCLEAR\n- 1: 1-3 kg\n- 2: 3-5 kg\n- 3: 5-10 kg\n- 4: 10-20 kg\n- 5: 20-30 kg\n- 6: 30-40 kg\n- 7: 40-50 kg\n- 8: more than 50 kg",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"effort": {
|
|
"title": "Enum which represents the effort to create the cooperation betwee store and foodsharing.",
|
|
"description": "Only visible to store managers or organaisators",
|
|
"default": 0,
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/ConvinceStatus"
|
|
}
|
|
]
|
|
},
|
|
"publicity": {
|
|
"title": "Boolean which represents that store allow using for foodsharing publicity.",
|
|
"description": "Only visible to store team members",
|
|
"default": 2,
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/PublicityStatus"
|
|
}
|
|
]
|
|
},
|
|
"showsSticker": {
|
|
"title": "Boolean which mark store that they shows foodsharing sticker on the store.",
|
|
"description": "Only visible to store managers or organaisators",
|
|
"default": 2,
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StickerStatus"
|
|
}
|
|
]
|
|
},
|
|
"groceries": {
|
|
"title": "List of grocerie which are provided by the store.",
|
|
"description": "Only visible to store managers or organaisators",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"nullable": true
|
|
},
|
|
"teamStatus": {
|
|
"title": "Status of team.",
|
|
"default": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/TeamSearchStatus"
|
|
}
|
|
]
|
|
},
|
|
"isHygieneRequired": {
|
|
"title": "Whether a valid hygiene certificate is required for the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isVerifiedRequired": {
|
|
"title": "Whether users are required to be verified to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isPhoneRequired": {
|
|
"title": "Whether users are required to have a valid phone number to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isApplyTextRequired": {
|
|
"title": "Whether users are required to have a valid apply text to apply to the store.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"options": {
|
|
"title": "Configuration option to influence behavior of store.",
|
|
"description": "Only visible to store team members",
|
|
"nullable": true,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreOptionModel"
|
|
}
|
|
]
|
|
},
|
|
"createdAt": {
|
|
"title": "Date of store creation in system.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updatedAt": {
|
|
"title": "Date of last update of store information.",
|
|
"description": "Only visible to store managers or organaisators",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"nullable": true
|
|
},
|
|
"categoryType": {
|
|
"title": "Category type of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreCategoryType"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreStandbyTeamMember": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 342528
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Franzi"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"example": "/api/uploads/99d1fb45-9748-3510-ac02-87b46c40048c"
|
|
},
|
|
"isSleeping": {
|
|
"description": "Whether the user is currently using the sleeping hat function",
|
|
"type": "boolean"
|
|
},
|
|
"firstName": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/components/schemas/Role"
|
|
},
|
|
"isVerified": {
|
|
"type": "boolean"
|
|
},
|
|
"hygieneCertificateUntil": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"isResponsible": {
|
|
"type": "boolean"
|
|
},
|
|
"membershipStatus": {
|
|
"type": "integer"
|
|
},
|
|
"fetchCount": {
|
|
"type": "integer"
|
|
},
|
|
"memberSince": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StorePermissions": {
|
|
"properties": {
|
|
"storeId": {
|
|
"type": "integer"
|
|
},
|
|
"isCoordinator": {
|
|
"type": "boolean"
|
|
},
|
|
"isAmbassador": {
|
|
"type": "boolean"
|
|
},
|
|
"isOrgaUser": {
|
|
"type": "boolean"
|
|
},
|
|
"isJumper": {
|
|
"type": "boolean"
|
|
},
|
|
"isManager": {
|
|
"type": "boolean"
|
|
},
|
|
"isKam": {
|
|
"type": "boolean"
|
|
},
|
|
"maySeePickup": {
|
|
"type": "boolean"
|
|
},
|
|
"mayEditStore": {
|
|
"type": "boolean"
|
|
},
|
|
"mayLeaveStoreTeam": {
|
|
"type": "boolean"
|
|
},
|
|
"maySeePickupHistory": {
|
|
"type": "boolean"
|
|
},
|
|
"maySeeStoreLog": {
|
|
"type": "boolean"
|
|
},
|
|
"maySeePickups": {
|
|
"type": "boolean"
|
|
},
|
|
"mayDeleteStore": {
|
|
"type": "boolean"
|
|
},
|
|
"teamConversationId": {
|
|
"type": "integer"
|
|
},
|
|
"jumperConversationId": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreApplication": {
|
|
"properties": {
|
|
"user": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"firstName": {
|
|
"type": "string"
|
|
},
|
|
"verified": {
|
|
"type": "boolean"
|
|
},
|
|
"distanceInKm": {
|
|
"title": "The distance in kilometers to the store.\nnull if the fetching user is not allowed to access distance data.\n-1 if the applicant has no valid address.",
|
|
"type": "integer",
|
|
"nullable": true
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreInvitation": {
|
|
"properties": {
|
|
"user": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"verified": {
|
|
"type": "boolean"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"inviter": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreLogEntry": {
|
|
"properties": {
|
|
"performedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"actionType": {
|
|
"type": "integer"
|
|
},
|
|
"actor": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"target": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"dateReference": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ProfileDetails": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 123
|
|
},
|
|
"foodsaver": {
|
|
"description": "Whether current session has foodsaver role",
|
|
"type": "boolean"
|
|
},
|
|
"isVerified": {
|
|
"description": "Whether user is verified",
|
|
"type": "boolean"
|
|
},
|
|
"regionId": {
|
|
"description": "Home region id",
|
|
"type": "integer"
|
|
},
|
|
"isSleeping": {
|
|
"description": "Whether user is sleeping",
|
|
"type": "boolean"
|
|
},
|
|
"regionName": {
|
|
"description": "Home region name",
|
|
"type": "string"
|
|
},
|
|
"aboutMePublic": {
|
|
"description": "Public about-me text",
|
|
"type": "string"
|
|
},
|
|
"mailboxId": {
|
|
"description": "Personal mailbox id",
|
|
"type": "integer",
|
|
"example": 5
|
|
},
|
|
"hasCalendarToken": {
|
|
"description": "Has calendar API token",
|
|
"type": "boolean"
|
|
},
|
|
"firstname": {
|
|
"description": "First name",
|
|
"type": "string",
|
|
"example": "Anna"
|
|
},
|
|
"lastname": {
|
|
"description": "Last name",
|
|
"type": "string",
|
|
"example": "Muster"
|
|
},
|
|
"gender": {
|
|
"description": "Gender",
|
|
"type": "integer"
|
|
},
|
|
"photo": {
|
|
"description": "Photo url or path",
|
|
"type": "string"
|
|
},
|
|
"lastPassDate": {
|
|
"description": "Date of last pass",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"lastPassUntilValid": {
|
|
"description": "Pass valid until",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"lastPassUntilValidInDays": {
|
|
"description": "Days until pass validity ends",
|
|
"type": "integer"
|
|
},
|
|
"hasActiveEmail": {
|
|
"description": "Has an active email/login activated",
|
|
"type": "boolean"
|
|
},
|
|
"coordinates": {
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
},
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"postcode": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"landline": {
|
|
"type": "string"
|
|
},
|
|
"mobile": {
|
|
"type": "string"
|
|
},
|
|
"birthday": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"aboutMeIntern": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "integer"
|
|
},
|
|
"regions": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "Foodsharing\\RestApi\\Models\\Region\\UserRegionModel"
|
|
}
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "Foodsharing\\RestApi\\Models\\Group\\UserGroupModel"
|
|
}
|
|
},
|
|
"position": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"VerificationHistoryEntry": {
|
|
"properties": {
|
|
"foodsaverId": {
|
|
"title": "Id of the foodsaver who was (de-)verified.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"date": {
|
|
"title": "Date and time at which the (de-)verification was done.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"wasVerified": {
|
|
"title": "Whether the foodsaver was verified (true) or deverified (false).",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"actor": {
|
|
"title": "The ambassador who did the (de-)verification. This can be null if, for example, the ambassador's profile does\nnot exist anymore.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PassHistoryEntry": {
|
|
"properties": {
|
|
"foodsaverId": {
|
|
"title": "Id of the foodsaver who's pass was created.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"date": {
|
|
"title": "Date and time at which the pass was created.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"actor": {
|
|
"title": "The person who created the pass. This can be null if, for example, the ambassador's profile does not exist\nanymore.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Poll": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of this poll.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"name": {
|
|
"title": "A short description of the poll that can serve as a title.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"description": {
|
|
"title": "A more detailed description of the topic of this poll.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"startDate": {
|
|
"title": "The date at which this poll began.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endDate": {
|
|
"title": "The date at which this poll will end or has ended.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"regionId": {
|
|
"title": "Identifier of the region or work group in which this poll takes place. Only members of that region are allowed\nto vote.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"scope": {
|
|
"title": "The scope is an additional constraint defining which user groups are allowed to vote. See {@link VotingScope}.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"type": {
|
|
"title": "The type defines how users can vote. Different types allow to vote for one or multiple choices or allow a score\nvoting. See {@link VotingType}.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"authorId": {
|
|
"title": "Id of the user who created this poll.",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"creationDate": {
|
|
"title": "Date at which this poll was created.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"numValues": {
|
|
"title": "The number of different values that each option is this poll can have.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"votes": {
|
|
"title": "Number of users who have voted. A value of null means that the results are not included in this poll object.",
|
|
"type": "integer"
|
|
},
|
|
"eligibleVotesCount": {
|
|
"title": "Number of users who are eligible to vote.",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"shuffleOptions": {
|
|
"title": "If true, options should be shown in a random order by the frontend.",
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PollForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"startDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endDate": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"isEligible": {
|
|
"type": "boolean"
|
|
},
|
|
"hasVoted": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"VisibilityType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
]
|
|
},
|
|
"DuplicateMode": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
"ActivityFilterItem": {
|
|
"description": "A specific activity that is to be hidden",
|
|
"properties": {
|
|
"id": {
|
|
"title": "id of the item.",
|
|
"type": "integer"
|
|
},
|
|
"index": {
|
|
"title": "The activity.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"GeoLocation": {
|
|
"properties": {
|
|
"lat": {
|
|
"title": "Latitude of the location.",
|
|
"type": "number",
|
|
"format": "float",
|
|
"default": 0,
|
|
"maximum": 90,
|
|
"minimum": -90,
|
|
"example": 52.5
|
|
},
|
|
"lon": {
|
|
"title": "Longitude of the location.",
|
|
"type": "number",
|
|
"format": "float",
|
|
"default": 0,
|
|
"maximum": 180,
|
|
"minimum": -180,
|
|
"example": 13.4
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EventType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"Address": {
|
|
"properties": {
|
|
"street": {
|
|
"title": "Street and street number.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"postalCode": {
|
|
"title": "zip code.",
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"title": "Name of city.",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EmailSendAttachment": {
|
|
"properties": {
|
|
"uuid": {
|
|
"title": "UUID of the uploaded file.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"filename": {
|
|
"title": "Original name of the file.",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AnswerRating": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"ReportReason": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
10,
|
|
15,
|
|
2010,
|
|
2011,
|
|
2012,
|
|
2013,
|
|
2014,
|
|
2020,
|
|
2030,
|
|
2031,
|
|
2040,
|
|
2041,
|
|
2050,
|
|
2060,
|
|
2061,
|
|
2070,
|
|
2080,
|
|
2090,
|
|
2100,
|
|
2110,
|
|
2120,
|
|
2130,
|
|
9999
|
|
]
|
|
},
|
|
"CreateStoreInformationModel": {
|
|
"required": [
|
|
"name",
|
|
"location",
|
|
"street",
|
|
"zipCode",
|
|
"city",
|
|
"publicInfo"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"title": "Name of the store.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"location": {
|
|
"title": "Location of the store.",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/GeoLocation"
|
|
}
|
|
]
|
|
},
|
|
"street": {
|
|
"title": "Street name with street number.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"zipCode": {
|
|
"title": "Zip code.",
|
|
"type": "string",
|
|
"maxLength": 5
|
|
},
|
|
"city": {
|
|
"title": "City name.",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"publicInfo": {
|
|
"title": "Public information about the store which is visible\nfor users which are looking for a store.",
|
|
"type": "string",
|
|
"maxLength": 520
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchGeoLocation": {
|
|
"properties": {
|
|
"lat": {
|
|
"title": "Latitude of the location.",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"lon": {
|
|
"title": "Longitude of the location.",
|
|
"type": "number",
|
|
"format": "float"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchAddress": {
|
|
"properties": {
|
|
"street": {
|
|
"title": "String with street and street number.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"city": {
|
|
"title": "String with city name.",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"postalCode": {
|
|
"title": "String with zip code of store.",
|
|
"type": "string",
|
|
"maxLength": 10
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchContactData": {
|
|
"properties": {
|
|
"name": {
|
|
"title": "String with name of contact person for store.",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
},
|
|
"phone": {
|
|
"title": "String with phone number of contact person for store.",
|
|
"description": "// Check phone number format?",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"fax": {
|
|
"title": "String with fax number of contact person for store.",
|
|
"description": "// Check phone number format?",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"email": {
|
|
"title": "String with e-mail of contact person for store.",
|
|
"description": "// Check email format?",
|
|
"type": "string",
|
|
"maxLength": 60
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PatchStoreOptionModel": {
|
|
"properties": {
|
|
"useRegionPickupRule": {
|
|
"title": "Boolean which represents usage of the region for pickup slot allocation rule.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TicketAttachment": {
|
|
"properties": {
|
|
"fileName": {
|
|
"title": "Original file name used for displaying.",
|
|
"type": "string"
|
|
},
|
|
"contentType": {
|
|
"title": "The file's content type.",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"title": "The file's content.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityFilter": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "id of the item",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "name of the item",
|
|
"type": "string"
|
|
},
|
|
"included": {
|
|
"title": "is this included",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivationStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
"ForumThreadForListView": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"example": "Beta Testing: API refactoring"
|
|
},
|
|
"pinnedLevel": {
|
|
"description": "Pinned level from -1 (end of list) to 10 (top of list)",
|
|
"type": "integer",
|
|
"example": 3
|
|
},
|
|
"isLocked": {
|
|
"type": "boolean"
|
|
},
|
|
"latestPost": {
|
|
"$ref": "#/components/schemas/ForumPostSummary"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ForumThreadPermissions": {
|
|
"properties": {
|
|
"mayModerate": {
|
|
"type": "boolean"
|
|
},
|
|
"mayHidePosts": {
|
|
"type": "boolean"
|
|
},
|
|
"mayDelete": {
|
|
"description": "Whether the user is allowed to delete posts of other users (own posts are always deletable)",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SubscriptionsStatus": {
|
|
"properties": {
|
|
"isBellSubscribed": {
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"isMailSubscribed": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ForumPost": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"author": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"hidden": {
|
|
"$ref": "#/components/schemas/HiddenPostInfo"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EmailAddress2": {
|
|
"properties": {
|
|
"mailbox": {
|
|
"type": "string"
|
|
},
|
|
"hostname": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreCategoryType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"PublicTimes": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
]
|
|
},
|
|
"TeamSearchStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"CooperationStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
4,
|
|
5,
|
|
6,
|
|
7
|
|
]
|
|
},
|
|
"SessionStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"BasicRegionStatistics": {
|
|
"properties": {
|
|
"lastUpdated": {
|
|
"title": "The last time that these statistics were calculated for the correponding region.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"activeHomeRegionFoodsavers": {
|
|
"title": "Number of verified foodsavers with home region within the region that logged in within the last month.",
|
|
"type": "integer"
|
|
},
|
|
"activeCoorporations": {
|
|
"title": "Number of currently cooperating stores.",
|
|
"type": "integer"
|
|
},
|
|
"pickupsLastMonth": {
|
|
"title": "Number of filled pickup slots in the last month.",
|
|
"type": "integer"
|
|
},
|
|
"savedFoodKgLastMonth": {
|
|
"title": "Weight of saved food of the last month. Rounded to full kg.",
|
|
"type": "integer"
|
|
},
|
|
"activeFoodSharePoints": {
|
|
"title": "Number of active food share points.",
|
|
"type": "integer"
|
|
},
|
|
"foodBasketsLastMonth": {
|
|
"title": "Number of foodbaskets in the last month.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ProfileWithMail": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 342528
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "Franzi"
|
|
},
|
|
"avatar": {
|
|
"type": "string",
|
|
"example": "/api/uploads/99d1fb45-9748-3510-ac02-87b46c40048c"
|
|
},
|
|
"isSleeping": {
|
|
"description": "Whether the user is currently using the sleeping hat function",
|
|
"type": "boolean"
|
|
},
|
|
"mail": {
|
|
"type": "string"
|
|
},
|
|
"lastName": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"RegionSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"email": {
|
|
"description": "Email address of the region. Includes the '@...' mail ending.",
|
|
"type": "string",
|
|
"example": "muenster@foodsharing.network"
|
|
},
|
|
"parentId": {
|
|
"description": "ID of the region.",
|
|
"type": "integer",
|
|
"example": 42
|
|
},
|
|
"parentName": {
|
|
"description": "Name of the regions parent region.",
|
|
"type": "string",
|
|
"example": "Nordrhein-Westfalen"
|
|
},
|
|
"isMember": {
|
|
"description": "Whether the searching user is member in the region.",
|
|
"type": "boolean"
|
|
},
|
|
"ambassadors": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"WorkingGroupSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"email": {
|
|
"description": "Includes the '@...' mail ending.",
|
|
"type": "string",
|
|
"example": "bildung.muenster@foodsharing.network"
|
|
},
|
|
"parentId": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"parentName": {
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"isMember": {
|
|
"description": "Whether the searching user is member in the working group.",
|
|
"type": "boolean"
|
|
},
|
|
"isAdmin": {
|
|
"description": "Whether the searching user is admin in the working group.",
|
|
"type": "boolean"
|
|
},
|
|
"admins": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"cooperationStatus": {
|
|
"description": "Cooperation status of the store",
|
|
"example": 5,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/CooperationStatus"
|
|
}
|
|
]
|
|
},
|
|
"street": {
|
|
"description": "Street in which the store lays",
|
|
"type": "string",
|
|
"example": "Oskar-Michels-Ring 29"
|
|
},
|
|
"zipCode": {
|
|
"description": "Zip code of the stores adress",
|
|
"type": "string",
|
|
"example": "48163"
|
|
},
|
|
"city": {
|
|
"description": "City of the stores adress",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionName": {
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"membershipStatus": {
|
|
"description": "Identifier of the searching users membership to the store",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"isManager": {
|
|
"description": "Whether the searching user is manager of the store",
|
|
"type": "boolean"
|
|
},
|
|
"chainName": {
|
|
"description": "Name of the chain the store belongs to, null if the store has no chain",
|
|
"type": "string",
|
|
"example": null
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"FoodSharePointSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"street": {
|
|
"type": "string",
|
|
"example": "Oskar-Michels-Ring 29"
|
|
},
|
|
"zipCode": {
|
|
"type": "string",
|
|
"example": "12345"
|
|
},
|
|
"city": {
|
|
"description": "City of the food share points adress.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"regionId": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionName": {
|
|
"description": "Name of the food share points region.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ChatSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"lastMessageSentAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"lastFoodsaverId": {
|
|
"description": "Unique identifier of the foodsaver who last sent a message in the chat.",
|
|
"type": "integer",
|
|
"example": 51
|
|
},
|
|
"lastFoodsaverName": {
|
|
"description": "Name of the foodsaver who last sent a message in the chat.",
|
|
"type": "string",
|
|
"example": "Max"
|
|
},
|
|
"lastMessage": {
|
|
"description": "Last message that was sent in the chat.",
|
|
"type": "string",
|
|
"example": "Have a nice day!"
|
|
},
|
|
"members": {
|
|
"description": "Members of the chat. This includes at most 5 members to be displayed in the search result.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"memberCount": {
|
|
"description": "Number of members in the chat.",
|
|
"type": "integer",
|
|
"example": 12
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"UserSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"avatar": {
|
|
"description": "URL of the users avatar. May be null.",
|
|
"type": "string",
|
|
"example": null
|
|
},
|
|
"lastName": {
|
|
"description": "Last name of the user.",
|
|
"type": "string",
|
|
"example": "Mustermann"
|
|
},
|
|
"mobile": {
|
|
"description": "Mobile phone number of the user.",
|
|
"type": "string",
|
|
"example": "+49 1234 56789"
|
|
},
|
|
"isBuddy": {
|
|
"description": "Whether the searching user and the found user are buddies.",
|
|
"type": "boolean"
|
|
},
|
|
"isVerified": {
|
|
"description": "Whether the user is verified.",
|
|
"type": "boolean"
|
|
},
|
|
"regionId": {
|
|
"description": "Unique identifier of the users home region.",
|
|
"type": "integer"
|
|
},
|
|
"regionName": {
|
|
"description": "Name of the users home region.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"email": {
|
|
"description": "The users private mail address.",
|
|
"type": "string",
|
|
"example": "max@mustermann.com"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MailSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"senderMail": {
|
|
"description": "The senders mail address",
|
|
"type": "string",
|
|
"example": "sender@example.com"
|
|
},
|
|
"senderName": {
|
|
"description": "The senders name",
|
|
"type": "string",
|
|
"example": "Sender"
|
|
},
|
|
"recipientMail": {
|
|
"description": "The first recipients mail address",
|
|
"type": "string",
|
|
"example": "developer@foodsharing.network"
|
|
},
|
|
"recipientName": {
|
|
"description": "The first recipients name.",
|
|
"type": "string",
|
|
"example": "foodsharing Developer"
|
|
},
|
|
"recipientCount": {
|
|
"description": "The number of recipients",
|
|
"type": "integer",
|
|
"example": "3"
|
|
},
|
|
"hasAttachments": {
|
|
"description": "Whether the mail has attachements",
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"sentAt": {
|
|
"description": "When the mail was sent",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"example": "2023-10-04 15:21:52"
|
|
},
|
|
"folder": {
|
|
"description": "The folder the mail is saved in",
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"EventSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"locationName": {
|
|
"description": "The name of the events location.",
|
|
"type": "string",
|
|
"example": "foodsharing Developer"
|
|
},
|
|
"status": {
|
|
"description": "The users invitation status",
|
|
"type": "integer",
|
|
"example": "1"
|
|
},
|
|
"startAt": {
|
|
"description": "When the event starts",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"endAt": {
|
|
"description": "When the event starts",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"locationType": {
|
|
"description": "The event location type",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionId": {
|
|
"description": "The id of the hosting region / group",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionName": {
|
|
"description": "The name of the hosting region / group",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PollSearchResult": {
|
|
"properties": {
|
|
"id": {
|
|
"description": "Unique identifier of the entity represented by the search result.",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"name": {
|
|
"description": "Name of the entity represented by the search result.",
|
|
"type": "string",
|
|
"example": "Name"
|
|
},
|
|
"searchString": {
|
|
"description": "Search criteria to test the search against.",
|
|
"type": "string",
|
|
"example": "M\u00fcnster;meunster"
|
|
},
|
|
"startAt": {
|
|
"description": "When the poll starts",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"example": "2023-10-04 15:21:52"
|
|
},
|
|
"endAt": {
|
|
"description": "When the poll ends",
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"example": "2023-10-04 15:21:52"
|
|
},
|
|
"regionId": {
|
|
"description": "The id of the hosting region / group",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regionName": {
|
|
"description": "The name of the hosting region / group",
|
|
"type": "string",
|
|
"example": "M\u00fcnster"
|
|
},
|
|
"hasVoted": {
|
|
"description": "Whether the user has already voted",
|
|
"type": "boolean",
|
|
"example": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Role": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5
|
|
]
|
|
},
|
|
"GeneralStatistic": {
|
|
"description": "Represents the overall statistics",
|
|
"properties": {
|
|
"fetchWeight": {
|
|
"description": "Food successfully saved from the garbage can.",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"fetchCount": {
|
|
"description": "Number of rescue missions",
|
|
"type": "integer"
|
|
},
|
|
"cooperationsCount": {
|
|
"description": "Number of cooperating companies",
|
|
"type": "integer"
|
|
},
|
|
"botCount": {
|
|
"description": "Number of ambassadors",
|
|
"type": "integer"
|
|
},
|
|
"foodsaverCount": {
|
|
"description": "Number of Foodsaver volunteers",
|
|
"type": "integer"
|
|
},
|
|
"fairteilerCount": {
|
|
"description": "Number of fairteiler used",
|
|
"type": "integer"
|
|
},
|
|
"totalBaskets": {
|
|
"description": "Total number of food baskets",
|
|
"type": "integer"
|
|
},
|
|
"avgWeeklyBaskets": {
|
|
"description": "Average food baskets per week",
|
|
"type": "integer"
|
|
},
|
|
"countAllFoodsaver": {
|
|
"description": "Number of registered Foodsaver",
|
|
"type": "integer"
|
|
},
|
|
"countActiveFoodSharePoints": {
|
|
"description": "Number of fairteiler used for food exchange",
|
|
"type": "integer"
|
|
},
|
|
"avgDailyFetchCount": {
|
|
"description": "Average rescue missions per day",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PickupModel": {
|
|
"description": "Statistics in three different time periods",
|
|
"properties": {
|
|
"pickupOverAllTime": {
|
|
"description": "pick-ups over all time",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ActivityStatisticItem"
|
|
}
|
|
},
|
|
"pickupInDefinedPeriod": {
|
|
"description": "pick-ups in the defined period",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PickupItem"
|
|
},
|
|
"default": null,
|
|
"nullable": true
|
|
},
|
|
"pickupCurrentMonth": {
|
|
"description": "pick-ups in current month",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PickupItem"
|
|
},
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreChain": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of the chain.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"title": "Name of the chain.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"status": {
|
|
"title": "Indicates the cooperation status of this chain.",
|
|
"description": "- '0' - Not Cooperating\n- '1' - Waiting, i.e. in negotiation\n- '2' - Cooperating.",
|
|
"maximum": 2,
|
|
"minimum": 0,
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/components/schemas/StoreChainStatus"
|
|
}
|
|
]
|
|
},
|
|
"headquartersZip": {
|
|
"title": "ZIP code of the chains headquater.",
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"headquartersCity": {
|
|
"title": "City of the chains headquater.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"headquartersCountry": {
|
|
"title": "Country of the chains headquater.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 50
|
|
},
|
|
"allowPress": {
|
|
"title": "Whether the chain can be referred to in press releases.",
|
|
"type": "boolean"
|
|
},
|
|
"forumThread": {
|
|
"title": "Identifier of a forum thread related to this chain.",
|
|
"description": "Only visible to members of AG store chain",
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"notes": {
|
|
"title": "Miscellaneous notes.",
|
|
"description": "Field does not support HTML, Markdown or multiline strings.",
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"commonStoreInformation": {
|
|
"title": "Information about the chain to be displayed on every related stores page.",
|
|
"type": "string",
|
|
"maxLength": 16777215
|
|
},
|
|
"estimatedStoreCount": {
|
|
"title": "Count of estimated stores.",
|
|
"description": "Only visible to members of AG store chain",
|
|
"type": "integer",
|
|
"default": 0,
|
|
"minimum": 0
|
|
},
|
|
"modificationDate": {
|
|
"title": "Date of last modification.",
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"regionId": {
|
|
"title": "Region of store chain management.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MinimalRegionIdentifier": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"default": null,
|
|
"nullable": true
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"MinimalIdentifier": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Unique identifier of entry.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreChainInformation": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Identifier of the store chain.",
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"information": {
|
|
"title": "Public information about the chain.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ContactData": {
|
|
"properties": {
|
|
"name": {
|
|
"title": "String with name of contact person for store.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"phone": {
|
|
"title": "String with phone number of contact person for store.",
|
|
"description": "// Check phone number format?",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"fax": {
|
|
"title": "String with fax number of contact person for store.",
|
|
"description": "// Check phone number format?",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"email": {
|
|
"title": "String with e-mail of contact person for store.",
|
|
"description": "// Check email? format",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ConvinceStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
]
|
|
},
|
|
"PublicityStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"StickerStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
"StoreOptionModel": {
|
|
"properties": {
|
|
"useRegionPickupRule": {
|
|
"title": "Boolean which represents usage of the region for pickup slot allocation rule.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ForumPostSummary": {
|
|
"properties": {
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"author": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"HiddenPostInfo": {
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"moderator": {
|
|
"$ref": "#/components/schemas/Profile"
|
|
},
|
|
"time": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ActivityStatisticItem": {
|
|
"description": "An element of statistical information for the ranking list",
|
|
"properties": {
|
|
"name": {
|
|
"description": "The Name",
|
|
"type": "string"
|
|
},
|
|
"fetchWeight": {
|
|
"description": "Food successfully saved from the garbage can.",
|
|
"type": "number",
|
|
"format": "float"
|
|
},
|
|
"fetchCount": {
|
|
"description": "Number of rescue missions",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PickupItem": {
|
|
"description": "basic statistics data for pickup",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Name of the pickup",
|
|
"type": "string"
|
|
},
|
|
"fetchCount": {
|
|
"description": "fetch count from pickup",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"StoreChainStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"api_key": {
|
|
"type": "apiKey",
|
|
"description": "Requests manipulating data need to supply a CSRF token",
|
|
"name": "X-CSRF-Token",
|
|
"in": "header"
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"api_key": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "achievement"
|
|
},
|
|
{
|
|
"name": "activities"
|
|
},
|
|
{
|
|
"name": "application"
|
|
},
|
|
{
|
|
"name": "banana"
|
|
},
|
|
{
|
|
"name": "basket"
|
|
},
|
|
{
|
|
"name": "bells"
|
|
},
|
|
{
|
|
"name": "blog"
|
|
},
|
|
{
|
|
"name": "buddy"
|
|
},
|
|
{
|
|
"name": "calendar"
|
|
},
|
|
{
|
|
"name": "categories"
|
|
},
|
|
{
|
|
"name": "content"
|
|
},
|
|
{
|
|
"name": "donation"
|
|
},
|
|
{
|
|
"name": "verification"
|
|
},
|
|
{
|
|
"name": "events"
|
|
},
|
|
{
|
|
"name": "feature-toggle"
|
|
},
|
|
{
|
|
"name": "foodSharePoints"
|
|
},
|
|
{
|
|
"name": "foodsaver"
|
|
},
|
|
{
|
|
"name": "forum"
|
|
},
|
|
{
|
|
"name": "region"
|
|
},
|
|
{
|
|
"name": "locale"
|
|
},
|
|
{
|
|
"name": "mailbox"
|
|
},
|
|
{
|
|
"name": "map"
|
|
},
|
|
{
|
|
"name": "conversation"
|
|
},
|
|
{
|
|
"name": "notifications"
|
|
},
|
|
{
|
|
"name": "passkey"
|
|
},
|
|
{
|
|
"name": "petition"
|
|
},
|
|
{
|
|
"name": "pickup"
|
|
},
|
|
{
|
|
"name": "push-notification"
|
|
},
|
|
{
|
|
"name": "quiz"
|
|
},
|
|
{
|
|
"name": "report"
|
|
},
|
|
{
|
|
"name": "resource"
|
|
},
|
|
{
|
|
"name": "search"
|
|
},
|
|
{
|
|
"name": "settings"
|
|
},
|
|
{
|
|
"name": "statistics"
|
|
},
|
|
{
|
|
"name": "chain"
|
|
},
|
|
{
|
|
"name": "stores"
|
|
},
|
|
{
|
|
"name": "support"
|
|
},
|
|
{
|
|
"name": "upload"
|
|
},
|
|
{
|
|
"name": "user"
|
|
},
|
|
{
|
|
"name": "polls"
|
|
},
|
|
{
|
|
"name": "wall"
|
|
},
|
|
{
|
|
"name": "groups"
|
|
}
|
|
]
|
|
}
|
|
} |