diff --git a/cloud_functions/analysis/docker-compose.yml b/cloud_functions/analysis/docker-compose.yml index 7561beef..1a76e7ab 100644 --- a/cloud_functions/analysis/docker-compose.yml +++ b/cloud_functions/analysis/docker-compose.yml @@ -25,7 +25,7 @@ services: skytruth-db-init: profiles: - feed_data_to_db - image: ghcr.io/osgeo/gdal:ubuntu-small-latest + image: ghcr.io/osgeo/gdal:ubuntu-small-3.9.3 container_name: skytruth_cf_db_init environment: GRANT_SUDO: "yes" @@ -33,7 +33,7 @@ services: restart: "no" volumes: - ./init.sh:/usr/share/init.sh - entrypoint: bash -c "chmod +x /usr/share/init.sh && /usr/share/init.sh" + entrypoint: bash -c "chmod +x /usr/share/init.sh && /usr/share/init.sh eez gadm" network_mode: "host" extra_hosts: - docker.host:0.0.0.0 diff --git a/cloud_functions/analysis/init.sh b/cloud_functions/analysis/init.sh index 0eae16d4..e294431c 100755 --- a/cloud_functions/analysis/init.sh +++ b/cloud_functions/analysis/init.sh @@ -1,16 +1,47 @@ #!/bin/sh - -URL='vector-data-raw/vizzuality_processed_data/analysis_data/eez_minus_mpa.zip' +# Upload the data to the database +# Usage: init.sh [OPTION] +for arg in "$@" +do + case $arg in + eez) + echo "uploading eez_minus_mpa" + URL='vector-data-raw/vizzuality_processed_data/analysis_data/eez_minus_mpa.zip' + TABLE_NAME='eez_minus_mpa' + ;; + gadm) + echo "uploading gadm_minus_pa" + URL='vector-data-raw/vizzuality_processed_data/analysis_data/gadm_minus_pa.zip' + TABLE_NAME='gadm_minus_pa' + ;; + --help) + echo "Usage: init.sh [OPTION]" + echo "Upload the data to the database" + echo "" + echo "Options:" + echo " --eez Upload eez_minus_mpa data" + echo " --gadm Upload gadm_minus_pa data" + echo " --help Display this help message" + exit 0 + ;; + *) + echo "Invalid option $arg" + exit 1 + ;; + esac +ogr2ogr --version ogr2ogr -progress \ - -makevalid -overwrite \ - -nln eez_minus_mpa -nlt PROMOTE_TO_MULTI \ - -lco GEOMETRY_NAME=the_geom \ - -lco PRECISION=FALSE \ - -lco SPATIAL_INDEX=GIST \ - -lco FID=id \ - -t_srs EPSG:4326 -a_srs EPSG:4326 \ - -f PostgreSQL PG:"host=$POSTGRES_HOST port=$POSTGRES_PORT \ - user=$POSTGRES_USER password=$POSTGRES_PASSWORD \ - dbname=$POSTGRES_DB active_schema=$POSTGRES_SCHEMA" \ - -doo "PRELUDE_STATEMENTS=CREATE SCHEMA IF NOT EXISTS $POSTGRES_SCHEMA AUTHORIZATION CURRENT_USER;" "/vsizip/vsigs/$URL"; \ No newline at end of file + -makevalid -overwrite \ + -nln $TABLE_NAME -nlt PROMOTE_TO_MULTI \ + -lco GEOMETRY_NAME=the_geom \ + -lco PRECISION=FALSE \ + -lco SPATIAL_INDEX=GIST \ + -lco FID=id \ + -t_srs EPSG:4326 \ + -f PostgreSQL PG:"host=$POSTGRES_HOST port=$POSTGRES_PORT \ + user=$POSTGRES_USER password=$POSTGRES_PASSWORD \ + dbname=$POSTGRES_DB active_schema=$POSTGRES_SCHEMA" \ + -doo "PRELUDE_STATEMENTS=CREATE SCHEMA IF NOT EXISTS $POSTGRES_SCHEMA AUTHORIZATION CURRENT_USER;" "/vsizip/vsigs/$URL"; + +done \ No newline at end of file diff --git a/cloud_functions/analysis/main.py b/cloud_functions/analysis/main.py index f2b47d62..d8e7662d 100644 --- a/cloud_functions/analysis/main.py +++ b/cloud_functions/analysis/main.py @@ -3,7 +3,7 @@ import logging from src.connect_tcp import connect_tcp_socket -from src.analysis import get_locations_stats +from src.analysis import get_locations_stats_terrestrial, get_locations_stats_marine logger = logging.getLogger(__name__) logger.addHandler(default_handler) @@ -50,7 +50,19 @@ def index(request): if not geometry: raise ValueError("geometry is required") - return (get_locations_stats(db, geometry), 200, headers) + funct = { + "marine": get_locations_stats_marine, + "terrestrial": get_locations_stats_terrestrial, + } + + environment = ({**request.args, **request.get_json()}).get( + "environment", "marine" + ) + if environment not in funct.keys(): + raise ValueError("environment must be one of `marine` or `terrestrial`") + + return (funct[environment](db, geometry), 200, headers) + except ValueError as e: logger.exception(str(e)) return {"error": str(e)}, 400, headers diff --git a/cloud_functions/analysis/src/analysis.py b/cloud_functions/analysis/src/analysis.py index 583c4bc2..cdc37dd2 100644 --- a/cloud_functions/analysis/src/analysis.py +++ b/cloud_functions/analysis/src/analysis.py @@ -12,8 +12,10 @@ def get_geojson(geojson: JSON) -> dict: else: return geojson +### Marine -def serialize_response(data: dict) -> dict: + +def serialize_response_marine(data: dict) -> dict: """Converts the data from the database into a Dict {locations_area:{"code":, "protected_area": , "area":}, "total_area":} response """ @@ -48,7 +50,9 @@ def serialize_response(data: dict) -> dict: return result -def get_locations_stats(db: sqlalchemy.engine.base.Engine, geojson: JSON) -> dict: +def get_locations_stats_marine( + db: sqlalchemy.engine.base.Engine, geojson: JSON +) -> dict: with db.connect() as conn: stmt = sqlalchemy.text( """ @@ -65,4 +69,62 @@ def get_locations_stats(db: sqlalchemy.engine.base.Engine, geojson: JSON) -> dic stmt, parameters={"geometry": get_geojson(geojson)} ).all() - return serialize_response(data_response) + return serialize_response_marine(data_response) + + +### Terrestrial +def serialize_response_terrestrial(data: dict) -> dict: + """Converts the data from the database + into a Dict {locations_area:{"code":, "protected_area": , "area":}, "total_area":} response + """ + if not data or len(data) == 0: + raise ValueError( + "No data found, this is likely due to a geometry that does not intersect with a Marine area." + ) + + result = {"total_area": data[0][3]} + sub_result = {} + total_protected_area = 0 + for row in data: + for iso in filter(lambda item: item is not None, [row[1]]): + total_protected_area += row[2] + if iso not in sub_result: + sub_result[iso] = { + "code": iso, + "protected_area": row[2], + "area": row[0], + } + else: + sub_result[iso]["protected_area"] += row[2] + sub_result[iso]["area"] += row[0] + + result.update( + { + "locations_area": list(sub_result.values()), + "total_protected_area": total_protected_area, + } + ) + + return result + + +def get_locations_stats_terrestrial( + db: sqlalchemy.engine.base.Engine, geojson: JSON +) -> dict: + with db.connect() as conn: + stmt = sqlalchemy.text( + """ + with user_data as (select ST_GeomFromGeoJSON(:geometry) as geom), + user_data_stats as (select *, round((st_area(st_transform(geom,'+proj=longlat +datum=WGS84 +no_defs +type=crs', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs'))/1e6)) user_area_km2 from user_data), + stats as (select area_km2,gid_0, round((st_area(st_transform(st_makevalid(st_intersection(the_geom, user_data_stats.geom)),'+proj=longlat +datum=WGS84 +no_defs +type=crs', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs'))/1e6)) portion_area_km2, + user_data_stats.user_area_km2 + from data.gadm_minus_pa gmp , user_data_stats + where st_intersects(the_geom, user_data_stats.geom)) + select avg(area_km2) as area_km2, gid_0, sum(portion_area_km2) as portion_area_km2, avg(user_area_km2) as user_area_km2 from stats group by gid_0 + """ + ) + data_response = conn.execute( + stmt, parameters={"geometry": get_geojson(geojson)} + ).all() + + return serialize_response_terrestrial(data_response) diff --git a/cms/config/sync/admin-role.strapi-author.json b/cms/config/sync/admin-role.strapi-author.json index 8b498218..4915b2f7 100644 --- a/cms/config/sync/admin-role.strapi-author.json +++ b/cms/config/sync/admin-role.strapi-author.json @@ -81,7 +81,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -112,7 +116,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -128,7 +136,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -144,7 +156,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -175,7 +191,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -191,7 +211,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -205,7 +229,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -234,7 +262,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -248,7 +280,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -264,7 +300,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -295,7 +335,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -311,7 +355,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -325,7 +373,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -354,7 +406,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -368,7 +424,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -388,7 +448,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -423,7 +487,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -443,7 +511,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -459,7 +531,11 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -490,7 +566,11 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -506,7 +586,83 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::environment.environment", + "properties": { + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -520,7 +676,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [ @@ -544,7 +701,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [ @@ -559,7 +717,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [ @@ -576,7 +735,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -607,7 +770,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -623,7 +790,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -638,8 +809,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [ @@ -664,8 +836,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [ @@ -681,8 +854,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [ @@ -699,7 +873,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -730,7 +908,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -746,7 +928,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -770,9 +956,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -811,9 +1007,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -837,9 +1043,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -853,16 +1069,21 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [ "admin::is-creator" @@ -872,13 +1093,7 @@ { "action": "plugin::content-manager.explorer.delete", "subject": "api::location.location", - "properties": { - "locales": [ - "en", - "es", - "fr" - ] - }, + "properties": {}, "conditions": [ "admin::is-creator" ], @@ -891,16 +1106,21 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [ "admin::is-creator" @@ -914,16 +1134,21 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [ "admin::is-creator" @@ -932,16 +1157,17 @@ }, { "action": "plugin::content-manager.explorer.create", - "subject": "api::mpa.mpa", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ + "slug", "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [ @@ -951,61 +1177,12 @@ }, { "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpa.mpa", - "properties": {}, - "conditions": [ - "admin::is-creator" - ], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.read", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" - ] - }, - "conditions": [ - "admin::is-creator" - ], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.update", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" - ] - }, - "conditions": [ - "admin::is-creator" - ], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.create", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { - "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [ @@ -1013,25 +1190,19 @@ ], "actionParameters": {} }, - { - "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": {}, - "conditions": [ - "admin::is-creator" - ], - "actionParameters": {} - }, { "action": "plugin::content-manager.explorer.read", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "slug", + "name", + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [ @@ -1041,14 +1212,17 @@ }, { "action": "plugin::content-manager.explorer.update", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "slug", + "name", + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [ @@ -1065,7 +1239,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1096,7 +1274,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1112,7 +1294,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1124,9 +1310,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [ @@ -1148,9 +1335,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [ @@ -1163,9 +1351,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [ @@ -1182,7 +1371,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1213,7 +1406,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1229,7 +1426,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1238,15 +1439,112 @@ }, { "action": "plugin::content-manager.explorer.create", - "subject": "api::protection-coverage-stat.protection-coverage-stat", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::pa.pa", + "properties": {}, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::pa.pa", "properties": { "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [ + "admin::is-creator" + ], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::protection-coverage-stat.protection-coverage-stat", + "properties": { + "fields": [ + "location", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [ @@ -1269,11 +1567,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [ @@ -1287,11 +1589,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [ @@ -1308,7 +1614,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1339,7 +1649,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1355,7 +1669,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1372,7 +1690,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1404,7 +1726,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" @@ -1421,7 +1747,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [ "admin::is-creator" diff --git a/cms/config/sync/admin-role.strapi-editor.json b/cms/config/sync/admin-role.strapi-editor.json index 971b0b18..8a69f229 100644 --- a/cms/config/sync/admin-role.strapi-editor.json +++ b/cms/config/sync/admin-role.strapi-editor.json @@ -86,7 +86,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -113,7 +117,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -127,7 +135,11 @@ "content", "data_sources" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -141,7 +153,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -168,7 +184,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -182,7 +202,11 @@ "title", "url" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -194,7 +218,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -232,7 +260,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -244,7 +276,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -258,7 +294,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -298,7 +338,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -312,7 +356,11 @@ "slug", "data_tool" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -324,7 +372,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -362,7 +414,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -374,7 +430,11 @@ "fields": [ "name" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -392,7 +452,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -436,7 +500,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -454,7 +522,11 @@ "geography", "data_tool_ecosystems" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -468,7 +540,11 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -508,7 +584,11 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -522,7 +602,75 @@ "layers", "slug" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::environment.environment", + "properties": { + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -534,7 +682,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [], @@ -554,7 +703,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [], @@ -567,7 +717,8 @@ "fields": [ "location", "fishing_protection_level", - "area" + "area", + "pct" ] }, "conditions": [], @@ -582,7 +733,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -609,7 +764,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -623,7 +782,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -636,8 +799,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -658,8 +822,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -673,8 +838,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -689,7 +855,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -716,7 +886,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -730,7 +904,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -752,9 +930,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -802,9 +990,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -826,9 +1024,19 @@ "metadata.content_date", "metadata.license", "dataset", - "legend_config" + "legend_config.type", + "legend_config.items.icon", + "legend_config.items.color", + "legend_config.items.value", + "legend_config.items.description", + "default", + "environment" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -840,16 +1048,21 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [], "actionParameters": {} @@ -857,13 +1070,7 @@ { "action": "plugin::content-manager.explorer.delete", "subject": "api::location.location", - "properties": { - "locales": [ - "en", - "es", - "fr" - ] - }, + "properties": {}, "conditions": [], "actionParameters": {} }, @@ -874,16 +1081,21 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [], "actionParameters": {} @@ -895,32 +1107,38 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [] + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" + ] }, "conditions": [], "actionParameters": {} }, { "action": "plugin::content-manager.explorer.create", - "subject": "api::mpa.mpa", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ + "slug", "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [], @@ -928,77 +1146,30 @@ }, { "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpa.mpa", - "properties": {}, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.read", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.update", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "wdpaid", - "bbox", - "is_child" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.create", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { - "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [], "actionParameters": {} }, - { - "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": {}, - "conditions": [], - "actionParameters": {} - }, { "action": "plugin::content-manager.explorer.read", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "slug", + "name", + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [], @@ -1006,14 +1177,17 @@ }, { "action": "plugin::content-manager.explorer.update", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" + "slug", + "name", + "info" + ], + "locales": [ + "en", + "es", + "fr" ] }, "conditions": [], @@ -1028,7 +1202,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1055,7 +1233,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1069,7 +1251,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1079,9 +1265,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1099,9 +1286,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1112,9 +1300,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1129,7 +1318,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1156,7 +1349,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1170,22 +1367,115 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} }, { "action": "plugin::content-manager.explorer.create", - "subject": "api::protection-coverage-stat.protection-coverage-stat", + "subject": "api::pa.pa", "properties": { "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::pa.pa", + "properties": {}, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::protection-coverage-stat.protection-coverage-stat", + "properties": { + "fields": [ + "location", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], @@ -1204,11 +1494,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], @@ -1220,11 +1514,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], @@ -1239,7 +1537,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1266,7 +1568,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1280,7 +1586,11 @@ "name", "info" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1295,7 +1605,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1336,7 +1650,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} @@ -1351,7 +1669,11 @@ "value", "description" ], - "locales": [] + "locales": [ + "en", + "es", + "fr" + ] }, "conditions": [], "actionParameters": {} diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 753c5772..5d9f481e 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -623,6 +623,70 @@ "conditions": [], "actionParameters": {} }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::environment.environment", + "properties": { + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::environment.environment", + "properties": { + "fields": [ + "name", + "slug" + ], + "locales": [ + "en", + "es", + "fr" + ] + }, + "conditions": [], + "actionParameters": {} + }, { "action": "plugin::content-manager.explorer.create", "subject": "api::fishing-protection-level-stat.fishing-protection-level-stat", @@ -747,8 +811,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -769,8 +834,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -784,8 +850,9 @@ "location", "habitat", "year", - "protectedArea", - "totalArea" + "protected_area", + "total_area", + "environment" ] }, "conditions": [], @@ -880,7 +947,8 @@ "legend_config.items.color", "legend_config.items.value", "legend_config.items.description", - "default" + "default", + "environment" ], "locales": [ "en", @@ -939,7 +1007,8 @@ "legend_config.items.color", "legend_config.items.value", "legend_config.items.description", - "default" + "default", + "environment" ], "locales": [ "en", @@ -972,7 +1041,8 @@ "legend_config.items.color", "legend_config.items.value", "legend_config.items.description", - "default" + "default", + "environment" ], "locales": [ "en", @@ -990,19 +1060,20 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [ - "en", - "es", - "fr" + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" ] }, "conditions": [], @@ -1011,13 +1082,7 @@ { "action": "plugin::content-manager.explorer.delete", "subject": "api::location.location", - "properties": { - "locales": [ - "en", - "es", - "fr" - ] - }, + "properties": {}, "conditions": [], "actionParameters": {} }, @@ -1028,19 +1093,20 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [ - "en", - "es", - "fr" + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" ] }, "conditions": [], @@ -1053,19 +1119,20 @@ "fields": [ "code", "name", - "totalMarineArea", + "total_marine_area", "type", "groups", "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", "protection_coverage_stats", - "bounds" - ], - "locales": [ - "en", - "es", - "fr" + "marine_bounds", + "total_terrestrial_area", + "terrestrial_bounds", + "name_es", + "name_fr", + "marine_target", + "marine_target_year" ] }, "conditions": [], @@ -1138,137 +1205,6 @@ "conditions": [], "actionParameters": {} }, - { - "action": "plugin::content-manager.explorer.create", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "bbox", - "children", - "data_source", - "mpaa_establishment_stage", - "location", - "wdpaid", - "mpaa_protection_level", - "is_child", - "mpa_iucn_category", - "designation" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpa.mpa", - "properties": {}, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.read", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "bbox", - "children", - "data_source", - "mpaa_establishment_stage", - "location", - "wdpaid", - "mpaa_protection_level", - "is_child", - "mpa_iucn_category", - "designation" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.update", - "subject": "api::mpa.mpa", - "properties": { - "fields": [ - "name", - "area", - "year", - "protection_status", - "bbox", - "children", - "data_source", - "mpaa_establishment_stage", - "location", - "wdpaid", - "mpaa_protection_level", - "is_child", - "mpa_iucn_category", - "designation" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.create", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": { - "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.delete", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": {}, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.read", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": { - "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" - ] - }, - "conditions": [], - "actionParameters": {} - }, - { - "action": "plugin::content-manager.explorer.update", - "subject": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", - "properties": { - "fields": [ - "location", - "mpaa_establishment_stage", - "protection_status", - "year", - "area" - ] - }, - "conditions": [], - "actionParameters": {} - }, { "action": "plugin::content-manager.explorer.create", "subject": "api::mpaa-establishment-stage.mpaa-establishment-stage", @@ -1341,9 +1277,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1361,9 +1298,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1374,9 +1312,10 @@ "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ - "location", "mpaa_protection_level", - "area" + "area", + "percentage", + "location" ] }, "conditions": [], @@ -1451,15 +1390,104 @@ }, { "action": "plugin::content-manager.explorer.create", - "subject": "api::protection-coverage-stat.protection-coverage-stat", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.delete", + "subject": "api::pa.pa", + "properties": {}, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.read", + "subject": "api::pa.pa", "properties": { "fields": [ + "name", + "area", + "year", + "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.update", + "subject": "api::pa.pa", + "properties": { + "fields": [ + "name", + "area", + "year", "protection_status", + "bbox", + "children", + "data_source", + "mpaa_establishment_stage", + "location", + "wdpaid", + "mpaa_protection_level", + "iucn_category", + "designation", + "environment", + "coverage", + "parent" + ] + }, + "conditions": [], + "actionParameters": {} + }, + { + "action": "plugin::content-manager.explorer.create", + "subject": "api::protection-coverage-stat.protection-coverage-stat", + "properties": { + "fields": [ + "location", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], @@ -1478,11 +1506,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], @@ -1494,11 +1526,15 @@ "properties": { "fields": [ "location", - "protection_status", "year", - "cumSumProtectedArea", - "protectedArea", - "protectedAreasCount" + "protected_area", + "protected_areas_count", + "environment", + "coverage", + "pas", + "oecms", + "is_last_year", + "global_contribution" ] }, "conditions": [], diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##data-tool-language.data-tool-language.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##data-tool-language.data-tool-language.json index 535b19c5..257cefe6 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##data-tool-language.data-tool-language.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##data-tool-language.data-tool-language.json @@ -7,7 +7,7 @@ "filterable": true, "searchable": true, "pageSize": 10, - "mainField": "name", + "mainField": "slug", "defaultSortBy": "name", "defaultSortOrder": "ASC" }, @@ -123,12 +123,6 @@ } }, "layouts": { - "list": [ - "id", - "name", - "slug", - "data_tool" - ], "edit": [ [ { @@ -146,6 +140,12 @@ "size": 6 } ] + ], + "list": [ + "id", + "name", + "slug", + "data_tool" ] } }, diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json index dc5d2cc9..5d19e844 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##dataset.dataset.json @@ -7,7 +7,7 @@ "filterable": true, "searchable": true, "pageSize": 10, - "mainField": "name", + "mainField": "slug", "defaultSortBy": "name", "defaultSortOrder": "ASC" }, diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-establishment-stage-stat.mpaa-establishment-stage-stat.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##environment.environment.json similarity index 56% rename from cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-establishment-stage-stat.mpaa-establishment-stage-stat.json rename to cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##environment.environment.json index baa0618d..745bf50b 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-establishment-stage-stat.mpaa-establishment-stage-stat.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##environment.environment.json @@ -1,14 +1,14 @@ { - "key": "plugin_content_manager_configuration_content_types::api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "key": "plugin_content_manager_configuration_content_types::api::environment.environment", "value": { - "uid": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat", + "uid": "api::environment.environment", "settings": { "bulkable": true, "filterable": true, "searchable": true, "pageSize": 10, - "mainField": "id", - "defaultSortBy": "id", + "mainField": "slug", + "defaultSortBy": "name", "defaultSortOrder": "ASC" }, "metadatas": { @@ -20,75 +20,30 @@ "sortable": true } }, - "location": { + "name": { "edit": { - "label": "location", - "description": "", - "placeholder": "", - "visible": true, - "editable": true, - "mainField": "code" - }, - "list": { - "label": "location", - "searchable": true, - "sortable": true - } - }, - "mpaa_establishment_stage": { - "edit": { - "label": "mpaa_establishment_stage", - "description": "", - "placeholder": "", - "visible": true, - "editable": true, - "mainField": "slug" - }, - "list": { - "label": "mpaa_establishment_stage", - "searchable": true, - "sortable": true - } - }, - "protection_status": { - "edit": { - "label": "protection_status", - "description": "", - "placeholder": "", - "visible": true, - "editable": true, - "mainField": "slug" - }, - "list": { - "label": "protection_status", - "searchable": true, - "sortable": true - } - }, - "year": { - "edit": { - "label": "year", + "label": "name", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "year", + "label": "name", "searchable": true, "sortable": true } }, - "area": { + "slug": { "edit": { - "label": "area", + "label": "slug", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "area", + "label": "slug", "searchable": true, "sortable": true } @@ -153,39 +108,23 @@ } }, "layouts": { - "list": [ - "id", - "location", - "mpaa_establishment_stage", - "protection_status" - ], "edit": [ [ { - "name": "location", + "name": "name", "size": 6 }, { - "name": "mpaa_establishment_stage", + "name": "slug", "size": 6 } - ], - [ - { - "name": "protection_status", - "size": 6 - }, - { - "name": "year", - "size": 4 - } - ], - [ - { - "name": "area", - "size": 4 - } ] + ], + "list": [ + "id", + "name", + "slug", + "createdAt" ] } }, diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##habitat-stat.habitat-stat.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##habitat-stat.habitat-stat.json index be24cdd4..0db93617 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##habitat-stat.habitat-stat.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##habitat-stat.habitat-stat.json @@ -64,30 +64,45 @@ "sortable": true } }, - "protectedArea": { + "protected_area": { "edit": { - "label": "protectedArea", + "label": "protected_area", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "protectedArea", + "label": "protected_area", "searchable": true, "sortable": true } }, - "totalArea": { + "total_area": { "edit": { - "label": "totalArea", + "label": "total_area", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "totalArea", + "label": "total_area", + "searchable": true, + "sortable": true + } + }, + "environment": { + "edit": { + "label": "environment", + "description": "", + "placeholder": "", + "visible": true, + "editable": true, + "mainField": "name" + }, + "list": { + "label": "environment", "searchable": true, "sortable": true } @@ -173,13 +188,21 @@ { "name": "year", "size": 4 + } + ], + [ + { + "name": "environment", + "size": 6 }, { - "name": "protectedArea", + "name": "protected_area", "size": 4 - }, + } + ], + [ { - "name": "totalArea", + "name": "total_area", "size": 4 } ] diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##layer.layer.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##layer.layer.json index 9295fa2e..e20dd2ef 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##layer.layer.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##layer.layer.json @@ -147,6 +147,21 @@ "sortable": true } }, + "environment": { + "edit": { + "label": "environment", + "description": "", + "placeholder": "", + "visible": true, + "editable": true, + "mainField": "name" + }, + "list": { + "label": "environment", + "searchable": true, + "sortable": true + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -223,6 +238,12 @@ "name": "dataset", "size": 6 }, + { + "name": "environment", + "size": 6 + } + ], + [ { "name": "default", "size": 4 diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json index 94cd9355..72df6ba3 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json @@ -48,16 +48,16 @@ "sortable": true } }, - "totalMarineArea": { + "total_marine_area": { "edit": { - "label": "totalMarineArea", + "label": "total_marine_area", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "totalMarineArea", + "label": "total_marine_area", "searchable": true, "sortable": true } @@ -132,8 +132,8 @@ }, "list": { "label": "mpaa_protection_level_stats", - "searchable": false, - "sortable": false + "searchable": true, + "sortable": true } }, "protection_coverage_stats": { @@ -151,20 +151,104 @@ "sortable": false } }, - "bounds": { + "marine_bounds": { + "edit": { + "label": "marine_bounds", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "marine_bounds", + "searchable": false, + "sortable": false + } + }, + "total_terrestrial_area": { "edit": { - "label": "bounds", + "label": "total_terrestrial_area", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "bounds", + "label": "total_terrestrial_area", + "searchable": true, + "sortable": true + } + }, + "terrestrial_bounds": { + "edit": { + "label": "terrestrial_bounds", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "terrestrial_bounds", "searchable": false, "sortable": false } }, + "name_es": { + "edit": { + "label": "name_es", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "name_es", + "searchable": true, + "sortable": true + } + }, + "name_fr": { + "edit": { + "label": "name_fr", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "name_fr", + "searchable": true, + "sortable": true + } + }, + "marine_target": { + "edit": { + "label": "marine_target", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "marine_target", + "searchable": true, + "sortable": true + } + }, + "marine_target_year": { + "edit": { + "label": "marine_target_year", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "marine_target_year", + "searchable": true, + "sortable": true + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -225,12 +309,6 @@ } }, "layouts": { - "list": [ - "id", - "code", - "name", - "totalMarineArea" - ], "edit": [ [ { @@ -238,17 +316,23 @@ "size": 6 }, { - "name": "name", + "name": "type", "size": 6 } ], [ { - "name": "totalMarineArea", - "size": 4 + "name": "name", + "size": 6 }, { - "name": "type", + "name": "name_es", + "size": 6 + } + ], + [ + { + "name": "name_fr", "size": 6 } ], @@ -264,26 +348,58 @@ ], [ { - "name": "fishing_protection_level_stats", + "name": "protection_coverage_stats", "size": 6 }, { - "name": "mpaa_protection_level_stats", + "name": "fishing_protection_level_stats", "size": 6 } ], [ { - "name": "protection_coverage_stats", + "name": "mpaa_protection_level_stats", "size": 6 } ], [ { - "name": "bounds", + "name": "marine_bounds", + "size": 12 + } + ], + [ + { + "name": "terrestrial_bounds", "size": 12 } + ], + [ + { + "name": "total_marine_area", + "size": 4 + }, + { + "name": "total_terrestrial_area", + "size": 4 + } + ], + [ + { + "name": "marine_target", + "size": 4 + }, + { + "name": "marine_target_year", + "size": 4 + } ] + ], + "list": [ + "id", + "code", + "name", + "total_marine_area" ] } }, diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-protection-level-stat.mpaa-protection-level-stat.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-protection-level-stat.mpaa-protection-level-stat.json index 5e5e7d02..494862d3 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-protection-level-stat.mpaa-protection-level-stat.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpaa-protection-level-stat.mpaa-protection-level-stat.json @@ -64,6 +64,20 @@ "sortable": true } }, + "percentage": { + "edit": { + "label": "percentage", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "percentage", + "searchable": true, + "sortable": true + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -124,12 +138,6 @@ } }, "layouts": { - "list": [ - "id", - "location", - "mpaa_protection_level", - "area" - ], "edit": [ [ { @@ -137,16 +145,26 @@ "size": 6 }, { - "name": "mpaa_protection_level", - "size": 6 + "name": "area", + "size": 4 } ], [ { - "name": "area", + "name": "mpaa_protection_level", + "size": 6 + }, + { + "name": "percentage", "size": 4 } ] + ], + "list": [ + "id", + "location", + "mpaa_protection_level", + "area" ] } }, diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpa.mpa.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##pa.pa.json similarity index 87% rename from cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpa.mpa.json rename to cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##pa.pa.json index bdeab743..0cb2a6c4 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##mpa.mpa.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##pa.pa.json @@ -1,7 +1,7 @@ { - "key": "plugin_content_manager_configuration_content_types::api::mpa.mpa", + "key": "plugin_content_manager_configuration_content_types::api::pa.pa", "value": { - "uid": "api::mpa.mpa", + "uid": "api::pa.pa", "settings": { "bulkable": true, "filterable": true, @@ -180,45 +180,75 @@ "sortable": true } }, - "is_child": { + "iucn_category": { "edit": { - "label": "is_child", + "label": "iucn_category", + "description": "", + "placeholder": "", + "visible": true, + "editable": true, + "mainField": "slug" + }, + "list": { + "label": "iucn_category", + "searchable": true, + "sortable": true + } + }, + "designation": { + "edit": { + "label": "designation", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "is_child", + "label": "designation", "searchable": true, "sortable": true } }, - "mpa_iucn_category": { + "environment": { "edit": { - "label": "mpa_iucn_category", + "label": "environment", "description": "", "placeholder": "", "visible": true, "editable": true, - "mainField": "slug" + "mainField": "name" }, "list": { - "label": "mpa_iucn_category", + "label": "environment", "searchable": true, "sortable": true } }, - "designation": { + "coverage": { "edit": { - "label": "designation", + "label": "coverage", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "designation", + "label": "coverage", + "searchable": true, + "sortable": true + } + }, + "parent": { + "edit": { + "label": "parent", + "description": "", + "placeholder": "", + "visible": true, + "editable": true, + "mainField": "name" + }, + "list": { + "label": "parent", "searchable": true, "sortable": true } @@ -310,12 +340,6 @@ "size": 6 } ], - [ - { - "name": "wdpaid", - "size": 6 - } - ], [ { "name": "bbox", @@ -343,22 +367,38 @@ } ], [ + { + "name": "wdpaid", + "size": 4 + }, { "name": "mpaa_protection_level", "size": 6 + } + ], + [ + { + "name": "iucn_category", + "size": 6 }, { - "name": "is_child", - "size": 4 + "name": "designation", + "size": 6 } ], [ { - "name": "mpa_iucn_category", + "name": "environment", "size": 6 }, { - "name": "designation", + "name": "coverage", + "size": 4 + } + ], + [ + { + "name": "parent", "size": 6 } ] diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##protection-coverage-stat.protection-coverage-stat.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##protection-coverage-stat.protection-coverage-stat.json index 0dac0cba..6178edcd 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##protection-coverage-stat.protection-coverage-stat.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##protection-coverage-stat.protection-coverage-stat.json @@ -35,73 +35,129 @@ "sortable": true } }, - "protection_status": { + "year": { + "edit": { + "label": "year", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "year", + "searchable": true, + "sortable": true + } + }, + "protected_area": { + "edit": { + "label": "protected_area", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "protected_area", + "searchable": true, + "sortable": true + } + }, + "protected_areas_count": { + "edit": { + "label": "protected_areas_count", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "protected_areas_count", + "searchable": true, + "sortable": true + } + }, + "environment": { "edit": { - "label": "protection_status", + "label": "environment", "description": "", "placeholder": "", "visible": true, "editable": true, - "mainField": "slug" + "mainField": "name" }, "list": { - "label": "protection_status", + "label": "environment", "searchable": true, "sortable": true } }, - "year": { + "coverage": { "edit": { - "label": "year", + "label": "coverage", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "year", + "label": "coverage", + "searchable": true, + "sortable": true + } + }, + "pas": { + "edit": { + "label": "pas", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "pas", "searchable": true, "sortable": true } }, - "cumSumProtectedArea": { + "oecms": { "edit": { - "label": "cumSumProtectedArea", + "label": "oecms", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "cumSumProtectedArea", + "label": "oecms", "searchable": true, "sortable": true } }, - "protectedArea": { + "is_last_year": { "edit": { - "label": "protectedArea", + "label": "is_last_year", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "protectedArea", + "label": "is_last_year", "searchable": true, "sortable": true } }, - "protectedAreasCount": { + "global_contribution": { "edit": { - "label": "protectedAreasCount", + "label": "global_contribution", "description": "", "placeholder": "", "visible": true, "editable": true }, "list": { - "label": "protectedAreasCount", + "label": "global_contribution", "searchable": true, "sortable": true } @@ -169,7 +225,7 @@ "list": [ "id", "location", - "protection_status", + "environment", "year" ], "edit": [ @@ -179,7 +235,7 @@ "size": 6 }, { - "name": "protection_status", + "name": "environment", "size": 6 } ], @@ -187,19 +243,39 @@ { "name": "year", "size": 4 + } + ], + [ + { + "name": "coverage", + "size": 4 + } + ], + [ + { + "name": "pas", + "size": 4 }, { - "name": "cumSumProtectedArea", + "name": "oecms", "size": 4 }, { - "name": "protectedArea", + "name": "is_last_year", "size": 4 } ], [ { - "name": "protectedAreasCount", + "name": "global_contribution", + "size": 4 + }, + { + "name": "protected_area", + "size": 4 + }, + { + "name": "protected_areas_count", "size": 4 } ] diff --git a/cms/config/sync/core-store.plugin_localazy_content-transfer-setup.json b/cms/config/sync/core-store.plugin_localazy_content-transfer-setup.json index 9b984cf5..ee050991 100644 --- a/cms/config/sync/core-store.plugin_localazy_content-transfer-setup.json +++ b/cms/config/sync/core-store.plugin_localazy_content-transfer-setup.json @@ -65,7 +65,15 @@ "datasets": { "__model__": true, "name": true, - "layers": null + "layers": null, + "slug": null + } + }, + { + "environments": { + "__model__": true, + "name": true, + "slug": null } }, { @@ -109,22 +117,9 @@ "value": true, "description": true } - } - } - }, - { - "locations": { - "__model__": true, - "code": null, - "name": true, - "totalMarineArea": null, - "type": null, - "groups": null, - "members": null, - "fishing_protection_level_stats": null, - "mpaa_protection_level_stats": null, - "protection_coverage_stats": null, - "bounds": null + }, + "default": null, + "environment": null } }, { diff --git a/cms/config/sync/user-role.public.json b/cms/config/sync/user-role.public.json index eb1bb2c0..f218b55c 100644 --- a/cms/config/sync/user-role.public.json +++ b/cms/config/sync/user-role.public.json @@ -48,6 +48,12 @@ { "action": "api::dataset.dataset.findOne" }, + { + "action": "api::environment.environment.find" + }, + { + "action": "api::environment.environment.findOne" + }, { "action": "api::fishing-protection-level-stat.fishing-protection-level-stat.find" }, @@ -90,18 +96,6 @@ { "action": "api::mpa-iucn-category.mpa-iucn-category.findOne" }, - { - "action": "api::mpa.mpa.find" - }, - { - "action": "api::mpa.mpa.findOne" - }, - { - "action": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat.find" - }, - { - "action": "api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat.findOne" - }, { "action": "api::mpaa-establishment-stage.mpaa-establishment-stage.find" }, @@ -120,6 +114,12 @@ { "action": "api::mpaa-protection-level.mpaa-protection-level.findOne" }, + { + "action": "api::pa.pa.find" + }, + { + "action": "api::pa.pa.findOne" + }, { "action": "api::protection-coverage-stat.protection-coverage-stat.find" }, diff --git a/cms/export_custom-db.json b/cms/export_custom-db.json index 221fa0b8..54d63656 100644 --- a/cms/export_custom-db.json +++ b/cms/export_custom-db.json @@ -1311,7 +1311,7 @@ "updatedBy": null } }, - "api::mpa.mpa": { + "api::pa.pa": { "1": { "id": 1, "wdpaid": "555635929", diff --git a/cms/src/api/environment/content-types/environment/schema.json b/cms/src/api/environment/content-types/environment/schema.json new file mode 100644 index 00000000..3d2ce82a --- /dev/null +++ b/cms/src/api/environment/content-types/environment/schema.json @@ -0,0 +1,39 @@ +{ + "kind": "collectionType", + "collectionName": "environments", + "info": { + "singularName": "environment", + "pluralName": "environments", + "displayName": "Environment", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "attributes": { + "name": { + "pluginOptions": { + "i18n": { + "localized": true + } + }, + "type": "string", + "required": true, + "unique": false + }, + "slug": { + "pluginOptions": { + "i18n": { + "localized": false + } + }, + "type": "string", + "required": true + } + } +} diff --git a/cms/src/api/environment/controllers/environment.ts b/cms/src/api/environment/controllers/environment.ts new file mode 100644 index 00000000..351d62fb --- /dev/null +++ b/cms/src/api/environment/controllers/environment.ts @@ -0,0 +1,7 @@ +/** + * environment controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::environment.environment'); diff --git a/cms/src/api/environment/documentation/1.0.0/environment.json b/cms/src/api/environment/documentation/1.0.0/environment.json new file mode 100644 index 00000000..5136eb0a --- /dev/null +++ b/cms/src/api/environment/documentation/1.0.0/environment.json @@ -0,0 +1,599 @@ +{ + "/environments": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/environments" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [], + "operationId": "post/environments", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentRequest" + } + } + } + } + } + }, + "/environments/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/environments/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/environments/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/environments/{id}" + } + }, + "/environments/{id}/localizations": { + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentLocalizationResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Environment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "post/environments/{id}/localizations", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentLocalizationRequest" + } + } + } + } + } + } +} diff --git a/cms/src/api/environment/routes/environment.ts b/cms/src/api/environment/routes/environment.ts new file mode 100644 index 00000000..f380c577 --- /dev/null +++ b/cms/src/api/environment/routes/environment.ts @@ -0,0 +1,7 @@ +/** + * environment router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::environment.environment'); diff --git a/cms/src/api/environment/services/environment.ts b/cms/src/api/environment/services/environment.ts new file mode 100644 index 00000000..111c7e1f --- /dev/null +++ b/cms/src/api/environment/services/environment.ts @@ -0,0 +1,7 @@ +/** + * environment service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::environment.environment'); diff --git a/cms/src/api/habitat-stat/content-types/habitat-stat/schema.json b/cms/src/api/habitat-stat/content-types/habitat-stat/schema.json index a1bbc62d..3b4c81d4 100644 --- a/cms/src/api/habitat-stat/content-types/habitat-stat/schema.json +++ b/cms/src/api/habitat-stat/content-types/habitat-stat/schema.json @@ -26,25 +26,36 @@ "type": "integer", "required": true }, - "protectedArea": { + "protected_area": { "type": "decimal", "required": true, "min": 0, "column": { "defaultTo": 0, "type": "decimal", - "args": [12,2] + "args": [ + 12, + 2 + ] } }, - "totalArea": { + "total_area": { "type": "decimal", "required": true, "min": 0, "column": { "defaultTo": 0, "type": "decimal", - "args": [12,2] + "args": [ + 12, + 2 + ] } + }, + "environment": { + "type": "relation", + "relation": "oneToOne", + "target": "api::environment.environment" } } } diff --git a/cms/src/api/layer/content-types/layer/schema.json b/cms/src/api/layer/content-types/layer/schema.json index eb15b6ae..04343adb 100644 --- a/cms/src/api/layer/content-types/layer/schema.json +++ b/cms/src/api/layer/content-types/layer/schema.json @@ -98,6 +98,11 @@ }, "type": "boolean", "default": false + }, + "environment": { + "type": "relation", + "relation": "oneToOne", + "target": "api::environment.environment" } } } diff --git a/cms/src/api/location/content-types/location/schema.json b/cms/src/api/location/content-types/location/schema.json index 3e915106..95e583ae 100644 --- a/cms/src/api/location/content-types/location/schema.json +++ b/cms/src/api/location/content-types/location/schema.json @@ -10,37 +10,24 @@ "options": { "draftAndPublish": false }, - "pluginOptions": { - "i18n": { - "localized": true - } - }, + "pluginOptions": {}, "attributes": { "code": { "type": "string", "required": true, "unique": false, "description": "Unique textual identifier for the location, e.g. iso3 code for countries.", - "pluginOptions": { - "i18n": { - "localized": false - } - } + "pluginOptions": {} }, "name": { "type": "string", "required": true, - "pluginOptions": { - "i18n": { - "localized": true - } - } + "pluginOptions": {} }, - "totalMarineArea": { - "type": "decimal", + "total_marine_area": { + "type": "biginteger", "description": "Total marine area in km2", "required": true, - "min": 0, "column": { "defaultTo": 0, "type": "decimal", @@ -49,20 +36,12 @@ 2 ] }, - "pluginOptions": { - "i18n": { - "localized": false - } - } + "pluginOptions": {} }, "type": { "type": "string", "required": true, - "pluginOptions": { - "i18n": { - "localized": false - } - } + "pluginOptions": {} }, "groups": { "type": "relation", @@ -84,9 +63,9 @@ }, "mpaa_protection_level_stats": { "type": "relation", - "relation": "oneToMany", + "relation": "oneToOne", "target": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", - "mappedBy": "location" + "inversedBy": "location" }, "protection_coverage_stats": { "type": "relation", @@ -94,13 +73,34 @@ "target": "api::protection-coverage-stat.protection-coverage-stat", "mappedBy": "location" }, - "bounds": { + "marine_bounds": { "type": "json", - "pluginOptions": { - "i18n": { - "localized": true - } - } + "pluginOptions": {} + }, + "total_terrestrial_area": { + "pluginOptions": {}, + "type": "biginteger", + "required": true + }, + "terrestrial_bounds": { + "pluginOptions": {}, + "type": "json" + }, + "name_es": { + "type": "string", + "required": true + }, + "name_fr": { + "type": "string", + "required": true + }, + "marine_target": { + "type": "integer", + "min": 0, + "max": 100 + }, + "marine_target_year": { + "type": "integer" } } } diff --git a/cms/src/api/location/documentation/1.0.0/location.json b/cms/src/api/location/documentation/1.0.0/location.json index f85c9f1b..d0cd577f 100644 --- a/cms/src/api/location/documentation/1.0.0/location.json +++ b/cms/src/api/location/documentation/1.0.0/location.json @@ -253,97 +253,5 @@ ], "operationId": "get/locations/{id}" } - }, - "/locations/{id}/localizations": { - "post": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LocationLocalizationResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "tags": [ - "Location" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" - } - } - ], - "operationId": "post/locations/{id}/localizations", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LocationLocalizationRequest" - } - } - } - } - } } } diff --git a/cms/src/api/mpa/controllers/mpa.ts b/cms/src/api/mpa/controllers/mpa.ts deleted file mode 100644 index 728a90b8..00000000 --- a/cms/src/api/mpa/controllers/mpa.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * mpa controller - */ - -import { factories } from '@strapi/strapi' - -export default factories.createCoreController('api::mpa.mpa'); diff --git a/cms/src/api/mpa/routes/mpa.ts b/cms/src/api/mpa/routes/mpa.ts deleted file mode 100644 index 759b9b3b..00000000 --- a/cms/src/api/mpa/routes/mpa.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * mpa router - */ - -import { factories } from '@strapi/strapi'; - -export default factories.createCoreRouter('api::mpa.mpa', { - only: ['find', 'findOne'] -}); - diff --git a/cms/src/api/mpa/services/mpa.ts b/cms/src/api/mpa/services/mpa.ts deleted file mode 100644 index 0a44ede0..00000000 --- a/cms/src/api/mpa/services/mpa.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * mpa service - */ - -import { factories } from '@strapi/strapi'; - -export default factories.createCoreService('api::mpa.mpa'); diff --git a/cms/src/api/mpaa-establishment-stage-stat/content-types/mpaa-establishment-stage-stat/schema.json b/cms/src/api/mpaa-establishment-stage-stat/content-types/mpaa-establishment-stage-stat/schema.json deleted file mode 100644 index 681e8be7..00000000 --- a/cms/src/api/mpaa-establishment-stage-stat/content-types/mpaa-establishment-stage-stat/schema.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "kind": "collectionType", - "collectionName": "mpaa_establishment_stage_stats", - "info": { - "singularName": "mpaa-establishment-stage-stat", - "pluralName": "mpaa-establishment-stage-stats", - "displayName": "MPAA Establishment Stage Stats" - }, - "options": { - "draftAndPublish": false - }, - "pluginOptions": {}, - "attributes": { - "location": { - "type": "relation", - "relation": "oneToOne", - "target": "api::location.location" - }, - "mpaa_establishment_stage": { - "type": "relation", - "relation": "oneToOne", - "target": "api::mpaa-establishment-stage.mpaa-establishment-stage" - }, - "protection_status": { - "type": "relation", - "relation": "oneToOne", - "target": "api::protection-status.protection-status" - }, - "year": { - "type": "integer", - "required": true, - "min": 0 - }, - "area": { - "type": "decimal", - "required": true, - "min": 0, - "column": { - "defaultTo": 0, - "type": "decimal", - "args": [12,2] - } - } - } -} diff --git a/cms/src/api/mpaa-establishment-stage-stat/controllers/mpaa-establishment-stage-stat.ts b/cms/src/api/mpaa-establishment-stage-stat/controllers/mpaa-establishment-stage-stat.ts deleted file mode 100644 index 7a0a29c1..00000000 --- a/cms/src/api/mpaa-establishment-stage-stat/controllers/mpaa-establishment-stage-stat.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * mpaa-establishment-stage-stat controller - */ - -import { factories } from '@strapi/strapi' - -export default factories.createCoreController('api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat'); diff --git a/cms/src/api/mpaa-establishment-stage-stat/documentation/1.0.0/mpaa-establishment-stage-stat.json b/cms/src/api/mpaa-establishment-stage-stat/documentation/1.0.0/mpaa-establishment-stage-stat.json deleted file mode 100644 index 4ad255e9..00000000 --- a/cms/src/api/mpaa-establishment-stage-stat/documentation/1.0.0/mpaa-establishment-stage-stat.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "/mpaa-establishment-stage-stats": { - "get": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MpaaEstablishmentStageStatListResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "tags": [ - "Mpaa-establishment-stage-stat" - ], - "parameters": [ - { - "name": "sort", - "in": "query", - "description": "Sort by attributes ascending (asc) or descending (desc)", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pagination[withCount]", - "in": "query", - "description": "Return page/pageSize (default: true)", - "deprecated": false, - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pagination[page]", - "in": "query", - "description": "Page number (default: 0)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[pageSize]", - "in": "query", - "description": "Page size (default: 25)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[start]", - "in": "query", - "description": "Offset value (default: 0)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "pagination[limit]", - "in": "query", - "description": "Number of entities to return (default: 25)", - "deprecated": false, - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "fields", - "in": "query", - "description": "Fields to return (ex: title,author)", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "populate", - "in": "query", - "description": "Relations to return", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "filters", - "in": "query", - "description": "Filters to apply", - "deprecated": false, - "required": false, - "schema": { - "type": "object" - }, - "style": "deepObject" - }, - { - "name": "locale", - "in": "query", - "description": "Locale to apply", - "deprecated": false, - "required": false, - "schema": { - "type": "string" - } - } - ], - "operationId": "get/mpaa-establishment-stage-stats" - } - }, - "/mpaa-establishment-stage-stats/{id}": { - "get": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MpaaEstablishmentStageStatResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "tags": [ - "Mpaa-establishment-stage-stat" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" - } - } - ], - "operationId": "get/mpaa-establishment-stage-stats/{id}" - } - } -} diff --git a/cms/src/api/mpaa-establishment-stage-stat/routes/mpaa-establishment-stage-stat.ts b/cms/src/api/mpaa-establishment-stage-stat/routes/mpaa-establishment-stage-stat.ts deleted file mode 100644 index 8467199f..00000000 --- a/cms/src/api/mpaa-establishment-stage-stat/routes/mpaa-establishment-stage-stat.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * mpaa-establishment-stage-stat router - */ - -import { factories } from '@strapi/strapi'; - -export default factories.createCoreRouter('api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', { - only: ['find', 'findOne'] -}); diff --git a/cms/src/api/mpaa-establishment-stage-stat/services/mpaa-establishment-stage-stat.ts b/cms/src/api/mpaa-establishment-stage-stat/services/mpaa-establishment-stage-stat.ts deleted file mode 100644 index 7656bbf6..00000000 --- a/cms/src/api/mpaa-establishment-stage-stat/services/mpaa-establishment-stage-stat.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * mpaa-establishment-stage-stat service - */ - -import { factories } from '@strapi/strapi'; - -export default factories.createCoreService('api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat'); diff --git a/cms/src/api/mpaa-protection-level-stat/content-types/mpaa-protection-level-stat/schema.json b/cms/src/api/mpaa-protection-level-stat/content-types/mpaa-protection-level-stat/schema.json index f39cf8af..ae1165b8 100644 --- a/cms/src/api/mpaa-protection-level-stat/content-types/mpaa-protection-level-stat/schema.json +++ b/cms/src/api/mpaa-protection-level-stat/content-types/mpaa-protection-level-stat/schema.json @@ -12,12 +12,6 @@ }, "pluginOptions": {}, "attributes": { - "location": { - "type": "relation", - "relation": "manyToOne", - "target": "api::location.location", - "inversedBy": "mpaa_protection_level_stats" - }, "mpaa_protection_level": { "type": "relation", "relation": "oneToOne", @@ -35,6 +29,15 @@ 2 ] } + }, + "percentage": { + "type": "decimal" + }, + "location": { + "type": "relation", + "relation": "oneToOne", + "target": "api::location.location", + "mappedBy": "mpaa_protection_level_stats" } } } diff --git a/cms/src/api/mpa/content-types/mpa/schema.json b/cms/src/api/pa/content-types/pa/schema.json similarity index 77% rename from cms/src/api/mpa/content-types/mpa/schema.json rename to cms/src/api/pa/content-types/pa/schema.json index d52bfe95..cc071213 100644 --- a/cms/src/api/mpa/content-types/mpa/schema.json +++ b/cms/src/api/pa/content-types/pa/schema.json @@ -1,10 +1,10 @@ { "kind": "collectionType", - "collectionName": "mpas", + "collectionName": "pas", "info": { - "singularName": "mpa", - "pluralName": "mpas", - "displayName": "MPA", + "singularName": "pa", + "pluralName": "pas", + "displayName": "PA", "description": "" }, "options": { @@ -45,7 +45,7 @@ "children": { "type": "relation", "relation": "oneToMany", - "target": "api::mpa.mpa" + "target": "api::pa.pa" }, "data_source": { "type": "relation", @@ -70,18 +70,28 @@ "relation": "oneToOne", "target": "api::mpaa-protection-level.mpaa-protection-level" }, - "is_child": { - "type": "boolean", - "default": false, - "required": true - }, - "mpa_iucn_category": { + "iucn_category": { "type": "relation", "relation": "oneToOne", "target": "api::mpa-iucn-category.mpa-iucn-category" }, "designation": { "type": "string" + }, + "environment": { + "type": "relation", + "relation": "oneToOne", + "target": "api::environment.environment" + }, + "coverage": { + "type": "decimal", + "required": true, + "min": 0 + }, + "parent": { + "type": "relation", + "relation": "oneToOne", + "target": "api::pa.pa" } } } diff --git a/cms/src/api/pa/controllers/pa.ts b/cms/src/api/pa/controllers/pa.ts new file mode 100644 index 00000000..895ba7b4 --- /dev/null +++ b/cms/src/api/pa/controllers/pa.ts @@ -0,0 +1,75 @@ +/** + * pa controller + */ + +import { factories } from '@strapi/strapi' + +export default factories.createCoreController('api::pa.pa', ({ strapi }) => ({ + async find(ctx) { + if (ctx.query['keep-if-children-match']) { + // In addition to the controller's default behavior, we also want to keep the rows for which + // there is at least one child that matches the filters. For this, we'll use the `children` + // and `parent` fields. + + // First, we get the list of all the parents (no pagination) for which at least one child + // matches the filters. No sorting. + const { parent, ...filtersWithoutParentProperty } = ctx.query.filters ?? {}; + + const parentIds = (await strapi.entityService.findMany('api::pa.pa', { + fields: ['id'], + populate: { + parent: { + fields: ['id'], + }, + }, + filters: { + $and: [ + { + parent: { + name: { + $null: false, + }, + }, + }, + filtersWithoutParentProperty, + ], + }, + limit: -1, + }) as { id: number; parent: { id: number } }[]).map((d) => d.parent.id); + + const uniqueParentIds = [...new Set(parentIds)]; + + // Then, we get the list of all parents that match the initial request or the ones for which + // children match, using the list of ids `uniqueParentIds`. + return await super.find({ + ...ctx, + query: { + ...ctx.query, + filters: { + $and: [ + { + parent: { + name: { + $null: true, + }, + }, + }, + { + $or: [ + filtersWithoutParentProperty, + { + id: { + $in: uniqueParentIds, + }, + }, + ], + }, + ], + } + }, + }); + } else { + return await super.find(ctx); + } + } +})); diff --git a/cms/src/api/mpa/documentation/1.0.0/mpa.json b/cms/src/api/pa/documentation/1.0.0/pa.json similarity index 95% rename from cms/src/api/mpa/documentation/1.0.0/mpa.json rename to cms/src/api/pa/documentation/1.0.0/pa.json index 6821e251..f7919f60 100644 --- a/cms/src/api/mpa/documentation/1.0.0/mpa.json +++ b/cms/src/api/pa/documentation/1.0.0/pa.json @@ -1,5 +1,5 @@ { - "/mpas": { + "/pas": { "get": { "responses": { "200": { @@ -7,7 +7,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MpaListResponse" + "$ref": "#/components/schemas/PaListResponse" } } } @@ -64,7 +64,7 @@ } }, "tags": [ - "Mpa" + "Pa" ], "parameters": [ { @@ -169,10 +169,10 @@ } } ], - "operationId": "get/mpas" + "operationId": "get/pas" } }, - "/mpas/{id}": { + "/pas/{id}": { "get": { "responses": { "200": { @@ -180,7 +180,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MpaResponse" + "$ref": "#/components/schemas/PaResponse" } } } @@ -237,7 +237,7 @@ } }, "tags": [ - "Mpa" + "Pa" ], "parameters": [ { @@ -251,7 +251,7 @@ } } ], - "operationId": "get/mpas/{id}" + "operationId": "get/pas/{id}" } } } diff --git a/cms/src/api/pa/routes/pa.ts b/cms/src/api/pa/routes/pa.ts new file mode 100644 index 00000000..d3f0a9da --- /dev/null +++ b/cms/src/api/pa/routes/pa.ts @@ -0,0 +1,10 @@ +/** + * pa router + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreRouter('api::pa.pa', { + only: ['find', 'findOne'] +}); + diff --git a/cms/src/api/pa/services/pa.ts b/cms/src/api/pa/services/pa.ts new file mode 100644 index 00000000..a100b050 --- /dev/null +++ b/cms/src/api/pa/services/pa.ts @@ -0,0 +1,7 @@ +/** + * pa service + */ + +import { factories } from '@strapi/strapi'; + +export default factories.createCoreService('api::pa.pa'); diff --git a/cms/src/api/protection-coverage-stat/content-types/protection-coverage-stat/schema.json b/cms/src/api/protection-coverage-stat/content-types/protection-coverage-stat/schema.json index f00fe359..ba96f92a 100644 --- a/cms/src/api/protection-coverage-stat/content-types/protection-coverage-stat/schema.json +++ b/cms/src/api/protection-coverage-stat/content-types/protection-coverage-stat/schema.json @@ -18,19 +18,13 @@ "target": "api::location.location", "inversedBy": "protection_coverage_stats" }, - "protection_status": { - "type": "relation", - "relation": "oneToOne", - "target": "api::protection-status.protection-status" - }, "year": { "type": "integer", "required": true, "min": 0 }, - "cumSumProtectedArea": { + "protected_area": { "type": "decimal", - "required": true, "min": 0, "column": { "defaultTo": 0, @@ -41,21 +35,30 @@ ] } }, - "protectedArea": { - "type": "decimal", - "min": 0, - "column": { - "defaultTo": 0, - "type": "decimal", - "args": [ - 12, - 2 - ] - } - }, - "protectedAreasCount": { + "protected_areas_count": { "type": "integer", "required": true + }, + "environment": { + "type": "relation", + "relation": "oneToOne", + "target": "api::environment.environment" + }, + "coverage": { + "type": "decimal" + }, + "pas": { + "type": "decimal" + }, + "oecms": { + "type": "decimal" + }, + "is_last_year": { + "type": "boolean", + "default": false + }, + "global_contribution": { + "type": "decimal" } } } diff --git a/cms/types/generated/contentTypes.d.ts b/cms/types/generated/contentTypes.d.ts index dbc5d717..62edd575 100644 --- a/cms/types/generated/contentTypes.d.ts +++ b/cms/types/generated/contentTypes.d.ts @@ -1162,6 +1162,60 @@ export interface ApiDatasetDataset extends Schema.CollectionType { }; } +export interface ApiEnvironmentEnvironment extends Schema.CollectionType { + collectionName: 'environments'; + info: { + singularName: 'environment'; + pluralName: 'environments'; + displayName: 'Environment'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + name: Attribute.String & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + slug: Attribute.String & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::environment.environment', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::environment.environment', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + localizations: Attribute.Relation< + 'api::environment.environment', + 'oneToMany', + 'api::environment.environment' + >; + locale: Attribute.String; + }; +} + export interface ApiFishingProtectionLevelFishingProtectionLevel extends Schema.CollectionType { collectionName: 'fishing_protection_levels'; @@ -1352,16 +1406,21 @@ export interface ApiHabitatStatHabitatStat extends Schema.CollectionType { 'api::habitat.habitat' >; year: Attribute.Integer & Attribute.Required; - protectedArea: Attribute.Decimal & + protected_area: Attribute.Decimal & Attribute.Required & Attribute.SetMinMax<{ min: 0; }>; - totalArea: Attribute.Decimal & + total_area: Attribute.Decimal & Attribute.Required & Attribute.SetMinMax<{ min: 0; }>; + environment: Attribute.Relation< + 'api::habitat-stat.habitat-stat', + 'oneToOne', + 'api::environment.environment' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -1453,6 +1512,11 @@ export interface ApiLayerLayer extends Schema.CollectionType { }; }> & Attribute.DefaultTo; + environment: Attribute.Relation< + 'api::layer.layer', + 'oneToOne', + 'api::environment.environment' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; publishedAt: Attribute.DateTime; @@ -1488,43 +1552,11 @@ export interface ApiLocationLocation extends Schema.CollectionType { options: { draftAndPublish: false; }; - pluginOptions: { - i18n: { - localized: true; - }; - }; attributes: { - code: Attribute.String & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - name: Attribute.String & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - totalMarineArea: Attribute.Decimal & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }> & - Attribute.SetMinMax<{ - min: 0; - }>; - type: Attribute.String & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; + code: Attribute.String & Attribute.Required; + name: Attribute.String & Attribute.Required; + total_marine_area: Attribute.BigInteger & Attribute.Required; + type: Attribute.String & Attribute.Required; groups: Attribute.Relation< 'api::location.location', 'manyToMany', @@ -1542,7 +1574,7 @@ export interface ApiLocationLocation extends Schema.CollectionType { >; mpaa_protection_level_stats: Attribute.Relation< 'api::location.location', - 'oneToMany', + 'oneToOne', 'api::mpaa-protection-level-stat.mpaa-protection-level-stat' >; protection_coverage_stats: Attribute.Relation< @@ -1550,12 +1582,17 @@ export interface ApiLocationLocation extends Schema.CollectionType { 'oneToMany', 'api::protection-coverage-stat.protection-coverage-stat' >; - bounds: Attribute.JSON & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; + marine_bounds: Attribute.JSON; + total_terrestrial_area: Attribute.BigInteger & Attribute.Required; + terrestrial_bounds: Attribute.JSON; + name_es: Attribute.String & Attribute.Required; + name_fr: Attribute.String & Attribute.Required; + marine_target: Attribute.Integer & + Attribute.SetMinMax<{ + min: 0; + max: 100; }>; + marine_target_year: Attribute.Integer; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -1570,80 +1607,6 @@ export interface ApiLocationLocation extends Schema.CollectionType { 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::location.location', - 'oneToMany', - 'api::location.location' - >; - locale: Attribute.String; - }; -} - -export interface ApiMpaMpa extends Schema.CollectionType { - collectionName: 'mpas'; - info: { - singularName: 'mpa'; - pluralName: 'mpas'; - displayName: 'MPA'; - description: ''; - }; - options: { - draftAndPublish: false; - }; - attributes: { - name: Attribute.String & Attribute.Required; - area: Attribute.Decimal & - Attribute.Required & - Attribute.SetMinMax<{ - min: 0; - }>; - year: Attribute.Integer & - Attribute.SetMinMax<{ - min: 0; - }>; - protection_status: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::protection-status.protection-status' - >; - bbox: Attribute.JSON & Attribute.Required; - children: Attribute.Relation<'api::mpa.mpa', 'oneToMany', 'api::mpa.mpa'>; - data_source: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::data-source.data-source' - >; - mpaa_establishment_stage: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::mpaa-establishment-stage.mpaa-establishment-stage' - >; - location: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::location.location' - >; - wdpaid: Attribute.BigInteger; - mpaa_protection_level: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::mpaa-protection-level.mpaa-protection-level' - >; - is_child: Attribute.Boolean & - Attribute.Required & - Attribute.DefaultTo; - mpa_iucn_category: Attribute.Relation< - 'api::mpa.mpa', - 'oneToOne', - 'api::mpa-iucn-category.mpa-iucn-category' - >; - designation: Attribute.String; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - createdBy: Attribute.Relation<'api::mpa.mpa', 'oneToOne', 'admin::user'> & - Attribute.Private; - updatedBy: Attribute.Relation<'api::mpa.mpa', 'oneToOne', 'admin::user'> & - Attribute.Private; }; } @@ -1769,60 +1732,6 @@ export interface ApiMpaaEstablishmentStageMpaaEstablishmentStage }; } -export interface ApiMpaaEstablishmentStageStatMpaaEstablishmentStageStat - extends Schema.CollectionType { - collectionName: 'mpaa_establishment_stage_stats'; - info: { - singularName: 'mpaa-establishment-stage-stat'; - pluralName: 'mpaa-establishment-stage-stats'; - displayName: 'MPAA Establishment Stage Stats'; - }; - options: { - draftAndPublish: false; - }; - attributes: { - location: Attribute.Relation< - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', - 'oneToOne', - 'api::location.location' - >; - mpaa_establishment_stage: Attribute.Relation< - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', - 'oneToOne', - 'api::mpaa-establishment-stage.mpaa-establishment-stage' - >; - protection_status: Attribute.Relation< - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', - 'oneToOne', - 'api::protection-status.protection-status' - >; - year: Attribute.Integer & - Attribute.Required & - Attribute.SetMinMax<{ - min: 0; - }>; - area: Attribute.Decimal & - Attribute.Required & - Attribute.SetMinMax<{ - min: 0; - }>; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - export interface ApiMpaaProtectionLevelMpaaProtectionLevel extends Schema.CollectionType { collectionName: 'mpaa_protection_levels'; @@ -1897,11 +1806,6 @@ export interface ApiMpaaProtectionLevelStatMpaaProtectionLevelStat draftAndPublish: false; }; attributes: { - location: Attribute.Relation< - 'api::mpaa-protection-level-stat.mpaa-protection-level-stat', - 'manyToOne', - 'api::location.location' - >; mpaa_protection_level: Attribute.Relation< 'api::mpaa-protection-level-stat.mpaa-protection-level-stat', 'oneToOne', @@ -1912,6 +1816,12 @@ export interface ApiMpaaProtectionLevelStatMpaaProtectionLevelStat Attribute.SetMinMax<{ min: 0; }>; + percentage: Attribute.Decimal; + location: Attribute.Relation< + 'api::mpaa-protection-level-stat.mpaa-protection-level-stat', + 'oneToOne', + 'api::location.location' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -1929,6 +1839,82 @@ export interface ApiMpaaProtectionLevelStatMpaaProtectionLevelStat }; } +export interface ApiPaPa extends Schema.CollectionType { + collectionName: 'pas'; + info: { + singularName: 'pa'; + pluralName: 'pas'; + displayName: 'PA'; + description: ''; + }; + options: { + draftAndPublish: false; + }; + attributes: { + name: Attribute.String & Attribute.Required; + area: Attribute.Decimal & + Attribute.Required & + Attribute.SetMinMax<{ + min: 0; + }>; + year: Attribute.Integer & + Attribute.SetMinMax<{ + min: 0; + }>; + protection_status: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::protection-status.protection-status' + >; + bbox: Attribute.JSON & Attribute.Required; + children: Attribute.Relation<'api::pa.pa', 'oneToMany', 'api::pa.pa'>; + data_source: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::data-source.data-source' + >; + mpaa_establishment_stage: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::mpaa-establishment-stage.mpaa-establishment-stage' + >; + location: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::location.location' + >; + wdpaid: Attribute.BigInteger; + mpaa_protection_level: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::mpaa-protection-level.mpaa-protection-level' + >; + iucn_category: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::mpa-iucn-category.mpa-iucn-category' + >; + designation: Attribute.String; + environment: Attribute.Relation< + 'api::pa.pa', + 'oneToOne', + 'api::environment.environment' + >; + coverage: Attribute.Decimal & + Attribute.Required & + Attribute.SetMinMax<{ + min: 0; + }>; + parent: Attribute.Relation<'api::pa.pa', 'oneToOne', 'api::pa.pa'>; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + createdBy: Attribute.Relation<'api::pa.pa', 'oneToOne', 'admin::user'> & + Attribute.Private; + updatedBy: Attribute.Relation<'api::pa.pa', 'oneToOne', 'admin::user'> & + Attribute.Private; + }; +} + export interface ApiProtectionCoverageStatProtectionCoverageStat extends Schema.CollectionType { collectionName: 'protection_coverage_stats'; @@ -1947,26 +1933,26 @@ export interface ApiProtectionCoverageStatProtectionCoverageStat 'manyToOne', 'api::location.location' >; - protection_status: Attribute.Relation< - 'api::protection-coverage-stat.protection-coverage-stat', - 'oneToOne', - 'api::protection-status.protection-status' - >; year: Attribute.Integer & Attribute.Required & Attribute.SetMinMax<{ min: 0; }>; - cumSumProtectedArea: Attribute.Decimal & - Attribute.Required & - Attribute.SetMinMax<{ - min: 0; - }>; - protectedArea: Attribute.Decimal & + protected_area: Attribute.Decimal & Attribute.SetMinMax<{ min: 0; }>; - protectedAreasCount: Attribute.Integer & Attribute.Required; + protected_areas_count: Attribute.Integer & Attribute.Required; + environment: Attribute.Relation< + 'api::protection-coverage-stat.protection-coverage-stat', + 'oneToOne', + 'api::environment.environment' + >; + coverage: Attribute.Decimal; + pas: Attribute.Decimal; + oecms: Attribute.Decimal; + is_last_year: Attribute.Boolean & Attribute.DefaultTo; + global_contribution: Attribute.Decimal; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation< @@ -2135,18 +2121,18 @@ declare module '@strapi/types' { 'api::data-tool-language.data-tool-language': ApiDataToolLanguageDataToolLanguage; 'api::data-tool-resource-type.data-tool-resource-type': ApiDataToolResourceTypeDataToolResourceType; 'api::dataset.dataset': ApiDatasetDataset; + 'api::environment.environment': ApiEnvironmentEnvironment; 'api::fishing-protection-level.fishing-protection-level': ApiFishingProtectionLevelFishingProtectionLevel; 'api::fishing-protection-level-stat.fishing-protection-level-stat': ApiFishingProtectionLevelStatFishingProtectionLevelStat; 'api::habitat.habitat': ApiHabitatHabitat; 'api::habitat-stat.habitat-stat': ApiHabitatStatHabitatStat; 'api::layer.layer': ApiLayerLayer; 'api::location.location': ApiLocationLocation; - 'api::mpa.mpa': ApiMpaMpa; 'api::mpa-iucn-category.mpa-iucn-category': ApiMpaIucnCategoryMpaIucnCategory; 'api::mpaa-establishment-stage.mpaa-establishment-stage': ApiMpaaEstablishmentStageMpaaEstablishmentStage; - 'api::mpaa-establishment-stage-stat.mpaa-establishment-stage-stat': ApiMpaaEstablishmentStageStatMpaaEstablishmentStageStat; 'api::mpaa-protection-level.mpaa-protection-level': ApiMpaaProtectionLevelMpaaProtectionLevel; 'api::mpaa-protection-level-stat.mpaa-protection-level-stat': ApiMpaaProtectionLevelStatMpaaProtectionLevelStat; + 'api::pa.pa': ApiPaPa; 'api::protection-coverage-stat.protection-coverage-stat': ApiProtectionCoverageStatProtectionCoverageStat; 'api::protection-status.protection-status': ApiProtectionStatusProtectionStatus; 'api::static-indicator.static-indicator': ApiStaticIndicatorStaticIndicator; diff --git a/frontend/orval.config.ts b/frontend/orval.config.ts index 032eb93c..5942e8e3 100644 --- a/frontend/orval.config.ts +++ b/frontend/orval.config.ts @@ -36,7 +36,7 @@ module.exports = { 'Location', 'Habitat', 'Habitat-stat', - 'Mpa', + 'Pa', 'Mpaa-protection-level', 'Mpaa-protection-level-stat', 'Mpaa-establishment-stage', @@ -58,6 +58,7 @@ module.exports = { 'Data-source', 'Static-indicator', 'Contact-detail', + 'Environment', ], }, }, diff --git a/frontend/package.json b/frontend/package.json index e6217948..45116edb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -45,7 +45,7 @@ "@tailwindcss/line-clamp": "0.4.4", "@tailwindcss/typography": "0.5.9", "@tanstack/react-query": "4.26.1", - "@tanstack/react-table": "^8.9.7", + "@tanstack/react-table": "^8.20.5", "@turf/turf": "^6.5.0", "axios": "1.5.1", "class-variance-authority": "^0.7.0", diff --git a/frontend/src/components/charts/conservation-chart/index.tsx b/frontend/src/components/charts/conservation-chart/index.tsx index aafafa42..e8c06b9b 100644 --- a/frontend/src/components/charts/conservation-chart/index.tsx +++ b/frontend/src/components/charts/conservation-chart/index.tsx @@ -2,7 +2,7 @@ import { useMemo } from 'react'; import twTheme from 'lib/tailwind'; -import { useLocale, useTranslations } from 'next-intl'; +import { useTranslations } from 'next-intl'; import { ComposedChart, Bar, @@ -19,7 +19,6 @@ import { import TooltipButton from '@/components/tooltip-button'; import { cn } from '@/lib/classnames'; import { FCWithMessages } from '@/types'; -import { useGetDataInfos } from '@/types/generated/data-info'; import { getMultilineRenderer } from './helpers'; import ChartLegend from './legend'; @@ -28,6 +27,9 @@ import ChartTooltip from './tooltip'; type ConservationChartProps = { className?: string; displayTarget?: boolean; + target?: number; + targetYear?: number; + tooltipSlug: string; data: { year?: number; percentage: number; @@ -44,10 +46,12 @@ const MAX_NUM_YEARS = 20; const ConservationChart: FCWithMessages = ({ className, displayTarget = true, + target = 30, + targetYear = 2030, + tooltipSlug, data, }) => { const t = useTranslations('components.chart-conservation'); - const locale = useLocale(); const barChartData = useMemo(() => { // Last year of data available @@ -86,9 +90,12 @@ const ConservationChart: FCWithMessages = ({ // Calculate data for the historical line; first and active year are known, years in between // need to be extrapolated. const historicalLineData = useMemo(() => { - const missingYearsArr = [...Array(activeYearData.year - firstYearData.year - 1).keys()].map( - (i) => i + firstYearData.year + 1 - ); + const missingYearsArr = + activeYearData.year === firstYearData.year + ? [] + : [...Array(activeYearData.year - firstYearData.year - 1).keys()].map( + (i) => i + firstYearData.year + 1 + ); const extrapolatedHistoricalYears = missingYearsArr.map((year, idx) => { return { @@ -127,21 +134,6 @@ const ConservationChart: FCWithMessages = ({ ]; }, [activeYearData, historicalDelta]); - const { data: dataInfo } = useGetDataInfos( - { - locale, - filters: { - slug: '30x30-target', - }, - }, - { - query: { - select: ({ data }) => data?.[0], - placeholderData: { data: [] }, - }, - } - ); - const chartData = useMemo(() => { const historicalYearsArray = data?.map(({ year }) => year); const lastDataYear = historicalYearsArray[historicalYearsArray.length - 1]; @@ -176,41 +168,12 @@ const ConservationChart: FCWithMessages = ({ - {displayTarget && ( - { - const { viewBox } = props; - return ( - - - {t('30x30-target')} - - - - - - ); - }} - stroke="#FD8E28" - strokeDasharray="3 3" - /> - )} = ({ dataKey="year" ticks={xAxisTicks} domain={[firstYearData.year - 0.4, lastYearData.year]} + stroke="#000" + tick={{ fill: '#000' }} + axisLine={{ stroke: '#000' }} + tickLine={{ stroke: '#000' }} /> - + {chartData.map((entry, index) => ( + + ))} + + - `${value}%`} + = ({ - - {chartData.map((entry, index) => ( - + - ))} - + + + )} + + `${value}%`} + stroke="#000" + tick={{ fill: '#000' }} + axisLine={{ stroke: '#000' }} + tickLine={{ stroke: '#000' }} + /> - + ); }; diff --git a/frontend/src/components/charts/conservation-chart/legend/index.tsx b/frontend/src/components/charts/conservation-chart/legend/index.tsx index b3c9b119..685f7b40 100644 --- a/frontend/src/components/charts/conservation-chart/legend/index.tsx +++ b/frontend/src/components/charts/conservation-chart/legend/index.tsx @@ -1,20 +1,67 @@ -import { useTranslations } from 'next-intl'; +import { useLocale, useTranslations } from 'next-intl'; +import TooltipButton from '@/components/tooltip-button'; import { FCWithMessages } from '@/types'; +import { useGetDataInfos } from '@/types/generated/data-info'; -const ChartLegend: FCWithMessages = () => { +interface ChartLegendProps { + displayTarget?: boolean; + target?: number; + targetYear?: number; + tooltipSlug: string; +} + +const ChartLegend: FCWithMessages = ({ + displayTarget, + target, + targetYear, + tooltipSlug, +}) => { const t = useTranslations('components.chart-conservation'); + const locale = useLocale(); + + const { data: dataInfo } = useGetDataInfos( + { + locale, + filters: { + slug: tooltipSlug, + }, + }, + { + query: { + select: ({ data }) => data?.[0], + placeholderData: { data: [] }, + }, + } + ); return ( -
+
- + {t('historical-trend')} - + {t('future-projection')} + {displayTarget && ( + + + + {t.rich('target-xx-by', { + target, + year: targetYear, + })} + + + + )}
); }; diff --git a/frontend/src/components/charts/horizontal-bar-chart/index.tsx b/frontend/src/components/charts/horizontal-bar-chart/index.tsx index 75b03cdf..7ae9a8b9 100644 --- a/frontend/src/components/charts/horizontal-bar-chart/index.tsx +++ b/frontend/src/components/charts/horizontal-bar-chart/index.tsx @@ -10,7 +10,13 @@ import { FCWithMessages } from '@/types'; const DEFAULT_MAX_PERCENTAGE = 100; const PROTECTION_TARGET = 30; -type HorizontalBarChartProps = { +interface Source { + id: number; + title: string; + url: string; +} + +interface HorizontalBarChartProps { className: string; data: { background: string; @@ -18,19 +24,11 @@ type HorizontalBarChartProps = { totalArea: number; protectedArea: number; info?: string; - sources?: - | { - title: string; - url: string; - } - | { - title: string; - url: string; - }[]; + sources?: Source | Source[]; }; showLegend?: boolean; showTarget?: boolean; -}; +} const HorizontalBarChart: FCWithMessages = ({ className, diff --git a/frontend/src/components/positional-scroll/index.tsx b/frontend/src/components/positional-scroll/index.tsx index a18ba7f4..9b899a1d 100644 --- a/frontend/src/components/positional-scroll/index.tsx +++ b/frontend/src/components/positional-scroll/index.tsx @@ -1,8 +1,8 @@ -import { PropsWithChildren, useEffect, useState } from 'react'; +import { PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react'; import { cn } from '@/lib/classnames'; -export type ScrollPositions = 'start' | 'middle' | 'end'; +export type ScrollPositions = 'start' | 'middle' | 'end' | 'no-scroll'; export type PositionalScrollProps = PropsWithChildren<{ className?: string; @@ -16,21 +16,17 @@ const PositionalScroll: React.FC = ({ onYScrollPositionChange, children, }) => { + const ref = useRef(); + const [xPosition, setXPosition] = useState('start'); const [yPosition, setYPosition] = useState('start'); - useEffect(() => { - if (!onXScrollPositionChange) return; - onXScrollPositionChange(xPosition); - }, [onXScrollPositionChange, xPosition]); - - useEffect(() => { - if (!onYScrollPositionChange) return; - onYScrollPositionChange(yPosition); - }, [onYScrollPositionChange, yPosition]); + const handleScroll = useCallback(() => { + const target = ref.current; - const handleScroll = (event) => { - const target = event.target; + if (!target) { + return; + } const xAtStartPosition = target.scrollLeft === 0; const xAtEndPosition = target.scrollLeft === target.scrollWidth - target.clientWidth; @@ -38,15 +34,47 @@ const PositionalScroll: React.FC = ({ const yAtStartPosition = target.scrollTop === 0; const yAtEndPosition = target.scrollTop === target.scrollHeight - target.clientHeight; - const calculatedXPosition = xAtStartPosition ? 'start' : xAtEndPosition ? 'end' : 'middle'; - const calculatedYPosition = yAtStartPosition ? 'start' : yAtEndPosition ? 'end' : 'middle'; + let calculatedXPosition: ScrollPositions = 'middle'; + if (xAtStartPosition && xAtEndPosition) { + calculatedXPosition = 'no-scroll'; + } else if (xAtStartPosition) { + calculatedXPosition = 'start'; + } else if (xAtEndPosition) { + calculatedXPosition = 'end'; + } + + let calculatedYPosition: ScrollPositions = 'middle'; + if (yAtStartPosition && yAtEndPosition) { + calculatedYPosition = 'no-scroll'; + } else if (yAtStartPosition) { + calculatedYPosition = 'start'; + } else if (yAtEndPosition) { + calculatedYPosition = 'end'; + } + + setXPosition(calculatedXPosition); + setYPosition(calculatedYPosition); + }, []); - if (calculatedXPosition !== xPosition) setXPosition(calculatedXPosition); - if (calculatedYPosition !== yPosition) setYPosition(calculatedYPosition); - }; + // TODO: improve this + // Regularly recomputes the scroll position to make sure that if the size of the content has + // changed (independently from the scroll), we're still providing accurate information. + useEffect(() => { + setInterval(() => handleScroll(), 1000); + }, [handleScroll]); + + useEffect(() => { + if (!onXScrollPositionChange) return; + onXScrollPositionChange(xPosition); + }, [onXScrollPositionChange, xPosition]); + + useEffect(() => { + if (!onYScrollPositionChange) return; + onYScrollPositionChange(yPosition); + }, [onYScrollPositionChange, yPosition]); return ( -
+
{children}
); diff --git a/frontend/src/components/terrestrial-data-disclaimer-dialog.tsx b/frontend/src/components/terrestrial-data-disclaimer-dialog.tsx new file mode 100644 index 00000000..be4c8564 --- /dev/null +++ b/frontend/src/components/terrestrial-data-disclaimer-dialog.tsx @@ -0,0 +1,59 @@ +import { useAtom } from 'jotai'; +import { useTranslations } from 'next-intl'; + +import { Button } from '@/components/ui/button'; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog'; +import Icon from '@/components/ui/icon'; +import { terrestrialDataDisclaimerDialogAtom } from '@/containers/map/store'; +import Notification from '@/styles/icons/notification.svg'; +import { FCWithMessages } from '@/types'; + +interface TerrestrialDataDisclaimerDialogProps { + onClose?: () => void; +} + +const TerrestrialDataDisclaimerDialog: FCWithMessages = ({ + onClose, +}) => { + const t = useTranslations('pages.progress-tracker'); + const [, setOpen] = useAtom(terrestrialDataDisclaimerDialogAtom); + + return ( + + + + + {t('important-notification')} + + + {t('terrestrial-data-disclaimer-dialog-title')} + + + {t.rich('terrestrial-data-disclaimer-dialog-content', { + br: () =>
, + })} +
+ + + +
+
+ ); +}; + +TerrestrialDataDisclaimerDialog.messages = ['pages.progress-tracker']; + +export default TerrestrialDataDisclaimerDialog; diff --git a/frontend/src/components/tooltip-button/index.tsx b/frontend/src/components/tooltip-button/index.tsx index c2664320..fa12d510 100644 --- a/frontend/src/components/tooltip-button/index.tsx +++ b/frontend/src/components/tooltip-button/index.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { Fragment, ReactNode, useState } from 'react'; import Linkify from 'react-linkify'; @@ -10,21 +10,25 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover import { cn } from '@/lib/classnames'; import { FCWithMessages } from '@/types'; -type TooltipButtonProps = { +interface Source { + id: number; + title: string; + url: string; +} + +interface TooltipButtonProps { className?: string; text: string; - sources?: - | { - title: string; - url: string; - } - | { - title: string; - url: string; - }[]; -}; + sources?: Source | Source[]; + extraContent?: ReactNode; +} -const TooltipButton: FCWithMessages = ({ className, text, sources }) => { +const TooltipButton: FCWithMessages = ({ + className, + text, + sources, + extraContent, +}) => { const t = useTranslations('components.tooltip-button'); const [isTooltipOpen, setIsTooltipOpen] = useState(false); @@ -67,11 +71,10 @@ const TooltipButton: FCWithMessages = ({ className, text, so {Array.isArray(sources) && (
- Data sources: - {sources.map(({ title, url }, index) => ( - <> + {t('data-sources:')} + {sources.map(({ id, title, url }, index) => ( + = ({ className, text, so {title} {index < sources.length - 1 && , } - + ))}
)} @@ -94,6 +97,7 @@ const TooltipButton: FCWithMessages = ({ className, text, so {t('data-source')} )} + {extraContent} ); diff --git a/frontend/src/components/ui/dialog.tsx b/frontend/src/components/ui/dialog.tsx index 38061251..acec9b10 100644 --- a/frontend/src/components/ui/dialog.tsx +++ b/frontend/src/components/ui/dialog.tsx @@ -21,7 +21,7 @@ const DialogOverlay = React.forwardRef< , - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( + React.ComponentPropsWithoutRef & { + closable?: boolean; + } +>(({ className, children, closable = true, ...props }, ref) => ( {children} - - - Close - + {closable && ( + + + Close + + )} )); @@ -60,7 +64,7 @@ DialogHeader.displayName = 'DialogHeader'; const DialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
); @@ -70,11 +74,7 @@ const DialogTitle = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + )); DialogTitle.displayName = DialogPrimitive.Title.displayName; @@ -82,11 +82,7 @@ const DialogDescription = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + )); DialogDescription.displayName = DialogPrimitive.Description.displayName; diff --git a/frontend/src/components/ui/form.tsx b/frontend/src/components/ui/form.tsx index bb1de689..877a58d9 100644 --- a/frontend/src/components/ui/form.tsx +++ b/frontend/src/components/ui/form.tsx @@ -148,7 +148,7 @@ const FormMessage = React.forwardRef<

{body} diff --git a/frontend/src/components/ui/skeleton.tsx b/frontend/src/components/ui/skeleton.tsx index 62e1c96c..a536e806 100644 --- a/frontend/src/components/ui/skeleton.tsx +++ b/frontend/src/components/ui/skeleton.tsx @@ -2,10 +2,7 @@ import { cn } from '@/lib/classnames'; function Skeleton({ className, ...props }: React.HTMLAttributes) { return ( -

+
); } diff --git a/frontend/src/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsx index b952c85a..1276a637 100644 --- a/frontend/src/components/ui/tabs.tsx +++ b/frontend/src/components/ui/tabs.tsx @@ -12,10 +12,7 @@ const TabsList = React.forwardRef< >(({ className, ...props }, ref) => ( )); @@ -28,7 +25,7 @@ const TabsTrigger = React.forwardRef< ['message']; loading?: boolean; error?: boolean; - messageError?: ComponentProps['message']; + errorMessage?: ComponentProps['message']; info?: ComponentProps['text']; sources?: ComponentProps['sources']; + tooltipExtraContent?: ReactNode; }; const d3Locales = { @@ -43,11 +45,13 @@ const Widget: FCWithMessages> = ({ title, lastUpdated, noData = false, + noDataMessage = undefined, loading = false, error = false, - messageError = undefined, + errorMessage = undefined, info, sources, + tooltipExtraContent, children, }) => { const t = useTranslations('components.widget'); @@ -67,15 +71,18 @@ const Widget: FCWithMessages> = ({
{title &&

{title}

} - {(info || sources) && } + {(info || sources) && ( + + )}
{!showNoData && lastUpdated && ( {t('updated-on', { date: formattedLastUpdated })} )}
{loading && } - {showNoData && } - {!loading && !showNoData &&
{children}
} + {!loading && error && } + {!loading && !error && noData && } + {!loading && !error && !noData &&
{children}
}
); }; diff --git a/frontend/src/components/widget/no-data/index.tsx b/frontend/src/components/widget/no-data/index.tsx index 67c83474..6f674153 100644 --- a/frontend/src/components/widget/no-data/index.tsx +++ b/frontend/src/components/widget/no-data/index.tsx @@ -7,17 +7,16 @@ type NoDataProps = { message?: string; }; -const NoData: FCWithMessages = ({ - error = false, - message = 'The current widget is not visible due to an error.', -}) => { +const NoData: FCWithMessages = ({ error = false, message }) => { const t = useTranslations('components.widget'); return (

- {error && message} - {!error && t('data-not-available')} + {error && !message && t('not-visible-due-to-error')} + {error && !!message && message} + {!error && !message && t('no-data-available')} + {!error && !!message && message}

); diff --git a/frontend/src/constants/environments.ts b/frontend/src/constants/environments.ts new file mode 100644 index 00000000..126ac39a --- /dev/null +++ b/frontend/src/constants/environments.ts @@ -0,0 +1,4 @@ +export const ENVIRONMENTS = { + terrestrial: 'terrestrial', + marine: 'marine', +}; diff --git a/frontend/src/constants/habitat-chart-colors.ts b/frontend/src/constants/habitat-chart-colors.ts index bd2e685c..e1b4ce45 100644 --- a/frontend/src/constants/habitat-chart-colors.ts +++ b/frontend/src/constants/habitat-chart-colors.ts @@ -1,3 +1,4 @@ +// The order of the keys affect the order of the habitats in the habitat widget export const HABITAT_CHART_COLORS = { 'warm-water corals': '#EC7667', 'cold-water corals': '#3ACBF9', @@ -5,4 +6,12 @@ export const HABITAT_CHART_COLORS = { seagrasses: '#2DBA66', saltmarshes: '#6D7600', seamounts: '#884B02', + forest: '#01550E', + savanna: '#FFE399', + shrubland: '#C6FF53', + grassland: '#1D931D', + 'wetlands-open-waters': '#5BB5FF', + 'rocky-mountains': '#79685A', + desert: '#FBF8D6', + artificial: '#CECECE', }; diff --git a/frontend/src/containers/homepage/intro/index.tsx b/frontend/src/containers/homepage/intro/index.tsx index 88e0a273..f785aca2 100644 --- a/frontend/src/containers/homepage/intro/index.tsx +++ b/frontend/src/containers/homepage/intro/index.tsx @@ -1,16 +1,16 @@ -import { useMemo } from 'react'; +import { useState } from 'react'; import Image from 'next/image'; import { useLocale, useTranslations } from 'next-intl'; +import TerrestrialDataDisclaimerDialog from '@/components/terrestrial-data-disclaimer-dialog'; import Icon from '@/components/ui/icon'; import SidebarItem from '@/containers/homepage/intro/sidebar-item'; import { formatPercentage } from '@/lib/utils/formats'; import ArrowRight from '@/styles/icons/arrow-right.svg'; import { FCWithMessages } from '@/types'; import { useGetProtectionCoverageStats } from '@/types/generated/protection-coverage-stat'; -import { useGetStaticIndicators } from '@/types/generated/static-indicator'; type IntroProps = { onScrollClick: () => void; @@ -20,70 +20,58 @@ const Intro: FCWithMessages = ({ onScrollClick }) => { const t = useTranslations('containers.homepage-intro'); const locale = useLocale(); - const { - data: { data: protectionStatsData }, - } = useGetProtectionCoverageStats( + const [openDisclaimer, setOpenDisclaimer] = useState(false); + + const { data: protectionStatsData } = useGetProtectionCoverageStats<{ + marine?: string; + terrestrial?: string; + }>( { locale, filters: { location: { code: 'GLOB', }, + is_last_year: { + $eq: true, + }, }, - populate: 'location', + populate: 'location,environment', // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore 'sort[year]': 'desc', - 'pagination[limit]': -1, }, { query: { - select: ({ data }) => ({ data }), - placeholderData: { data: [] }, - }, - } - ); - - const { data: protectedTerrestrialInlandAreasData } = useGetStaticIndicators( - { - locale, - filters: { - slug: 'protected-land-area-percentage', - }, - }, - { - query: { - select: ({ data }) => data?.[0], - placeholderData: { data: [] }, + placeholderData: { terrestrial: '−', marine: '−' }, + select: ({ data }) => { + const terrestrialCoverage = data?.find( + (d) => d.attributes.environment.data.attributes.slug === 'terrestrial' + )?.attributes.coverage; + + const marineCoverage = data?.find( + (d) => d.attributes.environment.data.attributes.slug === 'marine' + )?.attributes.coverage; + + return { + terrestrial: + terrestrialCoverage !== undefined + ? formatPercentage(locale, terrestrialCoverage, { + displayPercentageSign: false, + }) + : '−', + marine: + marineCoverage !== undefined + ? formatPercentage(locale, marineCoverage, { + displayPercentageSign: false, + }) + : '−', + }; + }, }, } ); - const formattedOceanProtectedAreaPercentage = useMemo(() => { - if (!protectionStatsData) return null; - - const lastProtectionDataYear = Math.max( - ...protectionStatsData.map(({ attributes }) => attributes.year) - ); - - const protectionStats = protectionStatsData.filter( - ({ attributes }) => attributes.year === lastProtectionDataYear - ); - - const totalMarineArea = - protectionStats[0]?.attributes?.location?.data?.attributes?.totalMarineArea; - - const protectedArea = protectionStats.reduce( - (acc, { attributes }) => acc + attributes?.cumSumProtectedArea, - 0 - ); - const coveragePercentage = (protectedArea * 100) / totalMarineArea; - - if (Number.isNaN(coveragePercentage)) return null; - - return formatPercentage(locale, coveragePercentage, { displayPercentageSign: false }); - }, [locale, protectionStatsData]); - return (
@@ -126,15 +114,19 @@ const Intro: FCWithMessages = ({ onScrollClick }) => {
setOpenDisclaimer(true)} /> + {openDisclaimer && ( + setOpenDisclaimer(false)} /> + )}
+ )} +
; - -export const applyFilters = (data: Rows, filters: Filters) => { - const filteredData = []; - - for (const row of data) { - let keep = true; // Whether the row is kept or filtered out - let filteredSubRows = row.subRows; - - for (const key in filters) { - // If the filter doesn't have any value, we look at the next filter - if (!filters[key].length) { - continue; - } - - // We apply the filters to the sub rows using recursion - if (filteredSubRows?.length) { - filteredSubRows = applyFilters(filteredSubRows, filters); - } - - // If the row's value doesn't match any of the filter's value and the number of matching sub - // rows (if any) is 0, the row is filtered out - if ( - !filters[key].includes(row[key] as string) && - (!filteredSubRows || filteredSubRows.length === 0) - ) { - keep = false; - break; - } - } - - if (keep) { - // We create a new row to define a new list of sub rows, if any - const newRow = { ...row }; - if (filteredSubRows) { - newRow.subRows = filteredSubRows; - } - - filteredData.push(newRow); - } - } - - return filteredData; -}; diff --git a/frontend/src/containers/map/content/details/index.tsx b/frontend/src/containers/map/content/details/index.tsx index 43a52bc6..275f7c34 100644 --- a/frontend/src/containers/map/content/details/index.tsx +++ b/frontend/src/containers/map/content/details/index.tsx @@ -1,4 +1,4 @@ -import { useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { useRouter } from 'next/router'; @@ -13,13 +13,11 @@ import CloseIcon from '@/styles/icons/close.svg'; import { FCWithMessages } from '@/types'; import { getGetLocationsQueryOptions, useGetLocations } from '@/types/generated/location'; -import ScrollingIndicators from './table/scrolling-indicators'; - const MapDetails: FCWithMessages = () => { const t = useTranslations('containers.map'); const locale = useLocale(); - const [, setSettings] = useSyncMapContentSettings(); + const [{ tab }, setSettings] = useSyncMapContentSettings(); const { query: { locationCode = 'GLOB' }, } = useRouter(); @@ -50,9 +48,9 @@ const MapDetails: FCWithMessages = () => { } ); - const handleOnCloseClick = () => { + const handleOnCloseClick = useCallback(() => { setSettings((prevSettings) => ({ ...prevSettings, showDetails: false })); - }; + }, [setSettings]); const tablesSettings = useMemo( () => ({ @@ -60,20 +58,48 @@ const MapDetails: FCWithMessages = () => { locationTypes: ['worldwide', 'region'], component: GlobalRegionalTable, title: { - worldwide: t('marine-conservation-national-regional-levels'), - region: t('marine-conservation-location'), - // Fallback to use in case the slug/code isn't defined, in order to prevent crashes - fallback: t('marine-conservation'), + summary: { + worldwide: t('environmental-conservation-national-regional-levels'), + region: t('environmental-conservation-location'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('environmental-conservation'), + }, + marine: { + worldwide: t('marine-conservation-national-regional-levels'), + region: t('marine-conservation-location'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('marine-conservation'), + }, + terrestrial: { + worldwide: t('terrestrial-conservation-national-regional-levels'), + region: t('terrestrial-conservation-location'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('terrestrial-conservation'), + }, }, }, countryHighseas: { locationTypes: ['country', 'highseas'], component: NationalHighSeasTable, title: { - country: t('marine-conservation-location'), - highseas: t('marin-conservation-high-seas'), - // Fallback to use in case the slug/code isn't defined, in order to prevent crashes - fallback: t('marine-conservation'), + summary: { + country: t('environmental-conservation-location'), + highseas: t('environmental-conservation-high-seas'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('environmental-conservation'), + }, + marine: { + country: t('marine-conservation-location'), + highseas: t('marine-conservation-high-seas'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('marine-conservation'), + }, + terrestrial: { + country: t('terrestrial-conservation-location'), + highseas: t('terrestrial-conservation-high-seas'), + // Fallback to use in case the slug/code isn't defined, in order to prevent crashes + fallback: t('terrestrial-conservation'), + }, }, }, }), @@ -88,22 +114,28 @@ const MapDetails: FCWithMessages = () => { ? tablesSettings.worldwideRegion : tablesSettings.countryHighseas; + let locationName = locationsQuery.data?.name; + if (locale === 'es') { + locationName = locationsQuery.data?.name_es; + } + if (locale === 'fr') { + locationName = locationsQuery.data?.name_fr; + } + const parsedTitle = - tableSettings.title[locationsQuery.data?.type]?.replace( - '{location}', - locationsQuery.data?.name - ) || tableSettings.title.fallback; + tableSettings.title[tab][locationsQuery.data?.type]?.replace('{location}', locationName) || + tableSettings.title[tab].fallback; return { title: parsedTitle, component: tableSettings.component, }; - }, [tablesSettings, locationsQuery.data]); + }, [locale, tablesSettings, tab, locationsQuery.data]); return ( -
-
- +
+
+

{table.title}

-
- - - +
+
); diff --git a/frontend/src/containers/map/content/details/table/expansion-controls/index.tsx b/frontend/src/containers/map/content/details/table/expansion-controls/index.tsx index f1f92a07..b77e0271 100644 --- a/frontend/src/containers/map/content/details/table/expansion-controls/index.tsx +++ b/frontend/src/containers/map/content/details/table/expansion-controls/index.tsx @@ -1,11 +1,12 @@ import { PropsWithChildren } from 'react'; import { Row } from '@tanstack/react-table'; +import { useTranslations } from 'next-intl'; import { GoTriangleDown } from 'react-icons/go'; import { LuCornerDownRight } from 'react-icons/lu'; -import { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/useColumns'; -import { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/useColumns'; +import { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/hooks'; +import { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/hooks'; import { cn } from '@/lib/classnames'; export type ExpansionControlsProps = PropsWithChildren<{ @@ -13,6 +14,8 @@ export type ExpansionControlsProps = PropsWithChildren<{ }>; const ExpansionControls: React.FC = ({ row, children }) => { + const t = useTranslations('containers.map'); + const { depth, getIsExpanded, getCanExpand, getToggleExpandedHandler } = row; const isParentRow = depth === 0; @@ -21,12 +24,13 @@ const ExpansionControls: React.FC = ({ row, children }) const toggleExpanded = getToggleExpandedHandler(); return ( -
+
{isRowExpandable && (
+ +
); }; diff --git a/frontend/src/containers/map/content/details/table/pagination/index.tsx b/frontend/src/containers/map/content/details/table/pagination/index.tsx new file mode 100644 index 00000000..faa018ce --- /dev/null +++ b/frontend/src/containers/map/content/details/table/pagination/index.tsx @@ -0,0 +1,129 @@ +import { PaginationState, RowData, Table } from '@tanstack/react-table'; +import { useTranslations } from 'next-intl'; +import { LuChevronLeft, LuChevronRight } from 'react-icons/lu'; + +import { Button } from '@/components/ui/button'; + +export interface PaginationProps { + table: Table; + pagination: PaginationState; + rowCount: number; +} + +const Pagination = ({ + table, + pagination, + rowCount, +}: PaginationProps) => { + const t = useTranslations('containers.map'); + + return ( +
+
+ {t('results-out-of', { + startIndex: pagination.pageIndex * pagination.pageSize + 1, + endIndex: Math.min(pagination.pageSize * (1 + pagination.pageIndex), rowCount), + total: rowCount, + })} +
+
+ + {pagination.pageIndex + 1 > 2 && ( + + )} + {pagination.pageIndex > 2 && '…'} + {table.getCanPreviousPage() && ( + + )} + + {table.getCanNextPage() && ( + + )} + {table.getPageCount() - (pagination.pageIndex + 1) > 2 && '…'} + {table.getPageCount() - (pagination.pageIndex + 1) > 1 && ( + + )} + +
+
+ ); +}; + +export default Pagination; diff --git a/frontend/src/containers/map/content/details/table/scrolling-indicators/index.tsx b/frontend/src/containers/map/content/details/table/scrolling-indicators/index.tsx index 10dfe8a7..9b459f27 100644 --- a/frontend/src/containers/map/content/details/table/scrolling-indicators/index.tsx +++ b/frontend/src/containers/map/content/details/table/scrolling-indicators/index.tsx @@ -20,35 +20,19 @@ const ScrollingIndicators: React.FC = ({ className, ch return ( - {xScrollPosition !== 'end' && ( + {(xScrollPosition === 'start' || xScrollPosition === 'middle') && ( <> - - - - - - + )} - {xScrollPosition !== 'start' && ( + {(xScrollPosition === 'middle' || xScrollPosition === 'end') && ( <> - - - - - - + diff --git a/frontend/src/containers/map/content/details/table/sorting-button/index.tsx b/frontend/src/containers/map/content/details/table/sorting-button/index.tsx index 928c752f..0fc22f4e 100644 --- a/frontend/src/containers/map/content/details/table/sorting-button/index.tsx +++ b/frontend/src/containers/map/content/details/table/sorting-button/index.tsx @@ -3,8 +3,8 @@ import { ArrowDownNarrowWide, ArrowUpNarrowWide, ArrowUpDown } from 'lucide-reac import { useTranslations } from 'next-intl'; import { Button } from '@/components/ui/button'; -import { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/useColumns'; -import { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/useColumns'; +import { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/hooks'; +import { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/hooks'; import { FCWithMessages } from '@/types'; const BUTTON_CLASSNAMES = '-ml-4'; diff --git a/frontend/src/containers/map/content/details/table/tooltip-button/index.tsx b/frontend/src/containers/map/content/details/table/tooltip-button/index.tsx index 75fdc389..3c369c0f 100644 --- a/frontend/src/containers/map/content/details/table/tooltip-button/index.tsx +++ b/frontend/src/containers/map/content/details/table/tooltip-button/index.tsx @@ -1,8 +1,8 @@ import { Column } from '@tanstack/react-table'; import TooltipButton from '@/components/tooltip-button'; -import type { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/useColumns'; -import type { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/useColumns'; +import type { GlobalRegionalTableColumns } from '@/containers/map/content/details/tables/global-regional/hooks'; +import type { NationalHighseasTableColumns } from '@/containers/map/content/details/tables/national-highseas/hooks'; type TableTooltipButtonProps = { column: diff --git a/frontend/src/containers/map/content/details/tables/global-regional/hooks.tsx b/frontend/src/containers/map/content/details/tables/global-regional/hooks.tsx new file mode 100644 index 00000000..90ef9f8a --- /dev/null +++ b/frontend/src/containers/map/content/details/tables/global-regional/hooks.tsx @@ -0,0 +1,480 @@ +import { useMemo } from 'react'; + +import Link from 'next/link'; + +import { AccessorKeyColumnDef, PaginationState, SortingState } from '@tanstack/react-table'; +import { useLocale } from 'next-intl'; +import { useTranslations } from 'next-intl'; + +import FiltersButton from '@/components/filters-button'; +import Icon from '@/components/ui/icon'; +import { PAGES } from '@/constants/pages'; +import HeaderItem from '@/containers/map/content/details/table/header-item'; +import { cellFormatter } from '@/containers/map/content/details/table/helpers'; +import SortingButton from '@/containers/map/content/details/table/sorting-button'; +import TooltipButton from '@/containers/map/content/details/table/tooltip-button'; +import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; +import Mountain from '@/styles/icons/mountain.svg'; +import Wave from '@/styles/icons/wave.svg'; +import { useGetDataInfos } from '@/types/generated/data-info'; +import { useGetEnvironments } from '@/types/generated/environment'; +import { useGetLocations } from '@/types/generated/location'; +import { useGetProtectionCoverageStats } from '@/types/generated/protection-coverage-stat'; +import { ProtectionCoverageStatListResponseMetaPagination } from '@/types/generated/strapi.schemas'; + +export type GlobalRegionalTableColumns = { + location: { + name: string; + name_es: string; + name_fr: string; + code: string; + mpaa_protection_level_stats: { + percentage: number; + }; + }; + environment: { + name: string; + slug: string; + }; + coverage: number; + protected_area: number; + pas: number; + oecms: number; + global_contribution: number; +}; + +const TOOLTIP_MAPPING = { + environment: 'environment', + location: 'name-country', + coverage: 'coverage', + pas: 'pas', + oecms: 'oecms', + area: 'protected-area', + fullyHighlyProtected: 'fully-highly-protected', + globalContribution: 'global-contribution', +}; + +const useTooltips = () => { + const locale = useLocale(); + + const { data: dataInfo } = useGetDataInfos( + { locale }, + { + query: { + select: ({ data }) => data, + placeholderData: { data: [] }, + }, + } + ); + + const tooltips = {}; + + Object.entries(TOOLTIP_MAPPING).map(([key, value]) => { + const tooltip = dataInfo.find(({ attributes }) => attributes.slug === value)?.attributes + ?.content; + + if (!tooltip) return; + tooltips[key] = tooltip; + }); + + return tooltips; +}; + +const useFiltersOptions = () => { + const locale = useLocale(); + + const { data: environmentOptions } = useGetEnvironments<{ name: string; value: string }[]>( + { + locale, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((environment) => ({ + name: environment.attributes.name, + value: environment.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + return { + environment: environmentOptions, + }; +}; + +export const useColumns = ( + environment: 'marine' | 'terrestrial' | null, + filters: Record, + onChangeFilters: (newFilters: Record) => void +) => { + const t = useTranslations('containers.map'); + const locale = useLocale(); + + const searchParams = useMapSearchParams(); + const tooltips = useTooltips(); + + const filtersOptions = useFiltersOptions(); + + const columns: AccessorKeyColumnDef[] = useMemo(() => { + let locationNameKey = 'name'; + if (locale === 'es') { + locationNameKey = 'name_es'; + } else if (locale === 'fr') { + locationNameKey = 'name_fr'; + } + + return [ + { + id: `location.${locationNameKey}`, + accessorKey: `location.${locationNameKey}`, + header: ({ column }) => ( + + + {t('name')} + + + ), + cell: ({ row }) => { + const { location, environment } = row.original; + return ( + + {environment.slug === 'marine' && } + {environment.slug === 'terrestrial' && ( + + )} + + {location[locationNameKey]} + + + ); + }, + }, + { + id: 'environment.name', + accessorKey: 'environment.name', + header: ({ column }) => ( + + {!environment && ( + onChangeFilters({ ...filters, [field]: values })} + /> + )} + {t('ecosystem')} + + + ), + cell: ({ row }) => { + const { environment } = row.original; + return {environment.name}; + }, + }, + { + id: 'coverage', + accessorKey: 'coverage', + header: ({ column }) => ( + + + {t('coverage')} + + + ), + cell: ({ row }) => { + const { coverage: value } = row.original; + const formattedCoverage = cellFormatter.percentage(locale, value); + + return ( + + {t.rich('percentage-bold', { + b1: (chunks) => chunks, + b2: (chunks) => {chunks}, + percentage: formattedCoverage, + })} + + ); + }, + }, + { + id: 'protected_area', + accessorKey: 'protected_area', + header: ({ column }) => ( + + + {t('area')} + + + ), + cell: ({ row }) => { + const { protected_area: value } = row.original; + const formattedValue = cellFormatter.area(locale, value); + return {t('area-km2', { area: formattedValue })}; + }, + }, + { + id: 'pas', + accessorKey: 'pas', + header: ({ column }) => ( + + + {t('pas')} + + + ), + cell: ({ row }) => { + const { pas: value } = row.original; + if (Number.isNaN(value)) return t('n-a'); + + const formattedValue = cellFormatter.percentage(locale, value); + return {t('percentage', { percentage: formattedValue })}; + }, + }, + { + id: 'oecms', + accessorKey: 'oecms', + header: ({ column }) => ( + + + {t('oecms')} + + + ), + cell: ({ row }) => { + const { oecms: value } = row.original; + if (Number.isNaN(value)) return t('n-a'); + + const formattedValue = cellFormatter.percentage(locale, value); + return {t('percentage', { percentage: formattedValue })}; + }, + }, + ...(environment === 'marine' + ? [ + { + id: 'location.mpaa_protection_level_stats.percentage', + accessorKey: 'location.mpaa_protection_level_stats.percentage', + header: ({ column }) => ( + + + {t('fully-highly-protected')} + + + ), + cell: ({ row }) => { + const { location } = row.original; + + const value = location.mpaa_protection_level_stats.percentage; + const formattedValue = cellFormatter.percentage(locale, value ?? 0); + + return ( + {t('percentage', { percentage: formattedValue })} + ); + }, + }, + ] + : []), + { + id: 'global_contribution', + accessorKey: 'global_contribution', + header: ({ column }) => ( + + + {t('global-contribution')} + + + ), + cell: ({ row }) => { + const { global_contribution: value } = row.original; + if (!value) return t('no-data'); + const formattedValue = cellFormatter.percentage(locale, value); + return {t('percentage', { percentage: formattedValue })}; + }, + }, + ]; + }, [locale, environment, t, tooltips, searchParams, filters, onChangeFilters, filtersOptions]); + + return columns; +}; + +export const useData = ( + locationCode: string, + environment: 'marine' | 'terrestrial' | null, + sorting: SortingState, + filters: Record, + pagination: PaginationState +) => { + const locale = useLocale(); + + const { + data: locationType, + isSuccess: isLocationSuccess, + isLoading: isLocationLoading, + isFetching: isLocationFetching, + } = useGetLocations( + { + locale, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['type'], + filters: { + code: locationCode, + }, + }, + { + query: { + select: ({ data }) => data[0]?.attributes.type, + }, + } + ); + + // By default, we always sort by location + let sort = 'location.name:asc,environment.name:asc'; + if (sorting.length > 0) { + sort = `${sorting[0].id}:${sorting[0].desc ? 'desc' : 'asc'}`; + + // In addition to sorting by the column the user asked about, we'll also always sort by + // environment + if (sorting[0].id !== 'environment.name') { + sort = `${sort},environment.name:asc`; + } + } + + const { data, isLoading, isFetching } = useGetProtectionCoverageStats< + [GlobalRegionalTableColumns[], ProtectionCoverageStatListResponseMetaPagination] + >( + { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['coverage', 'protected_area', 'pas', 'oecms', 'global_contribution'], + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: ['name', 'name_es', 'name_fr', 'code'], + populate: { + ...(environment === 'marine' + ? { + mpaa_protection_level_stats: { + fields: ['percentage'], + }, + } + : {}), + }, + }, + environment: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['name', 'locale'], + }, + }, + }, + }, + filters: { + ...(environment + ? { + environment: { + slug: { + $eq: environment, + }, + }, + } + : {}), + location: { + ...(locationType === 'region' + ? { + groups: { + code: { + $eq: locationCode, + }, + }, + } + : { + type: { + $in: ['country', 'highseas'], + }, + }), + }, + is_last_year: { + $eq: true, + }, + ...Object.entries(filters).reduce((res, [key, values]) => { + if (!values || values.length === 0) { + return res; + } + + const reversePathItems = key.split('.').reverse(); + + return reversePathItems.reduce((res, pathItem, index) => { + if (index === 0) { + return { [pathItem]: { $in: values } }; + } + + return { [pathItem]: res }; + }, {}); + }, {}), + }, + 'pagination[pageSize]': pagination.pageSize, + 'pagination[page]': pagination.pageIndex + 1, + sort, + }, + { + query: { + enabled: isLocationSuccess, + placeholderData: [], + keepPreviousData: true, + select: (data) => { + return [ + data.data?.map(({ attributes }): GlobalRegionalTableColumns => { + const location = attributes.location?.data.attributes; + const environment = attributes.environment?.data.attributes; + + const localizedEnvironment = [ + environment, + ...(environment.localizations.data.map((environment) => environment.attributes) ?? + []), + ].find((data) => data.locale === locale); + + return { + location: { + name: location?.name, + name_es: location?.name_es, + name_fr: location?.name_fr, + code: location.code, + mpaa_protection_level_stats: { + percentage: location?.mpaa_protection_level_stats?.data?.attributes.percentage, + }, + }, + environment: { + name: localizedEnvironment.name, + slug: localizedEnvironment.slug, + }, + coverage: attributes.coverage, + protected_area: attributes.protected_area, + pas: attributes.pas, + oecms: attributes.oecms, + global_contribution: attributes.global_contribution, + }; + }) ?? [], + data.meta?.pagination ?? {}, + ]; + }, + }, + } + ); + + return { + data, + isLoading: isLoading || isLocationLoading, + isFetching: isFetching || isLocationFetching, + }; +}; diff --git a/frontend/src/containers/map/content/details/tables/global-regional/index.tsx b/frontend/src/containers/map/content/details/tables/global-regional/index.tsx index 35759a45..b537bed1 100644 --- a/frontend/src/containers/map/content/details/tables/global-regional/index.tsx +++ b/frontend/src/containers/map/content/details/tables/global-regional/index.tsx @@ -1,279 +1,119 @@ -import { useMemo } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useRouter } from 'next/router'; -import { useLocale } from 'next-intl'; +import { SortingState, PaginationState } from '@tanstack/react-table'; +import { usePreviousImmediate } from 'rooks'; +import FiltersButton from '@/components/filters-button'; import TooltipButton from '@/components/tooltip-button'; +import { Skeleton } from '@/components/ui/skeleton'; import Table from '@/containers/map/content/details/table'; -import useColumns from '@/containers/map/content/details/tables/global-regional/useColumns'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { FCWithMessages } from '@/types'; -import { useGetLocations } from '@/types/generated/location'; -import type { LocationListResponseDataItem } from '@/types/generated/strapi.schemas'; import SortingButton from '../../table/sorting-button'; +import { useColumns, useData } from './hooks'; + const GlobalRegionalTable: FCWithMessages = () => { const { query: { locationCode = 'GLOB' }, } = useRouter(); - const locale = useLocale(); - const globalLocationQuery = useGetLocations( - { - locale, - filters: { - code: 'GLOB', - }, - }, - { - query: { - select: ({ data }) => data?.[0]?.attributes, - }, - } + const [{ tab }] = useSyncMapContentSettings(); + const previousTab = usePreviousImmediate(tab); + + const [filters, setFilters] = useState>({}); + + const columns = useColumns( + tab === 'marine' || tab === 'terrestrial' ? tab : null, + filters, + setFilters ); - const locationsQuery = useGetLocations( - { - locale, - filters: { - code: locationCode, + const defaultSorting = useMemo( + () => [ + { + id: columns[0].accessorKey, + desc: false, }, - }, - { - query: { - queryKey: ['locations', locationCode], - select: ({ data }) => data?.[0]?.attributes, - }, - } + ], + [columns] ); - const columns = useColumns(); + const [sorting, setSorting] = useState(defaultSorting); + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 100, + }); - // Get location data and calculate data to display on the table - const { data: locationsData }: { data: LocationListResponseDataItem[] } = useGetLocations( - { - // We will use the data from the `localizations` field because the models “Protection Coverage - // Stats” and “Mpaa Protection Level Stats” are not localised and their relationship to the - // “Location” model only points to a specific localised version. As such, we're forced to load - // all the locales of the “Location” model and then figure out which version has the relation - // to the other model. - locale: 'en', - filters: - locationsQuery.data?.type === 'region' - ? { - groups: { - code: { - $eq: locationsQuery.data?.code, - }, - }, - } - : { - type: { - $eq: ['country', 'highseas'], - }, - }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - fields: ['code', 'name', 'type', 'totalMarineArea'], + const { + data: [data, { total }], + isLoading, + isFetching, + } = useData( + locationCode as string, + tab === 'marine' || tab === 'terrestrial' ? tab : null, + sorting, + filters, + pagination + ); + + // When the tab changes, we reset the filters and the sorting + useEffect(() => { + if (tab !== previousTab) { + setFilters({}); + setSorting(defaultSorting); + } + }, [tab, previousTab, defaultSorting]); + + // When the filters or the sorting changes, the page number is reset + useEffect(() => { + setPagination((prevPagination) => ({ ...prevPagination, pageIndex: 0 })); + }, [filters, sorting]); + + // While the data is loading, we're showing a table with skeletons + if (isLoading || isFetching) { + const newColumns = columns.map((column) => ({ + ...column, + cell: () => ( +
+ +
+ ), + })); + + const newData = data.length > 0 ? data : [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; + + return ( + + ); + } + + return ( +
data, - placeholderData: { data: [] }, - }, - } + columns={columns} + data={data} + sorting={sorting} + onSortingChange={setSorting} + pagination={pagination} + onPaginationChange={setPagination} + rowCount={total ?? 0} + /> ); - - // Calculate table data - const parsedData = useMemo(() => { - return locationsData.map(({ attributes: location }) => { - const localizedLocation = [ - { ...location, locale: 'en' }, - ...(location.localizations.data.map( - // The types below are wrong. There is definitely an `attributes` key inside - // `localizations`. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (localization) => localization.attributes - ) ?? []), - ].find((data) => data.locale === locale); - - // Base stats needed for calculations - const protectionCoverageStats = - [ - location.protection_coverage_stats.data, - ...(location.localizations.data.map( - // The types below are wrong. There is definitely an `attributes` key inside - // `localizations`. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (localization) => localization.attributes.protection_coverage_stats.data - ) ?? []), - ].find((data) => data?.length) ?? []; - - const mpaaProtectionLevelStats = - [ - location.mpaa_protection_level_stats.data, - ...(location.localizations.data.map( - // The types below are wrong. There is definitely an `attributes` key inside - // `localizations`. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (localization) => localization.attributes.mpaa_protection_level_stats.data - ) ?? []), - ].find((data) => data?.length) ?? []; - - // const fishingProtectionLevelStats = - // [ - // location.fishing_protection_level_stats.data, - // ...(location.localizations.data.map( - // // The types below are wrong. There is definitely an `attributes` key inside - // // `localizations`. - // // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // // @ts-ignore - // (localization) => localization.attributes.fishing_protection_level_stats.data - // ) ?? []), - // ].find((data) => data?.length) ?? []; - - // Find coverage stats data for the last available year in the data - const lastCoverageDataYear = Math.max( - ...protectionCoverageStats.map(({ attributes }) => attributes.year) - ); - const coverageStats = protectionCoverageStats.filter( - ({ attributes }) => attributes.year === lastCoverageDataYear - ); - - // Coverage calculations (MPA + OECM) - const protectedArea = coverageStats.reduce( - (acc, { attributes }) => acc + attributes?.cumSumProtectedArea, - 0 - ); - const coveragePercentage = (protectedArea * 100) / location.totalMarineArea; - - // MPAs calculations - const numMPAs = - coverageStats.find( - ({ attributes }) => attributes?.protection_status?.data?.attributes?.slug === 'mpa' - )?.attributes?.protectedAreasCount || 0; - - // OECMs calculations - const numOECMs = - coverageStats.find( - ({ attributes }) => attributes?.protection_status?.data?.attributes?.slug === 'oecm' - )?.attributes?.protectedAreasCount || 0; - - const percentageMPAs = (numMPAs * 100) / (numMPAs + numOECMs); - const percentageOECMs = (numOECMs * 100) / (numMPAs + numOECMs); - - // Fully/Highly Protected calculations - const fullyHighlyProtected = mpaaProtectionLevelStats.filter( - ({ attributes }) => - attributes?.mpaa_protection_level?.data?.attributes?.slug === 'fully-highly-protected' - ); - const fullyHighlyProtectedArea = fullyHighlyProtected.reduce( - (acc, { attributes }) => acc + attributes?.area, - 0 - ); - const fullyHighlyProtectedAreaPercentage = - (fullyHighlyProtectedArea * 100) / location.totalMarineArea; - - // Highly Protected LFP calculations - // const lfpHighProtected = fishingProtectionLevelStats.filter( - // ({ attributes }) => - // attributes?.fishing_protection_level?.data?.attributes?.slug === 'highly' - // ); - // const lfpHighProtectedArea = lfpHighProtected.reduce( - // (acc, { attributes }) => acc + attributes?.area, - // 0 - // ); - // const lfpHighProtectedPercentage = (lfpHighProtectedArea * 100) / location.totalMarineArea; - - // Global contributions calculations - const globalContributionPercentage = - (protectedArea * 100) / globalLocationQuery?.data?.totalMarineArea; - - return { - location: localizedLocation.name, - locationCode: location.code, - coverage: coveragePercentage, - area: protectedArea, - locationType: location.type, - mpas: percentageMPAs, - oecms: percentageOECMs, - fullyHighlyProtected: fullyHighlyProtectedAreaPercentage, - // highlyProtectedLfp: lfpHighProtectedPercentage, - globalContribution: globalContributionPercentage, - }; - }); - }, [locale, globalLocationQuery?.data, locationsData]); - - const tableData = parsedData; - - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - //@ts-ignore - return
; }; GlobalRegionalTable.messages = [ @@ -282,6 +122,7 @@ GlobalRegionalTable.messages = [ // Dependencies of `useColumns` ...SortingButton.messages, ...TooltipButton.messages, + ...FiltersButton.messages, ]; export default GlobalRegionalTable; diff --git a/frontend/src/containers/map/content/details/tables/global-regional/useColumns.tsx b/frontend/src/containers/map/content/details/tables/global-regional/useColumns.tsx deleted file mode 100644 index 4fac4ae6..00000000 --- a/frontend/src/containers/map/content/details/tables/global-regional/useColumns.tsx +++ /dev/null @@ -1,189 +0,0 @@ -import { useMemo } from 'react'; - -import Link from 'next/link'; - -import { ColumnDef, SortingFnOption } from '@tanstack/react-table'; -import { useLocale } from 'next-intl'; -import { useTranslations } from 'next-intl'; - -import { PAGES } from '@/constants/pages'; -import HeaderItem from '@/containers/map/content/details/table/header-item'; -import { cellFormatter } from '@/containers/map/content/details/table/helpers'; -import SortingButton from '@/containers/map/content/details/table/sorting-button'; -import TooltipButton from '@/containers/map/content/details/table/tooltip-button'; -import useTooltips from '@/containers/map/content/details/tables/global-regional/useTooltips'; -import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; - -export type GlobalRegionalTableColumns = { - location: string; - locationCode: string; - coverage: number; - locationType: string; - mpas: number; - oecms: number; - area: number; - fullyHighlyProtected: number; - highlyProtectedLfp: number; - globalContribution: number; -}; - -const useColumns = () => { - const t = useTranslations('containers.map'); - const locale = useLocale(); - - const searchParams = useMapSearchParams(); - const tooltips = useTooltips(); - - const columns: ColumnDef[] = useMemo(() => { - return [ - { - accessorKey: 'location', - sortingFn: 'localeStringCompare' as SortingFnOption, - header: ({ column }) => ( - - - {t('name')} - - - ), - cell: ({ row }) => { - const { location, locationCode } = row.original; - return ( - - - {location} - - - ); - }, - }, - { - accessorKey: 'coverage', - header: ({ column }) => ( - - - {t('coverage')} - - - ), - cell: ({ row }) => { - const { coverage: value } = row.original; - const formattedCoverage = cellFormatter.percentage(locale, value); - - return ( - - {t.rich('percentage-bold', { - b1: (chunks) => chunks, - b2: (chunks) => {chunks}, - percentage: formattedCoverage, - })} - - ); - }, - }, - { - accessorKey: 'area', - header: ({ column }) => ( - - - {t('area')} - - - ), - cell: ({ row }) => { - const { area: value } = row.original; - const formattedValue = cellFormatter.area(locale, value); - return {t('area-km2', { area: formattedValue })}; - }, - }, - { - accessorKey: 'mpas', - header: ({ column }) => ( - - - {t('mpas')} - - - ), - cell: ({ row }) => { - const { mpas: value } = row.original; - if (Number.isNaN(value)) return t('n-a'); - - const formattedValue = cellFormatter.percentage(locale, value); - return {t('percentage', { percentage: formattedValue })}; - }, - }, - { - accessorKey: 'oecms', - header: ({ column }) => ( - - - {t('oecms')} - - - ), - cell: ({ row }) => { - const { oecms: value } = row.original; - if (Number.isNaN(value)) return t('n-a'); - - const formattedValue = cellFormatter.percentage(locale, value); - return {t('percentage', { percentage: formattedValue })}; - }, - }, - { - accessorKey: 'fullyHighlyProtected', - header: ({ column }) => ( - - - {t('fully-highly-protected')} - - - ), - cell: ({ row }) => { - const { fullyHighlyProtected: value } = row.original; - const formattedValue = cellFormatter.percentage(locale, value); - return {t('percentage', { percentage: formattedValue })}; - }, - }, - // { - // accessorKey: 'highlyProtectedLfp', - // header: ({ column }) => ( - // - // - // {t('highly-protected-lfp')} - // - // - // ), - // cell: ({ row }) => { - // const { highlyProtectedLfp: value } = row.original; - // if (!value) return <>No data; - // const formattedValue = cellFormatter.percentage(locale, value); - // return {t('percentage', { percentage: formattedValue })}; - // }, - // }, - { - accessorKey: 'globalContribution', - header: ({ column }) => ( - - - {t('global-contribution')} - - - ), - cell: ({ row }) => { - const { globalContribution: value } = row.original; - if (!value) return t('no-data'); - const formattedValue = cellFormatter.percentage(locale, value); - return {t('percentage', { percentage: formattedValue })}; - }, - }, - ]; - }, [locale, searchParams, t, tooltips]); - - return columns; -}; - -export default useColumns; diff --git a/frontend/src/containers/map/content/details/tables/global-regional/useTooltips.tsx b/frontend/src/containers/map/content/details/tables/global-regional/useTooltips.tsx deleted file mode 100644 index 170f133f..00000000 --- a/frontend/src/containers/map/content/details/tables/global-regional/useTooltips.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { useLocale } from 'next-intl'; - -import { useGetDataInfos } from '@/types/generated/data-info'; - -const TOOLTIP_MAPPING = { - location: 'name-country', - coverage: 'coverage', - locationType: 'location-type', - mpas: 'mpas', - oecms: 'oecms', - area: 'protected-area', - fullyHighlyProtected: 'fully-highly-protected', - highlyProtectedLfp: 'highly-protected-lfp', - globalContribution: 'global-contribution', -}; - -const useTooltips = () => { - const locale = useLocale(); - - const { data: dataInfo } = useGetDataInfos( - { locale }, - { - query: { - select: ({ data }) => data, - placeholderData: { data: [] }, - }, - } - ); - - const tooltips = {}; - - Object.entries(TOOLTIP_MAPPING).map(([key, value]) => { - const tooltip = dataInfo.find(({ attributes }) => attributes.slug === value)?.attributes - ?.content; - - if (!tooltip) return; - tooltips[key] = tooltip; - }); - - return tooltips; -}; - -export default useTooltips; diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/hooks.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/hooks.tsx new file mode 100644 index 00000000..b0cbe89a --- /dev/null +++ b/frontend/src/containers/map/content/details/tables/national-highseas/hooks.tsx @@ -0,0 +1,754 @@ +import { useCallback, useMemo } from 'react'; + +import { AccessorKeyColumnDef, PaginationState, SortingState } from '@tanstack/react-table'; +import { useLocale, useTranslations } from 'next-intl'; + +import FiltersButton from '@/components/filters-button'; +import ExpansionControls from '@/containers/map/content/details/table/expansion-controls'; +import HeaderItem from '@/containers/map/content/details/table/header-item'; +import { cellFormatter } from '@/containers/map/content/details/table/helpers'; +import SortingButton from '@/containers/map/content/details/table/sorting-button'; +import TooltipButton from '@/containers/map/content/details/table/tooltip-button'; +import { useGetDataInfos } from '@/types/generated/data-info'; +import { useGetDataSources } from '@/types/generated/data-source'; +import { useGetEnvironments } from '@/types/generated/environment'; +import { useGetMpaIucnCategories } from '@/types/generated/mpa-iucn-category'; +import { useGetMpaaEstablishmentStages } from '@/types/generated/mpaa-establishment-stage'; +import { useGetMpaaProtectionLevels } from '@/types/generated/mpaa-protection-level'; +import { useGetPas } from '@/types/generated/pa'; +import { useGetProtectionStatuses } from '@/types/generated/protection-status'; +import { + Pa, + PaChildrenDataItemAttributes, + PaListResponse, + PaListResponseMetaPagination, +} from '@/types/generated/strapi.schemas'; + +interface NationalHighseasTableRow { + name: string; + coverage: number; + area: number; + environment: { + name: string; + slug: string; + }; + data_source: { + title: string; + slug: string; + }; + protection_status: { + name: string; + slug: string; + }; + iucn_category: { + name: string; + slug: string; + }; + mpaa_establishment_stage: { + name: string; + slug: string; + }; + mpaa_protection_level: { + name: string; + slug: string; + }; +} + +export type NationalHighseasTableColumns = NationalHighseasTableRow & { + subRows?: NationalHighseasTableRow[]; +}; + +const TOOLTIP_MAPPING = { + protectedArea: 'name-pa', + coverage: 'coverage-wdpa', + protectedAreaType: 'protected-area-type', + establishmentStage: 'establishment-stage', + protectionLevel: 'protection-level', + fishingProtectionLevel: 'fishing-protection-level', + area: 'protected-area-mpa', + dataSource: 'details-data-source', + iucnCategory: 'details-iucn-category', +}; + +const useTooltips = () => { + const locale = useLocale(); + + const { data: dataInfo } = useGetDataInfos( + { locale }, + { + query: { + select: ({ data }) => data, + placeholderData: { data: [] }, + }, + } + ); + + const tooltips = {}; + + Object.entries(TOOLTIP_MAPPING).map(([key, value]) => { + const tooltip = dataInfo.find(({ attributes }) => attributes.slug === value)?.attributes + ?.content; + + if (!tooltip) return; + tooltips[key] = tooltip; + }); + + return tooltips; +}; + +const useFiltersOptions = () => { + const locale = useLocale(); + + const { data: environmentOptions } = useGetEnvironments<{ name: string; value: string }[]>( + { + locale, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((environment) => ({ + name: environment.attributes.name, + value: environment.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + const { data: dataSourceOptions } = useGetDataSources<{ name: string; value: string }[]>( + { + locale, // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['title', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data + .map((dataSource) => ({ + name: dataSource.attributes.title, + value: dataSource.attributes.slug, + })) + .filter(({ value }) => + // ? Even though there are more data sources, we limit the display to these + ['mpatlas', 'protected-planet']?.includes(value) + ), + placeholderData: { data: [] }, + }, + } + ); + + const { data: protectionStatusOptions } = useGetProtectionStatuses< + { name: string; value: string }[] + >( + { + locale, // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((protectionStatus) => ({ + name: protectionStatus.attributes.name, + value: protectionStatus.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + const { data: iucnCategoryOptions } = useGetMpaIucnCategories<{ name: string; value: string }[]>( + { + locale, // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((iucnCategory) => ({ + name: iucnCategory.attributes.name, + value: iucnCategory.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + const { data: mpaaEstablishmentStageOptions } = useGetMpaaEstablishmentStages< + { name: string; value: string }[] + >( + { + locale, // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((mpaaEstablishmentStage) => ({ + name: mpaaEstablishmentStage.attributes.name, + value: mpaaEstablishmentStage.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + const { data: mpaaProtectionLevelOptions } = useGetMpaaProtectionLevels< + { name: string; value: string }[] + >( + { + locale, // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'slug'], + 'pagination[limit]': -1, + }, + { + query: { + select: ({ data }) => + data.map((mpaaProtectionLevel) => ({ + name: mpaaProtectionLevel.attributes.name, + value: mpaaProtectionLevel.attributes.slug, + })), + placeholderData: { data: [] }, + }, + } + ); + + return { + environment: environmentOptions, + dataSource: dataSourceOptions, + protectionStatus: protectionStatusOptions, + iucnCategory: iucnCategoryOptions, + mpaaEstablishmentStage: mpaaEstablishmentStageOptions, + mpaaProtectionLevel: mpaaProtectionLevelOptions, + }; +}; + +export const useColumns = ( + environment: 'marine' | 'terrestrial' | null, + filters: Record, + onChangeFilters: (newFilters: Record) => void +) => { + const t = useTranslations('containers.map'); + const locale = useLocale(); + + const tooltips = useTooltips(); + + const filtersOptions = useFiltersOptions(); + + const columns: AccessorKeyColumnDef[] = useMemo(() => { + return [ + { + id: 'name', + accessorKey: 'name', + header: ({ column }) => ( + + + {t('name')} + + + ), + cell: ({ row }) => { + const { + original: { name }, + } = row; + return ( + + {name} + + ); + }, + size: 300, + }, + { + id: 'environment.name', + accessorKey: 'environment.name', + header: ({ column }) => ( + + {!environment && ( + onChangeFilters({ ...filters, [field]: values })} + /> + )} + {t('ecosystem')} + + + ), + cell: ({ row }) => { + const { environment } = row.original; + return {environment.name}; + }, + }, + { + id: 'coverage', + accessorKey: 'coverage', + header: ({ column }) => ( + + + {t('coverage')} + + + ), + cell: ({ row }) => { + const { coverage: value } = row.original; + if (value === undefined || value === null) return <>—; + + const formattedCoverage = cellFormatter.percentage(locale, value, { + displayZeroValue: false, + displayPercentageSign: false, + }); + + return ( + + {t.rich('percentage-bold', { + b1: (chunks) => chunks, + b2: (chunks) => {chunks}, + percentage: formattedCoverage, + })} + + ); + }, + }, + { + id: 'area', + accessorKey: 'area', + header: ({ column }) => ( + + + {t('area')} + + + ), + cell: ({ row }) => { + const { area: value } = row.original; + const formattedValue = cellFormatter.area(locale, value); + return {t('area-km2', { area: formattedValue })}; + }, + }, + { + id: 'data_source.title', + accessorKey: 'data_source.title', + header: ({ column }) => ( + + {environment !== 'terrestrial' && ( + onChangeFilters({ ...filters, [field]: values })} + /> + )} + {t('data-source')} + + + ), + cell: ({ row }) => { + const { data_source } = row.original; + const formattedValue = data_source?.title || t('n-a'); + return <>{formattedValue}; + }, + }, + { + id: 'protection_status.name', + accessorKey: 'protection_status.name', + header: ({ column }) => ( + + onChangeFilters({ ...filters, [field]: values })} + /> + {t('type')} + + + ), + cell: ({ row }) => { + const { protection_status } = row.original; + const formattedValue = protection_status?.name ?? '-'; + return <>{formattedValue}; + }, + }, + { + id: 'iucn_category.name', + accessorKey: 'iucn_category.name', + header: ({ column }) => ( + + onChangeFilters({ ...filters, [field]: values })} + /> + {t('iucn-category')} + + + ), + cell: ({ row }) => { + const { iucn_category } = row.original; + const formattedValue = iucn_category?.name || t('n-a'); + return <>{formattedValue}; + }, + }, + ...(environment === 'marine' + ? [ + { + id: 'mpaa_establishment_stage.name', + accessorKey: 'mpaa_establishment_stage.name', + header: ({ column }) => ( + + onChangeFilters({ ...filters, [field]: values })} + /> + {t('establishment-stage')} + + + ), + cell: ({ row }) => { + const { mpaa_establishment_stage } = row.original; + + const hasSubRowWithValue = + row.subRows.length > 0 && + row.subRows.some((row) => !!row.original.mpaa_establishment_stage); + + let fallbackValue = t('not-assessed'); + if (hasSubRowWithValue) { + fallbackValue = '−'; + } + + const formattedValue = mpaa_establishment_stage.name ?? fallbackValue; + return <>{formattedValue}; + }, + }, + ] + : []), + ...(environment === 'marine' + ? [ + { + id: 'mpaa_protection_level.name', + accessorKey: 'mpaa_protection_level.name', + header: ({ column }) => ( + + onChangeFilters({ ...filters, [field]: values })} + /> + {t('protection-level')} + + + ), + cell: ({ row }) => { + const { mpaa_protection_level } = row.original; + + const hasSubRowWithValue = + row.subRows.length > 0 && + row.subRows.some((row) => !!row.original.mpaa_protection_level); + + let fallbackValue = t('not-assessed'); + if (hasSubRowWithValue) { + fallbackValue = '−'; + } + + const formattedValue = mpaa_protection_level.name ?? fallbackValue; + return <>{formattedValue}; + }, + }, + ] + : []), + ]; + }, [locale, environment, t, tooltips, filters, onChangeFilters, filtersOptions]); + + return columns; +}; + +export const useData = ( + locationCode: string, + environment: 'marine' | 'terrestrial' | null, + sorting: SortingState, + filters: Record, + pagination: PaginationState +) => { + const locale = useLocale(); + + const queryFields = useMemo(() => ['name', 'coverage', 'area'], []); + + const queryPopulate = useMemo( + () => ({ + environment: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['name', 'locale'], + }, + }, + }, + data_source: { + fields: ['slug', 'title', 'locale'], + populate: { + localizations: { + fields: ['slug', 'title', 'locale'], + }, + }, + }, + protection_status: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['slug', 'name', 'locale'], + }, + }, + }, + iucn_category: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['slug', 'name', 'locale'], + }, + }, + }, + ...(environment === 'marine' + ? { + mpaa_establishment_stage: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['slug', 'name', 'locale'], + }, + }, + }, + } + : {}), + ...(environment === 'marine' + ? { + mpaa_protection_level: { + fields: ['slug', 'name', 'locale'], + populate: { + localizations: { + fields: ['slug', 'name', 'locale'], + }, + }, + }, + } + : {}), + }), + [environment] + ); + + const querySort = useMemo(() => { + // By default, we always sort by protected area name + let res = 'name:asc,environment.name:asc'; + if (sorting.length > 0) { + res = `${sorting[0].id}:${sorting[0].desc ? 'desc' : 'asc'}`; + + // In addition to sorting by the column the user asked about, we'll also always sort by + // environment + if (sorting[0].id !== 'environment.name') { + res = `${res},environment.name:asc`; + } + } + + return res; + }, [sorting]); + + const queryFilters = useMemo( + () => ({ + ...(environment + ? { + environment: { + slug: { + $eq: environment, + }, + }, + } + : {}), + location: { + code: { + $eq: locationCode, + }, + }, + ...Object.entries(filters).reduce((res, [key, values]) => { + if (!values || values.length === 0) { + return res; + } + + const reversePathItems = key.split('.').reverse(); + + return reversePathItems.reduce((res, pathItem, index) => { + if (index === 0) { + return { [pathItem]: { $in: values } }; + } + + return { [pathItem]: res }; + }, {}); + }, {}), + }), + [environment, filters, locationCode] + ); + + const isFiltering = useMemo( + () => + Object.values(filters) + .filter(Boolean) + .some((value) => value.length > 0), + [filters] + ); + + const processData = useCallback( + (data: PaListResponse) => { + return [ + data.data?.map(({ attributes }): NationalHighseasTableColumns => { + const getData = (pa: Pa | PaChildrenDataItemAttributes) => { + const environment = pa.environment?.data?.attributes; + const localizedEnvironment = [ + environment, + ...(environment?.localizations.data.map((environment) => environment.attributes) ?? + []), + ].find((data) => data?.locale === locale); + + const dataSource = pa.data_source?.data?.attributes; + const localizedDataSource = [ + dataSource, + ...(dataSource?.localizations.data.map((dataSource) => dataSource.attributes) ?? []), + ].find((data) => data?.locale === locale); + + const protectionStatus = pa.protection_status?.data?.attributes; + const localizedProtectionStatus = [ + protectionStatus, + ...(protectionStatus?.localizations.data.map( + (protectionStatus) => protectionStatus.attributes + ) ?? []), + ].find((data) => data?.locale === locale); + + const iucnCategory = pa.iucn_category?.data?.attributes; + const localizedIucnCategory = [ + iucnCategory, + ...(iucnCategory?.localizations.data.map((iucnCategory) => iucnCategory.attributes) ?? + []), + ].find((data) => data?.locale === locale); + + const mpaaEstablishmentStage = pa.mpaa_establishment_stage?.data?.attributes; + const localizedMpaaEstablishmentStage = [ + mpaaEstablishmentStage, + ...(mpaaEstablishmentStage?.localizations.data.map( + (mpaaEstablishmentStage) => mpaaEstablishmentStage.attributes + ) ?? []), + ].find((data) => data?.locale === locale); + + const mpaaProtectionLevel = pa.mpaa_protection_level?.data?.attributes; + const localizedMpaaProtectionLevel = [ + mpaaProtectionLevel, + ...(mpaaProtectionLevel?.localizations.data.map( + (mpaaProtectionLevel) => mpaaProtectionLevel.attributes + ) ?? []), + ].find((data) => data?.locale === locale); + + return { + name: pa.name, + coverage: pa.coverage, + area: pa.area, + environment: { + name: localizedEnvironment?.name, + slug: localizedEnvironment?.slug, + }, + data_source: { + title: localizedDataSource?.title, + slug: localizedDataSource?.slug, + }, + protection_status: { + name: localizedProtectionStatus?.name, + slug: localizedProtectionStatus?.slug, + }, + iucn_category: { + name: localizedIucnCategory?.name, + slug: localizedIucnCategory?.slug, + }, + mpaa_establishment_stage: { + name: localizedMpaaEstablishmentStage?.name, + slug: localizedMpaaEstablishmentStage?.slug, + }, + mpaa_protection_level: { + name: localizedMpaaProtectionLevel?.name, + slug: localizedMpaaProtectionLevel?.slug, + }, + }; + }; + + return { + ...getData(attributes), + ...(attributes.children.data.length > 0 + ? { + subRows: attributes.children.data.map(({ attributes }) => getData(attributes)), + } + : {}), + }; + }) ?? [], + data.meta?.pagination ?? {}, + ]; + }, + [locale] + ); + + // If the user isn't filtering, only one request is sufficient to get all of the table's data + const { data, isLoading, isFetching } = useGetPas< + [NationalHighseasTableColumns[], PaListResponseMetaPagination] + >( + { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: queryFields, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + ...queryPopulate, + children: { + fields: queryFields, + populate: queryPopulate, + filters: queryFilters, + sort: querySort, + }, + }, + filters: { + ...queryFilters, + parent: { + name: { + $null: true, + }, + }, + }, + 'pagination[pageSize]': pagination.pageSize, + 'pagination[page]': pagination.pageIndex + 1, + sort: querySort, + // This parameter makes sure Strapi retains the parent for which children match the filters + // but make the request slower, so it is only added when necessary + ...(isFiltering ? { 'keep-if-children-match': true } : {}), + }, + { + query: { + placeholderData: [], + keepPreviousData: true, + select: processData, + }, + } + ); + + return { data, isLoading, isFetching }; +}; diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx index 128d2844..8b53f094 100644 --- a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx +++ b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx @@ -1,164 +1,119 @@ -import { useMemo, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useRouter } from 'next/router'; -import { useLocale } from 'next-intl'; +import { PaginationState, SortingState } from '@tanstack/react-table'; +import { usePreviousImmediate } from 'rooks'; import FiltersButton from '@/components/filters-button'; import TooltipButton from '@/components/tooltip-button'; -import { applyFilters } from '@/containers/map/content/details/helpers'; +import { Skeleton } from '@/components/ui/skeleton'; import Table from '@/containers/map/content/details/table'; -import useColumns from '@/containers/map/content/details/tables/national-highseas/useColumns'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { FCWithMessages } from '@/types'; -import { useGetLocations } from '@/types/generated/location'; -import { useGetMpas } from '@/types/generated/mpa'; -import { MpaListResponseDataItem } from '@/types/generated/strapi.schemas'; import SortingButton from '../../table/sorting-button'; +import { useData, useColumns } from './hooks'; + const NationalHighseasTable: FCWithMessages = () => { const { query: { locationCode = 'GLOB' }, } = useRouter(); - const locale = useLocale(); - const locationsQuery = useGetLocations( - { - locale, - filters: { - code: locationCode, - }, - }, - { - query: { - queryKey: ['locations', locationCode], - select: ({ data }) => data?.[0]?.attributes, + const [{ tab }] = useSyncMapContentSettings(); + const previousTab = usePreviousImmediate(tab); + + const [filters, setFilters] = useState>({}); + + const columns = useColumns( + tab === 'marine' || tab === 'terrestrial' ? tab : null, + filters, + setFilters + ); + + const defaultSorting = useMemo( + () => [ + { + id: columns[0].accessorKey, + desc: false, }, - } + ], + [columns] ); - const [filters, setFilters] = useState({ - protectedAreaType: [], - establishmentStage: [], - protectionLevel: [], - dataSource: [], - iucnCategory: [], + const [sorting, setSorting] = useState(defaultSorting); + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 100, }); - const handleOnFiltersChange = (field, values) => { - setFilters({ ...filters, [field]: values }); - }; - - const columns = useColumns({ filters, onFiltersChange: handleOnFiltersChange }); - - const mpaEntryPopulate = { - mpaa_establishment_stage: { - fields: ['name', 'slug'], - }, - mpa: { - fields: ['name', 'wdpaid', 'area'], - populate: { - protection_status: { - fields: ['slug', 'name'], - }, - }, - }, - location: { - fields: ['code', 'total_marine_area', 'bounds'], - }, - mpaa_protection_level: { - fields: ['slug', 'name'], - }, - protection_status: { - fields: ['slug', 'name'], - }, - data_source: { - fields: ['slug'], - }, - mpa_iucn_category: { - fields: ['slug'], - }, - }; - - const { data: mpasData }: { data: MpaListResponseDataItem[] } = useGetMpas( - { - locale, - filters: { - location: { - code: { - $eq: locationsQuery.data?.code, - }, - }, - is_child: false, - }, + const { + data: [data, { total }], + isLoading, + isFetching, + } = useData( + locationCode as string, + tab === 'marine' || tab === 'terrestrial' ? tab : null, + sorting, + filters, + pagination + ); + + // When the tab changes, we reset the filters and the sorting + useEffect(() => { + if (tab !== previousTab) { + setFilters({}); + setSorting(defaultSorting); + } + }, [tab, previousTab, defaultSorting]); + + // When the filters or the sorting changes, the page number is reset + useEffect(() => { + setPagination((prevPagination) => ({ ...prevPagination, pageIndex: 0 })); + }, [filters, sorting]); + + // While the data is loading, we're showing a table with skeletons + if (isLoading || isFetching) { + const newColumns = columns.map((column) => ({ + ...column, + cell: () => ( +
+ +
+ ), + })); + + const newData = data.length > 0 ? data : [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]; + + return ( +
+ ); + } + + return ( +
data, - placeholderData: { data: [] }, - }, - } + columns={columns} + data={data} + sorting={sorting} + onSortingChange={setSorting} + pagination={pagination} + onPaginationChange={setPagination} + rowCount={total ?? 0} + /> ); - - const parsedData = useMemo(() => { - const buildMpaRow = (mpa) => { - const protectionStatus = mpa?.protection_status?.data?.attributes; - const establishmentStage = mpa?.mpaa_establishment_stage?.data?.attributes; - const mpaaProtectionLevel = mpa?.mpaa_protection_level?.data?.attributes; - const dataSource = mpa?.data_source?.data?.attributes; - const iucnCategory = mpa?.mpa_iucn_category?.data?.attributes; - - const coveragePercentage = (mpa.area / locationsQuery.data?.totalMarineArea) * 100; - - return { - protectedArea: mpa?.name, - coverage: coveragePercentage, - protectedAreaType: protectionStatus?.slug, - establishmentStage: establishmentStage?.slug, - protectionLevel: mpaaProtectionLevel?.slug, - area: mpa?.area, - dataSource: dataSource?.slug, - iucnCategory: iucnCategory?.slug, - // ? LayerPreview: We're not displaying the layer preview at this moment, but we want to preserve the code - // map: { - // wdpaId: mpa?.wdpaid, - // bounds: mpa?.bbox, - // dataSource: dataSource?.slug, - // }, - }; - }; - - return mpasData?.map(({ attributes: mpa }) => { - const mpaChildren = mpa?.children?.data; - - const mpaData = buildMpaRow(mpa); - const mpaChildrenData = mpaChildren - .map(({ attributes: childMpa }) => buildMpaRow(childMpa)) - .filter((row) => !!row); - - return { - ...mpaData, - ...(mpaChildrenData?.length && { subRows: mpaChildrenData }), - }; - }); - }, [locationsQuery, mpasData]); - - const tableData = useMemo(() => { - return applyFilters(parsedData, filters); - }, [filters, parsedData]); - - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - return
; }; NationalHighseasTable.messages = [ diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx deleted file mode 100644 index 7c100410..00000000 --- a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx +++ /dev/null @@ -1,261 +0,0 @@ -import { ComponentProps, useMemo } from 'react'; - -import { ColumnDef, SortingFnOption } from '@tanstack/react-table'; -import { useLocale, useTranslations } from 'next-intl'; - -import FiltersButton from '@/components/filters-button'; -import LayerPreview from '@/components/layer-preview'; -import ExpansionControls from '@/containers/map/content/details/table/expansion-controls'; -import HeaderItem from '@/containers/map/content/details/table/header-item'; -import { cellFormatter } from '@/containers/map/content/details/table/helpers'; -import SortingButton from '@/containers/map/content/details/table/sorting-button'; -import TooltipButton from '@/containers/map/content/details/table/tooltip-button'; -import useFiltersOptions from '@/containers/map/content/details/tables/national-highseas/useFiltersOptions'; -import useTooltips from '@/containers/map/content/details/tables/national-highseas/useTooltips'; - -export type NationalHighseasTableColumns = { - protectedArea: string; - coverage: number; - protectedAreaType: string; - establishmentStage: string; - protectionLevel: string; - area: number; - dataSource: string; - iucnCategory: string; - map: { - wdpaId: string; - bounds: [number, number, number, number]; - dataSource: ComponentProps['dataSource']; - }; -}; - -type UseColumnsProps = { - filters: { [key: string]: string[] }; - onFiltersChange: (field: string, values: string[]) => void; -}; - -const useColumns = ({ filters, onFiltersChange }: UseColumnsProps) => { - const t = useTranslations('containers.map'); - const locale = useLocale(); - - const { - protectionStatus: protectionStatusOptions, - establishmentStage: establishmentStageOptions, - protectionLevel: protectionLevelOptions, - dataSource: dataSourceOptions, - iucnCategory: iucnCategoryOptions, - } = useFiltersOptions(); - - const tooltips = useTooltips(); - - // Define columns - const columns: ColumnDef[] = useMemo(() => { - return [ - { - accessorKey: 'protectedArea', - sortingFn: 'localeStringCompare' as SortingFnOption, - header: ({ column }) => ( - - - {t('name')} - - - ), - cell: ({ row }) => { - const { - original: { protectedArea }, - } = row; - return ( - - {protectedArea} - - ); - }, - }, - // ? LayerPreview: We're not displaying the layer preview at this moment, but we want to preserve the code - // { - // accessorKey: 'map', - // header: null, - // cell: ({ row }) => { - // const { bounds, wdpaId, dataSource } = row.original?.map || {}; - - // return ( - //
- // - //
- // ); - // }, - // }, - { - accessorKey: 'coverage', - header: ({ column }) => ( - - - {t('coverage')} - - - ), - cell: ({ row }) => { - const { coverage: value } = row.original; - if (!value) return <>—; - - const formattedCoverage = cellFormatter.percentage(locale, value); - - return ( - - {t.rich('percentage-bold', { - b1: (chunks) => chunks, - b2: (chunks) => {chunks}, - percentage: formattedCoverage, - })} - - ); - }, - }, - { - accessorKey: 'area', - header: ({ column }) => ( - - - {t('area')} - - - ), - cell: ({ row }) => { - const { area: value } = row.original; - const formattedValue = cellFormatter.area(locale, value); - return {t('area-km2', { area: formattedValue })}; - }, - }, - { - accessorKey: 'dataSource', - header: ({ column }) => ( - - - {t('data-source')} - - - ), - cell: ({ row }) => { - const { dataSource: value } = row.original; - const formattedValue = - dataSourceOptions.find((entry) => value === entry?.value)?.name || t('n-a'); - return <>{formattedValue}; - }, - }, - { - accessorKey: 'protectedAreaType', - header: ({ column }) => ( - - - {t('type')} - - - ), - cell: ({ row }) => { - const { protectedAreaType: value } = row.original; - const formattedValue = protectionStatusOptions.find( - (entry) => value === entry?.value - )?.name; - return <>{formattedValue ?? '-'}; - }, - }, - { - accessorKey: 'iucnCategory', - header: ({ column }) => ( - - - {t('iucn-category')} - - - ), - cell: ({ row }) => { - const { iucnCategory: value } = row.original; - const formattedValue = - iucnCategoryOptions.find((entry) => value === entry?.value)?.name || t('n-a'); - return <>{formattedValue}; - }, - }, - { - accessorKey: 'establishmentStage', - header: ({ column }) => ( - - - {t('establishment-stage')} - - - ), - cell: ({ row }) => { - const { establishmentStage: value } = row.original; - const formattedValue = - establishmentStageOptions.find((entry) => value === entry?.value)?.name || - t('not-assessed'); - return <>{formattedValue}; - }, - }, - { - accessorKey: 'protectionLevel', - header: ({ column }) => ( - - - {t('protection-level')} - - - ), - cell: ({ row }) => { - const { protectionLevel: value } = row.original; - const formattedValue = - protectionLevelOptions.find((entry) => value === entry?.value)?.name || - t('not-assessed'); - return <>{formattedValue}; - }, - }, - ]; - }, [ - t, - tooltips, - locale, - dataSourceOptions, - iucnCategoryOptions, - protectionStatusOptions, - filters, - onFiltersChange, - establishmentStageOptions, - protectionLevelOptions, - ]); - - return columns; -}; - -export default useColumns; diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/useFiltersOptions.ts b/frontend/src/containers/map/content/details/tables/national-highseas/useFiltersOptions.ts deleted file mode 100644 index 74803d84..00000000 --- a/frontend/src/containers/map/content/details/tables/national-highseas/useFiltersOptions.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { useMemo } from 'react'; - -import { useLocale } from 'next-intl'; - -import { useGetDataSources } from '@/types/generated/data-source'; -import { useGetMpaIucnCategories } from '@/types/generated/mpa-iucn-category'; -import { useGetMpaaEstablishmentStages } from '@/types/generated/mpaa-establishment-stage'; -import { useGetMpaaProtectionLevels } from '@/types/generated/mpaa-protection-level'; -import { useGetProtectionStatuses } from '@/types/generated/protection-status'; - -const useFiltersOptions = () => { - const locale = useLocale(); - - // Fetch protection statuses and build options for the filter - const { data: protectionStatuses } = useGetProtectionStatuses( - { locale }, - { - query: { - select: ({ data }) => data, - placeholderData: { data: [] }, - }, - } - ); - - const protectionStatusOptions = useMemo(() => { - return protectionStatuses.map(({ attributes }) => ({ - name: attributes?.name, - value: attributes?.slug, - })); - }, [protectionStatuses]); - - // Fetch establishment stages and build options for the filter - const { data: establishmentStages } = useGetMpaaEstablishmentStages( - { locale }, - { - query: { - select: ({ data }) => [...data, { attributes: { name: 'N/A', slug: 'N/A' } }], - placeholderData: { data: [] }, - }, - } - ); - - const establishmentStageOptions = useMemo(() => { - return establishmentStages.map(({ attributes }) => ({ - name: attributes?.name, - value: attributes?.slug, - })); - }, [establishmentStages]); - - // Fetch data sources and build options for the filter - const { data: dataSources } = useGetDataSources( - { locale }, - { - query: { - select: ({ data }) => - data?.filter(({ attributes }) => - // ? Even though there are more data sources, we limit the display to these - ['mpatlas', 'protected-planet']?.includes(attributes?.slug) - ), - placeholderData: { data: [] }, - }, - } - ); - - const dataSourceOptions = useMemo(() => { - return dataSources.map(({ attributes }) => ({ - name: attributes?.title, - value: attributes?.slug, - })); - }, [dataSources]); - - // Fetch IUCN category options and build options for the filter - const { data: iucnCategories } = useGetMpaIucnCategories( - { locale }, - { - query: { - select: ({ data }) => data, - placeholderData: { data: [] }, - }, - } - ); - - const iucnCategoryOptions = useMemo(() => { - return iucnCategories.map(({ attributes }) => ({ - name: attributes?.name, - value: attributes?.slug, - })); - }, [iucnCategories]); - - // Fetch protection levels and build options for the filter - const { data: protectionLevels } = useGetMpaaProtectionLevels( - { locale }, - { - query: { - select: ({ data }) => - data.filter( - ({ attributes }) => - // ? these protection values are used internally, but they should not be visible to the user - !['fully-highly-protected', 'less-protected-unknown'].includes(attributes?.slug) - ), - placeholderData: { data: [] }, - }, - } - ); - - const protectionLevelOptions = useMemo(() => { - return protectionLevels.map(({ attributes }) => ({ - name: attributes?.name, - value: attributes?.slug, - })); - }, [protectionLevels]); - - return { - protectionStatus: protectionStatusOptions, - establishmentStage: establishmentStageOptions, - dataSource: dataSourceOptions, - iucnCategory: iucnCategoryOptions, - protectionLevel: protectionLevelOptions, - }; -}; - -export default useFiltersOptions; diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/useTooltips.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/useTooltips.tsx deleted file mode 100644 index d31b4543..00000000 --- a/frontend/src/containers/map/content/details/tables/national-highseas/useTooltips.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { useLocale } from 'next-intl'; - -import { useGetDataInfos } from '@/types/generated/data-info'; - -const TOOLTIP_MAPPING = { - protectedArea: 'name-pa', - coverage: 'coverage-wdpa', - protectedAreaType: 'protected-area-type', - establishmentStage: 'establishment-stage', - protectionLevel: 'protection-level', - fishingProtectionLevel: 'fishing-protection-level', - area: 'protected-area-mpa', - dataSource: 'details-data-source', - iucnCategory: 'details-iucn-category', -}; - -const useTooltips = () => { - const locale = useLocale(); - - const { data: dataInfo } = useGetDataInfos( - { locale }, - { - query: { - select: ({ data }) => data, - placeholderData: { data: [] }, - }, - } - ); - - const tooltips = {}; - - Object.entries(TOOLTIP_MAPPING).map(([key, value]) => { - const tooltip = dataInfo.find(({ attributes }) => attributes.slug === value)?.attributes - ?.content; - - if (!tooltip) return; - tooltips[key] = tooltip; - }); - - return tooltips; -}; - -export default useTooltips; diff --git a/frontend/src/containers/map/content/index.tsx b/frontend/src/containers/map/content/index.tsx index 332d342a..89c905d5 100644 --- a/frontend/src/containers/map/content/index.tsx +++ b/frontend/src/containers/map/content/index.tsx @@ -11,7 +11,7 @@ const MapContent: FCWithMessages = () => { <> {showDetails && ( -
+
)} diff --git a/frontend/src/containers/map/content/map/index.tsx b/frontend/src/containers/map/content/map/index.tsx index 07ba765b..4a8e84f7 100644 --- a/frontend/src/containers/map/content/map/index.tsx +++ b/frontend/src/containers/map/content/map/index.tsx @@ -15,18 +15,15 @@ import { CustomMapProps } from '@/components/map/types'; import DrawControls from '@/containers/map/content/map/draw-controls'; import LabelsManager from '@/containers/map/content/map/labels-manager'; import LayersToolbox from '@/containers/map/content/map/layers-toolbox'; -import EEZLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/eez'; -import EstablishmentLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/establishment'; import Modelling from '@/containers/map/content/map/modelling'; import Popup from '@/containers/map/content/map/popup'; -import EEZLayerPopup from '@/containers/map/content/map/popup/eez'; +import BoundariesPopup from '@/containers/map/content/map/popup/boundaries'; import GenericPopup from '@/containers/map/content/map/popup/generic'; import ProtectedAreaPopup from '@/containers/map/content/map/popup/protected-area'; -import RegionsPopup from '@/containers/map/content/map/popup/regions'; import { useSyncMapLayers, useSyncMapSettings } from '@/containers/map/content/map/sync-settings'; -import { sidebarAtom } from '@/containers/map/store'; +import { layersAtom, sidebarAtom } from '@/containers/map/store'; import { - bboxLocation, + bboxLocationAtom, drawStateAtom, layersInteractiveAtom, layersInteractiveIdsAtom, @@ -49,10 +46,11 @@ const MainMap: FCWithMessages = () => { const { default: map } = useMap(); const drawState = useAtomValue(drawStateAtom); const isSidebarOpen = useAtomValue(sidebarAtom); + const isLayersPanelOpen = useAtomValue(layersAtom); const [popup, setPopup] = useAtom(popupAtom); const params = useParams(); - const [locationBbox, setLocationBbox] = useAtom(bboxLocation); - const resetLocationBbox = useResetAtom(bboxLocation); + const [locationBbox, setLocationBbox] = useAtom(bboxLocationAtom); + const resetLocationBbox = useResetAtom(bboxLocationAtom); const hoveredPolygonId = useRef[0] | null>(null); const [cursor, setCursor] = useState<'grab' | 'crosshair' | 'pointer'>('grab'); @@ -102,6 +100,9 @@ const MainMap: FCWithMessages = () => { $eq: true, }, }, + // Makes sure that the default interactive layers are displayed on top so that their + // highlighted states are fully visible + sort: 'interaction_config', }, { query: { @@ -118,9 +119,56 @@ const MainMap: FCWithMessages = () => { }, [setMapLayers, defaultLayers]); useEffect(() => { - setLocationBbox(locationsQuery?.data?.bounds as CustomMapProps['bounds']['bbox']); + setLocationBbox(locationsQuery?.data?.marine_bounds as CustomMapProps['bounds']['bbox']); }, [locationCode, locationsQuery, setLocationBbox]); + const safelyResetFeatureState = useCallback(() => { + if (!hoveredPolygonId.current) { + return; + } + + const isSourceStillAvailable = !!map.getSource(hoveredPolygonId.current.source); + + if (isSourceStillAvailable) { + map.setFeatureState( + { + source: hoveredPolygonId.current.source, + id: hoveredPolygonId.current.id, + sourceLayer: hoveredPolygonId.current.sourceLayer, + }, + { hover: false } + ); + } + }, [map]); + + const safelySetFeatureState = useCallback( + (feature: mapboxgl.MapboxGeoJSONFeature) => { + const isSameId = !hoveredPolygonId.current || hoveredPolygonId.current.id === feature.id; + + const isSameSource = + !hoveredPolygonId.current || hoveredPolygonId.current.source === feature.source; + + const isSameSourceLayer = + !hoveredPolygonId.current || hoveredPolygonId.current.sourceLayer === feature.sourceLayer; + + if (!isSameId || !isSameSource || !isSameSourceLayer) { + safelyResetFeatureState(); + } + + map.setFeatureState( + { + source: feature.source, + id: feature.id, + sourceLayer: feature.sourceLayer, + }, + { hover: true } + ); + + hoveredPolygonId.current = feature; + }, + [map, safelyResetFeatureState] + ); + const handleMoveEnd = useCallback(() => { setMapSettings((prev) => ({ ...prev, @@ -136,16 +184,8 @@ const MainMap: FCWithMessages = () => { (e: Parameters['onClick']>[0]) => { if (drawState.active) return null; - if (popup?.features?.length && hoveredPolygonId.current !== null) { - map.setFeatureState( - { - source: hoveredPolygonId.current.source, - id: hoveredPolygonId.current.id, - sourceLayer: hoveredPolygonId.current.sourceLayer, - }, - { hover: false } - ); - + if (popup?.features?.length) { + safelyResetFeatureState(); setPopup({}); } @@ -160,7 +200,14 @@ const MainMap: FCWithMessages = () => { setPopup(p); } }, - [layersInteractive, layersInteractiveData, setPopup, drawState, popup, map] + [ + drawState.active, + popup?.features?.length, + layersInteractive.length, + layersInteractiveData, + safelyResetFeatureState, + setPopup, + ] ); const handleMouseMove = useCallback( @@ -178,49 +225,27 @@ const MainMap: FCWithMessages = () => { setPopup({ ...e }); } - if (hoveredPolygonId.current !== null) { - map.setFeatureState( - { - source: e.features?.[0].source, - id: hoveredPolygonId.current.id, - sourceLayer: e.features?.[0].sourceLayer, - }, - { hover: false } - ); + if (e.features?.[0]) { + safelySetFeatureState(e.features?.[0]); } - map.setFeatureState( - { - source: e.features?.[0].source, - id: e.features[0].id, - sourceLayer: e.features?.[0].sourceLayer, - }, - { hover: true } - ); - - hoveredPolygonId.current = e.features[0]; } else { if (!drawState.active) { setCursor('grab'); } } }, - [map, hoveredPolygonId, drawState.active, setPopup] + [setPopup, drawState.active, safelySetFeatureState] ); - const handleMouseLeave = useCallback(() => { - if (popup?.features?.length) return; - if (hoveredPolygonId.current !== null) { - map.setFeatureState( - { - source: hoveredPolygonId.current.source, - id: hoveredPolygonId.current.id, - sourceLayer: hoveredPolygonId.current.sourceLayer, - }, - { hover: false } - ); + const handleMouseOut = useCallback(() => { + safelyResetFeatureState(); + + if (popup?.type !== 'click') { + // If the popup was opened through a click, we keep it open so that the user can eventually + // interact with it's content + setPopup({}); } - setPopup({}); - }, [map, hoveredPolygonId, popup, setPopup]); + }, [safelyResetFeatureState, popup, setPopup]); const initialViewState: ComponentProps['initialViewState'] = useMemo(() => { if (URLBbox) { @@ -233,7 +258,7 @@ const MainMap: FCWithMessages = () => { if (locationsQuery.data && locationsQuery.data?.code !== 'GLOB') { return { ...DEFAULT_VIEW_STATE, - bounds: locationsQuery.data?.bounds as ComponentProps< + bounds: locationsQuery.data?.marine_bounds as ComponentProps< typeof Map >['initialViewState']['bounds'], padding: { @@ -251,37 +276,36 @@ const MainMap: FCWithMessages = () => { const bounds: ComponentProps['bounds'] = useMemo(() => { if (!locationBbox) return null; + const padding = 20; + + let leftPadding = padding; + if (typeof window !== 'undefined' && window?.innerWidth > 430) { + if (isSidebarOpen) { + leftPadding += 460; + } + + if (isLayersPanelOpen) { + leftPadding += 280; + } + } + return { bbox: locationBbox as ComponentProps['bounds']['bbox'], options: { padding: { - top: 0, - bottom: 0, - left: - typeof window !== 'undefined' && window?.innerWidth > 430 && isSidebarOpen ? 430 : 0, - right: 0, + top: padding, + bottom: padding, + left: leftPadding, + right: padding, }, }, }; - }, [locationBbox, isSidebarOpen]); + }, [locationBbox, isSidebarOpen, isLayersPanelOpen]); useEffect(() => { setCursor(drawState.active ? 'crosshair' : 'grab'); }, [drawState.active]); - useEffect(() => { - if (!popup?.features?.length && hoveredPolygonId.current !== null) { - map.setFeatureState( - { - source: hoveredPolygonId.current.source, - id: hoveredPolygonId.current.id, - sourceLayer: hoveredPolygonId.current.sourceLayer, - }, - { hover: false } - ); - } - }, [map, popup]); - useEffect(() => { return () => { resetLocationBbox(); @@ -290,10 +314,6 @@ const MainMap: FCWithMessages = () => { const disableMouseMove = popup.type === 'click' && popup.features?.length; - // ? the popup won't show up when the user is hovering a layer that is not EEZ - const hidePopup = - popup?.type === 'mousemove' && !popup.features?.some((f) => f.source === 'ezz-source'); - return (
{ onClick={handleMapClick} onMoveEnd={handleMoveEnd} onMouseMove={!disableMouseMove && handleMouseMove} - onMouseLeave={handleMouseLeave} + onMouseOut={handleMouseOut} attributionControl={false} cursor={cursor} > <> - {!hidePopup && } + @@ -328,12 +348,9 @@ MainMap.messages = [ ...LayersToolbox.messages, ...ZoomControls.messages, // Indirectly imported by the layer manager - ...EEZLayerPopup.messages, - ...EEZLayerLegend.messages, ...GenericPopup.messages, ...ProtectedAreaPopup.messages, - ...RegionsPopup.messages, - ...EstablishmentLayerLegend.messages, + ...BoundariesPopup.messages, ]; export default MainMap; diff --git a/frontend/src/containers/map/content/map/layers-toolbox/index.tsx b/frontend/src/containers/map/content/map/layers-toolbox/index.tsx index e1ba2e9b..cc844073 100644 --- a/frontend/src/containers/map/content/map/layers-toolbox/index.tsx +++ b/frontend/src/containers/map/content/map/layers-toolbox/index.tsx @@ -16,9 +16,9 @@ const LayersToolbox: FCWithMessages = () => { const [open, setOpen] = useState(true); return ( -
+
- + {open && } {!open && ( @@ -29,12 +29,11 @@ const LayersToolbox: FCWithMessages = () => { )} -
+
-
); diff --git a/frontend/src/containers/map/content/map/layers-toolbox/legend/eez/index.tsx b/frontend/src/containers/map/content/map/layers-toolbox/legend/eez/index.tsx deleted file mode 100644 index f969fb5d..00000000 --- a/frontend/src/containers/map/content/map/layers-toolbox/legend/eez/index.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { useLocale, useTranslations } from 'next-intl'; - -import Icon from '@/components/ui/icon'; -import { Tooltip, TooltipProvider, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip'; -import EEZIcon from '@/styles/icons/eez.svg'; -import InfoIcon from '@/styles/icons/info.svg'; -import SelectedEEZIcon from '@/styles/icons/selected-eez.svg'; -import SeveralEEZIcon from '@/styles/icons/several-eez.svg'; -import { FCWithMessages } from '@/types'; -import { useGetDataInfos } from '@/types/generated/data-info'; - -const ITEM_LIST_CLASSES = 'flex items-center space-x-2'; -const ICON_CLASSES = 'h-3.5 w-3.5'; - -const EEZLayerLegend: FCWithMessages = () => { - const t = useTranslations('containers.map'); - const locale = useLocale(); - - const EEZInfoQuery = useGetDataInfos( - { - locale, - filters: { - slug: 'eez-legend', - }, - }, - { - query: { - select: ({ data }) => data?.[0].attributes, - }, - } - ); - - return ( -
    -
  • - - {t('eezs')} -
  • -
  • - - {t('selected-eez')} -
  • -
  • - -
    - - {t.rich('area-corresponding-to-more-than-1-eez', { - br: () =>
    , - })} -
    - - - - - - -
    {EEZInfoQuery.data?.content}
    -
    -
    -
    -
    -
  • -
- ); -}; - -EEZLayerLegend.messages = ['containers.map']; - -export default EEZLayerLegend; diff --git a/frontend/src/containers/map/content/map/layers-toolbox/legend/establishment/index.tsx b/frontend/src/containers/map/content/map/layers-toolbox/legend/establishment/index.tsx deleted file mode 100644 index 1f4cc2c3..00000000 --- a/frontend/src/containers/map/content/map/layers-toolbox/legend/establishment/index.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import TooltipButton from '@/components/tooltip-button'; -import Icon from '@/components/ui/icon'; -import DesignatedIcon from '@/styles/icons/designated.svg'; -import ImplementedIcon from '@/styles/icons/implemented.svg'; -import ManagedIcon from '@/styles/icons/managed.svg'; -import ProposedIcon from '@/styles/icons/proposed.svg'; -import { FCWithMessages } from '@/types'; - -const ITEM_LIST_CLASSES = 'flex items-center space-x-2'; -const ICON_CLASSES = 'h-3.5 w-3.5 border border-black rounded-full'; - -const PATTERNS = { - proposed: ProposedIcon, - managed: ManagedIcon, - designated: DesignatedIcon, - implemented: ImplementedIcon, -}; - -const EstablishmentLayerLegend: FCWithMessages<{ - items: { label: string; pattern: string; description?: string }[]; -}> = (config) => { - const { items } = config; - - return ( -
    - {items.map(({ label, pattern, description }) => ( -
  • - - - {label} - {description && } - -
  • - ))} -
- ); -}; - -EstablishmentLayerLegend.messages = ['containers.map', ...TooltipButton.messages]; - -export default EstablishmentLayerLegend; diff --git a/frontend/src/containers/map/content/map/layers-toolbox/legend/index.tsx b/frontend/src/containers/map/content/map/layers-toolbox/legend/index.tsx index 652e1fb9..654076dc 100644 --- a/frontend/src/containers/map/content/map/layers-toolbox/legend/index.tsx +++ b/frontend/src/containers/map/content/map/layers-toolbox/legend/index.tsx @@ -13,6 +13,7 @@ import { useSyncMapLayerSettings, useSyncMapLayers, } from '@/containers/map/content/map/sync-settings'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { cn } from '@/lib/classnames'; import ArrowDownIcon from '@/styles/icons/arrow-down.svg'; import ArrowTopIcon from '@/styles/icons/arrow-top.svg'; @@ -20,7 +21,10 @@ import CloseIcon from '@/styles/icons/close.svg'; import OpacityIcon from '@/styles/icons/opacity.svg'; import { FCWithMessages } from '@/types'; import { useGetLayers } from '@/types/generated/layer'; -import { LayerResponseDataObject } from '@/types/generated/strapi.schemas'; +import { + LayerListResponseDataItem, + LayerResponseDataObject, +} from '@/types/generated/strapi.schemas'; import { LayerTyped } from '@/types/layers'; import LegendItem from './item'; @@ -31,12 +35,38 @@ const Legend: FCWithMessages = () => { const [activeLayers, setMapLayers] = useSyncMapLayers(); const [layerSettings, setLayerSettings] = useSyncMapLayerSettings(); + const [{ tab }] = useSyncMapContentSettings(); - const layersQuery = useGetLayers( + const layersQuery = useGetLayers( { locale, sort: 'title:asc', - populate: 'legend_config,legend_config.items', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['title'], + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + legend_config: { + populate: { + items: true, + }, + }, + environment: { + fields: ['slug'], + }, + }, + filters: { + ...(tab !== 'summary' + ? { + environment: { + slug: { + $in: tab, + }, + }, + } + : {}), + }, }, { query: { @@ -147,7 +177,7 @@ const Legend: FCWithMessages = () => { -
+
{title}
diff --git a/frontend/src/containers/map/content/map/layers-toolbox/legend/item.tsx b/frontend/src/containers/map/content/map/layers-toolbox/legend/item.tsx index f847411e..06f82a0d 100644 --- a/frontend/src/containers/map/content/map/layers-toolbox/legend/item.tsx +++ b/frontend/src/containers/map/content/map/layers-toolbox/legend/item.tsx @@ -2,35 +2,29 @@ import { ReactElement, isValidElement, useMemo } from 'react'; import TooltipButton from '@/components/tooltip-button'; import Icon from '@/components/ui/icon'; -import EEZLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/eez'; -import EstablishmentLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/establishment'; -import EEZLayerPopup from '@/containers/map/content/map/popup/eez'; +import BoundariesPopup from '@/containers/map/content/map/popup/boundaries'; import GenericPopup from '@/containers/map/content/map/popup/generic'; import ProtectedAreaPopup from '@/containers/map/content/map/popup/protected-area'; -import RegionsPopup from '@/containers/map/content/map/popup/regions'; import { cn } from '@/lib/classnames'; import { parseConfig } from '@/lib/json-converter'; +import CircleWithDottedRedStrokeIcon from '@/styles/icons/circle-with-dotted-red-stroke.svg'; +import CircleWithFillIcon from '@/styles/icons/circle-with-fill.svg'; +import CircleWithoutFillIcon from '@/styles/icons/circle-without-fill.svg'; import EstablishmentDesignatedIcon from '@/styles/icons/designated.svg'; -import EEZIcon from '@/styles/icons/eez.svg'; import EstablishmentImplementedIcon from '@/styles/icons/implemented.svg'; import EstablishmentManagedIcon from '@/styles/icons/managed.svg'; -import MPAIcon from '@/styles/icons/mpa.svg'; -import OECMIcon from '@/styles/icons/oecm.svg'; import EstablishmentProposedIcon from '@/styles/icons/proposed.svg'; -import EEZSelectedIcon from '@/styles/icons/selected-eez.svg'; -import EEZMultipleIcon from '@/styles/icons/several-eez.svg'; import { FCWithMessages } from '@/types'; import { LayerTyped, LegendConfig } from '@/types/layers'; + export interface LegendItemsProps { config: LayerTyped['legend_config']; } const ICONS_MAPPING = { - eez: EEZIcon, - 'eez-selected': EEZSelectedIcon, - 'eez-multiple': EEZMultipleIcon, - oecm: OECMIcon, - mpa: MPAIcon, + 'circle-with-fill': CircleWithFillIcon, + 'circle-without-fill': CircleWithoutFillIcon, + 'circle-with-dotted-red-stroke': CircleWithDottedRedStrokeIcon, 'establishment-proposed': EstablishmentProposedIcon, 'establishment-managed': EstablishmentManagedIcon, 'establishment-designated': EstablishmentDesignatedIcon, @@ -61,16 +55,16 @@ const LegendItem: FCWithMessages = ({ config }) => { return (
    {items.map(({ value, color, description }) => ( -
  • +
  • - + {value} - {description && } + {description && }
  • ))} @@ -80,20 +74,21 @@ const LegendItem: FCWithMessages = ({ config }) => { case 'icon': return (
      - {items.map(({ value, icon, description }) => ( -
    • - + {items.map(({ value, icon, description, color }) => ( +
    • + - + {value} - {description && } + {description && }
    • ))} @@ -161,12 +156,9 @@ const LegendItem: FCWithMessages = ({ config }) => { LegendItem.messages = [ // Imported by `parseConfig` - ...EEZLayerPopup.messages, - ...EEZLayerLegend.messages, ...GenericPopup.messages, ...ProtectedAreaPopup.messages, - ...RegionsPopup.messages, - ...EstablishmentLayerLegend.messages, + ...BoundariesPopup.messages, ]; export default LegendItem; diff --git a/frontend/src/containers/map/content/map/modelling/index.tsx b/frontend/src/containers/map/content/map/modelling/index.tsx index 29a6a83d..f2841977 100644 --- a/frontend/src/containers/map/content/map/modelling/index.tsx +++ b/frontend/src/containers/map/content/map/modelling/index.tsx @@ -6,21 +6,27 @@ import type { Feature } from 'geojson'; import { useAtomValue, useSetAtom } from 'jotai'; import { modellingAtom, drawStateAtom } from '@/containers/map/store'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { ModellingData } from '@/types/modelling'; -const fetchModelling = async (feature: Feature) => { - return axios.post(process.env.NEXT_PUBLIC_ANALYSIS_CF_URL, feature); +const fetchModelling = async (tab: string, feature: Feature) => { + return axios.post(process.env.NEXT_PUBLIC_ANALYSIS_CF_URL, { + environment: tab, + geometry: feature, + }); }; const Modelling = () => { const { feature } = useAtomValue(drawStateAtom); const setModellingState = useSetAtom(modellingAtom); + const [{ tab }] = useSyncMapContentSettings(); + const { isFetching, isSuccess, data } = useQuery( - ['modelling', feature], - () => fetchModelling(feature), + ['modelling', tab, feature], + () => fetchModelling(tab, feature), { - enabled: Boolean(feature), + enabled: Boolean(feature) && ['marine', 'terrestrial'].includes(tab), select: ({ data }) => data, refetchOnWindowFocus: false, retry: false, @@ -29,13 +35,13 @@ const Modelling = () => { setModellingState((prevState) => ({ ...prevState, status: 'error', - messageError: req.response?.status === 400 ? req.response?.data.error : undefined, + errorMessage: req.response?.status === 400 ? req.response?.data.error : undefined, })); } else { setModellingState((prevState) => ({ ...prevState, status: 'error', - messageError: undefined, + errorMessage: undefined, })); } }, diff --git a/frontend/src/containers/map/content/map/popup/boundaries/index.tsx b/frontend/src/containers/map/content/map/popup/boundaries/index.tsx new file mode 100644 index 00000000..2bc8b0b2 --- /dev/null +++ b/frontend/src/containers/map/content/map/popup/boundaries/index.tsx @@ -0,0 +1,264 @@ +import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; + +import { useMap } from 'react-map-gl'; + +import { useRouter } from 'next/router'; + +import type { Feature } from 'geojson'; +import { useAtom, useAtomValue } from 'jotai'; +import { useLocale, useTranslations } from 'next-intl'; + +import { PAGES } from '@/constants/pages'; +import { useMapSearchParams, useSyncMapLayers } from '@/containers/map/content/map/sync-settings'; +import { layersInteractiveIdsAtom, popupAtom } from '@/containers/map/store'; +import { formatPercentage, formatKM } from '@/lib/utils/formats'; +import { FCWithMessages } from '@/types'; +import { useGetLayersId } from '@/types/generated/layer'; +import { useGetProtectionCoverageStats } from '@/types/generated/protection-coverage-stat'; +import { ProtectionCoverageStat } from '@/types/generated/strapi.schemas'; +import { LayerTyped } from '@/types/layers'; + +import { POPUP_BUTTON_CONTENT_BY_SOURCE, POPUP_PROPERTIES_BY_SOURCE } from '../constants'; + +const BoundariesPopup: FCWithMessages<{ layerId: number }> = ({ layerId }) => { + const t = useTranslations('containers.map'); + const locale = useLocale(); + + const [rendered, setRendered] = useState(false); + + const geometryDataRef = useRef(); + const { default: map } = useMap(); + + const searchParams = useMapSearchParams(); + const [activeLayers] = useSyncMapLayers(); + + const { push } = useRouter(); + + const [popup, setPopup] = useAtom(popupAtom); + const layersInteractiveIds = useAtomValue(layersInteractiveIdsAtom); + + const { + data: { source, environment }, + } = useGetLayersId<{ + source: LayerTyped['config']['source']; + environment: string; + }>( + layerId, + { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + locale, + fields: ['config'], + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + environment: { + fields: ['slug'], + }, + }, + }, + { + query: { + placeholderData: { data: {} }, + select: ({ data }) => ({ + source: (data.attributes as LayerTyped)?.config?.source, + environment: data.attributes?.environment?.data?.attributes.slug, + }), + }, + } + ); + + const geometryData = useMemo(() => { + if (source?.type === 'vector' && rendered && popup && map) { + const point = map.project(popup.lngLat); + + // check if the point is outside the canvas + if ( + point.x < 0 || + point.x > map.getCanvas().width || + point.y < 0 || + point.y > map.getCanvas().height + ) { + return geometryDataRef.current; + } + const query = map.queryRenderedFeatures(point, { + layers: layersInteractiveIds, + }); + + const d = query.find((d) => { + return d.source === source.id; + })?.properties; + + geometryDataRef.current = d; + + if (d) { + return geometryDataRef.current; + } + } + + return geometryDataRef.current; + }, [popup, source, layersInteractiveIds, map, rendered]); + + const locationCode = useMemo( + () => geometryData?.[POPUP_PROPERTIES_BY_SOURCE[source?.['id']]?.id], + [geometryData, source] + ); + + const localizedLocationName = useMemo( + () => geometryData?.[POPUP_PROPERTIES_BY_SOURCE[source?.['id']]?.name[locale]], + [geometryData, locale, source] + ); + + const { data: protectionCoverageStats, isFetching } = + useGetProtectionCoverageStats( + { + locale, + filters: { + location: { + code: locationCode, + }, + is_last_year: { + $eq: true, + }, + environment: { + slug: { + $eq: environment, + }, + }, + }, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: [ + ...(locale === 'en' ? ['name'] : []), + ...(locale === 'es' ? ['name_es'] : []), + ...(locale === 'fr' ? ['name_fr'] : []), + 'code', + 'total_marine_area', + 'total_terrestrial_area', + ], + }, + }, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['coverage', 'protected_area'], + 'pagination[limit]': 1, + }, + { + query: { + select: ({ data }) => data?.[0].attributes, + enabled: !!geometryData, + }, + } + ); + + const formattedStats = useMemo(() => { + if (protectionCoverageStats) { + const percentage = formatPercentage(locale, protectionCoverageStats.coverage, { + displayPercentageSign: false, + }); + + const protectedArea = formatKM(locale, protectionCoverageStats.protected_area); + + return { + percentage, + protectedArea, + }; + } + + return { + percentage: '-', + protectedArea: '-', + }; + }, [locale, protectionCoverageStats]); + + // handle renderer + const handleMapRender = useCallback(() => { + setRendered(map?.loaded() && map?.areTilesLoaded()); + }, [map]); + + const handleLocationSelected = useCallback(async () => { + await push(`${PAGES.progressTracker}/${locationCode.toUpperCase()}?${searchParams.toString()}`); + setPopup({}); + }, [push, locationCode, searchParams, setPopup]); + + useEffect(() => { + map?.on('render', handleMapRender); + + setRendered(map?.loaded() && map?.areTilesLoaded()); + + return () => { + map?.off('render', handleMapRender); + }; + }, [map, handleMapRender]); + + // Close the tooltip if the layer that was clicked is not active anymore + useEffect(() => { + if (!activeLayers.includes(layerId)) { + setPopup({}); + } + }, [layerId, activeLayers, setPopup]); + + if (!geometryData) return null; + + return ( +
      +

      {localizedLocationName || '-'}

      + {isFetching &&
      {t('loading')}
      } + {!isFetching && !protectionCoverageStats && ( +
      {t('no-data-available')}
      + )} + {!isFetching && !!protectionCoverageStats && ( + <> +
      +
      + {environment === 'marine' + ? t('marine-conservation-coverage') + : t('terrestrial-conservation-coverage')} +
      +
      + {formattedStats.percentage !== '-' && + t.rich('percentage-bold', { + percentage: formattedStats.percentage, + b1: (chunks) => ( + {chunks} + ), + b2: (chunks) => {chunks}, + })} + {formattedStats.percentage === '-' && ( + + {formattedStats.percentage} + + )} +
      +
      + {t('protected-area', { + protectedArea: formattedStats.protectedArea, + totalArea: formatKM( + locale, + Number( + protectionCoverageStats?.location.data.attributes[ + environment === 'marine' ? 'total_marine_area' : 'total_terrestrial_area' + ] + ) + ), + })} +
      +
      + + + )} +
      + ); +}; + +BoundariesPopup.messages = ['containers.map']; + +export default BoundariesPopup; diff --git a/frontend/src/containers/map/content/map/popup/constants.ts b/frontend/src/containers/map/content/map/popup/constants.ts new file mode 100644 index 00000000..d6e4767c --- /dev/null +++ b/frontend/src/containers/map/content/map/popup/constants.ts @@ -0,0 +1,52 @@ +import { IconProps } from '@/components/ui/icon'; +import Mountain from '@/styles/icons/mountain.svg'; +import Wave from '@/styles/icons/wave.svg'; + +export const POPUP_PROPERTIES_BY_SOURCE = { + 'ezz-source': { + id: 'ISO_SOV1', + name: { + en: 'GEONAME', + es: 'GEONAME_ES', + fr: 'GEONAME_FR', + }, + }, + 'regions-source': { + id: 'region_id', + name: { + en: 'name', + es: 'name_es', + fr: 'name_fr', + }, + }, + 'gadm-countries': { + id: 'GID_0', + name: { + en: 'COUNTRY', + es: 'name_es', + fr: 'name_fr', + }, + }, + 'gadm-regions': { + id: 'region_id', + name: { + en: 'name', + es: 'name_es', + fr: 'name_fr', + }, + }, +}; + +export const POPUP_ICON_BY_SOURCE = { + 'ezz-source': Wave as IconProps['icon'], + 'regions-source': Wave as IconProps['icon'], + 'gadm-countries': Mountain as IconProps['icon'], + 'gadm-regions': Mountain as IconProps['icon'], +}; + +export const POPUP_BUTTON_CONTENT_BY_SOURCE = { + 'ezz-source': 'open-country-insights', + 'regions-source': 'open-region-insights', + 'gadm-countries': 'open-country-insights', + 'gadm-regions': 'open-region-insights', +}; diff --git a/frontend/src/containers/map/content/map/popup/eez/index.tsx b/frontend/src/containers/map/content/map/popup/eez/index.tsx deleted file mode 100644 index 3d96264a..00000000 --- a/frontend/src/containers/map/content/map/popup/eez/index.tsx +++ /dev/null @@ -1,309 +0,0 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; - -import { useMap } from 'react-map-gl'; - -import { useParams } from 'next/navigation'; -import { useRouter } from 'next/router'; - -import { useQueries } from '@tanstack/react-query'; -import type { Feature } from 'geojson'; -import { useAtom, useAtomValue } from 'jotai'; -import { useLocale, useTranslations } from 'next-intl'; - -import { CustomMapProps } from '@/components/map/types'; -import { PAGES } from '@/constants/pages'; -import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; -import { bboxLocation, layersInteractiveIdsAtom, popupAtom } from '@/containers/map/store'; -import { formatPercentage, formatKM } from '@/lib/utils/formats'; -import { FCWithMessages } from '@/types'; -import { useGetLayersId } from '@/types/generated/layer'; -import { getGetLocationsQueryOptions } from '@/types/generated/location'; -import { getGetProtectionCoverageStatsQueryOptions } from '@/types/generated/protection-coverage-stat'; -import { ProtectionCoverageStatListResponseDataItem } from '@/types/generated/strapi.schemas'; -import { LayerTyped } from '@/types/layers'; - -const EEZLayerPopup: FCWithMessages<{ layerId: number }> = ({ layerId }) => { - const t = useTranslations('containers.map'); - const locale = useLocale(); - - const [rendered, setRendered] = useState(false); - const DATA_REF = useRef(); - const { default: map } = useMap(); - const searchParams = useMapSearchParams(); - const { push } = useRouter(); - const [, setLocationBBox] = useAtom(bboxLocation); - const [popup, setPopup] = useAtom(popupAtom); - const { locationCode } = useParams(); - - const layersInteractiveIds = useAtomValue(layersInteractiveIdsAtom); - - const layerQuery = useGetLayersId<{ - source: LayerTyped['config']['source']; - click: LayerTyped['interaction_config']['events'][0]; - }>( - layerId, - { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - locale, - populate: 'metadata', - }, - { - query: { - select: ({ data }) => ({ - source: (data.attributes as LayerTyped).config?.source, - click: (data.attributes as LayerTyped)?.interaction_config?.events.find( - (ev) => ev.type === 'click' - ), - }), - }, - } - ); - - const { source } = layerQuery.data; - - const DATA = useMemo(() => { - if (source?.type === 'vector' && rendered && popup && map) { - const point = map.project(popup.lngLat); - - // check if the point is outside the canvas - if ( - point.x < 0 || - point.x > map.getCanvas().width || - point.y < 0 || - point.y > map.getCanvas().height - ) { - return DATA_REF.current; - } - const query = map.queryRenderedFeatures(point, { - layers: layersInteractiveIds, - }); - - const d = query.find((d) => { - return d.source === source.id; - })?.properties; - - DATA_REF.current = d; - - if (d) { - return DATA_REF.current; - } - } - - return DATA_REF.current; - }, [popup, source, layersInteractiveIds, map, rendered]); - - const locationCodes = Object.keys(DATA || {}) - .filter((key) => key.startsWith('ISO_') && DATA[key]) - .map((key) => DATA[key]) - .filter((code, index, codes) => { - if (codes.length > 1) return code === locationCode; - return true; - }); - - const locationQueries = useQueries({ - queries: locationCodes.map((code) => - getGetLocationsQueryOptions( - { - locale, - filters: { - code, - }, - }, - { - query: { - enabled: Boolean(code), - select: ({ data }) => data?.[0]?.attributes, - }, - } - ) - ), - }); - - const locationsData = useMemo( - () => - locationQueries - .map((query) => { - if (['loading', 'error'].includes(query.status)) return null; - - return query.data; - }) - .filter((d) => Boolean(d)), - [locationQueries] - ); - - const protectionCoverageStatsQueries = useQueries({ - queries: locationCodes.map((code) => - getGetProtectionCoverageStatsQueryOptions( - { - locale, - filters: { - location: { - code, - }, - }, - populate: 'location', - // @ts-expect-error this is an issue with Orval typing - 'sort[year]': 'desc', - 'pagination[limit]': -1, - }, - { - query: { - select: ({ data }) => { - if (!data?.length) return undefined; - - const latestYear = data[0].attributes.year; - - const latestStats = data.filter((d) => d.attributes.year === latestYear); - - const cumSumProtectedArea = latestStats.reduce( - (acc, entry) => acc + entry.attributes.cumSumProtectedArea, - 0 - ); - - return { - cumSumProtectedArea, - }; - }, - }, - } - ) - ), - }); - - const protectionCoverageStatsData: { cumSumProtectedArea: number }[] = useMemo( - () => - protectionCoverageStatsQueries - .map((query) => { - if (!query.isSuccess) return null; - - return query.data as { - cumSumProtectedArea: ProtectionCoverageStatListResponseDataItem['attributes']['cumSumProtectedArea']; - }; - }) - .filter((d) => Boolean(d)), - [protectionCoverageStatsQueries] - ); - - const totalCumSumProtectedArea = useMemo(() => { - if (!protectionCoverageStatsData.length) return 0; - - return protectionCoverageStatsData.reduce( - (acc, { cumSumProtectedArea }) => acc + cumSumProtectedArea, - 0 - ); - }, [protectionCoverageStatsData]); - - const totalMarineArea = useMemo(() => { - if (!locationsData.length) return 0; - - return locationsData.reduce((acc, { totalMarineArea }) => acc + totalMarineArea, 0); - }, [locationsData]); - - const coveragePercentage = useMemo(() => { - if (locationsData.length) { - return formatPercentage(locale, (totalCumSumProtectedArea / totalMarineArea) * 100, { - displayPercentageSign: false, - }); - } - - return '-'; - }, [locale, totalCumSumProtectedArea, totalMarineArea, locationsData]); - - const EEZName = useMemo(() => { - let name = null; - - if (!DATA) { - return name; - } - - if (locale === 'es') { - name = DATA.GEONAME_ES; - } - - if (locale === 'fr') { - name = DATA.GEONAME_FR; - } - - return name ?? DATA.GEONAME; - }, [locale, DATA]); - - // handle renderer - const handleMapRender = useCallback(() => { - setRendered(map?.loaded() && map?.areTilesLoaded()); - }, [map]); - - const handleLocationSelected = useCallback(async () => { - if (!locationsData[0]) return undefined; - - const { code, bounds } = locationsData[0]; - - await push(`${PAGES.progressTracker}/${code.toUpperCase()}?${searchParams.toString()}`); - setLocationBBox(bounds as CustomMapProps['bounds']['bbox']); - setPopup({}); - }, [push, searchParams, setLocationBBox, locationsData, setPopup]); - - useEffect(() => { - map?.on('render', handleMapRender); - - setRendered(map?.loaded() && map?.areTilesLoaded()); - - return () => { - map?.off('render', handleMapRender); - }; - }, [map, handleMapRender]); - - const isFetchedLocations = locationQueries.every((query) => query.isFetched); - const isFetchingLocations = - !isFetchedLocations && locationQueries.some((query) => query.isFetching); - const isEmptyLocations = isFetchedLocations && locationQueries.some((query) => !query.data); - - if (!DATA) return null; - - return ( -
      -

      {EEZName}

      - {isFetchingLocations && {t('loading')}} - {isEmptyLocations && {t('no-data-available')}} - {!isEmptyLocations && ( - <> -
      -
      {t('marine-conservation-coverage')}
      -
      - {coveragePercentage !== '-' && - t.rich('percentage-bold', { - percentage: coveragePercentage, - b1: (chunks) => ( - {chunks} - ), - b2: (chunks) => {chunks}, - })} - {coveragePercentage === '-' && ( - {coveragePercentage} - )} -
      -
      - {t('marine-protected-area', { - protectedArea: formatKM(locale, totalCumSumProtectedArea), - totalArea: formatKM(locale, totalMarineArea), - })} -
      -
      - {locationCodes?.length === 1 && ( - - )} - - )} -
      - ); -}; - -EEZLayerPopup.messages = ['containers.map']; - -export default EEZLayerPopup; diff --git a/frontend/src/containers/map/content/map/popup/index.tsx b/frontend/src/containers/map/content/map/popup/index.tsx index 4db5a3c1..36799dcf 100644 --- a/frontend/src/containers/map/content/map/popup/index.tsx +++ b/frontend/src/containers/map/content/map/popup/index.tsx @@ -23,6 +23,8 @@ import { useGetLayers } from '@/types/generated/layer'; import { useSyncMapLayers } from '../sync-settings'; +import { POPUP_ICON_BY_SOURCE, POPUP_PROPERTIES_BY_SOURCE } from './constants'; + const PopupContainer: FCWithMessages = () => { const locale = useLocale(); @@ -34,7 +36,10 @@ const PopupContainer: FCWithMessages = () => { const setPopup = useSetAtom(popupAtom); - const availableSources = Array.from(new Set(popup?.features?.map(({ source }) => source))); + const availableSources = useMemo( + () => Array.from(new Set(popup?.features?.map(({ source }) => source))), + [popup] + ); const { data: layersInteractiveData } = useGetLayers( { @@ -72,23 +77,20 @@ const PopupContainer: FCWithMessages = () => { ); const hoverTooltipContent = useMemo(() => { - const properties = popup?.features?.find(({ source }) => source === 'ezz-source')?.properties; - - let content = null; + const { properties, source } = popup?.features?.[0] ?? {}; if (!properties) { - return content; + return null; } - if (locale === 'es') { - content = properties.GEONAME_ES; - } - - if (locale === 'fr') { - content = properties.GEONAME_FR; - } - - return content ?? properties.GEONAME; + return ( +
      + {POPUP_ICON_BY_SOURCE[source] ? ( + + ) : null} + {properties[POPUP_PROPERTIES_BY_SOURCE[source]?.name[locale]] ?? null} +
      + ); }, [locale, popup]); const closePopup = useCallback(() => { @@ -101,10 +103,6 @@ const PopupContainer: FCWithMessages = () => { } }, [layersInteractive, closePopup]); - useEffect(() => { - setPopup({}); - }, [layersInteractive, setPopup]); - useEffect(() => { if (layersInteractiveData?.[0]?.value) { setSelectedLayerId(Number(layersInteractiveData[0].value)); @@ -116,12 +114,15 @@ const PopupContainer: FCWithMessages = () => { const isHoveredTooltip = popup?.type === 'mousemove'; const isClickedTooltip = popup?.type === 'click'; - if (!Object.keys(popup).length || !popup?.features?.length) return null; + if (!Object.keys(popup).length || !popup?.features?.length) { + return null; + } return ( { )} {isHoveredTooltip && ( -
      {hoverTooltipContent}
      +
      {hoverTooltipContent}
      )} {isClickedTooltip && selectedLayerId && }
diff --git a/frontend/src/containers/map/content/map/popup/item.tsx b/frontend/src/containers/map/content/map/popup/item.tsx index c6e32108..95b6d70e 100644 --- a/frontend/src/containers/map/content/map/popup/item.tsx +++ b/frontend/src/containers/map/content/map/popup/item.tsx @@ -2,12 +2,9 @@ import { ReactElement, isValidElement, useMemo } from 'react'; import { useLocale } from 'next-intl'; -import EEZLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/eez'; -import EstablishmentLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/establishment'; -import EEZLayerPopup from '@/containers/map/content/map/popup/eez'; +import BoundariesPopup from '@/containers/map/content/map/popup/boundaries'; import GenericPopup from '@/containers/map/content/map/popup/generic'; import ProtectedAreaPopup from '@/containers/map/content/map/popup/protected-area'; -import RegionsPopup from '@/containers/map/content/map/popup/regions'; import { parseConfig } from '@/lib/json-converter'; import { FCWithMessages } from '@/types'; import { useGetLayersId } from '@/types/generated/layer'; @@ -54,12 +51,9 @@ const PopupItem: FCWithMessages = ({ id }) => { PopupItem.messages = [ // These components are used by `parseConfig` - ...EEZLayerPopup.messages, - ...EEZLayerLegend.messages, ...GenericPopup.messages, ...ProtectedAreaPopup.messages, - ...RegionsPopup.messages, - ...EstablishmentLayerLegend.messages, + ...BoundariesPopup.messages, ]; export default PopupItem; diff --git a/frontend/src/containers/map/content/map/popup/protected-area/index.tsx b/frontend/src/containers/map/content/map/popup/protected-area/index.tsx index adeacfc2..c3e470c9 100644 --- a/frontend/src/containers/map/content/map/popup/protected-area/index.tsx +++ b/frontend/src/containers/map/content/map/popup/protected-area/index.tsx @@ -115,7 +115,7 @@ const ProtectedAreaPopup: FCWithMessages<{ layerId: number }> = ({ layerId }) => if (!DATA) return null; const globalCoveragePercentage = - (DATA.REP_M_AREA / locationQuery.data?.attributes?.totalMarineArea) * 100; + (DATA.REP_M_AREA / Number(locationQuery.data?.attributes?.total_marine_area)) * 100; const classNameByMPAType = cn({ 'text-green': DATA?.PA_DEF === '1', diff --git a/frontend/src/containers/map/content/map/popup/regions/index.tsx b/frontend/src/containers/map/content/map/popup/regions/index.tsx deleted file mode 100644 index c0a8d2d0..00000000 --- a/frontend/src/containers/map/content/map/popup/regions/index.tsx +++ /dev/null @@ -1,251 +0,0 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; - -import { useMap } from 'react-map-gl'; - -import { useRouter } from 'next/router'; - -import type { Feature } from 'geojson'; -import { useAtom, useAtomValue, useSetAtom } from 'jotai'; -import { useLocale, useTranslations } from 'next-intl'; - -import { CustomMapProps } from '@/components/map/types'; -import { PAGES } from '@/constants/pages'; -import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; -import { bboxLocation, layersInteractiveIdsAtom, popupAtom } from '@/containers/map/store'; -import { formatPercentage, formatKM } from '@/lib/utils/formats'; -import { FCWithMessages } from '@/types'; -import { useGetLayersId } from '@/types/generated/layer'; -import { useGetLocations } from '@/types/generated/location'; -import { useGetProtectionCoverageStats } from '@/types/generated/protection-coverage-stat'; -import { ProtectionCoverageStatListResponseDataItem } from '@/types/generated/strapi.schemas'; -import { LayerTyped } from '@/types/layers'; - -const RegionsPopup: FCWithMessages<{ layerId: number }> = ({ layerId }) => { - const t = useTranslations('containers.map'); - const locale = useLocale(); - - const [rendered, setRendered] = useState(false); - const DATA_REF = useRef(); - const { default: map } = useMap(); - const searchParams = useMapSearchParams(); - const { push } = useRouter(); - const setLocationBBox = useSetAtom(bboxLocation); - const [popup, setPopup] = useAtom(popupAtom); - - const layersInteractiveIds = useAtomValue(layersInteractiveIdsAtom); - - const layerQuery = useGetLayersId<{ - source: LayerTyped['config']['source']; - click: LayerTyped['interaction_config']['events'][0]; - }>( - layerId, - { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - locale, - populate: 'metadata', - }, - { - query: { - select: ({ data }) => ({ - source: (data.attributes as LayerTyped).config?.source, - click: (data.attributes as LayerTyped)?.interaction_config?.events.find( - (ev) => ev.type === 'click' - ), - }), - }, - } - ); - - const { source } = layerQuery.data; - - const DATA = useMemo(() => { - if (source?.type === 'vector' && rendered && popup && map) { - const point = map.project(popup.lngLat); - - // check if the point is outside the canvas - if ( - point.x < 0 || - point.x > map.getCanvas().width || - point.y < 0 || - point.y > map.getCanvas().height - ) { - return DATA_REF.current; - } - const query = map.queryRenderedFeatures(point, { - layers: layersInteractiveIds, - }); - - const d = query.find((d) => { - return d.source === source.id; - })?.properties; - - DATA_REF.current = d; - - if (d) { - return DATA_REF.current; - } - } - - return DATA_REF.current; - }, [popup, source, layersInteractiveIds, map, rendered]); - - const locationsQuery = useGetLocations( - { - locale, - filters: { - code: DATA?.region_id, - }, - }, - { - query: { - enabled: !!DATA?.region_id, - select: ({ data }) => data?.[0]?.attributes, - }, - } - ); - - // ? I had to type the data ad hoc because the generated type is wrong when we are adding - // ? the `sort` query param - const { data: protectionCoverageStats }: { data: ProtectionCoverageStatListResponseDataItem[] } = - useGetProtectionCoverageStats( - { - locale, - filters: { - location: { - code: DATA?.region_id, - }, - }, - populate: 'location', - // @ts-expect-error this is an issue with Orval typing - 'sort[year]': 'desc', - 'pagination[limit]': -1, - }, - { - query: { - select: ({ data }) => data, - enabled: !!DATA?.region_id, - }, - } - ); - - const latestYearAvailable = useMemo(() => { - if (protectionCoverageStats?.[0]) { - return protectionCoverageStats[0].attributes.year; - } - }, [protectionCoverageStats]); - - const latestProtectionCoverageStats = useMemo(() => { - if (latestYearAvailable) { - return protectionCoverageStats.filter((d) => d.attributes.year === latestYearAvailable); - } - return []; - }, [protectionCoverageStats, latestYearAvailable]); - - const coverageStats = useMemo(() => { - if (latestProtectionCoverageStats.length && locationsQuery.data) { - const totalCumSumProtectedArea = latestProtectionCoverageStats.reduce( - (acc, entry) => acc + entry.attributes.cumSumProtectedArea, - 0 - ); - - const percentage = formatPercentage( - locale, - (totalCumSumProtectedArea / locationsQuery.data.totalMarineArea) * 100, - { - displayPercentageSign: false, - } - ); - - const protectedArea = formatKM(locale, totalCumSumProtectedArea); - - return { - percentage, - protectedArea, - }; - } - - return { - percentage: '-', - protectedArea: '-', - }; - }, [locale, latestProtectionCoverageStats, locationsQuery.data]); - - // handle renderer - const handleMapRender = useCallback(() => { - setRendered(map?.loaded() && map?.areTilesLoaded()); - }, [map]); - - const handleLocationSelected = useCallback(async () => { - await push( - `${ - PAGES.progressTracker - }/${locationsQuery.data.code.toUpperCase()}?${searchParams.toString()}` - ); - setLocationBBox(locationsQuery.data.bounds as CustomMapProps['bounds']['bbox']); - setPopup({}); - }, [push, searchParams, setLocationBBox, locationsQuery.data, setPopup]); - - useEffect(() => { - map?.on('render', handleMapRender); - - setRendered(map?.loaded() && map?.areTilesLoaded()); - - return () => { - map?.off('render', handleMapRender); - }; - }, [map, handleMapRender]); - - if (!DATA) return null; - - return ( -
-

{locationsQuery.data?.name || '-'}

- {locationsQuery.isFetching && !locationsQuery.isFetched && ( - {t('loading')} - )} - {locationsQuery.isFetched && !locationsQuery.data && ( - {t('no-data-available')} - )} - {locationsQuery.isFetched && locationsQuery.data && ( - <> -
-
{t('marine-conservation-coverage')}
-
- {coverageStats.percentage !== '-' && - t.rich('percentage-bold', { - percentage: coverageStats.percentage, - b1: (chunks) => ( - {chunks} - ), - b2: (chunks) => {chunks}, - })} - {coverageStats.percentage === '-' && ( - - {coverageStats.percentage} - - )} -
-
- {t('marine-protected-area', { - protectedArea: coverageStats.protectedArea, - totalArea: formatKM(locale, locationsQuery.data.totalMarineArea), - })} -
-
- - - )} -
- ); -}; - -RegionsPopup.messages = ['containers.map']; - -export default RegionsPopup; diff --git a/frontend/src/containers/map/content/map/sync-settings.ts b/frontend/src/containers/map/content/map/sync-settings.ts index b08be8ee..c57cc4f4 100644 --- a/frontend/src/containers/map/content/map/sync-settings.ts +++ b/frontend/src/containers/map/content/map/sync-settings.ts @@ -2,6 +2,10 @@ import { parseAsArrayOf, parseAsInteger, useQueryState } from 'next-usequerystat import { parseAsJson } from 'next-usequerystate/parsers'; import { CustomMapProps } from '@/components/map/types'; +import { + DEFAULT_SYNC_CONTENT_SETTINGS, + useSyncMapContentSettings, +} from '@/containers/map/sync-settings'; import { LayerSettings } from '@/types/layers'; const DEFAULT_SYNC_MAP_SETTINGS: { @@ -38,6 +42,7 @@ export const useMapSearchParams = () => { const [settings] = useSyncMapSettings(); const [layers] = useSyncMapLayers(); const [layerSettings] = useSyncMapLayerSettings(); + const [contentSettings] = useSyncMapContentSettings(); const currentSearchparams = new URLSearchParams(); currentSearchparams.set('layers', parseAsArrayOf(parseAsInteger).serialize(layers)); @@ -49,6 +54,10 @@ export const useMapSearchParams = () => { 'layer-settings', parseAsJson<{ [layerId: number]: Partial }>().serialize(layerSettings) ); + currentSearchparams.set( + 'content', + parseAsJson().serialize(contentSettings) + ); return currentSearchparams; }; diff --git a/frontend/src/containers/map/sidebar/layers-panel/index.tsx b/frontend/src/containers/map/sidebar/layers-panel/index.tsx index 6b1b7057..5a51cf7e 100644 --- a/frontend/src/containers/map/sidebar/layers-panel/index.tsx +++ b/frontend/src/containers/map/sidebar/layers-panel/index.tsx @@ -1,30 +1,32 @@ -import { ComponentProps, useCallback } from 'react'; +import { ComponentProps, useCallback, useEffect, useMemo } from 'react'; import { useLocale, useTranslations } from 'next-intl'; +import { usePreviousImmediate } from 'rooks'; import TooltipButton from '@/components/tooltip-button'; import { Label } from '@/components/ui/label'; import { Switch } from '@/components/ui/switch'; -import { - useSyncMapLayers, - useSyncMapLayerSettings, - useSyncMapSettings, -} from '@/containers/map/content/map/sync-settings'; +import { ENVIRONMENTS } from '@/constants/environments'; +import { useSyncMapLayers, useSyncMapSettings } from '@/containers/map/content/map/sync-settings'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { FCWithMessages } from '@/types'; import { useGetDatasets } from '@/types/generated/dataset'; -import { DatasetUpdatedByData, LayerResponseDataObject } from '@/types/generated/strapi.schemas'; +import { DatasetUpdatedByData } from '@/types/generated/strapi.schemas'; -const SWITCH_LABEL_CLASSES = '-mb-px cursor-pointer pt-px font-mono text-xs font-normal'; +import LayersGroup, { SWITCH_LABEL_CLASSES } from './layers-group'; const LayersPanel: FCWithMessages = (): JSX.Element => { const t = useTranslations('containers.map-sidebar-layers-panel'); const locale = useLocale(); - - const [activeLayers, setMapLayers] = useSyncMapLayers(); - const [layerSettings, setLayerSettings] = useSyncMapLayerSettings(); + const [, setMapLayers] = useSyncMapLayers(); const [{ labels }, setMapSettings] = useSyncMapSettings(); + const [{ tab }] = useSyncMapContentSettings(); + const previousTab = usePreviousImmediate(tab); - const { data: datasets }: { data: DatasetUpdatedByData[] } = useGetDatasets( + const { + data: datasetsData, + isFetching: isFetchingDatasetsData, + }: { data: DatasetUpdatedByData[]; isFetching: boolean } = useGetDatasets( { locale, sort: 'name:asc', @@ -32,7 +34,7 @@ const LayersPanel: FCWithMessages = (): JSX.Element => { // @ts-ignore populate: { layers: { - populate: 'metadata', + populate: 'metadata,environment', }, }, }, @@ -43,36 +45,104 @@ const LayersPanel: FCWithMessages = (): JSX.Element => { } ); - const onToggleLayer = useCallback( - (layerId: LayerResponseDataObject['id'], isActive: boolean) => { - setMapLayers( - isActive - ? [...activeLayers, Number(layerId)] - : activeLayers.filter((_layerId) => _layerId !== Number(layerId)) + // Break up datasets by terrestrial, marine, basemap for ease of handling + const datasets = useMemo(() => { + // Basemap dataset is displayed separately in the panel, much like terrestrial/maritime. + // We need to split it out from the datasets we're processing in order to display this correctly. + const basemapDataset = datasetsData?.filter(({ attributes }) => attributes?.slug === 'basemap'); + const basemapDatasetIds = basemapDataset?.map(({ id }) => id); + const nonBasemapDatasets = datasetsData?.filter(({ id }) => !basemapDatasetIds.includes(id)); + + // A dataset can contain layers with different environments assigned, we want + // to pick only the layers for the environment we're displaying. + const filterLayersByEnvironment = (layers, environment) => { + const layersData = layers?.data; + + return ( + layersData?.filter(({ attributes }) => { + const environmentData = attributes?.environment?.data; + return environmentData?.attributes?.slug === environment; + }) || [] ); + }; + + const parseDatasetsByEnvironment = (datasets, environment) => { + const parsedDatasets = datasets?.map((d) => { + const { layers, ...rest } = d?.attributes; + const filteredLayers = filterLayersByEnvironment(layers, environment); + + // If dataset contains no layers, it should not displayed. We'll filter this + // values before the return of the parsed data array. + if (!filteredLayers.length) return null; + + return { + id: d?.id, + attributes: { + ...rest, + layers: { + data: filteredLayers, + }, + }, + }; + }); + + // Prevent displaying of groups when they are empty / contain no layers + return parsedDatasets?.filter((dataset) => dataset !== null); + }; + + const [terrestrialDataset, marineDataset] = [ + ENVIRONMENTS.terrestrial, + ENVIRONMENTS.marine, + ]?.map((environment) => parseDatasetsByEnvironment(nonBasemapDatasets, environment)); + + return { + terrestrial: terrestrialDataset, + marine: marineDataset, + basemap: basemapDataset, + }; + }, [datasetsData]); - // If we don't have layerSettings entries, the view is in its default state; we wish to - // show all legend accordion items expanded by default. - const initialSettings = (() => { - const layerSettingsKeys = Object.keys(layerSettings); - if (layerSettingsKeys.length) return {}; - return Object.assign( - {}, - ...activeLayers.map((layerId) => ({ [layerId]: { expanded: true } })) + // Default layers ids by dataset type + const defaultLayersIds = useMemo(() => { + const datasetsDefaultLayerIds = (datasets = []) => { + return datasets.reduce((acc, { attributes }) => { + const layersData = attributes?.layers?.data; + const defaultLayersIds = layersData.reduce( + (acc, { id, attributes }) => (attributes?.default ? [...acc, id] : acc), + [] ); - })(); + return [...acc, ...defaultLayersIds]; + }, []); + }; - setLayerSettings((prev) => ({ - ...initialSettings, - ...prev, - [layerId]: { - ...prev[layerId], - expanded: true, - }, - })); - }, - [activeLayers, layerSettings, setLayerSettings, setMapLayers] - ); + return { + terrestrial: datasetsDefaultLayerIds(datasets.terrestrial), + marine: datasetsDefaultLayerIds(datasets.marine), + basemap: datasetsDefaultLayerIds(datasets.basemap), + }; + }, [datasets]); + + // Set map layers to the corresponding defaults when the user switches tabs + useEffect(() => { + if (tab !== previousTab && !!previousTab) { + let mapLayers = []; + switch (tab) { + case 'summary': + mapLayers = ['terrestrial', 'marine', 'basemap']?.reduce( + (ids, dataset) => [...ids, ...defaultLayersIds[dataset]], + [] + ); + break; + case 'terrestrial': + mapLayers = defaultLayersIds.terrestrial; + break; + case 'marine': + mapLayers = defaultLayersIds.marine; + break; + } + setMapLayers(mapLayers); + } + }, [defaultLayersIds, setMapLayers, tab, previousTab]); const handleLabelsChange = useCallback( (active: Parameters['onCheckedChange']>[0]) => { @@ -85,61 +155,50 @@ const LayersPanel: FCWithMessages = (): JSX.Element => { ); return ( -
-

{t('layers')}

-
- {datasets?.map((dataset) => { - return ( -
-

{dataset?.attributes?.name}

-
    - {dataset.attributes?.layers?.data?.map((layer) => { - const isActive = activeLayers.findIndex((layerId) => layerId === layer.id) !== -1; - const onCheckedChange = onToggleLayer.bind(null, layer.id) as ( - isActive: boolean - ) => void; - const metadata = layer?.attributes?.metadata; - - return ( -
  • - - - - - {metadata?.description && ( - - )} -
  • - ); - })} - - <> - {dataset.attributes?.slug === 'basemap' && ( -
  • - - - - -
  • - )} - -
-
- ); - })} +
+
+

{t('layers')}

+ + + + {/* + The labels toggle doesn't come from the basemap dataset and has slightly functionality implemented. + Not ideal, but given it's a one-off, we'll pass the entry as a child to be displayed alongside the + other entries, much like in the previous implementation. + */} +
  • + + + + +
  • +
    ); }; diff --git a/frontend/src/containers/map/sidebar/layers-panel/layers-group/index.tsx b/frontend/src/containers/map/sidebar/layers-panel/layers-group/index.tsx new file mode 100644 index 00000000..a4601b81 --- /dev/null +++ b/frontend/src/containers/map/sidebar/layers-panel/layers-group/index.tsx @@ -0,0 +1,176 @@ +import { PropsWithChildren, useCallback, useEffect, useMemo, useState } from 'react'; + +import { useTranslations } from 'next-intl'; +import { LuChevronDown, LuChevronUp } from 'react-icons/lu'; + +import TooltipButton from '@/components/tooltip-button'; +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; +import { Label } from '@/components/ui/label'; +import { Switch } from '@/components/ui/switch'; +import { + useSyncMapLayers, + useSyncMapLayerSettings, +} from '@/containers/map/content/map/sync-settings'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import { cn } from '@/lib/classnames'; +import { FCWithMessages } from '@/types'; +import { DatasetUpdatedByData, LayerResponseDataObject } from '@/types/generated/strapi.schemas'; + +export const SWITCH_LABEL_CLASSES = '-mb-px cursor-pointer pt-px font-mono text-xs font-normal'; +const COLLAPSIBLE_TRIGGER_ICONS_CLASSES = 'w-5 h-5 hidden'; +const COLLAPSIBLE_TRIGGER_CLASSES = + 'group flex w-full items-center justify-between py-2 text-xs font-bold'; +const COLLAPSIBLE_CONTENT_CLASSES = + 'data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down border-black py-2'; + +type LayersGroupProps = PropsWithChildren<{ + name: string; + datasets: DatasetUpdatedByData[]; + showDatasetsNames?: boolean; + showBottomBorder?: boolean; + isOpen?: boolean; + loading?: boolean; + // Number of extra active layers for this group + extraActiveLayers?: number; +}>; + +const LayersGroup: FCWithMessages = ({ + name, + datasets, + showDatasetsNames = true, + showBottomBorder = true, + isOpen = true, + loading = true, + extraActiveLayers = 0, + children, +}): JSX.Element => { + const [open, setOpen] = useState(isOpen); + const t = useTranslations('containers.map-sidebar-layers-panel'); + + const [activeLayers, setMapLayers] = useSyncMapLayers(); + const [layerSettings, setLayerSettings] = useSyncMapLayerSettings(); + const [{ tab }] = useSyncMapContentSettings(); + + const datasetsLayersIds = useMemo(() => { + return ( + datasets?.map(({ attributes }) => attributes?.layers?.data?.map(({ id }) => id))?.flat() || [] + ); + }, [datasets]); + + const numActiveDatasetsLayers = useMemo(() => { + return ( + (datasetsLayersIds?.filter((id) => activeLayers?.includes(id))?.length ?? 0) + + extraActiveLayers + ); + }, [datasetsLayersIds, activeLayers, extraActiveLayers]); + + const onToggleLayer = useCallback( + (layerId: LayerResponseDataObject['id'], isActive: boolean) => { + setMapLayers( + isActive + ? [...activeLayers, Number(layerId)] + : activeLayers.filter((_layerId) => _layerId !== Number(layerId)) + ); + + // If we don't have layerSettings entries, the view is in its default state; we wish to + // show all legend accordion items expanded by default. + const initialSettings = (() => { + const layerSettingsKeys = Object.keys(layerSettings); + if (layerSettingsKeys.length) return {}; + return Object.assign( + {}, + ...activeLayers.map((layerId) => ({ [layerId]: { expanded: true } })) + ); + })(); + + setLayerSettings((prev) => ({ + ...initialSettings, + ...prev, + [layerId]: { + ...prev[layerId], + expanded: true, + }, + })); + }, + [activeLayers, layerSettings, setLayerSettings, setMapLayers] + ); + + useEffect(() => { + setOpen(isOpen); + }, [isOpen, tab]); + + const displayNumActiveLayers = !open && numActiveDatasetsLayers > 0; + const noData = !loading && !datasets?.length; + + return ( + + + + {name} + {displayNumActiveLayers && ( + + {numActiveDatasetsLayers} + + )} + + + + + +
    + {loading && {t('loading')}} + {noData && {t('no-data-available')}} + {datasets?.map((dataset) => { + return ( +
    + {showDatasetsNames &&

    {dataset?.attributes?.name}

    } +
      + {dataset.attributes?.layers?.data?.map((layer) => { + const isActive = + activeLayers.findIndex((layerId) => layerId === layer.id) !== -1; + const onCheckedChange = onToggleLayer.bind(null, layer.id) as ( + isActive: boolean + ) => void; + const metadata = layer?.attributes?.metadata; + + return ( +
    • + + + + + {metadata?.description && ( + + )} +
    • + ); + })} + <>{children} +
    +
    + ); + })} +
    +
    +
    + ); +}; + +LayersGroup.messages = ['containers.map-sidebar-layers-panel', ...TooltipButton.messages]; + +export default LayersGroup; diff --git a/frontend/src/containers/map/sidebar/main-panel/location-selector/index.tsx b/frontend/src/containers/map/sidebar/main-panel/location-selector/index.tsx index f2e21395..3375635f 100644 --- a/frontend/src/containers/map/sidebar/main-panel/location-selector/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/location-selector/index.tsx @@ -26,17 +26,19 @@ export const FILTERS = { }; const BUTTON_CLASSES = - 'font-mono text-xs px-0 font-semibold no-underline normal-case ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2'; + 'font-mono text-xs px-0 font-semibold no-underline normal-case ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 transition-all'; type LocationSelectorProps = { className?: HTMLDivElement['className']; theme: 'orange' | 'blue'; + size?: 'default' | 'small'; onChange: (locationCode: string) => void; }; const LocationSelector: FCWithMessages = ({ className, theme, + size = 'default', onChange, }) => { const t = useTranslations('containers.map-sidebar-main-panel'); @@ -51,11 +53,22 @@ const LocationSelector: FCWithMessages = ({ const [locationsFilter, setLocationsFilter] = useState('all'); const [locationPopoverOpen, setLocationPopoverOpen] = useState(false); + const locationNameField = useMemo(() => { + let res = 'name'; + if (locale === 'es') { + res = 'name_es'; + } + if (locale === 'fr') { + res = 'name_fr'; + } + return res; + }, [locale]); + const { data: locationsData } = useGetLocations( { locale, 'pagination[limit]': -1, - sort: 'name:asc', + sort: `${locationNameField}:asc`, }, { query: { @@ -106,7 +119,11 @@ const LocationSelector: FCWithMessages = ({
    - @@ -128,7 +145,7 @@ const LocationSelector: FCWithMessages = ({ {locationCode !== 'GLOB' && ( ); }; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/index.tsx index fcdba162..409b1926 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/index.tsx @@ -1,74 +1,185 @@ -import { useMemo } from 'react'; +import { useCallback, useEffect, useMemo, useRef } from 'react'; import { useRouter } from 'next/router'; -import { useLocale } from 'next-intl'; +import { BBox } from '@turf/turf'; +import { useAtom } from 'jotai'; +import { useLocale, useTranslations } from 'next-intl'; +import { CustomMapProps } from '@/components/map/types'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { PAGES } from '@/constants/pages'; import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; +import { bboxLocationAtom } from '@/containers/map/store'; import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import useScrollPosition from '@/hooks/use-scroll-position'; import { cn } from '@/lib/classnames'; +import { combineBoundingBoxes } from '@/lib/utils/geo'; import { FCWithMessages } from '@/types'; import { useGetLocations } from '@/types/generated/location'; +import { Location } from '@/types/generated/strapi.schemas'; import LocationSelector from '../../location-selector'; import CountriesList from './countries-list'; import DetailsButton from './details-button'; -import DetailsWidgets from './widgets'; +import MarineWidgets from './widgets/marine-widgets'; +import SummaryWidgets from './widgets/summary-widgets'; +import TerrestrialWidgets from './widgets/terrestrial-widgets'; const SidebarDetails: FCWithMessages = () => { const locale = useLocale(); + const t = useTranslations('containers.map-sidebar-main-panel'); + + const containerRef = useRef(null); + const containerScroll = useScrollPosition(containerRef); const { push, query: { locationCode = 'GLOB' }, } = useRouter(); - const [{ showDetails }] = useSyncMapContentSettings(); const searchParams = useMapSearchParams(); + const [{ tab }, setSettings] = useSyncMapContentSettings(); + const [, setLocationBBox] = useAtom(bboxLocationAtom); + const { data: locationsData } = useGetLocations({ locale, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['name', 'name_es', 'name_fr', 'marine_bounds', 'terrestrial_bounds'], filters: { code: locationCode, }, - populate: 'members', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + members: { + fields: ['code', 'name', 'name_es', 'name_fr'], + }, + }, }); + const locationNameField = useMemo(() => { + let res = 'name'; + if (locale === 'es') { + res = 'name_es'; + } + if (locale === 'fr') { + res = 'name_fr'; + } + return res; + }, [locale]); + + const locationBounds = useMemo(() => { + const { terrestrial_bounds, marine_bounds } = + locationsData?.data[0]?.attributes ?? ({} as Location); + + if (tab === 'terrestrial') { + return terrestrial_bounds; + } + + if (tab === 'marine') { + return marine_bounds; + } + + if (terrestrial_bounds === undefined && marine_bounds === undefined) { + return null; + } + + return combineBoundingBoxes( + // Falling back to the marine bounds because some locations don't have terrestrial bounds e.g. + // ABJN and Gibraltar + (terrestrial_bounds ?? marine_bounds) as BBox, + // Falling back to the terrestrial bounds because some locations don't have marine bounds e.g. + // any country without coast + (marine_bounds ?? terrestrial_bounds) as BBox + ); + }, [locationsData, tab]); + const memberCountries = useMemo(() => { return locationsData?.data[0]?.attributes?.members?.data?.map(({ attributes }) => ({ code: attributes?.code, - name: attributes?.name, + name: attributes?.[locationNameField], })); - }, [locationsData?.data]); + }, [locationsData?.data, locationNameField]); - const handleLocationSelected = (locationCode) => { - push(`${PAGES.progressTracker}/${locationCode}?${searchParams.toString()}`); - }; + const handleLocationSelected = useCallback( + (locationCode) => { + push(`${PAGES.progressTracker}/${locationCode}?${searchParams.toString()}`); + }, + [push, searchParams] + ); + + const handleTabChange = useCallback( + (tab: string) => setSettings((prevSettings) => ({ ...prevSettings, tab })), + [setSettings] + ); + + // Scroll to the top when the tab changes (whether that's initiated by clicking on the tab trigger + // or programmatically via `setSettings` in a different component) or when the location changes + useEffect(() => { + containerRef.current?.scrollTo({ top: 0 }); + }, [tab, locationCode]); + + // Zoom the map to the location's bounds (terrestrial bounds, marine bounds or both) + useEffect(() => { + if (locationBounds) { + setLocationBBox(locationBounds as CustomMapProps['bounds']['bbox']); + } + }, [setLocationBBox, locationBounds]); return ( - <> -
    -
    -

    {locationsData?.data[0]?.attributes?.name}

    - - - -
    -
    +
    0, + })} + > +

    0, })} > - -

    + {locationsData?.data[0]?.attributes?.[locationNameField]} + + 0 ? 'small' : 'default'} + onChange={handleLocationSelected} + /> + + + {t('summary')} + {t('terrestrial')} + {t('marine')} + +
    +
    + + + + + + + + + +
    +
    +
    - + ); }; @@ -77,7 +188,8 @@ SidebarDetails.messages = [ ...LocationSelector.messages, ...CountriesList.messages, ...DetailsButton.messages, - ...DetailsWidgets.messages, + ...SummaryWidgets.messages, + ...MarineWidgets.messages, ]; export default SidebarDetails; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/establishment-stages/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/establishment-stages/index.tsx deleted file mode 100644 index a352f46f..00000000 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/establishment-stages/index.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import { useMemo } from 'react'; - -import { groupBy } from 'lodash-es'; -import { useLocale } from 'next-intl'; - -import HorizontalBarChart from '@/components/charts/horizontal-bar-chart'; -import Widget from '@/components/widget'; -import { useGetMpaaEstablishmentStageStats } from '@/types/generated/mpaa-establishment-stage-stat'; -import type { - LocationGroupsDataItemAttributes, - MpaaEstablishmentStageListResponseDataItem, -} from '@/types/generated/strapi.schemas'; - -type EstablishmentStagesWidgetProps = { - location: LocationGroupsDataItemAttributes; -}; - -const PATTERNS = { - 'proposed-committed': '/images/data-tool/chart-bgs/dots.svg', - implemented: '/images/data-tool/chart-bgs/crosses.svg', - 'actively-managed': '/images/data-tool/chart-bgs/dashes.svg', - designated: '/images/data-tool/chart-bgs/arrows.svg', -}; - -const EstablishmentStagesWidget: React.FC = ({ location }) => { - const locale = useLocale(); - - // Default params: filter by location - const defaultQueryParams = { - filters: { - location: { - code: location.code, - }, - }, - }; - - // Find last updated in order to display the last data update - const { data: dataLastUpdate, isFetching: isFetchingDataLastUpdate } = - useGetMpaaEstablishmentStageStats( - { - ...defaultQueryParams, - locale, - sort: 'updatedAt:desc', - 'pagination[limit]': 1, - }, - { - query: { - select: ({ data }) => data?.[0]?.attributes?.updatedAt, - placeholderData: { data: null }, - refetchOnWindowFocus: false, - }, - } - ); - - // Get establishment stages by location - const { - data: { data: establishmentStagesData }, - isFetching: isFetchingEstablishmentStagesData, - } = useGetMpaaEstablishmentStageStats( - { - ...defaultQueryParams, - locale, - populate: 'mpaa_establishment_stage,mpaa_establishment_stage.localizations', - 'pagination[limit]': -1, - }, - { - query: { - select: ({ data }) => ({ data }), - placeholderData: { data: [] }, - refetchOnWindowFocus: false, - }, - } - ); - - // Merge OECM and MPA stats - const mergedEstablishmentStagesStats = useMemo(() => { - if (!establishmentStagesData.length) return []; - - const groupedByStage = groupBy( - establishmentStagesData, - 'attributes.mpaa_establishment_stage.data.attributes.slug' - ); - - return Object.keys(groupedByStage).map((establishmentStage) => { - const entries = groupedByStage[establishmentStage]; - const totalArea = entries.reduce((acc, entry) => acc + entry.attributes.area, 0); - - let establishmentStageData = - groupedByStage[establishmentStage]?.[0]?.attributes?.mpaa_establishment_stage?.data - ?.attributes; - if (establishmentStageData.locale !== locale) { - establishmentStageData = ( - establishmentStageData.localizations.data as MpaaEstablishmentStageListResponseDataItem[] - ).find((localization) => localization.attributes.locale === locale)?.attributes; - } - - return { - slug: establishmentStageData.slug, - name: establishmentStageData.name, - info: establishmentStageData.info, - area: totalArea, - }; - }); - }, [locale, establishmentStagesData]); - - // Parse data to display in the chart - const widgetChartData = useMemo(() => { - if (!mergedEstablishmentStagesStats.length) return []; - - return mergedEstablishmentStagesStats.map((establishmentStage) => { - return { - title: establishmentStage.name, - slug: establishmentStage.slug, - ...(PATTERNS[establishmentStage.slug] && { - background: `border-box #fff url(${PATTERNS[establishmentStage.slug]})`, - }), - totalArea: location.totalMarineArea, - protectedArea: establishmentStage.area, - info: establishmentStage.info, - }; - }); - }, [location, mergedEstablishmentStagesStats]); - - const noData = !widgetChartData.length; - const loading = isFetchingEstablishmentStagesData || isFetchingDataLastUpdate; - - return ( - - {widgetChartData.map((chartData) => ( - - ))} - - ); -}; - -export default EstablishmentStagesWidget; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/fishing-protection/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/fishing-protection/index.tsx index fc9cc76d..dfcd7467 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/fishing-protection/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/fishing-protection/index.tsx @@ -5,6 +5,7 @@ import { useLocale, useTranslations } from 'next-intl'; import HorizontalBarChart from '@/components/charts/horizontal-bar-chart'; import Widget from '@/components/widget'; import { FISHING_PROTECTION_CHART_COLORS } from '@/constants/fishing-protection-chart-colors'; +import { FCWithMessages } from '@/types'; import { useGetDataInfos } from '@/types/generated/data-info'; import { useGetLocations } from '@/types/generated/location'; import type { LocationGroupsDataItemAttributes } from '@/types/generated/strapi.schemas'; @@ -13,7 +14,7 @@ type FishingProtectionWidgetProps = { location: LocationGroupsDataItemAttributes; }; -const FishingProtectionWidget: React.FC = ({ location }) => { +const FishingProtectionWidget: FCWithMessages = ({ location }) => { const t = useTranslations('containers.map-sidebar-main-panel'); const locale = useLocale(); @@ -23,18 +24,12 @@ const FishingProtectionWidget: React.FC = ({ locat isFetching: isFetchingProtectionLevelsData, } = useGetLocations( { - // We will use the data from the `localizations` field because the model “Fishing Protection - // Level Stats” is not localised and its relationship to the “Location” model only points to - // a specific localised version. As such, we're forced to load all the locales of the - // “Location” model and then figure out which version has the relation to the other model. - locale: 'en', filters: { code: location?.code, }, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore populate: { - // This part if for the English version only fishing_protection_level_stats: { filters: { fishing_protection_level: { @@ -45,21 +40,6 @@ const FishingProtectionWidget: React.FC = ({ locat fishing_protection_level: '*', }, }, - // This part is for the Spanish and French versions - localizations: { - populate: { - fishing_protection_level_stats: { - filters: { - fishing_protection_level: { - slug: 'highly', - }, - }, - populate: { - fishing_protection_level: '*', - }, - }, - }, - }, }, 'pagination[limit]': -1, }, @@ -88,7 +68,8 @@ const FishingProtectionWidget: React.FC = ({ locat ? { info: data[0]?.attributes?.content, sources: data[0]?.attributes?.data_sources?.data?.map( - ({ attributes: { title, url } }) => ({ + ({ id, attributes: { title, url } }) => ({ + id, title, url, }) @@ -121,16 +102,8 @@ const FishingProtectionWidget: React.FC = ({ locat }; }; - const fishingProtectionLevelStats = [ - protectionLevelsData[0]?.attributes?.fishing_protection_level_stats.data, - ...(protectionLevelsData[0]?.attributes?.localizations.data?.map( - // The types below are wrong. There is definitely an `attributes` key inside - // `localizations`. - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - (localization) => localization.attributes.fishing_protection_level_stats.data - ) ?? []), - ].find((data) => data?.length); + const fishingProtectionLevelStats = + protectionLevelsData[0]?.attributes?.fishing_protection_level_stats.data; const parsedFishingProtectionLevelData = fishingProtectionLevelStats?.map((stats) => { const data = stats?.attributes; @@ -141,15 +114,25 @@ const FishingProtectionWidget: React.FC = ({ locat return parsedFishingProtectionLevelData?.filter(Boolean) ?? []; }, [t, protectionLevelsData, metadata]); - const noData = !widgetChartData.length; - const loading = isFetchingProtectionLevelsData; + const noData = useMemo(() => { + if (!widgetChartData.length) { + return true; + } + + const emptyValues = widgetChartData.every((d) => d.totalArea === Infinity); + if (emptyValues) { + return true; + } + + return false; + }, [widgetChartData]); return ( {widgetChartData.map((chartData) => ( = ({ locat ); }; +FishingProtectionWidget.messages = [ + 'containers.map-sidebar-main-panel', + ...Widget.messages, + ...HorizontalBarChart.messages, +]; + export default FishingProtectionWidget; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/habitat/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/habitat/index.tsx index 9aba9c0e..5aed116a 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/habitat/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/habitat/index.tsx @@ -3,6 +3,7 @@ import { useLocale, useTranslations } from 'next-intl'; import HorizontalBarChart from '@/components/charts/horizontal-bar-chart'; import Widget from '@/components/widget'; import { HABITAT_CHART_COLORS } from '@/constants/habitat-chart-colors'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { FCWithMessages } from '@/types'; import { useGetDataInfos } from '@/types/generated/data-info'; import { useGetHabitatStats } from '@/types/generated/habitat-stat'; @@ -19,77 +20,92 @@ const HabitatWidget: FCWithMessages = ({ location }) => { const t = useTranslations('containers.map-sidebar-main-panel'); const locale = useLocale(); - const defaultQueryParams = { - filters: { - location: { - code: location?.code, - }, - }, - }; - - const { data: dataLastUpdate, isFetching: isFetchingDataLastUpdate } = useGetHabitatStats( - { - ...defaultQueryParams, - locale, - fields: 'updatedAt', - sort: 'updatedAt:desc', - 'pagination[limit]': 1, - }, - { - query: { - enabled: Boolean(location?.code), - select: ({ data }) => data?.[0]?.attributes?.updatedAt, - placeholderData: { data: null }, - refetchOnWindowFocus: false, - }, - } - ); + const [{ tab }] = useSyncMapContentSettings(); - const { data: habitatMetadatas } = useGetDataInfos( + const { data: habitatMetadatas } = useGetDataInfos< + { slug: string; info: string; sources?: { id: number; title: string; url: string }[] }[] + >( { locale, filters: { - slug: [ - 'cold-water corals', - 'warm-water corals', - 'mangroves', - 'seagrasses', - 'saltmarshes', - 'mangroves', - 'seamounts', - ], + slug: Object.keys(HABITAT_CHART_COLORS), }, - populate: 'data_sources', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + data_sources: { + fields: ['title', 'url'], + }, + }, + sort: 'updatedAt:desc', }, { query: { select: ({ data }) => - data - ? data.map((item) => ({ - slug: item.attributes.slug, - info: item.attributes.content, - sources: item.attributes?.data_sources?.data?.map( - ({ attributes: { title, url } }) => ({ - title, - url, - }) - ), - })) - : undefined, + data?.map((item) => ({ + slug: item.attributes.slug, + info: item.attributes.content, + sources: item.attributes.data_sources?.data?.map( + ({ id, attributes: { title, url } }) => ({ + id, + title, + url, + }) + ), + })) ?? [], }, } ); - const { data: widgetChartData, isFetching: isFetchingHabitatStatsData } = useGetHabitatStats( + const { data: chartData, isFetching } = useGetHabitatStats< + { + title: string; + slug: string; + background: string; + totalArea: number; + protectedArea: number; + info?: string; + sources?: { id: number; title: string; url: string }[]; + updatedAt: string; + }[] + >( { - ...defaultQueryParams, locale, - populate: 'habitat,habitat.localizations', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + habitat: { + // This part is for the English version only + populate: { + // This part is for the Spanish and French versions + localizations: { + fields: ['slug', 'name', 'locale'], + }, + }, + }, + }, 'pagination[limit]': -1, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['protected_area', 'total_area', 'updatedAt'], + filters: { + location: { + code: location?.code, + }, + environment: { + slug: { + $eq: tab === 'marine' ? tab : 'terrestrial', + }, + }, + }, }, { query: { select: ({ data }) => { + if (!data) { + return []; + } + const parsedData = data.map((entry) => { const stats = entry?.attributes; @@ -100,66 +116,41 @@ const HabitatWidget: FCWithMessages = ({ location }) => { )?.attributes; } - const metadata = habitatMetadatas?.find(({ slug }) => slug === habitat.slug); + const metadata = habitatMetadatas?.find(({ slug }) => slug === habitat?.slug); return { - title: habitat.name, - slug: habitat.slug, - background: HABITAT_CHART_COLORS[habitat.slug], - totalArea: stats.totalArea, - protectedArea: stats.protectedArea, + title: habitat?.name, + slug: habitat?.slug, + background: HABITAT_CHART_COLORS[habitat?.slug], + totalArea: stats.total_area, + protectedArea: stats.protected_area, info: metadata?.info, sources: metadata?.sources, + updatedAt: stats.updatedAt, }; }); - return parsedData.reverse(); + return parsedData + .sort((d1, d2) => { + const keys = Object.keys(HABITAT_CHART_COLORS); + return keys.indexOf(d1.slug) - keys.indexOf(d2.slug); + }) + .filter(({ totalArea }) => totalArea !== 0); }, - placeholderData: { data: [] }, + placeholderData: [], refetchOnWindowFocus: false, }, } ); - // const { data: metadataWidget } = useGetDataInfos( - // { - // locale, - // filters: { - // slug: 'habitats-widget', - // }, - // populate: 'data_sources', - // }, - // { - // query: { - // select: ({ data }) => - // data[0] - // ? { - // info: data[0].attributes.content, - // sources: data[0].attributes?.data_sources?.data?.map( - // ({ attributes: { title, url } }) => ({ - // title, - // url, - // }) - // ), - // } - // : undefined, - // }, - // } - // ); - - const noData = !widgetChartData.length; - const loading = isFetchingHabitatStatsData || isFetchingDataLastUpdate; - return ( - {widgetChartData.map((chartData) => ( + {chartData.map((chartData) => ( = const t = useTranslations('containers.map-sidebar-main-panel'); const locale = useLocale(); - const defaultQueryParams = { - filters: { - location: { - code: location?.code || 'GLOB', - }, - }, - }; - - const { data: dataLastUpdate, isFetching: isFetchingDataLastUpdate } = - useGetProtectionCoverageStats( - { - ...defaultQueryParams, - locale, - sort: 'updatedAt:desc', - 'pagination[limit]': 1, - }, - { - query: { - enabled: Boolean(location?.code), - select: ({ data }) => data?.[0]?.attributes?.updatedAt, - placeholderData: { data: null }, - refetchOnWindowFocus: false, - }, - } - ); + const [{ tab }, setSettings] = useSyncMapContentSettings(); - const { - data: { data: protectionStatsData }, - isFetching: isFetchingProtectionStatsData, - } = useGetProtectionCoverageStats( + const { data, isFetching } = useGetProtectionCoverageStats< + ProtectionCoverageStatListResponseDataItem[] + >( { - ...defaultQueryParams, locale, - populate: '*', - // @ts-expect-error this is an issue with Orval typing - 'sort[year]': 'asc', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: ['code', 'total_marine_area', 'marine_target', 'marine_target_year'], + }, + environment: { + fields: ['slug'], + }, + }, + sort: 'year:asc', 'pagination[limit]': -1, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['year', 'protected_area', 'updatedAt'], + filters: { + location: { + code: { + $eq: location?.code || 'GLOB', + }, + }, + environment: { + slug: { + $eq: 'marine', + }, + }, + }, }, { query: { - select: ({ data }) => ({ data }), - placeholderData: { data: [] }, + select: ({ data }) => data ?? [], + placeholderData: [], refetchOnWindowFocus: false, }, } ); - const mergedProtectionStats = useMemo(() => { - if (!protectionStatsData.length) return null; + const aggregatedData = useMemo(() => { + if (!data.length) return []; - const groupedByYear = groupBy(protectionStatsData, 'attributes.year'); + const groupedByYear = groupBy(data, 'attributes.year'); return Object.keys(groupedByYear).map((year) => { const entries = groupedByYear[year]; - const protectedArea = entries.reduce( - (acc, entry) => acc + entry.attributes.cumSumProtectedArea, - 0 - ); + const protectedArea = entries[0].attributes.protected_area; return { year: Number(year), protectedArea, }; }); - }, [protectionStatsData]); + }, [data]); const { data: metadata } = useGetDataInfos( { @@ -101,7 +100,8 @@ const MarineConservationWidget: FCWithMessages = ? { info: data[0].attributes.content, sources: data[0].attributes?.data_sources?.data?.map( - ({ attributes: { title, url } }) => ({ + ({ id, attributes: { title, url } }) => ({ + id, title, url, }) @@ -113,11 +113,10 @@ const MarineConservationWidget: FCWithMessages = ); const stats = useMemo(() => { - if (!mergedProtectionStats) return null; + if (!aggregatedData.length) return null; - const totalArea = location.totalMarineArea; - const lastYearData = mergedProtectionStats[mergedProtectionStats.length - 1]; - const { protectedArea } = lastYearData; + const totalArea = Number(location.total_marine_area); + const { protectedArea } = aggregatedData[aggregatedData.length - 1]; const percentageFormatted = formatPercentage(locale, (protectedArea / totalArea) * 100, { displayPercentageSign: false, }); @@ -128,16 +127,18 @@ const MarineConservationWidget: FCWithMessages = protectedPercentage: percentageFormatted, protectedArea: protectedAreaFormatted, totalArea: totalAreaFormatted, + target: location.marine_target, + targetYear: location.marine_target_year, }; - }, [locale, location, mergedProtectionStats]); + }, [locale, location, aggregatedData]); const chartData = useMemo(() => { - if (!mergedProtectionStats?.length) return []; + if (!aggregatedData.length) return []; - const data = mergedProtectionStats.map((entry, index) => { - const isLastYear = index === mergedProtectionStats.length - 1; + const data = aggregatedData.map((entry, index) => { + const isLastYear = index + 1 === aggregatedData.length; const { year, protectedArea } = entry; - const percentage = (protectedArea * 100) / location.totalMarineArea; + const percentage = (protectedArea * 100) / Number(location.total_marine_area); return { // We only want to show up to 55%, so we'll cap the percentage here @@ -145,25 +146,34 @@ const MarineConservationWidget: FCWithMessages = percentage: percentage > 55 ? 55 : percentage, year, active: isLastYear, - totalArea: location.totalMarineArea, + totalArea: Number(location.total_marine_area), protectedArea, future: false, }; }); return data; - }, [location, mergedProtectionStats]); + }, [location, aggregatedData]); + + const noData = useMemo(() => { + if (!chartData.length) { + return true; + } - const noData = !chartData.length; - const loading = isFetchingProtectionStatsData || isFetchingDataLastUpdate; - const displayTarget = location?.code === 'GLOB'; + const emptyValues = chartData.every((d) => d.percentage === 0); + if (emptyValues) { + return true; + } + + return false; + }, [chartData]); return ( @@ -188,9 +198,24 @@ const MarineConservationWidget: FCWithMessages = )} + {tab !== 'marine' && ( + + )} ); }; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/marine-widgets.tsx similarity index 58% rename from frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/index.tsx rename to frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/marine-widgets.tsx index e6cce491..b46fe3fd 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/marine-widgets.tsx @@ -12,9 +12,7 @@ import HabitatWidget from './habitat'; import MarineConservationWidget from './marine-conservation'; import ProtectionTypesWidget from './protection-types'; -// import EstablishmentStagesWidget from './establishment-stages'; - -const DetailsWidgets: FCWithMessages = () => { +const MarineWidgets: FCWithMessages = () => { const locale = useLocale(); const { @@ -23,12 +21,24 @@ const DetailsWidgets: FCWithMessages = () => { const [{ showDetails }] = useSyncMapContentSettings(); - const { data: locationsData } = useGetLocations({ - locale, - filters: { - code: locationCode, + const { data: locationData } = useGetLocations( + { + locale, + filters: { + code: locationCode, + }, + 'pagination[limit]': 1, }, - }); + { + query: { + select: ({ data }) => data[0]?.attributes ?? null, + }, + } + ); + + if (!locationData) { + return null; + } return (
    { 'pb-40': showDetails, })} > - - - - {/* */} - + + + +
    ); }; -DetailsWidgets.messages = [ +MarineWidgets.messages = [ ...MarineConservationWidget.messages, ...ProtectionTypesWidget.messages, + ...FishingProtectionWidget.messages, ...HabitatWidget.messages, ]; -export default DetailsWidgets; +export default MarineWidgets; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/protection-types/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/protection-types/index.tsx index c4bd363a..55cb6020 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/protection-types/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/protection-types/index.tsx @@ -61,7 +61,8 @@ const ProtectionTypesWidget: FCWithMessages = ({ loc ? { info: data[0]?.attributes?.content, sources: data[0]?.attributes?.data_sources?.data?.map( - ({ attributes: { title, url } }) => ({ + ({ id, attributes: { title, url } }) => ({ + id, title, url, }) @@ -96,7 +97,7 @@ const ProtectionTypesWidget: FCWithMessages = ({ loc title: mpaaProtectionLevel?.name, slug: mpaaProtectionLevel?.slug, background: barColor, - totalArea: location?.totalMarineArea, + totalArea: Number(location?.total_marine_area), protectedArea: protectionLevelStats?.area, info: metadata?.info, sources: metadata?.sources, @@ -116,6 +117,7 @@ const ProtectionTypesWidget: FCWithMessages = ({ loc title={t('marine-conservation-protection-levels')} lastUpdated={lastUpdated} noData={noData} + noDataMessage={t('not-assessed')} loading={loading} > {widgetChartData.map((chartData) => ( diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/summary-widgets.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/summary-widgets.tsx new file mode 100644 index 00000000..9bc3a40b --- /dev/null +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/summary-widgets.tsx @@ -0,0 +1,56 @@ +import { useRouter } from 'next/router'; + +import { useLocale } from 'next-intl'; + +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import { cn } from '@/lib/classnames'; +import { FCWithMessages } from '@/types'; +import { useGetLocations } from '@/types/generated/location'; + +import MarineConservationWidget from './marine-conservation'; +import TerrestrialConservationWidget from './terrestrial-conservation'; + +const SummaryWidgets: FCWithMessages = () => { + const locale = useLocale(); + + const { + query: { locationCode = 'GLOB' }, + } = useRouter(); + + const [{ showDetails }] = useSyncMapContentSettings(); + + const { data: locationData } = useGetLocations( + { + locale, + filters: { + code: locationCode, + }, + 'pagination[limit]': 1, + }, + { + query: { + select: ({ data }) => data[0]?.attributes ?? null, + }, + } + ); + + if (!locationData) { + return null; + } + + return ( +
    + + +
    + ); +}; + +SummaryWidgets.messages = [...MarineConservationWidget.messages]; + +export default SummaryWidgets; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-conservation/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-conservation/index.tsx new file mode 100644 index 00000000..43bd437e --- /dev/null +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-conservation/index.tsx @@ -0,0 +1,246 @@ +import { useMemo } from 'react'; + +import { useAtom } from 'jotai'; +import { groupBy } from 'lodash-es'; +import { useLocale, useTranslations } from 'next-intl'; + +import ConservationChart from '@/components/charts/conservation-chart'; +import { Button } from '@/components/ui/button'; +import Icon from '@/components/ui/icon'; +import Widget from '@/components/widget'; +import { terrestrialDataDisclaimerDialogAtom } from '@/containers/map/store'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import { formatKM } from '@/lib/utils/formats'; +import { formatPercentage } from '@/lib/utils/formats'; +import Notification from '@/styles/icons/notification.svg'; +import { FCWithMessages } from '@/types'; +import { useGetDataInfos } from '@/types/generated/data-info'; +import { useGetProtectionCoverageStats } from '@/types/generated/protection-coverage-stat'; +import type { + LocationGroupsDataItemAttributes, + ProtectionCoverageStatListResponseDataItem, +} from '@/types/generated/strapi.schemas'; + +type TerrestrialConservationWidgetProps = { + location: LocationGroupsDataItemAttributes; +}; + +const TerrestrialConservationWidget: FCWithMessages = ({ + location, +}) => { + const t = useTranslations('containers.map-sidebar-main-panel'); + const locale = useLocale(); + + const [{ tab }, setSettings] = useSyncMapContentSettings(); + + const [, setDisclaimerDialogOpen] = useAtom(terrestrialDataDisclaimerDialogAtom); + + const { data, isFetching } = useGetProtectionCoverageStats< + ProtectionCoverageStatListResponseDataItem[] + >( + { + locale, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: ['code', 'total_terrestrial_area'], + }, + environment: { + fields: ['slug'], + }, + }, + sort: 'year:asc', + 'pagination[limit]': -1, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['year', 'protected_area', 'updatedAt'], + filters: { + location: { + code: { + $eq: location?.code || 'GLOB', + }, + }, + environment: { + slug: { + $eq: 'terrestrial', + }, + }, + }, + }, + { + query: { + select: ({ data }) => data ?? [], + placeholderData: [], + refetchOnWindowFocus: false, + }, + } + ); + + const aggregatedData = useMemo(() => { + if (!data.length) return []; + + const groupedByYear = groupBy(data, 'attributes.year'); + + return Object.keys(groupedByYear).map((year) => { + const entries = groupedByYear[year]; + const protectedArea = entries[0].attributes.protected_area; + + return { + year: Number(year), + protectedArea, + }; + }); + }, [data]); + + const { data: metadata } = useGetDataInfos( + { + locale, + filters: { + slug: 'coverage-widget', + }, + populate: 'data_sources', + }, + { + query: { + select: ({ data }) => + data[0] + ? { + info: data[0].attributes.content, + sources: data[0].attributes?.data_sources?.data?.map( + ({ id, attributes: { title, url } }) => ({ + id, + title, + url, + }) + ), + } + : undefined, + }, + } + ); + + const stats = useMemo(() => { + if (!aggregatedData.length) return null; + + const totalArea = Number(location.total_terrestrial_area); + const { protectedArea } = aggregatedData[aggregatedData.length - 1]; + const percentageFormatted = formatPercentage(locale, (protectedArea / totalArea) * 100, { + displayPercentageSign: false, + }); + const protectedAreaFormatted = formatKM(locale, protectedArea); + const totalAreaFormatted = formatKM(locale, totalArea); + + return { + protectedPercentage: percentageFormatted, + protectedArea: protectedAreaFormatted, + totalArea: totalAreaFormatted, + }; + }, [locale, location, aggregatedData]); + + const chartData = useMemo(() => { + if (!aggregatedData.length) return []; + + const data = aggregatedData.map((entry, index) => { + const isLastYear = index + 1 === aggregatedData.length; + const { year, protectedArea } = entry; + const percentage = (protectedArea * 100) / Number(location.total_terrestrial_area); + + return { + // We only want to show up to 55%, so we'll cap the percentage here + // Some of the data seems incorrect; this is a quick fix in order to not blow the chart + percentage: percentage > 55 ? 55 : percentage, + year, + active: isLastYear, + totalArea: Number(location.total_terrestrial_area), + protectedArea, + future: false, + }; + }); + + return data; + }, [location, aggregatedData]); + + const noData = useMemo(() => { + if (!chartData.length) { + return true; + } + + const emptyValues = chartData.every((d) => d.percentage === 0); + if (emptyValues) { + return true; + } + + return false; + }, [chartData]); + + return ( + setDisclaimerDialogOpen(true)} + > + + + {t('data-disclaimer')} + + } + > + {stats && ( +
    + + {t.rich('terrestrial-protected-percentage', { + b1: (chunks) => {chunks}, + b2: (chunks) => {chunks}, + percentage: stats?.protectedPercentage, + })} + + + + {t('terrestrial-protected-area', { + protectedArea: stats?.protectedArea, + totalArea: stats?.totalArea, + })} + + +
    + )} + + {tab !== 'terrestrial' && ( + + )} +
    + ); +}; + +TerrestrialConservationWidget.messages = [ + 'containers.map-sidebar-main-panel', + ...Widget.messages, + ...ConservationChart.messages, +]; + +export default TerrestrialConservationWidget; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-widgets.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-widgets.tsx new file mode 100644 index 00000000..3eabeedc --- /dev/null +++ b/frontend/src/containers/map/sidebar/main-panel/panels/details/widgets/terrestrial-widgets.tsx @@ -0,0 +1,57 @@ +import { useRouter } from 'next/router'; + +import { useLocale } from 'next-intl'; + +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import { cn } from '@/lib/classnames'; +import { FCWithMessages } from '@/types'; +import { useGetLocations } from '@/types/generated/location'; + +// import HabitatWidget from './habitat'; +import TerrestrialConservationWidget from './terrestrial-conservation'; + +const TerrestrialWidgets: FCWithMessages = () => { + const locale = useLocale(); + + const { + query: { locationCode = 'GLOB' }, + } = useRouter(); + + const [{ showDetails }] = useSyncMapContentSettings(); + + const { data: locationData } = useGetLocations( + { + locale, + filters: { + code: locationCode, + }, + 'pagination[limit]': 1, + }, + { + query: { + select: ({ data }) => data[0]?.attributes ?? null, + }, + } + ); + + if (!locationData) { + return null; + } + + return ( +
    + + {/* Temporarily hidden due to overestimations caused by the calculation methodology */} + {/* */} +
    + ); +}; + +TerrestrialWidgets.messages = [...TerrestrialConservationWidget.messages]; + +export default TerrestrialWidgets; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx index 2f91b1c2..207d84e1 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx @@ -1,11 +1,13 @@ -import { useRouter } from 'next/router'; +import { useCallback, useEffect, useMemo, useRef } from 'react'; import { useAtomValue } from 'jotai'; import { useTranslations } from 'next-intl'; -import { PAGES } from '@/constants/pages'; -import { useMapSearchParams } from '@/containers/map/content/map/sync-settings'; +import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { modellingAtom } from '@/containers/map/store'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; +import useScrollPosition from '@/hooks/use-scroll-position'; +import { cn } from '@/lib/classnames'; import { FCWithMessages } from '@/types'; import LocationSelector from '../../location-selector'; @@ -17,35 +19,67 @@ import ModellingWidget from './widget'; const SidebarModelling: FCWithMessages = () => { const t = useTranslations('containers.map-sidebar-main-panel'); - const { push } = useRouter(); - const searchParams = useMapSearchParams(); + const containerRef = useRef(null); + const containerScroll = useScrollPosition(containerRef); + const { status: modellingStatus } = useAtomValue(modellingAtom); + const [{ tab }, setSettings] = useSyncMapContentSettings(); + + const showIntro = useMemo(() => modellingStatus === 'idle', [modellingStatus]); + + const handleTabChange = useCallback( + (tab: string) => setSettings((prevSettings) => ({ ...prevSettings, tab })), + [setSettings] + ); - const showIntro = modellingStatus === 'idle'; + // Scroll to the top when the tab changes (whether that's initiated by clicking on the tab trigger + // or programmatically via `setSettings` in a different component) + useEffect(() => { + containerRef.current?.scrollTo({ top: 0 }); + }, [tab]); - const handleLocationSelected = (locationCode) => { - push(`${PAGES.conservationBuilder}/${locationCode}?${searchParams.toString()}`); - }; + // This page doesn't have a summary tab so we force the user to see the terrestrial tab if the + // summary one was active + useEffect(() => { + if (tab === 'summary') { + setSettings((prevSettings) => ({ ...prevSettings, tab: 'terrestrial' })); + } + }, [setSettings, tab]); return ( - <> -
    -
    - {showIntro &&

    {t('conservation-scenarios')}

    } - {!showIntro && ( -
    -

    {t('custom-area')}

    -

    {t('custom-area-description')}

    -
    - )} - - - + +
    +
    +

    0, + })} + > + {showIntro ? t('conservation-scenarios') : t('custom-area')} +

    - {showIntro && } - {!showIntro && } + {!showIntro &&

    {t('custom-area-description')}

    } + + {t('terrestrial')} + {t('marine')} + +
    +
    + + {showIntro && } + {!showIntro && } + + + {showIntro && } + {!showIntro && } + +
    +
    +
    - +
    ); }; diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/modelling-buttons/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/modelling-buttons/index.tsx index 97a88919..a2bd2f40 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/modelling-buttons/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/modelling-buttons/index.tsx @@ -3,6 +3,8 @@ import { useCallback } from 'react'; import { useAtom, useSetAtom } from 'jotai'; import { useResetAtom } from 'jotai/utils'; import { useTranslations } from 'next-intl'; +import { LuTrash2 } from 'react-icons/lu'; +import { RxTransform } from 'react-icons/rx'; import { Button } from '@/components/ui/button'; import { modellingAtom, drawStateAtom } from '@/containers/map/store'; @@ -44,30 +46,32 @@ const ModellingButtons: FCWithMessages = ({ className })
    {status !== 'drawing' && status !== 'success' && ( )} {(status === 'drawing' || status === 'success') && (
    diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/widget/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/widget/index.tsx index 35ee741b..008772d6 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/widget/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/widget/index.tsx @@ -10,13 +10,14 @@ import StackedHorizontalBarChart from '@/components/charts/stacked-horizontal-ba import TooltipButton from '@/components/tooltip-button'; import Widget from '@/components/widget'; import { modellingAtom } from '@/containers/map/store'; +import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; import { cn } from '@/lib/classnames'; import { FCWithMessages } from '@/types'; import { getGetProtectionCoverageStatsQueryOptions, useGetProtectionCoverageStats, } from '@/types/generated/protection-coverage-stat'; -import { Location, ProtectionCoverageStatLocationData } from '@/types/generated/strapi.schemas'; +import { Location } from '@/types/generated/strapi.schemas'; import useTooltips from '../useTooltips'; @@ -44,6 +45,7 @@ const WidgetSectionWidgetTitle: React.FC = ({ tit const WidgetLegend: FCWithMessages = () => { const t = useTranslations('containers.map-sidebar-main-panel'); + const [{ tab }] = useSyncMapContentSettings(); const LEGEND_LINE_CLASSES = 'relative pl-9 font-mono text-xs before:absolute before:left-0 before:top-1/2 before:h-[2px] before:w-[28px] before:-translate-y-1/2'; @@ -52,7 +54,8 @@ const WidgetLegend: FCWithMessages = () => {
    • - {t('marine-existing-conservation')} + {tab === 'marine' && t('marine-existing-conservation')} + {tab === 'terrestrial' && t('terrestrial-existing-conservation')}
    • @@ -68,56 +71,73 @@ const ModellingWidget: FCWithMessages = () => { const t = useTranslations('containers.map-sidebar-main-panel'); const locale = useLocale(); + const [{ tab }] = useSyncMapContentSettings(); + const chartsProps = DEFAULT_CHART_PROPS; const { status: modellingStatus, data: modellingData, - messageError, + errorMessage, } = useAtomValue(modellingAtom); // Tooltips with mapping const tooltips = useTooltips(); - const { - data: globalProtectionStatsData, - }: { - data: { - protectedArea: number; - percentageProtectedArea: number; - totalMarineArea: number; - totalProtectedArea: number; - totalPercentage: number; - totalCustomAreas: number; - totalExistingAreaPercentage: number; - totalCustomAreasPercentage: number; - }; - } = useGetProtectionCoverageStats( + const { data: globalProtectionStatsData } = useGetProtectionCoverageStats<{ + protectedArea: number; + percentageProtectedArea: number; + totalArea: number; + totalProtectedArea: number; + totalPercentage: number; + totalCustomAreas: number; + totalExistingAreaPercentage: number; + totalCustomAreasPercentage: number; + }>( { locale, filters: { location: { code: 'GLOB', }, + is_last_year: { + $eq: true, + }, + environment: { + slug: { + $eq: tab, + }, + }, }, - populate: 'location', - // @ts-expect-error this is an issue with Orval typing - 'sort[year]': 'desc', - 'pagination[limit]': 2, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: ['total_marine_area', 'total_terrestrial_area'], + }, + }, + 'pagination[limit]': 1, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['protected_area'], }, { query: { - enabled: Boolean(modellingData?.locations_area), + enabled: Boolean(modellingData?.locations_area) && ['marine', 'terrestrial'].includes(tab), select: ({ data }) => { if (!data) return null; - const protectedArea = data.reduce( - (acc, entry) => acc + entry.attributes.cumSumProtectedArea, - 0 - ); + const protectedArea = data?.[0].attributes.protected_area ?? 0; - const totalMarineArea = - data?.[0].attributes?.location?.data?.attributes?.totalMarineArea || 0; + const location = data?.[0].attributes?.location?.data?.attributes; + let totalArea; + if (tab === 'marine') { + totalArea = location?.total_marine_area ? Number(location?.total_marine_area) : 0; + } else { + totalArea = location?.total_terrestrial_area + ? Number(location?.total_terrestrial_area) + : 0; + } const totalCustomAreas = modellingData.locations_area.reduce((acc, location) => { return acc + location.protected_area; @@ -125,16 +145,16 @@ const ModellingWidget: FCWithMessages = () => { const totalProtectedArea = protectedArea + totalCustomAreas; // ? percentage of custom protected areas (analysis) - const totalCustomAreasPercentage = (totalCustomAreas / totalMarineArea) * 100; + const totalCustomAreasPercentage = (totalCustomAreas / totalArea) * 100; // ? percentage of existing global protected area - const totalExistingAreaPercentage = (protectedArea / totalMarineArea) * 100; + const totalExistingAreaPercentage = (protectedArea / totalArea) * 100; const totalPercentage = totalCustomAreasPercentage + totalExistingAreaPercentage; return { protectedArea, - percentageProtectedArea: (protectedArea / totalMarineArea) * 100, - totalMarineArea, + percentageProtectedArea: (protectedArea / totalArea) * 100, + totalArea, totalProtectedArea, totalPercentage, totalCustomAreas, @@ -156,37 +176,54 @@ const ModellingWidget: FCWithMessages = () => { location: { code: location.code, }, + is_last_year: { + $eq: true, + }, + environment: { + slug: { + $eq: tab, + }, + }, }, - populate: 'location,location.localizations', - // @ts-expect-error this is an issue with Orval typing - 'sort[year]': 'desc', + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + populate: { + location: { + fields: [ + 'name', + 'name_es', + 'name_es', + 'code', + 'total_marine_area', + 'total_terrestrial_area', + ], + }, + }, + 'pagination[limit]': 1, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + fields: ['protected_area'], }, { query: { - enabled: Boolean(modellingData?.locations_area), + enabled: + Boolean(modellingData?.locations_area) && ['marine', 'terrestrial'].includes(tab), select: ({ data }) => { if (!data) return null; - const lastYearAvailable = data?.[0]?.attributes?.year; - - const dataFiltered = data.filter( - (entry) => entry.attributes.year === lastYearAvailable - ); - - const protectedArea = dataFiltered.reduce( - (acc, entry) => acc + entry.attributes.cumSumProtectedArea, - 0 - ); + const protectedArea = data?.[0]?.attributes.protected_area ?? 0; - let location = data?.[0]?.attributes?.location?.data?.attributes; - if (location.locale !== locale) { - location = ( - location.localizations.data as ProtectionCoverageStatLocationData[] - ).find((localization) => localization.attributes.locale === locale)?.attributes; - } + const location = data?.[0]?.attributes?.location?.data?.attributes; // ? total extension of location - const totalMarineArea = location?.totalMarineArea || 0; + let totalArea; + if (tab === 'marine') { + totalArea = location?.total_marine_area ? Number(location.total_marine_area) : 0; + } else { + totalArea = location?.total_terrestrial_area + ? Number(location.total_terrestrial_area) + : 0; + } // ? total custom protected area (analysis) const totalCustomArea = modellingData.locations_area.find( @@ -194,9 +231,9 @@ const ModellingWidget: FCWithMessages = () => { ).protected_area; // ? percentage of custom protected area (analysis) - const totalCustomAreaPercentage = (totalCustomArea / totalMarineArea) * 100; + const totalCustomAreaPercentage = (totalCustomArea / totalArea) * 100; // ? percentage of existing protected area - const totalExistingAreaPercentage = (protectedArea / totalMarineArea) * 100; + const totalExistingAreaPercentage = (protectedArea / totalArea) * 100; // ? sum of existing protected area and protected custom area (analysis) const totalProtectedArea = protectedArea + totalCustomArea; @@ -205,7 +242,7 @@ const ModellingWidget: FCWithMessages = () => { return { location, - totalMarineArea, + totalArea, totalProtectedArea, protectedArea, totalExistingAreaPercentage, @@ -228,7 +265,7 @@ const ModellingWidget: FCWithMessages = () => { const nationalLevelContributions: { location: Location; percentageProtectedArea: number; - totalMarineArea: number; + totalArea: number; totalProtectedArea: number; protectedArea: number; totalExistingAreaPercentage: number; @@ -247,9 +284,16 @@ const ModellingWidget: FCWithMessages = () => { [locationQueries] ); - const administrativeBoundaries = nationalLevelContributions?.map( - (contribution) => contribution?.location?.name - ); + const administrativeBoundaries = nationalLevelContributions?.map((contribution) => { + let locationName = contribution.location.name; + if (locale === 'es') { + locationName = contribution.location.name_es; + } + if (locale === 'fr') { + locationName = contribution.location.name_fr; + } + return locationName; + }); return ( { noData={!nationalLevelContributions} loading={loading} error={error} - messageError={messageError} + errorMessage={errorMessage} >
      @@ -279,12 +323,20 @@ const ModellingWidget: FCWithMessages = () => {
      {nationalLevelContributions?.map((contribution) => { + let locationName = contribution.location.name; + if (locale === 'es') { + locationName = contribution.location.name_es; + } + if (locale === 'fr') { + locationName = contribution.location.name_fr; + } + return ( { ([]); export const layersInteractiveIdsAtom = atom([]); -export const bboxLocation = atomWithReset([ +export const bboxLocationAtom = atomWithReset([ -180, -85.5624999997749, 180, 90, ]); export const popupAtom = atom>({}); @@ -33,10 +33,18 @@ export const modellingAtom = atomWithReset<{ active: boolean; status: 'idle' | 'running' | 'success' | 'error'; data: ModellingData; - messageError?: string; + errorMessage?: string; }>({ active: false, status: 'idle', data: null, - messageError: undefined, + errorMessage: undefined, }); + +/** + * Whether the disclaimer dialog should be visible + */ +export const terrestrialDataDisclaimerDialogAtom = atomWithStorage( + 'terrestrial-data-disclaimer-dialog', + true +); diff --git a/frontend/src/containers/map/sync-settings.ts b/frontend/src/containers/map/sync-settings.ts index 97344c51..30c473ef 100644 --- a/frontend/src/containers/map/sync-settings.ts +++ b/frontend/src/containers/map/sync-settings.ts @@ -1,10 +1,9 @@ import { useQueryState } from 'next-usequerystate'; import { parseAsJson } from 'next-usequerystate/parsers'; -const DEFAULT_SYNC_CONTENT_SETTINGS: { - showDetails: boolean; -} = { +export const DEFAULT_SYNC_CONTENT_SETTINGS = { showDetails: false, + tab: 'summary', }; export const useSyncMapContentSettings = () => { diff --git a/frontend/src/hooks/use-scroll-position.ts b/frontend/src/hooks/use-scroll-position.ts new file mode 100644 index 00000000..ac53161b --- /dev/null +++ b/frontend/src/hooks/use-scroll-position.ts @@ -0,0 +1,22 @@ +import { MutableRefObject, useEffect, useState } from 'react'; + +import debounce from 'lodash-es/debounce'; + +export default function useScrollPosition(ref?: MutableRefObject) { + const [position, setPosition] = useState(0); + + useEffect(() => { + let element: HTMLElement = document.body; + if (ref.current) { + element = ref.current; + } + + const onScroll = debounce(() => setPosition(element.scrollTop), 10); + + element.addEventListener('scroll', onScroll); + + return () => element.removeEventListener('scroll', onScroll); + }, [ref]); + + return position; +} diff --git a/frontend/src/layouts/map.tsx b/frontend/src/layouts/map.tsx index 998e6850..f23f9d15 100644 --- a/frontend/src/layouts/map.tsx +++ b/frontend/src/layouts/map.tsx @@ -1,5 +1,8 @@ import { PropsWithChildren, useEffect } from 'react'; +import dynamic from 'next/dynamic'; + +import { useAtomValue } from 'jotai'; import { useResetAtom } from 'jotai/utils'; import { useTranslations } from 'next-intl'; @@ -7,9 +10,20 @@ import Head from '@/components/head'; import Header from '@/components/header'; import Content from '@/containers/map/content'; import Sidebar from '@/containers/map/sidebar'; -import { drawStateAtom, modellingAtom } from '@/containers/map/store'; +import { + drawStateAtom, + modellingAtom, + terrestrialDataDisclaimerDialogAtom, +} from '@/containers/map/store'; import { FCWithMessages } from '@/types'; +const TerrestrialDataDisclaimerDialog = dynamic( + () => import('@/components/terrestrial-data-disclaimer-dialog'), + { + ssr: false, + } +); + const LAYOUT_TYPES = { progress_tracker: 'progress-tracker', conservation_builder: 'conservation-builder', @@ -30,6 +44,7 @@ const MapLayout: FCWithMessages> = ({ const resetModelling = useResetAtom(modellingAtom); const resetDrawState = useResetAtom(drawStateAtom); + const terrestrialDataDisclaimerDialogOpen = useAtomValue(terrestrialDataDisclaimerDialogAtom); useEffect(() => { if (type !== LAYOUT_TYPES.conservation_builder) { @@ -48,6 +63,9 @@ const MapLayout: FCWithMessages> = ({ } description={description} /> + {type === LAYOUT_TYPES.progress_tracker && terrestrialDataDisclaimerDialogOpen && ( + + )}
      diff --git a/frontend/src/lib/json-converter/index.ts b/frontend/src/lib/json-converter/index.ts index dfe41801..a0fce70e 100644 --- a/frontend/src/lib/json-converter/index.ts +++ b/frontend/src/lib/json-converter/index.ts @@ -8,12 +8,9 @@ import { JSONConfiguration, JSONConverter } from '@deck.gl/json/typed'; // LegendTypeChoropleth, // LegendTypeGradient, // } from '@/components/map/legend/item-types'; -import EEZLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/eez'; -import EstablishmentLayerLegend from '@/containers/map/content/map/layers-toolbox/legend/establishment'; -import EEZLayerPopup from '@/containers/map/content/map/popup/eez'; +import BoundariesPopup from '@/containers/map/content/map/popup/boundaries'; import GenericPopup from '@/containers/map/content/map/popup/generic'; import ProtectedAreaPopup from '@/containers/map/content/map/popup/protected-area'; -import RegionsPopup from '@/containers/map/content/map/popup/regions'; import FUNCTIONS from '@/lib/utils'; import { ParamsConfig } from '@/types/layers'; @@ -28,12 +25,9 @@ export const JSON_CONFIGURATION = new JSONConfiguration({ functions: FUNCTIONS, enumerations: {}, reactComponents: { - EEZLayerPopup, - EEZLayerLegend, // Deprecated GenericPopup, ProtectedAreaPopup, - RegionsPopup, - EstablishmentLayerLegend, // Deprecated + BoundariesPopup: BoundariesPopup, // LegendTypeBasic, // LegendTypeChoropleth, // LegendTypeGradient, diff --git a/frontend/src/lib/utils/formats.ts b/frontend/src/lib/utils/formats.ts index d5801ab6..f3e5b7df 100644 --- a/frontend/src/lib/utils/formats.ts +++ b/frontend/src/lib/utils/formats.ts @@ -1,9 +1,16 @@ export function formatPercentage( locale: string, value: number, - options?: Intl.NumberFormatOptions & { displayPercentageSign?: boolean } + options?: Intl.NumberFormatOptions & { + displayPercentageSign?: boolean; + displayZeroValue?: boolean; + } ) { - const { displayPercentageSign = true, ...intlNumberFormatOptions } = options || {}; + const { + displayPercentageSign = true, + displayZeroValue = true, + ...intlNumberFormatOptions + } = options || {}; const v = Intl.NumberFormat(locale === 'en' ? 'en-US' : locale, { minimumFractionDigits: 1, @@ -12,7 +19,7 @@ export function formatPercentage( ...intlNumberFormatOptions, }); - if (value < 0.1 && value > 0) { + if (value < 0.1 && (!displayZeroValue || (displayZeroValue && value > 0))) { return `<${v.format(0.1)}`; } diff --git a/frontend/src/lib/utils/geo.ts b/frontend/src/lib/utils/geo.ts new file mode 100644 index 00000000..1411fb47 --- /dev/null +++ b/frontend/src/lib/utils/geo.ts @@ -0,0 +1,16 @@ +import { BBox } from '@turf/helpers'; + +/** + * Combines two bounding boxes into a single bounding box that encompasses both + * @param bbox1 First bounding box [minLon, minLat, maxLon, maxLat] + * @param bbox2 Second bounding box [minLon, minLat, maxLon, maxLat] + * @returns Combined bounding box + */ +export const combineBoundingBoxes = (bbox1: BBox, bbox2: BBox): BBox => { + return [ + Math.min(bbox1[0], bbox2[0]), + Math.min(bbox1[1], bbox2[1]), + Math.max(bbox1[2], bbox2[2]), + Math.max(bbox1[3], bbox2[3]), + ]; +}; diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx index 5d6cd836..43f51011 100644 --- a/frontend/src/pages/_app.tsx +++ b/frontend/src/pages/_app.tsx @@ -29,7 +29,9 @@ type Props = AppProps & { const App: React.FC = ({ Component, pageProps }: Props) => { // Never ever instantiate the client outside a component, hook or callback as it can leak data // between users - const [queryClient] = useState(() => new QueryClient()); + const [queryClient] = useState( + () => new QueryClient({ defaultOptions: { queries: { refetchOnWindowFocus: false } } }) + ); const router = useRouter(); diff --git a/frontend/src/pages/conservation-builder/[locationCode].tsx b/frontend/src/pages/conservation-builder/index.tsx similarity index 58% rename from frontend/src/pages/conservation-builder/[locationCode].tsx rename to frontend/src/pages/conservation-builder/index.tsx index 352bb84c..157c2f90 100644 --- a/frontend/src/pages/conservation-builder/[locationCode].tsx +++ b/frontend/src/pages/conservation-builder/index.tsx @@ -8,16 +8,11 @@ import MapLayout from '@/layouts/map'; import { fetchTranslations } from '@/lib/i18n'; import mapParamsToSearchParams from '@/lib/mapparams-to-searchparams'; import { FCWithMessages } from '@/types'; -import { getGetLocationsQueryKey, getGetLocationsQueryOptions } from '@/types/generated/location'; -import { LocationListResponse } from '@/types/generated/strapi.schemas'; import { LayoutProps } from '../_app'; const ConservationBuilderPage: FCWithMessages & { - layout: LayoutProps< - { location: { code: string; name: string } }, - ComponentProps - >; + layout: LayoutProps, ComponentProps>; } = () => { return null; }; @@ -34,11 +29,11 @@ ConservationBuilderPage.messages = ['pages.conservation-builder', ...MapLayout.m export const getServerSideProps: GetServerSideProps = async (context) => { const { query } = context; - const { locationCode = 'GLOB', location, mapParams = null } = query; + const { mapParams = null } = query; if (mapParams) { const searchParams = mapParamsToSearchParams(mapParams); - const target = `/${context.locale}/${PAGES.conservationBuilder}/${location}?${searchParams}`; + const target = `/${context.locale}/${PAGES.conservationBuilder}/?${searchParams}`; return { redirect: { @@ -50,32 +45,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => { const queryClient = new QueryClient(); - await queryClient.prefetchQuery({ - ...getGetLocationsQueryOptions({ - locale: context.locale, - filters: { - code: locationCode, - }, - }), - }); - - const locationsData = queryClient.getQueryData( - getGetLocationsQueryKey({ - locale: context.locale, - filters: { - code: locationCode, - }, - }) - ); - - if (!locationsData || !locationsData.data) return { notFound: true }; - return { props: { - location: locationsData.data[0].attributes || { - code: 'GLOB', - name: 'Global', - }, dehydratedState: dehydrate(queryClient), messages: await fetchTranslations(context.locale, ConservationBuilderPage.messages), }, diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index 5b6f305d..e16b3bc1 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -97,28 +97,11 @@ const Home: FCWithMessages = ({ const protectedOceanPercentage = useMemo(() => { const protectionCoverageStatsData = protectionCoverageStats?.data; - if (!protectionCoverageStatsData) return null; + if (!protectionCoverageStatsData?.length) return null; - const lastProtectionDataYear = Math.max( - ...protectionCoverageStatsData.map(({ attributes }) => attributes.year) - ); - - const protectionStats = protectionCoverageStatsData.filter( - ({ attributes }) => attributes.year === lastProtectionDataYear - ); - - const totalMarineArea = - protectionStats[0]?.attributes?.location?.data?.attributes?.totalMarineArea; - - const protectedArea = protectionStats.reduce( - (acc, { attributes }) => acc + attributes?.cumSumProtectedArea, - 0 - ); - const coveragePercentage = (protectedArea * 100) / totalMarineArea; - - if (Number.isNaN(coveragePercentage)) return null; - - return formatPercentage(locale, coveragePercentage, { displayPercentageSign: false }); + return formatPercentage(locale, protectionCoverageStatsData[0].attributes.coverage, { + displayPercentageSign: false, + }); }, [locale, protectionCoverageStats]); return ( @@ -282,12 +265,20 @@ export const getServerSideProps: GetServerSideProps = async (context) => { location: { code: 'GLOB', }, + is_last_year: { + $eq: true, + }, + environment: { + slug: { + $eq: 'marine', + }, + }, }, populate: '*', // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore 'sort[year]': 'desc', - 'pagination[limit]': -1, + 'pagination[limit]': 1, }; await queryClient.prefetchQuery({ diff --git a/frontend/src/pages/progress-tracker/[locationCode].tsx b/frontend/src/pages/progress-tracker/[locationCode].tsx index f800c1c4..582b2571 100644 --- a/frontend/src/pages/progress-tracker/[locationCode].tsx +++ b/frontend/src/pages/progress-tracker/[locationCode].tsx @@ -12,16 +12,27 @@ import { LocationListResponse } from '@/types/generated/strapi.schemas'; import { LayoutProps } from '../_app'; const ProgressTrackerPage: FCWithMessages & { - layout: LayoutProps<{ location: { code: string; name: string } }>; + layout: LayoutProps<{ locale: string; location: { code: string; name: string } }>; } = () => { return null; }; ProgressTrackerPage.layout = { Component: MapLayout, - props: ({ location }) => ({ - title: location?.name, - }), + props: ({ locale, location }) => { + let locationNameField = 'name'; + if (locale === 'es') { + locationNameField = 'name_es'; + } + if (locale === 'fr') { + locationNameField = 'name_fr'; + } + + return { + title: location?.[locationNameField], + type: 'progress-tracker', + }; + }, }; ProgressTrackerPage.messages = ['pages.progress-tracker', ...MapLayout.messages]; @@ -66,10 +77,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => { return { props: { - location: locationsData.data[0].attributes || { - code: 'GLOB', - name: 'Global', - }, + locale: context.locale, + location: locationsData.data[0].attributes, dehydratedState: dehydrate(queryClient), messages: await fetchTranslations(context.locale, ProgressTrackerPage.messages), }, diff --git a/frontend/src/styles/globals.css b/frontend/src/styles/globals.css index 2ec5aa55..598a402d 100644 --- a/frontend/src/styles/globals.css +++ b/frontend/src/styles/globals.css @@ -3,7 +3,7 @@ @tailwind utilities; .mapboxgl-ctrl-bottom-right { - @apply !right-[335px]; + @apply !right-[400px]; } .mapboxgl-ctrl-bottom-left { @apply !right-[345px] !bottom-5 !left-auto; diff --git a/frontend/src/styles/icons/circle-with-dotted-red-stroke.svg b/frontend/src/styles/icons/circle-with-dotted-red-stroke.svg new file mode 100644 index 00000000..90eaa38a --- /dev/null +++ b/frontend/src/styles/icons/circle-with-dotted-red-stroke.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/styles/icons/circle-with-fill.svg b/frontend/src/styles/icons/circle-with-fill.svg new file mode 100644 index 00000000..48a8ecfc --- /dev/null +++ b/frontend/src/styles/icons/circle-with-fill.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/styles/icons/mpa.svg b/frontend/src/styles/icons/circle-without-fill.svg similarity index 50% rename from frontend/src/styles/icons/mpa.svg rename to frontend/src/styles/icons/circle-without-fill.svg index b2095983..51f84ded 100644 --- a/frontend/src/styles/icons/mpa.svg +++ b/frontend/src/styles/icons/circle-without-fill.svg @@ -1,3 +1,3 @@ - + diff --git a/frontend/src/styles/icons/eez.svg b/frontend/src/styles/icons/eez.svg deleted file mode 100644 index f33f06d0..00000000 --- a/frontend/src/styles/icons/eez.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/src/styles/icons/mountain.svg b/frontend/src/styles/icons/mountain.svg new file mode 100644 index 00000000..46a27362 --- /dev/null +++ b/frontend/src/styles/icons/mountain.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/styles/icons/notification.svg b/frontend/src/styles/icons/notification.svg new file mode 100644 index 00000000..189d5271 --- /dev/null +++ b/frontend/src/styles/icons/notification.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/styles/icons/oecm.svg b/frontend/src/styles/icons/oecm.svg deleted file mode 100644 index ed92e609..00000000 --- a/frontend/src/styles/icons/oecm.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/src/styles/icons/selected-eez.svg b/frontend/src/styles/icons/selected-eez.svg deleted file mode 100644 index 0184c5a9..00000000 --- a/frontend/src/styles/icons/selected-eez.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/frontend/src/styles/icons/several-eez.svg b/frontend/src/styles/icons/several-eez.svg deleted file mode 100644 index 768e3bc3..00000000 --- a/frontend/src/styles/icons/several-eez.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/frontend/src/styles/icons/wave.svg b/frontend/src/styles/icons/wave.svg new file mode 100644 index 00000000..8f6926f1 --- /dev/null +++ b/frontend/src/styles/icons/wave.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/types/generated/environment.ts b/frontend/src/types/generated/environment.ts new file mode 100644 index 00000000..994e4d0a --- /dev/null +++ b/frontend/src/types/generated/environment.ts @@ -0,0 +1,417 @@ +/** + * Generated by orval v6.18.1 🍺 + * Do not edit manually. + * DOCUMENTATION + * OpenAPI spec version: 1.0.0 + */ +import { useQuery, useMutation } from '@tanstack/react-query'; +import type { + UseQueryOptions, + UseMutationOptions, + QueryFunction, + MutationFunction, + UseQueryResult, + QueryKey, +} from '@tanstack/react-query'; +import type { + EnvironmentListResponse, + Error, + GetEnvironmentsParams, + EnvironmentResponse, + EnvironmentRequest, + GetEnvironmentsIdParams, + EnvironmentLocalizationResponse, + EnvironmentLocalizationRequest, +} from './strapi.schemas'; +import { API } from '../../services/api/index'; +import type { ErrorType, BodyType } from '../../services/api/index'; + +// eslint-disable-next-line +type SecondParameter any> = T extends ( + config: any, + args: infer P +) => any + ? P + : never; + +export const getEnvironments = ( + params?: GetEnvironmentsParams, + options?: SecondParameter, + signal?: AbortSignal +) => { + return API( + { url: `/environments`, method: 'get', params, signal }, + options + ); +}; + +export const getGetEnvironmentsQueryKey = (params?: GetEnvironmentsParams) => { + return [`/environments`, ...(params ? [params] : [])] as const; +}; + +export const getGetEnvironmentsQueryOptions = < + TData = Awaited>, + TError = ErrorType +>( + params?: GetEnvironmentsParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +) => { + const { query: queryOptions, request: requestOptions } = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetEnvironmentsQueryKey(params); + + const queryFn: QueryFunction>> = ({ signal }) => + getEnvironments(params, requestOptions, signal); + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey }; +}; + +export type GetEnvironmentsQueryResult = NonNullable>>; +export type GetEnvironmentsQueryError = ErrorType; + +export const useGetEnvironments = < + TData = Awaited>, + TError = ErrorType +>( + params?: GetEnvironmentsParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +): UseQueryResult & { queryKey: QueryKey } => { + const queryOptions = getGetEnvironmentsQueryOptions(params, options); + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; + + query.queryKey = queryOptions.queryKey; + + return query; +}; + +export const postEnvironments = ( + environmentRequest: BodyType, + options?: SecondParameter +) => { + return API( + { + url: `/environments`, + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data: environmentRequest, + }, + options + ); +}; + +export const getPostEnvironmentsMutationOptions = < + TError = ErrorType, + TContext = unknown +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: BodyType }, + TContext + >; + request?: SecondParameter; +}): UseMutationOptions< + Awaited>, + TError, + { data: BodyType }, + TContext +> => { + const { mutation: mutationOptions, request: requestOptions } = options ?? {}; + + const mutationFn: MutationFunction< + Awaited>, + { data: BodyType } + > = (props) => { + const { data } = props ?? {}; + + return postEnvironments(data, requestOptions); + }; + + return { mutationFn, ...mutationOptions }; +}; + +export type PostEnvironmentsMutationResult = NonNullable< + Awaited> +>; +export type PostEnvironmentsMutationBody = BodyType; +export type PostEnvironmentsMutationError = ErrorType; + +export const usePostEnvironments = , TContext = unknown>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { data: BodyType }, + TContext + >; + request?: SecondParameter; +}) => { + const mutationOptions = getPostEnvironmentsMutationOptions(options); + + return useMutation(mutationOptions); +}; +export const getEnvironmentsId = ( + id: number, + params?: GetEnvironmentsIdParams, + options?: SecondParameter, + signal?: AbortSignal +) => { + return API( + { url: `/environments/${id}`, method: 'get', params, signal }, + options + ); +}; + +export const getGetEnvironmentsIdQueryKey = (id: number, params?: GetEnvironmentsIdParams) => { + return [`/environments/${id}`, ...(params ? [params] : [])] as const; +}; + +export const getGetEnvironmentsIdQueryOptions = < + TData = Awaited>, + TError = ErrorType +>( + id: number, + params?: GetEnvironmentsIdParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +) => { + const { query: queryOptions, request: requestOptions } = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetEnvironmentsIdQueryKey(id, params); + + const queryFn: QueryFunction>> = ({ signal }) => + getEnvironmentsId(id, params, requestOptions, signal); + + return { queryKey, queryFn, enabled: !!id, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey }; +}; + +export type GetEnvironmentsIdQueryResult = NonNullable< + Awaited> +>; +export type GetEnvironmentsIdQueryError = ErrorType; + +export const useGetEnvironmentsId = < + TData = Awaited>, + TError = ErrorType +>( + id: number, + params?: GetEnvironmentsIdParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +): UseQueryResult & { queryKey: QueryKey } => { + const queryOptions = getGetEnvironmentsIdQueryOptions(id, params, options); + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; + + query.queryKey = queryOptions.queryKey; + + return query; +}; + +export const putEnvironmentsId = ( + id: number, + environmentRequest: BodyType, + options?: SecondParameter +) => { + return API( + { + url: `/environments/${id}`, + method: 'put', + headers: { 'Content-Type': 'application/json' }, + data: environmentRequest, + }, + options + ); +}; + +export const getPutEnvironmentsIdMutationOptions = < + TError = ErrorType, + TContext = unknown +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext + >; + request?: SecondParameter; +}): UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext +> => { + const { mutation: mutationOptions, request: requestOptions } = options ?? {}; + + const mutationFn: MutationFunction< + Awaited>, + { id: number; data: BodyType } + > = (props) => { + const { id, data } = props ?? {}; + + return putEnvironmentsId(id, data, requestOptions); + }; + + return { mutationFn, ...mutationOptions }; +}; + +export type PutEnvironmentsIdMutationResult = NonNullable< + Awaited> +>; +export type PutEnvironmentsIdMutationBody = BodyType; +export type PutEnvironmentsIdMutationError = ErrorType; + +export const usePutEnvironmentsId = , TContext = unknown>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext + >; + request?: SecondParameter; +}) => { + const mutationOptions = getPutEnvironmentsIdMutationOptions(options); + + return useMutation(mutationOptions); +}; +export const deleteEnvironmentsId = (id: number, options?: SecondParameter) => { + return API({ url: `/environments/${id}`, method: 'delete' }, options); +}; + +export const getDeleteEnvironmentsIdMutationOptions = < + TError = ErrorType, + TContext = unknown +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number }, + TContext + >; + request?: SecondParameter; +}): UseMutationOptions< + Awaited>, + TError, + { id: number }, + TContext +> => { + const { mutation: mutationOptions, request: requestOptions } = options ?? {}; + + const mutationFn: MutationFunction< + Awaited>, + { id: number } + > = (props) => { + const { id } = props ?? {}; + + return deleteEnvironmentsId(id, requestOptions); + }; + + return { mutationFn, ...mutationOptions }; +}; + +export type DeleteEnvironmentsIdMutationResult = NonNullable< + Awaited> +>; + +export type DeleteEnvironmentsIdMutationError = ErrorType; + +export const useDeleteEnvironmentsId = , TContext = unknown>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number }, + TContext + >; + request?: SecondParameter; +}) => { + const mutationOptions = getDeleteEnvironmentsIdMutationOptions(options); + + return useMutation(mutationOptions); +}; +export const postEnvironmentsIdLocalizations = ( + id: number, + environmentLocalizationRequest: BodyType, + options?: SecondParameter +) => { + return API( + { + url: `/environments/${id}/localizations`, + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data: environmentLocalizationRequest, + }, + options + ); +}; + +export const getPostEnvironmentsIdLocalizationsMutationOptions = < + TError = ErrorType, + TContext = unknown +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext + >; + request?: SecondParameter; +}): UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext +> => { + const { mutation: mutationOptions, request: requestOptions } = options ?? {}; + + const mutationFn: MutationFunction< + Awaited>, + { id: number; data: BodyType } + > = (props) => { + const { id, data } = props ?? {}; + + return postEnvironmentsIdLocalizations(id, data, requestOptions); + }; + + return { mutationFn, ...mutationOptions }; +}; + +export type PostEnvironmentsIdLocalizationsMutationResult = NonNullable< + Awaited> +>; +export type PostEnvironmentsIdLocalizationsMutationBody = BodyType; +export type PostEnvironmentsIdLocalizationsMutationError = ErrorType; + +export const usePostEnvironmentsIdLocalizations = < + TError = ErrorType, + TContext = unknown +>(options?: { + mutation?: UseMutationOptions< + Awaited>, + TError, + { id: number; data: BodyType }, + TContext + >; + request?: SecondParameter; +}) => { + const mutationOptions = getPostEnvironmentsIdLocalizationsMutationOptions(options); + + return useMutation(mutationOptions); +}; diff --git a/frontend/src/types/generated/location.ts b/frontend/src/types/generated/location.ts index e2edf480..08461c27 100644 --- a/frontend/src/types/generated/location.ts +++ b/frontend/src/types/generated/location.ts @@ -4,12 +4,10 @@ * DOCUMENTATION * OpenAPI spec version: 1.0.0 */ -import { useQuery, useMutation } from '@tanstack/react-query'; +import { useQuery } from '@tanstack/react-query'; import type { UseQueryOptions, - UseMutationOptions, QueryFunction, - MutationFunction, UseQueryResult, QueryKey, } from '@tanstack/react-query'; @@ -19,11 +17,9 @@ import type { GetLocationsParams, LocationResponse, GetLocationsIdParams, - LocationLocalizationResponse, - LocationLocalizationRequest, } from './strapi.schemas'; import { API } from '../../services/api/index'; -import type { ErrorType, BodyType } from '../../services/api/index'; +import type { ErrorType } from '../../services/api/index'; // eslint-disable-next-line type SecondParameter any> = T extends ( @@ -151,73 +147,3 @@ export const useGetLocationsId = < return query; }; - -export const postLocationsIdLocalizations = ( - id: number, - locationLocalizationRequest: BodyType, - options?: SecondParameter -) => { - return API( - { - url: `/locations/${id}/localizations`, - method: 'post', - headers: { 'Content-Type': 'application/json' }, - data: locationLocalizationRequest, - }, - options - ); -}; - -export const getPostLocationsIdLocalizationsMutationOptions = < - TError = ErrorType, - TContext = unknown ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { id: number; data: BodyType }, - TContext - >; - request?: SecondParameter; -}): UseMutationOptions< - Awaited>, - TError, - { id: number; data: BodyType }, - TContext -> => { - const { mutation: mutationOptions, request: requestOptions } = options ?? {}; - - const mutationFn: MutationFunction< - Awaited>, - { id: number; data: BodyType } - > = (props) => { - const { id, data } = props ?? {}; - - return postLocationsIdLocalizations(id, data, requestOptions); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type PostLocationsIdLocalizationsMutationResult = NonNullable< - Awaited> ->; -export type PostLocationsIdLocalizationsMutationBody = BodyType; -export type PostLocationsIdLocalizationsMutationError = ErrorType; - -export const usePostLocationsIdLocalizations = < - TError = ErrorType, - TContext = unknown ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { id: number; data: BodyType }, - TContext - >; - request?: SecondParameter; -}) => { - const mutationOptions = getPostLocationsIdLocalizationsMutationOptions(options); - - return useMutation(mutationOptions); -}; diff --git a/frontend/src/types/generated/mpa.ts b/frontend/src/types/generated/mpa.ts deleted file mode 100644 index 0b110fa1..00000000 --- a/frontend/src/types/generated/mpa.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Generated by orval v6.18.1 🍺 - * Do not edit manually. - * DOCUMENTATION - * OpenAPI spec version: 1.0.0 - */ -import { useQuery } from '@tanstack/react-query'; -import type { - UseQueryOptions, - QueryFunction, - UseQueryResult, - QueryKey, -} from '@tanstack/react-query'; -import type { - MpaListResponse, - Error, - GetMpasParams, - MpaResponse, - GetMpasIdParams, -} from './strapi.schemas'; -import { API } from '../../services/api/index'; -import type { ErrorType } from '../../services/api/index'; - -// eslint-disable-next-line -type SecondParameter any> = T extends ( - config: any, - args: infer P -) => any - ? P - : never; - -export const getMpas = ( - params?: GetMpasParams, - options?: SecondParameter, - signal?: AbortSignal -) => { - return API({ url: `/mpas`, method: 'get', params, signal }, options); -}; - -export const getGetMpasQueryKey = (params?: GetMpasParams) => { - return [`/mpas`, ...(params ? [params] : [])] as const; -}; - -export const getGetMpasQueryOptions = < - TData = Awaited>, - TError = ErrorType ->( - params?: GetMpasParams, - options?: { - query?: UseQueryOptions>, TError, TData>; - request?: SecondParameter; - } -) => { - const { query: queryOptions, request: requestOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetMpasQueryKey(params); - - const queryFn: QueryFunction>> = ({ signal }) => - getMpas(params, requestOptions, signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: QueryKey }; -}; - -export type GetMpasQueryResult = NonNullable>>; -export type GetMpasQueryError = ErrorType; - -export const useGetMpas = >, TError = ErrorType>( - params?: GetMpasParams, - options?: { - query?: UseQueryOptions>, TError, TData>; - request?: SecondParameter; - } -): UseQueryResult & { queryKey: QueryKey } => { - const queryOptions = getGetMpasQueryOptions(params, options); - - const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; - - query.queryKey = queryOptions.queryKey; - - return query; -}; - -export const getMpasId = ( - id: number, - params?: GetMpasIdParams, - options?: SecondParameter, - signal?: AbortSignal -) => { - return API({ url: `/mpas/${id}`, method: 'get', params, signal }, options); -}; - -export const getGetMpasIdQueryKey = (id: number, params?: GetMpasIdParams) => { - return [`/mpas/${id}`, ...(params ? [params] : [])] as const; -}; - -export const getGetMpasIdQueryOptions = < - TData = Awaited>, - TError = ErrorType ->( - id: number, - params?: GetMpasIdParams, - options?: { - query?: UseQueryOptions>, TError, TData>; - request?: SecondParameter; - } -) => { - const { query: queryOptions, request: requestOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetMpasIdQueryKey(id, params); - - const queryFn: QueryFunction>> = ({ signal }) => - getMpasId(id, params, requestOptions, signal); - - return { queryKey, queryFn, enabled: !!id, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: QueryKey }; -}; - -export type GetMpasIdQueryResult = NonNullable>>; -export type GetMpasIdQueryError = ErrorType; - -export const useGetMpasId = < - TData = Awaited>, - TError = ErrorType ->( - id: number, - params?: GetMpasIdParams, - options?: { - query?: UseQueryOptions>, TError, TData>; - request?: SecondParameter; - } -): UseQueryResult & { queryKey: QueryKey } => { - const queryOptions = getGetMpasIdQueryOptions(id, params, options); - - const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; - - query.queryKey = queryOptions.queryKey; - - return query; -}; diff --git a/frontend/src/types/generated/mpaa-establishment-stage-stat.ts b/frontend/src/types/generated/mpaa-establishment-stage-stat.ts deleted file mode 100644 index fab71d59..00000000 --- a/frontend/src/types/generated/mpaa-establishment-stage-stat.ts +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Generated by orval v6.18.1 🍺 - * Do not edit manually. - * DOCUMENTATION - * OpenAPI spec version: 1.0.0 - */ -import { useQuery } from '@tanstack/react-query'; -import type { - UseQueryOptions, - QueryFunction, - UseQueryResult, - QueryKey, -} from '@tanstack/react-query'; -import type { - MpaaEstablishmentStageStatListResponse, - Error, - GetMpaaEstablishmentStageStatsParams, - MpaaEstablishmentStageStatResponse, - GetMpaaEstablishmentStageStatsIdParams, -} from './strapi.schemas'; -import { API } from '../../services/api/index'; -import type { ErrorType } from '../../services/api/index'; - -// eslint-disable-next-line -type SecondParameter any> = T extends ( - config: any, - args: infer P -) => any - ? P - : never; - -export const getMpaaEstablishmentStageStats = ( - params?: GetMpaaEstablishmentStageStatsParams, - options?: SecondParameter, - signal?: AbortSignal -) => { - return API( - { url: `/mpaa-establishment-stage-stats`, method: 'get', params, signal }, - options - ); -}; - -export const getGetMpaaEstablishmentStageStatsQueryKey = ( - params?: GetMpaaEstablishmentStageStatsParams -) => { - return [`/mpaa-establishment-stage-stats`, ...(params ? [params] : [])] as const; -}; - -export const getGetMpaaEstablishmentStageStatsQueryOptions = < - TData = Awaited>, - TError = ErrorType ->( - params?: GetMpaaEstablishmentStageStatsParams, - options?: { - query?: UseQueryOptions< - Awaited>, - TError, - TData - >; - request?: SecondParameter; - } -) => { - const { query: queryOptions, request: requestOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetMpaaEstablishmentStageStatsQueryKey(params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => getMpaaEstablishmentStageStats(params, requestOptions, signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: QueryKey }; -}; - -export type GetMpaaEstablishmentStageStatsQueryResult = NonNullable< - Awaited> ->; -export type GetMpaaEstablishmentStageStatsQueryError = ErrorType; - -export const useGetMpaaEstablishmentStageStats = < - TData = Awaited>, - TError = ErrorType ->( - params?: GetMpaaEstablishmentStageStatsParams, - options?: { - query?: UseQueryOptions< - Awaited>, - TError, - TData - >; - request?: SecondParameter; - } -): UseQueryResult & { queryKey: QueryKey } => { - const queryOptions = getGetMpaaEstablishmentStageStatsQueryOptions(params, options); - - const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; - - query.queryKey = queryOptions.queryKey; - - return query; -}; - -export const getMpaaEstablishmentStageStatsId = ( - id: number, - params?: GetMpaaEstablishmentStageStatsIdParams, - options?: SecondParameter, - signal?: AbortSignal -) => { - return API( - { url: `/mpaa-establishment-stage-stats/${id}`, method: 'get', params, signal }, - options - ); -}; - -export const getGetMpaaEstablishmentStageStatsIdQueryKey = ( - id: number, - params?: GetMpaaEstablishmentStageStatsIdParams -) => { - return [`/mpaa-establishment-stage-stats/${id}`, ...(params ? [params] : [])] as const; -}; - -export const getGetMpaaEstablishmentStageStatsIdQueryOptions = < - TData = Awaited>, - TError = ErrorType ->( - id: number, - params?: GetMpaaEstablishmentStageStatsIdParams, - options?: { - query?: UseQueryOptions< - Awaited>, - TError, - TData - >; - request?: SecondParameter; - } -) => { - const { query: queryOptions, request: requestOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGetMpaaEstablishmentStageStatsIdQueryKey(id, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => getMpaaEstablishmentStageStatsId(id, params, requestOptions, signal); - - return { queryKey, queryFn, enabled: !!id, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: QueryKey }; -}; - -export type GetMpaaEstablishmentStageStatsIdQueryResult = NonNullable< - Awaited> ->; -export type GetMpaaEstablishmentStageStatsIdQueryError = ErrorType; - -export const useGetMpaaEstablishmentStageStatsId = < - TData = Awaited>, - TError = ErrorType ->( - id: number, - params?: GetMpaaEstablishmentStageStatsIdParams, - options?: { - query?: UseQueryOptions< - Awaited>, - TError, - TData - >; - request?: SecondParameter; - } -): UseQueryResult & { queryKey: QueryKey } => { - const queryOptions = getGetMpaaEstablishmentStageStatsIdQueryOptions(id, params, options); - - const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; - - query.queryKey = queryOptions.queryKey; - - return query; -}; diff --git a/frontend/src/types/generated/pa.ts b/frontend/src/types/generated/pa.ts new file mode 100644 index 00000000..08ac00c5 --- /dev/null +++ b/frontend/src/types/generated/pa.ts @@ -0,0 +1,146 @@ +/** + * Generated by orval v6.18.1 🍺 + * Do not edit manually. + * DOCUMENTATION + * OpenAPI spec version: 1.0.0 + */ +import { useQuery } from '@tanstack/react-query'; +import type { + UseQueryOptions, + QueryFunction, + UseQueryResult, + QueryKey, +} from '@tanstack/react-query'; +import type { + PaListResponse, + Error, + GetPasParams, + PaResponse, + GetPasIdParams, +} from './strapi.schemas'; +import { API } from '../../services/api/index'; +import type { ErrorType } from '../../services/api/index'; + +// eslint-disable-next-line +type SecondParameter any> = T extends ( + config: any, + args: infer P +) => any + ? P + : never; + +export const getPas = ( + params?: GetPasParams, + options?: SecondParameter, + signal?: AbortSignal +) => { + return API({ url: `/pas`, method: 'get', params, signal }, options); +}; + +export const getGetPasQueryKey = (params?: GetPasParams) => { + return [`/pas`, ...(params ? [params] : [])] as const; +}; + +export const getGetPasQueryOptions = < + TData = Awaited>, + TError = ErrorType +>( + params?: GetPasParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +) => { + const { query: queryOptions, request: requestOptions } = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetPasQueryKey(params); + + const queryFn: QueryFunction>> = ({ signal }) => + getPas(params, requestOptions, signal); + + return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey }; +}; + +export type GetPasQueryResult = NonNullable>>; +export type GetPasQueryError = ErrorType; + +export const useGetPas = >, TError = ErrorType>( + params?: GetPasParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +): UseQueryResult & { queryKey: QueryKey } => { + const queryOptions = getGetPasQueryOptions(params, options); + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; + + query.queryKey = queryOptions.queryKey; + + return query; +}; + +export const getPasId = ( + id: number, + params?: GetPasIdParams, + options?: SecondParameter, + signal?: AbortSignal +) => { + return API({ url: `/pas/${id}`, method: 'get', params, signal }, options); +}; + +export const getGetPasIdQueryKey = (id: number, params?: GetPasIdParams) => { + return [`/pas/${id}`, ...(params ? [params] : [])] as const; +}; + +export const getGetPasIdQueryOptions = < + TData = Awaited>, + TError = ErrorType +>( + id: number, + params?: GetPasIdParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +) => { + const { query: queryOptions, request: requestOptions } = options ?? {}; + + const queryKey = queryOptions?.queryKey ?? getGetPasIdQueryKey(id, params); + + const queryFn: QueryFunction>> = ({ signal }) => + getPasId(id, params, requestOptions, signal); + + return { queryKey, queryFn, enabled: !!id, ...queryOptions } as UseQueryOptions< + Awaited>, + TError, + TData + > & { queryKey: QueryKey }; +}; + +export type GetPasIdQueryResult = NonNullable>>; +export type GetPasIdQueryError = ErrorType; + +export const useGetPasId = < + TData = Awaited>, + TError = ErrorType +>( + id: number, + params?: GetPasIdParams, + options?: { + query?: UseQueryOptions>, TError, TData>; + request?: SecondParameter; + } +): UseQueryResult & { queryKey: QueryKey } => { + const queryOptions = getGetPasIdQueryOptions(id, params, options); + + const query = useQuery(queryOptions) as UseQueryResult & { queryKey: QueryKey }; + + query.queryKey = queryOptions.queryKey; + + return query; +}; diff --git a/frontend/src/types/generated/strapi.schemas.ts b/frontend/src/types/generated/strapi.schemas.ts index 485c4c3b..194d6555 100644 --- a/frontend/src/types/generated/strapi.schemas.ts +++ b/frontend/src/types/generated/strapi.schemas.ts @@ -154,14 +154,14 @@ export type GetProtectionCoverageStatsParams = { locale?: string; }; -export type GetMpaaProtectionLevelStatsIdParams = { +export type GetPasIdParams = { /** * Relations to return */ populate?: string; }; -export type GetMpaaProtectionLevelStatsParams = { +export type GetPasParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -204,14 +204,14 @@ export type GetMpaaProtectionLevelStatsParams = { locale?: string; }; -export type GetMpaaProtectionLevelsIdParams = { +export type GetMpaaProtectionLevelStatsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetMpaaProtectionLevelsParams = { +export type GetMpaaProtectionLevelStatsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -254,14 +254,14 @@ export type GetMpaaProtectionLevelsParams = { locale?: string; }; -export type GetMpaaEstablishmentStageStatsIdParams = { +export type GetMpaaProtectionLevelsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetMpaaEstablishmentStageStatsParams = { +export type GetMpaaProtectionLevelsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -404,14 +404,14 @@ export type GetMpaIucnCategoriesParams = { locale?: string; }; -export type GetMpasIdParams = { +export type GetLocationsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetMpasParams = { +export type GetLocationsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -454,14 +454,14 @@ export type GetMpasParams = { locale?: string; }; -export type GetLocationsIdParams = { +export type GetLayersIdParams = { /** * Relations to return */ populate?: string; }; -export type GetLocationsParams = { +export type GetLayersParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -504,14 +504,14 @@ export type GetLocationsParams = { locale?: string; }; -export type GetLayersIdParams = { +export type GetHabitatStatsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetLayersParams = { +export type GetHabitatStatsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -554,14 +554,14 @@ export type GetLayersParams = { locale?: string; }; -export type GetHabitatStatsIdParams = { +export type GetHabitatsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetHabitatStatsParams = { +export type GetHabitatsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -604,14 +604,14 @@ export type GetHabitatStatsParams = { locale?: string; }; -export type GetHabitatsIdParams = { +export type GetFishingProtectionLevelStatsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetHabitatsParams = { +export type GetFishingProtectionLevelStatsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -654,14 +654,14 @@ export type GetHabitatsParams = { locale?: string; }; -export type GetFishingProtectionLevelStatsIdParams = { +export type GetFishingProtectionLevelsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetFishingProtectionLevelStatsParams = { +export type GetFishingProtectionLevelsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -704,14 +704,14 @@ export type GetFishingProtectionLevelStatsParams = { locale?: string; }; -export type GetFishingProtectionLevelsIdParams = { +export type GetEnvironmentsIdParams = { /** * Relations to return */ populate?: string; }; -export type GetFishingProtectionLevelsParams = { +export type GetEnvironmentsParams = { /** * Sort by attributes ascending (asc) or descending (desc) */ @@ -1222,6 +1222,11 @@ export interface UploadFile { export type StaticIndicatorResponseMeta = { [key: string]: any }; +export interface StaticIndicatorResponseDataObject { + id?: number; + attributes?: StaticIndicator; +} + export interface StaticIndicatorResponse { data?: StaticIndicatorResponseDataObject; meta?: StaticIndicatorResponseMeta; @@ -1231,25 +1236,6 @@ export type StaticIndicatorLocalizations = { data?: StaticIndicator[]; }; -export interface StaticIndicator { - slug?: string; - source?: string; - value?: string; - description?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: StaticIndicatorCreatedBy; - updatedBy?: StaticIndicatorUpdatedBy; - localizations?: StaticIndicatorLocalizations; - locale?: string; -} - -export interface StaticIndicatorResponseDataObject { - id?: number; - attributes?: StaticIndicator; -} - export type StaticIndicatorUpdatedByDataAttributes = { [key: string]: any }; export type StaticIndicatorUpdatedByData = { @@ -1261,23 +1247,6 @@ export type StaticIndicatorUpdatedBy = { data?: StaticIndicatorUpdatedByData; }; -export type StaticIndicatorCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: StaticIndicatorCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: StaticIndicatorCreatedByDataAttributesCreatedBy; - updatedBy?: StaticIndicatorCreatedByDataAttributesUpdatedBy; -}; - export type StaticIndicatorCreatedByData = { id?: number; attributes?: StaticIndicatorCreatedByDataAttributes; @@ -1287,6 +1256,20 @@ export type StaticIndicatorCreatedBy = { data?: StaticIndicatorCreatedByData; }; +export interface StaticIndicator { + slug?: string; + source?: string; + value?: string; + description?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: StaticIndicatorCreatedBy; + updatedBy?: StaticIndicatorUpdatedBy; + localizations?: StaticIndicatorLocalizations; + locale?: string; +} + export type StaticIndicatorCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type StaticIndicatorCreatedByDataAttributesUpdatedByData = { @@ -1318,6 +1301,23 @@ export type StaticIndicatorCreatedByDataAttributesRoles = { data?: StaticIndicatorCreatedByDataAttributesRolesDataItem[]; }; +export type StaticIndicatorCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: StaticIndicatorCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: StaticIndicatorCreatedByDataAttributesCreatedBy; + updatedBy?: StaticIndicatorCreatedByDataAttributesUpdatedBy; +}; + export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -1331,18 +1331,6 @@ export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUpdated data?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any; }; @@ -1365,6 +1353,18 @@ export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermiss data?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; +export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -1379,6 +1379,17 @@ export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermiss data?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; +export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = + { + id?: number; + attributes?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + }; + +export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = + { + data?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + }; + export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { action?: string; @@ -1396,17 +1407,6 @@ export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermiss export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; - }; - -export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = - { - data?: StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; - }; - export type StaticIndicatorCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; @@ -1519,6 +1519,23 @@ export type ProtectionStatusLocalizations = { data?: ProtectionStatus[]; }; +export interface ProtectionStatus { + slug: string; + name: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionStatusCreatedBy; + updatedBy?: ProtectionStatusUpdatedBy; + localizations?: ProtectionStatusLocalizations; + locale?: string; +} + +export interface ProtectionStatusResponseDataObject { + id?: number; + attributes?: ProtectionStatus; +} + export type ProtectionStatusUpdatedByDataAttributes = { [key: string]: any }; export type ProtectionStatusUpdatedByData = { @@ -1530,6 +1547,10 @@ export type ProtectionStatusUpdatedBy = { data?: ProtectionStatusUpdatedByData; }; +export type ProtectionStatusCreatedByDataAttributesUpdatedBy = { + data?: ProtectionStatusCreatedByDataAttributesUpdatedByData; +}; + export type ProtectionStatusCreatedByDataAttributes = { firstname?: string; lastname?: string; @@ -1556,23 +1577,6 @@ export type ProtectionStatusCreatedBy = { data?: ProtectionStatusCreatedByData; }; -export interface ProtectionStatus { - slug: string; - name: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionStatusCreatedBy; - updatedBy?: ProtectionStatusUpdatedBy; - localizations?: ProtectionStatusLocalizations; - locale?: string; -} - -export interface ProtectionStatusResponseDataObject { - id?: number; - attributes?: ProtectionStatus; -} - export type ProtectionStatusCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type ProtectionStatusCreatedByDataAttributesUpdatedByData = { @@ -1580,10 +1584,6 @@ export type ProtectionStatusCreatedByDataAttributesUpdatedByData = { attributes?: ProtectionStatusCreatedByDataAttributesUpdatedByDataAttributes; }; -export type ProtectionStatusCreatedByDataAttributesUpdatedBy = { - data?: ProtectionStatusCreatedByDataAttributesUpdatedByData; -}; - export type ProtectionStatusCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; export type ProtectionStatusCreatedByDataAttributesCreatedByData = { @@ -1595,6 +1595,23 @@ export type ProtectionStatusCreatedByDataAttributesCreatedBy = { data?: ProtectionStatusCreatedByDataAttributesCreatedByData; }; +export type ProtectionStatusCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + +export type ProtectionStatusCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributes; +}; + export type ProtectionStatusCreatedByDataAttributesRoles = { data?: ProtectionStatusCreatedByDataAttributesRolesDataItem[]; }; @@ -1632,23 +1649,6 @@ export type ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesPermis data?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type ProtectionStatusCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - -export type ProtectionStatusCreatedByDataAttributesRolesDataItem = { - id?: number; - attributes?: ProtectionStatusCreatedByDataAttributesRolesDataItemAttributes; -}; - export type ProtectionStatusCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -1791,29 +1791,16 @@ export interface ProtectionStatusLocalizationRequest { export type ProtectionCoverageStatResponseMeta = { [key: string]: any }; -export interface ProtectionCoverageStatResponse { - data?: ProtectionCoverageStatResponseDataObject; - meta?: ProtectionCoverageStatResponseMeta; -} - -export interface ProtectionCoverageStat { - location?: ProtectionCoverageStatLocation; - protection_status?: ProtectionCoverageStatProtectionStatus; - year: number; - cumSumProtectedArea: number; - protectedArea?: number; - protectedAreasCount: number; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatCreatedBy; - updatedBy?: ProtectionCoverageStatUpdatedBy; -} - export interface ProtectionCoverageStatResponseDataObject { id?: number; attributes?: ProtectionCoverageStat; } +export interface ProtectionCoverageStatResponse { + data?: ProtectionCoverageStatResponseDataObject; + meta?: ProtectionCoverageStatResponseMeta; +} + export type ProtectionCoverageStatUpdatedByDataAttributes = { [key: string]: any }; export type ProtectionCoverageStatUpdatedByData = { @@ -1825,6 +1812,23 @@ export type ProtectionCoverageStatUpdatedBy = { data?: ProtectionCoverageStatUpdatedByData; }; +export interface ProtectionCoverageStat { + location?: ProtectionCoverageStatLocation; + year: number; + protected_area?: number; + protected_areas_count: number; + environment?: ProtectionCoverageStatEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatCreatedBy; + updatedBy?: ProtectionCoverageStatUpdatedBy; +} + export type ProtectionCoverageStatCreatedByDataAttributes = { [key: string]: any }; export type ProtectionCoverageStatCreatedByData = { @@ -1836,19 +1840,42 @@ export type ProtectionCoverageStatCreatedBy = { data?: ProtectionCoverageStatCreatedByData; }; -export type ProtectionCoverageStatProtectionStatusDataAttributes = { [key: string]: any }; +export type ProtectionCoverageStatEnvironmentDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatProtectionStatusData = { +export type ProtectionCoverageStatEnvironmentData = { id?: number; - attributes?: ProtectionCoverageStatProtectionStatusDataAttributes; + attributes?: ProtectionCoverageStatEnvironmentDataAttributes; }; -export type ProtectionCoverageStatProtectionStatus = { - data?: ProtectionCoverageStatProtectionStatusData; +export type ProtectionCoverageStatEnvironment = { + data?: ProtectionCoverageStatEnvironmentData; }; -export type ProtectionCoverageStatLocationData = { - id?: number; +export type ProtectionCoverageStatLocationDataAttributes = { + code?: string; + name?: string; + total_marine_area?: string; + type?: string; + groups?: ProtectionCoverageStatLocationDataAttributesGroups; + members?: ProtectionCoverageStatLocationDataAttributesMembers; + fishing_protection_level_stats?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStats; + mpaa_protection_level_stats?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStats; + protection_coverage_stats?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStats; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatLocationDataAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesUpdatedBy; +}; + +export type ProtectionCoverageStatLocationData = { + id?: number; attributes?: ProtectionCoverageStatLocationDataAttributes; }; @@ -1856,10 +1883,6 @@ export type ProtectionCoverageStatLocation = { data?: ProtectionCoverageStatLocationData; }; -export type ProtectionCoverageStatLocationDataAttributesLocalizations = { - data?: unknown[]; -}; - export type ProtectionCoverageStatLocationDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -1873,25 +1896,6 @@ export type ProtectionCoverageStatLocationDataAttributesUpdatedBy = { data?: ProtectionCoverageStatLocationDataAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributes = { - code?: string; - name?: string; - totalMarineArea?: number; - type?: string; - groups?: ProtectionCoverageStatLocationDataAttributesGroups; - members?: ProtectionCoverageStatLocationDataAttributesMembers; - fishing_protection_level_stats?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesUpdatedBy; - localizations?: ProtectionCoverageStatLocationDataAttributesLocalizations; - locale?: string; -}; - export type ProtectionCoverageStatLocationDataAttributesCreatedByDataAttributes = { [key: string]: any; }; @@ -1905,15 +1909,33 @@ export type ProtectionCoverageStatLocationDataAttributesCreatedBy = { data?: ProtectionCoverageStatLocationDataAttributesCreatedByData; }; +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStats = { + data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItem[]; +}; + +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = + { + location?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; + year?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; + }; + export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItem = { id?: number; attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStats = { - data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItem[]; -}; - export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -1928,25 +1950,6 @@ export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsD data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = - { - data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; - }; - -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = - { - location?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; - year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; - }; - export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -1956,61 +1959,65 @@ export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsD attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { - data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = { data?: unknown[]; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = + { + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; + }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { - data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; - locale?: string; + data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = +export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; + data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = @@ -2027,135 +2034,123 @@ export type ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsD data?: ProtectionCoverageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItem = { +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes; }; export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStats = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; + }; + +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = + { + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes = { + mpaa_protection_level?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; + area?: number; + percentage?: number; + location?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; +}; + +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = { - location?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; - area?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; + }; + +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation = + { + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = { slug?: string; name?: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; + createdBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations; locale?: string; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = - { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; - }; - -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = - { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = - { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; - }; - -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = +export type ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = - { - location?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; - fishing_protection_level?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; - area?: number; - pct?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + data?: ProtectionCoverageStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData; }; export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItem = { @@ -2195,11 +2190,53 @@ export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelSt data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = + { + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = + { + location?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; + fishing_protection_level?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; + area?: number; + pct?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; + updatedBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + }; + export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = + { + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = + { + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = + { + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = + { + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; + }; + export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = { slug?: string; @@ -2219,23 +2256,23 @@ export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelSt attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = - { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy = + { + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; }; export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = @@ -2256,57 +2293,63 @@ export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelSt updatedBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; + id?: number; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = + { + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; + }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData; + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = @@ -2322,29 +2365,18 @@ export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelSt updatedBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; + attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = +export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = - { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = - { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; + data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = @@ -2361,31 +2393,6 @@ export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelSt updatedBy?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = - { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = - { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; - }; - -export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = - { - data?: ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; - }; - export type ProtectionCoverageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -2455,6 +2462,10 @@ export type ProtectionCoverageStatLocationDataAttributesMembers = { data?: ProtectionCoverageStatLocationDataAttributesMembersDataItem[]; }; +export type ProtectionCoverageStatLocationDataAttributesGroups = { + data?: ProtectionCoverageStatLocationDataAttributesGroupsDataItem[]; +}; + export type ProtectionCoverageStatLocationDataAttributesGroupsDataItemAttributes = { [key: string]: any; }; @@ -2464,10 +2475,6 @@ export type ProtectionCoverageStatLocationDataAttributesGroupsDataItem = { attributes?: ProtectionCoverageStatLocationDataAttributesGroupsDataItemAttributes; }; -export type ProtectionCoverageStatLocationDataAttributesGroups = { - data?: ProtectionCoverageStatLocationDataAttributesGroupsDataItem[]; -}; - export type ProtectionCoverageStatListResponseMetaPagination = { page?: number; pageSize?: number; @@ -2489,799 +2496,943 @@ export interface ProtectionCoverageStatListResponse { meta?: ProtectionCoverageStatListResponseMeta; } -export type MpaaProtectionLevelStatResponseMeta = { [key: string]: any }; +export type PaResponseMeta = { [key: string]: any }; -export interface MpaaProtectionLevelStatResponseDataObject { +export interface PaResponseDataObject { id?: number; - attributes?: MpaaProtectionLevelStat; + attributes?: Pa; } -export interface MpaaProtectionLevelStatResponse { - data?: MpaaProtectionLevelStatResponseDataObject; - meta?: MpaaProtectionLevelStatResponseMeta; +export interface PaResponse { + data?: PaResponseDataObject; + meta?: PaResponseMeta; } -export type MpaaProtectionLevelStatUpdatedByDataAttributes = { [key: string]: any }; +export type PaUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatUpdatedByData = { +export type PaUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatUpdatedByDataAttributes; + attributes?: PaUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatUpdatedBy = { - data?: MpaaProtectionLevelStatUpdatedByData; +export type PaUpdatedBy = { + data?: PaUpdatedByData; }; -export type MpaaProtectionLevelStatCreatedByDataAttributes = { [key: string]: any }; +export type PaCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatCreatedByData = { +export type PaCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatCreatedByDataAttributes; + attributes?: PaCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatCreatedBy = { - data?: MpaaProtectionLevelStatCreatedByData; +export type PaCreatedBy = { + data?: PaCreatedByData; }; -export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributes = { [key: string]: any }; +export type PaParentDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatMpaaProtectionLevelData = { +export type PaParentData = { id?: number; - attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributes; + attributes?: PaParentDataAttributes; }; -export type MpaaProtectionLevelStatMpaaProtectionLevel = { - data?: MpaaProtectionLevelStatMpaaProtectionLevelData; +export type PaParent = { + data?: PaParentData; }; -export type MpaaProtectionLevelStatLocationDataAttributesLocalizations = { - data?: unknown[]; +export type PaEnvironmentDataAttributes = { [key: string]: any }; + +export type PaEnvironmentData = { + id?: number; + attributes?: PaEnvironmentDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributes = { - code?: string; +export type PaEnvironment = { + data?: PaEnvironmentData; +}; + +export type PaIucnCategoryDataAttributes = { [key: string]: any }; + +export type PaIucnCategoryData = { + id?: number; + attributes?: PaIucnCategoryDataAttributes; +}; + +export type PaIucnCategory = { + data?: PaIucnCategoryData; +}; + +export type PaMpaaProtectionLevelDataAttributes = { [key: string]: any }; + +export type PaMpaaProtectionLevelData = { + id?: number; + attributes?: PaMpaaProtectionLevelDataAttributes; +}; + +export type PaMpaaProtectionLevel = { + data?: PaMpaaProtectionLevelData; +}; + +export type PaLocationDataAttributes = { [key: string]: any }; + +export type PaLocationData = { + id?: number; + attributes?: PaLocationDataAttributes; +}; + +export type PaLocation = { + data?: PaLocationData; +}; + +export type PaMpaaEstablishmentStageDataAttributes = { [key: string]: any }; + +export type PaMpaaEstablishmentStageData = { + id?: number; + attributes?: PaMpaaEstablishmentStageDataAttributes; +}; + +export type PaMpaaEstablishmentStage = { + data?: PaMpaaEstablishmentStageData; +}; + +export interface Pa { + name: string; + area: number; + year?: number; + protection_status?: PaProtectionStatus; + bbox: unknown; + children?: PaChildren; + data_source?: PaDataSource; + mpaa_establishment_stage?: PaMpaaEstablishmentStage; + location?: PaLocation; + wdpaid?: string; + mpaa_protection_level?: PaMpaaProtectionLevel; + iucn_category?: PaIucnCategory; + designation?: string; + environment?: PaEnvironment; + coverage: number; + parent?: PaParent; + createdAt?: string; + updatedAt?: string; + createdBy?: PaCreatedBy; + updatedBy?: PaUpdatedBy; +} + +export type PaDataSourceDataAttributes = { [key: string]: any }; + +export type PaDataSourceData = { + id?: number; + attributes?: PaDataSourceDataAttributes; +}; + +export type PaDataSource = { + data?: PaDataSourceData; +}; + +export type PaChildrenDataItemAttributes = { name?: string; - totalMarineArea?: number; - type?: string; - groups?: MpaaProtectionLevelStatLocationDataAttributesGroups; - members?: MpaaProtectionLevelStatLocationDataAttributesMembers; - fishing_protection_level_stats?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; + area?: number; + year?: number; + protection_status?: PaChildrenDataItemAttributesProtectionStatus; + bbox?: unknown; + children?: PaChildrenDataItemAttributesChildren; + data_source?: PaChildrenDataItemAttributesDataSource; + mpaa_establishment_stage?: PaChildrenDataItemAttributesMpaaEstablishmentStage; + location?: PaChildrenDataItemAttributesLocation; + wdpaid?: string; + mpaa_protection_level?: PaChildrenDataItemAttributesMpaaProtectionLevel; + iucn_category?: PaChildrenDataItemAttributesIucnCategory; + designation?: string; + environment?: PaChildrenDataItemAttributesEnvironment; + coverage?: number; + parent?: PaChildrenDataItemAttributesParent; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesUpdatedBy; - localizations?: MpaaProtectionLevelStatLocationDataAttributesLocalizations; - locale?: string; + createdBy?: PaChildrenDataItemAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesUpdatedBy; }; -export type MpaaProtectionLevelStatLocationData = { +export type PaChildrenDataItem = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributes; + attributes?: PaChildrenDataItemAttributes; }; -export type MpaaProtectionLevelStatLocation = { - data?: MpaaProtectionLevelStatLocationData; +export type PaChildren = { + data?: PaChildrenDataItem[]; }; -export interface MpaaProtectionLevelStat { - location?: MpaaProtectionLevelStatLocation; - mpaa_protection_level?: MpaaProtectionLevelStatMpaaProtectionLevel; - area: number; +export type PaChildrenDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesUpdatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesUpdatedByDataAttributes; +}; + +export type PaChildrenDataItemAttributesUpdatedBy = { + data?: PaChildrenDataItemAttributesUpdatedByData; +}; + +export type PaChildrenDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesCreatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesCreatedByDataAttributes; +}; + +export type PaChildrenDataItemAttributesCreatedBy = { + data?: PaChildrenDataItemAttributesCreatedByData; +}; + +export type PaChildrenDataItemAttributesParentDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesParentData = { + id?: number; + attributes?: PaChildrenDataItemAttributesParentDataAttributes; +}; + +export type PaChildrenDataItemAttributesParent = { + data?: PaChildrenDataItemAttributesParentData; +}; + +export type PaChildrenDataItemAttributesEnvironmentDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesEnvironmentData = { + id?: number; + attributes?: PaChildrenDataItemAttributesEnvironmentDataAttributes; +}; + +export type PaChildrenDataItemAttributesEnvironment = { + data?: PaChildrenDataItemAttributesEnvironmentData; +}; + +export type PaChildrenDataItemAttributesIucnCategory = { + data?: PaChildrenDataItemAttributesIucnCategoryData; +}; + +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesLocalizations = { + data?: unknown[]; +}; + +export type PaChildrenDataItemAttributesIucnCategoryDataAttributes = { + slug?: string; + name?: string; + info?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatCreatedBy; - updatedBy?: MpaaProtectionLevelStatUpdatedBy; -} + createdBy?: PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesIucnCategoryDataAttributesLocalizations; + locale?: string; +}; -export type MpaaProtectionLevelStatLocationDataAttributesUpdatedByDataAttributes = { +export type PaChildrenDataItemAttributesIucnCategoryData = { + id?: number; + attributes?: PaChildrenDataItemAttributesIucnCategoryDataAttributes; +}; + +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelStatLocationDataAttributesUpdatedByData = { +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesUpdatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesUpdatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesUpdatedByData; +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedBy = { + data?: PaChildrenDataItemAttributesIucnCategoryDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesCreatedByDataAttributes = { +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelStatLocationDataAttributesCreatedByData = { +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesCreatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesCreatedByData; +export type PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedBy = { + data?: PaChildrenDataItemAttributesIucnCategoryDataAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItem = { +export type PaChildrenDataItemAttributesMpaaProtectionLevelDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesMpaaProtectionLevelData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes; + attributes?: PaChildrenDataItemAttributesMpaaProtectionLevelDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStats = { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItem[]; +export type PaChildrenDataItemAttributesMpaaProtectionLevel = { + data?: PaChildrenDataItemAttributesMpaaProtectionLevelData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = +export type PaChildrenDataItemAttributesLocation = { + data?: PaChildrenDataItemAttributesLocationData; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesUpdatedByDataAttributes = { + [key: string]: any; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesUpdatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesUpdatedByDataAttributes; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesUpdatedBy = { + data?: PaChildrenDataItemAttributesLocationDataAttributesUpdatedByData; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesCreatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesCreatedByDataAttributes; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesCreatedBy = { + data?: PaChildrenDataItemAttributesLocationDataAttributesCreatedByData; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItem = { + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributes; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStats = { + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItem[]; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributes = { + code?: string; + name?: string; + total_marine_area?: string; + type?: string; + groups?: PaChildrenDataItemAttributesLocationDataAttributesGroups; + members?: PaChildrenDataItemAttributesLocationDataAttributesMembers; + fishing_protection_level_stats?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStats; + mpaa_protection_level_stats?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStats; + protection_coverage_stats?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStats; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesUpdatedBy; +}; + +export type PaChildrenDataItemAttributesLocationData = { + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributes; +}; + +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributes = { - location?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; + location?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = { data?: unknown[]; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; - locale?: string; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; }; -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation = - { - data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItem = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; -}; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats = { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; -}; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = +export type PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation = { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; + data?: PaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributes = { - location?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; + mpaa_protection_level?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; area?: number; + percentage?: number; + location?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; - }; +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsData = { + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributes; +}; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = - { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; - locale?: string; - }; +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStats = { + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsData; +}; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = - { - data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = - { - location?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; - fishing_protection_level?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; - area?: number; - pct?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItem = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes; -}; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItem[]; -}; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = { slug?: string; name?: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations; locale?: string; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItem = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; - }; +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStats = { + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItem[]; +}; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = { - name?: string; - code?: string; - description?: string; - users?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; + id?: number; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + location?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; + fishing_protection_level?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; + area?: number; + pct?: number; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + data?: unknown[]; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = { - id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; + locale?: string; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = - { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; - }; - -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation = +export type PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation = { - data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData; + data?: PaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData; }; -export type MpaaProtectionLevelStatLocationDataAttributesMembersDataItemAttributes = { +export type PaChildrenDataItemAttributesLocationDataAttributesMembersDataItemAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelStatLocationDataAttributesMembersDataItem = { +export type PaChildrenDataItemAttributesLocationDataAttributesMembersDataItem = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesMembersDataItemAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesMembersDataItemAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesMembers = { - data?: MpaaProtectionLevelStatLocationDataAttributesMembersDataItem[]; +export type PaChildrenDataItemAttributesLocationDataAttributesMembers = { + data?: PaChildrenDataItemAttributesLocationDataAttributesMembersDataItem[]; }; -export type MpaaProtectionLevelStatLocationDataAttributesGroupsDataItemAttributes = { +export type PaChildrenDataItemAttributesLocationDataAttributesGroupsDataItemAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelStatLocationDataAttributesGroupsDataItem = { +export type PaChildrenDataItemAttributesLocationDataAttributesGroupsDataItem = { id?: number; - attributes?: MpaaProtectionLevelStatLocationDataAttributesGroupsDataItemAttributes; + attributes?: PaChildrenDataItemAttributesLocationDataAttributesGroupsDataItemAttributes; }; -export type MpaaProtectionLevelStatLocationDataAttributesGroups = { - data?: MpaaProtectionLevelStatLocationDataAttributesGroupsDataItem[]; +export type PaChildrenDataItemAttributesLocationDataAttributesGroups = { + data?: PaChildrenDataItemAttributesLocationDataAttributesGroupsDataItem[]; }; -export type MpaaProtectionLevelStatListResponseMetaPagination = { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesLocalizations = { + data?: unknown[]; }; -export type MpaaProtectionLevelStatListResponseMeta = { - pagination?: MpaaProtectionLevelStatListResponseMetaPagination; +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributes = { + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesLocalizations; + locale?: string; }; -export interface MpaaProtectionLevelStatListResponseDataItem { +export type PaChildrenDataItemAttributesMpaaEstablishmentStageData = { id?: number; - attributes?: MpaaProtectionLevelStat; -} + attributes?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributes; +}; -export interface MpaaProtectionLevelStatListResponse { - data?: MpaaProtectionLevelStatListResponseDataItem[]; - meta?: MpaaProtectionLevelStatListResponseMeta; -} +export type PaChildrenDataItemAttributesMpaaEstablishmentStage = { + data?: PaChildrenDataItemAttributesMpaaEstablishmentStageData; +}; -export type MpaaProtectionLevelResponseMeta = { [key: string]: any }; +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; -export interface MpaaProtectionLevelResponseDataObject { +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevel; -} + attributes?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes; +}; -export interface MpaaProtectionLevelResponse { - data?: MpaaProtectionLevelResponseDataObject; - meta?: MpaaProtectionLevelResponseMeta; -} +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedBy = { + data?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByData; +}; -export type MpaaProtectionLevelLocalizations = { - data?: MpaaProtectionLevel[]; +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelUpdatedByDataAttributes = { [key: string]: any }; +export type PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedBy = { + data?: PaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByData; +}; -export type MpaaProtectionLevelUpdatedByData = { +export type PaChildrenDataItemAttributesDataSourceData = { id?: number; - attributes?: MpaaProtectionLevelUpdatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesDataSourceDataAttributes; }; -export type MpaaProtectionLevelUpdatedBy = { - data?: MpaaProtectionLevelUpdatedByData; +export type PaChildrenDataItemAttributesDataSource = { + data?: PaChildrenDataItemAttributesDataSourceData; }; -export type MpaaProtectionLevelCreatedByData = { +export type PaChildrenDataItemAttributesDataSourceDataAttributesLocalizations = { + data?: unknown[]; +}; + +export type PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByDataAttributes = { + [key: string]: any; +}; + +export type PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributes; + attributes?: PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelCreatedBy = { - data?: MpaaProtectionLevelCreatedByData; +export type PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedBy = { + data?: PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByData; }; -export interface MpaaProtectionLevel { - slug: string; - name: string; +export type PaChildrenDataItemAttributesDataSourceDataAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type PaChildrenDataItemAttributesDataSourceDataAttributesCreatedByData = { + id?: number; + attributes?: PaChildrenDataItemAttributesDataSourceDataAttributesCreatedByDataAttributes; +}; + +export type PaChildrenDataItemAttributesDataSourceDataAttributesCreatedBy = { + data?: PaChildrenDataItemAttributesDataSourceDataAttributesCreatedByData; +}; + +export type PaChildrenDataItemAttributesDataSourceDataAttributes = { + slug?: string; + title?: string; + url?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: PaChildrenDataItemAttributesDataSourceDataAttributesCreatedBy; + updatedBy?: PaChildrenDataItemAttributesDataSourceDataAttributesUpdatedBy; + localizations?: PaChildrenDataItemAttributesDataSourceDataAttributesLocalizations; + locale?: string; +}; + +export type PaChildrenDataItemAttributesChildrenDataItemAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesChildrenDataItem = { + id?: number; + attributes?: PaChildrenDataItemAttributesChildrenDataItemAttributes; +}; + +export type PaChildrenDataItemAttributesChildren = { + data?: PaChildrenDataItemAttributesChildrenDataItem[]; +}; + +export type PaChildrenDataItemAttributesProtectionStatusDataAttributes = { [key: string]: any }; + +export type PaChildrenDataItemAttributesProtectionStatusData = { + id?: number; + attributes?: PaChildrenDataItemAttributesProtectionStatusDataAttributes; +}; + +export type PaChildrenDataItemAttributesProtectionStatus = { + data?: PaChildrenDataItemAttributesProtectionStatusData; +}; + +export type PaProtectionStatus = { + data?: PaProtectionStatusData; +}; + +export type PaProtectionStatusDataAttributesLocalizations = { + data?: unknown[]; +}; + +export type PaProtectionStatusDataAttributesUpdatedByDataAttributes = { [key: string]: any }; + +export type PaProtectionStatusDataAttributesUpdatedByData = { + id?: number; + attributes?: PaProtectionStatusDataAttributesUpdatedByDataAttributes; +}; + +export type PaProtectionStatusDataAttributesUpdatedBy = { + data?: PaProtectionStatusDataAttributesUpdatedByData; +}; + +export type PaProtectionStatusDataAttributesCreatedByData = { + id?: number; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributes; +}; + +export type PaProtectionStatusDataAttributesCreatedBy = { + data?: PaProtectionStatusDataAttributesCreatedByData; +}; + +export type PaProtectionStatusDataAttributes = { + slug?: string; + name?: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelCreatedBy; - updatedBy?: MpaaProtectionLevelUpdatedBy; - localizations?: MpaaProtectionLevelLocalizations; + createdBy?: PaProtectionStatusDataAttributesCreatedBy; + updatedBy?: PaProtectionStatusDataAttributesUpdatedBy; + localizations?: PaProtectionStatusDataAttributesLocalizations; locale?: string; -} +}; -export type MpaaProtectionLevelCreatedByDataAttributesUpdatedByDataAttributes = { +export type PaProtectionStatusData = { + id?: number; + attributes?: PaProtectionStatusDataAttributes; +}; + +export type PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelCreatedByDataAttributesUpdatedByData = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesUpdatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesUpdatedByData; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedBy = { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByData; }; -export type MpaaProtectionLevelCreatedByDataAttributesCreatedByDataAttributes = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaaProtectionLevelCreatedByDataAttributesCreatedByData = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesCreatedByDataAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesCreatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesCreatedByData; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedBy = { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByData; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributes = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributes = { name?: string; code?: string; description?: string; - users?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions; + users?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; + createdBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItem = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItem = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesRoles = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItem[]; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRoles = { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItem[]; }; -export type MpaaProtectionLevelCreatedByDataAttributes = { +export type PaProtectionStatusDataAttributesCreatedByDataAttributes = { firstname?: string; lastname?: string; username?: string; @@ -3289,998 +3440,901 @@ export type MpaaProtectionLevelCreatedByDataAttributes = { resetPasswordToken?: string; registrationToken?: string; isActive?: boolean; - roles?: MpaaProtectionLevelCreatedByDataAttributesRoles; + roles?: PaProtectionStatusDataAttributesCreatedByDataAttributesRoles; blocked?: boolean; preferedLanguage?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelCreatedByDataAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelCreatedByDataAttributesUpdatedBy; + createdBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedBy; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { - id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = + { + id?: number; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = + { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { - id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = + { + id?: number; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByData; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = + { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { action?: string; actionParameters?: unknown; subject?: string; properties?: unknown; conditions?: unknown; - role?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + role?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; createdAt?: string; updatedAt?: string; - createdBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + createdBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { - id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = + { + id?: number; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = + { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; + }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = { id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { - id?: number; - attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; -}; - -export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; -}; - -export type MpaaProtectionLevelListResponseMetaPagination = { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; -}; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = + { + id?: number; + attributes?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + }; -export type MpaaProtectionLevelListResponseMeta = { - pagination?: MpaaProtectionLevelListResponseMetaPagination; +export type PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: PaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; -export interface MpaaProtectionLevelListResponseDataItem { - id?: number; - attributes?: MpaaProtectionLevel; -} - -export interface MpaaProtectionLevelListResponse { - data?: MpaaProtectionLevelListResponseDataItem[]; - meta?: MpaaProtectionLevelListResponseMeta; -} - -export type MpaaProtectionLevelLocalizationListResponseMetaPagination = { +export type PaListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type MpaaProtectionLevelLocalizationListResponseMeta = { - pagination?: MpaaProtectionLevelLocalizationListResponseMetaPagination; +export type PaListResponseMeta = { + pagination?: PaListResponseMetaPagination; }; -export interface MpaaProtectionLevelListResponseDataItemLocalized { - id?: number; - attributes?: MpaaProtectionLevel; -} - -export interface MpaaProtectionLevelLocalizationListResponse { - data?: MpaaProtectionLevelListResponseDataItemLocalized[]; - meta?: MpaaProtectionLevelLocalizationListResponseMeta; -} - -export type MpaaProtectionLevelLocalizationResponseMeta = { [key: string]: any }; - -export interface MpaaProtectionLevelResponseDataObjectLocalized { +export interface PaListResponseDataItem { id?: number; - attributes?: MpaaProtectionLevel; -} - -export interface MpaaProtectionLevelLocalizationResponse { - data?: MpaaProtectionLevelResponseDataObjectLocalized; - meta?: MpaaProtectionLevelLocalizationResponseMeta; -} - -export type MpaaProtectionLevelRequestData = { - slug: string; - name: string; - info?: string; - locale?: string; -}; - -export interface MpaaProtectionLevelRequest { - data: MpaaProtectionLevelRequestData; + attributes?: Pa; } -export interface MpaaProtectionLevelLocalizationRequest { - slug: string; - name: string; - info?: string; - locale: string; +export interface PaListResponse { + data?: PaListResponseDataItem[]; + meta?: PaListResponseMeta; } -export type MpaaEstablishmentStageStatResponseMeta = { [key: string]: any }; +export type MpaaProtectionLevelStatResponseMeta = { [key: string]: any }; -export interface MpaaEstablishmentStageStatResponse { - data?: MpaaEstablishmentStageStatResponseDataObject; - meta?: MpaaEstablishmentStageStatResponseMeta; +export interface MpaaProtectionLevelStatResponse { + data?: MpaaProtectionLevelStatResponseDataObject; + meta?: MpaaProtectionLevelStatResponseMeta; } -export type MpaaEstablishmentStageStatUpdatedByDataAttributes = { [key: string]: any }; - -export type MpaaEstablishmentStageStatUpdatedByData = { - id?: number; - attributes?: MpaaEstablishmentStageStatUpdatedByDataAttributes; -}; - -export type MpaaEstablishmentStageStatUpdatedBy = { - data?: MpaaEstablishmentStageStatUpdatedByData; -}; - -export type MpaaEstablishmentStageStatCreatedByDataAttributes = { [key: string]: any }; +export type MpaaProtectionLevelStatUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatCreatedByData = { +export type MpaaProtectionLevelStatUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatCreatedByDataAttributes; + attributes?: MpaaProtectionLevelStatUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatCreatedBy = { - data?: MpaaEstablishmentStageStatCreatedByData; +export type MpaaProtectionLevelStatUpdatedBy = { + data?: MpaaProtectionLevelStatUpdatedByData; }; -export type MpaaEstablishmentStageStatProtectionStatusDataAttributes = { [key: string]: any }; +export type MpaaProtectionLevelStatCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatProtectionStatusData = { +export type MpaaProtectionLevelStatCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatProtectionStatusDataAttributes; -}; - -export type MpaaEstablishmentStageStatProtectionStatus = { - data?: MpaaEstablishmentStageStatProtectionStatusData; + attributes?: MpaaProtectionLevelStatCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatMpaaEstablishmentStage = { - data?: MpaaEstablishmentStageStatMpaaEstablishmentStageData; +export type MpaaProtectionLevelStatCreatedBy = { + data?: MpaaProtectionLevelStatCreatedByData; }; -export interface MpaaEstablishmentStageStat { - location?: MpaaEstablishmentStageStatLocation; - mpaa_establishment_stage?: MpaaEstablishmentStageStatMpaaEstablishmentStage; - protection_status?: MpaaEstablishmentStageStatProtectionStatus; - year: number; +export interface MpaaProtectionLevelStat { + mpaa_protection_level?: MpaaProtectionLevelStatMpaaProtectionLevel; area: number; + percentage?: number; + location?: MpaaProtectionLevelStatLocation; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatCreatedBy; - updatedBy?: MpaaEstablishmentStageStatUpdatedBy; + createdBy?: MpaaProtectionLevelStatCreatedBy; + updatedBy?: MpaaProtectionLevelStatUpdatedBy; } -export interface MpaaEstablishmentStageStatResponseDataObject { +export interface MpaaProtectionLevelStatResponseDataObject { id?: number; - attributes?: MpaaEstablishmentStageStat; + attributes?: MpaaProtectionLevelStat; } -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesLocalizations = { - data?: unknown[]; -}; - -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedByData = { +export type MpaaProtectionLevelStatLocationDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedByData; +export type MpaaProtectionLevelStatLocationDataAttributesUpdatedBy = { + data?: MpaaProtectionLevelStatLocationDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributes = { - slug?: string; +export type MpaaProtectionLevelStatLocationDataAttributes = { + code?: string; name?: string; - info?: string; + total_marine_area?: string; + type?: string; + groups?: MpaaProtectionLevelStatLocationDataAttributesGroups; + members?: MpaaProtectionLevelStatLocationDataAttributesMembers; + fishing_protection_level_stats?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats; + mpaa_protection_level_stats?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats; + protection_coverage_stats?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStats; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesUpdatedBy; - localizations?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesLocalizations; - locale?: string; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesUpdatedBy; }; -export type MpaaEstablishmentStageStatMpaaEstablishmentStageData = { +export type MpaaProtectionLevelStatLocationData = { id?: number; - attributes?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributes; -}; - -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedByData = { - id?: number; - attributes?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedByDataAttributes; -}; - -export type MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatMpaaEstablishmentStageDataAttributesCreatedByData; -}; - -export type MpaaEstablishmentStageStatLocation = { - data?: MpaaEstablishmentStageStatLocationData; + attributes?: MpaaProtectionLevelStatLocationDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesLocalizations = { - data?: unknown[]; +export type MpaaProtectionLevelStatLocation = { + data?: MpaaProtectionLevelStatLocationData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesUpdatedByDataAttributes = { +export type MpaaProtectionLevelStatLocationDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; -export type MpaaEstablishmentStageStatLocationDataAttributesUpdatedByData = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesUpdatedByDataAttributes; -}; - -export type MpaaEstablishmentStageStatLocationDataAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesUpdatedByData; -}; - -export type MpaaEstablishmentStageStatLocationDataAttributes = { - code?: string; - name?: string; - totalMarineArea?: number; - type?: string; - groups?: MpaaEstablishmentStageStatLocationDataAttributesGroups; - members?: MpaaEstablishmentStageStatLocationDataAttributesMembers; - fishing_protection_level_stats?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesUpdatedBy; - localizations?: MpaaEstablishmentStageStatLocationDataAttributesLocalizations; - locale?: string; -}; - -export type MpaaEstablishmentStageStatLocationData = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributes; -}; - -export type MpaaEstablishmentStageStatLocationDataAttributesCreatedByDataAttributes = { +export type MpaaProtectionLevelStatLocationDataAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaaEstablishmentStageStatLocationDataAttributesCreatedByData = { +export type MpaaProtectionLevelStatLocationDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesCreatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesCreatedByData; +export type MpaaProtectionLevelStatLocationDataAttributesCreatedBy = { + data?: MpaaProtectionLevelStatLocationDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItem = { +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = + { + location?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; + year?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; + }; + +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItem = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStats = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItem[]; +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStats = { + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItem[]; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + data?: unknown[]; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { - location?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; - year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; + id?: number; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { - data?: unknown[]; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; - locale?: string; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation = +export type MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation = { - data?: MpaaEstablishmentStageStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; + data?: MpaaProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItem = { +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStats = { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats = { + data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = - { - location?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; - area?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; + data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; + data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes = { + mpaa_protection_level?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; + area?: number; + percentage?: number; + location?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; +}; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; - locale?: string; + data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = +export type MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = { - data?: MpaaEstablishmentStageStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; + data?: MpaaProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItem = { +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItem = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStats = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItem[]; +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats = { + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItem[]; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = { - location?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; - fishing_protection_level?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; + location?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; + fishing_protection_level?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; area?: number; pct?: number; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + id?: number; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; - locale?: string; + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; + }; + +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = + { + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; + localizations?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; + locale?: string; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; + id?: number; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy = +export type MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData; + data?: MpaaProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatLocationDataAttributesMembersDataItemAttributes = { + [key: string]: any; +}; + +export type MpaaProtectionLevelStatLocationDataAttributesMembersDataItem = { + id?: number; + attributes?: MpaaProtectionLevelStatLocationDataAttributesMembersDataItemAttributes; +}; + +export type MpaaProtectionLevelStatLocationDataAttributesMembers = { + data?: MpaaProtectionLevelStatLocationDataAttributesMembersDataItem[]; +}; + +export type MpaaProtectionLevelStatLocationDataAttributesGroupsDataItemAttributes = { + [key: string]: any; +}; + +export type MpaaProtectionLevelStatLocationDataAttributesGroupsDataItem = { + id?: number; + attributes?: MpaaProtectionLevelStatLocationDataAttributesGroupsDataItemAttributes; +}; + +export type MpaaProtectionLevelStatLocationDataAttributesGroups = { + data?: MpaaProtectionLevelStatLocationDataAttributesGroupsDataItem[]; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelData = { + id?: number; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributes; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevel = { + data?: MpaaProtectionLevelStatMpaaProtectionLevelData; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesLocalizations = { + data?: unknown[]; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { + [key: string]: any; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedByData = { + id?: number; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedBy = { + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedByData; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByData = { + id?: number; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributes; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedBy = { + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByData; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributes = { + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesLocalizations; + locale?: string; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = - { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; - }; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRoles = { + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; +}; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; +}; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = { name?: string; code?: string; description?: string; - users?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + users?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + createdBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = - { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { action?: string; actionParameters?: unknown; subject?: string; properties?: unknown; conditions?: unknown; - role?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + role?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + createdBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = - { [key: string]: any }; - -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation = +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: MpaaEstablishmentStageStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData; + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageStatLocationDataAttributesMembersDataItemAttributes = { - [key: string]: any; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = + { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesMembersDataItem = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesMembersDataItemAttributes; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = + { + id?: number; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + }; -export type MpaaEstablishmentStageStatLocationDataAttributesMembers = { - data?: MpaaEstablishmentStageStatLocationDataAttributesMembersDataItem[]; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = + { + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + }; -export type MpaaEstablishmentStageStatLocationDataAttributesGroupsDataItemAttributes = { - [key: string]: any; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = + { [key: string]: any }; -export type MpaaEstablishmentStageStatLocationDataAttributesGroupsDataItem = { - id?: number; - attributes?: MpaaEstablishmentStageStatLocationDataAttributesGroupsDataItemAttributes; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = + { + id?: number; + attributes?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + }; -export type MpaaEstablishmentStageStatLocationDataAttributesGroups = { - data?: MpaaEstablishmentStageStatLocationDataAttributesGroupsDataItem[]; -}; +export type MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = + { + data?: MpaaProtectionLevelStatMpaaProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; + }; -export type MpaaEstablishmentStageStatListResponseMetaPagination = { +export type MpaaProtectionLevelStatListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type MpaaEstablishmentStageStatListResponseMeta = { - pagination?: MpaaEstablishmentStageStatListResponseMetaPagination; +export type MpaaProtectionLevelStatListResponseMeta = { + pagination?: MpaaProtectionLevelStatListResponseMetaPagination; }; -export interface MpaaEstablishmentStageStatListResponseDataItem { +export interface MpaaProtectionLevelStatListResponseDataItem { id?: number; - attributes?: MpaaEstablishmentStageStat; + attributes?: MpaaProtectionLevelStat; } -export interface MpaaEstablishmentStageStatListResponse { - data?: MpaaEstablishmentStageStatListResponseDataItem[]; - meta?: MpaaEstablishmentStageStatListResponseMeta; +export interface MpaaProtectionLevelStatListResponse { + data?: MpaaProtectionLevelStatListResponseDataItem[]; + meta?: MpaaProtectionLevelStatListResponseMeta; } -export type MpaaEstablishmentStageResponseMeta = { [key: string]: any }; +export type MpaaProtectionLevelResponseMeta = { [key: string]: any }; -export interface MpaaEstablishmentStageResponse { - data?: MpaaEstablishmentStageResponseDataObject; - meta?: MpaaEstablishmentStageResponseMeta; +export interface MpaaProtectionLevelResponseDataObject { + id?: number; + attributes?: MpaaProtectionLevel; } -export type MpaaEstablishmentStageLocalizations = { - data?: MpaaEstablishmentStage[]; -}; - -export interface MpaaEstablishmentStage { - slug: string; - name: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageCreatedBy; - updatedBy?: MpaaEstablishmentStageUpdatedBy; - localizations?: MpaaEstablishmentStageLocalizations; - locale?: string; +export interface MpaaProtectionLevelResponse { + data?: MpaaProtectionLevelResponseDataObject; + meta?: MpaaProtectionLevelResponseMeta; } -export interface MpaaEstablishmentStageResponseDataObject { - id?: number; - attributes?: MpaaEstablishmentStage; -} +export type MpaaProtectionLevelLocalizations = { + data?: MpaaProtectionLevel[]; +}; -export type MpaaEstablishmentStageUpdatedByDataAttributes = { [key: string]: any }; +export type MpaaProtectionLevelUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageUpdatedByData = { +export type MpaaProtectionLevelUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageUpdatedBy = { - data?: MpaaEstablishmentStageUpdatedByData; +export type MpaaProtectionLevelUpdatedBy = { + data?: MpaaProtectionLevelUpdatedByData; }; -export type MpaaEstablishmentStageCreatedByData = { +export type MpaaProtectionLevelCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedBy = { - data?: MpaaEstablishmentStageCreatedByData; +export type MpaaProtectionLevelCreatedBy = { + data?: MpaaProtectionLevelCreatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedByDataAttributes = { +export interface MpaaProtectionLevel { + slug: string; + name: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelCreatedBy; + updatedBy?: MpaaProtectionLevelUpdatedBy; + localizations?: MpaaProtectionLevelLocalizations; + locale?: string; +} + +export type MpaaProtectionLevelCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; -export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedByData = { +export type MpaaProtectionLevelCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedByData; +export type MpaaProtectionLevelCreatedByDataAttributesUpdatedBy = { + data?: MpaaProtectionLevelCreatedByDataAttributesUpdatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributes = { +export type MpaaProtectionLevelCreatedByDataAttributes = { firstname?: string; lastname?: string; username?: string; @@ -4288,315 +4342,284 @@ export type MpaaEstablishmentStageCreatedByDataAttributes = { resetPasswordToken?: string; registrationToken?: string; isActive?: boolean; - roles?: MpaaEstablishmentStageCreatedByDataAttributesRoles; + roles?: MpaaProtectionLevelCreatedByDataAttributesRoles; blocked?: boolean; preferedLanguage?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaaEstablishmentStageCreatedByDataAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedBy; + createdBy?: MpaaProtectionLevelCreatedByDataAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelCreatedByDataAttributesUpdatedBy; }; -export type MpaaEstablishmentStageCreatedByDataAttributesCreatedByDataAttributes = { +export type MpaaProtectionLevelCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaaEstablishmentStageCreatedByDataAttributesCreatedByData = { +export type MpaaProtectionLevelCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesCreatedByDataAttributes; -}; - -export type MpaaEstablishmentStageCreatedByDataAttributesCreatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesCreatedByData; + attributes?: MpaaProtectionLevelCreatedByDataAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +export type MpaaProtectionLevelCreatedByDataAttributesCreatedBy = { + data?: MpaaProtectionLevelCreatedByDataAttributesCreatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItem = { +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItem = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRoles = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItem[]; +export type MpaaProtectionLevelCreatedByDataAttributesRoles = { + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItem[]; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByData; +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = - { - id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; - }; +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { + id?: number; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; +}; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions = { + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { id?: number; - attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + attributes?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; }; -export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; +export type MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: MpaaProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; -export type MpaaEstablishmentStageListResponseMetaPagination = { +export type MpaaProtectionLevelListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type MpaaEstablishmentStageListResponseMeta = { - pagination?: MpaaEstablishmentStageListResponseMetaPagination; +export type MpaaProtectionLevelListResponseMeta = { + pagination?: MpaaProtectionLevelListResponseMetaPagination; }; -export interface MpaaEstablishmentStageListResponseDataItem { +export interface MpaaProtectionLevelListResponseDataItem { id?: number; - attributes?: MpaaEstablishmentStage; + attributes?: MpaaProtectionLevel; } -export interface MpaaEstablishmentStageListResponse { - data?: MpaaEstablishmentStageListResponseDataItem[]; - meta?: MpaaEstablishmentStageListResponseMeta; +export interface MpaaProtectionLevelListResponse { + data?: MpaaProtectionLevelListResponseDataItem[]; + meta?: MpaaProtectionLevelListResponseMeta; } -export type MpaaEstablishmentStageLocalizationListResponseMetaPagination = { +export type MpaaProtectionLevelLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type MpaaEstablishmentStageLocalizationListResponseMeta = { - pagination?: MpaaEstablishmentStageLocalizationListResponseMetaPagination; +export type MpaaProtectionLevelLocalizationListResponseMeta = { + pagination?: MpaaProtectionLevelLocalizationListResponseMetaPagination; }; -export interface MpaaEstablishmentStageListResponseDataItemLocalized { +export interface MpaaProtectionLevelListResponseDataItemLocalized { id?: number; - attributes?: MpaaEstablishmentStage; + attributes?: MpaaProtectionLevel; } -export interface MpaaEstablishmentStageLocalizationListResponse { - data?: MpaaEstablishmentStageListResponseDataItemLocalized[]; - meta?: MpaaEstablishmentStageLocalizationListResponseMeta; +export interface MpaaProtectionLevelLocalizationListResponse { + data?: MpaaProtectionLevelListResponseDataItemLocalized[]; + meta?: MpaaProtectionLevelLocalizationListResponseMeta; } -export type MpaaEstablishmentStageLocalizationResponseMeta = { [key: string]: any }; +export type MpaaProtectionLevelLocalizationResponseMeta = { [key: string]: any }; -export interface MpaaEstablishmentStageResponseDataObjectLocalized { +export interface MpaaProtectionLevelResponseDataObjectLocalized { id?: number; - attributes?: MpaaEstablishmentStage; + attributes?: MpaaProtectionLevel; } -export interface MpaaEstablishmentStageLocalizationResponse { - data?: MpaaEstablishmentStageResponseDataObjectLocalized; - meta?: MpaaEstablishmentStageLocalizationResponseMeta; +export interface MpaaProtectionLevelLocalizationResponse { + data?: MpaaProtectionLevelResponseDataObjectLocalized; + meta?: MpaaProtectionLevelLocalizationResponseMeta; } -export type MpaaEstablishmentStageRequestData = { +export type MpaaProtectionLevelRequestData = { slug: string; name: string; info?: string; locale?: string; }; -export interface MpaaEstablishmentStageRequest { - data: MpaaEstablishmentStageRequestData; +export interface MpaaProtectionLevelRequest { + data: MpaaProtectionLevelRequestData; } -export interface MpaaEstablishmentStageLocalizationRequest { +export interface MpaaProtectionLevelLocalizationRequest { slug: string; name: string; info?: string; locale: string; } -export type MpaIucnCategoryResponseMeta = { [key: string]: any }; - -export interface MpaIucnCategoryResponseDataObject { - id?: number; - attributes?: MpaIucnCategory; -} +export type MpaaEstablishmentStageResponseMeta = { [key: string]: any }; -export interface MpaIucnCategoryResponse { - data?: MpaIucnCategoryResponseDataObject; - meta?: MpaIucnCategoryResponseMeta; +export interface MpaaEstablishmentStageResponse { + data?: MpaaEstablishmentStageResponseDataObject; + meta?: MpaaEstablishmentStageResponseMeta; } -export type MpaIucnCategoryLocalizations = { - data?: MpaIucnCategory[]; +export type MpaaEstablishmentStageLocalizations = { + data?: MpaaEstablishmentStage[]; }; -export type MpaIucnCategoryUpdatedByDataAttributes = { [key: string]: any }; +export type MpaaEstablishmentStageUpdatedByDataAttributes = { [key: string]: any }; -export type MpaIucnCategoryUpdatedByData = { +export type MpaaEstablishmentStageUpdatedByData = { id?: number; - attributes?: MpaIucnCategoryUpdatedByDataAttributes; + attributes?: MpaaEstablishmentStageUpdatedByDataAttributes; }; -export type MpaIucnCategoryUpdatedBy = { - data?: MpaIucnCategoryUpdatedByData; +export type MpaaEstablishmentStageUpdatedBy = { + data?: MpaaEstablishmentStageUpdatedByData; }; -export type MpaIucnCategoryCreatedByData = { +export type MpaaEstablishmentStageCreatedByData = { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributes; }; -export type MpaIucnCategoryCreatedBy = { - data?: MpaIucnCategoryCreatedByData; +export type MpaaEstablishmentStageCreatedBy = { + data?: MpaaEstablishmentStageCreatedByData; }; -export interface MpaIucnCategory { +export interface MpaaEstablishmentStage { slug: string; name: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaIucnCategoryCreatedBy; - updatedBy?: MpaIucnCategoryUpdatedBy; - localizations?: MpaIucnCategoryLocalizations; + createdBy?: MpaaEstablishmentStageCreatedBy; + updatedBy?: MpaaEstablishmentStageUpdatedBy; + localizations?: MpaaEstablishmentStageLocalizations; locale?: string; } -export type MpaIucnCategoryCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; - -export type MpaIucnCategoryCreatedByDataAttributesUpdatedByData = { - id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesUpdatedByDataAttributes; -}; - -export type MpaIucnCategoryCreatedByDataAttributesUpdatedBy = { - data?: MpaIucnCategoryCreatedByDataAttributesUpdatedByData; -}; - -export type MpaIucnCategoryCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; - -export type MpaIucnCategoryCreatedByDataAttributesCreatedByData = { +export interface MpaaEstablishmentStageResponseDataObject { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesCreatedByDataAttributes; -}; - -export type MpaIucnCategoryCreatedByDataAttributesCreatedBy = { - data?: MpaIucnCategoryCreatedByDataAttributesCreatedByData; -}; + attributes?: MpaaEstablishmentStage; +} -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedByDataAttributes = { + [key: string]: any; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItem = { +export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedByDataAttributes; }; -export type MpaIucnCategoryCreatedByDataAttributesRoles = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItem[]; +export type MpaaEstablishmentStageCreatedByDataAttributesUpdatedBy = { + data?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedByData; }; -export type MpaIucnCategoryCreatedByDataAttributes = { +export type MpaaEstablishmentStageCreatedByDataAttributes = { firstname?: string; lastname?: string; username?: string; @@ -4604,977 +4627,303 @@ export type MpaIucnCategoryCreatedByDataAttributes = { resetPasswordToken?: string; registrationToken?: string; isActive?: boolean; - roles?: MpaIucnCategoryCreatedByDataAttributesRoles; + roles?: MpaaEstablishmentStageCreatedByDataAttributesRoles; blocked?: boolean; preferedLanguage?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaIucnCategoryCreatedByDataAttributesCreatedBy; - updatedBy?: MpaIucnCategoryCreatedByDataAttributesUpdatedBy; + createdBy?: MpaaEstablishmentStageCreatedByDataAttributesCreatedBy; + updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesUpdatedBy; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { +export type MpaaEstablishmentStageCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { +export type MpaaEstablishmentStageCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesCreatedByDataAttributes; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; +export type MpaaEstablishmentStageCreatedByDataAttributesCreatedBy = { + data?: MpaaEstablishmentStageCreatedByDataAttributesCreatedByData; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { - [key: string]: any; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributes; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { +export type MpaaEstablishmentStageCreatedByDataAttributesRoles = { + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItem[]; +}; + +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByData; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = - { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = - { [key: string]: any }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = - { - id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = - { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; - }; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { - [key: string]: any; -}; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { - id?: number; - attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; -}; - -export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; -}; - -export type MpaIucnCategoryListResponseMetaPagination = { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; -}; - -export type MpaIucnCategoryListResponseMeta = { - pagination?: MpaIucnCategoryListResponseMetaPagination; -}; - -export interface MpaIucnCategoryListResponseDataItem { - id?: number; - attributes?: MpaIucnCategory; -} - -export interface MpaIucnCategoryListResponse { - data?: MpaIucnCategoryListResponseDataItem[]; - meta?: MpaIucnCategoryListResponseMeta; -} - -export type MpaIucnCategoryLocalizationListResponseMetaPagination = { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; -}; - -export type MpaIucnCategoryLocalizationListResponseMeta = { - pagination?: MpaIucnCategoryLocalizationListResponseMetaPagination; -}; - -export interface MpaIucnCategoryListResponseDataItemLocalized { - id?: number; - attributes?: MpaIucnCategory; -} - -export interface MpaIucnCategoryLocalizationListResponse { - data?: MpaIucnCategoryListResponseDataItemLocalized[]; - meta?: MpaIucnCategoryLocalizationListResponseMeta; -} - -export type MpaIucnCategoryLocalizationResponseMeta = { [key: string]: any }; - -export interface MpaIucnCategoryResponseDataObjectLocalized { - id?: number; - attributes?: MpaIucnCategory; -} - -export interface MpaIucnCategoryLocalizationResponse { - data?: MpaIucnCategoryResponseDataObjectLocalized; - meta?: MpaIucnCategoryLocalizationResponseMeta; -} - -export type MpaIucnCategoryRequestData = { - slug: string; - name: string; - info?: string; - locale?: string; -}; - -export interface MpaIucnCategoryRequest { - data: MpaIucnCategoryRequestData; -} - -export interface MpaIucnCategoryLocalizationRequest { - slug: string; - name: string; - info?: string; - locale: string; -} - -export type MpaResponseMeta = { [key: string]: any }; - -export interface MpaResponseDataObject { - id?: number; - attributes?: Mpa; -} - -export interface MpaResponse { - data?: MpaResponseDataObject; - meta?: MpaResponseMeta; -} - -export type MpaUpdatedByDataAttributes = { [key: string]: any }; - -export type MpaUpdatedByData = { - id?: number; - attributes?: MpaUpdatedByDataAttributes; -}; - -export type MpaUpdatedBy = { - data?: MpaUpdatedByData; -}; - -export interface Mpa { - name: string; - area: number; - year?: number; - protection_status?: MpaProtectionStatus; - bbox: unknown; - children?: MpaChildren; - data_source?: MpaDataSource; - mpaa_establishment_stage?: MpaMpaaEstablishmentStage; - location?: MpaLocation; - wdpaid?: string; - mpaa_protection_level?: MpaMpaaProtectionLevel; - is_child: boolean; - mpa_iucn_category?: MpaMpaIucnCategory; - designation?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaCreatedBy; - updatedBy?: MpaUpdatedBy; -} - -export type MpaCreatedByDataAttributes = { [key: string]: any }; - -export type MpaCreatedByData = { - id?: number; - attributes?: MpaCreatedByDataAttributes; -}; - -export type MpaCreatedBy = { - data?: MpaCreatedByData; -}; - -export type MpaMpaIucnCategoryDataAttributes = { [key: string]: any }; - -export type MpaMpaIucnCategoryData = { - id?: number; - attributes?: MpaMpaIucnCategoryDataAttributes; -}; - -export type MpaMpaIucnCategory = { - data?: MpaMpaIucnCategoryData; -}; - -export type MpaMpaaProtectionLevelDataAttributes = { [key: string]: any }; - -export type MpaMpaaProtectionLevelData = { - id?: number; - attributes?: MpaMpaaProtectionLevelDataAttributes; -}; - -export type MpaMpaaProtectionLevel = { - data?: MpaMpaaProtectionLevelData; -}; - -export type MpaLocationDataAttributes = { [key: string]: any }; - -export type MpaLocationData = { - id?: number; - attributes?: MpaLocationDataAttributes; -}; - -export type MpaLocation = { - data?: MpaLocationData; -}; - -export type MpaMpaaEstablishmentStageDataAttributes = { [key: string]: any }; - -export type MpaMpaaEstablishmentStageData = { - id?: number; - attributes?: MpaMpaaEstablishmentStageDataAttributes; -}; - -export type MpaMpaaEstablishmentStage = { - data?: MpaMpaaEstablishmentStageData; -}; - -export type MpaDataSourceDataAttributes = { [key: string]: any }; - -export type MpaDataSourceData = { - id?: number; - attributes?: MpaDataSourceDataAttributes; -}; - -export type MpaDataSource = { - data?: MpaDataSourceData; -}; - -export type MpaChildrenDataItem = { - id?: number; - attributes?: MpaChildrenDataItemAttributes; -}; - -export type MpaChildren = { - data?: MpaChildrenDataItem[]; -}; - -export type MpaChildrenDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; - -export type MpaChildrenDataItemAttributesUpdatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesUpdatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesUpdatedBy = { - data?: MpaChildrenDataItemAttributesUpdatedByData; -}; - -export type MpaChildrenDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; - -export type MpaChildrenDataItemAttributesCreatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesCreatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesCreatedByData; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesLocalizations = { - data?: unknown[]; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributes = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesLocalizations; - locale?: string; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributes; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategory = { - data?: MpaChildrenDataItemAttributesMpaIucnCategoryData; -}; - -export type MpaChildrenDataItemAttributes = { - name?: string; - area?: number; - year?: number; - protection_status?: MpaChildrenDataItemAttributesProtectionStatus; - bbox?: unknown; - children?: MpaChildrenDataItemAttributesChildren; - data_source?: MpaChildrenDataItemAttributesDataSource; - mpaa_establishment_stage?: MpaChildrenDataItemAttributesMpaaEstablishmentStage; - location?: MpaChildrenDataItemAttributesLocation; - wdpaid?: string; - mpaa_protection_level?: MpaChildrenDataItemAttributesMpaaProtectionLevel; - is_child?: boolean; - mpa_iucn_category?: MpaChildrenDataItemAttributesMpaIucnCategory; - designation?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesUpdatedBy; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedByDataAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedBy = { - data?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesUpdatedByData; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedByDataAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesMpaIucnCategoryDataAttributesCreatedByData; -}; - -export type MpaChildrenDataItemAttributesMpaaProtectionLevelData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesMpaaProtectionLevelDataAttributes; -}; - -export type MpaChildrenDataItemAttributesMpaaProtectionLevel = { - data?: MpaChildrenDataItemAttributesMpaaProtectionLevelData; -}; - -export type MpaChildrenDataItemAttributesMpaaProtectionLevelDataAttributes = { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributes; -}; - -export type MpaChildrenDataItemAttributesLocation = { - data?: MpaChildrenDataItemAttributesLocationData; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesLocalizations = { - data?: unknown[]; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesUpdatedByDataAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesUpdatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesUpdatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesUpdatedBy = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesUpdatedByData; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributes = { - code?: string; - name?: string; - totalMarineArea?: number; - type?: string; - groups?: MpaChildrenDataItemAttributesLocationDataAttributesGroups; - members?: MpaChildrenDataItemAttributesLocationDataAttributesMembers; - fishing_protection_level_stats?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesLocationDataAttributesLocalizations; - locale?: string; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesCreatedByDataAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesCreatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesCreatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesCreatedByData; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItem = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStats = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItem[]; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributes = - { - location?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; - year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItem = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStats = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = - { - location?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; - area?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = - { - slug?: string; - name?: string; - info?: string; + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; createdAt?: string; updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; - locale?: string; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; + createdBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItem = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStats = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItem[]; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissions = { + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = - { - location?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; - fishing_protection_level?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; - area?: number; - pct?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = - { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; - locale?: string; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = { id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy = - { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData; + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; -export type MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationData = - { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocationDataAttributes; - }; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMembersDataItemAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMembersDataItem = { - id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesMembersDataItemAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesMembers = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesMembersDataItem[]; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesGroupsDataItemAttributes = { - [key: string]: any; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesGroupsDataItem = { +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { id?: number; - attributes?: MpaChildrenDataItemAttributesLocationDataAttributesGroupsDataItemAttributes; -}; - -export type MpaChildrenDataItemAttributesLocationDataAttributesGroups = { - data?: MpaChildrenDataItemAttributesLocationDataAttributesGroupsDataItem[]; + attributes?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStage = { - data?: MpaChildrenDataItemAttributesMpaaEstablishmentStageData; +export type MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: MpaaEstablishmentStageCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesLocalizations = { - data?: unknown[]; +export type MpaaEstablishmentStageListResponseMetaPagination = { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributes = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesLocalizations; - locale?: string; +export type MpaaEstablishmentStageListResponseMeta = { + pagination?: MpaaEstablishmentStageListResponseMetaPagination; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageData = { +export interface MpaaEstablishmentStageListResponseDataItem { id?: number; - attributes?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributes; -}; + attributes?: MpaaEstablishmentStage; +} -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export interface MpaaEstablishmentStageListResponse { + data?: MpaaEstablishmentStageListResponseDataItem[]; + meta?: MpaaEstablishmentStageListResponseMeta; +} -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByDataAttributes; +export type MpaaEstablishmentStageLocalizationListResponseMetaPagination = { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedBy = { - data?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesUpdatedByData; +export type MpaaEstablishmentStageLocalizationListResponseMeta = { + pagination?: MpaaEstablishmentStageLocalizationListResponseMetaPagination; }; -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByData = { +export interface MpaaEstablishmentStageListResponseDataItemLocalized { id?: number; - attributes?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByDataAttributes; -}; - -export type MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesMpaaEstablishmentStageDataAttributesCreatedByData; -}; - -export type MpaChildrenDataItemAttributesDataSource = { - data?: MpaChildrenDataItemAttributesDataSourceData; -}; + attributes?: MpaaEstablishmentStage; +} -export type MpaChildrenDataItemAttributesDataSourceDataAttributesLocalizations = { - data?: unknown[]; -}; +export interface MpaaEstablishmentStageLocalizationListResponse { + data?: MpaaEstablishmentStageListResponseDataItemLocalized[]; + meta?: MpaaEstablishmentStageLocalizationListResponseMeta; +} -export type MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByDataAttributes = { - [key: string]: any; -}; +export type MpaaEstablishmentStageLocalizationResponseMeta = { [key: string]: any }; -export type MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByData = { +export interface MpaaEstablishmentStageResponseDataObjectLocalized { id?: number; - attributes?: MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByDataAttributes; -}; + attributes?: MpaaEstablishmentStage; +} -export type MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedBy = { - data?: MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedByData; -}; +export interface MpaaEstablishmentStageLocalizationResponse { + data?: MpaaEstablishmentStageResponseDataObjectLocalized; + meta?: MpaaEstablishmentStageLocalizationResponseMeta; +} -export type MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedByDataAttributes = { - [key: string]: any; +export type MpaaEstablishmentStageRequestData = { + slug: string; + name: string; + info?: string; + locale?: string; }; -export type MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedByData = { - id?: number; - attributes?: MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedByDataAttributes; -}; +export interface MpaaEstablishmentStageRequest { + data: MpaaEstablishmentStageRequestData; +} + +export interface MpaaEstablishmentStageLocalizationRequest { + slug: string; + name: string; + info?: string; + locale: string; +} + +export type MpaIucnCategoryResponseMeta = { [key: string]: any }; -export type MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedBy = { - data?: MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedByData; +export type MpaIucnCategoryLocalizations = { + data?: MpaIucnCategory[]; }; -export type MpaChildrenDataItemAttributesDataSourceDataAttributes = { - slug?: string; - title?: string; - url?: string; +export interface MpaIucnCategory { + slug: string; + name: string; + info?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaChildrenDataItemAttributesDataSourceDataAttributesCreatedBy; - updatedBy?: MpaChildrenDataItemAttributesDataSourceDataAttributesUpdatedBy; - localizations?: MpaChildrenDataItemAttributesDataSourceDataAttributesLocalizations; + createdBy?: MpaIucnCategoryCreatedBy; + updatedBy?: MpaIucnCategoryUpdatedBy; + localizations?: MpaIucnCategoryLocalizations; locale?: string; -}; +} -export type MpaChildrenDataItemAttributesDataSourceData = { +export interface MpaIucnCategoryResponseDataObject { id?: number; - attributes?: MpaChildrenDataItemAttributesDataSourceDataAttributes; -}; + attributes?: MpaIucnCategory; +} + +export interface MpaIucnCategoryResponse { + data?: MpaIucnCategoryResponseDataObject; + meta?: MpaIucnCategoryResponseMeta; +} -export type MpaChildrenDataItemAttributesChildrenDataItemAttributes = { [key: string]: any }; +export type MpaIucnCategoryUpdatedByDataAttributes = { [key: string]: any }; -export type MpaChildrenDataItemAttributesChildrenDataItem = { +export type MpaIucnCategoryUpdatedByData = { id?: number; - attributes?: MpaChildrenDataItemAttributesChildrenDataItemAttributes; + attributes?: MpaIucnCategoryUpdatedByDataAttributes; }; -export type MpaChildrenDataItemAttributesChildren = { - data?: MpaChildrenDataItemAttributesChildrenDataItem[]; +export type MpaIucnCategoryUpdatedBy = { + data?: MpaIucnCategoryUpdatedByData; }; -export type MpaChildrenDataItemAttributesProtectionStatusDataAttributes = { [key: string]: any }; - -export type MpaChildrenDataItemAttributesProtectionStatusData = { +export type MpaIucnCategoryCreatedByData = { id?: number; - attributes?: MpaChildrenDataItemAttributesProtectionStatusDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributes; }; -export type MpaChildrenDataItemAttributesProtectionStatus = { - data?: MpaChildrenDataItemAttributesProtectionStatusData; +export type MpaIucnCategoryCreatedBy = { + data?: MpaIucnCategoryCreatedByData; }; -export type MpaProtectionStatus = { - data?: MpaProtectionStatusData; +export type MpaIucnCategoryCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; + +export type MpaIucnCategoryCreatedByDataAttributesUpdatedByData = { + id?: number; + attributes?: MpaIucnCategoryCreatedByDataAttributesUpdatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesLocalizations = { - data?: unknown[]; +export type MpaIucnCategoryCreatedByDataAttributesUpdatedBy = { + data?: MpaIucnCategoryCreatedByDataAttributesUpdatedByData; }; -export type MpaProtectionStatusDataAttributesUpdatedByDataAttributes = { [key: string]: any }; +export type MpaIucnCategoryCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaProtectionStatusDataAttributesUpdatedByData = { +export type MpaIucnCategoryCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesCreatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesUpdatedBy = { - data?: MpaProtectionStatusDataAttributesUpdatedByData; +export type MpaIucnCategoryCreatedByDataAttributesCreatedBy = { + data?: MpaIucnCategoryCreatedByDataAttributesCreatedByData; }; -export type MpaProtectionStatusDataAttributes = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaProtectionStatusDataAttributesCreatedBy; - updatedBy?: MpaProtectionStatusDataAttributesUpdatedBy; - localizations?: MpaProtectionStatusDataAttributesLocalizations; - locale?: string; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributes; }; -export type MpaProtectionStatusData = { - id?: number; - attributes?: MpaProtectionStatusDataAttributes; +export type MpaIucnCategoryCreatedByDataAttributesRoles = { + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItem[]; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributes = { +export type MpaIucnCategoryCreatedByDataAttributes = { firstname?: string; lastname?: string; username?: string; @@ -5582,228 +4931,226 @@ export type MpaProtectionStatusDataAttributesCreatedByDataAttributes = { resetPasswordToken?: string; registrationToken?: string; isActive?: boolean; - roles?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRoles; + roles?: MpaIucnCategoryCreatedByDataAttributesRoles; blocked?: boolean; preferedLanguage?: string; createdAt?: string; updatedAt?: string; - createdBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedBy; + createdBy?: MpaIucnCategoryCreatedByDataAttributesCreatedBy; + updatedBy?: MpaIucnCategoryCreatedByDataAttributesUpdatedBy; +}; + +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { + [key: string]: any; }; -export type MpaProtectionStatusDataAttributesCreatedByData = { +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedBy = { - data?: MpaProtectionStatusDataAttributesCreatedByData; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByData = { +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedBy = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesUpdatedByData; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByDataAttributes = { - [key: string]: any; -}; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByData = { +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedBy = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesCreatedByData; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissions = { + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributes = { +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributes = { name?: string; code?: string; description?: string; - users?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + users?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissions; createdAt?: string; updatedAt?: string; - createdBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItem = { - id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributes; -}; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRoles = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItem[]; + createdBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = - { - id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; - }; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = - { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; - }; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = { id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; - }; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = - { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = { - id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = - { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; - }; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { + [key: string]: any; +}; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = - { [key: string]: any }; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { + id?: number; + attributes?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; +}; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = - { - id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; - }; +export type MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: MpaIucnCategoryCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; +}; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = - { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; - }; +export type MpaIucnCategoryListResponseMetaPagination = { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; +}; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = - { [key: string]: any }; +export type MpaIucnCategoryListResponseMeta = { + pagination?: MpaIucnCategoryListResponseMetaPagination; +}; -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = - { - id?: number; - attributes?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; - }; +export interface MpaIucnCategoryListResponseDataItem { + id?: number; + attributes?: MpaIucnCategory; +} -export type MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: MpaProtectionStatusDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; -}; +export interface MpaIucnCategoryListResponse { + data?: MpaIucnCategoryListResponseDataItem[]; + meta?: MpaIucnCategoryListResponseMeta; +} -export type MpaListResponseMetaPagination = { +export type MpaIucnCategoryLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type MpaListResponseMeta = { - pagination?: MpaListResponseMetaPagination; +export type MpaIucnCategoryLocalizationListResponseMeta = { + pagination?: MpaIucnCategoryLocalizationListResponseMetaPagination; }; -export interface MpaListResponseDataItem { +export interface MpaIucnCategoryListResponseDataItemLocalized { id?: number; - attributes?: Mpa; + attributes?: MpaIucnCategory; } -export interface MpaListResponse { - data?: MpaListResponseDataItem[]; - meta?: MpaListResponseMeta; +export interface MpaIucnCategoryLocalizationListResponse { + data?: MpaIucnCategoryListResponseDataItemLocalized[]; + meta?: MpaIucnCategoryLocalizationListResponseMeta; } -export type LocationResponseMeta = { [key: string]: any }; +export type MpaIucnCategoryLocalizationResponseMeta = { [key: string]: any }; -export interface LocationResponse { - data?: LocationResponseDataObject; - meta?: LocationResponseMeta; +export interface MpaIucnCategoryResponseDataObjectLocalized { + id?: number; + attributes?: MpaIucnCategory; +} + +export interface MpaIucnCategoryLocalizationResponse { + data?: MpaIucnCategoryResponseDataObjectLocalized; + meta?: MpaIucnCategoryLocalizationResponseMeta; } -export type LocationLocalizations = { - data?: Location[]; +export type MpaIucnCategoryRequestData = { + slug: string; + name: string; + info?: string; + locale?: string; }; +export interface MpaIucnCategoryRequest { + data: MpaIucnCategoryRequestData; +} + +export interface MpaIucnCategoryLocalizationRequest { + slug: string; + name: string; + info?: string; + locale: string; +} + +export type LocationResponseMeta = { [key: string]: any }; + export interface Location { code: string; name: string; - totalMarineArea: number; + total_marine_area: string; type: string; groups?: LocationGroups; members?: LocationMembers; fishing_protection_level_stats?: LocationFishingProtectionLevelStats; mpaa_protection_level_stats?: LocationMpaaProtectionLevelStats; protection_coverage_stats?: LocationProtectionCoverageStats; - bounds?: unknown; + marine_bounds?: unknown; + total_terrestrial_area: string; + terrestrial_bounds?: unknown; + name_es: string; + name_fr: string; + marine_target?: number; + marine_target_year?: number; createdAt?: string; updatedAt?: string; createdBy?: LocationCreatedBy; updatedBy?: LocationUpdatedBy; - localizations?: LocationLocalizations; - locale?: string; } export interface LocationResponseDataObject { @@ -5811,6 +5158,11 @@ export interface LocationResponseDataObject { attributes?: Location; } +export interface LocationResponse { + data?: LocationResponseDataObject; + meta?: LocationResponseMeta; +} + export type LocationUpdatedByDataAttributes = { [key: string]: any }; export type LocationUpdatedByData = { @@ -5844,15 +5196,15 @@ export type LocationProtectionCoverageStats = { data?: LocationProtectionCoverageStatsDataItem[]; }; -export type LocationMpaaProtectionLevelStatsDataItemAttributes = { [key: string]: any }; +export type LocationMpaaProtectionLevelStatsDataAttributes = { [key: string]: any }; -export type LocationMpaaProtectionLevelStatsDataItem = { +export type LocationMpaaProtectionLevelStatsData = { id?: number; - attributes?: LocationMpaaProtectionLevelStatsDataItemAttributes; + attributes?: LocationMpaaProtectionLevelStatsDataAttributes; }; export type LocationMpaaProtectionLevelStats = { - data?: LocationMpaaProtectionLevelStatsDataItem[]; + data?: LocationMpaaProtectionLevelStatsData; }; export type LocationFishingProtectionLevelStatsDataItemAttributes = { [key: string]: any }; @@ -5877,6 +5229,29 @@ export type LocationMembers = { data?: LocationMembersDataItem[]; }; +export type LocationGroupsDataItemAttributes = { + code?: string; + name?: string; + total_marine_area?: string; + type?: string; + groups?: LocationGroupsDataItemAttributesGroups; + members?: LocationGroupsDataItemAttributesMembers; + fishing_protection_level_stats?: LocationGroupsDataItemAttributesFishingProtectionLevelStats; + mpaa_protection_level_stats?: LocationGroupsDataItemAttributesMpaaProtectionLevelStats; + protection_coverage_stats?: LocationGroupsDataItemAttributesProtectionCoverageStats; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: LocationGroupsDataItemAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesUpdatedBy; +}; + export type LocationGroupsDataItem = { id?: number; attributes?: LocationGroupsDataItemAttributes; @@ -5886,10 +5261,6 @@ export type LocationGroups = { data?: LocationGroupsDataItem[]; }; -export type LocationGroupsDataItemAttributesLocalizations = { - data?: unknown[]; -}; - export type LocationGroupsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; export type LocationGroupsDataItemAttributesUpdatedByData = { @@ -5921,25 +5292,6 @@ export type LocationGroupsDataItemAttributesProtectionCoverageStats = { data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItem[]; }; -export type LocationGroupsDataItemAttributes = { - code?: string; - name?: string; - totalMarineArea?: number; - type?: string; - groups?: LocationGroupsDataItemAttributesGroups; - members?: LocationGroupsDataItemAttributesMembers; - fishing_protection_level_stats?: LocationGroupsDataItemAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: LocationGroupsDataItemAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: LocationGroupsDataItemAttributesProtectionCoverageStats; - bounds?: unknown; - createdAt?: string; - updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesUpdatedBy; - localizations?: LocationGroupsDataItemAttributesLocalizations; - locale?: string; -}; - export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -5966,79 +5318,78 @@ export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttri data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = + { + data?: unknown[]; + }; + +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = + { + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; + }; + +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { - data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + id?: number; + attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { + data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; +}; + export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributes = { location?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; createdAt?: string; updatedAt?: string; createdBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; updatedBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { id?: number; - attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = { - data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; - }; - -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = - { - data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; - }; - -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = - { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; - locale?: string; + attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - id?: number; - attributes?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; -export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = - { [key: string]: any }; - export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesLocationData = { id?: number; @@ -6049,120 +5400,121 @@ export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttri data?: LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributes = { - location?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; +export type LocationGroupsDataItemAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = + { [key: string]: any }; + +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributes = { + mpaa_protection_level?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; area?: number; + percentage?: number; + location?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocation; createdAt?: string; updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; + createdBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItem = { +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsData = { id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributes; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributes; }; export type LocationGroupsDataItemAttributesMpaaProtectionLevelStats = { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItem[]; + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { + id?: number; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; +}; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = { + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { + id?: number; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; +}; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = { + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = - { - id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; - }; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = + { [key: string]: any }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = - { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; - }; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { + id?: number; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; +}; + +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocation = { + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesLocationData; +}; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = + { + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations; + locale?: string; + }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; - }; - -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = - { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; - locale?: string; + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = { - data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; -}; +export type LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy = + { + data?: LocationGroupsDataItemAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData; + }; export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributes = { location?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesLocation; @@ -6212,11 +5564,30 @@ export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemA data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = + { + data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + }; + export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = + { + id?: number; + attributes?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; + }; + +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = + { + data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + }; + export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = { slug?: string; @@ -6236,23 +5607,22 @@ export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemA attributes?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; }; -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = - { - data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; - }; - -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData = - { - id?: number; - attributes?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes; - }; - -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy = +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = { - data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByData; + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; }; export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData = @@ -6294,6 +5664,19 @@ export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemA data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; }; +export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = + { + name?: string; + code?: string; + description?: string; + users?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; + }; + export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = { id?: number; @@ -6305,24 +5688,6 @@ export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemA data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; }; -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = - { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; - }; - export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -6376,19 +5741,6 @@ export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemA data?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = - { - name?: string; - code?: string; - description?: string; - users?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; - }; - export type LocationGroupsDataItemAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -6495,96 +5847,11 @@ export type LocationListResponseMeta = { export interface LocationListResponseDataItem { id?: number; attributes?: Location; -} - -export interface LocationListResponse { - data?: LocationListResponseDataItem[]; - meta?: LocationListResponseMeta; -} - -export type LocationLocalizationListResponseMetaPagination = { - page?: number; - pageSize?: number; - pageCount?: number; - total?: number; -}; - -export type LocationLocalizationListResponseMeta = { - pagination?: LocationLocalizationListResponseMetaPagination; -}; - -export interface LocationListResponseDataItemLocalized { - id?: number; - attributes?: Location; -} - -export interface LocationLocalizationListResponse { - data?: LocationListResponseDataItemLocalized[]; - meta?: LocationLocalizationListResponseMeta; -} - -export type LocationLocalizationResponseMeta = { [key: string]: any }; - -export interface LocationResponseDataObjectLocalized { - id?: number; - attributes?: Location; -} - -export interface LocationLocalizationResponse { - data?: LocationResponseDataObjectLocalized; - meta?: LocationLocalizationResponseMeta; -} - -export interface LocationRequest { - data: LocationRequestData; -} - -export type LocationRequestDataProtectionCoverageStatsItem = number | string; - -export type LocationRequestDataMpaaProtectionLevelStatsItem = number | string; - -export type LocationRequestDataFishingProtectionLevelStatsItem = number | string; - -export type LocationRequestDataMembersItem = number | string; - -export type LocationRequestDataGroupsItem = number | string; - -export type LocationRequestData = { - code: string; - name: string; - totalMarineArea: number; - type: string; - groups?: LocationRequestDataGroupsItem[]; - members?: LocationRequestDataMembersItem[]; - fishing_protection_level_stats?: LocationRequestDataFishingProtectionLevelStatsItem[]; - mpaa_protection_level_stats?: LocationRequestDataMpaaProtectionLevelStatsItem[]; - protection_coverage_stats?: LocationRequestDataProtectionCoverageStatsItem[]; - bounds?: unknown; - locale?: string; -}; - -export type LocationLocalizationRequestProtectionCoverageStatsItem = number | string; - -export type LocationLocalizationRequestMpaaProtectionLevelStatsItem = number | string; - -export type LocationLocalizationRequestFishingProtectionLevelStatsItem = number | string; - -export type LocationLocalizationRequestMembersItem = number | string; - -export type LocationLocalizationRequestGroupsItem = number | string; +} -export interface LocationLocalizationRequest { - code: string; - name: string; - totalMarineArea: number; - type: string; - groups?: LocationLocalizationRequestGroupsItem[]; - members?: LocationLocalizationRequestMembersItem[]; - fishing_protection_level_stats?: LocationLocalizationRequestFishingProtectionLevelStatsItem[]; - mpaa_protection_level_stats?: LocationLocalizationRequestMpaaProtectionLevelStatsItem[]; - protection_coverage_stats?: LocationLocalizationRequestProtectionCoverageStatsItem[]; - bounds?: unknown; - locale: string; +export interface LocationListResponse { + data?: LocationListResponseDataItem[]; + meta?: LocationListResponseMeta; } export type LegendLegendComponentItemsItem = { @@ -6660,32 +5927,6 @@ export type LayerCreatedBy = { data?: LayerCreatedByData; }; -export type LayerDatasetDataAttributesLocalizations = { - data?: unknown[]; -}; - -export type LayerDatasetDataAttributes = { - name?: string; - layers?: LayerDatasetDataAttributesLayers; - slug?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: LayerDatasetDataAttributesCreatedBy; - updatedBy?: LayerDatasetDataAttributesUpdatedBy; - localizations?: LayerDatasetDataAttributesLocalizations; - locale?: string; -}; - -export type LayerDatasetData = { - id?: number; - attributes?: LayerDatasetDataAttributes; -}; - -export type LayerDataset = { - data?: LayerDatasetData; -}; - export interface Layer { title: string; type?: LayerType; @@ -6696,6 +5937,7 @@ export interface Layer { dataset?: LayerDataset; legend_config?: LegendLegendComponent; default?: boolean; + environment?: LayerEnvironment; createdAt?: string; updatedAt?: string; publishedAt?: string; @@ -6705,6 +5947,30 @@ export interface Layer { locale?: string; } +export type LayerEnvironmentDataAttributes = { [key: string]: any }; + +export type LayerEnvironmentData = { + id?: number; + attributes?: LayerEnvironmentDataAttributes; +}; + +export type LayerEnvironment = { + data?: LayerEnvironmentData; +}; + +export type LayerDatasetData = { + id?: number; + attributes?: LayerDatasetDataAttributes; +}; + +export type LayerDataset = { + data?: LayerDatasetData; +}; + +export type LayerDatasetDataAttributesLocalizations = { + data?: unknown[]; +}; + export type LayerDatasetDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type LayerDatasetDataAttributesUpdatedByData = { @@ -6727,10 +5993,28 @@ export type LayerDatasetDataAttributesCreatedBy = { data?: LayerDatasetDataAttributesCreatedByData; }; +export type LayerDatasetDataAttributesLayersDataItem = { + id?: number; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributes; +}; + export type LayerDatasetDataAttributesLayers = { data?: LayerDatasetDataAttributesLayersDataItem[]; }; +export type LayerDatasetDataAttributes = { + name?: string; + layers?: LayerDatasetDataAttributesLayers; + slug?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: LayerDatasetDataAttributesCreatedBy; + updatedBy?: LayerDatasetDataAttributesUpdatedBy; + localizations?: LayerDatasetDataAttributesLocalizations; + locale?: string; +}; + export type LayerDatasetDataAttributesLayersDataItemAttributesLocalizations = { data?: unknown[]; }; @@ -6748,6 +6032,28 @@ export type LayerDatasetDataAttributesLayersDataItemAttributesUpdatedBy = { data?: LayerDatasetDataAttributesLayersDataItemAttributesUpdatedByData; }; +export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByData = { + id?: number; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributes; +}; + +export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedBy = { + data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByData; +}; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentData = { + id?: number; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributes; +}; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironment = { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentData; +}; + export type LayerDatasetDataAttributesLayersDataItemAttributes = { title?: string; type?: LayerDatasetDataAttributesLayersDataItemAttributesType; @@ -6758,6 +6064,7 @@ export type LayerDatasetDataAttributesLayersDataItemAttributes = { dataset?: LayerDatasetDataAttributesLayersDataItemAttributesDataset; legend_config?: LayerDatasetDataAttributesLayersDataItemAttributesLegendConfig; default?: boolean; + environment?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironment; createdAt?: string; updatedAt?: string; publishedAt?: string; @@ -6767,193 +6074,222 @@ export type LayerDatasetDataAttributesLayersDataItemAttributes = { locale?: string; }; -export type LayerDatasetDataAttributesLayersDataItem = { - id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributes; -}; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesLocalizations = + { + data?: unknown[]; + }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedBy; -}; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = + { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByData = { - id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributes; -}; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedByData = + { + id?: number; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; + }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByData; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedBy = { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesUpdatedByData; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedBy = { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByData; +}; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributes = { + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesCreatedByData; -}; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedBy = + { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedByData; + }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { - name?: string; - code?: string; - description?: string; - users?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; createdAt?: string; updatedAt?: string; - createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; + createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesUpdatedBy; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItem = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRoles = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItem[]; -}; - -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedBy = + { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesCreatedByData; + }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItem = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRoles = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItem[]; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + }; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions = + { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributes = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + name?: string; + code?: string; + description?: string; + users?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = + { [key: string]: any }; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + id?: number; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = + { + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + }; + +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { id?: number; - attributes?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + attributes?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = +export type LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; + data?: LayerDatasetDataAttributesLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; export type LayerDatasetDataAttributesLayersDataItemAttributesLegendConfigItemsItem = { @@ -6981,10 +6317,6 @@ export type LayerDatasetDataAttributesLayersDataItemAttributesLegendConfig = { items?: LayerDatasetDataAttributesLayersDataItemAttributesLegendConfigItemsItem[]; }; -export type LayerDatasetDataAttributesLayersDataItemAttributesDataset = { - data?: LayerDatasetDataAttributesLayersDataItemAttributesDatasetData; -}; - export type LayerDatasetDataAttributesLayersDataItemAttributesDatasetDataAttributes = { [key: string]: any; }; @@ -6994,6 +6326,10 @@ export type LayerDatasetDataAttributesLayersDataItemAttributesDatasetData = { attributes?: LayerDatasetDataAttributesLayersDataItemAttributesDatasetDataAttributes; }; +export type LayerDatasetDataAttributesLayersDataItemAttributesDataset = { + data?: LayerDatasetDataAttributesLayersDataItemAttributesDatasetData; +}; + export type LayerDatasetDataAttributesLayersDataItemAttributesMetadata = { id?: number; description?: string; @@ -7077,6 +6413,8 @@ export interface LayerLocalizationResponse { meta?: LayerLocalizationResponseMeta; } +export type LayerRequestDataEnvironment = number | string; + export type LayerRequestDataDataset = number | string; export type LayerRequestDataType = (typeof LayerRequestDataType)[keyof typeof LayerRequestDataType]; @@ -7098,6 +6436,7 @@ export type LayerRequestData = { dataset?: LayerRequestDataDataset; legend_config?: LegendLegendComponent; default?: boolean; + environment?: LayerRequestDataEnvironment; locale?: string; }; @@ -7105,6 +6444,8 @@ export interface LayerRequest { data: LayerRequestData; } +export type LayerLocalizationRequestEnvironment = number | string; + export type LayerLocalizationRequestDataset = number | string; export type LayerLocalizationRequestType = @@ -7127,17 +6468,33 @@ export interface LayerLocalizationRequest { dataset?: LayerLocalizationRequestDataset; legend_config?: LegendLegendComponent; default?: boolean; + environment?: LayerLocalizationRequestEnvironment; locale: string; } export type HabitatStatResponseMeta = { [key: string]: any }; +export interface HabitatStatResponse { + data?: HabitatStatResponseDataObject; + meta?: HabitatStatResponseMeta; +} + +export type HabitatStatUpdatedByData = { + id?: number; + attributes?: HabitatStatUpdatedByDataAttributes; +}; + +export type HabitatStatUpdatedBy = { + data?: HabitatStatUpdatedByData; +}; + export interface HabitatStat { location?: HabitatStatLocation; habitat?: HabitatStatHabitat; year: number; - protectedArea: number; - totalArea: number; + protected_area: number; + total_area: number; + environment?: HabitatStatEnvironment; createdAt?: string; updatedAt?: string; createdBy?: HabitatStatCreatedBy; @@ -7149,22 +6506,8 @@ export interface HabitatStatResponseDataObject { attributes?: HabitatStat; } -export interface HabitatStatResponse { - data?: HabitatStatResponseDataObject; - meta?: HabitatStatResponseMeta; -} - export type HabitatStatUpdatedByDataAttributes = { [key: string]: any }; -export type HabitatStatUpdatedByData = { - id?: number; - attributes?: HabitatStatUpdatedByDataAttributes; -}; - -export type HabitatStatUpdatedBy = { - data?: HabitatStatUpdatedByData; -}; - export type HabitatStatCreatedByDataAttributes = { [key: string]: any }; export type HabitatStatCreatedByData = { @@ -7176,6 +6519,17 @@ export type HabitatStatCreatedBy = { data?: HabitatStatCreatedByData; }; +export type HabitatStatEnvironmentDataAttributes = { [key: string]: any }; + +export type HabitatStatEnvironmentData = { + id?: number; + attributes?: HabitatStatEnvironmentDataAttributes; +}; + +export type HabitatStatEnvironment = { + data?: HabitatStatEnvironmentData; +}; + export type HabitatStatHabitat = { data?: HabitatStatHabitatData; }; @@ -7223,31 +6577,27 @@ export type HabitatStatHabitatDataAttributesCreatedBy = { data?: HabitatStatHabitatDataAttributesCreatedByData; }; -export type HabitatStatLocation = { - data?: HabitatStatLocationData; -}; - -export type HabitatStatLocationDataAttributesLocalizations = { - data?: unknown[]; -}; - export type HabitatStatLocationDataAttributes = { code?: string; name?: string; - totalMarineArea?: number; + total_marine_area?: string; type?: string; groups?: HabitatStatLocationDataAttributesGroups; members?: HabitatStatLocationDataAttributesMembers; fishing_protection_level_stats?: HabitatStatLocationDataAttributesFishingProtectionLevelStats; mpaa_protection_level_stats?: HabitatStatLocationDataAttributesMpaaProtectionLevelStats; protection_coverage_stats?: HabitatStatLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; createdAt?: string; updatedAt?: string; createdBy?: HabitatStatLocationDataAttributesCreatedBy; updatedBy?: HabitatStatLocationDataAttributesUpdatedBy; - localizations?: HabitatStatLocationDataAttributesLocalizations; - locale?: string; }; export type HabitatStatLocationData = { @@ -7255,6 +6605,10 @@ export type HabitatStatLocationData = { attributes?: HabitatStatLocationDataAttributes; }; +export type HabitatStatLocation = { + data?: HabitatStatLocationData; +}; + export type HabitatStatLocationDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type HabitatStatLocationDataAttributesUpdatedByData = { @@ -7267,27 +6621,14 @@ export type HabitatStatLocationDataAttributesUpdatedBy = { }; export type HabitatStatLocationDataAttributesCreatedByDataAttributes = { [key: string]: any }; - -export type HabitatStatLocationDataAttributesCreatedByData = { - id?: number; - attributes?: HabitatStatLocationDataAttributesCreatedByDataAttributes; -}; - -export type HabitatStatLocationDataAttributesCreatedBy = { - data?: HabitatStatLocationDataAttributesCreatedByData; -}; - -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = { - location?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; - year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; - updatedBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; + +export type HabitatStatLocationDataAttributesCreatedByData = { + id?: number; + attributes?: HabitatStatLocationDataAttributesCreatedByDataAttributes; +}; + +export type HabitatStatLocationDataAttributesCreatedBy = { + data?: HabitatStatLocationDataAttributesCreatedByData; }; export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItem = { @@ -7312,6 +6653,27 @@ export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttr data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByData; }; +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = { + data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; +}; + +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = { + location?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; + year?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; + updatedBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedBy; +}; + export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -7321,65 +6683,60 @@ export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttr attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy = { - data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; -}; - -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; - locale?: string; + id?: number; + attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { - id?: number; - attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = { - data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + data?: unknown[]; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { id?: number; - attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; + }; + +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = + { + data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = { - data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; + attributes?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = +export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; + data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = @@ -7395,130 +6752,117 @@ export type HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttr data?: HabitatStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItem = { +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes = { + mpaa_protection_level?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; + area?: number; + percentage?: number; + location?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; +}; + +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsData = { id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes; }; export type HabitatStatLocationDataAttributesMpaaProtectionLevelStats = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsData; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; - }; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { + id?: number; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; +}; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = { + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; - }; - -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { + id?: number; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = - { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; - }; - -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = { - location?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; - area?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = { + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; - -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; - }; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { + id?: number; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; +}; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation = { + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData; +}; + +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; + data?: unknown[]; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = { slug?: string; name?: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; + createdBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations; locale?: string; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = - { [key: string]: any }; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = + { + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; + }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData; }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; - }; - -export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = { - data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; -}; +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = + { [key: string]: any }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = +export type HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy = { - data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; + data?: HabitatStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData; }; export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = { @@ -7544,6 +6888,17 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStats = { export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData = + { + id?: number; + attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy = + { + data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; + }; + export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -7558,6 +6913,24 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = + { + data?: unknown[]; + }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = + { + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; + updatedBy?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; + localizations?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; + locale?: string; + }; + export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = { id?: number; @@ -7569,11 +6942,6 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = - { - data?: unknown[]; - }; - export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -7599,19 +6967,6 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = - { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; - updatedBy?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; - localizations?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; - locale?: string; - }; - export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -7640,11 +6995,6 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = - { - data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; - }; - export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributes = { firstname?: string; @@ -7663,34 +7013,11 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem updatedBy?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedBy; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; - }; - export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = - { [key: string]: any }; - -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = - { - id?: number; - attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; - }; - -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = - { - data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; - }; - export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes = { name?: string; @@ -7710,15 +7037,32 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = + { + data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; + }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { id?: number; - attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; }; -export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { - data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + id?: number; + attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; + }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy = + { + data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = @@ -7749,6 +7093,17 @@ export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItem export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = + { + id?: number; + attributes?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; + }; + +export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = + { + data?: HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; + }; + export type HabitatStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -7850,6 +7205,11 @@ export interface HabitatStatListResponse { export type HabitatResponseMeta = { [key: string]: any }; +export interface HabitatResponseDataObject { + id?: number; + attributes?: Habitat; +} + export interface HabitatResponse { data?: HabitatResponseDataObject; meta?: HabitatResponseMeta; @@ -7870,6 +7230,15 @@ export type HabitatUpdatedBy = { data?: HabitatUpdatedByData; }; +export type HabitatCreatedByData = { + id?: number; + attributes?: HabitatCreatedByDataAttributes; +}; + +export type HabitatCreatedBy = { + data?: HabitatCreatedByData; +}; + export interface Habitat { slug: string; name: string; @@ -7882,37 +7251,6 @@ export interface Habitat { locale?: string; } -export interface HabitatResponseDataObject { - id?: number; - attributes?: Habitat; -} - -export type HabitatCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: HabitatCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatCreatedByDataAttributesCreatedBy; - updatedBy?: HabitatCreatedByDataAttributesUpdatedBy; -}; - -export type HabitatCreatedByData = { - id?: number; - attributes?: HabitatCreatedByDataAttributes; -}; - -export type HabitatCreatedBy = { - data?: HabitatCreatedByData; -}; - export type HabitatCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type HabitatCreatedByDataAttributesUpdatedByData = { @@ -7956,6 +7294,23 @@ export type HabitatCreatedByDataAttributesRoles = { data?: HabitatCreatedByDataAttributesRolesDataItem[]; }; +export type HabitatCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: HabitatCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatCreatedByDataAttributesCreatedBy; + updatedBy?: HabitatCreatedByDataAttributesUpdatedBy; +}; + export type HabitatCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -8005,6 +7360,24 @@ export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsData data?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; +export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = + { + data?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + }; + +export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; +}; + export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -8014,11 +7387,6 @@ export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsData attributes?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = - { - data?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; - }; - export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; @@ -8033,19 +7401,6 @@ export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsData data?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: HabitatCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; -}; - export type HabitatCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any; }; @@ -8133,6 +7488,17 @@ export interface HabitatLocalizationRequest { export type FishingProtectionLevelStatResponseMeta = { [key: string]: any }; +export interface FishingProtectionLevelStat { + location?: FishingProtectionLevelStatLocation; + fishing_protection_level?: FishingProtectionLevelStatFishingProtectionLevel; + area: number; + pct?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatCreatedBy; + updatedBy?: FishingProtectionLevelStatUpdatedBy; +} + export interface FishingProtectionLevelStatResponseDataObject { id?: number; attributes?: FishingProtectionLevelStat; @@ -8165,49 +7531,15 @@ export type FishingProtectionLevelStatCreatedBy = { data?: FishingProtectionLevelStatCreatedByData; }; -export type FishingProtectionLevelStatFishingProtectionLevelDataAttributes = { [key: string]: any }; - -export type FishingProtectionLevelStatFishingProtectionLevelData = { - id?: number; - attributes?: FishingProtectionLevelStatFishingProtectionLevelDataAttributes; -}; - export type FishingProtectionLevelStatFishingProtectionLevel = { data?: FishingProtectionLevelStatFishingProtectionLevelData; }; -export interface FishingProtectionLevelStat { - location?: FishingProtectionLevelStatLocation; - fishing_protection_level?: FishingProtectionLevelStatFishingProtectionLevel; - area: number; - pct?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatCreatedBy; - updatedBy?: FishingProtectionLevelStatUpdatedBy; -} - -export type FishingProtectionLevelStatLocationDataAttributesLocalizations = { - data?: unknown[]; -}; +export type FishingProtectionLevelStatFishingProtectionLevelDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributes = { - code?: string; - name?: string; - totalMarineArea?: number; - type?: string; - groups?: FishingProtectionLevelStatLocationDataAttributesGroups; - members?: FishingProtectionLevelStatLocationDataAttributesMembers; - fishing_protection_level_stats?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats; - mpaa_protection_level_stats?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats; - protection_coverage_stats?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStats; - bounds?: unknown; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesUpdatedBy; - localizations?: FishingProtectionLevelStatLocationDataAttributesLocalizations; - locale?: string; +export type FishingProtectionLevelStatFishingProtectionLevelData = { + id?: number; + attributes?: FishingProtectionLevelStatFishingProtectionLevelDataAttributes; }; export type FishingProtectionLevelStatLocationData = { @@ -8254,6 +7586,29 @@ export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageSt data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItem[]; }; +export type FishingProtectionLevelStatLocationDataAttributes = { + code?: string; + name?: string; + total_marine_area?: string; + type?: string; + groups?: FishingProtectionLevelStatLocationDataAttributesGroups; + members?: FishingProtectionLevelStatLocationDataAttributesMembers; + fishing_protection_level_stats?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStats; + mpaa_protection_level_stats?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats; + protection_coverage_stats?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStats; + marine_bounds?: unknown; + total_terrestrial_area?: string; + terrestrial_bounds?: unknown; + name_es?: string; + name_fr?: string; + marine_target?: number; + marine_target_year?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatLocationDataAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesUpdatedBy; +}; + export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -8271,11 +7626,15 @@ export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageSt export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributes = { location?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocation; - protection_status?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus; year?: number; - cumSumProtectedArea?: number; - protectedArea?: number; - protectedAreasCount?: number; + protected_area?: number; + protected_areas_count?: number; + environment?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment; + coverage?: number; + pas?: number; + oecms?: number; + is_last_year?: boolean; + global_contribution?: number; createdAt?: string; updatedAt?: string; createdBy?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedBy; @@ -8296,61 +7655,60 @@ export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageSt data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesCreatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatus = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironment = { - data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData; + data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations = { data?: unknown[]; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes = { - slug?: string; name?: string; - info?: string; + slug?: string; createdAt?: string; updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy; - localizations?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesLocalizations; + createdBy?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesLocalizations; locale?: string; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusData = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedBy = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedBy = { - data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesUpdatedByData; + data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesUpdatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedBy = +export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedBy = { - data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesProtectionStatusDataAttributesCreatedByData; + data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesEnvironmentDataAttributesCreatedByData; }; export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationDataAttributes = @@ -8367,123 +7725,124 @@ export type FishingProtectionLevelStatLocationDataAttributesProtectionCoverageSt data?: FishingProtectionLevelStatLocationDataAttributesProtectionCoverageStatsDataItemAttributesLocationData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItem = { +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes = + { + mpaa_protection_level?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel; + area?: number; + percentage?: number; + location?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy; + }; + +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributes; }; export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStats = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItem[]; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedBy = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedByData; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesUpdatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByDataAttributes; + }; + +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedBy = + { + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesCreatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes = + { [key: string]: any }; + +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedByData; + id?: number; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocation = { - location?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation; - mpaa_protection_level?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel; - area?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesUpdatedBy; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesLocationData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations = { data?: unknown[]; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes = { slug?: string; name?: string; info?: string; createdAt?: string; updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy; - localizations?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesLocalizations; + createdBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy; + localizations?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesLocalizations; locale?: string; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData = - { - id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributes; - }; - -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevel = - { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelData; - }; - -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedBy = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevel = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesUpdatedByData; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedBy = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedBy = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesMpaaProtectionLevelDataAttributesCreatedByData; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesUpdatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData = { id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationDataAttributes; + attributes?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocation = +export type FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedBy = { - data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataItemAttributesLocationData; + data?: FishingProtectionLevelStatLocationDataAttributesMpaaProtectionLevelStatsDataAttributesMpaaProtectionLevelDataAttributesCreatedByData; }; export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItem = { @@ -8509,6 +7868,18 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedByData; }; +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = + { + location?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; + fishing_protection_level?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; + area?: number; + pct?: number; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + }; + export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -8523,21 +7894,15 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = { - data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; + id?: number; + attributes?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributes = +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel = { - location?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesLocation; - fishing_protection_level?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevel; - area?: number; - pct?: number; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesUpdatedBy; + data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData; }; export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations = @@ -8545,6 +7910,19 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: unknown[]; }; +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = + { + slug?: string; + name?: string; + info?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; + localizations?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; + locale?: string; + }; + export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -8588,25 +7966,6 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByData; }; -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes = - { - slug?: string; - name?: string; - info?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesUpdatedBy; - localizations?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesLocalizations; - locale?: string; - }; - -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelData = - { - id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributes; - }; - export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -8635,6 +7994,12 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesCreatedByData; }; +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = + { + id?: number; + attributes?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; + }; + export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRoles = { data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem[]; @@ -8668,6 +8033,20 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; @@ -8692,12 +8071,6 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItem = - { - id?: number; - attributes?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributes; - }; - export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -8726,6 +8099,11 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; +export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = + { + data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + }; + export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; @@ -8735,25 +8113,6 @@ export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLev attributes?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; }; -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = - { - data?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; - }; - -export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type FishingProtectionLevelStatLocationDataAttributesFishingProtectionLevelStatsDataItemAttributesFishingProtectionLevelDataAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; @@ -8808,11 +8167,6 @@ export type FishingProtectionLevelStatLocationDataAttributesGroups = { data?: FishingProtectionLevelStatLocationDataAttributesGroupsDataItem[]; }; -export interface FishingProtectionLevelStatListResponse { - data?: FishingProtectionLevelStatListResponseDataItem[]; - meta?: FishingProtectionLevelStatListResponseMeta; -} - export type FishingProtectionLevelStatListResponseMetaPagination = { page?: number; pageSize?: number; @@ -8829,13 +8183,13 @@ export interface FishingProtectionLevelStatListResponseDataItem { attributes?: FishingProtectionLevelStat; } +export interface FishingProtectionLevelStatListResponse { + data?: FishingProtectionLevelStatListResponseDataItem[]; + meta?: FishingProtectionLevelStatListResponseMeta; +} + export type FishingProtectionLevelResponseMeta = { [key: string]: any }; -export interface FishingProtectionLevelResponseDataObject { - id?: number; - attributes?: FishingProtectionLevel; -} - export interface FishingProtectionLevelResponse { data?: FishingProtectionLevelResponseDataObject; meta?: FishingProtectionLevelResponseMeta; @@ -8877,6 +8231,11 @@ export interface FishingProtectionLevel { locale?: string; } +export interface FishingProtectionLevelResponseDataObject { + id?: number; + attributes?: FishingProtectionLevel; +} + export type FishingProtectionLevelCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -8890,23 +8249,10 @@ export type FishingProtectionLevelCreatedByDataAttributesUpdatedBy = { data?: FishingProtectionLevelCreatedByDataAttributesUpdatedByData; }; -export type FishingProtectionLevelCreatedByDataAttributesCreatedByDataAttributes = { - [key: string]: any; -}; - -export type FishingProtectionLevelCreatedByDataAttributesCreatedByData = { - id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesCreatedByDataAttributes; -}; - export type FishingProtectionLevelCreatedByDataAttributesCreatedBy = { data?: FishingProtectionLevelCreatedByDataAttributesCreatedByData; }; -export type FishingProtectionLevelCreatedByDataAttributesRoles = { - data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItem[]; -}; - export type FishingProtectionLevelCreatedByDataAttributes = { firstname?: string; lastname?: string; @@ -8924,6 +8270,24 @@ export type FishingProtectionLevelCreatedByDataAttributes = { updatedBy?: FishingProtectionLevelCreatedByDataAttributesUpdatedBy; }; +export type FishingProtectionLevelCreatedByDataAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type FishingProtectionLevelCreatedByDataAttributesCreatedByData = { + id?: number; + attributes?: FishingProtectionLevelCreatedByDataAttributesCreatedByDataAttributes; +}; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes; +}; + +export type FishingProtectionLevelCreatedByDataAttributesRoles = { + data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItem[]; +}; + export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -8948,6 +8312,16 @@ export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = + { + id?: number; + attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions = { + data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; +}; + export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes = { name?: string; code?: string; @@ -8960,10 +8334,8 @@ export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes updatedBy?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItem = { - id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes; -}; +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = + { [key: string]: any }; export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { @@ -8990,143 +8362,424 @@ export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributes updatedBy?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; + attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = + { + data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = + { [key: string]: any }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = + { + id?: number; + attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = + { + data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = + { [key: string]: any }; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { + id?: number; + attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; +}; + +export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; +}; + +export type FishingProtectionLevelListResponseMetaPagination = { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; +}; + +export type FishingProtectionLevelListResponseMeta = { + pagination?: FishingProtectionLevelListResponseMetaPagination; +}; + +export interface FishingProtectionLevelListResponseDataItem { + id?: number; + attributes?: FishingProtectionLevel; +} + +export interface FishingProtectionLevelListResponse { + data?: FishingProtectionLevelListResponseDataItem[]; + meta?: FishingProtectionLevelListResponseMeta; +} + +export type FishingProtectionLevelLocalizationListResponseMetaPagination = { + page?: number; + pageSize?: number; + pageCount?: number; + total?: number; +}; + +export type FishingProtectionLevelLocalizationListResponseMeta = { + pagination?: FishingProtectionLevelLocalizationListResponseMetaPagination; +}; + +export interface FishingProtectionLevelListResponseDataItemLocalized { + id?: number; + attributes?: FishingProtectionLevel; +} + +export interface FishingProtectionLevelLocalizationListResponse { + data?: FishingProtectionLevelListResponseDataItemLocalized[]; + meta?: FishingProtectionLevelLocalizationListResponseMeta; +} + +export type FishingProtectionLevelLocalizationResponseMeta = { [key: string]: any }; + +export interface FishingProtectionLevelResponseDataObjectLocalized { + id?: number; + attributes?: FishingProtectionLevel; +} + +export interface FishingProtectionLevelLocalizationResponse { + data?: FishingProtectionLevelResponseDataObjectLocalized; + meta?: FishingProtectionLevelLocalizationResponseMeta; +} + +export type FishingProtectionLevelRequestData = { + slug: string; + name: string; + info?: string; + locale?: string; +}; + +export interface FishingProtectionLevelRequest { + data: FishingProtectionLevelRequestData; +} + +export interface FishingProtectionLevelLocalizationRequest { + slug: string; + name: string; + info?: string; + locale: string; +} + +export type EnvironmentResponseMeta = { [key: string]: any }; + +export type EnvironmentLocalizations = { + data?: Environment[]; +}; + +export interface Environment { + name: string; + slug: string; + createdAt?: string; + updatedAt?: string; + createdBy?: EnvironmentCreatedBy; + updatedBy?: EnvironmentUpdatedBy; + localizations?: EnvironmentLocalizations; + locale?: string; +} + +export interface EnvironmentResponseDataObject { + id?: number; + attributes?: Environment; +} + +export interface EnvironmentResponse { + data?: EnvironmentResponseDataObject; + meta?: EnvironmentResponseMeta; +} + +export type EnvironmentUpdatedByDataAttributes = { [key: string]: any }; + +export type EnvironmentUpdatedByData = { + id?: number; + attributes?: EnvironmentUpdatedByDataAttributes; +}; + +export type EnvironmentUpdatedBy = { + data?: EnvironmentUpdatedByData; +}; + +export type EnvironmentCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: EnvironmentCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: EnvironmentCreatedByDataAttributesCreatedBy; + updatedBy?: EnvironmentCreatedByDataAttributesUpdatedBy; +}; + +export type EnvironmentCreatedByData = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributes; +}; + +export type EnvironmentCreatedBy = { + data?: EnvironmentCreatedByData; +}; + +export type EnvironmentCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; + +export type EnvironmentCreatedByDataAttributesUpdatedByData = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesUpdatedByDataAttributes; +}; + +export type EnvironmentCreatedByDataAttributesUpdatedBy = { + data?: EnvironmentCreatedByDataAttributesUpdatedByData; +}; + +export type EnvironmentCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; + +export type EnvironmentCreatedByDataAttributesCreatedByData = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesCreatedByDataAttributes; +}; + +export type EnvironmentCreatedByDataAttributesCreatedBy = { + data?: EnvironmentCreatedByDataAttributesCreatedByData; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributes; +}; + +export type EnvironmentCreatedByDataAttributesRoles = { + data?: EnvironmentCreatedByDataAttributesRolesDataItem[]; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { + [key: string]: any; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedByData = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedBy = { + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesCreatedByData; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissions = { - data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissions = { + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; +}; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData = { id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy = { - data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData = { id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy = { - data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData = + { + id?: number; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes; + }; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole = + { + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; + }; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { + [key: string]: any; +}; + +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsersDataItem = { id?: number; - attributes?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; + attributes?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes; }; -export type FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsers = { - data?: FishingProtectionLevelCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; +export type EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsers = { + data?: EnvironmentCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; -export type FishingProtectionLevelListResponseMetaPagination = { +export type EnvironmentListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type FishingProtectionLevelListResponseMeta = { - pagination?: FishingProtectionLevelListResponseMetaPagination; +export type EnvironmentListResponseMeta = { + pagination?: EnvironmentListResponseMetaPagination; }; -export interface FishingProtectionLevelListResponseDataItem { +export interface EnvironmentListResponseDataItem { id?: number; - attributes?: FishingProtectionLevel; + attributes?: Environment; } -export interface FishingProtectionLevelListResponse { - data?: FishingProtectionLevelListResponseDataItem[]; - meta?: FishingProtectionLevelListResponseMeta; +export interface EnvironmentListResponse { + data?: EnvironmentListResponseDataItem[]; + meta?: EnvironmentListResponseMeta; } -export type FishingProtectionLevelLocalizationListResponseMetaPagination = { +export type EnvironmentLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; pageCount?: number; total?: number; }; -export type FishingProtectionLevelLocalizationListResponseMeta = { - pagination?: FishingProtectionLevelLocalizationListResponseMetaPagination; +export type EnvironmentLocalizationListResponseMeta = { + pagination?: EnvironmentLocalizationListResponseMetaPagination; }; -export interface FishingProtectionLevelListResponseDataItemLocalized { +export interface EnvironmentListResponseDataItemLocalized { id?: number; - attributes?: FishingProtectionLevel; + attributes?: Environment; } -export interface FishingProtectionLevelLocalizationListResponse { - data?: FishingProtectionLevelListResponseDataItemLocalized[]; - meta?: FishingProtectionLevelLocalizationListResponseMeta; +export interface EnvironmentLocalizationListResponse { + data?: EnvironmentListResponseDataItemLocalized[]; + meta?: EnvironmentLocalizationListResponseMeta; } -export type FishingProtectionLevelLocalizationResponseMeta = { [key: string]: any }; +export type EnvironmentLocalizationResponseMeta = { [key: string]: any }; -export interface FishingProtectionLevelResponseDataObjectLocalized { +export interface EnvironmentResponseDataObjectLocalized { id?: number; - attributes?: FishingProtectionLevel; + attributes?: Environment; } -export interface FishingProtectionLevelLocalizationResponse { - data?: FishingProtectionLevelResponseDataObjectLocalized; - meta?: FishingProtectionLevelLocalizationResponseMeta; +export interface EnvironmentLocalizationResponse { + data?: EnvironmentResponseDataObjectLocalized; + meta?: EnvironmentLocalizationResponseMeta; } -export type FishingProtectionLevelRequestData = { - slug: string; +export type EnvironmentRequestData = { name: string; - info?: string; + slug: string; locale?: string; }; -export interface FishingProtectionLevelRequest { - data: FishingProtectionLevelRequestData; +export interface EnvironmentRequest { + data: EnvironmentRequestData; } -export interface FishingProtectionLevelLocalizationRequest { - slug: string; +export interface EnvironmentLocalizationRequest { name: string; - info?: string; + slug: string; locale: string; } export type DatasetResponseMeta = { [key: string]: any }; -export interface DatasetResponseDataObject { - id?: number; - attributes?: Dataset; -} - export interface DatasetResponse { data?: DatasetResponseDataObject; meta?: DatasetResponseMeta; } +export interface Dataset { + name: string; + layers?: DatasetLayers; + slug: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DatasetCreatedBy; + updatedBy?: DatasetUpdatedBy; + localizations?: DatasetLocalizations; + locale?: string; +} + +export interface DatasetResponseDataObject { + id?: number; + attributes?: Dataset; +} + export type DatasetLocalizations = { data?: Dataset[]; }; @@ -9142,6 +8795,8 @@ export type DatasetUpdatedBy = { data?: DatasetUpdatedByData; }; +export type DatasetCreatedByDataAttributes = { [key: string]: any }; + export type DatasetCreatedByData = { id?: number; attributes?: DatasetCreatedByDataAttributes; @@ -9151,26 +8806,6 @@ export type DatasetCreatedBy = { data?: DatasetCreatedByData; }; -export interface Dataset { - name: string; - layers?: DatasetLayers; - slug: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DatasetCreatedBy; - updatedBy?: DatasetUpdatedBy; - localizations?: DatasetLocalizations; - locale?: string; -} - -export type DatasetCreatedByDataAttributes = { [key: string]: any }; - -export type DatasetLayersDataItem = { - id?: number; - attributes?: DatasetLayersDataItemAttributes; -}; - export type DatasetLayers = { data?: DatasetLayersDataItem[]; }; @@ -9179,17 +8814,6 @@ export type DatasetLayersDataItemAttributesLocalizations = { data?: unknown[]; }; -export type DatasetLayersDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; - -export type DatasetLayersDataItemAttributesUpdatedByData = { - id?: number; - attributes?: DatasetLayersDataItemAttributesUpdatedByDataAttributes; -}; - -export type DatasetLayersDataItemAttributesUpdatedBy = { - data?: DatasetLayersDataItemAttributesUpdatedByData; -}; - export type DatasetLayersDataItemAttributes = { title?: string; type?: DatasetLayersDataItemAttributesType; @@ -9200,6 +8824,7 @@ export type DatasetLayersDataItemAttributes = { dataset?: DatasetLayersDataItemAttributesDataset; legend_config?: DatasetLayersDataItemAttributesLegendConfig; default?: boolean; + environment?: DatasetLayersDataItemAttributesEnvironment; createdAt?: string; updatedAt?: string; publishedAt?: string; @@ -9209,6 +8834,22 @@ export type DatasetLayersDataItemAttributes = { locale?: string; }; +export type DatasetLayersDataItem = { + id?: number; + attributes?: DatasetLayersDataItemAttributes; +}; + +export type DatasetLayersDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; + +export type DatasetLayersDataItemAttributesUpdatedByData = { + id?: number; + attributes?: DatasetLayersDataItemAttributesUpdatedByDataAttributes; +}; + +export type DatasetLayersDataItemAttributesUpdatedBy = { + data?: DatasetLayersDataItemAttributesUpdatedByData; +}; + export type DatasetLayersDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; export type DatasetLayersDataItemAttributesCreatedByData = { @@ -9220,6 +8861,56 @@ export type DatasetLayersDataItemAttributesCreatedBy = { data?: DatasetLayersDataItemAttributesCreatedByData; }; +export type DatasetLayersDataItemAttributesEnvironment = { + data?: DatasetLayersDataItemAttributesEnvironmentData; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesLocalizations = { + data?: unknown[]; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes = { + [key: string]: any; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedByData = { + id?: number; + attributes?: DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedByDataAttributes; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedBy = { + data?: DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedByData; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes = { + [key: string]: any; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedByData = { + id?: number; + attributes?: DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedByDataAttributes; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedBy = { + data?: DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedByData; +}; + +export type DatasetLayersDataItemAttributesEnvironmentDataAttributes = { + name?: string; + slug?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: DatasetLayersDataItemAttributesEnvironmentDataAttributesCreatedBy; + updatedBy?: DatasetLayersDataItemAttributesEnvironmentDataAttributesUpdatedBy; + localizations?: DatasetLayersDataItemAttributesEnvironmentDataAttributesLocalizations; + locale?: string; +}; + +export type DatasetLayersDataItemAttributesEnvironmentData = { + id?: number; + attributes?: DatasetLayersDataItemAttributesEnvironmentDataAttributes; +}; + export type DatasetLayersDataItemAttributesLegendConfigItemsItem = { id?: number; icon?: string; @@ -9245,10 +8936,6 @@ export type DatasetLayersDataItemAttributesLegendConfig = { items?: DatasetLayersDataItemAttributesLegendConfigItemsItem[]; }; -export type DatasetLayersDataItemAttributesDatasetDataAttributesLocalizations = { - data?: unknown[]; -}; - export type DatasetLayersDataItemAttributesDatasetDataAttributes = { name?: string; layers?: DatasetLayersDataItemAttributesDatasetDataAttributesLayers; @@ -9271,6 +8958,10 @@ export type DatasetLayersDataItemAttributesDataset = { data?: DatasetLayersDataItemAttributesDatasetData; }; +export type DatasetLayersDataItemAttributesDatasetDataAttributesLocalizations = { + data?: unknown[]; +}; + export type DatasetLayersDataItemAttributesDatasetDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -9284,6 +8975,23 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesUpdatedBy = { data?: DatasetLayersDataItemAttributesDatasetDataAttributesUpdatedByData; }; +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesUpdatedBy; +}; + export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByData = { id?: number; attributes?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributes; @@ -9319,23 +9027,25 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAtt data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesCreatedByData; }; -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesUpdatedBy; +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItem = + { + id?: number; + attributes?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributes; + }; + +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRoles = { + data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItem[]; }; +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = + { [key: string]: any }; + +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = + { + id?: number; + attributes?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; + }; + export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy = { data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; @@ -9354,25 +9064,6 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAtt updatedBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItem = - { - id?: number; - attributes?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributes; - }; - -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRoles = { - data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItem[]; -}; - -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes; - }; - export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -9387,20 +9078,6 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAtt data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; @@ -9426,6 +9103,20 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAtt data?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; +export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DatasetLayersDataItemAttributesDatasetDataAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -9579,15 +9270,31 @@ export interface DatasetLocalizationRequest { export type DataToolResourceTypeResponseMeta = { [key: string]: any }; +export type DataToolResourceTypeLocalizations = { + data?: DataToolResourceType[]; +}; + +export interface DataToolResourceType { + name?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolResourceTypeCreatedBy; + updatedBy?: DataToolResourceTypeUpdatedBy; + localizations?: DataToolResourceTypeLocalizations; + locale?: string; +} + +export interface DataToolResourceTypeResponseDataObject { + id?: number; + attributes?: DataToolResourceType; +} + export interface DataToolResourceTypeResponse { data?: DataToolResourceTypeResponseDataObject; meta?: DataToolResourceTypeResponseMeta; } -export type DataToolResourceTypeLocalizations = { - data?: DataToolResourceType[]; -}; - export type DataToolResourceTypeUpdatedByDataAttributes = { [key: string]: any }; export type DataToolResourceTypeUpdatedByData = { @@ -9608,22 +9315,6 @@ export type DataToolResourceTypeCreatedBy = { data?: DataToolResourceTypeCreatedByData; }; -export interface DataToolResourceType { - name?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolResourceTypeCreatedBy; - updatedBy?: DataToolResourceTypeUpdatedBy; - localizations?: DataToolResourceTypeLocalizations; - locale?: string; -} - -export interface DataToolResourceTypeResponseDataObject { - id?: number; - attributes?: DataToolResourceType; -} - export type DataToolResourceTypeCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -9650,18 +9341,6 @@ export type DataToolResourceTypeCreatedByDataAttributesCreatedBy = { data?: DataToolResourceTypeCreatedByDataAttributesCreatedByData; }; -export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - export type DataToolResourceTypeCreatedByDataAttributesRolesDataItem = { id?: number; attributes?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributes; @@ -9712,6 +9391,20 @@ export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesCr data?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; +export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; @@ -9722,6 +9415,18 @@ export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPe data?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; +export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -9764,20 +9469,6 @@ export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPe data?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; -export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DataToolResourceTypeCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; @@ -9860,11 +9551,6 @@ export interface DataToolResourceTypeLocalizationRequest { export type DataToolLanguageResponseMeta = { [key: string]: any }; -export interface DataToolLanguageResponseDataObject { - id?: number; - attributes?: DataToolLanguage; -} - export interface DataToolLanguageResponse { data?: DataToolLanguageResponseDataObject; meta?: DataToolLanguageResponseMeta; @@ -9874,10 +9560,32 @@ export type DataToolLanguageLocalizations = { data?: DataToolLanguage[]; }; +export type DataToolLanguageUpdatedByDataAttributes = { [key: string]: any }; + +export type DataToolLanguageUpdatedByData = { + id?: number; + attributes?: DataToolLanguageUpdatedByDataAttributes; +}; + export type DataToolLanguageUpdatedBy = { data?: DataToolLanguageUpdatedByData; }; +export type DataToolLanguageCreatedByDataAttributes = { [key: string]: any }; + +export type DataToolLanguageCreatedByData = { + id?: number; + attributes?: DataToolLanguageCreatedByDataAttributes; +}; + +export type DataToolLanguageCreatedBy = { + data?: DataToolLanguageCreatedByData; +}; + +export type DataToolLanguageDataTool = { + data?: DataToolLanguageDataToolData; +}; + export interface DataToolLanguage { name?: string; slug?: string; @@ -9891,22 +9599,30 @@ export interface DataToolLanguage { locale?: string; } -export type DataToolLanguageUpdatedByDataAttributes = { [key: string]: any }; - -export type DataToolLanguageUpdatedByData = { +export interface DataToolLanguageResponseDataObject { id?: number; - attributes?: DataToolLanguageUpdatedByDataAttributes; -}; - -export type DataToolLanguageCreatedByDataAttributes = { [key: string]: any }; + attributes?: DataToolLanguage; +} -export type DataToolLanguageCreatedByData = { - id?: number; - attributes?: DataToolLanguageCreatedByDataAttributes; +export type DataToolLanguageDataToolDataAttributesLocalizations = { + data?: unknown[]; }; -export type DataToolLanguageCreatedBy = { - data?: DataToolLanguageCreatedByData; +export type DataToolLanguageDataToolDataAttributes = { + name?: string; + description?: string; + site?: string; + languages?: DataToolLanguageDataToolDataAttributesLanguages; + data_tool_resource_types?: DataToolLanguageDataToolDataAttributesDataToolResourceTypes; + geography?: string; + data_tool_ecosystems?: DataToolLanguageDataToolDataAttributesDataToolEcosystems; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesUpdatedBy; + localizations?: DataToolLanguageDataToolDataAttributesLocalizations; + locale?: string; }; export type DataToolLanguageDataToolData = { @@ -9914,14 +9630,6 @@ export type DataToolLanguageDataToolData = { attributes?: DataToolLanguageDataToolDataAttributes; }; -export type DataToolLanguageDataTool = { - data?: DataToolLanguageDataToolData; -}; - -export type DataToolLanguageDataToolDataAttributesLocalizations = { - data?: unknown[]; -}; - export type DataToolLanguageDataToolDataAttributesUpdatedByDataAttributes = { [key: string]: any }; export type DataToolLanguageDataToolDataAttributesUpdatedByData = { @@ -9933,31 +9641,15 @@ export type DataToolLanguageDataToolDataAttributesUpdatedBy = { data?: DataToolLanguageDataToolDataAttributesUpdatedByData; }; -export type DataToolLanguageDataToolDataAttributesCreatedByDataAttributes = { [key: string]: any }; - -export type DataToolLanguageDataToolDataAttributesCreatedByData = { - id?: number; - attributes?: DataToolLanguageDataToolDataAttributesCreatedByDataAttributes; -}; - export type DataToolLanguageDataToolDataAttributesCreatedBy = { data?: DataToolLanguageDataToolDataAttributesCreatedByData; }; -export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesLocalizations = - { - data?: unknown[]; - }; +export type DataToolLanguageDataToolDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributes = { - name?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedBy; - localizations?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesLocalizations; - locale?: string; +export type DataToolLanguageDataToolDataAttributesCreatedByData = { + id?: number; + attributes?: DataToolLanguageDataToolDataAttributesCreatedByDataAttributes; }; export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItem = { @@ -9969,22 +9661,10 @@ export type DataToolLanguageDataToolDataAttributesDataToolEcosystems = { data?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItem[]; }; -export type DataToolLanguageDataToolDataAttributes = { - name?: string; - description?: string; - site?: string; - languages?: DataToolLanguageDataToolDataAttributesLanguages; - data_tool_resource_types?: DataToolLanguageDataToolDataAttributesDataToolResourceTypes; - geography?: string; - data_tool_ecosystems?: DataToolLanguageDataToolDataAttributesDataToolEcosystems; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesUpdatedBy; - localizations?: DataToolLanguageDataToolDataAttributesLocalizations; - locale?: string; -}; +export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesLocalizations = + { + data?: unknown[]; + }; export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -9999,6 +9679,17 @@ export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttr data?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByData; }; +export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributes = { + name?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedBy; + localizations?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesLocalizations; + locale?: string; +}; + export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -10012,6 +9703,22 @@ export type DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttr data?: DataToolLanguageDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByData; }; +export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations = + { + data?: unknown[]; + }; + +export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributes = { + name?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedBy; + localizations?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations; + locale?: string; +}; + export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItem = { id?: number; attributes?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributes; @@ -10021,11 +9728,6 @@ export type DataToolLanguageDataToolDataAttributesDataToolResourceTypes = { data?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItem[]; }; -export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations = - { - data?: unknown[]; - }; - export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10054,14 +9756,20 @@ export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemA data?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByData; }; -export type DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributes = { +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesLocalizations = { + data?: unknown[]; +}; + +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributes = { name?: string; + slug?: string; + data_tool?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesDataTool; createdAt?: string; updatedAt?: string; publishedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedBy; - localizations?: DataToolLanguageDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations; + createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesUpdatedBy; + localizations?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesLocalizations; locale?: string; }; @@ -10074,10 +9782,6 @@ export type DataToolLanguageDataToolDataAttributesLanguages = { data?: DataToolLanguageDataToolDataAttributesLanguagesDataItem[]; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesLocalizations = { - data?: unknown[]; -}; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10090,6 +9794,29 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesUpd data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesUpdatedByData; }; +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedBy = + { + data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedByData; + }; + +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributes = + { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedBy; + }; + export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByData = { id?: number; attributes?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributes; @@ -10099,19 +9826,6 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByData; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributes = { - name?: string; - slug?: string; - data_tool?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesDataTool; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesUpdatedBy; - localizations?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesLocalizations; - locale?: string; -}; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10121,11 +9835,6 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre attributes?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedBy = - { - data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedByData; - }; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -10140,6 +9849,19 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesCreatedByData; }; +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes = + { + name?: string; + code?: string; + description?: string; + users?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; + }; + export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItem = { id?: number; @@ -10151,24 +9873,6 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItem[]; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributes = - { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesUpdatedBy; - }; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10208,19 +9912,6 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes = - { - name?: string; - code?: string; - description?: string; - users?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; - }; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10249,20 +9940,6 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByData; }; -export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleDataAttributes = { [key: string]: any }; @@ -10277,6 +9954,20 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCre data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; +export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; @@ -10303,6 +9994,11 @@ export type DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesDat data?: DataToolLanguageDataToolDataAttributesLanguagesDataItemAttributesDataToolData; }; +export interface DataToolLanguageListResponse { + data?: DataToolLanguageListResponseDataItem[]; + meta?: DataToolLanguageListResponseMeta; +} + export type DataToolLanguageListResponseMetaPagination = { page?: number; pageSize?: number; @@ -10319,11 +10015,6 @@ export interface DataToolLanguageListResponseDataItem { attributes?: DataToolLanguage; } -export interface DataToolLanguageListResponse { - data?: DataToolLanguageListResponseDataItem[]; - meta?: DataToolLanguageListResponseMeta; -} - export type DataToolLanguageLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; @@ -10381,21 +10072,6 @@ export interface DataToolLanguageLocalizationRequest { export type DataToolEcosystemResponseMeta = { [key: string]: any }; -export type DataToolEcosystemLocalizations = { - data?: DataToolEcosystem[]; -}; - -export interface DataToolEcosystem { - name?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolEcosystemCreatedBy; - updatedBy?: DataToolEcosystemUpdatedBy; - localizations?: DataToolEcosystemLocalizations; - locale?: string; -} - export interface DataToolEcosystemResponseDataObject { id?: number; attributes?: DataToolEcosystem; @@ -10406,6 +10082,10 @@ export interface DataToolEcosystemResponse { meta?: DataToolEcosystemResponseMeta; } +export type DataToolEcosystemLocalizations = { + data?: DataToolEcosystem[]; +}; + export type DataToolEcosystemUpdatedByDataAttributes = { [key: string]: any }; export type DataToolEcosystemUpdatedByData = { @@ -10417,6 +10097,39 @@ export type DataToolEcosystemUpdatedBy = { data?: DataToolEcosystemUpdatedByData; }; +export interface DataToolEcosystem { + name?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolEcosystemCreatedBy; + updatedBy?: DataToolEcosystemUpdatedBy; + localizations?: DataToolEcosystemLocalizations; + locale?: string; +} + +export type DataToolEcosystemCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: DataToolEcosystemCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolEcosystemCreatedByDataAttributesCreatedBy; + updatedBy?: DataToolEcosystemCreatedByDataAttributesUpdatedBy; +}; + +export type DataToolEcosystemCreatedByData = { + id?: number; + attributes?: DataToolEcosystemCreatedByDataAttributes; +}; + export type DataToolEcosystemCreatedBy = { data?: DataToolEcosystemCreatedByData; }; @@ -10447,37 +10160,10 @@ export type DataToolEcosystemCreatedByDataAttributesCreatedBy = { data?: DataToolEcosystemCreatedByDataAttributesCreatedByData; }; -export type DataToolEcosystemCreatedByDataAttributesRolesDataItem = { - id?: number; - attributes?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributes; -}; - export type DataToolEcosystemCreatedByDataAttributesRoles = { data?: DataToolEcosystemCreatedByDataAttributesRolesDataItem[]; }; -export type DataToolEcosystemCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: DataToolEcosystemCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolEcosystemCreatedByDataAttributesCreatedBy; - updatedBy?: DataToolEcosystemCreatedByDataAttributesUpdatedBy; -}; - -export type DataToolEcosystemCreatedByData = { - id?: number; - attributes?: DataToolEcosystemCreatedByDataAttributes; -}; - export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10502,20 +10188,6 @@ export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesCreat data?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; attributes?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes; @@ -10537,6 +10209,11 @@ export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributes = { updatedBy?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; }; +export type DataToolEcosystemCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributes; +}; + export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10579,6 +10256,20 @@ export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermi data?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; +export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; @@ -10591,11 +10282,6 @@ export type DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesUsers data?: DataToolEcosystemCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; -export interface DataToolEcosystemListResponse { - data?: DataToolEcosystemListResponseDataItem[]; - meta?: DataToolEcosystemListResponseMeta; -} - export type DataToolEcosystemListResponseMetaPagination = { page?: number; pageSize?: number; @@ -10612,6 +10298,11 @@ export interface DataToolEcosystemListResponseDataItem { attributes?: DataToolEcosystem; } +export interface DataToolEcosystemListResponse { + data?: DataToolEcosystemListResponseDataItem[]; + meta?: DataToolEcosystemListResponseMeta; +} + export type DataToolEcosystemLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; @@ -10661,6 +10352,11 @@ export interface DataToolEcosystemLocalizationRequest { export type DataToolResponseMeta = { [key: string]: any }; +export interface DataToolResponseDataObject { + id?: number; + attributes?: DataTool; +} + export interface DataToolResponse { data?: DataToolResponseDataObject; meta?: DataToolResponseMeta; @@ -10670,28 +10366,6 @@ export type DataToolLocalizations = { data?: DataTool[]; }; -export interface DataTool { - name: string; - description?: string; - site?: string; - languages?: DataToolLanguages; - data_tool_resource_types?: DataToolDataToolResourceTypes; - geography?: string; - data_tool_ecosystems?: DataToolDataToolEcosystems; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolCreatedBy; - updatedBy?: DataToolUpdatedBy; - localizations?: DataToolLocalizations; - locale?: string; -} - -export interface DataToolResponseDataObject { - id?: number; - attributes?: DataTool; -} - export type DataToolUpdatedByDataAttributes = { [key: string]: any }; export type DataToolUpdatedByData = { @@ -10762,6 +10436,23 @@ export type DataToolLanguages = { data?: DataToolLanguagesDataItem[]; }; +export interface DataTool { + name: string; + description?: string; + site?: string; + languages?: DataToolLanguages; + data_tool_resource_types?: DataToolDataToolResourceTypes; + geography?: string; + data_tool_ecosystems?: DataToolDataToolEcosystems; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolCreatedBy; + updatedBy?: DataToolUpdatedBy; + localizations?: DataToolLocalizations; + locale?: string; +} + export type DataToolLanguagesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; export type DataToolLanguagesDataItemAttributesUpdatedByData = { @@ -10797,6 +10488,23 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesLocalizatio data?: unknown[]; }; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributes = { + name?: string; + description?: string; + site?: string; + languages?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguages; + data_tool_resource_types?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypes; + geography?: string; + data_tool_ecosystems?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystems; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesCreatedBy; + updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesUpdatedBy; + localizations?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLocalizations; + locale?: string; +}; + export type DataToolLanguagesDataItemAttributesDataToolDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -10827,42 +10535,11 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEco data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItem[]; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributes = { - name?: string; - description?: string; - site?: string; - languages?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguages; - data_tool_resource_types?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypes; - geography?: string; - data_tool_ecosystems?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystems; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesCreatedBy; - updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesUpdatedBy; - localizations?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLocalizations; - locale?: string; -}; - export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesLocalizations = { data?: unknown[]; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByDataAttributes = - { [key: string]: any }; - -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByData = - { - id?: number; - attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByDataAttributes; - }; - -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedBy = - { - data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByData; - }; - export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributes = { name?: string; @@ -10880,45 +10557,37 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEco attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributes; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByDataAttributes = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByData = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByData = { id?: number; - attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByDataAttributes; + attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByDataAttributes; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedBy = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedBy = { - data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByData; + data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesUpdatedByData; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypes = { - data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItem[]; -}; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByDataAttributes = + { [key: string]: any }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByData = { - data?: unknown[]; + id?: number; + attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByDataAttributes; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributes = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedBy = { - name?: string; - createdAt?: string; - updatedAt?: string; - publishedAt?: string; - createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedBy; - localizations?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations; - locale?: string; + data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolEcosystemsDataItemAttributesCreatedByData; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItem = +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations = { - id?: number; - attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributes; + data?: unknown[]; }; export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedByDataAttributes = @@ -10946,6 +10615,28 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByData; }; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributes = + { + name?: string; + createdAt?: string; + updatedAt?: string; + publishedAt?: string; + createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesUpdatedBy; + localizations?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesLocalizations; + locale?: string; + }; + +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItem = + { + id?: number; + attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributes; + }; + +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypes = { + data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItem[]; +}; + export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -10960,6 +10651,17 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesUpdatedByData; }; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByData = + { + id?: number; + attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes; + }; + +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedBy = + { + data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByData; + }; + export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributes = { firstname?: string; @@ -10981,17 +10683,6 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByData = - { - id?: number; - attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes; - }; - -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedBy = - { - data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesCreatedByData; - }; - export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItem = { id?: number; @@ -11031,20 +10722,6 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByData; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem = { id?: number; @@ -11111,6 +10788,20 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any }; @@ -11125,6 +10816,10 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolRes data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesDataToolResourceTypesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsersDataItem[]; }; +export type DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguagesDataItemAttributes = { + [key: string]: any; +}; + export type DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguagesDataItem = { id?: number; attributes?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguagesDataItemAttributes; @@ -11134,10 +10829,6 @@ export type DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguages = data?: DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguagesDataItem[]; }; -export type DataToolLanguagesDataItemAttributesDataToolDataAttributesLanguagesDataItemAttributes = { - [key: string]: any; -}; - export type DataToolListResponseMetaPagination = { page?: number; pageSize?: number; @@ -11159,6 +10850,11 @@ export interface DataToolListResponse { meta?: DataToolListResponseMeta; } +export interface DataToolLocalizationListResponse { + data?: DataToolListResponseDataItemLocalized[]; + meta?: DataToolLocalizationListResponseMeta; +} + export type DataToolLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; @@ -11175,11 +10871,6 @@ export interface DataToolListResponseDataItemLocalized { attributes?: DataTool; } -export interface DataToolLocalizationListResponse { - data?: DataToolListResponseDataItemLocalized[]; - meta?: DataToolLocalizationListResponseMeta; -} - export type DataToolLocalizationResponseMeta = { [key: string]: any }; export interface DataToolResponseDataObjectLocalized { @@ -11192,10 +10883,6 @@ export interface DataToolLocalizationResponse { meta?: DataToolLocalizationResponseMeta; } -export interface DataToolRequest { - data: DataToolRequestData; -} - export type DataToolRequestDataDataToolEcosystemsItem = number | string; export type DataToolRequestDataDataToolResourceTypesItem = number | string; @@ -11213,6 +10900,10 @@ export type DataToolRequestData = { locale?: string; }; +export interface DataToolRequest { + data: DataToolRequestData; +} + export type DataToolLocalizationRequestDataToolEcosystemsItem = number | string; export type DataToolLocalizationRequestDataToolResourceTypesItem = number | string; @@ -11232,22 +10923,6 @@ export interface DataToolLocalizationRequest { export type DataSourceResponseMeta = { [key: string]: any }; -export type DataSourceLocalizations = { - data?: DataSource[]; -}; - -export interface DataSource { - slug: string; - title: string; - url?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: DataSourceCreatedBy; - updatedBy?: DataSourceUpdatedBy; - localizations?: DataSourceLocalizations; - locale?: string; -} - export interface DataSourceResponseDataObject { id?: number; attributes?: DataSource; @@ -11258,26 +10933,33 @@ export interface DataSourceResponse { meta?: DataSourceResponseMeta; } -export type DataSourceUpdatedByDataAttributes = { [key: string]: any }; - -export type DataSourceUpdatedByData = { - id?: number; - attributes?: DataSourceUpdatedByDataAttributes; +export type DataSourceLocalizations = { + data?: DataSource[]; }; -export type DataSourceUpdatedBy = { - data?: DataSourceUpdatedByData; -}; +export type DataSourceUpdatedByDataAttributes = { [key: string]: any }; -export type DataSourceCreatedByDataAttributesUpdatedByData = { +export type DataSourceUpdatedByData = { id?: number; - attributes?: DataSourceCreatedByDataAttributesUpdatedByDataAttributes; + attributes?: DataSourceUpdatedByDataAttributes; }; -export type DataSourceCreatedByDataAttributesUpdatedBy = { - data?: DataSourceCreatedByDataAttributesUpdatedByData; +export type DataSourceUpdatedBy = { + data?: DataSourceUpdatedByData; }; +export interface DataSource { + slug: string; + title: string; + url?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: DataSourceCreatedBy; + updatedBy?: DataSourceUpdatedBy; + localizations?: DataSourceLocalizations; + locale?: string; +} + export type DataSourceCreatedByDataAttributes = { firstname?: string; lastname?: string; @@ -11306,6 +10988,15 @@ export type DataSourceCreatedBy = { export type DataSourceCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any }; +export type DataSourceCreatedByDataAttributesUpdatedByData = { + id?: number; + attributes?: DataSourceCreatedByDataAttributesUpdatedByDataAttributes; +}; + +export type DataSourceCreatedByDataAttributesUpdatedBy = { + data?: DataSourceCreatedByDataAttributesUpdatedByData; +}; + export type DataSourceCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; export type DataSourceCreatedByDataAttributesCreatedByData = { @@ -11317,23 +11008,6 @@ export type DataSourceCreatedByDataAttributesCreatedBy = { data?: DataSourceCreatedByDataAttributesCreatedByData; }; -export type DataSourceCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: DataSourceCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - -export type DataSourceCreatedByDataAttributesRolesDataItem = { - id?: number; - attributes?: DataSourceCreatedByDataAttributesRolesDataItemAttributes; -}; - export type DataSourceCreatedByDataAttributesRoles = { data?: DataSourceCreatedByDataAttributesRolesDataItem[]; }; @@ -11373,6 +11047,23 @@ export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissions data?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; +export type DataSourceCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: DataSourceCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + +export type DataSourceCreatedByDataAttributesRolesDataItem = { + id?: number; + attributes?: DataSourceCreatedByDataAttributesRolesDataItemAttributes; +}; + export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -11387,20 +11078,6 @@ export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsD data?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByData; }; -export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = - { - action?: string; - actionParameters?: unknown; - subject?: string; - properties?: unknown; - conditions?: unknown; - role?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; - createdAt?: string; - updatedAt?: string; - createdBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; - updatedBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; - }; - export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -11429,6 +11106,20 @@ export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsD data?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRoleData; }; +export type DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributes = + { + action?: string; + actionParameters?: unknown; + subject?: string; + properties?: unknown; + conditions?: unknown; + role?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesRole; + createdAt?: string; + updatedAt?: string; + createdBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesCreatedBy; + updatedBy?: DataSourceCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedBy; + }; + export type DataSourceCreatedByDataAttributesRolesDataItemAttributesUsersDataItemAttributes = { [key: string]: any; }; @@ -11463,15 +11154,6 @@ export interface DataSourceListResponse { meta?: DataSourceListResponseMeta; } -export type DataSourceLocalizationListResponseMeta = { - pagination?: DataSourceLocalizationListResponseMetaPagination; -}; - -export interface DataSourceLocalizationListResponse { - data?: DataSourceListResponseDataItemLocalized[]; - meta?: DataSourceLocalizationListResponseMeta; -} - export type DataSourceLocalizationListResponseMetaPagination = { page?: number; pageSize?: number; @@ -11479,11 +11161,20 @@ export type DataSourceLocalizationListResponseMetaPagination = { total?: number; }; +export type DataSourceLocalizationListResponseMeta = { + pagination?: DataSourceLocalizationListResponseMetaPagination; +}; + export interface DataSourceListResponseDataItemLocalized { id?: number; attributes?: DataSource; } +export interface DataSourceLocalizationListResponse { + data?: DataSourceListResponseDataItemLocalized[]; + meta?: DataSourceLocalizationListResponseMeta; +} + export type DataSourceLocalizationResponseMeta = { [key: string]: any }; export interface DataSourceResponseDataObjectLocalized { @@ -11516,22 +11207,6 @@ export interface DataSourceLocalizationRequest { export type DataInfoResponseMeta = { [key: string]: any }; -export type DataInfoLocalizations = { - data?: DataInfo[]; -}; - -export interface DataInfo { - slug: string; - content?: string; - data_sources?: DataInfoDataSources; - createdAt?: string; - updatedAt?: string; - createdBy?: DataInfoCreatedBy; - updatedBy?: DataInfoUpdatedBy; - localizations?: DataInfoLocalizations; - locale?: string; -} - export interface DataInfoResponseDataObject { id?: number; attributes?: DataInfo; @@ -11542,6 +11217,10 @@ export interface DataInfoResponse { meta?: DataInfoResponseMeta; } +export type DataInfoLocalizations = { + data?: DataInfo[]; +}; + export type DataInfoUpdatedByDataAttributes = { [key: string]: any }; export type DataInfoUpdatedByData = { @@ -11564,6 +11243,27 @@ export type DataInfoCreatedBy = { data?: DataInfoCreatedByData; }; +export type DataInfoDataSourcesDataItem = { + id?: number; + attributes?: DataInfoDataSourcesDataItemAttributes; +}; + +export type DataInfoDataSources = { + data?: DataInfoDataSourcesDataItem[]; +}; + +export interface DataInfo { + slug: string; + content?: string; + data_sources?: DataInfoDataSources; + createdAt?: string; + updatedAt?: string; + createdBy?: DataInfoCreatedBy; + updatedBy?: DataInfoUpdatedBy; + localizations?: DataInfoLocalizations; + locale?: string; +} + export type DataInfoDataSourcesDataItemAttributesLocalizations = { data?: unknown[]; }; @@ -11600,15 +11300,6 @@ export type DataInfoDataSourcesDataItemAttributes = { locale?: string; }; -export type DataInfoDataSourcesDataItem = { - id?: number; - attributes?: DataInfoDataSourcesDataItemAttributes; -}; - -export type DataInfoDataSources = { - data?: DataInfoDataSourcesDataItem[]; -}; - export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -11622,15 +11313,6 @@ export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesUpdatedB data?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesUpdatedByData; }; -export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByData = { - id?: number; - attributes?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes; -}; - -export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedBy = { - data?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByData; -}; - export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributes = { firstname?: string; lastname?: string; @@ -11652,6 +11334,15 @@ export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedB [key: string]: any; }; +export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByData = { + id?: number; + attributes?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByDataAttributes; +}; + +export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedBy = { + data?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesCreatedByData; +}; + export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItem = { id?: number; attributes?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes; @@ -11675,6 +11366,18 @@ export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDat data?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; +export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any }; @@ -11700,18 +11403,6 @@ export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDat data?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItem[]; }; -export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - export type DataInfoDataSourcesDataItemAttributesCreatedByDataAttributesRolesDataItemAttributesPermissionsDataItemAttributesUpdatedByDataAttributes = { [key: string]: any }; @@ -11920,6 +11611,23 @@ export type ContactDetailCreatedByDataAttributesUpdatedBy = { data?: ContactDetailCreatedByDataAttributesUpdatedByData; }; +export type ContactDetailCreatedByDataAttributes = { + firstname?: string; + lastname?: string; + username?: string; + email?: string; + resetPasswordToken?: string; + registrationToken?: string; + isActive?: boolean; + roles?: ContactDetailCreatedByDataAttributesRoles; + blocked?: boolean; + preferedLanguage?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: ContactDetailCreatedByDataAttributesCreatedBy; + updatedBy?: ContactDetailCreatedByDataAttributesUpdatedBy; +}; + export type ContactDetailCreatedByDataAttributesCreatedByDataAttributes = { [key: string]: any }; export type ContactDetailCreatedByDataAttributesCreatedByData = { @@ -11931,18 +11639,6 @@ export type ContactDetailCreatedByDataAttributesCreatedBy = { data?: ContactDetailCreatedByDataAttributesCreatedByData; }; -export type ContactDetailCreatedByDataAttributesRolesDataItemAttributes = { - name?: string; - code?: string; - description?: string; - users?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesUsers; - permissions?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesPermissions; - createdAt?: string; - updatedAt?: string; - createdBy?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesCreatedBy; - updatedBy?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; -}; - export type ContactDetailCreatedByDataAttributesRolesDataItem = { id?: number; attributes?: ContactDetailCreatedByDataAttributesRolesDataItemAttributes; @@ -11952,23 +11648,6 @@ export type ContactDetailCreatedByDataAttributesRoles = { data?: ContactDetailCreatedByDataAttributesRolesDataItem[]; }; -export type ContactDetailCreatedByDataAttributes = { - firstname?: string; - lastname?: string; - username?: string; - email?: string; - resetPasswordToken?: string; - registrationToken?: string; - isActive?: boolean; - roles?: ContactDetailCreatedByDataAttributesRoles; - blocked?: boolean; - preferedLanguage?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: ContactDetailCreatedByDataAttributesCreatedBy; - updatedBy?: ContactDetailCreatedByDataAttributesUpdatedBy; -}; - export type ContactDetailCreatedByDataAttributesRolesDataItemAttributesUpdatedByDataAttributes = { [key: string]: any; }; @@ -11982,6 +11661,18 @@ export type ContactDetailCreatedByDataAttributesRolesDataItemAttributesUpdatedBy data?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesUpdatedByData; }; +export type ContactDetailCreatedByDataAttributesRolesDataItemAttributes = { + name?: string; + code?: string; + description?: string; + users?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesUsers; + permissions?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesPermissions; + createdAt?: string; + updatedAt?: string; + createdBy?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesCreatedBy; + updatedBy?: ContactDetailCreatedByDataAttributesRolesDataItemAttributesUpdatedBy; +}; + export type ContactDetailCreatedByDataAttributesRolesDataItemAttributesCreatedByDataAttributes = { [key: string]: any; }; diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 0f1fa166..d462e2d1 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -33,6 +33,7 @@ module.exports = { orange: '#FD8E28', violet: '#AD6CFF', 'gray-300': '#999999', + red: '#F43F4C', }, maxWidth: { screen: '100vw', diff --git a/frontend/translations/en.json b/frontend/translations/en.json index c45f1712..2a68473e 100644 --- a/frontend/translations/en.json +++ b/frontend/translations/en.json @@ -98,7 +98,12 @@ "outro-button": "Get in touch", "looking-for": "I am looking for..." }, - "progress-tracker": {}, + "progress-tracker": { + "terrestrial-data-disclaimer-dialog-title": "Terrestrial Conservation Coverage Data Disclaimer", + "terrestrial-data-disclaimer-dialog-content": "Protected area totals and trends in this dataset are derived from publicly available boundaries sourced from Protected Planet. However, some countries restrict the release of detailed protected area boundaries, leading to differences between our totals and those reported by the World Database on Protected Areas.



      Due to these data restrictions, our protected area totals are lower both globally and in regions where boundaries are not publicly accessible.", + "i-understand": "I understand", + "important-notification": "Important notification" + }, "conservation-builder": {} }, "containers": { @@ -141,7 +146,8 @@ "product-powered-by": "Product powered by", "current-ocean-protected-area": "Current global ocean protected area", "current-total-protected-area": "Current global land and inland waters protected area", - "statistics-icon": "Statistics icon" + "statistics-icon": "Statistics icon", + "info": "Info" }, "homepage-link-cards": { "card-1-title": "Progress Tracker", @@ -191,7 +197,10 @@ "no-result": "No result", "view-all-countries": "View all countries", "hide-some-countries": "Hide some countries", - "more-details": "More details", + "show-global-insights-table": "Show Global Insights Table", + "show-country-insights-table": "Show Country Insights Table", + "show-terrestrial-insights-table": "Show Terrestrial Insights Table", + "show-marine-insights-table": "Show Marine Insights Table", "marine-conservation-coverage": "Marine Conservation Coverage", "marine-protected-percentage": "{percentage}%", "marine-protected-area": "{protectedArea} km² out of {totalArea} km²", @@ -217,11 +226,27 @@ "national-level-contribution": "National level contribution", "global": "Global", "level-of-fishing-protection": "Level of Fishing Protection", - "highly-protected-from-fishing": "Highly protected from fishing" + "highly-protected-from-fishing": "Highly protected from fishing", + "summary": "Summary", + "terrestrial": "Terrestrial", + "marine": "Marine", + "terrestrial-conservation-coverage": "Terrestrial Conservation Coverage", + "terrestrial-protected-percentage": "{percentage}%", + "terrestrial-protected-area": "{protectedArea} km² out of {totalArea} km²", + "explore-terrestrial-conservation": "Explore Terrestrial Conservation", + "explore-marine-conservation": "Explore Marine Conservation", + "terrestrial-existing-conservation": "Existing terrestrial conservation coverage", + "not-assessed": "Not assessed", + "data-disclaimer": "Data disclaimer" }, "map-sidebar-layers-panel": { "layers": "Layers", - "labels": "Labels" + "labels": "Labels", + "basemap": "Basemap", + "marine-data": "Marine Data", + "terrestrial-data": "Terrestrial Data", + "loading": "Loading data...", + "no-data-available": "No data available" }, "map": { "loading": "Loading...", @@ -229,13 +254,11 @@ "no-data-available": "No data available", "no-results": "No results.", "marine-conservation-coverage": "Marine Conservation Coverage", + "terrestrial-conservation-coverage": "Terrestrial Conservation Coverage", "percentage": "{percentage}%", "percentage-bold": "{percentage}%", - "marine-protected-area": "{protectedArea} km² out of {totalArea} km²", + "protected-area": "{protectedArea} km² out of {totalArea} km²", "open-country-insights": "Open country insights", - "eezs": "EEZs", - "selected-eez": "Selected EEZ", - "area-corresponding-to-more-than-1-eez": "Area corresponding to more

      than one EEZ", "global-coverage": "Global coverage", "area-km2": "{area} km²", "open-region-insights": "Open region insights", @@ -249,16 +272,24 @@ "show": "Show", "remove": "Remove", "close": "Close", + "environmental-conservation-national-regional-levels": "Environmental Conservation at National and Regional Levels", + "environmental-conservation-location": "Environmental Conservation for '{location'}", + "environmental-conservation": "Environmental Conservation", + "terrestrial-conservation-national-regional-levels": "Terrestrial Conservation at National and Regional Levels", + "terrestrial-conservation-location": "Terrestrial Conservation for '{location'}", + "terrestrial-conservation": "Terrestrial Conservation", "marine-conservation-national-regional-levels": "Marine Conservation at National and Regional Levels", + "environmental-conservation-high-seas": "Environmental Conservation for High Seas", + "terrestrial-conservation-high-seas": "Terrestrial Conservation for High Seas", "marine-conservation-location": "Marine Conservation for '{location'}", "marine-conservation": "Marine Conservation", - "marin-conservation-high-seas": "Marine Conservation for High Seas", + "marine-conservation-high-seas": "Marine Conservation for High Seas", "name": "Name", "coverage": "Coverage", "area": "Area", "data-source": "Data Source", "iucn-category": "IUCN Category", - "mpas": "MPAs", + "pas": "PAs", "n-a": "N/A", "not-assessed": "Not assessed", "oecms": "OECMs", @@ -269,7 +300,14 @@ "clear-sorting": "Clear sorting", "type": "Type", "establishment-stage": "Establishment Stage", - "protection-level": "Protection Level" + "protection-level": "Protection Level", + "ecosystem": "Ecosystem", + "results-out-of": "{startIndex}-{endIndex} out of {total}", + "previous-page": "Previous page", + "next-page": "Next page", + "page-number": "Page {number}", + "collapse-sub-rows": "Collapse sub-rows", + "expand-sub-rows": "Expand sub-rows" } }, "components": { @@ -303,15 +341,16 @@ "widget": { "updated-on": "Updated on {date}", "loading-data": "Loading data...", - "data-not-available": "Data not available" + "no-data-available": "No data available", + "not-visible-due-to-error": "The current widget is not visible due to an error" }, "chart-conservation": { - "30x30-target": "30x30 Target", "year-value": "Year: {value}", "coverage-value": "Coverage: {percentage}", "historical-trend": "Historical Trend", "future-projection": "Future Projection", - "historical": "Historical" + "historical": "Historical", + "target-xx-by": "Target: {target}% by {year}" }, "chart-horizontal-bar": { "marine-protected-percentage": "{percentage}%", @@ -326,7 +365,8 @@ }, "tooltip-button": { "info": "Info", - "data-source": "Data source" + "data-source": "Data source", + "data-sources:": "Data sources:" }, "ui-carousel": { "previous-slide": "Previous slide", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 45ee2bb0..272a6262 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2919,22 +2919,22 @@ __metadata: languageName: node linkType: hard -"@tanstack/react-table@npm:^8.9.7": - version: 8.10.7 - resolution: "@tanstack/react-table@npm:8.10.7" +"@tanstack/react-table@npm:^8.20.5": + version: 8.20.5 + resolution: "@tanstack/react-table@npm:8.20.5" dependencies: - "@tanstack/table-core": 8.10.7 + "@tanstack/table-core": 8.20.5 peerDependencies: - react: ">=16" - react-dom: ">=16" - checksum: f8f19ae3ad8531e0f3cb838b61213d9acd0b64b27d1a8a05a699e6ed50e25c9d3c9478ae3f6d20883288f601eec06e8264fac9503b36122471c2f8778782e1e2 + react: ">=16.8" + react-dom: ">=16.8" + checksum: 4c08ff56011f640da2dc2680aa141f642f394ed6dd849f681c50d429c27f8f387222fb05436ce4f9fb66715e52587633e859e5cf13f9ee7e4dd80656b1f9ca00 languageName: node linkType: hard -"@tanstack/table-core@npm:8.10.7": - version: 8.10.7 - resolution: "@tanstack/table-core@npm:8.10.7" - checksum: 2a364917e7ab051ef3f33d6f18e5e1ddb75cfed4b5ee0e2b9c74a8cb72d3b86cdd4ffbab67565c68b4333f761b6fde9a7215196387a9a3b3d5811119d8859bad +"@tanstack/table-core@npm:8.20.5": + version: 8.20.5 + resolution: "@tanstack/table-core@npm:8.20.5" + checksum: f8b175f11eb9ee1e029bb5e91c1038527714382de4bd14750377f43c25e69b687b21bfb181ee07131637d3432618964a4b7a898608fc8411ca50da1e7e8ed4c5 languageName: node linkType: hard @@ -12091,7 +12091,7 @@ __metadata: "@tailwindcss/line-clamp": 0.4.4 "@tailwindcss/typography": 0.5.9 "@tanstack/react-query": 4.26.1 - "@tanstack/react-table": ^8.9.7 + "@tanstack/react-table": ^8.20.5 "@turf/turf": ^6.5.0 "@types/google.analytics": 0.0.42 "@types/mapbox__mapbox-gl-draw": 1.4.6