{
	"info": {
		"_postman_id": "91ca115a-c5f8-49eb-8ec0-44e87d13d470",
		"name": "firebnb",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "27812176",
		"_collection_link": "https://universal-astronaut-873956.postman.co/workspace/FireBnb~69d55355-2b1f-4936-a03d-32df80a19827/collection/27812176-91ca115a-c5f8-49eb-8ec0-44e87d13d470?action=share&source=collection_link&creator=27812176"
	},
	"item": [
		{
			"name": "user",
			"item": [
				{
					"name": "createUser",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"full_name\": \"Testowy uĹźytkownik\",\r\n    \"password\": \"user123!\",\r\n    \"email\": \"test@user.com\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/user/create",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"user",
								"create"
							]
						}
					},
					"response": []
				},
				{
					"name": "updateUser",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"full_name\": \"test_user\",\r\n    \"password\": \"user123!\",\r\n    \"email\": \"test_user2@email.com\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/user/update",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"user",
								"update"
							]
						}
					},
					"response": []
				},
				{
					"name": "deleteUser",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"email\": \"test_user2@email.com\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/user/delete",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"user",
								"delete"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "auth",
			"item": [
				{
					"name": "login",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"email\": \"test@user.com\",\r\n    \"password\": \"user123!\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/auth/login",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"auth",
								"login"
							]
						}
					},
					"response": []
				},
				{
					"name": "getUser",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/auth/me",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"auth",
								"me"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "bnb",
			"item": [
				{
					"name": "getBnbById",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/bnb/index/6609d5ab7444dd5da80bd413",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"bnb",
								"index",
								"6609d5ab7444dd5da80bd413"
							]
						}
					},
					"response": []
				},
				{
					"name": "updateBnb",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"id\": \"6609d2337444dd5da80bd3fd\",\r\n    \"space\": \"10\",\r\n    \"cost\": \"40\",\r\n    \"address\": \"Ulica 123, 30-040 RzeszĂłw\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/bnb/update",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"bnb",
								"update"
							]
						}
					},
					"response": []
				},
				{
					"name": "createBnb",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"space\": \"20\",\r\n    \"cost\": \"40\",\r\n    \"address\": \"Ulica 123, 30-040 RzeszĂłw\",\r\n    \"user_id\": 1\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/bnb/create",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"bnb",
								"create"
							]
						}
					},
					"response": []
				},
				{
					"name": "getBnbs",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true,
						"disabledSystemHeaders": {}
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/bnb/list",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"bnb",
								"list"
							],
							"query": [
								{
									"key": "min_cost",
									"value": "0",
									"disabled": true
								},
								{
									"key": "max_cost",
									"value": "100",
									"disabled": true
								},
								{
									"key": "min_space",
									"value": "0",
									"disabled": true
								},
								{
									"key": "max_space",
									"value": "100",
									"disabled": true
								},
								{
									"key": "address_like",
									"value": "Ulica",
									"disabled": true
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "deleteBnb",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/bnb/delete/6609d2337444dd5da80bd3fd",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"bnb",
								"delete",
								"6609d2337444dd5da80bd3fd"
							]
						}
					},
					"response": []
				}
			]
		},
		{
			"name": "reservations",
			"item": [
				{
					"name": "createReservation",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"start_date\": \"2024-05-16\",\r\n    \"end_date\": \"2024-05-17\",\r\n    \"bnb_id\": \"6609d5ab7444dd5da80bd413\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/create",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"create"
							]
						}
					},
					"response": []
				},
				{
					"name": "updateReservation",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "PUT",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"id\": \"6609d5ab7444dd5da80bd413\",\r\n    \"start_date\": \"2024-05-01\",\r\n    \"end_date\": \"2024-05-07\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/update",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"update"
							]
						}
					},
					"response": []
				},
				{
					"name": "getReservationById",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/index/1",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"index",
								"1"
							]
						}
					},
					"response": []
				},
				{
					"name": "deleteReservation",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{jwt_token}}",
									"type": "string"
								}
							]
						},
						"method": "DELETE",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/delete/1",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"delete",
								"1"
							]
						}
					},
					"response": []
				},
				{
					"name": "getReservations",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/list?bnb_id=6609d5ab7444dd5da80bd413",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"list"
							],
							"query": [
								{
									"key": "start_date",
									"value": "100",
									"disabled": true
								},
								{
									"key": "end_date",
									"value": "0",
									"disabled": true
								},
								{
									"key": "bnb_id",
									"value": "6609d5ab7444dd5da80bd413"
								}
							]
						}
					},
					"response": []
				},
				{
					"name": "getUserReservations",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "",
								"value": "",
								"type": "text",
								"disabled": true
							},
							{
								"key": "Authorization",
								"value": "Baerer {{jwt_token}}",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{API_URL}}/api/reservation/list/user",
							"host": [
								"{{API_URL}}"
							],
							"path": [
								"api",
								"reservation",
								"list",
								"user"
							],
							"query": [
								{
									"key": "start_date",
									"value": "100",
									"disabled": true
								},
								{
									"key": "end_date",
									"value": "0",
									"disabled": true
								}
							]
						}
					},
					"response": []
				}
			]
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "API_URL",
			"value": "http://localhost:5000",
			"type": "string"
		},
		{
			"key": "jwt_token",
			"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImtyenlzaWVrLmtvbG9kemllajIzQGdtYWlsLmNvbSIsImlhdCI6MTcyNzEwNjExOCwiZXhwIjoxNzI3MTA5NzE4fQ.SQEbaR75--6GGW7JYA3cLc3F7v8OV1BIeZMnlZbOW3s",
			"type": "string"
		}
	]
}