diff --git a/back/api/booking/documentation/1.0.0/booking.json b/back/api/booking/documentation/1.0.0/booking.json index 39eb8e32..99be04c8 100644 --- a/back/api/booking/documentation/1.0.0/booking.json +++ b/back/api/booking/documentation/1.0.0/booking.json @@ -739,7 +739,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -830,9 +829,6 @@ "published": { "type": "boolean" }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -856,6 +852,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, diff --git a/back/api/booking/models/booking.settings.json b/back/api/booking/models/booking.settings.json index 253013c6..f05ed831 100644 --- a/back/api/booking/models/booking.settings.json +++ b/back/api/booking/models/booking.settings.json @@ -32,8 +32,8 @@ "collection": "message" }, "espace": { - "model": "espace", - "via": "bookings" + "via": "bookings", + "model": "espace" }, "place": { "plugin": "users-permissions", diff --git a/back/api/city/config/routes.json b/back/api/city/config/routes.json new file mode 100644 index 00000000..b60c2821 --- /dev/null +++ b/back/api/city/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/cities", + "handler": "city.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/cities/count", + "handler": "city.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/cities/:id", + "handler": "city.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/cities", + "handler": "city.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/cities/:id", + "handler": "city.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/cities/:id", + "handler": "city.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/back/api/city/controllers/city.js b/back/api/city/controllers/city.js new file mode 100644 index 00000000..e8608953 --- /dev/null +++ b/back/api/city/controllers/city.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/back/api/city/documentation/1.0.0/city.json b/back/api/city/documentation/1.0.0/city.json new file mode 100644 index 00000000..42583099 --- /dev/null +++ b/back/api/city/documentation/1.0.0/city.json @@ -0,0 +1,719 @@ +{ + "paths": { + "/cities": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/City" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "post": { + "deprecated": false, + "description": "Create a new record", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewCity" + } + } + } + } + } + }, + "/cities/count": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [] + } + }, + "/cities/{id}": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a record", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewCity" + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "deprecated": false, + "description": "Delete a record", + "responses": { + "200": { + "description": "deletes a single record based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + } + } + }, + "components": { + "schemas": { + "City": { + "required": [ + "id", + "name", + "latitude", + "longitude" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "espaces": { + "type": "array", + "items": { + "required": [ + "id", + "name", + "surface", + "roomLength", + "width", + "height", + "mirror", + "danceBar", + "accomodation", + "technicalStaff", + "floor", + "address", + "latitude", + "longitude", + "country" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "surface": { + "type": "number" + }, + "roomLength": { + "type": "number" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "mirror": { + "type": "boolean" + }, + "danceBar": { + "type": "boolean" + }, + "accomodation": { + "type": "boolean" + }, + "technicalStaff": { + "type": "boolean" + }, + "floor": { + "type": "string", + "enum": [ + "plancherDanse", + "parquetTraditionnel", + "other", + "todefine" + ] + }, + "otherFloor": { + "type": "string" + }, + "about": { + "type": "string" + }, + "details": { + "type": "string" + }, + "address": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "type": "array", + "items": { + "type": "string" + } + }, + "users_permissions_user": { + "type": "string" + }, + "disponibilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "scheduleDetails": { + "type": "string" + }, + "filledUntil": { + "type": "string" + }, + "published": { + "type": "boolean" + }, + "bookings": { + "type": "array", + "items": { + "type": "string" + } + }, + "country": { + "type": "string" + }, + "external_id": { + "type": "integer" + }, + "danceCarpet": { + "type": "string", + "enum": [ + "true", + "false", + "possible" + ] + }, + "slug": { + "type": "string" + }, + "city": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + } + } + }, + "NewCity": { + "required": [ + "name", + "latitude", + "longitude" + ], + "properties": { + "name": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "espaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + } + }, + "tags": [ + { + "name": "City" + } + ] +} \ No newline at end of file diff --git a/back/api/city/models/city.js b/back/api/city/models/city.js new file mode 100644 index 00000000..5114d577 --- /dev/null +++ b/back/api/city/models/city.js @@ -0,0 +1,34 @@ +"use strict"; +const geocodingService = require("@mapbox/mapbox-sdk/services/geocoding"); +const mbxClient = require("@mapbox/mapbox-sdk"); + +const baseClient = mbxClient({ + accessToken: process.env.MAPBOX_TOKEN, +}); +const geocoder = geocodingService(baseClient); + +module.exports = { + lifecycles: { + beforeCreate: async (data) => { + if (data.name) { + await geocoder + .forwardGeocode({ + query: data.name, + }) + .send() + .then((res) => { + if (!res.body.features || res.body.features.length === 0) + return null; + const city = res.body.features.find((match) => + match.place_type.includes("place") + ); + if (!city) throw new Error("City not found with mapbox"); + + data.name = city.text.toLowerCase(); + data.latitude = city.geometry.coordinates[0]; + data.longitude = city.geometry.coordinates[1]; + }); + } + }, + }, +}; diff --git a/back/api/city/models/city.settings.json b/back/api/city/models/city.settings.json new file mode 100644 index 00000000..1b315748 --- /dev/null +++ b/back/api/city/models/city.settings.json @@ -0,0 +1,32 @@ +{ + "kind": "collectionType", + "collectionName": "cities", + "info": { + "name": "City", + "description": "" + }, + "options": { + "increments": true, + "timestamps": true, + "draftAndPublish": false + }, + "attributes": { + "name": { + "type": "string", + "required": true, + "unique": true + }, + "latitude": { + "type": "string", + "required": true + }, + "longitude": { + "type": "string", + "required": true + }, + "espaces": { + "collection": "espace", + "via": "city" + } + } +} diff --git a/back/api/city/services/city.js b/back/api/city/services/city.js new file mode 100644 index 00000000..6538a8c8 --- /dev/null +++ b/back/api/city/services/city.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/developer-docs/latest/development/backend-customization.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/back/api/disponibility/documentation/1.0.0/disponibility.json b/back/api/disponibility/documentation/1.0.0/disponibility.json index ce060818..f837f2f8 100644 --- a/back/api/disponibility/documentation/1.0.0/disponibility.json +++ b/back/api/disponibility/documentation/1.0.0/disponibility.json @@ -629,7 +629,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -720,9 +719,6 @@ "published": { "type": "boolean" }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -746,6 +742,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, diff --git a/back/api/disponibility/models/disponibility.settings.json b/back/api/disponibility/models/disponibility.settings.json index ac8641ef..e16cbbdf 100644 --- a/back/api/disponibility/models/disponibility.settings.json +++ b/back/api/disponibility/models/disponibility.settings.json @@ -29,8 +29,8 @@ "required": true }, "espace": { - "model": "espace", - "via": "disponibilities" + "via": "disponibilities", + "model": "espace" }, "type": { "type": "enumeration", diff --git a/back/api/espace/controllers/espace.js b/back/api/espace/controllers/espace.js index aa20d127..328c96c6 100644 --- a/back/api/espace/controllers/espace.js +++ b/back/api/espace/controllers/espace.js @@ -31,7 +31,7 @@ module.exports = { }, async getCities() { const knex = strapi.connections.default; - return knex.distinct().from("place").pluck("city").orderBy("city", "asc"); + // return knex.distinct().from("place").pluck("city").orderBy("city", "asc"); }, async find(ctx) { const { _sort, ...query } = ctx.query; diff --git a/back/api/espace/documentation/1.0.0/espace.json b/back/api/espace/documentation/1.0.0/espace.json index b62b13df..cf6f2c88 100644 --- a/back/api/espace/documentation/1.0.0/espace.json +++ b/back/api/espace/documentation/1.0.0/espace.json @@ -644,7 +644,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -1050,9 +1049,6 @@ "type": "boolean", "default": true }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -1121,6 +1117,40 @@ }, "slug": { "type": "string" + }, + "city": { + "required": [ + "id", + "name", + "latitude", + "longitude" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "espaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } } } }, @@ -1139,7 +1169,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -1217,9 +1246,6 @@ "type": "boolean", "default": true }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -1243,6 +1269,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, diff --git a/back/api/espace/documentation/1.0.0/overrides/espace.json b/back/api/espace/documentation/1.0.0/overrides/espace.json index 94ec0159..9765e8d9 100644 --- a/back/api/espace/documentation/1.0.0/overrides/espace.json +++ b/back/api/espace/documentation/1.0.0/overrides/espace.json @@ -883,7 +883,7 @@ "default": true }, "city": { - "type": "string" + "$ref": "#/components/schemas/City" }, "country": { "type": "string" diff --git a/back/api/espace/models/espace.js b/back/api/espace/models/espace.js index 59b9af28..83c6c707 100644 --- a/back/api/espace/models/espace.js +++ b/back/api/espace/models/espace.js @@ -6,6 +6,23 @@ const isPast = require("date-fns/isPast"); * to customize this model */ +const checkCity = async (data) => { + if (data.city) { + const city = await strapi + .query("city") + .findOne({ name: data.city.toLowerCase() }); + + if (city) { + data.city = city.id; + } else { + const createdCity = await strapi + .query("city") + .create({ name: data.city.toLowerCase() }); + data.city = createdCity.id; + } + } +}; + module.exports = { lifecycles: { beforeCreate: async (data) => { @@ -13,11 +30,13 @@ module.exports = { if (data.name) { data.slug = createSlug(data.name); } + await checkCity(data); }, beforeUpdate: async (params, data) => { if (data.name) { data.slug = createSlug(data.name); } + await checkCity(data); }, async afterFindOne(result) { if (result) { diff --git a/back/api/espace/models/espace.settings.json b/back/api/espace/models/espace.settings.json index f3f3d1c2..1005db28 100644 --- a/back/api/espace/models/espace.settings.json +++ b/back/api/espace/models/espace.settings.json @@ -99,13 +99,13 @@ "required": false }, "users_permissions_user": { - "via": "espaces", "plugin": "users-permissions", - "model": "user" + "model": "user", + "via": "espaces" }, "disponibilities": { - "via": "espace", - "collection": "disponibility" + "collection": "disponibility", + "via": "espace" }, "scheduleDetails": { "type": "text" @@ -117,13 +117,9 @@ "type": "boolean", "default": true }, - "city": { - "type": "string", - "required": true - }, "bookings": { - "via": "espace", - "collection": "booking" + "collection": "booking", + "via": "espace" }, "country": { "type": "string", @@ -145,6 +141,10 @@ "type": "string", "required": false, "unique": true + }, + "city": { + "via": "espaces", + "model": "city" } } } diff --git a/back/extensions/documentation/documentation/1.0.0/full_documentation.json b/back/extensions/documentation/documentation/1.0.0/full_documentation.json index aaad1b42..b43b67b9 100644 --- a/back/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/back/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "05/05/2021 1:32:27 AM" + "x-generation-date": "05/05/2021 1:43:21 PM" }, "x-strapi-config": { "path": "/documentation", @@ -1140,6 +1140,517 @@ ] } }, + "/cities": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/City" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "post": { + "deprecated": false, + "description": "Create a new record", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewCity" + } + } + } + } + } + }, + "/cities/count": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "type": "integer" + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [] + } + }, + "/cities/{id}": { + "get": { + "deprecated": false, + "description": "", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a record", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/City" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewCity" + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "delete": { + "deprecated": false, + "description": "Delete a record", + "responses": { + "200": { + "description": "deletes a single record based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "City" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "string" + } + } + ] + } + }, "/contacts": { "get": { "deprecated": false, @@ -8607,6 +9118,201 @@ } } }, + "City": { + "required": [ + "id", + "name", + "latitude", + "longitude" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "espaces": { + "type": "array", + "items": { + "required": [ + "id", + "name", + "surface", + "roomLength", + "width", + "height", + "mirror", + "danceBar", + "accomodation", + "technicalStaff", + "floor", + "address", + "latitude", + "longitude", + "country" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "surface": { + "type": "number" + }, + "roomLength": { + "type": "number" + }, + "width": { + "type": "number" + }, + "height": { + "type": "number" + }, + "mirror": { + "type": "boolean" + }, + "danceBar": { + "type": "boolean" + }, + "accomodation": { + "type": "boolean" + }, + "technicalStaff": { + "type": "boolean" + }, + "floor": { + "type": "string", + "enum": [ + "plancherDanse", + "parquetTraditionnel", + "other", + "todefine" + ] + }, + "otherFloor": { + "type": "string" + }, + "about": { + "type": "string" + }, + "details": { + "type": "string" + }, + "address": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "type": "array", + "items": { + "type": "string" + } + }, + "users_permissions_user": { + "type": "string" + }, + "disponibilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "scheduleDetails": { + "type": "string" + }, + "filledUntil": { + "type": "string" + }, + "published": { + "type": "boolean" + }, + "bookings": { + "type": "array", + "items": { + "type": "string" + } + }, + "country": { + "type": "string" + }, + "external_id": { + "type": "integer" + }, + "danceCarpet": { + "type": "string", + "enum": [ + "true", + "false", + "possible" + ] + }, + "slug": { + "type": "string" + }, + "city": { + "type": "string" + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + } + } + } + }, + "NewCity": { + "required": [ + "name", + "latitude", + "longitude" + ], + "properties": { + "name": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "espaces": { + "type": "array", + "items": { + "type": "string" + } + }, + "created_by": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + } + }, "Contact": { "required": [ "id", @@ -8697,7 +9403,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -8788,9 +9493,6 @@ "published": { "type": "boolean" }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -8814,6 +9516,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, @@ -9066,7 +9771,7 @@ "default": true }, "city": { - "type": "string" + "$ref": "#/components/schemas/City" }, "country": { "type": "string" @@ -9102,7 +9807,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -9180,9 +9884,6 @@ "type": "boolean", "default": true }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -9206,6 +9907,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, @@ -10245,6 +10949,9 @@ { "name": "Booking" }, + { + "name": "City" + }, { "name": "Contact" }, diff --git a/back/extensions/users-permissions/documentation/1.0.0/users-permissions-User.json b/back/extensions/users-permissions/documentation/1.0.0/users-permissions-User.json index 9f029eb1..c5127e70 100644 --- a/back/extensions/users-permissions/documentation/1.0.0/users-permissions-User.json +++ b/back/extensions/users-permissions/documentation/1.0.0/users-permissions-User.json @@ -1335,7 +1335,6 @@ "address", "latitude", "longitude", - "city", "country" ], "properties": { @@ -1426,9 +1425,6 @@ "published": { "type": "boolean" }, - "city": { - "type": "string" - }, "bookings": { "type": "array", "items": { @@ -1452,6 +1448,9 @@ "slug": { "type": "string" }, + "city": { + "type": "string" + }, "created_by": { "type": "string" }, diff --git a/back/extensions/users-permissions/models/User.settings.json b/back/extensions/users-permissions/models/User.settings.json index 95cbef18..c28d9877 100644 --- a/back/extensions/users-permissions/models/User.settings.json +++ b/back/extensions/users-permissions/models/User.settings.json @@ -125,8 +125,8 @@ "type": "string" }, "espaces": { - "collection": "espace", - "via": "users_permissions_user" + "via": "users_permissions_user", + "collection": "espace" }, "type": { "type": "enumeration", diff --git a/back/package.json b/back/package.json index 8ec9381d..8b1b7e0a 100644 --- a/back/package.json +++ b/back/package.json @@ -9,12 +9,14 @@ "strapi": "strapi", "config:dump": "strapi config:dump --file config.json -p", "config:restore": "strapi configuration:restore -f config.json", - "migrate:data": "node scripts/migrate_data.js" + "migrate:user": "node scripts/migrate_user.js", + "migrate:place": "node scripts/migrate_place.js" }, "devDependencies": {}, "dependencies": { "@bugsnag/js": "^7.9.2", "@bugsnag/plugin-koa": "^7.9.2", + "@mapbox/mapbox-sdk": "^0.12.1", "axios": "^0.21.1", "csv-parser": "^3.0.0", "form-data": "^4.0.0", diff --git a/back/scripts/migrate_place.js b/back/scripts/migrate_place.js index 9c903cc1..fa6629f5 100644 --- a/back/scripts/migrate_place.js +++ b/back/scripts/migrate_place.js @@ -32,7 +32,7 @@ const uploadFile = (url, options) => { formData.append(`files`, request(url)); const formHeaders = formData.getHeaders(); axios - .post("http://localhost:1337/upload", formData, { + .post("https://studio-d-hxyhn.ondigitalocean.app/strapi/upload", formData, { headers: { ...formHeaders, }, diff --git a/back/scripts/migrate_user.js b/back/scripts/migrate_user.js index 822dcf74..e2dbac50 100644 --- a/back/scripts/migrate_user.js +++ b/back/scripts/migrate_user.js @@ -2,24 +2,6 @@ const strapiLib = import("strapi"); const csv = require("csv-parser"); const fs = require("fs"); const crypto = require("crypto"); -// const user = { -// provider: "local", -// confirmed: true, -// blocked: false, -// role: 1, -// city: "Paris", -// country: "France", -// address: "test address", -// zipCode: "91100", -// structureName: "My structure", -// email: "migration.test@live.fr", -// username: "migration.test@live.fr", -// type: "company", -// firstname: "Guillaume", -// lastname: "Esnault", -// siret: "siret test", -// ape: "12345", -// }; const mapping_country = { FR: "France", diff --git a/back/yarn.lock b/back/yarn.lock index c93f4146..abab5756 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@babel/code-frame@^7.12.13": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== @@ -1308,6 +1308,42 @@ dependencies: vary "^1.1.2" +"@mapbox/fusspot@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@mapbox/fusspot/-/fusspot-0.4.0.tgz#5ac625b5ed31695fda465fb0413ee0379bdf553c" + integrity sha512-6sys1vUlhNCqMvJOqPEPSi0jc9tg7aJ//oG1A16H3PXoIt9whtNngD7UzBHUVTH15zunR/vRvMtGNVsogm1KzA== + dependencies: + is-plain-obj "^1.1.0" + xtend "^4.0.1" + +"@mapbox/mapbox-sdk@^0.12.1": + version "0.12.1" + resolved "https://registry.yarnpkg.com/@mapbox/mapbox-sdk/-/mapbox-sdk-0.12.1.tgz#917cc9a7f5b12390340c1958277400facfb44bec" + integrity sha512-XSYYhw8+Y6Osz0JF87Z3YAh40b4gt3riqQM4ZpRsPBHx7QT+vBfHwCvBaR/p6Oc+kDiTAQ7zNpudbjB5cKWpTw== + dependencies: + "@mapbox/fusspot" "^0.4.0" + "@mapbox/parse-mapbox-token" "^0.2.0" + "@mapbox/polyline" "^1.0.0" + eventemitter3 "^3.1.0" + form-data "^3.0.0" + got "^8.3.2" + is-plain-obj "^1.1.0" + xtend "^4.0.1" + +"@mapbox/parse-mapbox-token@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@mapbox/parse-mapbox-token/-/parse-mapbox-token-0.2.0.tgz#34049d948868376f689189a5ea0e3cd2d9284b91" + integrity sha512-BjeuG4sodYaoTygwXIuAWlZV6zUv4ZriYAQhXikzx+7DChycMUQ9g85E79Htat+AsBg+nStFALehlOhClYm5cQ== + dependencies: + base-64 "^0.1.0" + +"@mapbox/polyline@^1.0.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@mapbox/polyline/-/polyline-1.1.1.tgz#ab96e5e6936f4847a4894e14558daf43e40e3bd2" + integrity sha512-z9Sl7NYzsEIrAza658H92mc0OvpBjQwjp7Snv4xREKhsCMat7m1IKdWJMjQ5opiPYa0veMf7kCaSd1yx55AhmQ== + dependencies: + meow "^6.1.1" + "@purest/config@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@purest/config/-/config-1.0.1.tgz#d7dc6a0629032fd98d4ae5f59bec26ba1465c8e0" @@ -1427,6 +1463,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sindresorhus/is@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" + integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== + "@sindresorhus/slugify@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@sindresorhus/slugify/-/slugify-1.1.0.tgz#2f195365d9b953384305b62664b44b4036c49430" @@ -1502,6 +1543,11 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== +"@types/minimist@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256" + integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg== + "@types/mongodb@^3.5.27": version "3.6.9" resolved "https://registry.yarnpkg.com/@types/mongodb/-/mongodb-3.6.9.tgz#55f7e5b04f33904a12d6f0ab4f5d119a5062ade4" @@ -1515,6 +1561,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.34.tgz#07935194fc049069a1c56c0c274265abeddf88da" integrity sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA== +"@types/normalize-package-data@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" + integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== + "@types/prop-types@*": version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" @@ -1724,7 +1775,7 @@ add-dom-event-listener@^1.1.0: dependencies: object-assign "4.x" -addressparser@1.0.1, addressparser@^1.0.1: +addressparser@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746" integrity sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y= @@ -1960,6 +2011,11 @@ array.prototype.flat@^1.2.1: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + asap@~2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -2143,6 +2199,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= +base-64@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" + integrity sha1-eAqZyE59YAJgNhURxId2E78k9rs= + base64-js@^1.0.2, base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -2572,6 +2633,19 @@ cache-content-type@^1.0.0: mime-types "^2.1.18" ylru "^1.2.0" +cacheable-request@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" + integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0= + dependencies: + clone-response "1.0.2" + get-stream "3.0.0" + http-cache-semantics "3.8.1" + keyv "3.0.0" + lowercase-keys "1.0.0" + normalize-url "2.0.1" + responselike "1.0.2" + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -2601,6 +2675,15 @@ camel-case@3.0.x: no-case "^2.2.0" upper-case "^1.1.1" +camelcase-keys@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" + integrity sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== + dependencies: + camelcase "^5.3.1" + map-obj "^4.0.0" + quick-lru "^4.0.1" + camelcase@^5.0.0, camelcase@^5.2.0, camelcase@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" @@ -2869,7 +2952,7 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -clone-response@^1.0.2: +clone-response@1.0.2, clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= @@ -3451,7 +3534,15 @@ debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: dependencies: ms "^2.1.1" -decamelize@^1.2.0: +decamelize-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -3977,6 +4068,13 @@ errno@^0.1.3, errno@~0.1.7: dependencies: prr "~1.0.1" +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + error-stack-parser@^2.0.0, error-stack-parser@^2.0.2, error-stack-parser@^2.0.3: version "2.0.6" resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.6.tgz#5a99a707bd7a4c58a797902d48d82803ede6aad8" @@ -4093,6 +4191,11 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -4400,7 +4503,7 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^4.0.0: +find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== @@ -4484,6 +4587,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -4551,7 +4663,7 @@ friendly-errors-webpack-plugin@^1.7.0: error-stack-parser "^2.0.0" string-width "^2.0.0" -from2@^2.1.0: +from2@^2.1.0, from2@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= @@ -4667,6 +4779,11 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.1" +get-stream@3.0.0, get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -4802,6 +4919,29 @@ good-listener@^1.2.2: dependencies: delegate "^3.1.2" +got@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/got/-/got-8.3.2.tgz#1d23f64390e97f776cac52e5b936e5f514d2e937" + integrity sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw== + dependencies: + "@sindresorhus/is" "^0.7.0" + cacheable-request "^2.1.1" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + into-stream "^3.1.0" + is-retry-allowed "^1.1.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + mimic-response "^1.0.0" + p-cancelable "^0.4.0" + p-timeout "^2.0.1" + pify "^3.0.0" + safe-buffer "^5.1.1" + timed-out "^4.0.1" + url-parse-lax "^3.0.0" + url-to-options "^1.0.1" + got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -4868,6 +5008,11 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" +hard-rejection@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" + integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== + has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -4890,11 +5035,23 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -5028,6 +5185,11 @@ hosted-git-info@3.0.8: dependencies: lru-cache "^6.0.0" +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" @@ -5130,6 +5292,11 @@ http-assert@^1.3.0: deep-equal "~1.0.1" http-errors "~1.7.2" +http-cache-semantics@3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== + http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -5419,6 +5586,14 @@ intl-messageformat@^8.3.7: intl-format-cache "^4.2.43" intl-messageformat-parser "^5.2.1" +into-stream@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" + integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY= + dependencies: + from2 "^2.1.1" + p-is-promise "^1.1.0" + invariant@^2.2.1, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -5488,6 +5663,11 @@ is-arguments@^1.0.4: dependencies: call-bind "^1.0.0" +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + is-arrayish@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" @@ -5686,6 +5866,11 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + is-path-cwd@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" @@ -5705,7 +5890,7 @@ is-path-inside@^2.1.0: dependencies: path-is-inside "^1.0.2" -is-plain-obj@^1.0.0: +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= @@ -5737,6 +5922,11 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-retry-allowed@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -5844,6 +6034,14 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + jmespath@0.15.0: version "0.15.0" resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" @@ -5884,6 +6082,11 @@ json-parse-better-errors@^1.0.2: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -6013,6 +6216,13 @@ keygrip@~1.1.0: dependencies: tsscmp "1.0.6" +keyv@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" + integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA== + dependencies: + json-buffer "3.0.0" + keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -6044,7 +6254,7 @@ kind-of@^5.0.0: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -6301,6 +6511,11 @@ liftoff@3.1.0: rechoir "^0.6.2" resolve "^1.1.7" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + linkify-it@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" @@ -6450,6 +6665,11 @@ lower-case@^1.1.1: resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= +lowercase-keys@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY= + lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -6522,6 +6742,16 @@ map-cache@^0.2.0, map-cache@^0.2.2: resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" + integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== + map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" @@ -6638,6 +6868,23 @@ memory-pager@^1.0.2: resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== +meow@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/meow/-/meow-6.1.1.tgz#1ad64c4b76b2a24dfb2f635fddcadf320d251467" + integrity sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg== + dependencies: + "@types/minimist" "^1.2.0" + camelcase-keys "^6.2.2" + decamelize-keys "^1.1.0" + hard-rejection "^2.1.0" + minimist-options "^4.0.2" + normalize-package-data "^2.5.0" + read-pkg-up "^7.0.1" + redent "^3.0.0" + trim-newlines "^3.0.0" + type-fest "^0.13.1" + yargs-parser "^18.1.3" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -6717,6 +6964,11 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +min-indent@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== + mini-create-react-context@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz#072171561bfdc922da08a60c2197a497cc2d1d5e" @@ -6752,6 +7004,15 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimist-options@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + kind-of "^6.0.3" + minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -7065,14 +7326,6 @@ nodemailer-fetch@1.6.0: resolved "https://registry.yarnpkg.com/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz#79c4908a1c0f5f375b73fe888da9828f6dc963a4" integrity sha1-ecSQihwPXzdbc/6IjamCj23JY6Q= -nodemailer-sendinblue-transport@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/nodemailer-sendinblue-transport/-/nodemailer-sendinblue-transport-1.2.3.tgz#255ea2b682d321f3491c1f4d080667561fb6851e" - integrity sha1-JV6itoLTIfNJHB9NCAZnVh+2hR4= - dependencies: - addressparser "^1.0.1" - promise "^7.1.1" - nodemailer-shared@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz#cf5994e2fd268d00f5cf0fa767a08169edb07ec0" @@ -7090,6 +7343,16 @@ noop-logger@^0.1.1: resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= +normalize-package-data@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" @@ -7107,7 +7370,7 @@ normalize-range@^0.1.2: resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= -normalize-url@^2.0.1: +normalize-url@2.0.1, normalize-url@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== @@ -7342,6 +7605,11 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= +p-cancelable@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" + integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== + p-cancelable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" @@ -7352,6 +7620,11 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-is-promise@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7392,6 +7665,13 @@ p-retry@^3.0.1: dependencies: retry "^0.12.0" +p-timeout@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038" + integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA== + dependencies: + p-finally "^1.0.0" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -7465,6 +7745,16 @@ parse-filepath@^1.0.1: map-cache "^0.2.0" path-root "^0.1.1" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -7678,6 +7968,11 @@ pify@^2.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -8084,6 +8379,11 @@ quick-format-unescaped@^1.1.2: dependencies: fast-safe-stringify "^1.0.8" +quick-lru@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" + integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== + raf@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" @@ -8514,6 +8814,25 @@ reactstrap@^8.5.1: react-popper "^1.3.6" react-transition-group "^2.3.1" +read-pkg-up@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507" + integrity sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== + dependencies: + find-up "^4.1.0" + read-pkg "^5.2.0" + type-fest "^0.8.1" + +read-pkg@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc" + integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== + dependencies: + "@types/normalize-package-data" "^2.4.0" + normalize-package-data "^2.5.0" + parse-json "^5.0.0" + type-fest "^0.6.0" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" @@ -8576,6 +8895,14 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +redent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" + integrity sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== + dependencies: + indent-string "^4.0.0" + strip-indent "^3.0.0" + redis-commands@*, redis-commands@^1.5.0: version "1.7.0" resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89" @@ -8899,7 +9226,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.14.2: +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.14.2: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -8907,7 +9234,7 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.14.2: is-core-module "^2.2.0" path-parse "^1.0.6" -responselike@^1.0.2: +responselike@1.0.2, responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= @@ -9089,6 +9416,11 @@ selfsigned@^1.10.8: dependencies: node-forge "^0.10.0" +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + semver@5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -9106,11 +9438,6 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -9482,6 +9809,32 @@ sparse-bitfield@^3.0.3: dependencies: memory-pager "^1.0.2" +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" + integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== + spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" @@ -10267,6 +10620,13 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= +strip-indent@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" + integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== + dependencies: + min-indent "^1.0.0" + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -10463,6 +10823,11 @@ tildify@2.0.0: resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== +timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + timers-browserify@^2.0.4: version "2.0.12" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.12.tgz#44a45c11fbf407f34f97bccd1577c652361b00ee" @@ -10572,6 +10937,11 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +trim-newlines@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.0.tgz#79726304a6a898aa8373427298d54c2ee8b1cb30" + integrity sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA== + tslib@^1.10.0, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" @@ -10609,6 +10979,16 @@ type-fest@^0.11.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== +type-fest@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934" + integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== + +type-fest@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" + integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -10805,6 +11185,11 @@ url-slug@^3.0.1: resolved "https://registry.yarnpkg.com/url-slug/-/url-slug-3.0.1.tgz#f66638bbfa4acefb122a91cd22ffb1aa8703483f" integrity sha512-8zxCgV7G0biwS3CoDSTwLatF75W4ZWyIsoLbgLkSTo2ygpDjsD8/f33zB9Leh/raXe1/yo2tW7mJD0n7kxMAFA== +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + url@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" @@ -10895,6 +11280,14 @@ v8flags@^3.2.0: dependencies: homedir-polyfill "^1.0.1" +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + validator@^10.11.0: version "10.11.0" resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" @@ -11235,7 +11628,7 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xtend@^4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -11263,6 +11656,14 @@ yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^18.1.3: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs@^13.3.2: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" diff --git a/docker-compose.yml b/docker-compose.yml index fc7e68d4..126e6eeb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.6" services: postgres: - image: postgres:12 + image: postgis/postgis restart: always environment: POSTGRES_USER: studio-d-admin @@ -12,7 +12,7 @@ services: - 5432:5432 volumes: - postgresql:/var/lib/postgresql - - postgresql_data:/var/lib/postgresql/data + - postgis_data:/var/lib/postgresql/data maildev: image: djfarrelly/maildev @@ -22,4 +22,4 @@ services: volumes: postgresql: - postgresql_data: + postgis_data: diff --git a/web/components/Home/HomePlaces.tsx b/web/components/Home/HomePlaces.tsx index bc99f1a6..62f6e07c 100644 --- a/web/components/Home/HomePlaces.tsx +++ b/web/components/Home/HomePlaces.tsx @@ -20,7 +20,7 @@ const HomePlaces = ({}: Props) => { const { data: places } = usePlaces({ published_eq: true, _limit: 20, - _sort: 'dispo', + _sort: 'dispoAsc', }) if (!places || places.length === 0) return null diff --git a/web/components/InputCity.tsx b/web/components/InputCity.tsx index bb04bc72..580f386e 100644 --- a/web/components/InputCity.tsx +++ b/web/components/InputCity.tsx @@ -33,16 +33,22 @@ const getStyle = (theme) => { placeholder: (styles) => ({ ...styles, lineHeight: 1, + textTransform: 'none', }), valueContainer: (styles) => ({ ...styles, padding: 0, height: '100%', + textTransform: 'capitalize', }), clearIndicator: (styles) => ({ ...styles, padding: 0, }), + option: (styles) => ({ + ...styles, + textTransform: 'capitalize', + }), indicatorSeparator: () => ({ display: 'none', }), diff --git a/web/components/Map.tsx b/web/components/Map.tsx index 406888ad..4c2a22ee 100644 --- a/web/components/Map.tsx +++ b/web/components/Map.tsx @@ -106,7 +106,7 @@ const Map = ({ zoom={null} zoomControl={zoomControl} scrollWheelZoom={false} - style={{ height: '100%', width: '100%', flexGrow: 1 }} + style={{ height: '100%', width: '100%', flexGrow: 1, zIndex: 10 }} > { - {place.city} + {place.city.name} diff --git a/web/components/Place/BookingScheduleSlot.tsx b/web/components/Place/BookingScheduleSlot.tsx index d4d73fad..5d83a559 100644 --- a/web/components/Place/BookingScheduleSlot.tsx +++ b/web/components/Place/BookingScheduleSlot.tsx @@ -128,8 +128,6 @@ const BookingScheduleSlot = (props: Props) => { direction="column" w="100%" h="100%" - gridAutoRows="1fr" - rowGap="4px" className="grid" bgColor={isMonth ? 'blue.50' : 'transparent'} > diff --git a/web/components/Place/MobileMap.tsx b/web/components/Place/MobileMap.tsx index 60c8613c..5e06c09e 100644 --- a/web/components/Place/MobileMap.tsx +++ b/web/components/Place/MobileMap.tsx @@ -28,6 +28,7 @@ const MobileMap = ({ places = [] }) => { <> {isVisible && ( import('~components/Map'), { ssr: false }) interface Props { @@ -38,11 +38,11 @@ interface Props { const PlaceDetail = ({ place }: Props) => { const { t } = useTranslation('place') const isMobile = useBreakpointValue({ base: true, lg: false }) - const { data: user } = useCurrentUser() return ( - {Boolean(user) && } + + { {t('card.city')} - {place.city} + + {place.city?.name} + diff --git a/web/components/Place/PlaceHeader.tsx b/web/components/Place/PlaceHeader.tsx index df7d03c4..298a0314 100644 --- a/web/components/Place/PlaceHeader.tsx +++ b/web/components/Place/PlaceHeader.tsx @@ -1,10 +1,105 @@ -import React from 'react' -import { Flex, Button, Text } from '@chakra-ui/react' +import React, { useMemo } from 'react' +import { Flex, Button, Text, Spacer } from '@chakra-ui/react' import { useTranslation } from 'next-i18next' import { ROUTE_ACCOUNT_PLACE_DETAIL } from '~constants' import Link from '~components/Link' import { Espace } from '~typings/api' +import { format } from '~utils/date' import { useMyPlaces } from '~hooks/useMyPlaces' +import { ROUTE_PLACES } from '~constants' +import Arrow from 'public/assets/img/left-arrow.svg' +import { useCurrentUser } from '~hooks/useCurrentUser' + +const capitalize = (s) => { + if (typeof s !== 'string') return '' + return s.charAt(0).toUpperCase() + s.slice(1) +} + +const BackSearch = ({ hideBackToSearch }) => { + const { t } = useTranslation('place') + const prevPath = sessionStorage.getItem('sd-prevPath') + + if (hideBackToSearch) { + return + } + + const sentence = useMemo(() => { + const url = new URL(prevPath, process.env.NEXT_PUBLIC_FRONT_URL) + const words = [] + + const city = url.searchParams.get('city') + const perimeter = url.searchParams.get('perimeter') + const startDate = url.searchParams.get('startDate') + const endDate = url.searchParams.get('endDate') + + if (city) { + words.push(city) + + if (perimeter) { + words.push(`dans un rayon de ${perimeter} km${startDate ? ',' : ''}`) + } + } + + if (startDate) { + if (endDate) { + words.push('du') + words.push(format(startDate, 'dd/MM')) + } else { + words.push('le') + words.push(format(startDate, 'dd MMMM')) + } + } + if (endDate) { + words.push('au') + words.push(format(endDate, 'dd/MM')) + } + return words.length > 0 ? words.join(' ') : '' + }, [prevPath]) + + return ( + + + {sentence !== '' && ( + + ({capitalize(sentence)}) + + )} + + ) +} + +const SeeForm = ({ place }) => { + const { data: places } = useMyPlaces() + const { t } = useTranslation('place') + + if (!places || !places.some((p) => p.id === place.id)) return null + + return ( + + ) +} interface Props { place: Espace @@ -12,31 +107,30 @@ interface Props { const PlaceHeader = ({ place }: Props) => { const { t } = useTranslation('place') - const { data: places } = useMyPlaces() - if (!places || !places.some((p) => p.id === place.id)) return null + const { data: user } = useCurrentUser() + const prevPath = sessionStorage.getItem('sd-prevPath') + + const hideBackToSearch = + !prevPath || + !prevPath.startsWith(`${ROUTE_PLACES}?`) || + prevPath === `${ROUTE_PLACES}?sortBy=dispoAsc` + + if (!Boolean(user) && hideBackToSearch) return null return ( - {!place.filledUntil && ( + {!place.filledUntil ? ( {t(`header.noDispo`)} + ) : ( + )} - + {Boolean(user) && } ) } diff --git a/web/components/Place/PlaceListCard.tsx b/web/components/Place/PlaceListCard.tsx index f32e6db9..d2645f53 100644 --- a/web/components/Place/PlaceListCard.tsx +++ b/web/components/Place/PlaceListCard.tsx @@ -72,7 +72,7 @@ const PlaceCard = ({ place, setFocus }: Props) => { {t('card.city')} - {place.city} + {place.city.name} {t('card.surface')} {`${place.surface}m²`} {t('card.dim')} diff --git a/web/components/Place/PlaceSearch.tsx b/web/components/Place/PlaceSearch.tsx index 171b7a16..ae84e60f 100644 --- a/web/components/Place/PlaceSearch.tsx +++ b/web/components/Place/PlaceSearch.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useState } from 'react' import { Flex, SimpleGrid, @@ -11,6 +11,7 @@ import { } from '@chakra-ui/react' import FormField from '~components/FormField' import InputCity from '~components/InputCity' +import PlaceSlider from '~components/Place/PlaceSlider' import InputDateRange from '~components/InputDateRange' import Select from '~components/Select' import Calendar from 'public/assets/img/calendar.svg' @@ -32,6 +33,7 @@ const PlaceSearch = ({ onSubmit }) => { const { t } = useTranslation('place') const form = useFormContext() const isMobile = useBreakpointValue({ base: true, lg: false }) + const city = form.watch('city') return (
@@ -51,24 +53,43 @@ const PlaceSearch = ({ onSubmit }) => { alignItems="flex-start" direction={{ base: 'column', md: 'row' }} > - - - - - - - + + + + + + + + + + {city && city !== '' && ( + + + + + + + + + )} { + const { field } = useController({ + name, + control, + defaultValue: 75, + }) + + const onChange = (value) => { + field.onChange(value) + } + + return ( + + + + + + + + + {`${field.value} km`} + + + ) +} + +export default PlaceSlider diff --git a/web/components/Signup/SignupForm.tsx b/web/components/Signup/SignupForm.tsx index 1485d6c6..0aa7d09b 100644 --- a/web/components/Signup/SignupForm.tsx +++ b/web/components/Signup/SignupForm.tsx @@ -224,13 +224,7 @@ const SignupForm = ({ target, onSuccess }: ISignupForm) => { - - {t('form.country.label')} - - - } + label={t('form.country.label')} errors={errors.country} > diff --git a/web/hooks/useCities.tsx b/web/hooks/useCities.tsx index f37a649f..a54b0e48 100644 --- a/web/hooks/useCities.tsx +++ b/web/hooks/useCities.tsx @@ -3,13 +3,14 @@ import { client } from '~api/client-api' export const useCities = () => { return useQuery('cities', () => - client.espaces.citiesList().then((res) => - res.data - .filter((val) => val !== 'todefine') + // @ts-ignore + client.cities.citiesList({ 'espaces.published_eq': true }).then((res) => { + return res.data + .filter((val) => val.name !== 'todefine' && val.espaces.length > 0) .map((city) => ({ - value: city, - label: city, - })), - ), + value: city.name, + label: city.name, + })) + }), ) } diff --git a/web/pages/_app.tsx b/web/pages/_app.tsx index f75fe9c7..7acf7226 100644 --- a/web/pages/_app.tsx +++ b/web/pages/_app.tsx @@ -12,6 +12,7 @@ import Bugsnag, { isBugsnagEnabled } from '~utils/bugsnag' import { initYupLocale } from '~initYupLocale' import ErrorPage from '~pages/_error' import { DefaultSeo } from 'next-seo' +import { useRouter } from 'next/router' import '../styles/globals.css' import 'swiper/swiper-bundle.min.css' import '@fullcalendar/common/main.css' @@ -24,7 +25,17 @@ if (isBugsnagEnabled) { } const App = ({ Component, pageProps }: AppProps) => { + const router = useRouter() + useEffect(() => { + const handleRouteChange = (url, test) => { + if (sessionStorage) { + const prevPath = sessionStorage.getItem('sd-currentPath') + sessionStorage.setItem('sd-prevPath', prevPath) + sessionStorage.setItem('sd-currentPath', url) + } + } + router.events.on('beforeHistoryChange', handleRouteChange) initYupLocale() }, []) const content = ( diff --git a/web/pages/espaces/index.tsx b/web/pages/espaces/index.tsx index 157cfdb8..9094a9dd 100644 --- a/web/pages/espaces/index.tsx +++ b/web/pages/espaces/index.tsx @@ -44,10 +44,11 @@ const Places = () => { defaultValues: router.query, }) - const [searchParams, setSearchParams] = useState({ - published_eq: true, - _sort: router?.query?.sortBy || 'dispoAsc', - }) + const [searchParams, setSearchParams] = useState({}) + + useEffect(() => { + setSearchParams(formatSearch(router.query)) + }, []) const queryClient = useQueryClient() const { diff --git a/web/public/assets/img/left-arrow.svg b/web/public/assets/img/left-arrow.svg new file mode 100644 index 00000000..0e4de1dd --- /dev/null +++ b/web/public/assets/img/left-arrow.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/web/public/locales/fr/place.json b/web/public/locales/fr/place.json index da7626cf..03f07130 100644 --- a/web/public/locales/fr/place.json +++ b/web/public/locales/fr/place.json @@ -157,6 +157,9 @@ "label": "Où cherchez-vous ?", "placeholder": "Renseignez une ville…" }, + "perimeter": { + "label": "Dans quel rayon ?" + }, "when": { "label": "Sur quelle période ?", "placeholder": "Cliquer pour choisir des dates" @@ -294,6 +297,7 @@ } }, "detail": { + "back": "Retour à la recherche", "seeMap": "Voir sur la carte", "precise": "* précisez vos besoins lors de la réservation", "surface": "Superficie", diff --git a/web/typings/api.ts b/web/typings/api.ts index b1394195..5b2e8e49 100644 --- a/web/typings/api.ts +++ b/web/typings/api.ts @@ -87,6 +87,56 @@ export interface NewBooking { updated_by?: string; } +export interface City { + id: string; + name: string; + latitude: string; + longitude: string; + espaces?: { + id: string; + name: string; + surface: number; + roomLength: number; + width: number; + height: number; + mirror: boolean; + danceBar: boolean; + accomodation: boolean; + technicalStaff: boolean; + floor: "plancherDanse" | "parquetTraditionnel" | "other" | "todefine"; + otherFloor?: string; + about?: string; + details?: string; + address: string; + latitude: string; + longitude: string; + files?: string[]; + images?: string[]; + users_permissions_user?: string; + disponibilities?: string[]; + scheduleDetails?: string; + filledUntil?: string; + published?: boolean; + bookings?: string[]; + country: string; + external_id?: number; + danceCarpet?: "true" | "false" | "possible"; + slug?: string; + city?: string; + created_by?: string; + updated_by?: string; + }[]; +} + +export interface NewCity { + name: string; + latitude: string; + longitude: string; + espaces?: string[]; + created_by?: string; + updated_by?: string; +} + export interface Contact { id: string; name: string; @@ -136,12 +186,12 @@ export interface Disponibility { scheduleDetails?: string; filledUntil?: string; published?: boolean; - city: string; bookings?: string[]; country: string; external_id?: number; danceCarpet?: "true" | "false" | "possible"; slug?: string; + city?: string; created_by?: string; updated_by?: string; }; @@ -216,7 +266,7 @@ export interface Espace { /** @format date */ filledUntil?: string; published?: boolean; - city: string; + city: City; country?: string; slug?: string; external_id?: number; @@ -247,12 +297,12 @@ export interface NewEspace { /** @format date */ filledUntil?: string; published?: boolean; - city: string; bookings?: string[]; country: string; external_id?: number; danceCarpet?: "true" | "false" | "possible"; slug?: string; + city?: string; created_by?: string; updated_by?: string; } @@ -451,10 +501,10 @@ export interface UsersPermissionsRole { address: string; zipCode: string; city: string; - country?: string; + country: string; siret: string; ape: string; - phone?: string; + phone: string; license: string; website?: string; legalRepresentative?: string; @@ -781,6 +831,107 @@ export namespace Bookings { } } +export namespace Cities { + /** + * No description + * @tags City + * @name CitiesList + * @request GET:/cities + * @secure + */ + export namespace CitiesList { + export type RequestParams = {}; + export type RequestQuery = { + _limit?: number; + _sort?: string; + _start?: number; + "="?: string; + _ne?: string; + _lt?: string; + _lte?: string; + _gt?: string; + _gte?: string; + _contains?: string; + _containss?: string; + _in?: string[]; + _nin?: string[]; + }; + export type RequestBody = never; + export type RequestHeaders = {}; + export type ResponseBody = City[]; + } + /** + * @description Create a new record + * @tags City + * @name CitiesCreate + * @request POST:/cities + * @secure + */ + export namespace CitiesCreate { + export type RequestParams = {}; + export type RequestQuery = {}; + export type RequestBody = NewCity; + export type RequestHeaders = {}; + export type ResponseBody = City; + } + /** + * No description + * @tags City + * @name CountList + * @request GET:/cities/count + * @secure + */ + export namespace CountList { + export type RequestParams = {}; + export type RequestQuery = {}; + export type RequestBody = never; + export type RequestHeaders = {}; + export type ResponseBody = { count?: number }; + } + /** + * No description + * @tags City + * @name CitiesDetail + * @request GET:/cities/{id} + * @secure + */ + export namespace CitiesDetail { + export type RequestParams = { id: string }; + export type RequestQuery = {}; + export type RequestBody = never; + export type RequestHeaders = {}; + export type ResponseBody = City; + } + /** + * @description Update a record + * @tags City + * @name CitiesUpdate + * @request PUT:/cities/{id} + * @secure + */ + export namespace CitiesUpdate { + export type RequestParams = { id: string }; + export type RequestQuery = {}; + export type RequestBody = NewCity; + export type RequestHeaders = {}; + export type ResponseBody = City; + } + /** + * @description Delete a record + * @tags City + * @name CitiesDelete + * @request DELETE:/cities/{id} + * @secure + */ + export namespace CitiesDelete { + export type RequestParams = { id: string }; + export type RequestQuery = {}; + export type RequestBody = never; + export type RequestHeaders = {}; + export type ResponseBody = number; + } +} + export namespace Contacts { /** * No description @@ -2590,6 +2741,131 @@ export class Api extends HttpClient + this.request({ + path: `/cities`, + method: "POST", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags City + * @name CountList + * @request GET:/cities/count + * @secure + */ + countList: (params: RequestParams = {}) => + this.request<{ count?: number }, Error>({ + path: `/cities/count`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * No description + * + * @tags City + * @name CitiesDetail + * @request GET:/cities/{id} + * @secure + */ + citiesDetail: (id: string, params: RequestParams = {}) => + this.request({ + path: `/cities/${id}`, + method: "GET", + secure: true, + format: "json", + ...params, + }), + + /** + * @description Update a record + * + * @tags City + * @name CitiesUpdate + * @request PUT:/cities/{id} + * @secure + */ + citiesUpdate: (id: string, data: NewCity, params: RequestParams = {}) => + this.request({ + path: `/cities/${id}`, + method: "PUT", + body: data, + secure: true, + type: ContentType.Json, + format: "json", + ...params, + }), + + /** + * @description Delete a record + * + * @tags City + * @name CitiesDelete + * @request DELETE:/cities/{id} + * @secure + */ + citiesDelete: (id: string, params: RequestParams = {}) => + this.request({ + path: `/cities/${id}`, + method: "DELETE", + secure: true, + format: "json", + ...params, + }), + }; contacts = { /** * No description diff --git a/web/utils/search.ts b/web/utils/search.ts index 3e31d824..fd5fd0e5 100644 --- a/web/utils/search.ts +++ b/web/utils/search.ts @@ -42,7 +42,6 @@ export interface SearchQuery { } export const formatSearchToQuery = (data): Record => { - // const { sortBy, ...rest } = data return Object.fromEntries( Object.entries(data) .map(([_, v]) => { @@ -65,12 +64,9 @@ export const formatSearch = (formData, forceSort = false): SearchQuery => { ) if (forceSort) { - query['_sort'] = 'nbDispo' + query['_sort'] = 'nbDispoDesc' } else if (Boolean(data.sortBy)) { switch (data.sortBy) { - case SortOptions.DISPO_ASC: - query['_sort'] = 'dispoAsc' - break case SortOptions.NB_DISPO_DESC: query['_sort'] = 'nbDispoDesc' break @@ -80,6 +76,9 @@ export const formatSearch = (formData, forceSort = false): SearchQuery => { case SortOptions.SURFACE_DESC: query['_sort'] = 'surface:desc' break + default: + query['_sort'] = 'dispoAsc' + break } } @@ -114,7 +113,7 @@ export const formatSearch = (formData, forceSort = false): SearchQuery => { } if (Boolean(data.city)) { - query['city_eq'] = data.city + query['city.name_eq'] = data.city } if (data.accomodation) {