diff --git a/app/src/api/layersApi.ts b/app/src/api/layersApi.ts index d7cd0c8f..b91e5881 100644 --- a/app/src/api/layersApi.ts +++ b/app/src/api/layersApi.ts @@ -23,6 +23,7 @@ export class layersApi { ], filter: { maps: { maps_id: { id: { _eq: this.mapId } } } }, limit: 500, + sort: ['sort'], }), ) return layers diff --git a/backend/directus-config/snapshot/fields/layers/sort.json b/backend/directus-config/snapshot/fields/layers/sort.json new file mode 100644 index 00000000..96567703 --- /dev/null +++ b/backend/directus-config/snapshot/fields/layers/sort.json @@ -0,0 +1,43 @@ +{ + "collection": "layers", + "field": "sort", + "type": "integer", + "meta": { + "collection": "layers", + "conditions": null, + "display": null, + "display_options": null, + "field": "sort", + "group": null, + "hidden": false, + "interface": "input", + "note": null, + "options": null, + "readonly": false, + "required": false, + "sort": 18, + "special": null, + "translations": null, + "validation": null, + "validation_message": null, + "width": "full" + }, + "schema": { + "name": "sort", + "table": "layers", + "data_type": "integer", + "default_value": 10, + "max_length": null, + "numeric_precision": 32, + "numeric_scale": 0, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +} diff --git a/backend/directus-config/specs/item.graphql b/backend/directus-config/specs/item.graphql index 632b4602..aa925e55 100644 --- a/backend/directus-config/specs/item.graphql +++ b/backend/directus-config/specs/item.graphql @@ -15,6 +15,10 @@ type Query { oceannomads_profiles_by_id(id: ID!, version: String): oceannomads_profiles oceannomads_profiles_aggregated(groupBy: [String], filter: oceannomads_profiles_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [oceannomads_profiles_aggregated!]! oceannomads_profiles_by_version(version: String!, id: ID!): version_oceannomads_profiles + layers(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers!]! + layers_by_id(id: ID!, version: String): layers + layers_aggregated(groupBy: [String], filter: layers_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [layers_aggregated!]! + layers_by_version(version: String!, id: ID!): version_layers attestations(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [attestations!]! attestations_by_id(id: ID!, version: String): attestations attestations_aggregated(groupBy: [String], filter: attestations_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [attestations_aggregated!]! @@ -67,10 +71,6 @@ type Query { itemSecrets_by_id(id: ID!, version: String): itemSecrets itemSecrets_aggregated(groupBy: [String], filter: itemSecrets_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [itemSecrets_aggregated!]! itemSecrets_by_version(version: String!, id: ID!): version_itemSecrets - layers(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers!]! - layers_by_id(id: ID!, version: String): layers - layers_aggregated(groupBy: [String], filter: layers_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [layers_aggregated!]! - layers_by_version(version: String!, id: ID!): version_layers items_files(filter: items_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [items_files!]! items_files_by_id(id: ID!, version: String): items_files items_files_aggregated(groupBy: [String], filter: items_files_filter, limit: Int, offset: Int, page: Int, search: String, sort: [String]): [items_files_aggregated!]! @@ -150,6 +150,8 @@ type Mutation { create_oceannomads_events_item(data: create_oceannomads_events_input!): oceannomads_events create_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_oceannomads_profiles_input!]): [oceannomads_profiles!]! create_oceannomads_profiles_item(data: create_oceannomads_profiles_input!): oceannomads_profiles + create_layers_items(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_layers_input!]): [layers!]! + create_layers_item(data: create_layers_input!): layers create_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_input!]): [attestations!]! create_attestations_item(data: create_attestations_input!): attestations create_attestations_directus_users_items(filter: attestations_directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_attestations_directus_users_input!]): [attestations_directus_users!]! @@ -176,8 +178,6 @@ type Mutation { create_items_item(data: create_items_input!): items create_itemSecrets_items(filter: itemSecrets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_itemSecrets_input!]): [itemSecrets!]! create_itemSecrets_item(data: create_itemSecrets_input!): itemSecrets - create_layers_items(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_layers_input!]): [layers!]! - create_layers_item(data: create_layers_input!): layers create_items_files_items(filter: items_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_items_files_input!]): [items_files!]! create_items_files_item(data: create_items_files_input!): items_files create_items_items_items(filter: items_items_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [create_items_items_input!]): [items_items!]! @@ -224,6 +224,9 @@ type Mutation { update_oceannomads_profiles_items(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_oceannomads_profiles_input!): [oceannomads_profiles!]! update_oceannomads_profiles_batch(filter: oceannomads_profiles_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_oceannomads_profiles_input!]): [oceannomads_profiles!]! update_oceannomads_profiles_item(id: ID!, data: update_oceannomads_profiles_input!): oceannomads_profiles + update_layers_items(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_layers_input!): [layers!]! + update_layers_batch(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_layers_input!]): [layers!]! + update_layers_item(id: ID!, data: update_layers_input!): layers update_attestations_items(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_attestations_input!): [attestations!]! update_attestations_batch(filter: attestations_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_attestations_input!]): [attestations!]! update_attestations_item(id: ID!, data: update_attestations_input!): attestations @@ -263,9 +266,6 @@ type Mutation { update_itemSecrets_items(filter: itemSecrets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_itemSecrets_input!): [itemSecrets!]! update_itemSecrets_batch(filter: itemSecrets_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_itemSecrets_input!]): [itemSecrets!]! update_itemSecrets_item(id: ID!, data: update_itemSecrets_input!): itemSecrets - update_layers_items(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_layers_input!): [layers!]! - update_layers_batch(filter: layers_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_layers_input!]): [layers!]! - update_layers_item(id: ID!, data: update_layers_input!): layers update_items_files_items(filter: items_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, ids: [ID]!, data: update_items_files_input!): [items_files!]! update_items_files_batch(filter: items_files_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String, data: [update_items_files_input!]): [items_files!]! update_items_files_item(id: ID!, data: update_items_files_input!): items_files @@ -325,6 +325,8 @@ type Mutation { delete_oceannomads_events_item(id: ID!): delete_one delete_oceannomads_profiles_items(ids: [ID]!): delete_many delete_oceannomads_profiles_item(id: ID!): delete_one + delete_layers_items(ids: [ID]!): delete_many + delete_layers_item(id: ID!): delete_one delete_attestations_items(ids: [ID]!): delete_many delete_attestations_item(id: ID!): delete_one delete_attestations_directus_users_items(ids: [ID]!): delete_many @@ -351,8 +353,6 @@ type Mutation { delete_items_item(id: ID!): delete_one delete_itemSecrets_items(ids: [ID]!): delete_many delete_itemSecrets_item(id: ID!): delete_one - delete_layers_items(ids: [ID]!): delete_many - delete_layers_item(id: ID!): delete_one delete_items_files_items(ids: [ID]!): delete_many delete_items_files_item(id: ID!): delete_one delete_items_items_items(ids: [ID]!): delete_many @@ -415,6 +415,7 @@ type Subscription { relations_mutated(event: EventEnum): relations_mutated oceannomads_events_mutated(event: EventEnum): oceannomads_events_mutated oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated + layers_mutated(event: EventEnum): layers_mutated attestations_mutated(event: EventEnum): attestations_mutated attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated contactInfos_mutated(event: EventEnum): contactInfos_mutated @@ -428,7 +429,6 @@ type Subscription { inviteLinks_mutated(event: EventEnum): inviteLinks_mutated items_mutated(event: EventEnum): items_mutated itemSecrets_mutated(event: EventEnum): itemSecrets_mutated - layers_mutated(event: EventEnum): layers_mutated items_files_mutated(event: EventEnum): items_files_mutated items_items_mutated(event: EventEnum): items_items_mutated items_tags_mutated(event: EventEnum): items_tags_mutated @@ -1798,6 +1798,7 @@ type layers { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps] maps_func: count_functions notifications(filter: layers_directus_users_1_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_directus_users_1] @@ -1809,6 +1810,12 @@ type layers_aggregated { countAll: Int count: layers_aggregated_count countDistinct: layers_aggregated_count + avg: layers_aggregated_fields + sum: layers_aggregated_fields + avgDistinct: layers_aggregated_fields + sumDistinct: layers_aggregated_fields + min: layers_aggregated_fields + max: layers_aggregated_fields } type layers_aggregated_count { @@ -1828,10 +1835,15 @@ type layers_aggregated_count { onlyOnePerOwner: Int public_edit_items: Int userProfileLayer: Int + sort: Int maps: Int notifications: Int } +type layers_aggregated_fields { + sort: Float +} + type layers_directus_users_1 { directus_users_id(filter: directus_users_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): directus_users id: ID! @@ -2694,6 +2706,7 @@ type version_layers { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps: JSON notifications: JSON } @@ -3280,6 +3293,7 @@ input create_layers_input { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps: [create_layers_maps_input] notifications: [create_layers_directus_users_1_input] } @@ -4269,6 +4283,7 @@ input layers_filter { onlyOnePerOwner: boolean_filter_operators public_edit_items: boolean_filter_operators userProfileLayer: boolean_filter_operators + sort: number_filter_operators maps: layers_maps_quantifier_filter maps_func: count_function_filter_operators notifications: layers_directus_users_1_quantifier_filter @@ -4872,6 +4887,7 @@ input update_layers_input { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps: [update_layers_maps_input] notifications: [update_layers_directus_users_1_input] } diff --git a/backend/directus-config/specs/openapi.json b/backend/directus-config/specs/openapi.json index 02bacd82..7508211b 100644 --- a/backend/directus-config/specs/openapi.json +++ b/backend/directus-config/specs/openapi.json @@ -9067,6 +9067,395 @@ ] } }, + "/items/layers": { + "post": { + "summary": "Create an Item", + "description": "Create a new layers item.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "createItemsLayers", + "parameters": [ + { + "$ref": "#/components/parameters/Meta" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemsLayers" + } + }, + { + "$ref": "#/components/schemas/ItemsLayers" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemsLayers" + } + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "get": { + "summary": "List Items", + "description": "List the layers items.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "readItemsLayers", + "security": [ + { + "Auth": [] + } + ], + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/components/schemas/ItemsLayers" + } + }, + "meta": { + "$ref": "#/components/schemas/x-metadata" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + }, + "patch": { + "summary": "Update Multiple Items", + "description": "Update multiple layers items at the same time.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "updateItemsLayers", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Limit" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Sort" + }, + { + "$ref": "#/components/parameters/Filter" + }, + { + "$ref": "#/components/parameters/Search" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemsLayers" + } + }, + { + "$ref": "#/components/schemas/ItemsLayers" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ItemsLayers" + } + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete Multiple Items", + "description": "Delete multiple existing layers items.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "deleteItemsLayers", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + }, + "parameters": [] + } + }, + "/items/layers/{id}": { + "get": { + "summary": "Retrieve an Item", + "description": "Retrieve a single layers item by unique identifier.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "readSingleItemsLayers", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "$ref": "#/components/parameters/Version" + }, + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } + } + ], + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "$ref": "#/components/schemas/ItemsLayers" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "patch": { + "summary": "Update an Item", + "description": "Update an existing layers item.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "updateSingleItemsLayers", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Meta" + }, + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "$ref": "#/components/schemas/ItemsLayers" + } + } + } + }, + "responses": { + "200": { + "description": "Successful request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "$ref": "#/components/schemas/ItemsLayers" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + } + }, + "delete": { + "summary": "Delete an Item", + "description": "Delete an existing layers item.", + "tags": [ + "Items", + "ItemsLayers" + ], + "operationId": "deleteSingleItemsLayers", + "responses": { + "200": { + "description": "Successful request" + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + }, + "404": { + "$ref": "#/components/responses/NotFoundError" + } + }, + "parameters": [ + { + "name": "id", + "description": "Index of the item.", + "in": "path", + "required": true, + "schema": { + "oneOf": [ + { + "type": "integer", + "description": "Incremental index of the item.", + "example": 1 + }, + { + "type": "string", + "description": "Unique identifier of the item.", + "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" + } + ] + } + } + ] + } + }, "/items/attestations": { "post": { "summary": "Create an Item", @@ -14124,395 +14513,6 @@ ] } }, - "/items/layers": { - "post": { - "summary": "Create an Item", - "description": "Create a new layers item.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "createItemsLayers", - "parameters": [ - { - "$ref": "#/components/parameters/Meta" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsLayers" - } - }, - { - "$ref": "#/components/schemas/ItemsLayers" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsLayers" - } - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - } - }, - "get": { - "summary": "List Items", - "description": "List the layers items.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "readItemsLayers", - "security": [ - { - "Auth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" - } - ], - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/components/schemas/ItemsLayers" - } - }, - "meta": { - "$ref": "#/components/schemas/x-metadata" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - } - }, - "patch": { - "summary": "Update Multiple Items", - "description": "Update multiple layers items at the same time.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "updateItemsLayers", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Limit" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Offset" - }, - { - "$ref": "#/components/parameters/Sort" - }, - { - "$ref": "#/components/parameters/Filter" - }, - { - "$ref": "#/components/parameters/Search" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsLayers" - } - }, - { - "$ref": "#/components/schemas/ItemsLayers" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ItemsLayers" - } - } - } - } - } - } - } - } - }, - "delete": { - "summary": "Delete Multiple Items", - "description": "Delete multiple existing layers items.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "deleteItemsLayers", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - } - }, - "parameters": [] - } - }, - "/items/layers/{id}": { - "get": { - "summary": "Retrieve an Item", - "description": "Retrieve a single layers item by unique identifier.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "readSingleItemsLayers", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "$ref": "#/components/parameters/Version" - }, - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ], - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsLayers" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - } - }, - "patch": { - "summary": "Update an Item", - "description": "Update an existing layers item.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "updateSingleItemsLayers", - "parameters": [ - { - "$ref": "#/components/parameters/Fields" - }, - { - "$ref": "#/components/parameters/Meta" - }, - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "$ref": "#/components/schemas/ItemsLayers" - } - } - } - }, - "responses": { - "200": { - "description": "Successful request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "data": { - "type": "object", - "$ref": "#/components/schemas/ItemsLayers" - } - } - } - } - } - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - } - }, - "delete": { - "summary": "Delete an Item", - "description": "Delete an existing layers item.", - "tags": [ - "Items", - "ItemsLayers" - ], - "operationId": "deleteSingleItemsLayers", - "responses": { - "200": { - "description": "Successful request" - }, - "401": { - "$ref": "#/components/responses/UnauthorizedError" - }, - "404": { - "$ref": "#/components/responses/NotFoundError" - } - }, - "parameters": [ - { - "name": "id", - "description": "Index of the item.", - "in": "path", - "required": true, - "schema": { - "oneOf": [ - { - "type": "integer", - "description": "Incremental index of the item.", - "example": 1 - }, - { - "type": "string", - "description": "Unique identifier of the item.", - "example": "8cbb43fe-4cdf-4991-8352-c461779cec02" - } - ] - } - } - ] - } - }, "/items/items_files": { "post": { "summary": "Create an Item", @@ -21266,6 +21266,10 @@ "name": "ItemsOceannomadsProfiles", "x-collection": "oceannomads_profiles" }, + { + "name": "ItemsLayers", + "x-collection": "layers" + }, { "name": "ItemsAttestations", "x-collection": "attestations" @@ -21318,10 +21322,6 @@ "name": "ItemsItemSecrets", "x-collection": "itemSecrets" }, - { - "name": "ItemsLayers", - "x-collection": "layers" - }, { "name": "ItemsItemsFiles", "x-collection": "items_files" @@ -23439,6 +23439,142 @@ "id" ] }, + "ItemsLayers": { + "type": "object", + "properties": { + "id": { + "nullable": false, + "type": "string", + "format": "uuid" + }, + "indexIcon": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Files" + } + ] + }, + "index_plus_button": { + "nullable": true, + "type": "boolean" + }, + "itemType": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/ItemsTypes" + } + ] + }, + "item_presets": { + "nullable": true + }, + "listed": { + "nullable": true, + "type": "boolean" + }, + "markerDefaultColor2": { + "nullable": true, + "type": "string" + }, + "markerIcon": { + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/ItemsMarkerIcons" + } + ] + }, + "markerShape": { + "nullable": true, + "type": "string" + }, + "menuColor": { + "nullable": true, + "type": "string" + }, + "menuIcon": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/components/schemas/Files" + } + ] + }, + "menuText": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "onlyOnePerOwner": { + "nullable": true, + "type": "boolean" + }, + "public_edit_items": { + "nullable": true, + "type": "boolean" + }, + "userProfileLayer": { + "nullable": true, + "type": "boolean" + }, + "sort": { + "nullable": true, + "type": "integer" + }, + "maps": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/ItemsLayersMaps" + } + ] + } + }, + "notifications": { + "nullable": true, + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "#/components/schemas/ItemsLayersDirectusUsers1" + } + ] + } + } + }, + "x-collection": "layers", + "required": [ + "id" + ] + }, "ItemsAttestations": { "type": "object", "properties": { @@ -24277,138 +24413,6 @@ "secret" ] }, - "ItemsLayers": { - "type": "object", - "properties": { - "id": { - "nullable": false, - "type": "string", - "format": "uuid" - }, - "indexIcon": { - "nullable": true, - "oneOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/components/schemas/Files" - } - ] - }, - "index_plus_button": { - "nullable": true, - "type": "boolean" - }, - "itemType": { - "nullable": true, - "oneOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/components/schemas/ItemsTypes" - } - ] - }, - "item_presets": { - "nullable": true - }, - "listed": { - "nullable": true, - "type": "boolean" - }, - "markerDefaultColor2": { - "nullable": true, - "type": "string" - }, - "markerIcon": { - "nullable": true, - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/ItemsMarkerIcons" - } - ] - }, - "markerShape": { - "nullable": true, - "type": "string" - }, - "menuColor": { - "nullable": true, - "type": "string" - }, - "menuIcon": { - "nullable": true, - "oneOf": [ - { - "type": "string", - "format": "uuid" - }, - { - "$ref": "#/components/schemas/Files" - } - ] - }, - "menuText": { - "nullable": true, - "type": "string" - }, - "name": { - "nullable": true, - "type": "string" - }, - "onlyOnePerOwner": { - "nullable": true, - "type": "boolean" - }, - "public_edit_items": { - "nullable": true, - "type": "boolean" - }, - "userProfileLayer": { - "nullable": true, - "type": "boolean" - }, - "maps": { - "nullable": true, - "type": "array", - "items": { - "oneOf": [ - { - "type": "integer" - }, - { - "$ref": "#/components/schemas/ItemsLayersMaps" - } - ] - } - }, - "notifications": { - "nullable": true, - "type": "array", - "items": { - "oneOf": [ - { - "type": "integer" - }, - { - "$ref": "#/components/schemas/ItemsLayersDirectusUsers1" - } - ] - } - } - }, - "x-collection": "layers", - "required": [ - "id" - ] - }, "ItemsItemsFiles": { "type": "object", "properties": { diff --git a/backend/directus-config/specs/system.graphql b/backend/directus-config/specs/system.graphql index c60d1d16..c4fa5aa1 100644 --- a/backend/directus-config/specs/system.graphql +++ b/backend/directus-config/specs/system.graphql @@ -266,6 +266,7 @@ type Subscription { relations_mutated(event: EventEnum): relations_mutated oceannomads_events_mutated(event: EventEnum): oceannomads_events_mutated oceannomads_profiles_mutated(event: EventEnum): oceannomads_profiles_mutated + layers_mutated(event: EventEnum): layers_mutated attestations_mutated(event: EventEnum): attestations_mutated attestations_directus_users_mutated(event: EventEnum): attestations_directus_users_mutated contactInfos_mutated(event: EventEnum): contactInfos_mutated @@ -279,7 +280,6 @@ type Subscription { inviteLinks_mutated(event: EventEnum): inviteLinks_mutated items_mutated(event: EventEnum): items_mutated itemSecrets_mutated(event: EventEnum): itemSecrets_mutated - layers_mutated(event: EventEnum): layers_mutated items_files_mutated(event: EventEnum): items_files_mutated items_items_mutated(event: EventEnum): items_items_mutated items_tags_mutated(event: EventEnum): items_tags_mutated @@ -1967,6 +1967,7 @@ type layers { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps(filter: layers_maps_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_maps] maps_func: count_functions notifications(filter: layers_directus_users_1_filter, sort: [String], limit: Int, offset: Int, page: Int, search: String): [layers_directus_users_1] @@ -2779,6 +2780,7 @@ input create_layers_input { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps: [create_layers_maps_input] notifications: [create_layers_directus_users_1_input] } @@ -3740,6 +3742,7 @@ input layers_filter { onlyOnePerOwner: boolean_filter_operators public_edit_items: boolean_filter_operators userProfileLayer: boolean_filter_operators + sort: number_filter_operators maps: layers_maps_quantifier_filter maps_func: count_function_filter_operators notifications: layers_directus_users_1_quantifier_filter @@ -4317,6 +4320,7 @@ input update_layers_input { onlyOnePerOwner: Boolean public_edit_items: Boolean userProfileLayer: Boolean + sort: Int maps: [update_layers_maps_input] notifications: [update_layers_directus_users_1_input] }