diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index f3c33b643bf85812ccefe632938805aece99ad21..65a739b2e0a4c212d0e4df4711e0a22b0784c063 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -3,7 +3,6 @@ volumes: data-db-data: auth-db-data: broker-service-data: - upload-service-data: search-db-data: identity-service-data: metric-db-data: @@ -114,7 +113,7 @@ services: init: true restart: "no" container_name: dbrepo-auth-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 environment: AUTH_SERVICE_ADMIN: ${AUTH_SERVICE_ADMIN:-admin} AUTH_SERVICE_ADMIN_PASSWORD: ${AUTH_SERVICE_ADMIN_PASSWORD:-admin} @@ -135,7 +134,7 @@ services: restart: "no" container_name: dbrepo-metadata-service hostname: metadata-service - image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 volumes: - "${SHARED_VOLUME:-/tmp}:/tmp" environment: @@ -198,7 +197,7 @@ services: restart: "no" container_name: dbrepo-analyse-service hostname: analyse-service - image: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.0 environment: AUTH_SERVICE_CLIENT: ${AUTH_SERVICE_CLIENT:-dbrepo-client} AUTH_SERVICE_CLIENT_SECRET: ${AUTH_SERVICE_CLIENT:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG} @@ -253,7 +252,7 @@ services: restart: "no" container_name: dbrepo-search-db hostname: search-db - image: registry.datalab.tuwien.ac.at/dbrepo/search-db:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/search-db:1.7.0 healthcheck: test: curl -sSL localhost:9200/_plugins/_security/health | jq .status | grep UP interval: 10s @@ -277,7 +276,7 @@ services: restart: "no" container_name: dbrepo-search-service hostname: search-service - image: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.0 environment: AUTH_SERVICE_CLIENT: ${AUTH_SERVICE_CLIENT:-dbrepo-client} AUTH_SERVICE_CLIENT_SECRET: ${AUTH_SERVICE_CLIENT_SECRET:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG} @@ -301,11 +300,10 @@ services: restart: "no" container_name: dbrepo-ui hostname: ui - image: registry.datalab.tuwien.ac.at/dbrepo/ui:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.0 environment: NUXT_PUBLIC_API_CLIENT: "${BASE_URL:-http://localhost}" NUXT_PUBLIC_API_SERVER: "${BASE_URL:-http://gateway-service}" - NUXT_PUBLIC_UPLOAD_CLIENT: "${BASE_URL:-http://localhost}/api/upload/files" NUXT_OIDC_PROVIDERS_KEYCLOAK_AUTHORIZATION_URL: "${BASE_URL:-http://localhost}/realms/dbrepo/protocol/openid-connect/auth" NUXT_OIDC_PROVIDERS_KEYCLOAK_BASE_URL: "${BASE_URL:-http://localhost}/realms/dbrepo" NUXT_OIDC_PROVIDERS_KEYCLOAK_CLIENT_ID: "${AUTH_SERVICE_CLIENT:-dbrepo-client}" @@ -318,8 +316,6 @@ services: depends_on: dbrepo-search-service: condition: service_healthy - dbrepo-upload-service: - condition: service_healthy healthcheck: test: curl -fsSL http://127.0.0.1:3000 && curl -fsSL http://127.0.0.1:3000/health interval: 10s @@ -381,7 +377,7 @@ services: init: true container_name: dbrepo-search-service-init hostname: search-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.0 environment: LOG_LEVEL: ${LOG_LEVEL:-info} METADATA_SERVICE_ENDPOINT: ${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080} @@ -438,7 +434,7 @@ services: restart: "no" container_name: dbrepo-dashboard-service hostname: dashboard-service - image: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/dashboard-service:1.7.0 ports: - "3000:3000" volumes: @@ -465,7 +461,7 @@ services: init: true container_name: dbrepo-storage-service-init hostname: storage-service-init - image: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.0 environment: S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-seaweedfsadmin} S3_BUCKET: "${S3_BUCKET:-dbrepo}" @@ -477,41 +473,11 @@ services: logging: driver: json-file - dbrepo-upload-service: - restart: "no" - container_name: dbrepo-upload-service - hostname: upload-service - image: docker.io/tusproject/tusd:v2.4.0 - volumes: - - "./config/pre-create.sh:/srv/tusd-hooks/pre-create:ro" - command: - - "-behind-proxy" - - "-max-size=2000000000" - - "-base-path=/api/upload/files/" - - "-hooks-dir=/srv/tusd-hooks/" - - "-s3-endpoint=${STORAGE_ENDPOINT:-http://storage-service:9000}" - - "-s3-bucket=dbrepo" - environment: - AWS_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID:-seaweedfsadmin}" - AWS_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY:-seaweedfsadmin}" - AWS_REGION: "${STORAGE_REGION_NAME:-default}" - METADATA_SERVICE_ENDPOINT: "${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080}" - depends_on: - dbrepo-storage-service: - condition: service_healthy - healthcheck: - test: wget -qO- localhost:8080/metrics | grep "tusd" || exit 1 - interval: 10s - timeout: 5s - retries: 12 - logging: - driver: json-file - dbrepo-data-service: restart: "no" container_name: dbrepo-data-service hostname: data-service - image: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.6.5 + image: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.0 volumes: - "${SHARED_VOLUME:-/tmp}:/tmp" environment: diff --git a/.docs/.openapi/api-data.yaml b/.docs/.openapi/api-data.yaml index bd14ba55057657c5a38d47cc29875d41e5cc1e71..8cc02b64c06695710ed39eddfa318e9f340dcd84 100644 --- a/.docs/.openapi/api-data.yaml +++ b/.docs/.openapi/api-data.yaml @@ -8,10 +8,10 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 - version: 1.6.2 + version: 1.7.0 externalDocs: description: Sourcecode Documentation - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6.2/system-services-metadata/ + url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.0/system-services-metadata/ servers: - url: http://localhost description: Development instance @@ -24,22 +24,21 @@ paths: - view-endpoint summary: Get view data description: "Gets data from a view of a database. For private databases, the\ - \ user needs at least *READ* access to the associated database. Requires role\ - \ `view-database-view-data`." + \ user needs at least *READ* access to the associated database." operationId: getData parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: page in: query required: false @@ -59,20 +58,35 @@ paths: type: string format: date-time responses: - "503": - description: Failed to establish connection with the metadata service + "200": + description: Retrieved view data + headers: + Access-Control-Expose-Headers: + description: Expose `X-Count` custom header + required: true + style: simple + X-Count: + description: Number of rows + required: true + style: simple + content: + application/json: + schema: + type: string + "409": + description: View schema could not be mapped content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find view in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "409": - description: View schema could not be mapped + "404": + description: Failed to find view in metadata database content: application/json: schema: @@ -89,21 +103,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Retrieved view data - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of rows - required: true - style: simple - content: - application/json: - schema: - type: string security: - basicAuth: [] - bearerAuth: [] @@ -112,22 +111,21 @@ paths: - view-endpoint summary: Get view data description: "Gets data from a view of a database. For private databases, the\ - \ user needs at least *READ* access to the associated database. Requires role\ - \ `view-database-view-data`." + \ user needs at least *READ* access to the associated database." operationId: getData_1 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: page in: query required: false @@ -147,20 +145,35 @@ paths: type: string format: date-time responses: - "503": - description: Failed to establish connection with the metadata service + "200": + description: Retrieved view data + headers: + Access-Control-Expose-Headers: + description: Expose `X-Count` custom header + required: true + style: simple + X-Count: + description: Number of rows + required: true + style: simple + content: + application/json: + schema: + type: string + "409": + description: View schema could not be mapped content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find view in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "409": - description: View schema could not be mapped + "404": + description: Failed to find view in metadata database content: application/json: schema: @@ -177,21 +190,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Retrieved view data - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of rows - required: true - style: simple - content: - application/json: - schema: - type: string security: - basicAuth: [] - bearerAuth: [] @@ -210,14 +208,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -237,24 +235,6 @@ paths: type: integer format: int64 responses: - "400": - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Get table data headers: @@ -270,12 +250,30 @@ paths: application/json: schema: type: string + "503": + description: Failed to establish connection with the metadata service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Not allowed to get table data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find table in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - basicAuth: [] - bearerAuth: [] @@ -292,14 +290,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -312,8 +310,8 @@ paths: $ref: "#/components/schemas/TupleUpdateDto" required: true responses: - "400": - description: Request pagination or table data select query is malformed + "403": + description: Update table data not allowed content: application/json: schema: @@ -332,8 +330,8 @@ paths: $ref: "#/components/schemas/ApiErrorDto" "202": description: Updated table data - "403": - description: Update table data not allowed + "400": + description: Request pagination or table data select query is malformed content: application/json: schema: @@ -354,14 +352,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -381,12 +379,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "201": description: Created table data "503": @@ -402,6 +394,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - basicAuth: [] - bearerAuth: [] @@ -418,14 +416,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -438,26 +436,26 @@ paths: $ref: "#/components/schemas/TupleDeleteDto" required: true responses: - "400": - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "503": description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted table data "404": description: Failed to find table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted table data + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Delete table data not allowed content: @@ -481,14 +479,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -508,24 +506,6 @@ paths: type: integer format: int64 responses: - "400": - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to establish connection with the metadata service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Get table data headers: @@ -541,12 +521,30 @@ paths: application/json: schema: type: string + "503": + description: Failed to establish connection with the metadata service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": description: Not allowed to get table data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find table in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - basicAuth: [] - bearerAuth: [] @@ -565,14 +563,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -592,6 +590,12 @@ paths: type: integer format: int64 responses: + "400": + description: Invalid pagination + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "503": description: Failed to communicate with database content: @@ -619,12 +623,6 @@ paths: application/json: schema: type: string - "400": - description: Invalid pagination - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: Failed to find database in metadata database or query in query store of the data database @@ -655,14 +653,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -682,6 +680,12 @@ paths: type: integer format: int64 responses: + "400": + description: Invalid pagination + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "503": description: Failed to communicate with database content: @@ -709,12 +713,6 @@ paths: application/json: schema: type: string - "400": - description: Invalid pagination - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": description: Failed to find database in metadata database or query in query store of the data database @@ -743,14 +741,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: queryId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -758,20 +756,14 @@ paths: $ref: "#/components/schemas/QueryPersistDto" required: true responses: - "503": - description: Failed to communicate with database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "202": description: Persisted subset content: application/json: schema: $ref: "#/components/schemas/QueryDto" - "403": - description: Not allowed to persist subset + "503": + description: Failed to communicate with database content: application/json: schema: @@ -789,6 +781,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Not allowed to persist subset + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "400": description: Malformed select query content: @@ -798,6 +796,42 @@ paths: security: - bearerAuth: [] - basicAuth: [] + /api/upload: + post: + tags: + - upload-endpoint + summary: Uploads a multipart file + description: Uploads a multipart file to the Storage Service. Requires role + `upload-file`. + operationId: create + requestBody: + content: + application/json: + schema: + required: + - file + type: object + properties: + file: + type: string + format: binary + required: true + responses: + "201": + description: Uploaded the file + content: + application/json: + schema: + $ref: "#/components/schemas/ViewDto" + "503": + description: Failed to establish connection with the storage service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + security: + - basicAuth: [] + - bearerAuth: [] /api/database/{databaseId}/table/{tableId}/data/import: post: tags: @@ -813,14 +847,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -835,20 +869,20 @@ paths: responses: "202": description: Imported dataset successfully - "503": - description: Failed to establish connection with the metadata service + "403": + description: Import table dataset not allowed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table in metadata database + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Import table dataset not allowed + "404": + description: Failed to find table in metadata database content: application/json: schema: @@ -878,8 +912,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: persisted in: query required: false @@ -892,13 +926,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database or query in query - store of the data database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": description: Found subsets content: @@ -913,6 +940,13 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find database in metadata database or query in query + store of the data database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - basicAuth: [] - bearerAuth: [] @@ -924,14 +958,14 @@ paths: be used without authentication if (and only if) the database is marked as public (i.e. when `is_public` = `is_schema_public` is set to `true`). Otherwise at least read access is required. - operationId: create + operationId: create_1 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -954,23 +988,23 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ExecuteStatementDto" + $ref: "#/components/schemas/SubsetDto" required: true responses: - "201": - description: Created subset + "417": + description: Failed to insert query into query store of data database content: application/json: schema: - type: string - "503": - description: Failed to communicate with database + $ref: "#/components/schemas/ApiErrorDto" + "501": + description: Failed to execute query as it contains non-supported keywords content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "501": - description: Failed to execute query as it contains non-supported keywords + "503": + description: Failed to communicate with database content: application/json: schema: @@ -988,14 +1022,14 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Malformed select query + "201": + description: Created subset content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "417": - description: Failed to insert query into query store of data database + type: string + "400": + description: Malformed select query content: application/json: schema: @@ -1017,14 +1051,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -1032,20 +1066,20 @@ paths: type: string format: date-time responses: - "503": - description: Failed to establish connection with the metadata service + "404": + description: Failed to find view in metadata database or export dataset content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Export view data not allowed + "503": + description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find view in metadata database or export dataset + "403": + description: Export view data not allowed content: application/json: schema: @@ -1080,14 +1114,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: size in: query required: false @@ -1095,8 +1129,16 @@ paths: type: integer format: int64 responses: - "403": - description: Find table history not allowed + "200": + description: Found table history + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TableHistoryDto" + "404": + description: Failed to find table history in data database content: application/json: schema: @@ -1107,8 +1149,8 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find table history in data database + "403": + description: Find table history not allowed content: application/json: schema: @@ -1119,14 +1161,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found table history - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/TableHistoryDto" security: - basicAuth: [] - bearerAuth: [] @@ -1144,14 +1178,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -1159,25 +1193,12 @@ paths: type: string format: date-time responses: - "400": - description: Request pagination or table data select query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "503": description: Failed to establish connection with the metadata service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Exported table data - content: - application/json: - schema: - type: string - format: binary "404": description: Failed to find table in metadata database content: @@ -1190,6 +1211,19 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Request pagination or table data select query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Exported table data + content: + application/json: + schema: + type: string + format: binary security: - basicAuth: [] - bearerAuth: [] @@ -1209,14 +1243,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Accept in: header required: true @@ -1247,13 +1281,6 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found subset - content: - application/json: - schema: - $ref: "#/components/schemas/QueryDto" - text/csv: {} "404": description: Failed to find database in metadata database or query in query store of the data database @@ -1261,6 +1288,13 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Found subset + content: + application/json: + schema: + $ref: "#/components/schemas/QueryDto" + text/csv: {} "400": description: Malformed select query content: @@ -1395,9 +1429,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 11 + type: string + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 affiliation: type: string example: Brown University @@ -1435,6 +1469,7 @@ components: required: - creators - database_id + - descriptions - id - owned_by - publication_year @@ -1445,9 +1480,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec type: type: string example: database @@ -1464,6 +1499,10 @@ components: type: array items: $ref: "#/components/schemas/IdentifierTitleDto" + descriptions: + type: array + items: + $ref: "#/components/schemas/IdentifierDescriptionDto" doi: type: string example: 10.1038/nphys1170 @@ -1477,21 +1516,18 @@ components: - draft - published database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc query_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid view_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid publication_year: type: integer format: int32 @@ -1500,15 +1536,225 @@ components: type: string format: uuid example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 + IdentifierDescriptionDto: + required: + - id + type: object + properties: + id: + type: string + format: uuid + example: e0e9692c-910b-4b60-b53a-fc7c358a917d + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + language: + type: string + example: en + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + type: + type: string + example: Abstract + enum: + - Abstract + - Methods + - SeriesInformation + - TableOfContents + - TechnicalInfo + - Other IdentifierTitleDto: required: - id type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 70ce5164-fd74-413f-8712-f996b91defbf title: type: string example: Airquality Demonstrator @@ -1721,9 +1967,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 83ea2326-f8f6-4263-baf8-cdf88a54efc7 owner: $ref: "#/components/schemas/UserBriefDto" execution: @@ -1744,9 +1990,9 @@ components: items: $ref: "#/components/schemas/IdentifierBriefDto" database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc query_normalized: type: string example: SELECT `id` FROM `air_quality` @@ -1792,24 +2038,656 @@ components: family_name: type: string example: Carberry - TupleDto: + CreatorDto: required: - - data + - creator_name + - id type: object properties: - data: - type: object - additionalProperties: - type: object - example: - key: value - example: - key: value - ImportDto: - required: - - header - - location - - separator + id: + type: string + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + creator_name: + type: string + example: "Carberry, Josiah" + name_type: + type: string + example: Personal + enum: + - Personal + - Organizational + name_identifier: + type: string + example: 0000-0002-1825-0097 + name_identifier_scheme: + type: string + example: ORCID + enum: + - ORCID + - ROR + - ISNI + - GRID + name_identifier_scheme_uri: + type: string + example: https://orcid.org/ + affiliation_identifier: + type: string + example: https://ror.org/05gq02987 + affiliation_identifier_scheme: + type: string + example: ROR + enum: + - ROR + - GRID + - ISNI + affiliation_identifier_scheme_uri: + type: string + example: https://ror.org/ + IdentifierDto: + required: + - creators + - database_id + - descriptions + - funders + - id + - language + - licenses + - owner + - publication_year + - publisher + - query + - query_hash + - query_normalized + - status + - titles + - type + type: object + properties: + id: + type: string + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec + type: + type: string + example: database + enum: + - database + - subset + - table + - view + titles: + type: array + items: + $ref: "#/components/schemas/IdentifierTitleDto" + descriptions: + type: array + items: + $ref: "#/components/schemas/IdentifierDescriptionDto" + funders: + type: array + items: + $ref: "#/components/schemas/IdentifierFunderDto" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + example: 2021-03-12T15:26:21Z + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + owner: + $ref: "#/components/schemas/UserBriefDto" + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + licenses: + type: array + items: + $ref: "#/components/schemas/LicenseDto" + creators: + type: array + items: + $ref: "#/components/schemas/CreatorDto" + status: + type: string + example: draft + enum: + - draft + - published + database_id: + type: string + format: uuid + query_id: + type: string + format: uuid + table_id: + type: string + format: uuid + view_id: + type: string + format: uuid + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related_identifiers: + type: array + items: + $ref: "#/components/schemas/RelatedIdentifierDto" + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + example: 34fe82cda2c53f13f8d90cfd7a3469e3a939ff311add50dce30d9136397bf8e5 + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + IdentifierFunderDto: + required: + - funder_name + - id + type: object + properties: + id: + type: string + format: uuid + example: 39693413-e0ce-46da-ad5e-029c0556d439 + funder_name: + type: string + example: European Commission + funder_identifier: + type: string + example: http://doi.org/10.13039/501100000780 + funder_identifier_type: + type: string + example: Crossref Funder ID + enum: + - Crossref Funder ID + - ROR + - GND + - ISNI + - Other + scheme_uri: + type: string + example: http://doi.org/ + award_number: + type: string + example: "824087" + award_title: + type: string + example: EOSC-Life + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + description: + type: string + example: "A short and simple permissive license with conditions only requiring\ + \ preservation of copyright and license notices. Licensed works, modifications,\ + \ and larger works may be distributed under different terms and without\ + \ source code." + RelatedIdentifierDto: + required: + - id + - relation + - type + - value + type: object + properties: + id: + type: string + format: uuid + example: ce9d11f0-60a2-448d-a3e4-44719a443e8a + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + ViewColumnDto: + required: + - database_id + - id + - internal_name + - is_null_allowed + - name + - ord + - type + type: object + properties: + id: + type: string + format: uuid + example: 6aec3a91-2e0b-4e92-a16a-9c3c5e892da1 + name: + maxLength: 64 + minLength: 0 + type: string + example: Given Name + size: + type: integer + format: int64 + example: 255 + d: + type: integer + format: int64 + example: 0 + description: + maxLength: 2048 + minLength: 0 + type: string + example: Column comment + database_id: + type: string + format: uuid + example: 2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4 + ord: + type: integer + format: int32 + example: 0 + internal_name: + maxLength: 64 + minLength: 0 + type: string + example: given_name + index_length: + type: integer + format: int64 + example: 255 + length: + type: integer + format: int64 + example: 255 + type: + type: string + example: varchar + enum: + - char + - varchar + - binary + - varbinary + - tinyblob + - tinytext + - text + - blob + - mediumtext + - mediumblob + - longtext + - longblob + - enum + - set + - serial + - bit + - tinyint + - bool + - smallint + - mediumint + - int + - bigint + - float + - double + - decimal + - date + - datetime + - timestamp + - time + - year + is_null_allowed: + type: boolean + example: false + ViewDto: + required: + - columns + - database_id + - id + - identifiers + - internal_name + - name + - owner + - query + - query_hash + type: object + properties: + id: + type: string + format: uuid + example: 787439d0-e85e-400c-a7e6-996a023bfad9 + name: + type: string + example: Air Quality + identifiers: + type: array + items: + $ref: "#/components/schemas/IdentifierDto" + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + owner: + $ref: "#/components/schemas/UserBriefDto" + columns: + type: array + items: + $ref: "#/components/schemas/ViewColumnDto" + last_retrieved: + type: string + format: date-time + database_id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + is_schema_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + query_hash: + type: string + example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 + TupleDto: + required: + - data + type: object + properties: + data: + type: object + additionalProperties: + type: object + example: + key: value + example: + key: value + ImportDto: + required: + - header + - location + - separator type: object properties: location: @@ -1829,14 +2707,72 @@ components: line_termination: type: string example: \r\n - ExecuteStatementDto: + FilterDto: required: - - statement + - column_id + - operator_id + - type + - value type: object properties: - statement: + type: type: string - example: SELECT `id` FROM `air_quality` + example: where + enum: + - where + - or + - and + value: + type: string + example: "1" + column_id: + type: string + format: uuid + example: 14128033-54b5-4818-a489-21b0dded86e2 + operator_id: + type: string + format: uuid + example: 67c5b54d-2eb0-4f42-8dc1-a504562e9f32 + OrderDto: + required: + - column_id + type: object + properties: + direction: + type: string + example: asc + enum: + - asc + - desc + column_id: + type: string + format: uuid + example: e891ba86-0258-41a6-a8d9-ff58bc10b618 + SubsetDto: + required: + - columns + - table_id + type: object + properties: + columns: + type: array + example: + - e891ba86-0258-41a6-a8d9-ff58bc10b618 + items: + type: string + format: uuid + filter: + type: array + items: + $ref: "#/components/schemas/FilterDto" + order: + type: array + items: + $ref: "#/components/schemas/OrderDto" + table_id: + type: string + format: uuid + example: f7df2a7d-4ade-4c78-97b0-7c744d0893c7 TableHistoryDto: required: - event @@ -1850,6 +2786,10 @@ components: example: 2021-03-12T15:26:21Z event: type: string + example: INSERT + enum: + - insert + - delete total: type: integer format: int64 diff --git a/.docs/.openapi/api-metadata.yaml b/.docs/.openapi/api-metadata.yaml index 18fb71db29de89369c93de29296e1d85abc58b37..e4dabbdcfc4c0b4449f15dca80d41f4243c79542 100644 --- a/.docs/.openapi/api-metadata.yaml +++ b/.docs/.openapi/api-metadata.yaml @@ -8,16 +8,146 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 - version: 1.6.2 + version: 1.7.0 externalDocs: description: Sourcecode Documentation - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6.2/system-services-metadata/ + url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7.0/system-services-metadata/ servers: - url: http://localhost description: Development instance - url: https://test.dbrepo.tuwien.ac.at description: Staging instance paths: + /api/user/{userId}: + get: + tags: + - user-endpoint + summary: Get user + description: Gets own user information from the metadata database. Requires + authentication. Foreign user information can only be obtained if additional + role `find-foreign-user` is present. Finding information about internal users + results in a 404 error. + operationId: find + parameters: + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Found user + content: + application/json: + schema: + $ref: "#/components/schemas/UserDto" + "404": + description: User was not found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Find user is not permitted + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + security: + - bearerAuth: [] + - basicAuth: [] + put: + tags: + - user-endpoint + summary: Update user + description: Updates user with id. Requires role `modify-user-information`. + operationId: modify + parameters: + - name: userId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserUpdateDto" + required: true + responses: + "403": + description: Not allowed to modify user metadata + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to modify user at auth service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to find database/user in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Modified user information + content: + application/json: + schema: + $ref: "#/components/schemas/UserDto" + "400": + description: Modify user query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + security: + - bearerAuth: [] + - basicAuth: [] + head: + tags: + - user-endpoint + summary: Get user + description: Gets own user information from the metadata database. Requires + authentication. Foreign user information can only be obtained if additional + role `find-foreign-user` is present. Finding information about internal users + results in a 404 error. + operationId: find_1 + parameters: + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + "200": + description: Found user + content: + application/json: + schema: + $ref: "#/components/schemas/UserDto" + "404": + description: User was not found + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Find user is not permitted + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + security: + - bearerAuth: [] + - basicAuth: [] /api/database: get: tags: @@ -56,7 +186,7 @@ paths: - database-endpoint summary: Create database description: Creates a database in the container with id. Requires roles `create-database`. - operationId: create_5 + operationId: create_4 requestBody: content: application/json: @@ -64,51 +194,51 @@ paths: $ref: "#/components/schemas/CreateDatabaseDto" required: true responses: - "403": - description: Database create permission is missing or grant permissions - at broker service failed + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "423": - description: Database quota exceeded + "409": + description: Query store could not be created content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Database create query is malformed or image is not supported + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "201": + description: Created a new database content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to fin container/user/database in metadata database + $ref: "#/components/schemas/DatabaseBriefDto" + "423": + description: Database quota exceeded content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "400": + description: Database create query is malformed or image is not supported content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new database + "403": + description: Database create permission is missing or grant permissions + at broker service failed content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "409": - description: Query store could not be created + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: Failed to fin container/user/database in metadata database content: application/json: schema: @@ -158,14 +288,14 @@ paths: \ with HTTP method **HEAD** only the status. When the user has at least *READ*\ \ access, the status 200 is returned, 403 otherwise. Requires role `check-database-access`\ \ or `check-foreign-database-access`." - operationId: find + operationId: find_2 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -173,12 +303,6 @@ paths: type: string format: uuid responses: - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" "403": description: No access to this database content: @@ -191,6 +315,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Found database access + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseAccessDto" security: - bearerAuth: [] - basicAuth: [] @@ -206,8 +336,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -221,30 +351,30 @@ paths: $ref: "#/components/schemas/CreateAccessDto" required: true responses: - "403": - description: Modify access not permitted when no access is granted in the - first place + "404": + description: Database or user not found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Access could not be updated due to connection error in the - data service + "503": + description: Access could not be updated in the data service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Access could not be updated in the data service + "403": + description: Modify access not permitted when no access is granted in the + first place content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": description: Modified access - "404": - description: Database or user not found + "502": + description: Access could not be updated due to connection error in the + data service content: application/json: schema: @@ -264,14 +394,14 @@ paths: summary: Give access description: Give a user with given id access to some database with given id. Requires role `create-database-access`. - operationId: create_8 + operationId: create_7 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -285,8 +415,14 @@ paths: $ref: "#/components/schemas/CreateAccessDto" required: true responses: - "502": - description: Access could not be created due to connection error + "202": + description: Granting access succeeded + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseAccessDto" + "404": + description: Database or user not found content: application/json: schema: @@ -309,18 +445,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database or user not found + "502": + description: Access could not be created due to connection error content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Granting access succeeded - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" security: - bearerAuth: [] - basicAuth: [] @@ -336,8 +466,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -345,12 +475,6 @@ paths: type: string format: uuid responses: - "502": - description: Access could not be created due to connection error - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "403": description: Revoke of access not permitted as no access was found content: @@ -365,6 +489,12 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "502": + description: Access could not be created due to connection error + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "404": description: "User, database with access was not found" content: @@ -389,14 +519,14 @@ paths: \ with HTTP method **HEAD** only the status. When the user has at least *READ*\ \ access, the status 200 is returned, 403 otherwise. Requires role `check-database-access`\ \ or `check-foreign-database-access`." - operationId: find_1 + operationId: find_3 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -404,12 +534,6 @@ paths: type: string format: uuid responses: - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" "403": description: No access to this database content: @@ -422,56 +546,50 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Found database access + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseAccessDto" security: - bearerAuth: [] - basicAuth: [] - /api/user/{userId}: + /api/ontology/{ontologyId}: get: tags: - - user-endpoint - summary: Get user - description: Gets own user information from the metadata database. Requires - authentication. Foreign user information can only be obtained if additional - role `find-foreign-user` is present. Finding information about internal users - results in a 404 error. - operationId: find_2 + - ontology-endpoint + summary: Find ontology + description: Finds an ontology with id in the metadata database. + operationId: find_4 parameters: - - name: userId + - name: ontologyId in: path required: true schema: type: string format: uuid responses: - "404": - description: User was not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": - description: Found user + description: Find one ontology content: application/json: schema: - $ref: "#/components/schemas/UserDto" - "403": - description: Find user is not permitted + $ref: "#/components/schemas/OntologyDto" + "404": + description: Could not find ontology content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] put: tags: - - user-endpoint - summary: Update user - description: Updates user with id. Requires role `modify-user-information`. - operationId: modify + - ontology-endpoint + summary: Update ontology + description: Updates an ontology with id. Requires role `update-ontology`. + operationId: update parameters: - - name: userId + - name: ontologyId in: path required: true schema: @@ -481,45 +599,60 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UserUpdateDto" + $ref: "#/components/schemas/OntologyModifyDto" required: true responses: - "202": - description: Modified user information - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" - "403": - description: Not allowed to modify user metadata + "404": + description: Could not find ontology content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Modify user query is malformed + "202": + description: Updated ontology successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/OntologyDto" + security: + - bearerAuth: [] + - basicAuth: [] + delete: + tags: + - ontology-endpoint + summary: Delete ontology + description: Deletes an ontology with given id. Requires role `delete-ontology`. + operationId: delete + parameters: + - name: ontologyId + in: path + required: true + schema: + type: string + format: uuid + responses: "404": - description: Failed to find database/user in metadata database + description: Could not find ontology content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted ontology successfully + content: + application/json: {} security: - bearerAuth: [] - basicAuth: [] - /api/user/{userId}/password: + /api/message/{messageId}: put: tags: - - user-endpoint - summary: Update user password - description: Updates password of user with id. Requires authentication. - operationId: password + - message-endpoint + summary: Update message + description: Updates a message with id. Requires role `update-maintenance-message`. + operationId: update_1 parameters: - - name: userId + - name: messageId in: path required: true schema: @@ -529,495 +662,529 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/UserPasswordDto" + $ref: "#/components/schemas/BannerMessageUpdateDto" required: true responses: - "400": - description: Invalid password payload + "404": + description: Could not find message content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": - description: Modified user password - "403": - description: Not allowed to change foreign user password + description: Updated message content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/BannerMessageBriefDto" + security: + - bearerAuth: [] + - basicAuth: [] + delete: + tags: + - message-endpoint + summary: Delete message + description: Deletes a message with id. Requires role `delete-maintenance-message`. + operationId: delete_1 + parameters: + - name: messageId + in: path + required: true + schema: + type: string + format: uuid + responses: + "202": + description: Deleted message + content: + application/json: {} "404": - description: Failed to find database/user in metadata database + description: Could not find message content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to get user in auth service + security: + - bearerAuth: [] + - basicAuth: [] + /api/image/{imageId}: + get: + tags: + - image-endpoint + summary: Find image + description: Finds a container image in the metadata database. + operationId: findById + parameters: + - name: imageId + in: path + required: true + schema: + type: string + format: uuid + responses: + "404": + description: Image could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to auth service failed + "200": + description: Found image content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/user/token: + $ref: "#/components/schemas/ImageDto" put: tags: - - user-endpoint - summary: Refresh token - description: Refreshes user token by refresh token. - operationId: refreshToken + - image-endpoint + summary: Update image + description: Updates container image in the metadata database. Requires role + `modify-image`. + operationId: update_2 + parameters: + - name: imageId + in: path + required: true + schema: + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/RefreshTokenRequestDto" + $ref: "#/components/schemas/ImageChangeDto" required: true responses: - "403": - description: Not allowed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Invalid refresh token + "404": + description: Image could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": - description: Refreshed user token + description: Updated image successfully content: application/json: schema: - $ref: "#/components/schemas/TokenDto" - "502": - description: Connection to auth service failed + $ref: "#/components/schemas/ImageDto" + security: + - bearerAuth: [] + - basicAuth: [] + delete: + tags: + - image-endpoint + summary: Delete image + description: Deletes a container image in the metadata database. Requires role + `delete-image`. + operationId: delete_2 + parameters: + - name: imageId + in: path + required: true + schema: + type: string + format: uuid + responses: + "404": + description: Image could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - post: + "202": + description: Deleted image successfully + security: + - bearerAuth: [] + - basicAuth: [] + /api/identifier/{identifierId}: + get: tags: - - user-endpoint - summary: Create token - description: Creates a user token via the Auth Service. - operationId: getToken - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LoginRequestDto" + - identifier-endpoint + summary: Find identifier + description: Finds an identifier with id. The response format depends on the + HTTP `Accept` header set on the request. + operationId: find_7 + parameters: + - name: identifierId + in: path required: true + schema: + type: string + format: uuid + - name: Accept + in: header + required: true + schema: + type: string responses: - "404": - description: Failed to find user in auth database + "400": + description: "Identifier could not be exported, the requested style is not\ + \ known" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "428": - description: Account is not fully setup in auth service (requires password - change?) + "502": + description: Connection to data service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Invalid login request + "409": + description: Exported resource was not found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Obtained user token + "503": + description: Failed to find in data service content: application/json: schema: - $ref: "#/components/schemas/TokenDto" - "403": - description: Not allowed to get token + $ref: "#/components/schemas/ApiErrorDto" + "410": + description: Failed to retrieve from S3 endpoint content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to get user in auth service + "200": + description: Found identifier successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to auth service failed + $ref: "#/components/schemas/IdentifierDto" + application/ld+json: + schema: + $ref: "#/components/schemas/LdDatasetDto" + text/csv: {} + text/xml: {} + text/bibliography: {} + text/bibliography; style=apa: {} + text/bibliography; style=ieee: {} + text/bibliography; style=bibtex: {} + "403": + description: Not allowed to view identifier content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - /api/ontology/{ontologyId}: - get: - tags: - - ontology-endpoint - summary: Find ontology - description: Finds an ontology with id in the metadata database. - operationId: find_3 - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Find one ontology + "404": + description: Identifier could not be found content: application/json: schema: - $ref: "#/components/schemas/OntologyDto" - "404": - description: Could not find ontology + $ref: "#/components/schemas/ApiErrorDto" + "406": + description: Failed to find acceptable representation content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" put: tags: - - ontology-endpoint - summary: Update ontology - description: Updates an ontology with id. Requires role `update-ontology`. - operationId: update + - identifier-endpoint + summary: Save identifier + description: Saves an identifier with id as a draft identifier. Identifiers + can only be created for objects the user has at least *READ* access in the + associated database (requires role `create-identifier`) or for any object + in any database (requires role `create-foreign-identifier`). + operationId: save parameters: - - name: ontologyId + - name: identifierId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/OntologyModifyDto" + $ref: "#/components/schemas/IdentifierSaveDto" required: true responses: - "202": - description: Updated ontology successfully + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/OntologyDto" - "404": - description: Could not find ontology + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Insufficient access rights or authorities content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - ontology-endpoint - summary: Delete ontology - description: Deletes an ontology with given id. Requires role `delete-ontology`. - operationId: delete - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: "404": - description: Could not find ontology + description: "Failed to find database, table or view" + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to save in search service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Identifier form contains invalid request data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": - description: Deleted ontology successfully + description: Saved identifier content: - application/json: {} + application/json: + schema: + $ref: "#/components/schemas/IdentifierDto" security: - bearerAuth: [] - basicAuth: [] - /api/message/{messageId}: - put: + delete: tags: - - message-endpoint - summary: Update message - description: Updates a message with id. Requires role `update-maintenance-message`. - operationId: update_1 + - identifier-endpoint + summary: Delete identifier + description: Deletes an identifier with id. Requires role `delete-identifier`. + operationId: delete_3 parameters: - - name: messageId + - name: identifierId in: path required: true schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageUpdateDto" - required: true + type: string + format: uuid responses: - "202": - description: Updated message + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/BannerMessageBriefDto" - "404": - description: Could not find message + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to delete in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - message-endpoint - summary: Delete message - description: Deletes a message with id. Requires role `delete-maintenance-message`. - operationId: delete_1 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - responses: "404": - description: Could not find message + description: Identifier or database could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": - description: Deleted message + description: Deleted identifier + "403": + description: Deleting identifier not permitted content: - application/json: {} + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] - /api/image/{imageId}: - get: + /api/identifier/{identifierId}/publish: + put: tags: - - image-endpoint - summary: Find image - description: Finds a container image in the metadata database. - operationId: findById + - identifier-endpoint + summary: Publish identifier + description: Publishes an identifier with id. A published identifier cannot + be changed anymore. Requires role `publish-identifier`. + operationId: publish parameters: - - name: imageId + - name: identifierId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: - "200": - description: Found image + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/ImageDto" + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Insufficient access rights or authorities + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "404": - description: Image could not be found + description: "Failed to find database, table or view" + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to save in search service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Identifier form contains invalid request data content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Published identifier + content: + application/json: + schema: + $ref: "#/components/schemas/IdentifierDto" + security: + - bearerAuth: [] + - basicAuth: [] + /api/database/{databaseId}/visibility: put: tags: - - image-endpoint - summary: Update image - description: Updates container image in the metadata database. Requires role - `modify-image`. - operationId: update_2 + - database-endpoint + summary: Update database visibility + description: Updates the database with id on the visibility. Only the database + owner can perform this operation. Requires role `modify-database-visibility`. + operationId: visibility parameters: - - name: imageId + - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/ImageChangeDto" + $ref: "#/components/schemas/DatabaseModifyVisibilityDto" required: true responses: - "404": - description: Image could not be found + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated image successfully + "503": + description: Failed to save in search service content: application/json: schema: - $ref: "#/components/schemas/ImageDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - image-endpoint - summary: Delete image - description: Deletes a container image in the metadata database. Requires role - `delete-image`. - operationId: delete_2 - parameters: - - name: imageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Image could not be found + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: The visibility payload is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Visibility modification is not permitted content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "202": - description: Deleted image successfully + description: Visibility modified successfully + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseBriefDto" + "404": + description: Failed to find database in metadata database + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] - /api/identifier/{identifierId}: + /api/database/{databaseId}/view/{viewId}: get: tags: - - identifier-endpoint - summary: Find identifier - description: Finds an identifier with id. The response format depends on the - HTTP `Accept` header set on the request. - operationId: find_6 + - view-endpoint + summary: Get view + description: Gets a view with id in the metadata database. + operationId: find_8 parameters: - - name: identifierId + - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: Accept - in: header + type: string + format: uuid + - name: viewId + in: path required: true schema: type: string + format: uuid responses: - "410": - description: Failed to retrieve from S3 endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to data service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to find in data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found identifier successfully - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - application/ld+json: - schema: - $ref: "#/components/schemas/LdDatasetDto" - text/csv: {} - text/xml: {} - text/bibliography: {} - text/bibliography; style=apa: {} - text/bibliography; style=ieee: {} - text/bibliography; style=bibtex: {} - "400": - description: "Identifier could not be exported, the requested style is not\ - \ known" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "409": - description: Exported resource was not found + "403": + description: Find view is not permitted content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Identifier could not be found + description: "Database, view or user could not be found" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "406": - description: Failed to find acceptable representation + "200": + description: Find view successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/ViewDto" + security: + - bearerAuth: [] + - basicAuth: [] put: tags: - - identifier-endpoint - summary: Save identifier - description: Saves an identifier with id as a draft identifier. Identifiers - can only be created for objects the user has at least *READ* access in the - associated database (requires role `create-identifier`) or for any object - in any database (requires role `create-foreign-identifier`). - operationId: save + - view-endpoint + summary: Update view + description: Updates a view with id. This can only be performed by the view + owner or database owner. Requires role `create-database-view`. + operationId: update_3 parameters: - - name: identifierId + - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid + - name: viewId + in: path + required: true + schema: + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/IdentifierSaveDto" + $ref: "#/components/schemas/ViewUpdateDto" required: true responses: - "400": - description: Identifier form contains invalid request data + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: "Failed to find database, table or view" + description: Database or View could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "403": - description: Insufficient access rights or authorities + description: Update not allowed content: application/json: schema: @@ -1028,173 +1195,185 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "202": + description: Update view successfully content: - application/json: + '*/*': schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Saved identifier + $ref: "#/components/schemas/ViewBriefDto" + "400": + description: Update view query is malformed content: application/json: schema: - $ref: "#/components/schemas/IdentifierDto" + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] delete: tags: - - identifier-endpoint - summary: Delete identifier - description: Deletes an identifier with id. Requires role `delete-identifier`. - operationId: delete_3 + - view-endpoint + summary: Delete view + description: Deletes a view with id. Requires role `delete-database-view`. + operationId: delete_4 parameters: - - name: identifierId + - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid + - name: viewId + in: path + required: true + schema: + type: string + format: uuid responses: - "403": - description: Deleting identifier not permitted + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Delete view successfully + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Identifier or database could not be found + description: "Database, view or user could not be found" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to delete in search service + "400": + description: Delete view query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "423": + description: Delete view resulted in an invalid query statement + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "403": + description: Deletion not allowed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted identifier security: - bearerAuth: [] - basicAuth: [] - /api/identifier/{identifierId}/publish: - put: + /api/database/{databaseId}/table/{tableId}: + get: tags: - - identifier-endpoint - summary: Publish identifier - description: Publishes an identifier with id. A published identifier cannot - be changed anymore. Requires role `publish-identifier`. - operationId: publish + - table-endpoint + summary: Find table + description: "Finds a table with id. When a table is hidden (i.e. when `is_public`\ + \ is `false`), then the user needs to have at least read access and the role\ + \ `find-table`. When the `system` role is present, the endpoint responds with\ + \ additional connection metadata in the header." + operationId: findById_2 parameters: - - name: identifierId + - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid + - name: tableId + in: path + required: true + schema: + type: string + format: uuid responses: - "400": - description: Identifier form contains invalid request data - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" + "403": + description: Access to the database is forbidden content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities + "200": + description: Find table successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + $ref: "#/components/schemas/TableDto" + "404": + description: "Table, database or container could not be found" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Published identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/visibility: put: tags: - - database-endpoint - summary: Update database visibility - description: Updates the database with id on the visibility. Only the database - owner can perform this operation. Requires role `modify-database-visibility`. - operationId: visibility + - table-endpoint + summary: Update table + description: Updates a table in the database with id. Requires role `update-table`. + operationId: update_4 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid + - name: tableId + in: path + required: true + schema: + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/DatabaseModifyVisibilityDto" + $ref: "#/components/schemas/TableUpdateDto" required: true responses: - "400": - description: The visibility payload is malformed + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Visibility modified successfully - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" "503": description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "202": + description: Updated the table + content: + application/json: + schema: + $ref: "#/components/schemas/TableBriefDto" + "400": + description: Update table visibility payload is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Failed to find database in metadata database + description: Table could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "403": - description: Visibility modification is not permitted + description: Update table visibility not permitted content: application/json: schema: @@ -1202,102 +1381,88 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/view/{viewId}: - get: + delete: tags: - - view-endpoint - summary: Get view - description: Gets a view with id in the metadata database. - operationId: find_7 + - table-endpoint + summary: Delete table + description: Deletes a table with id. Only the owner of a table can perform + this action (requires role `delete-table`) or anyone can delete a table (requires + role `delete-foreign-table`). + operationId: delete_5 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: viewId + type: string + format: uuid + - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": - description: Find view is not permitted + description: Access to the database is forbidden content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, view or user could not be found" + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Find view successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Type: - description: The JDBC connection type - style: simple - X-View: - description: The view internal name - style: simple - X-Database: - description: The database internal name - style: simple - X-Password: - description: The authentication password - style: simple - X-Host: - description: The database hostname - style: simple - X-Port: - description: The database port number - style: simple + "202": + description: Delete table successfully + "400": + description: Delete table query resulted in an invalid query statement content: application/json: schema: - $ref: "#/components/schemas/ViewDto" + $ref: "#/components/schemas/ApiErrorDto" + "404": + description: "Table, database or container could not be found" + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" security: - bearerAuth: [] - basicAuth: [] + /api/database/{databaseId}/table/{tableId}/statistic: put: tags: - - view-endpoint - summary: Update view - description: Updates a view with id. This can only be performed by the view - owner or database owner. Requires role `create-database-view`. - operationId: update_3 + - table-endpoint + summary: Update statistics + description: "Updates basic statistical properties (min, max, mean, median,\ + \ std.dev) for numerical columns in a table with id. This action can only\ + \ be performed by the table owner. Requires role `update-table-statistic`." + operationId: updateStatistic parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: viewId + type: string + format: uuid + - name: tableId in: path required: true schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ViewUpdateDto" - required: true + type: string + format: uuid responses: - "403": - description: Update not allowed + "502": + description: Connection to search service failed content: application/json: schema: @@ -1308,69 +1473,79 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database or View could not be found + "400": + description: Failed to map column statistic to known columns content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Update view successfully - content: - '*/*': - schema: - $ref: "#/components/schemas/ViewBriefDto" - "502": - description: Connection to search service failed + "403": + description: Not the owner content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Update view query is malformed + "404": + description: Failed to find database/table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Updated table statistics successfully security: - bearerAuth: [] - basicAuth: [] - delete: + /api/database/{databaseId}/table/{tableId}/column/{columnId}: + put: tags: - - view-endpoint - summary: Delete view - description: Deletes a view with id. Requires role `delete-database-view`. - operationId: delete_4 + - table-endpoint + summary: Update semantics + description: Updates column semantics of a table column with id. Only the table + owner with at least *READ* access to the associated database can update the + column semantics (requires role `modify-table-column-semantics`) or foreign + table columns if role `modify-foreign-table-column-semantics`. + operationId: updateColumn parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: viewId + type: string + format: uuid + - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid + - name: columnId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ColumnSemanticsUpdateDto" + required: true responses: - "202": - description: Delete view successfully - "423": - description: Delete view resulted in an invalid query statement + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, view or user could not be found" + "403": + description: Access to the database is forbidden content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Delete view query is malformed + "404": + description: Failed to find user/table/database/ontology in metadata database content: application/json: schema: @@ -1381,14 +1556,15 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "202": + description: Updated column semantics successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Deletion not allowed + $ref: "#/components/schemas/ColumnDto" + "400": + description: Update semantic concept query is malformed or update unit of + measurement query is malformed content: application/json: schema: @@ -1396,66 +1572,60 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/table/{tableId}: - get: + /api/database/{databaseId}/owner: + put: tags: - - table-endpoint - summary: Find table - description: "Finds a table with id. When a table is hidden (i.e. when `is_public`\ - \ is `false`), then the user needs to have at least read access and the role\ - \ `find-table`. When the `system` role is present, the endpoint responds with\ - \ additional connection metadata in the header." - operationId: findById_2 + - database-endpoint + summary: Update database owner + description: Updates the database with id on the owner. Only the database owner + can perform this operation. Requires role `modify-database-owner`. + operationId: transfer parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseTransferDto" + required: true responses: "502": - description: Failed to establish connection with broker service + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Table, database or container could not be found" + "202": + description: Transfer of ownership was successful content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/DatabaseBriefDto" "503": - description: Failed to obtain queue information from broker service + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Find table successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Password: - description: The authentication password - style: simple + "404": + description: Database or user could not be found content: application/json: schema: - $ref: "#/components/schemas/TableDto" + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Owner payload is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": - description: Access to the database is forbidden + description: Transfer of ownership is not permitted content: application/json: schema: @@ -1463,34 +1633,25 @@ paths: security: - bearerAuth: [] - basicAuth: [] + /api/database/{databaseId}/metadata/view: put: tags: - - table-endpoint - summary: Update table - description: Updates a table in the database with id. Requires role `update-table`. - operationId: update_4 + - database-endpoint + summary: Update database view schemas + description: Updates the database with id with generated metadata from view + that are not yet known to the database. Only the database owner can perform + this operation. Requires role `find-database`. + operationId: refreshViewMetadata parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/TableUpdateDto" - required: true + type: string + format: uuid responses: - "400": - description: Update table visibility payload is malformed + "502": + description: Connection to search service failed content: application/json: schema: @@ -1501,26 +1662,20 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated the table + "200": + description: Refreshed database views metadata content: application/json: schema: - $ref: "#/components/schemas/TableBriefDto" + $ref: "#/components/schemas/DatabaseBriefDto" "403": - description: Update table visibility not permitted + description: Refresh view metadata is not permitted content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Table could not be found + description: Failed to find database in metadata database content: application/json: schema: @@ -1528,56 +1683,55 @@ paths: security: - bearerAuth: [] - basicAuth: [] - delete: + /api/database/{databaseId}/metadata/table: + put: tags: - - table-endpoint - summary: Delete table - description: Deletes a table with id. Only the owner of a table can perform - this action (requires role `delete-table`) or anyone can delete a table (requires - role `delete-foreign-table`). - operationId: delete_5 + - database-endpoint + summary: Update database table schemas + description: Updates the database with id with generated metadata from tables + that are not yet known to the database. Only the database owner can perform + this operation. Requires role `find-database`. + operationId: refreshTableMetadata parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 + type: string + format: uuid responses: - "400": - description: Delete table query resulted in an invalid query statement + "403": + description: Not allowed to refresh table metadata content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Delete table successfully - "404": - description: "Table, database or container could not be found" + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: Refreshed database tables metadata + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseBriefDto" "503": description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "400": + description: Failed to parse payload at search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden + "404": + description: Failed to find database in metadata database content: application/json: schema: @@ -1585,133 +1739,92 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/statistic: - put: + /api/database/{databaseId}/image: + get: tags: - - table-endpoint - summary: Update statistics - description: "Updates basic statistical properties (min, max, mean, median,\ - \ std.dev) for numerical columns in a table with id. This action can only\ - \ be performed by the table owner. Requires role `update-table-statistic`." - operationId: updateStatistic + - database-endpoint + summary: Get database preview image + description: Gets the database with id on the preview image. + operationId: findPreviewImage parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 + type: string + format: uuid responses: - "400": - description: Failed to map column statistic to known columns - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not the owner - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": - description: Failed to find database/table in metadata database + description: Database or user could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "200": + description: View of image was successful content: - application/json: + '*/*': schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated table statistics successfully + type: array + items: + type: string + format: byte security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/column/{columnId}: put: tags: - - table-endpoint - summary: Update semantics - description: Updates column semantics of a table column with id. Only the table - owner with at least *READ* access to the associated database can update the - column semantics (requires role `modify-table-column-semantics`) or foreign - table columns if role `modify-foreign-table-column-semantics`. - operationId: updateColumn + - database-endpoint + summary: Update database preview image + description: Updates the database with id on the preview image. Only the database + owner can perform this operation. Requires role `modify-database-image`. + operationId: modifyImage parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - - name: columnId - in: path - required: true - schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/ColumnSemanticsUpdateDto" + $ref: "#/components/schemas/DatabaseModifyImageDto" required: true responses: - "503": - description: Failed to save in search service + "410": + description: File was not found in the Storage Service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated column semantics successfully + "502": + description: Connection to search service failed content: application/json: schema: - $ref: "#/components/schemas/ColumnDto" - "404": - description: Failed to find user/table/database/ontology in metadata database + $ref: "#/components/schemas/ApiErrorDto" + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "202": + description: Modify of image was successful content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Update semantic concept query is malformed or update unit of - measurement query is malformed + $ref: "#/components/schemas/DatabaseBriefDto" + "404": + description: Database could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "403": - description: Access to the database is forbidden + description: Modify of image is not permitted content: application/json: schema: @@ -1719,110 +1832,260 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/owner: - put: + /api/ontology: + get: tags: - - database-endpoint - summary: Update database owner - description: Updates the database with id on the owner. Only the database owner - can perform this operation. Requires role `modify-database-owner`. - operationId: transfer - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 + - ontology-endpoint + summary: List ontologies + description: Lists all ontologies known to the metadata database. + operationId: findAll_2 + responses: + "200": + description: List ontologies + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/OntologyBriefDto" + post: + tags: + - ontology-endpoint + summary: Create ontology + description: Creates an ontology in the metadata database. Requires role `create-ontology`. + operationId: create requestBody: content: application/json: schema: - $ref: "#/components/schemas/DatabaseTransferDto" + $ref: "#/components/schemas/OntologyCreateDto" required: true responses: - "400": - description: Owner payload is malformed + "201": + description: Registered ontology successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Transfer of ownership was successful + $ref: "#/components/schemas/OntologyDto" + security: + - bearerAuth: [] + - basicAuth: [] + /api/message: + get: + tags: + - message-endpoint + summary: List messages + description: "Lists messages known to the metadata database. Messages can be\ + \ filtered be filtered with the optional `active` parameter. If set to *true*,\ + \ only active messages (that is, messages whose end time has not been reached)\ + \ will be returned. Otherwise only inactive messages are returned. If not\ + \ set, active and inactive messages are returned." + operationId: list_2 + parameters: + - name: active + in: query + required: false + schema: + type: boolean + responses: + "200": + description: List messages content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "503": - description: Failed to save in search service + type: array + items: + $ref: "#/components/schemas/BannerMessageDto" + post: + tags: + - message-endpoint + summary: Create message + description: Creates a message in the metadata database. Requires role `create-maintenance-message`. + operationId: create_1 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BannerMessageCreateDto" + required: true + responses: + "201": + description: Created message content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + $ref: "#/components/schemas/BannerMessageBriefDto" + security: + - bearerAuth: [] + - basicAuth: [] + /api/image: + get: + tags: + - image-endpoint + summary: List images + description: Lists all container images known to the metadata database. + operationId: findAll_3 + responses: + "200": + description: List images content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Transfer of ownership is not permitted + type: array + items: + $ref: "#/components/schemas/ImageBriefDto" + post: + tags: + - image-endpoint + summary: Create image + description: Creates a container image in the metadata database. Requires role + `create-image`. + operationId: create_2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ImageCreateDto" + required: true + responses: + "400": + description: Image specification is invalid content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database or user could not be found + "409": + description: Image already exists content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "201": + description: Created image + content: + application/json: + schema: + $ref: "#/components/schemas/ImageDto" security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/metadata/view: - put: + /api/identifier: + get: tags: - - database-endpoint - summary: Update database view schemas - description: Updates the database with id with generated metadata from view - that are not yet known to the database. Only the database owner can perform - this operation. Requires role `find-database`. - operationId: refreshViewMetadata + - identifier-endpoint + summary: List identifiers + description: Lists all identifiers known to the metadata database + operationId: findAll_4 parameters: - - name: databaseId - in: path + - name: type + in: query + required: false + schema: + type: string + enum: + - database + - subset + - table + - view + - name: status + in: query + required: false + schema: + type: string + enum: + - draft + - published + - name: dbid + in: query + required: false + schema: + type: string + format: uuid + - name: qid + in: query + required: false + schema: + type: string + format: uuid + - name: vid + in: query + required: false + schema: + type: string + format: uuid + - name: tid + in: query + required: false + schema: + type: string + format: uuid + - name: Accept + in: header required: true schema: - type: integer - format: int64 + type: string responses: "200": - description: Refreshed database views metadata + description: Found identifiers successfully content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" + type: array + items: + type: string + application/ld+json: + schema: + type: array + items: + $ref: "#/components/schemas/LdDatasetDto" + post: + tags: + - identifier-endpoint + summary: Create identifier + description: Create an identifier with id to create a draft identifier. Identifiers + can only be created for objects the user has at least *READ* access in the + associated database (requires role `create-identifier`) or for any object + in any database (requires role `create-foreign-identifier`). + operationId: create_3 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateIdentifierDto" + required: true + responses: + "502": + description: Connection to search service failed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "201": + description: Drafted identifier + content: + application/json: + schema: + $ref: "#/components/schemas/IdentifierDto" "403": - description: Refresh view metadata is not permitted + description: Insufficient access rights or authorities content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "404": + description: "Failed to find database, table or view" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database + "400": + description: Identifier form contains invalid request data content: application/json: schema: @@ -1830,31 +2093,61 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/metadata/table: - put: + /api/database/{databaseId}/view: + get: tags: - - database-endpoint - summary: Update database table schemas - description: Updates the database with id with generated metadata from tables - that are not yet known to the database. Only the database owner can perform - this operation. Requires role `find-database`. - operationId: refreshTableMetadata + - view-endpoint + summary: List views + description: Lists views known to the metadata database. + operationId: findAll_5 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: - "400": - description: Failed to parse payload at search service + "200": + description: Find views successfully + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ViewBriefDto" + "404": + description: Database or user could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + security: + - bearerAuth: [] + - basicAuth: [] + post: + tags: + - view-endpoint + summary: Create view + description: Creates a view. This can only be performed by the database owner. + Requires role `create-database-view`. + operationId: create_5 + parameters: + - name: databaseId + in: path + required: true + schema: + type: string + format: uuid + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateViewDto" + required: true + responses: + "423": + description: Create view resulted in an invalid query statement content: application/json: schema: @@ -1865,20 +2158,38 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Refreshed database tables metadata + "201": + description: Create view successfully content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" + $ref: "#/components/schemas/ViewBriefDto" + "503": + description: Failed to save in search service + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "409": + description: View exists with name + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Create view query is malformed + content: + application/json: + schema: + $ref: "#/components/schemas/ApiErrorDto" "403": - description: Not allowed to refresh table metadata + description: Credentials missing content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Failed to fin user/database in metadata database + description: Failed to find database/user in metadata database. content: application/json: schema: @@ -1886,92 +2197,104 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/image: + /api/database/{databaseId}/table: get: tags: - - database-endpoint - summary: Get database preview image - description: Gets the database with id on the preview image. - operationId: findPreviewImage + - table-endpoint + summary: List tables + description: "Lists all tables known to the metadata database. When a database\ + \ has a hidden schema (i.e. when `is_schema_public` is `false`), then the\ + \ user needs to have at least read access and the role `list-tables`." + operationId: list_4 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: - "200": - description: View of image was successful + "403": + description: List tables not permitted content: - '*/*': + application/json: schema: - type: array - items: - type: string - format: byte + $ref: "#/components/schemas/ApiErrorDto" "404": - description: Database or user could not be found + description: Database could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "200": + description: List tables + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/TableBriefDto" security: - bearerAuth: [] - basicAuth: [] - put: + post: tags: - - database-endpoint - summary: Update database preview image - description: Updates the database with id on the preview image. Only the database - owner can perform this operation. Requires role `modify-database-image`. - operationId: modifyImage + - table-endpoint + summary: Create table + description: Creates a table in the database with id. Requires role `create-table`. + operationId: create_6 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: schema: - $ref: "#/components/schemas/DatabaseModifyImageDto" + $ref: "#/components/schemas/CreateTableDto" required: true responses: "403": - description: Modify of image is not permitted + description: Create table not permitted content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database could not be found + "502": + description: Connection to search service failed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + "201": + description: Created a new table + content: + application/json: + schema: + $ref: "#/components/schemas/TableBriefDto" + "409": + description: Create table conflicts with existing table name content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "503": + description: Failed to save in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Modify of image was successful + "404": + description: "Database, container or user could not be found" content: application/json: schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "410": - description: File was not found in the Storage Service + $ref: "#/components/schemas/ApiErrorDto" + "400": + description: Create table query is malformed content: application/json: schema: @@ -1979,220 +2302,169 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/user: + /api/container: get: tags: - - user-endpoint - summary: List users - description: "Lists users known to the metadata database. Internal users are\ - \ omitted from the result list. If the optional query parameter `username`\ - \ is present, the result list can be filtered by matching this exact username." - operationId: findAll + - container-endpoint + summary: List containers + description: List all containers in the metadata database. + operationId: findAll_6 parameters: - - name: username + - name: limit in: query required: false schema: - type: string + type: integer + format: int32 responses: "200": - description: List users + description: List containers content: application/json: schema: type: array items: - $ref: "#/components/schemas/UserBriefDto" + $ref: "#/components/schemas/ContainerBriefDto" post: tags: - - user-endpoint - summary: Create user - description: Creates a user in the auth service and metadata database. Requires - that no credentials are sent in the request. - operationId: create + - container-endpoint + summary: Create container + description: Creates a container in the metadata database. Requires role `create-container`. + operationId: create_8 requestBody: content: application/json: schema: - $ref: "#/components/schemas/CreateUserDto" + $ref: "#/components/schemas/CreateContainerDto" required: true responses: - "201": - description: Created user - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" - "404": - description: Default role not found + "403": + description: "Create container not permitted, need authority `create-container`" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Failed to create in auth service + "400": + description: Container payload malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Internal authentication to the auth service is invalid + "201": + description: Created a new container content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" + $ref: "#/components/schemas/ContainerDto" "409": - description: User with username already exists + description: Container name already exists content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Parameters are not well-formed (likely email) - content: - application/json: {} - "417": - description: User with e-mail already exists + "404": + description: Container image or user could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to create in auth service + security: + - bearerAuth: [] + - basicAuth: [] + /api/user: + get: + tags: + - user-endpoint + summary: List users + description: "Lists users known to the metadata database. Internal users are\ + \ omitted from the result list. If the optional query parameter `username`\ + \ is present, the result list can be filtered by matching this exact username." + operationId: findAll + parameters: + - name: username + in: query + required: false + schema: + type: string + responses: + "200": + description: List users content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/ontology: + type: array + items: + $ref: "#/components/schemas/UserBriefDto" + /api/unit: get: tags: - - ontology-endpoint - summary: List ontologies - description: Lists all ontologies known to the metadata database. - operationId: findAll_2 + - unit-endpoint + summary: List units + description: Lists units known to the metadata database. + operationId: findAll_1 responses: "200": - description: List ontologies + description: Find all semantic units content: application/json: schema: type: array items: - $ref: "#/components/schemas/OntologyBriefDto" - post: + $ref: "#/components/schemas/UnitDto" + /api/ontology/{ontologyId}/entity: + get: tags: - ontology-endpoint - summary: Create ontology - description: Creates an ontology in the metadata database. Requires role `create-ontology`. - operationId: create_1 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyCreateDto" - required: true - responses: - "201": - description: Registered ontology successfully - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/message: - get: - tags: - - message-endpoint - summary: List messages - description: "Lists messages known to the metadata database. Messages can be\ - \ filtered be filtered with the optional `active` parameter. If set to *true*,\ - \ only active messages (that is, messages whose end time has not been reached)\ - \ will be returned. Otherwise only inactive messages are returned. If not\ - \ set, active and inactive messages are returned." - operationId: list_2 + summary: Find entities + description: Finds semantic entities by label or uri in an ontology with id. + Requires role `execute-semantic-query`. + operationId: find_5 parameters: - - name: active + - name: ontologyId + in: path + required: true + schema: + type: string + format: uuid + - name: label in: query required: false schema: - type: boolean + type: string + - name: uri + in: query + required: false + schema: + type: string responses: - "200": - description: List messages + "400": + description: Filter params are invalid content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/BannerMessageDto" - post: - tags: - - message-endpoint - summary: Create message - description: Creates a message in the metadata database. Requires role `create-maintenance-message`. - operationId: create_2 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageCreateDto" - required: true - responses: - "201": - description: Created message + $ref: "#/components/schemas/ApiErrorDto" + "417": + description: Generated query or uri is malformed content: application/json: schema: - $ref: "#/components/schemas/BannerMessageBriefDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/image: - get: - tags: - - image-endpoint - summary: List images - description: Lists all container images known to the metadata database. - operationId: findAll_3 - responses: + $ref: "#/components/schemas/ApiErrorDto" "200": - description: List images + description: Found entities content: application/json: schema: type: array items: - $ref: "#/components/schemas/ImageBriefDto" - post: - tags: - - image-endpoint - summary: Create image - description: Creates a container image in the metadata database. Requires role - `create-image`. - operationId: create_3 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ImageCreateDto" - required: true - responses: - "201": - description: Created image - content: - application/json: - schema: - $ref: "#/components/schemas/ImageDto" - "409": - description: Image already exists + $ref: "#/components/schemas/EntityDto" + "404": + description: Could not find ontology content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Image specification is invalid + "422": + description: Ontology does not have rdf or sparql endpoint content: application/json: schema: @@ -2200,236 +2472,112 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/identifier: + /api/oai: get: tags: - - identifier-endpoint - summary: List identifiers - description: Lists all identifiers known to the metadata database - operationId: findAll_4 + - metadata-endpoint + summary: Get record + operationId: identify_1_1_1_1 parameters: - - name: dbid - in: query - required: false - schema: - type: integer - format: int64 - - name: qid - in: query - required: false - schema: - type: integer - format: int64 - - name: vid + - name: verb in: query - required: false - schema: - type: integer - format: int64 - - name: tid + - name: parameters in: query - required: false - schema: - type: integer - format: int64 - - name: Accept - in: header required: true schema: - type: string + $ref: "#/components/schemas/OaiListIdentifiersParameters" responses: "200": - description: Found identifiers successfully - content: - application/json: - schema: - type: array - items: - type: string - application/ld+json: - schema: - type: array - items: - $ref: "#/components/schemas/LdDatasetDto" - "406": - description: "Identifier could not be exported, the requested style is not\ - \ known" + description: List containers content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - post: + text/xml: {} + /api/message/message/{messageId}: + get: tags: - - identifier-endpoint - summary: Create identifier - description: Create an identifier with id to create a draft identifier. Identifiers - can only be created for objects the user has at least *READ* access in the - associated database (requires role `create-identifier`) or for any object - in any database (requires role `create-foreign-identifier`). - operationId: create_4 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateIdentifierDto" + - message-endpoint + summary: Find message + description: Finds a message with id in the metadata database. + operationId: find_6 + parameters: + - name: messageId + in: path required: true + schema: + type: string + format: uuid responses: - "201": - description: Drafted identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - "400": - description: Identifier form contains invalid request data - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "404": - description: "Failed to find database, table or view" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + description: Could not find message content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "200": + description: Get messages content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/view: + $ref: "#/components/schemas/BannerMessageDto" + /api/license: get: tags: - - view-endpoint - summary: List views - description: Lists views known to the metadata database. - operationId: findAll_5 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 + - license-endpoint + summary: List licenses + description: Lists licenses known to the metadata database. + operationId: list_3 responses: "200": - description: Find views successfully + description: List of licenses content: application/json: schema: type: array items: - $ref: "#/components/schemas/ViewBriefDto" - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - post: + $ref: "#/components/schemas/LicenseDto" + /api/identifier/retrieve: + get: tags: - - view-endpoint - summary: Create view - description: Creates a view. This can only be performed by the database owner. - Requires role `create-database-view`. - operationId: create_6 + - identifier-endpoint + summary: Retrieve PID metadata + description: "Retrieves Persistent Identifier (PID) metadata from external endpoints.\ + \ Supported PIDs are: ORCID, ROR, DOI." + operationId: retrieve parameters: - - name: databaseId - in: path + - name: url + in: query required: true schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateViewDto" - required: true + type: string responses: - "201": - description: Create view successfully - content: - application/json: - schema: - $ref: "#/components/schemas/ViewBriefDto" - "423": - description: Create view resulted in an invalid query statement - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create view query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Credentials missing + "404": + description: Failed to find metadata for identifier content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/user in metadata database. + "200": + description: Retrieved metadata from identifier content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table: + $ref: "#/components/schemas/IdentifierDto" + /api/database/{databaseId}: get: tags: - - table-endpoint - summary: List tables - description: "Lists all tables known to the metadata database. When a database\ - \ has a hidden schema (i.e. when `is_schema_public` is `false`), then the\ - \ user needs to have at least read access and the role `list-tables`." - operationId: list_4 + - database-endpoint + summary: Find database + description: Finds a database with id. + operationId: findById_1 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: "403": - description: List tables not permitted + description: Not allowed to view database content: application/json: schema: @@ -2441,143 +2589,136 @@ paths: schema: $ref: "#/components/schemas/ApiErrorDto" "200": - description: List tables + description: Database found successfully + headers: + X-Username: + description: The authentication username + style: simple + Access-Control-Expose-Headers: + description: Expose custom headers + style: simple + X-Password: + description: The authentication password + style: simple content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/TableBriefDto" + $ref: "#/components/schemas/DatabaseBriefDto" security: - bearerAuth: [] - basicAuth: [] - post: + /api/database/{databaseId}/table/{tableId}/suggest: + get: tags: - table-endpoint - summary: Create table - description: Creates a table in the database with id. Requires role `create-table`. - operationId: create_7 + summary: Suggest semantics + description: Suggests semantic concepts for a table. This action can only be + performed by the table owner. Requires role `table-semantic-analyse`. + operationId: analyseTable parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateTableDto" + type: string + format: uuid + - name: tableId + in: path required: true + schema: + type: string + format: uuid responses: - "409": - description: Create table conflicts with existing table name + "403": + description: Not the table owner. content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create table query is malformed + "417": + description: Generated query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, container or user could not be found" + "200": + description: Suggested table semantics successfully content: application/json: schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service + type: array + items: + $ref: "#/components/schemas/EntityDto" + "422": + description: Ontology does not have rdf or sparql endpoint content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Create table not permitted + "404": + description: Failed to find database/table in metadata database content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed + "400": + description: Failed to parse statistic in search service content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new table - content: - application/json: - schema: - $ref: "#/components/schemas/TableBriefDto" security: - bearerAuth: [] - basicAuth: [] - /api/container: + /api/database/{databaseId}/table/{tableId}/column/{columnId}/suggest: get: tags: - - container-endpoint - summary: List containers - description: List all containers in the metadata database. - operationId: findAll_6 + - table-endpoint + summary: Suggest semantics + description: Suggests column semantics. Requires role `table-semantic-analyse`. + operationId: analyseTableColumn parameters: - - name: limit - in: query - required: false + - name: databaseId + in: path + required: true schema: - type: integer - format: int32 - responses: - "200": - description: List containers - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ContainerBriefDto" - post: - tags: - - container-endpoint - summary: Create container - description: Creates a container in the metadata database. Requires role `create-container`. - operationId: create_9 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateContainerDto" + type: string + format: uuid + - name: tableId + in: path + required: true + schema: + type: string + format: uuid + - name: columnId + in: path required: true + schema: + type: string + format: uuid responses: - "409": - description: Container name already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: "Create container not permitted, need authority `create-container`" + "400": + description: Generated query is malformed content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new container + "200": + description: Suggested table column semantics successfully content: application/json: schema: - $ref: "#/components/schemas/ContainerDto" - "400": - description: Container payload malformed + type: array + items: + $ref: "#/components/schemas/TableColumnEntityDto" + "422": + description: Ontology does not have rdf or sparql endpoint content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "404": - description: Container image or user could not be found + description: Failed to find database/table in metadata database content: application/json: schema: @@ -2585,417 +2726,74 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/unit: + /api/container/{containerId}: get: tags: - - unit-endpoint - summary: List units - description: Lists units known to the metadata database. - operationId: findAll_1 - responses: - "200": - description: Find all semantic units - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/UnitDto" - /api/ontology/{ontologyId}/entity: - get: - tags: - - ontology-endpoint - summary: Find entities - description: Finds semantic entities by label or uri in an ontology with id. - Requires role `execute-semantic-query`. - operationId: find_4 + - container-endpoint + summary: Find container + description: Finds a container in the metadata database. + operationId: findById_3 parameters: - - name: ontologyId + - name: containerId in: path required: true - schema: - type: integer - format: int64 - - name: label - in: query - required: false schema: type: string - - name: uri - in: query - required: false - schema: - type: string - responses: - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Filter params are invalid - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Could not find ontology - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "417": - description: Generated query or uri is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found entities - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/EntityDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/oai: - get: - tags: - - metadata-endpoint - summary: Get record - operationId: identify_1_1_1_1 - parameters: - - name: verb - in: query - - name: parameters - in: query - required: true - schema: - $ref: "#/components/schemas/OaiListIdentifiersParameters" - responses: - "200": - description: List containers - content: - text/xml: {} - /api/message/message/{messageId}: - get: - tags: - - message-endpoint - summary: Find message - description: Finds a message with id in the metadata database. - operationId: find_5 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Get messages - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageDto" - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/license: - get: - tags: - - license-endpoint - summary: List licenses - description: Lists licenses known to the metadata database. - operationId: list_3 + format: uuid responses: "200": - description: List of licenses + description: Found container content: application/json: schema: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - /api/identifier/retrieve: - get: - tags: - - identifier-endpoint - summary: Retrieve PID metadata - description: "Retrieves Persistent Identifier (PID) metadata from external endpoints.\ - \ Supported PIDs are: ORCID, ROR, DOI." - operationId: retrieve - parameters: - - name: url - in: query - required: true - schema: - type: string - responses: + $ref: "#/components/schemas/ContainerDto" "404": - description: Failed to find metadata for identifier + description: Container image could not be found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Retrieved metadata from identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - /api/database/{databaseId}: - get: + delete: tags: - - database-endpoint - summary: Find database - description: Finds a database with id. - operationId: findById_1 + - container-endpoint + summary: Delete container + description: Deletes a container in the metadata database. Requires role `delete-container`. + operationId: delete_6 parameters: - - name: databaseId + - name: containerId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: "404": - description: "Database, user or exchange could not be found" + description: Container not found content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" "403": - description: Not allowed to view database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Database found successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Password: - description: The authentication password - style: simple - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "503": - description: Failed to find queue information in broker service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to the broker service could not be established + description: "Create container not permitted, need authority `delete-container`" content: application/json: schema: $ref: "#/components/schemas/ApiErrorDto" + "202": + description: Deleted container security: - bearerAuth: [] - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/suggest: + /api/concept: get: tags: - - table-endpoint - summary: Suggest semantics - description: Suggests semantic concepts for a table. This action can only be - performed by the table owner. Requires role `table-semantic-analyse`. - operationId: analyseTable - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 + - concept-endpoint + summary: List concepts + description: List all semantic concepts known to the metadata database + operationId: findAll_7 responses: - "403": - description: Not the table owner. - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" "200": - description: Suggested table semantics successfully - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/EntityDto" - "417": - description: Generated query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Failed to parse statistic in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/column/{columnId}/suggest: - get: - tags: - - table-endpoint - summary: Suggest semantics - description: Suggests column semantics. Requires role `table-semantic-analyse`. - operationId: analyseTableColumn - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - - name: columnId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Suggested table column semantics successfully - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/TableColumnEntityDto" - "400": - description: Generated query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/container/{containerId}: - get: - tags: - - container-endpoint - summary: Find container - description: Finds a container in the metadata database. - operationId: findById_3 - parameters: - - name: containerId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Container image could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found container - content: - application/json: - schema: - $ref: "#/components/schemas/ContainerDto" - delete: - tags: - - container-endpoint - summary: Delete container - description: Deletes a container in the metadata database. Requires role `delete-container`. - operationId: delete_6 - parameters: - - name: containerId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "403": - description: "Create container not permitted, need authority `delete-container`" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Container not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted container - security: - - bearerAuth: [] - - basicAuth: [] - /api/concept: - get: - tags: - - concept-endpoint - summary: List concepts - description: List all semantic concepts known to the metadata database - operationId: findAll_7 - responses: - "200": - description: List concepts + description: List concepts content: application/json: schema: @@ -3004,125 +2802,269 @@ paths: $ref: "#/components/schemas/ConceptDto" components: schemas: - CreatorBriefDto: + UserAttributesDto: required: - - creator_name - - id + - language + - theme type: object properties: - id: - type: integer - format: int64 - example: 11 - affiliation: - type: string - example: Brown University - creator_name: - type: string - example: "Carberry, Josiah" - name_type: - type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: + theme: type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: + example: light + orcid: type: string - example: ORCID - enum: - - ORCID - - ROR - - ISNI - - GRID - affiliation_identifier: + example: https://orcid.org/0000-0002-1825-0097 + affiliation: type: string - example: https://ror.org/05gq02987 - affiliation_identifier_scheme: + example: Brown University + language: type: string - example: ROR - enum: - - ROR - - GRID - - ISNI - DatabaseBriefDto: + example: en + UserDto: required: - - contact + - attributes - id - - identifiers - - internal_name - - is_public - - is_schema_public - - name - - owner_id + - password + - username type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 name: type: string - example: Air Quality - description: + example: Josiah Carberry + username: type: string - example: Air Quality - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierBriefDto" - contact: - $ref: "#/components/schemas/UserBriefDto" - internal_name: + example: username + password: type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - owner_id: + example: p4ssw0rd + attributes: + $ref: "#/components/schemas/UserAttributesDto" + last_retrieved: type: string - format: uuid - example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 - preview_image: + format: date-time + qualified_name: type: string - IdentifierBriefDto: + example: Josiah Carberry — @jcarberry + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + ApiErrorDto: required: - - creators - - database_id - - id - - owned_by - - publication_year - - publisher + - code + - message - status - - titles - - type type: object properties: - id: - type: integer - format: int64 - example: 2 - type: + status: type: string - example: database + example: NOT_FOUND enum: - - database - - subset - - table - - view - creators: - type: array - items: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Error message + code: + type: string + example: error.service.code + CreatorBriefDto: + required: + - creator_name + - id + type: object + properties: + id: + type: string + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 + affiliation: + type: string + example: Brown University + creator_name: + type: string + example: "Carberry, Josiah" + name_type: + type: string + example: Personal + enum: + - Personal + - Organizational + name_identifier: + type: string + example: 0000-0002-1825-0097 + name_identifier_scheme: + type: string + example: ORCID + enum: + - ORCID + - ROR + - ISNI + - GRID + affiliation_identifier: + type: string + example: https://ror.org/05gq02987 + affiliation_identifier_scheme: + type: string + example: ROR + enum: + - ROR + - GRID + - ISNI + DatabaseBriefDto: + required: + - contact + - id + - identifiers + - internal_name + - is_public + - is_schema_public + - name + - owner_id + type: object + properties: + id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality + identifiers: + type: array + items: + $ref: "#/components/schemas/IdentifierBriefDto" + contact: + $ref: "#/components/schemas/UserBriefDto" + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + is_schema_public: + type: boolean + example: true + owner_id: + type: string + format: uuid + example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 + preview_image: + type: string + IdentifierBriefDto: + required: + - creators + - database_id + - descriptions + - id + - owned_by + - publication_year + - publisher + - status + - titles + - type + type: object + properties: + id: + type: string + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec + type: + type: string + example: database + enum: + - database + - subset + - table + - view + creators: + type: array + items: $ref: "#/components/schemas/CreatorBriefDto" titles: type: array items: $ref: "#/components/schemas/IdentifierTitleDto" + descriptions: + type: array + items: + $ref: "#/components/schemas/IdentifierDescriptionDto" doi: type: string example: 10.1038/nphys1170 @@ -3136,21 +3078,18 @@ components: - draft - published database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc query_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid view_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid publication_year: type: integer format: int32 @@ -3159,18 +3098,18 @@ components: type: string format: uuid example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 - IdentifierTitleDto: + IdentifierDescriptionDto: required: - id type: object properties: id: - type: integer - format: int64 - example: 4 - title: type: string - example: Airquality Demonstrator + format: uuid + example: e0e9692c-910b-4b60-b53a-fc7c358a917d + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" language: type: string example: en @@ -3347,584 +3286,43 @@ components: - uk - ur - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - type: - type: string - enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle - - Other - UserBriefDto: - required: - - id - - username - type: object - properties: - id: - type: string - format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - username: - type: string - description: Only contains lowercase characters - example: jcarberry - name: - type: string - example: Josiah Carberry - orcid: - type: string - example: 0000-0002-1825-0097 - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry - DatabaseAccessDto: - required: - - type - - user - type: object - properties: - user: - $ref: "#/components/schemas/UserBriefDto" - type: - type: string - example: read - enum: - - read - - write_own - - write_all - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: NOT_FOUND - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 EARLY_HINTS - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code - UserUpdateDto: - required: - - language - - theme - type: object - properties: - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Brown University - orcid: - type: string - example: 0000-0002-1825-0097 - theme: - type: string - example: dark - language: - type: string - example: en - UserAttributesDto: - required: - - language - - theme - type: object - properties: - theme: - type: string - example: light - orcid: - type: string - example: https://orcid.org/0000-0002-1825-0097 - affiliation: - type: string - example: Brown University - language: - type: string - example: en - UserDto: - required: - - attributes - - id - - password - - username - type: object - properties: - id: - type: string - format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - name: - type: string - example: Josiah Carberry - username: - type: string - example: username - password: - type: string - example: p4ssw0rd - attributes: - $ref: "#/components/schemas/UserAttributesDto" - last_retrieved: - type: string - format: date-time - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry - UserPasswordDto: - required: - - password - type: object - properties: - password: - type: string - RefreshTokenRequestDto: - required: - - refresh_token - type: object - properties: - refresh_token: - type: string - example: refresh_token - TokenDto: - required: - - access_token - - expires_in - - id_token - - not-before-policy - - refresh_expires_in - - refresh_token - - scope - - session_state - - token_type - type: object - properties: - scope: - type: string - access_token: - type: string - expires_in: - type: integer - format: int64 - refresh_token: - type: string - refresh_expires_in: - type: integer - format: int64 - id_token: - type: string - session_state: - type: string - token_type: - type: string - not-before-policy: - type: integer - format: int64 - OntologyModifyDto: - required: - - prefix - - uri - type: object - properties: - uri: - type: string - example: Ontology URI - prefix: - type: string - example: Ontology prefix - sparql_endpoint: - type: string - example: Ontology SPARQL endpoint - rdf_path: - type: string - example: rdf/om-2.0.rdf - OntologyDto: - required: - - id - - prefix - - rdf - - sparql - - uri - type: object - properties: - id: - type: integer - format: int64 - uri: - type: string - example: http://www.wikidata.org/ - prefix: - type: string - example: wd - sparql: - type: boolean - example: true - rdf: - type: boolean - example: false - uri_pattern: - type: string - example: http://www.wikidata.org/entity/.* - sparql_endpoint: - type: string - example: https://query.wikidata.org/sparql - rdf_path: - type: string - example: rdf/om-2.0.rdf - BannerMessageUpdateDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - display_start: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - display_end: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - BannerMessageBriefDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - ImageChangeDto: - required: - - dialect - - driver_class - - jdbc_method - - registry - type: object - properties: - registry: - type: string - example: docker.io/library - defaultPort: - maximum: 65535 - minimum: 1024 - type: integer - format: int32 - example: 5432 - dialect: - type: string - example: Postgres - driver_class: - type: string - example: org.postgresql.Driver - jdbc_method: - type: string - example: postgresql - DataTypeDto: - required: - - display_name - - documentation - - is_buildable - - is_quoted - - value - type: object - properties: - value: - type: string - example: time - documentation: - type: string - example: https://mariadb.com/kb/en/time/ - display_name: - type: string - example: TIME(fsp) - size_min: - type: integer - format: int32 - example: 0 - size_max: - type: integer - format: int32 - example: 6 - size_default: - type: integer - format: int32 - example: 0 - size_required: - type: boolean - example: false - d_min: - type: integer - format: int32 - d_max: - type: integer - format: int32 - d_default: - type: integer - format: int32 - d_required: - type: boolean - data_hint: - type: string - example: "e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S" - type_hint: - type: string - example: "fsp=microsecond precision, min. 0, max. 6" - is_quoted: - type: boolean - description: frontend needs to quote this data type - example: false - is_buildable: - type: boolean - description: frontend can build this data type - example: true - ImageDto: - required: - - data_types - - default - - default_port - - dialect - - driver_class - - id - - jdbc_method - - name - - operators - - registry - - version - type: object - properties: - id: - type: integer - format: int64 - example: 1 - registry: - type: string - example: docker.io/library - name: - type: string - example: mariadb - version: - type: string - example: "10.5" - dialect: - type: string - example: org.hibernate.dialect.MariaDBDialect - operators: - type: array - items: - $ref: "#/components/schemas/OperatorDto" - driver_class: - type: string - example: org.mariadb.jdbc.Driver - jdbc_method: - type: string - example: mariadb - default: - type: boolean - example: false - default_port: - type: integer - format: int32 - example: 3306 - data_types: - type: array - items: - $ref: "#/components/schemas/DataTypeDto" - OperatorDto: - required: - - display_name - - documentation - - value - type: object - properties: - id: - type: integer - format: int64 - value: - type: string - example: XOR - documentation: - type: string - example: https://mariadb.com/kb/en/xor/ - display_name: + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + type: type: string - example: XOR - IdentifierSaveDto: + example: Abstract + enum: + - Abstract + - Methods + - SeriesInformation + - TableOfContents + - TechnicalInfo + - Other + IdentifierTitleDto: required: - - creators - - database_id - id - - publication_year - - publisher - - titles - - type type: object properties: id: - type: integer - format: int64 - example: 1 - type: - type: string - example: database - enum: - - database - - subset - - table - - view - doi: type: string - example: 10.1111/11111111 - titles: - type: array - items: - $ref: "#/components/schemas/SaveIdentifierTitleDto" - descriptions: - type: array - items: - $ref: "#/components/schemas/SaveIdentifierDescriptionDto" - funders: - type: array - items: - $ref: "#/components/schemas/SaveIdentifierFunderDto" - licenses: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - publisher: + format: uuid + example: 70ce5164-fd74-413f-8712-f996b91defbf + title: type: string - example: TU Wien + example: Airquality Demonstrator language: type: string + example: en enum: - ab - aa @@ -4110,122 +3508,371 @@ components: - yo - za - zu - creators: - type: array - items: - $ref: "#/components/schemas/SaveIdentifierCreatorDto" - database_id: + type: + type: string + enum: + - AlternativeTitle + - Subtitle + - TranslatedTitle + - Other + UserBriefDto: + required: + - id + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + username: + type: string + description: Only contains lowercase characters + example: jcarberry + name: + type: string + example: Josiah Carberry + orcid: + type: string + example: 0000-0002-1825-0097 + qualified_name: + type: string + example: Josiah Carberry — @jcarberry + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + DatabaseAccessDto: + required: + - type + - user + type: object + properties: + user: + $ref: "#/components/schemas/UserBriefDto" + type: + type: string + example: read + enum: + - read + - write_own + - write_all + UserUpdateDto: + required: + - language + - theme + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + theme: + type: string + example: dark + language: + type: string + example: en + OntologyModifyDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + rdf_path: + type: string + example: rdf/om-2.0.rdf + OntologyDto: + required: + - id + - prefix + - rdf + - sparql + - uri + type: object + properties: + id: + type: string + format: uuid + example: 7c491e40-082a-47b8-b82c-51d03c520466 + uri: + type: string + example: http://www.wikidata.org/ + prefix: + type: string + example: wd + sparql: + type: boolean + example: true + rdf: + type: boolean + example: false + uri_pattern: + type: string + example: http://www.wikidata.org/entity/.* + sparql_endpoint: + type: string + example: https://query.wikidata.org/sparql + rdf_path: + type: string + example: rdf/om-2.0.rdf + BannerMessageUpdateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + display_start: + type: string + format: date-time + example: 2021-03-12T15:26:21Z + display_end: + type: string + format: date-time + example: 2021-03-12T15:26:21Z + BannerMessageBriefDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: https://example.com + link_text: + type: string + example: More + ImageChangeDto: + required: + - dialect + - driver_class + - jdbc_method + - registry + type: object + properties: + registry: + type: string + example: docker.io/library + defaultPort: + maximum: 65535 + minimum: 1024 type: integer - format: int64 - example: 1 - query_id: + format: int32 + example: 5432 + dialect: + type: string + example: Postgres + driver_class: + type: string + example: org.postgresql.Driver + jdbc_method: + type: string + example: postgresql + DataTypeDto: + required: + - display_name + - documentation + - id + - is_buildable + - is_quoted + - value + type: object + properties: + id: + type: string + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcca + value: + type: string + example: time + documentation: + type: string + example: https://mariadb.com/kb/en/time/ + display_name: + type: string + example: TIME(fsp) + size_min: type: integer - format: int64 - view_id: + format: int32 + example: 0 + size_max: type: integer - format: int64 - table_id: + format: int32 + example: 6 + size_default: type: integer - format: int64 - publication_day: + format: int32 + example: 0 + size_required: + type: boolean + example: false + d_min: type: integer format: int32 - example: 15 - publication_month: + d_max: type: integer format: int32 - example: 12 - publication_year: + d_default: type: integer format: int32 - example: 2022 - related_identifiers: - type: array - items: - $ref: "#/components/schemas/SaveRelatedIdentifierDto" - LicenseDto: + d_required: + type: boolean + data_hint: + type: string + example: "e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S" + type_hint: + type: string + example: "fsp=microsecond precision, min. 0, max. 6" + is_quoted: + type: boolean + description: frontend needs to quote this data type + example: false + is_buildable: + type: boolean + description: frontend can build this data type + example: true + ImageDto: required: - - identifier - - uri + - data_types + - default + - id + - name + - operators + - version type: object properties: - identifier: + id: type: string - example: MIT - uri: + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcce + name: type: string - example: https://opensource.org/licenses/MIT - description: + example: mariadb + version: type: string - example: "A short and simple permissive license with conditions only requiring\ - \ preservation of copyright and license notices. Licensed works, modifications,\ - \ and larger works may be distributed under different terms and without\ - \ source code." - SaveIdentifierCreatorDto: + example: "10.5" + operators: + type: array + items: + $ref: "#/components/schemas/OperatorDto" + default: + type: boolean + example: false + data_types: + type: array + items: + $ref: "#/components/schemas/DataTypeDto" + OperatorDto: required: - - creator_name + - display_name + - documentation - id + - value type: object properties: id: - type: integer - format: int64 - example: 1 - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Wesleyan University - creator_name: - type: string - example: "Carberry, Josiah" - name_type: type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: - type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dccf + value: type: string - example: ORCID - enum: - - ORCID - - ROR - - ISNI - - GRID - affiliation_identifier: + example: XOR + documentation: type: string - example: https://ror.org/04d836q62 - affiliation_identifier_scheme: + example: https://mariadb.com/kb/en/xor/ + display_name: type: string - example: ROR - enum: - - ROR - - GRID - - ISNI - SaveIdentifierDescriptionDto: + example: XOR + IdentifierSaveDto: required: - - description + - creators + - database_id - id + - publication_year + - publisher + - titles + - type type: object properties: id: - type: integer - format: int64 - example: 1 - description: type: string - example: "Air quality reports at Stephansplatz, Vienna" + format: uuid + example: 68e11675-1e0f-4d24-a6d9-887ad1c4445d + type: + type: string + example: database + enum: + - database + - subset + - table + - view + doi: + type: string + example: 10.1111/11111111 + titles: + type: array + items: + $ref: "#/components/schemas/SaveIdentifierTitleDto" + descriptions: + type: array + items: + $ref: "#/components/schemas/SaveIdentifierDescriptionDto" + funders: + type: array + items: + $ref: "#/components/schemas/SaveIdentifierFunderDto" + licenses: + type: array + items: + $ref: "#/components/schemas/LicenseDto" + publisher: + type: string + example: TU Wien language: type: string - example: en enum: - ab - aa @@ -4411,63 +4058,118 @@ components: - yo - za - zu - type: + creators: + type: array + items: + $ref: "#/components/schemas/SaveIdentifierCreatorDto" + database_id: + type: string + format: uuid + query_id: + type: string + format: uuid + view_id: + type: string + format: uuid + table_id: + type: string + format: uuid + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + related_identifiers: + type: array + items: + $ref: "#/components/schemas/SaveRelatedIdentifierDto" + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: type: string - example: Abstract - enum: - - Abstract - - Methods - - SeriesInformation - - TableOfContents - - TechnicalInfo - - Other - SaveIdentifierFunderDto: + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + description: + type: string + example: "A short and simple permissive license with conditions only requiring\ + \ preservation of copyright and license notices. Licensed works, modifications,\ + \ and larger works may be distributed under different terms and without\ + \ source code." + SaveIdentifierCreatorDto: required: - - funder_name + - creator_name - id type: object properties: id: - type: integer - format: int64 - example: 1 - funder_name: type: string - example: European Commission - funder_identifier: + format: uuid + example: da9dd034-00a8-4517-b93d-d1b2adfee418 + firstname: type: string - example: http://doi.org/10.13039/501100000780 - funder_identifier_type: + example: Josiah + lastname: type: string - example: Crossref Funder ID + example: Carberry + affiliation: + type: string + example: Wesleyan University + creator_name: + type: string + example: "Carberry, Josiah" + name_type: + type: string + example: Personal enum: - - Crossref Funder ID + - Personal + - Organizational + name_identifier: + type: string + example: 0000-0002-1825-0097 + name_identifier_scheme: + type: string + example: ORCID + enum: + - ORCID - ROR - - GND - ISNI - - Other - scheme_uri: - type: string - example: http://doi.org/ - award_number: + - GRID + affiliation_identifier: type: string - example: "824087" - award_title: + example: https://ror.org/04d836q62 + affiliation_identifier_scheme: type: string - example: EOSC-Life - SaveIdentifierTitleDto: + example: ROR + enum: + - ROR + - GRID + - ISNI + SaveIdentifierDescriptionDto: required: + - description - id - - title type: object properties: id: - type: integer - format: int64 - example: 1 - title: type: string - example: Airquality Demonstrator + format: uuid + example: 35bd84d8-b181-43c8-b786-4d024e4f843c + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" language: type: string example: en @@ -4658,154 +4360,61 @@ components: - zu type: type: string - example: Subtitle + example: Abstract enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle + - Abstract + - Methods + - SeriesInformation + - TableOfContents + - TechnicalInfo - Other - SaveRelatedIdentifierDto: - required: - - id - - relation - - type - - value - type: object - properties: - id: - type: integer - format: int64 - example: 1 - value: - type: string - example: 10.70124/dc4zh-9ce78 - type: - type: string - example: DOI - enum: - - DOI - - URL - - URN - - ARK - - arXiv - - bibcode - - EAN13 - - EISSN - - Handle - - IGSN - - ISBN - - ISTC - - LISSN - - LSID - - PMID - - PURL - - UPC - - w3id - relation: - type: string - example: Cites - enum: - - IsCitedBy - - Cites - - IsSupplementTo - - IsSupplementedBy - - IsContinuedBy - - Continues - - IsDescribedBy - - Describes - - HasMetadata - - IsMetadataFor - - HasVersion - - IsVersionOf - - IsNewVersionOf - - IsPreviousVersionOf - - IsPartOf - - HasPart - - IsPublishedIn - - IsReferencedBy - - References - - IsDocumentedBy - - Documents - - IsCompiledBy - - Compiles - - IsVariantFormOf - - IsOriginalFormOf - - IsIdenticalTo - - IsReviewedBy - - Reviews - - IsDerivedFrom - - IsSourceOf - - IsRequiredBy - - Requires - - IsObsoletedBy - - Obsoletes - CreatorDto: + SaveIdentifierFunderDto: required: - - creator_name + - funder_name - id type: object properties: id: - type: integer - format: int64 - example: 11 - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: type: string - example: Brown University - creator_name: - type: string - example: "Carberry, Josiah" - name_type: + format: uuid + example: 1c6b9212-a315-44b9-946c-3682a7a0e517 + funder_name: type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: + example: European Commission + funder_identifier: type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: + example: http://doi.org/10.13039/501100000780 + funder_identifier_type: type: string - example: ORCID + example: Crossref Funder ID enum: - - ORCID + - Crossref Funder ID - ROR + - GND - ISNI - - GRID - name_identifier_scheme_uri: - type: string - example: https://orcid.org/ - affiliation_identifier: + - Other + scheme_uri: type: string - example: https://ror.org/05gq02987 - affiliation_identifier_scheme: + example: http://doi.org/ + award_number: type: string - example: ROR - enum: - - ROR - - GRID - - ISNI - affiliation_identifier_scheme_uri: + example: "824087" + award_title: type: string - example: https://ror.org/ - IdentifierDescriptionDto: + example: EOSC-Life + SaveIdentifierTitleDto: required: - id + - title type: object properties: id: - type: integer - format: int64 - example: 3 - description: type: string - example: "Air quality reports at Stephansplatz, Vienna" + format: uuid + example: 2af9f40e-eaf5-4ea1-861a-1a696587bf29 + title: + type: string + example: Airquality Demonstrator language: type: string example: en @@ -4996,14 +4605,142 @@ components: - zu type: type: string - example: Abstract + example: Subtitle + enum: + - AlternativeTitle + - Subtitle + - TranslatedTitle + - Other + SaveRelatedIdentifierDto: + required: + - id + - relation + - type + - value + type: object + properties: + id: + type: string + format: uuid + example: 5bb272c7-7421-4f74-83ac-0486812d0f44 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI enum: - - Abstract - - Methods - - SeriesInformation - - TableOfContents - - TechnicalInfo - - Other + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + CreatorDto: + required: + - creator_name + - id + type: object + properties: + id: + type: string + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + creator_name: + type: string + example: "Carberry, Josiah" + name_type: + type: string + example: Personal + enum: + - Personal + - Organizational + name_identifier: + type: string + example: 0000-0002-1825-0097 + name_identifier_scheme: + type: string + example: ORCID + enum: + - ORCID + - ROR + - ISNI + - GRID + name_identifier_scheme_uri: + type: string + example: https://orcid.org/ + affiliation_identifier: + type: string + example: https://ror.org/05gq02987 + affiliation_identifier_scheme: + type: string + example: ROR + enum: + - ROR + - GRID + - ISNI + affiliation_identifier_scheme_uri: + type: string + example: https://ror.org/ IdentifierDto: required: - creators @@ -5025,9 +4762,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec type: type: string example: database @@ -5266,21 +5003,17 @@ components: - draft - published database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid query_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid view_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid query_normalized: type: string example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ @@ -5318,9 +5051,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: 39693413-e0ce-46da-ad5e-029c0556d439 funder_name: type: string example: European Commission @@ -5354,9 +5087,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: ce9d11f0-60a2-448d-a3e4-44719a443e8a value: type: string example: 10.70124/dc4zh-9ce78 @@ -5455,9 +5188,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 787439d0-e85e-400c-a7e6-996a023bfad9 name: type: string example: Air Quality @@ -5465,9 +5198,9 @@ components: type: string example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4 internal_name: type: string example: air_quality @@ -5518,9 +5251,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: 41ed10e0-687b-4e18-8521-810f5cffbce1 name: type: string example: Air Quality @@ -5528,9 +5261,9 @@ components: type: string example: Air Quality in Austria database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: a8fec026-dfaf-4b1d-8f6c-f01720d91705 internal_name: type: string example: air_quality @@ -5567,9 +5300,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: a453e444-e00d-41ca-902c-11e9c54b39f1 name: maxLength: 64 minLength: 0 @@ -5603,26 +5336,20 @@ components: example: Column comment enums: type: array - example: - - val1 items: - type: string - example: "[\"val1\"]" + $ref: "#/components/schemas/EnumDto" sets: type: array - example: - - val1 items: - type: string - example: "[\"val1\"]" + $ref: "#/components/schemas/SetDto" database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: 911f9052-c58c-4e1c-b3f2-66af2107be16 table_id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: bfffa915-a547-4466-9c65-ddc0d38fdb08 ord: type: integer format: int32 @@ -5705,9 +5432,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 23 + type: string + format: uuid + example: 8cabc011-4bdf-44d4-9d33-b2648e2ddbf1 uri: type: string example: http://www.wikidata.org/entity/Q202444 @@ -5718,6 +5445,32 @@ components: type: string example: "name typically used to differentiate people from the same family,\ \ clan, or other social group who have a common last name" + EnumDto: + required: + - id + - value + type: object + properties: + id: + type: string + format: uuid + example: 5343bb3d-14d3-4eb7-a86f-b8fc553cb315 + value: + type: string + example: "3" + SetDto: + required: + - id + - value + type: object + properties: + id: + type: string + format: uuid + example: 7eb4eded-bacc-4a91-84db-a9ae6ddafda7 + value: + type: string + example: "3" UnitBriefDto: required: - id @@ -5725,9 +5478,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 34 + type: string + format: uuid + example: ba1935e8-6817-488f-af0a-f54389af9000 uri: type: string example: http://www.wikidata.org/entity/Q1422583 @@ -5762,33 +5515,6 @@ components: - read - write_own - write_all - CreateUserDto: - required: - - email - - password - - username - type: object - properties: - username: - pattern: "^[a-z0-9]{3,}$" - type: string - example: user - email: - type: string - example: user@example.com - password: - type: string - LoginRequestDto: - required: - - password - - username - type: object - properties: - username: - type: string - example: user - password: - type: string OntologyCreateDto: required: - prefix @@ -6099,18 +5825,18 @@ components: items: $ref: "#/components/schemas/SaveIdentifierCreatorDto" database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: d002e8d5-8db4-4ff7-ab3a-bc3f52d9ec44 query_id: - type: integer - format: int64 + type: string + format: uuid view_id: - type: integer - format: int64 - table_id: - type: integer - format: int64 + type: string + format: uuid + table_id: + type: string + format: uuid publication_day: type: integer format: int32 @@ -6139,9 +5865,9 @@ components: type: string example: Air Quality container_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 0888e108-d521-46e2-9d3e-82099185305b is_public: type: boolean example: true @@ -6162,14 +5888,79 @@ components: type: string example: Air Quality query: - type: string - example: SELECT `id` FROM `air_quality` + $ref: "#/components/schemas/SubsetDto" is_public: type: boolean example: true is_schema_public: type: boolean example: true + FilterDto: + required: + - column_id + - operator_id + - type + - value + type: object + properties: + type: + type: string + example: where + enum: + - where + - or + - and + value: + type: string + example: "1" + column_id: + type: string + format: uuid + example: 14128033-54b5-4818-a489-21b0dded86e2 + operator_id: + type: string + format: uuid + example: 67c5b54d-2eb0-4f42-8dc1-a504562e9f32 + OrderDto: + required: + - column_id + type: object + properties: + direction: + type: string + example: asc + enum: + - asc + - desc + column_id: + type: string + format: uuid + example: e891ba86-0258-41a6-a8d9-ff58bc10b618 + SubsetDto: + required: + - columns + - table_id + type: object + properties: + columns: + type: array + example: + - e891ba86-0258-41a6-a8d9-ff58bc10b618 + items: + type: string + format: uuid + filter: + type: array + items: + $ref: "#/components/schemas/FilterDto" + order: + type: array + items: + $ref: "#/components/schemas/OrderDto" + table_id: + type: string + format: uuid + example: f7df2a7d-4ade-4c78-97b0-7c744d0893c7 CreateForeignKeyDto: required: - columns @@ -6179,16 +5970,24 @@ components: properties: columns: type: array + example: + - id items: type: string + example: "[\"id\"]" referenced_table: type: string + example: sensor referenced_columns: type: array + example: + - other_id items: type: string + example: "[\"other_id\"]" on_update: type: string + example: cascade enum: - restrict - cascade @@ -6197,6 +5996,7 @@ components: - set_default on_delete: type: string + example: cascade enum: - restrict - cascade @@ -6215,7 +6015,7 @@ components: example: Date type: type: string - example: string + example: varchar enum: - char - varchar @@ -6368,10 +6168,10 @@ components: format: int64 example: 50 image_id: - type: integer + type: string description: Image ID - format: int64 - example: 1 + format: uuid + example: 2360f3c4-85e0-4fac-a7c6-73b296b9dde2 ui_host: type: string example: example.com @@ -6394,23 +6194,15 @@ components: - image - internal_name - name - - quota type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 7ddb7e87-b965-43a2-9a24-4fa406d998f4 name: type: string example: Air Quality - host: - type: string - example: data-db - port: - type: integer - format: int32 - example: 3306 image: $ref: "#/components/schemas/ImageDto" quota: @@ -6433,13 +6225,6 @@ components: internal_name: type: string example: air_quality - ui_host: - type: string - example: example.com - ui_port: - type: integer - format: int32 - example: 3306 ColumnBriefDto: required: - database_id @@ -6451,9 +6236,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: a453e444-e00d-41ca-902c-11e9c54b39f1 name: maxLength: 64 minLength: 0 @@ -6463,13 +6248,13 @@ components: type: string example: firstname database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: 911f9052-c58c-4e1c-b3f2-66af2107be16 table_id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: bfffa915-a547-4466-9c65-ddc0d38fdb08 internal_name: maxLength: 64 minLength: 0 @@ -6517,8 +6302,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: ba1935e8-6817-488f-af0a-f54389af9000 uri: type: string name: @@ -6539,8 +6325,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: 7c491e40-082a-47b8-b82c-51d03c520466 uri: type: string example: http://www.wikidata.org/ @@ -6584,14 +6371,14 @@ components: type: string resumptionToken: type: string + parametersString: + type: string fromDate: type: string format: date-time untilDate: type: string format: date-time - parametersString: - type: string BannerMessageDto: required: - id @@ -6600,10 +6387,12 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: ae3f795b-a3da-4ebe-bdc4-21a8ce631e6f type: type: string + example: WARNING enum: - error - warning @@ -6629,24 +6418,20 @@ components: required: - default - id - - jdbc_method - name - version type: object properties: id: - type: integer - format: int64 - example: 5 + type: string + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcce name: type: string example: mariadb version: type: string example: "10.5" - jdbc_method: - type: string - example: mariadb default: type: boolean example: false @@ -6712,6 +6497,153 @@ components: type: string '@type': type: string + ViewColumnDto: + required: + - database_id + - id + - internal_name + - is_null_allowed + - name + - ord + - type + type: object + properties: + id: + type: string + format: uuid + example: 6aec3a91-2e0b-4e92-a16a-9c3c5e892da1 + name: + maxLength: 64 + minLength: 0 + type: string + example: Given Name + size: + type: integer + format: int64 + example: 255 + d: + type: integer + format: int64 + example: 0 + description: + maxLength: 2048 + minLength: 0 + type: string + example: Column comment + database_id: + type: string + format: uuid + example: 2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4 + ord: + type: integer + format: int32 + example: 0 + internal_name: + maxLength: 64 + minLength: 0 + type: string + example: given_name + index_length: + type: integer + format: int64 + example: 255 + length: + type: integer + format: int64 + example: 255 + type: + type: string + example: varchar + enum: + - char + - varchar + - binary + - varbinary + - tinyblob + - tinytext + - text + - blob + - mediumtext + - mediumblob + - longtext + - longblob + - enum + - set + - serial + - bit + - tinyint + - bool + - smallint + - mediumint + - int + - bigint + - float + - double + - decimal + - date + - datetime + - timestamp + - time + - year + is_null_allowed: + type: boolean + example: false + ViewDto: + required: + - columns + - database_id + - id + - identifiers + - internal_name + - name + - owner + - query + - query_hash + type: object + properties: + id: + type: string + format: uuid + example: 787439d0-e85e-400c-a7e6-996a023bfad9 + name: + type: string + example: Air Quality + identifiers: + type: array + items: + $ref: "#/components/schemas/IdentifierDto" + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + owner: + $ref: "#/components/schemas/UserBriefDto" + columns: + type: array + items: + $ref: "#/components/schemas/ViewColumnDto" + last_retrieved: + type: string + format: date-time + database_id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + is_schema_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + query_hash: + type: string + example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 ConstraintsDto: type: object properties: @@ -6736,86 +6668,13 @@ components: type: array items: $ref: "#/components/schemas/PrimaryKeyDto" - DatabaseDto: - required: - - accesses - - contact - - exchange_name - - id - - identifiers - - internal_name - - is_public - - is_schema_public - - name - - owner - - subsets - - tables - - views - type: object - properties: - id: - type: integer - format: int64 - example: 3 - name: - type: string - example: Air Quality - description: - type: string - example: Air Quality - tables: - type: array - items: - $ref: "#/components/schemas/TableDto" - views: - type: array - items: - $ref: "#/components/schemas/ViewDto" - container: - $ref: "#/components/schemas/ContainerDto" - accesses: - type: array - items: - $ref: "#/components/schemas/DatabaseAccessDto" - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierDto" - subsets: - type: array - items: - $ref: "#/components/schemas/IdentifierDto" - contact: - $ref: "#/components/schemas/UserBriefDto" - owner: - $ref: "#/components/schemas/UserBriefDto" - last_retrieved: - type: string - format: date-time - exchange_name: - type: string - example: dbrepo - exchange_type: - type: string - example: topic - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - preview_image: - type: string ForeignKeyBriefDto: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a ForeignKeyDto: required: - name @@ -6825,9 +6684,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a name: type: string example: fk_name @@ -6865,9 +6724,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a column: $ref: "#/components/schemas/ColumnBriefDto" foreign_key: @@ -6881,9 +6740,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: d984f9d7-e8a7-4b81-b59a-862db1871f18 table: $ref: "#/components/schemas/TableBriefDto" column: @@ -6905,9 +6764,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: d346f844-b84c-490f-9aec-725a2dc8f820 name: type: string example: Air Quality @@ -6929,17 +6788,15 @@ components: type: array items: $ref: "#/components/schemas/ColumnDto" - database: - $ref: "#/components/schemas/DatabaseDto" constraints: $ref: "#/components/schemas/ConstraintsDto" last_retrieved: type: string format: date-time database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc internal_name: type: string example: air_quality @@ -6989,9 +6846,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 5 + type: string + format: uuid + example: d984f9d7-e8a7-4b81-b59a-862db1871f13 name: type: string example: uk_name @@ -7001,155 +6858,6 @@ components: type: array items: $ref: "#/components/schemas/ColumnBriefDto" - ViewColumnDto: - required: - - database_id - - id - - internal_name - - is_null_allowed - - name - - ord - - type - type: object - properties: - id: - type: integer - format: int64 - example: 12 - name: - maxLength: 64 - minLength: 0 - type: string - example: Given Name - size: - type: integer - format: int64 - example: 255 - d: - type: integer - format: int64 - example: 0 - description: - maxLength: 2048 - minLength: 0 - type: string - example: Column comment - database_id: - type: integer - format: int64 - example: 1 - ord: - type: integer - format: int32 - example: 0 - internal_name: - maxLength: 64 - minLength: 0 - type: string - example: given_name - index_length: - type: integer - format: int64 - example: 255 - length: - type: integer - format: int64 - example: 255 - type: - type: string - example: varchar - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - is_null_allowed: - type: boolean - example: false - ViewDto: - required: - - columns - - database_id - - id - - identifiers - - internal_name - - name - - owner - - query - - query_hash - type: object - properties: - id: - type: integer - format: int64 - example: 4 - name: - type: string - example: Air Quality - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierDto" - query: - type: string - example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC - database: - $ref: "#/components/schemas/DatabaseDto" - owner: - $ref: "#/components/schemas/UserBriefDto" - columns: - type: array - items: - $ref: "#/components/schemas/ViewColumnDto" - last_retrieved: - type: string - format: date-time - database_id: - type: integer - format: int64 - example: 1 - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - initial_view: - type: boolean - description: True if it is the default view for the database - example: true - query_hash: - type: string - example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 TableColumnEntityDto: required: - column_id @@ -7168,17 +6876,17 @@ components: type: string example: open source semantic web framework for Java database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 475b4107-a64d-4495-a7ef-3cb0dadd4804 table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 9a9208af-90ea-4382-9a11-0c8f6d89bd1f column_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 297860e3-3b29-451c-ae8a-a85ed5941018 ContainerBriefDto: required: - count @@ -7191,9 +6899,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 7ddb7e87-b965-43a2-9a24-4fa406d998f4 hash: type: string example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 @@ -7221,8 +6929,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: 8cabc011-4bdf-44d4-9d33-b2648e2ddbf1 uri: type: string name: diff --git a/.docs/.openapi/api.base.yaml b/.docs/.openapi/api.base.yaml index f0420d1412b6c86f3397593aa001abe31fcb7840..abadb218e7fa3b74a11caea3b01d3f73f2fa988a 100644 --- a/.docs/.openapi/api.base.yaml +++ b/.docs/.openapi/api.base.yaml @@ -11,7 +11,7 @@ components: type: http externalDocs: description: Project Website - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/ + url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/ info: contact: email: andreas.rauber@tuwien.ac.at @@ -24,7 +24,7 @@ info: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 title: DBRepo REST API - version: 1.6.5 + version: 1.7.0 openapi: 3.1.0 servers: - description: Test Instance diff --git a/.docs/.openapi/api.yaml b/.docs/.openapi/api.yaml index c5d75bca5ae848f542e636fe91d656195e2dc6b2..ef09abce99a63aa56fabda90e196224b0bbebadf 100644 --- a/.docs/.openapi/api.yaml +++ b/.docs/.openapi/api.yaml @@ -16,7 +16,7 @@ info: name: Apache 2.0 url: 'https://www.apache.org/licenses/LICENSE-2.0' title: DBRepo REST API - version: 1.6.2 + version: 1.7.0 servers: - description: Test Instance url: 'https://test.dbrepo.tuwien.ac.at' @@ -24,7 +24,7 @@ servers: url: 'http://localhost' externalDocs: description: Project Website - url: 'https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/' + url: 'https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/' paths: /api/analyse/datatypes: get: @@ -153,22 +153,21 @@ paths: summary: Get view data description: >- Gets data from a view of a database. For private databases, the user - needs at least *READ* access to the associated database. Requires role - `view-database-view-data`. + needs at least *READ* access to the associated database. operationId: getData parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: page in: query required: false @@ -242,22 +241,21 @@ paths: summary: Get view data description: >- Gets data from a view of a database. For private databases, the user - needs at least *READ* access to the associated database. Requires role - `view-database-view-data`. + needs at least *READ* access to the associated database. operationId: getData_1 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: page in: query required: false @@ -341,14 +339,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -424,14 +422,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -487,14 +485,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -552,14 +550,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -616,14 +614,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -702,14 +700,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -795,14 +793,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -884,14 +882,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: queryId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -940,6 +938,43 @@ paths: security: - bearerAuth: [] - basicAuth: [] + /api/upload: + post: + tags: + - upload-endpoint + summary: Uploads a multipart file + description: >- + Uploads a multipart file to the Storage Service. Requires role + `upload-file`. + operationId: create + requestBody: + content: + application/json: + schema: + required: + - file + type: object + properties: + file: + type: string + format: binary + required: true + responses: + '201': + description: Uploaded the file + content: + application/json: + schema: + $ref: '#/components/schemas/ViewDto' + '503': + description: Failed to establish connection with the storage service + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - basicAuth: [] + - bearerAuth: [] '/api/database/{databaseId}/table/{tableId}/data/import': post: tags: @@ -956,14 +991,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Authorization in: header required: true @@ -1022,8 +1057,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: persisted in: query required: false @@ -1070,14 +1105,14 @@ paths: used without authentication if (and only if) the database is marked as public (i.e. when `is_public` = `is_schema_public` is set to `true`). Otherwise at least read access is required. - operationId: create + operationId: create_1 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -1100,7 +1135,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExecuteStatementDto' + $ref: '#/components/schemas/SubsetDto' required: true responses: '201': @@ -1165,14 +1200,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -1229,14 +1264,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: size in: query required: false @@ -1294,14 +1329,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: timestamp in: query required: false @@ -1360,14 +1395,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: subsetId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Accept in: header required: true @@ -1422,95 +1457,227 @@ paths: security: - basicAuth: [] - bearerAuth: [] - /api/database: + '/api/user/{userId}': get: tags: - - database-endpoint - summary: List databases + - user-endpoint + summary: Get user description: >- - Lists all databases in the metadata database. Requests with HTTP method - **GET** return the list of databases, requests with HTTP method **HEAD** - only the number in the `X-Count` header. - operationId: list1 + Gets own user information from the metadata database. Requires + authentication. Foreign user information can only be obtained if + additional role `find-foreign-user` is present. Finding information + about internal users results in a 404 error. + operationId: find parameters: - - name: internal_name - in: query - required: false + - name: userId + in: path + required: true schema: type: string + format: uuid responses: '200': - description: List of databases - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of databases - required: true - style: simple + description: Found user content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/DatabaseBriefDto' - post: + $ref: '#/components/schemas/UserDto' + '403': + description: Find user is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '404': + description: User was not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + - basicAuth: [] + put: tags: - - database-endpoint - summary: Create database - description: >- - Creates a database in the container with id. Requires roles - `create-database`. - operationId: create_5 + - user-endpoint + summary: Update user + description: Updates user with id. Requires role `modify-user-information`. + operationId: modify + parameters: + - name: userId + in: path + required: true + schema: + type: string + format: uuid requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateDatabaseDto' + $ref: '#/components/schemas/UserUpdateDto' required: true responses: - '201': - description: Created a new database + '202': + description: Modified user information content: application/json: schema: - $ref: '#/components/schemas/DatabaseBriefDto' + $ref: '#/components/schemas/UserDto' '400': - description: Database create query is malformed or image is not supported + description: Modify user query is malformed content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' '403': - description: >- - Database create permission is missing or grant permissions at broker - service failed + description: Not allowed to modify user metadata content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' '404': - description: Failed to fin container/user/database in metadata database - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '409': - description: Query store could not be created - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '423': - description: Database quota exceeded + description: Failed to find database/user in metadata database content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Connection to search service failed + '503': + description: Failed to modify user at auth service + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + - basicAuth: [] + head: + tags: + - user-endpoint + summary: Get user + description: >- + Gets own user information from the metadata database. Requires + authentication. Foreign user information can only be obtained if + additional role `find-foreign-user` is present. Finding information + about internal users results in a 404 error. + operationId: find_1 + parameters: + - name: userId + in: path + required: true + schema: + type: string + format: uuid + responses: + '200': + description: Found user + content: + application/json: + schema: + $ref: '#/components/schemas/UserDto' + '403': + description: Find user is not permitted + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '404': + description: User was not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + security: + - bearerAuth: [] + - basicAuth: [] + /api/database: + get: + tags: + - database-endpoint + summary: List databases + description: >- + Lists all databases in the metadata database. Requests with HTTP method + **GET** return the list of databases, requests with HTTP method **HEAD** + only the number in the `X-Count` header. + operationId: list1 + parameters: + - name: internal_name + in: query + required: false + schema: + type: string + responses: + '200': + description: List of databases + headers: + Access-Control-Expose-Headers: + description: Expose `X-Count` custom header + required: true + style: simple + X-Count: + description: Number of databases + required: true + style: simple + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/DatabaseBriefDto' + post: + tags: + - database-endpoint + summary: Create database + description: >- + Creates a database in the container with id. Requires roles + `create-database`. + operationId: create_4 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDatabaseDto' + required: true + responses: + '201': + description: Created a new database + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseBriefDto' + '400': + description: Database create query is malformed or image is not supported + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '403': + description: >- + Database create permission is missing or grant permissions at broker + service failed + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '404': + description: Failed to fin container/user/database in metadata database + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '409': + description: Query store could not be created + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '423': + description: Database quota exceeded + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' + '502': + description: Connection to search service failed content: application/json: schema: @@ -1568,14 +1735,14 @@ paths: with HTTP method **HEAD** only the status. When the user has at least *READ* access, the status 200 is returned, 403 otherwise. Requires role `check-database-access` or `check-foreign-database-access`. - operationId: find + operationId: find_2 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -1617,8 +1784,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -1678,14 +1845,14 @@ paths: description: >- Give a user with given id access to some database with given id. Requires role `create-database-access`. - operationId: create_8 + operationId: create_7 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -1751,8 +1918,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -1805,14 +1972,14 @@ paths: with HTTP method **HEAD** only the status. When the user has at least *READ* access, the status 200 is returned, 403 otherwise. Requires role `check-database-access` or `check-foreign-database-access`. - operationId: find_1 + operationId: find_3 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: userId in: path required: true @@ -1841,19 +2008,15 @@ paths: security: - bearerAuth: [] - basicAuth: [] - '/api/user/{userId}': + '/api/ontology/{ontologyId}': get: tags: - - user-endpoint - summary: Get user - description: >- - Gets own user information from the metadata database. Requires - authentication. Foreign user information can only be obtained if - additional role `find-foreign-user` is present. Finding information - about internal users results in a 404 error. - operationId: find_2 + - ontology-endpoint + summary: Find ontology + description: Finds an ontology with id in the metadata database. + operationId: find_4 parameters: - - name: userId + - name: ontologyId in: path required: true schema: @@ -1861,34 +2024,25 @@ paths: format: uuid responses: '200': - description: Found user - content: - application/json: - schema: - $ref: '#/components/schemas/UserDto' - '403': - description: Find user is not permitted + description: Find one ontology content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' + $ref: '#/components/schemas/OntologyDto' '404': - description: User was not found + description: Could not find ontology content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - security: - - bearerAuth: [] - - basicAuth: [] put: tags: - - user-endpoint - summary: Update user - description: Updates user with id. Requires role `modify-user-information`. - operationId: modify + - ontology-endpoint + summary: Update ontology + description: Updates an ontology with id. Requires role `update-ontology`. + operationId: update parameters: - - name: userId + - name: ontologyId in: path required: true schema: @@ -1898,29 +2052,44 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserUpdateDto' + $ref: '#/components/schemas/OntologyModifyDto' required: true responses: '202': - description: Modified user information + description: Updated ontology successfully content: application/json: schema: - $ref: '#/components/schemas/UserDto' - '400': - description: Modify user query is malformed + $ref: '#/components/schemas/OntologyDto' + '404': + description: Could not find ontology content: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Not allowed to modify user metadata + security: + - bearerAuth: [] + - basicAuth: [] + delete: + tags: + - ontology-endpoint + summary: Delete ontology + description: Deletes an ontology with given id. Requires role `delete-ontology`. + operationId: delete + parameters: + - name: ontologyId + in: path + required: true + schema: + type: string + format: uuid + responses: + '202': + description: Deleted ontology successfully content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' + application/json: {} '404': - description: Failed to find database/user in metadata database + description: Could not find ontology content: application/json: schema: @@ -1928,15 +2097,15 @@ paths: security: - bearerAuth: [] - basicAuth: [] - '/api/user/{userId}/password': + '/api/message/{messageId}': put: tags: - - user-endpoint - summary: Update user password - description: Updates password of user with id. Requires authentication. - operationId: password + - message-endpoint + summary: Update message + description: Updates a message with id. Requires role `update-maintenance-message`. + operationId: update_1 parameters: - - name: userId + - name: messageId in: path required: true schema: @@ -1946,257 +2115,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UserPasswordDto' + $ref: '#/components/schemas/BannerMessageUpdateDto' required: true responses: '202': - description: Modified user password - '400': - description: Invalid password payload + description: Updated message content: application/json: schema: - $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Not allowed to change foreign user password - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '404': - description: Failed to find database/user in metadata database - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Connection to auth service failed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to get user in auth service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - security: - - bearerAuth: [] - - basicAuth: [] - /api/user/token: - put: - tags: - - user-endpoint - summary: Refresh token - description: Refreshes user token by refresh token. - operationId: refreshToken - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RefreshTokenRequestDto' - required: true - responses: - '202': - description: Refreshed user token - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDto' - '400': - description: Invalid refresh token - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Not allowed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Connection to auth service failed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - post: - tags: - - user-endpoint - summary: Create token - description: Creates a user token via the Auth Service. - operationId: getToken - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/LoginRequestDto' - required: true - responses: - '202': - description: Obtained user token - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDto' - '400': - description: Invalid login request - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '403': - description: Not allowed to get token - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '404': - description: Failed to find user in auth database - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '428': - description: >- - Account is not fully setup in auth service (requires password - change?) - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Connection to auth service failed - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to get user in auth service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '/api/ontology/{ontologyId}': - get: - tags: - - ontology-endpoint - summary: Find ontology - description: Finds an ontology with id in the metadata database. - operationId: find_3 - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: - '200': - description: Find one ontology - content: - application/json: - schema: - $ref: '#/components/schemas/OntologyDto' - '404': - description: Could not find ontology - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - put: - tags: - - ontology-endpoint - summary: Update ontology - description: Updates an ontology with id. Requires role `update-ontology`. - operationId: update - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OntologyModifyDto' - required: true - responses: - '202': - description: Updated ontology successfully - content: - application/json: - schema: - $ref: '#/components/schemas/OntologyDto' - '404': - description: Could not find ontology - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - ontology-endpoint - summary: Delete ontology - description: Deletes an ontology with given id. Requires role `delete-ontology`. - operationId: delete - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: - '202': - description: Deleted ontology successfully - content: - application/json: {} - '404': - description: Could not find ontology - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - security: - - bearerAuth: [] - - basicAuth: [] - '/api/message/{messageId}': - put: - tags: - - message-endpoint - summary: Update message - description: Updates a message with id. Requires role `update-maintenance-message`. - operationId: update_1 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/BannerMessageUpdateDto' - required: true - responses: - '202': - description: Updated message - content: - application/json: - schema: - $ref: '#/components/schemas/BannerMessageBriefDto' - '404': - description: Could not find message + $ref: '#/components/schemas/BannerMessageBriefDto' + '404': + description: Could not find message content: application/json: schema: @@ -2215,8 +2144,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Deleted message @@ -2243,8 +2172,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Found image @@ -2271,8 +2200,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -2308,8 +2237,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Deleted image successfully @@ -2330,14 +2259,14 @@ paths: description: >- Finds an identifier with id. The response format depends on the HTTP `Accept` header set on the request. - operationId: find_6 + operationId: find_7 parameters: - name: identifierId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: Accept in: header required: true @@ -2365,6 +2294,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '403': + description: Not allowed to view identifier + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '404': description: Identifier could not be found content: @@ -2416,8 +2351,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -2475,8 +2410,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Deleted identifier @@ -2521,8 +2456,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Published identifier @@ -2577,8 +2512,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -2631,48 +2566,23 @@ paths: - view-endpoint summary: Get view description: Gets a view with id in the metadata database. - operationId: find_7 + operationId: find_8 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Find view successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Type: - description: The JDBC connection type - style: simple - X-View: - description: The view internal name - style: simple - X-Database: - description: The database internal name - style: simple - X-Password: - description: The authentication password - style: simple - X-Host: - description: The database hostname - style: simple - X-Port: - description: The database port number - style: simple content: application/json: schema: @@ -2705,14 +2615,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -2770,14 +2680,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: viewId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Delete view successfully @@ -2836,27 +2746,17 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Find table successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Password: - description: The authentication password - style: simple content: application/json: schema: @@ -2873,18 +2773,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Failed to establish connection with broker service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to obtain queue information from broker service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' security: - bearerAuth: [] - basicAuth: [] @@ -2899,14 +2787,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -2967,14 +2855,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Delete table successfully @@ -3026,14 +2914,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Updated table statistics successfully @@ -3086,20 +2974,20 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: columnId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -3162,8 +3050,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -3225,8 +3113,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Refreshed database views metadata @@ -3276,8 +3164,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Refreshed database tables metadata @@ -3298,7 +3186,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' '404': - description: Failed to fin user/database in metadata database + description: Failed to find database in metadata database content: application/json: schema: @@ -3330,8 +3218,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: View of image was successful @@ -3364,8 +3252,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -3412,93 +3300,6 @@ paths: security: - bearerAuth: [] - basicAuth: [] - /api/user: - get: - tags: - - user-endpoint - summary: List users - description: >- - Lists users known to the metadata database. Internal users are omitted - from the result list. If the optional query parameter `username` is - present, the result list can be filtered by matching this exact - username. - operationId: findAll - parameters: - - name: username - in: query - required: false - schema: - type: string - responses: - '200': - description: List users - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/UserBriefDto' - post: - tags: - - user-endpoint - summary: Create user - description: >- - Creates a user in the auth service and metadata database. Requires that - no credentials are sent in the request. - operationId: create1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateUserDto' - required: true - responses: - '201': - description: Created user - content: - application/json: - schema: - $ref: '#/components/schemas/UserDto' - '400': - description: Parameters are not well-formed (likely email) - content: - application/json: {} - '403': - description: Internal authentication to the auth service is invalid - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '404': - description: Default role not found - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '409': - description: User with username already exists - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '417': - description: User with e-mail already exists - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Failed to create in auth service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to create in auth service - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' /api/ontology: get: tags: @@ -3522,7 +3323,7 @@ paths: description: >- Creates an ontology in the metadata database. Requires role `create-ontology`. - operationId: create_1 + operationId: create1 requestBody: content: application/json: @@ -3573,7 +3374,7 @@ paths: description: >- Creates a message in the metadata database. Requires role `create-maintenance-message`. - operationId: create_2 + operationId: create_11 requestBody: content: application/json: @@ -3613,7 +3414,7 @@ paths: description: >- Creates a container image in the metadata database. Requires role `create-image`. - operationId: create_3 + operationId: create_2 requestBody: content: application/json: @@ -3650,30 +3451,48 @@ paths: description: Lists all identifiers known to the metadata database operationId: findAll_4 parameters: + - name: type + in: query + required: false + schema: + type: string + enum: + - database + - subset + - table + - view + - name: status + in: query + required: false + schema: + type: string + enum: + - draft + - published - name: dbid in: query required: false schema: - type: integer - format: int64 + type: string + format: uuid - name: qid in: query required: false schema: - type: integer - format: int64 + type: string + format: uuid - name: vid in: query required: false schema: - type: integer - format: int64 + type: string + format: uuid - name: tid in: query required: false schema: - type: integer - format: int64 + type: string + format: uuid - name: Accept in: header required: true @@ -3693,12 +3512,6 @@ paths: type: array items: $ref: '#/components/schemas/LdDatasetDto' - '406': - description: 'Identifier could not be exported, the requested style is not known' - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' post: tags: - identifier-endpoint @@ -3708,7 +3521,7 @@ paths: can only be created for objects the user has at least *READ* access in the associated database (requires role `create-identifier`) or for any object in any database (requires role `create-foreign-identifier`). - operationId: create_4 + operationId: create_3 requestBody: content: application/json: @@ -3767,8 +3580,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Find views successfully @@ -3794,14 +3607,14 @@ paths: description: >- Creates a view. This can only be performed by the database owner. Requires role `create-database-view`. - operationId: create_6 + operationId: create_5 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -3833,6 +3646,12 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiErrorDto' + '409': + description: View exists with name + content: + application/json: + schema: + $ref: '#/components/schemas/ApiErrorDto' '423': description: Create view resulted in an invalid query statement content: @@ -3869,8 +3688,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: List tables @@ -3900,14 +3719,14 @@ paths: - table-endpoint summary: Create table description: Creates a table in the database with id. Requires role `create-table`. - operationId: create_7 + operationId: create_6 parameters: - name: databaseId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid requestBody: content: application/json: @@ -3990,7 +3809,7 @@ paths: description: >- Creates a container in the metadata database. Requires role `create-container`. - operationId: create_9 + operationId: create_8 requestBody: content: application/json: @@ -4031,6 +3850,32 @@ paths: security: - bearerAuth: [] - basicAuth: [] + /api/user: + get: + tags: + - user-endpoint + summary: List users + description: >- + Lists users known to the metadata database. Internal users are omitted + from the result list. If the optional query parameter `username` is + present, the result list can be filtered by matching this exact + username. + operationId: findAll + parameters: + - name: username + in: query + required: false + schema: + type: string + responses: + '200': + description: List users + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserBriefDto' /api/unit: get: tags: @@ -4055,14 +3900,14 @@ paths: description: >- Finds semantic entities by label or uri in an ontology with id. Requires role `execute-semantic-query`. - operationId: find_4 + operationId: find_5 parameters: - name: ontologyId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: label in: query required: false @@ -4134,14 +3979,14 @@ paths: - message-endpoint summary: Find message description: Finds a message with id in the metadata database. - operationId: find_5 + operationId: find_6 parameters: - name: messageId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Get messages @@ -4211,8 +4056,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Database found successfully @@ -4237,19 +4082,7 @@ paths: schema: $ref: '#/components/schemas/ApiErrorDto' '404': - description: 'Database, user or exchange could not be found' - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '502': - description: Connection to the broker service could not be established - content: - application/json: - schema: - $ref: '#/components/schemas/ApiErrorDto' - '503': - description: Failed to find queue information in broker service + description: Database could not be found content: application/json: schema: @@ -4271,14 +4104,14 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Suggested table semantics successfully @@ -4333,20 +4166,20 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: tableId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid - name: columnId in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Suggested table column semantics successfully @@ -4389,8 +4222,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '200': description: Found container @@ -4417,8 +4250,8 @@ paths: in: path required: true schema: - type: integer - format: int64 + type: string + format: uuid responses: '202': description: Deleted container @@ -4826,9 +4659,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 11 + type: string + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 affiliation: type: string example: Brown University @@ -4866,6 +4699,7 @@ components: required: - creators - database_id + - descriptions - id - owned_by - publication_year @@ -4876,9 +4710,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec type: type: string example: database @@ -4895,6 +4729,10 @@ components: type: array items: $ref: '#/components/schemas/IdentifierTitleDto' + descriptions: + type: array + items: + $ref: '#/components/schemas/IdentifierDescriptionDto' doi: type: string example: 10.1038/nphys1170 @@ -4908,21 +4746,18 @@ components: - draft - published database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc query_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid view_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid publication_year: type: integer format: int32 @@ -4931,18 +4766,18 @@ components: type: string format: uuid example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 - IdentifierTitleDto: + IdentifierDescriptionDto: required: - id type: object properties: id: - type: integer - format: int64 - example: 4 - title: type: string - example: Airquality Demonstrator + format: uuid + example: e0e9692c-910b-4b60-b53a-fc7c358a917d + description: + type: string + example: 'Air quality reports at Stephansplatz, Vienna' language: type: string example: en @@ -5133,298 +4968,297 @@ components: - zu type: type: string + example: Abstract enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle + - Abstract + - Methods + - SeriesInformation + - TableOfContents + - TechnicalInfo - Other - QueryDto: - required: - - database_id - - execution - - id - - identifiers - - is_persisted - - owner - - query - - query_hash - - query_normalized - type: object - properties: - id: - type: integer - format: int64 - example: 4 - owner: - $ref: '#/components/schemas/UserBriefDto' - execution: - type: string - format: date-time - example: '2021-03-12T15:26:21.000Z' - query: - type: string - example: SELECT `id` FROM `air_quality` - type: - type: string - example: query - enum: - - query - - view - identifiers: - type: array - items: - $ref: '#/components/schemas/IdentifierBriefDto' - database_id: - type: integer - format: int64 - example: 1 - query_normalized: - type: string - example: SELECT `id` FROM `air_quality` - query_hash: - type: string - example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 - is_persisted: - type: boolean - example: true - result_hash: - type: string - example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 - result_number: - type: integer - format: int64 - example: 1 - UserBriefDto: + IdentifierTitleDto: required: - id - - username type: object properties: id: type: string format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - username: - type: string - description: Only contains lowercase characters - example: jcarberry - name: - type: string - example: Josiah Carberry - orcid: - type: string - example: 0000-0002-1825-0097 - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry - TupleDto: - required: - - data - type: object - properties: - data: - type: object - additionalProperties: - type: object - example: - key: value - example: - key: value - ImportDto: - required: - - header - - location - - separator - type: object - properties: - location: + example: 70ce5164-fd74-413f-8712-f996b91defbf + title: type: string - example: file.csv - header: - type: boolean - description: >- - If true, the first line contains the column names, otherwise it - contains only data - example: true - separator: + example: Airquality Demonstrator + language: type: string - example: ',' - quote: - type: string - example: '"' - line_termination: + example: en + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - 'no' + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + type: type: string - example: \r\n - ExecuteStatementDto: + enum: + - AlternativeTitle + - Subtitle + - TranslatedTitle + - Other + QueryDto: required: - - statement + - database_id + - execution + - id + - identifiers + - is_persisted + - owner + - query + - query_hash + - query_normalized type: object properties: - statement: + id: type: string - example: SELECT `id` FROM `air_quality` - TableHistoryDto: - required: - - event - - timestamp - - total - type: object - properties: - timestamp: + format: uuid + example: 83ea2326-f8f6-4263-baf8-cdf88a54efc7 + owner: + $ref: '#/components/schemas/UserBriefDto' + execution: type: string format: date-time example: '2021-03-12T15:26:21.000Z' - event: + query: type: string - total: + example: SELECT `id` FROM `air_quality` + type: + type: string + example: query + enum: + - query + - view + identifiers: + type: array + items: + $ref: '#/components/schemas/IdentifierBriefDto' + database_id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + query_normalized: + type: string + example: SELECT `id` FROM `air_quality` + query_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + is_persisted: + type: boolean + example: true + result_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_number: type: integer format: int64 example: 1 - TupleDeleteDto: + UserBriefDto: required: - - keys - type: object - properties: - keys: - type: object - additionalProperties: - type: object - example: - id: 1 - example: - id: 1 - DatabaseBriefDto: - required: - - contact - - id - - identifiers - - internal_name - - is_public - - is_schema_public - - name - - owner_id - type: object - properties: - id: - type: integer - format: int64 - example: 3 - name: - type: string - example: Air Quality - description: - type: string - example: Air Quality - identifiers: - type: array - items: - $ref: '#/components/schemas/IdentifierBriefDto' - contact: - $ref: '#/components/schemas/UserBriefDto' - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - owner_id: - type: string - format: uuid - example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 - preview_image: - type: string - DatabaseAccessDto: - required: - - type - - user - type: object - properties: - user: - $ref: '#/components/schemas/UserBriefDto' - type: - type: string - example: read - enum: - - read - - write_own - - write_all - UserUpdateDto: - required: - - language - - theme - type: object - properties: - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Brown University - orcid: - type: string - example: 0000-0002-1825-0097 - theme: - type: string - example: dark - language: - type: string - example: en - UserAttributesDto: - required: - - language - - theme - type: object - properties: - theme: - type: string - example: light - orcid: - type: string - example: 'https://orcid.org/0000-0002-1825-0097' - affiliation: - type: string - example: Brown University - language: - type: string - example: en - UserDto: - required: - - attributes - - id - - password - - username + - id + - username type: object properties: id: type: string format: uuid example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - name: - type: string - example: Josiah Carberry username: type: string - example: username - password: + description: Only contains lowercase characters + example: jcarberry + name: type: string - example: p4ssw0rd - attributes: - $ref: '#/components/schemas/UserAttributesDto' - last_retrieved: + example: Josiah Carberry + orcid: type: string - format: date-time + example: 0000-0002-1825-0097 qualified_name: type: string example: Josiah Carberry — @jcarberry @@ -5434,356 +5268,122 @@ components: family_name: type: string example: Carberry - UserPasswordDto: + CreatorDto: required: - - password + - creator_name + - id type: object properties: - password: + id: type: string - RefreshTokenRequestDto: - required: - - refresh_token - type: object - properties: - refresh_token: + format: uuid + example: e41f94a6-2b94-4a12-ac0e-678684e1c070 + firstname: type: string - example: refresh_token - TokenDto: - required: - - access_token - - expires_in - - id_token - - not-before-policy - - refresh_expires_in - - refresh_token - - scope - - session_state - - token_type - type: object - properties: - scope: + example: Josiah + lastname: type: string - access_token: + example: Carberry + affiliation: type: string - expires_in: - type: integer - format: int64 - refresh_token: + example: Brown University + creator_name: type: string - refresh_expires_in: - type: integer - format: int64 - id_token: + example: 'Carberry, Josiah' + name_type: type: string - session_state: + example: Personal + enum: + - Personal + - Organizational + name_identifier: type: string - token_type: + example: 0000-0002-1825-0097 + name_identifier_scheme: type: string - not-before-policy: - type: integer - format: int64 - OntologyModifyDto: - required: - - prefix - - uri - type: object - properties: - uri: + example: ORCID + enum: + - ORCID + - ROR + - ISNI + - GRID + name_identifier_scheme_uri: type: string - example: Ontology URI - prefix: + example: 'https://orcid.org/' + affiliation_identifier: type: string - example: Ontology prefix - sparql_endpoint: + example: 'https://ror.org/05gq02987' + affiliation_identifier_scheme: type: string - example: Ontology SPARQL endpoint - rdf_path: + example: ROR + enum: + - ROR + - GRID + - ISNI + affiliation_identifier_scheme_uri: type: string - example: rdf/om-2.0.rdf - OntologyDto: + example: 'https://ror.org/' + IdentifierDto: required: + - creators + - database_id + - descriptions + - funders - id - - prefix - - rdf - - sparql - - uri + - language + - licenses + - owner + - publication_year + - publisher + - query + - query_hash + - query_normalized + - status + - titles + - type type: object properties: id: - type: integer - format: int64 - uri: - type: string - example: 'http://www.wikidata.org/' - prefix: - type: string - example: wd - sparql: - type: boolean - example: true - rdf: - type: boolean - example: false - uri_pattern: - type: string - example: 'http://www.wikidata.org/entity/.*' - sparql_endpoint: - type: string - example: 'https://query.wikidata.org/sparql' - rdf_path: type: string - example: rdf/om-2.0.rdf - BannerMessageUpdateDto: - required: - - message - - type - type: object - properties: + format: uuid + example: b97cd56b-66ca-4354-9e6c-f47210cfaaec type: type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: 'https://example.com' - link_text: - type: string - example: More - display_start: - type: string - format: date-time - example: '2021-03-12T15:26:21.000Z' - display_end: - type: string - format: date-time - example: '2021-03-12T15:26:21.000Z' - BannerMessageBriefDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: 'https://example.com' - link_text: - type: string - example: More - ImageChangeDto: - required: - - dialect - - driver_class - - jdbc_method - - registry - type: object - properties: - registry: - type: string - example: docker.io/library - defaultPort: - maximum: 65535 - minimum: 1024 - type: integer - format: int32 - example: 5432 - dialect: - type: string - example: Postgres - driver_class: - type: string - example: org.postgresql.Driver - jdbc_method: - type: string - example: postgresql - DataTypeDto: - required: - - display_name - - documentation - - is_buildable - - is_quoted - - value - type: object - properties: - value: - type: string - example: time - documentation: - type: string - example: 'https://mariadb.com/kb/en/time/' - display_name: - type: string - example: TIME(fsp) - size_min: - type: integer - format: int32 - example: 0 - size_max: - type: integer - format: int32 - example: 6 - size_default: - type: integer - format: int32 - example: 0 - size_required: - type: boolean - example: false - d_min: - type: integer - format: int32 - d_max: - type: integer - format: int32 - d_default: - type: integer - format: int32 - d_required: - type: boolean - data_hint: - type: string - example: 'e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S' - type_hint: - type: string - example: 'fsp=microsecond precision, min. 0, max. 6' - is_quoted: - type: boolean - description: frontend needs to quote this data type - example: false - is_buildable: - type: boolean - description: frontend can build this data type - example: true - ImageDto: - required: - - data_types - - default - - default_port - - dialect - - driver_class - - id - - jdbc_method - - name - - operators - - registry - - version - type: object - properties: - id: - type: integer - format: int64 - example: 1 - registry: - type: string - example: docker.io/library - name: - type: string - example: mariadb - version: - type: string - example: '10.5' - dialect: - type: string - example: org.hibernate.dialect.MariaDBDialect - operators: - type: array - items: - $ref: '#/components/schemas/OperatorDto' - driver_class: - type: string - example: org.mariadb.jdbc.Driver - jdbc_method: - type: string - example: mariadb - default: - type: boolean - example: false - default_port: - type: integer - format: int32 - example: 3306 - data_types: - type: array - items: - $ref: '#/components/schemas/DataTypeDto' - OperatorDto: - required: - - display_name - - documentation - - value - type: object - properties: - id: - type: integer - format: int64 - value: - type: string - example: XOR - documentation: - type: string - example: 'https://mariadb.com/kb/en/xor/' - display_name: - type: string - example: XOR - IdentifierSaveDto: - required: - - creators - - database_id - - id - - publication_year - - publisher - - titles - - type - type: object - properties: - id: - type: integer - format: int64 - example: 1 - type: - type: string - example: database + example: database enum: - database - subset - table - view - doi: - type: string - example: 10.1111/11111111 titles: type: array items: - $ref: '#/components/schemas/SaveIdentifierTitleDto' + $ref: '#/components/schemas/IdentifierTitleDto' descriptions: type: array items: - $ref: '#/components/schemas/SaveIdentifierDescriptionDto' + $ref: '#/components/schemas/IdentifierDescriptionDto' funders: type: array items: - $ref: '#/components/schemas/SaveIdentifierFunderDto' - licenses: - type: array - items: - $ref: '#/components/schemas/LicenseDto' + $ref: '#/components/schemas/IdentifierFunderDto' + query: + type: string + example: >- + SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location` + = "09:STEF" + execution: + type: string + format: date-time + example: '2021-03-12T15:26:21.000Z' + doi: + type: string + example: 10.1038/nphys1170 publisher: type: string example: TU Wien + owner: + $ref: '#/components/schemas/UserBriefDto' language: type: string enum: @@ -5971,23 +5571,51 @@ components: - yo - za - zu + licenses: + type: array + items: + $ref: '#/components/schemas/LicenseDto' creators: type: array items: - $ref: '#/components/schemas/SaveIdentifierCreatorDto' + $ref: '#/components/schemas/CreatorDto' + status: + type: string + example: draft + enum: + - draft + - published database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid query_id: + type: string + format: uuid + table_id: + type: string + format: uuid + view_id: + type: string + format: uuid + query_normalized: + type: string + example: >- + SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location` + = "09:STEF" + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + example: 34fe82cda2c53f13f8d90cfd7a3469e3a939ff311add50dce30d9136397bf8e5 + result_number: type: integer format: int64 - view_id: - type: integer - format: int64 - table_id: - type: integer - format: int64 + example: 1 publication_day: type: integer format: int32 @@ -6000,10 +5628,40 @@ components: type: integer format: int32 example: 2022 - related_identifiers: - type: array - items: - $ref: '#/components/schemas/SaveRelatedIdentifierDto' + IdentifierFunderDto: + required: + - funder_name + - id + type: object + properties: + id: + type: string + format: uuid + example: 39693413-e0ce-46da-ad5e-029c0556d439 + funder_name: + type: string + example: European Commission + funder_identifier: + type: string + example: 'http://doi.org/10.13039/501100000780' + funder_identifier_type: + type: string + example: Crossref Funder ID + enum: + - Crossref Funder ID + - ROR + - GND + - ISNI + - Other + scheme_uri: + type: string + example: 'http://doi.org/' + award_number: + type: string + example: '824087' + award_title: + type: string + example: EOSC-Life LicenseDto: required: - identifier @@ -6023,316 +5681,791 @@ components: preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code. - SaveIdentifierCreatorDto: + RelatedIdentifierDto: required: - - creator_name - id + - relation + - type + - value type: object properties: id: - type: integer - format: int64 - example: 1 - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Wesleyan University - creator_name: - type: string - example: 'Carberry, Josiah' - name_type: type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: + format: uuid + example: ce9d11f0-60a2-448d-a3e4-44719a443e8a + value: type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: + example: 10.70124/dc4zh-9ce78 + type: type: string - example: ORCID + example: DOI enum: - - ORCID - - ROR - - ISNI - - GRID - affiliation_identifier: - type: string - example: 'https://ror.org/04d836q62' - affiliation_identifier_scheme: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: type: string - example: ROR + example: Cites enum: - - ROR - - GRID - - ISNI - SaveIdentifierDescriptionDto: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + ViewColumnDto: required: - - description + - database_id - id + - internal_name + - is_null_allowed + - name + - ord + - type type: object properties: id: + type: string + format: uuid + example: 6aec3a91-2e0b-4e92-a16a-9c3c5e892da1 + name: + maxLength: 64 + minLength: 0 + type: string + example: Given Name + size: type: integer format: int64 - example: 1 + example: 255 + d: + type: integer + format: int64 + example: 0 description: + maxLength: 2048 + minLength: 0 type: string - example: 'Air quality reports at Stephansplatz, Vienna' - language: + example: Column comment + database_id: type: string - example: en + format: uuid + example: 2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4 + ord: + type: integer + format: int32 + example: 0 + internal_name: + maxLength: 64 + minLength: 0 + type: string + example: given_name + index_length: + type: integer + format: int64 + example: 255 + length: + type: integer + format: int64 + example: 255 + type: + type: string + example: varchar enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - 'no' - - nb - - nn - - ii - - oc - - oj + - char + - varchar + - binary + - varbinary + - tinyblob + - tinytext + - text + - blob + - mediumtext + - mediumblob + - longtext + - longblob + - enum + - set + - serial + - bit + - tinyint + - bool + - smallint + - mediumint + - int + - bigint + - float + - double + - decimal + - date + - datetime + - timestamp + - time + - year + is_null_allowed: + type: boolean + example: false + ViewDto: + required: + - columns + - database_id + - id + - identifiers + - internal_name + - name + - owner + - query + - query_hash + type: object + properties: + id: + type: string + format: uuid + example: 787439d0-e85e-400c-a7e6-996a023bfad9 + name: + type: string + example: Air Quality + identifiers: + type: array + items: + $ref: '#/components/schemas/IdentifierDto' + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + owner: + $ref: '#/components/schemas/UserBriefDto' + columns: + type: array + items: + $ref: '#/components/schemas/ViewColumnDto' + last_retrieved: + type: string + format: date-time + database_id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + is_schema_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + query_hash: + type: string + example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 + TupleDto: + required: + - data + type: object + properties: + data: + type: object + additionalProperties: + type: object + example: + key: value + example: + key: value + ImportDto: + required: + - header + - location + - separator + type: object + properties: + location: + type: string + example: file.csv + header: + type: boolean + description: >- + If true, the first line contains the column names, otherwise it + contains only data + example: true + separator: + type: string + example: ',' + quote: + type: string + example: '"' + line_termination: + type: string + example: \r\n + FilterDto: + required: + - column_id + - operator_id + - type + - value + type: object + properties: + type: + type: string + example: where + enum: + - where - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu + - and + value: + type: string + example: '1' + column_id: + type: string + format: uuid + example: 14128033-54b5-4818-a489-21b0dded86e2 + operator_id: + type: string + format: uuid + example: 67c5b54d-2eb0-4f42-8dc1-a504562e9f32 + OrderDto: + required: + - column_id + type: object + properties: + direction: + type: string + example: asc + enum: + - asc + - desc + column_id: + type: string + format: uuid + example: e891ba86-0258-41a6-a8d9-ff58bc10b618 + SubsetDto: + required: + - columns + - table_id + type: object + properties: + columns: + type: array + example: + - e891ba86-0258-41a6-a8d9-ff58bc10b618 + items: + type: string + format: uuid + filter: + type: array + items: + $ref: '#/components/schemas/FilterDto' + order: + type: array + items: + $ref: '#/components/schemas/OrderDto' + table_id: + type: string + format: uuid + example: f7df2a7d-4ade-4c78-97b0-7c744d0893c7 + TableHistoryDto: + required: + - event + - timestamp + - total + type: object + properties: + timestamp: + type: string + format: date-time + example: '2021-03-12T15:26:21.000Z' + event: + type: string + example: INSERT + enum: + - insert + - delete + total: + type: integer + format: int64 + example: 1 + TupleDeleteDto: + required: + - keys + type: object + properties: + keys: + type: object + additionalProperties: + type: object + example: + id: 1 + example: + id: 1 + UserAttributesDto: + required: + - language + - theme + type: object + properties: + theme: + type: string + example: light + orcid: + type: string + example: 'https://orcid.org/0000-0002-1825-0097' + affiliation: + type: string + example: Brown University + language: + type: string + example: en + UserDto: + required: + - attributes + - id + - password + - username + type: object + properties: + id: + type: string + format: uuid + example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 + name: + type: string + example: Josiah Carberry + username: + type: string + example: username + password: + type: string + example: p4ssw0rd + attributes: + $ref: '#/components/schemas/UserAttributesDto' + last_retrieved: + type: string + format: date-time + qualified_name: + type: string + example: Josiah Carberry — @jcarberry + given_name: + type: string + example: Josiah + family_name: + type: string + example: Carberry + DatabaseBriefDto: + required: + - contact + - id + - identifiers + - internal_name + - is_public + - is_schema_public + - name + - owner_id + type: object + properties: + id: + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality + identifiers: + type: array + items: + $ref: '#/components/schemas/IdentifierBriefDto' + contact: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + is_public: + type: boolean + example: true + is_schema_public: + type: boolean + example: true + owner_id: + type: string + format: uuid + example: 2f45ef7a-7f9b-4667-9156-152c87fe1ca5 + preview_image: + type: string + DatabaseAccessDto: + required: + - type + - user + type: object + properties: + user: + $ref: '#/components/schemas/UserBriefDto' + type: + type: string + example: read + enum: + - read + - write_own + - write_all + UserUpdateDto: + required: + - language + - theme + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + theme: + type: string + example: dark + language: + type: string + example: en + OntologyModifyDto: + required: + - prefix + - uri + type: object + properties: + uri: + type: string + example: Ontology URI + prefix: + type: string + example: Ontology prefix + sparql_endpoint: + type: string + example: Ontology SPARQL endpoint + rdf_path: + type: string + example: rdf/om-2.0.rdf + OntologyDto: + required: + - id + - prefix + - rdf + - sparql + - uri + type: object + properties: + id: + type: string + format: uuid + example: 7c491e40-082a-47b8-b82c-51d03c520466 + uri: + type: string + example: 'http://www.wikidata.org/' + prefix: + type: string + example: wd + sparql: + type: boolean + example: true + rdf: + type: boolean + example: false + uri_pattern: + type: string + example: 'http://www.wikidata.org/entity/.*' + sparql_endpoint: + type: string + example: 'https://query.wikidata.org/sparql' + rdf_path: + type: string + example: rdf/om-2.0.rdf + BannerMessageUpdateDto: + required: + - message + - type + type: object + properties: + type: + type: string + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: 'https://example.com' + link_text: + type: string + example: More + display_start: + type: string + format: date-time + example: '2021-03-12T15:26:21.000Z' + display_end: + type: string + format: date-time + example: '2021-03-12T15:26:21.000Z' + BannerMessageBriefDto: + required: + - message + - type + type: object + properties: type: type: string - example: Abstract - enum: - - Abstract - - Methods - - SeriesInformation - - TableOfContents - - TechnicalInfo - - Other - SaveIdentifierFunderDto: + enum: + - error + - warning + - info + message: + type: string + example: Maintenance starts on 8am on Monday + link: + type: string + example: 'https://example.com' + link_text: + type: string + example: More + ImageChangeDto: + required: + - dialect + - driver_class + - jdbc_method + - registry + type: object + properties: + registry: + type: string + example: docker.io/library + defaultPort: + maximum: 65535 + minimum: 1024 + type: integer + format: int32 + example: 5432 + dialect: + type: string + example: Postgres + driver_class: + type: string + example: org.postgresql.Driver + jdbc_method: + type: string + example: postgresql + DataTypeDto: + required: + - display_name + - documentation + - id + - is_buildable + - is_quoted + - value + type: object + properties: + id: + type: string + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcca + value: + type: string + example: time + documentation: + type: string + example: 'https://mariadb.com/kb/en/time/' + display_name: + type: string + example: TIME(fsp) + size_min: + type: integer + format: int32 + example: 0 + size_max: + type: integer + format: int32 + example: 6 + size_default: + type: integer + format: int32 + example: 0 + size_required: + type: boolean + example: false + d_min: + type: integer + format: int32 + d_max: + type: integer + format: int32 + d_default: + type: integer + format: int32 + d_required: + type: boolean + data_hint: + type: string + example: 'e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S' + type_hint: + type: string + example: 'fsp=microsecond precision, min. 0, max. 6' + is_quoted: + type: boolean + description: frontend needs to quote this data type + example: false + is_buildable: + type: boolean + description: frontend can build this data type + example: true + ImageDto: required: - - funder_name + - data_types + - default - id + - name + - operators + - version type: object properties: id: - type: integer - format: int64 - example: 1 - funder_name: type: string - example: European Commission - funder_identifier: + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcce + name: type: string - example: 'http://doi.org/10.13039/501100000780' - funder_identifier_type: + example: mariadb + version: type: string - example: Crossref Funder ID - enum: - - Crossref Funder ID - - ROR - - GND - - ISNI - - Other - scheme_uri: + example: '10.5' + operators: + type: array + items: + $ref: '#/components/schemas/OperatorDto' + default: + type: boolean + example: false + data_types: + type: array + items: + $ref: '#/components/schemas/DataTypeDto' + OperatorDto: + required: + - display_name + - documentation + - id + - value + type: object + properties: + id: type: string - example: 'http://doi.org/' - award_number: + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dccf + value: type: string - example: '824087' - award_title: + example: XOR + documentation: type: string - example: EOSC-Life - SaveIdentifierTitleDto: + example: 'https://mariadb.com/kb/en/xor/' + display_name: + type: string + example: XOR + IdentifierSaveDto: required: + - creators + - database_id - id - - title + - publication_year + - publisher + - titles + - type type: object properties: id: - type: integer - format: int64 - example: 1 - title: type: string - example: Airquality Demonstrator + format: uuid + example: 68e11675-1e0f-4d24-a6d9-887ad1c4445d + type: + type: string + example: database + enum: + - database + - subset + - table + - view + doi: + type: string + example: 10.1111/11111111 + titles: + type: array + items: + $ref: '#/components/schemas/SaveIdentifierTitleDto' + descriptions: + type: array + items: + $ref: '#/components/schemas/SaveIdentifierDescriptionDto' + funders: + type: array + items: + $ref: '#/components/schemas/SaveIdentifierFunderDto' + licenses: + type: array + items: + $ref: '#/components/schemas/LicenseDto' + publisher: + type: string + example: TU Wien language: type: string - example: en enum: - ab - aa @@ -6518,99 +6651,48 @@ components: - yo - za - zu - type: + creators: + type: array + items: + $ref: '#/components/schemas/SaveIdentifierCreatorDto' + database_id: type: string - example: Subtitle - enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle - - Other - SaveRelatedIdentifierDto: - required: - - id - - relation - - type - - value - type: object - properties: - id: - type: integer - format: int64 - example: 1 - value: + format: uuid + query_id: type: string - example: 10.70124/dc4zh-9ce78 - type: + format: uuid + view_id: type: string - example: DOI - enum: - - DOI - - URL - - URN - - ARK - - arXiv - - bibcode - - EAN13 - - EISSN - - Handle - - IGSN - - ISBN - - ISTC - - LISSN - - LSID - - PMID - - PURL - - UPC - - w3id - relation: + format: uuid + table_id: type: string - example: Cites - enum: - - IsCitedBy - - Cites - - IsSupplementTo - - IsSupplementedBy - - IsContinuedBy - - Continues - - IsDescribedBy - - Describes - - HasMetadata - - IsMetadataFor - - HasVersion - - IsVersionOf - - IsNewVersionOf - - IsPreviousVersionOf - - IsPartOf - - HasPart - - IsPublishedIn - - IsReferencedBy - - References - - IsDocumentedBy - - Documents - - IsCompiledBy - - Compiles - - IsVariantFormOf - - IsOriginalFormOf - - IsIdenticalTo - - IsReviewedBy - - Reviews - - IsDerivedFrom - - IsSourceOf - - IsRequiredBy - - Requires - - IsObsoletedBy - - Obsoletes - CreatorDto: + format: uuid + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + related_identifiers: + type: array + items: + $ref: '#/components/schemas/SaveRelatedIdentifierDto' + SaveIdentifierCreatorDto: required: - creator_name - id type: object properties: id: - type: integer - format: int64 - example: 11 + type: string + format: uuid + example: da9dd034-00a8-4517-b93d-d1b2adfee418 firstname: type: string example: Josiah @@ -6619,7 +6701,7 @@ components: example: Carberry affiliation: type: string - example: Brown University + example: Wesleyan University creator_name: type: string example: 'Carberry, Josiah' @@ -6640,12 +6722,9 @@ components: - ROR - ISNI - GRID - name_identifier_scheme_uri: - type: string - example: 'https://orcid.org/' affiliation_identifier: type: string - example: 'https://ror.org/05gq02987' + example: 'https://ror.org/04d836q62' affiliation_identifier_scheme: type: string example: ROR @@ -6653,18 +6732,16 @@ components: - ROR - GRID - ISNI - affiliation_identifier_scheme_uri: - type: string - example: 'https://ror.org/' - IdentifierDescriptionDto: + SaveIdentifierDescriptionDto: required: + - description - id type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: 35bd84d8-b181-43c8-b786-4d024e4f843c description: type: string example: 'Air quality reports at Stephansplatz, Vienna' @@ -6866,69 +6943,56 @@ components: - TableOfContents - TechnicalInfo - Other - IdentifierDto: + SaveIdentifierFunderDto: required: - - creators - - database_id - - descriptions - - funders + - funder_name - id - - language - - licenses - - owner - - publication_year - - publisher - - query - - query_hash - - query_normalized - - status - - titles - - type type: object properties: id: - type: integer - format: int64 - example: 2 - type: type: string - example: database + format: uuid + example: 1c6b9212-a315-44b9-946c-3682a7a0e517 + funder_name: + type: string + example: European Commission + funder_identifier: + type: string + example: 'http://doi.org/10.13039/501100000780' + funder_identifier_type: + type: string + example: Crossref Funder ID enum: - - database - - subset - - table - - view - titles: - type: array - items: - $ref: '#/components/schemas/IdentifierTitleDto' - descriptions: - type: array - items: - $ref: '#/components/schemas/IdentifierDescriptionDto' - funders: - type: array - items: - $ref: '#/components/schemas/IdentifierFunderDto' - query: + - Crossref Funder ID + - ROR + - GND + - ISNI + - Other + scheme_uri: type: string - example: >- - SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location` - = "09:STEF" - execution: + example: 'http://doi.org/' + award_number: type: string - format: date-time - example: '2021-03-12T15:26:21.000Z' - doi: + example: '824087' + award_title: type: string - example: 10.1038/nphys1170 - publisher: + example: EOSC-Life + SaveIdentifierTitleDto: + required: + - id + - title + type: object + properties: + id: type: string - example: TU Wien - owner: - $ref: '#/components/schemas/UserBriefDto' + format: uuid + example: 2af9f40e-eaf5-4ea1-861a-1a696587bf29 + title: + type: string + example: Airquality Demonstrator language: type: string + example: en enum: - ab - aa @@ -7057,159 +7121,72 @@ components: - os - pi - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - licenses: - type: array - items: - $ref: '#/components/schemas/LicenseDto' - creators: - type: array - items: - $ref: '#/components/schemas/CreatorDto' - status: - type: string - example: draft - enum: - - draft - - published - database_id: - type: integer - format: int64 - example: 1 - query_id: - type: integer - format: int64 - example: 1 - table_id: - type: integer - format: int64 - example: 1 - view_id: - type: integer - format: int64 - example: 1 - query_normalized: - type: string - example: >- - SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location` - = "09:STEF" - related_identifiers: - type: array - items: - $ref: '#/components/schemas/RelatedIdentifierDto' - query_hash: - type: string - description: query hash in sha512 - result_hash: - type: string - example: 34fe82cda2c53f13f8d90cfd7a3469e3a939ff311add50dce30d9136397bf8e5 - result_number: - type: integer - format: int64 - example: 1 - publication_day: - type: integer - format: int32 - example: 15 - publication_month: - type: integer - format: int32 - example: 12 - publication_year: - type: integer - format: int32 - example: 2022 - IdentifierFunderDto: - required: - - funder_name - - id - type: object - properties: - id: - type: integer - format: int64 - example: 2 - funder_name: - type: string - example: European Commission - funder_identifier: - type: string - example: 'http://doi.org/10.13039/501100000780' - funder_identifier_type: + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + type: type: string - example: Crossref Funder ID + example: Subtitle enum: - - Crossref Funder ID - - ROR - - GND - - ISNI + - AlternativeTitle + - Subtitle + - TranslatedTitle - Other - scheme_uri: - type: string - example: 'http://doi.org/' - award_number: - type: string - example: '824087' - award_title: - type: string - example: EOSC-Life - RelatedIdentifierDto: + SaveRelatedIdentifierDto: required: - id - relation @@ -7218,9 +7195,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: 5bb272c7-7421-4f74-83ac-0486812d0f44 value: type: string example: 10.70124/dc4zh-9ce78 @@ -7319,9 +7296,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 787439d0-e85e-400c-a7e6-996a023bfad9 name: type: string example: Air Quality @@ -7329,9 +7306,9 @@ components: type: string example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4 internal_name: type: string example: air_quality @@ -7382,9 +7359,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: 41ed10e0-687b-4e18-8521-810f5cffbce1 name: type: string example: Air Quality @@ -7392,9 +7369,9 @@ components: type: string example: Air Quality in Austria database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: a8fec026-dfaf-4b1d-8f6c-f01720d91705 internal_name: type: string example: air_quality @@ -7431,9 +7408,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: a453e444-e00d-41ca-902c-11e9c54b39f1 name: maxLength: 64 minLength: 0 @@ -7467,26 +7444,20 @@ components: example: Column comment enums: type: array - example: - - val1 items: - type: string - example: '["val1"]' + $ref: '#/components/schemas/EnumDto' sets: type: array - example: - - val1 items: - type: string - example: '["val1"]' + $ref: '#/components/schemas/SetDto' database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: 911f9052-c58c-4e1c-b3f2-66af2107be16 table_id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: bfffa915-a547-4466-9c65-ddc0d38fdb08 ord: type: integer format: int32 @@ -7569,9 +7540,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 23 + type: string + format: uuid + example: 8cabc011-4bdf-44d4-9d33-b2648e2ddbf1 uri: type: string example: 'http://www.wikidata.org/entity/Q202444' @@ -7583,6 +7554,32 @@ components: example: >- name typically used to differentiate people from the same family, clan, or other social group who have a common last name + EnumDto: + required: + - id + - value + type: object + properties: + id: + type: string + format: uuid + example: 5343bb3d-14d3-4eb7-a86f-b8fc553cb315 + value: + type: string + example: '3' + SetDto: + required: + - id + - value + type: object + properties: + id: + type: string + format: uuid + example: 7eb4eded-bacc-4a91-84db-a9ae6ddafda7 + value: + type: string + example: '3' UnitBriefDto: required: - id @@ -7590,9 +7587,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 34 + type: string + format: uuid + example: ba1935e8-6817-488f-af0a-f54389af9000 uri: type: string example: 'http://www.wikidata.org/entity/Q1422583' @@ -7627,33 +7624,6 @@ components: - read - write_own - write_all - CreateUserDto: - required: - - email - - password - - username - type: object - properties: - username: - pattern: '^[a-z0-9]{3,}$' - type: string - example: user - email: - type: string - example: user@example.com - password: - type: string - LoginRequestDto: - required: - - password - - username - type: object - properties: - username: - type: string - example: user - password: - type: string OntologyCreateDto: required: - prefix @@ -7964,18 +7934,18 @@ components: items: $ref: '#/components/schemas/SaveIdentifierCreatorDto' database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: d002e8d5-8db4-4ff7-ab3a-bc3f52d9ec44 query_id: - type: integer - format: int64 + type: string + format: uuid view_id: - type: integer - format: int64 + type: string + format: uuid table_id: - type: integer - format: int64 + type: string + format: uuid publication_day: type: integer format: int32 @@ -8004,9 +7974,9 @@ components: type: string example: Air Quality container_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 0888e108-d521-46e2-9d3e-82099185305b is_public: type: boolean example: true @@ -8027,8 +7997,7 @@ components: type: string example: Air Quality query: - type: string - example: SELECT `id` FROM `air_quality` + $ref: '#/components/schemas/SubsetDto' is_public: type: boolean example: true @@ -8044,16 +8013,24 @@ components: properties: columns: type: array + example: + - id items: type: string + example: '["id"]' referenced_table: type: string + example: sensor referenced_columns: type: array + example: + - other_id items: type: string + example: '["other_id"]' on_update: type: string + example: cascade enum: - restrict - cascade @@ -8062,6 +8039,7 @@ components: - set_default on_delete: type: string + example: cascade enum: - restrict - cascade @@ -8080,7 +8058,7 @@ components: example: Date type: type: string - example: string + example: varchar enum: - char - varchar @@ -8233,10 +8211,10 @@ components: format: int64 example: 50 image_id: - type: integer + type: string description: Image ID - format: int64 - example: 1 + format: uuid + example: 2360f3c4-85e0-4fac-a7c6-73b296b9dde2 ui_host: type: string example: example.com @@ -8259,23 +8237,15 @@ components: - image - internal_name - name - - quota type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 7ddb7e87-b965-43a2-9a24-4fa406d998f4 name: type: string example: Air Quality - host: - type: string - example: data-db - port: - type: integer - format: int32 - example: 3306 image: $ref: '#/components/schemas/ImageDto' quota: @@ -8298,13 +8268,6 @@ components: internal_name: type: string example: air_quality - ui_host: - type: string - example: example.com - ui_port: - type: integer - format: int32 - example: 3306 ColumnBriefDto: required: - database_id @@ -8316,9 +8279,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: a453e444-e00d-41ca-902c-11e9c54b39f1 name: maxLength: 64 minLength: 0 @@ -8328,13 +8291,13 @@ components: type: string example: firstname database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: 911f9052-c58c-4e1c-b3f2-66af2107be16 table_id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: bfffa915-a547-4466-9c65-ddc0d38fdb08 internal_name: maxLength: 64 minLength: 0 @@ -8382,8 +8345,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: ba1935e8-6817-488f-af0a-f54389af9000 uri: type: string name: @@ -8404,8 +8368,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: 7c491e40-082a-47b8-b82c-51d03c520466 uri: type: string example: 'http://www.wikidata.org/' @@ -8449,14 +8414,14 @@ components: type: string resumptionToken: type: string + parametersString: + type: string fromDate: type: string format: date-time untilDate: type: string format: date-time - parametersString: - type: string BannerMessageDto: required: - id @@ -8465,10 +8430,12 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: ae3f795b-a3da-4ebe-bdc4-21a8ce631e6f type: type: string + example: WARNING enum: - error - warning @@ -8494,24 +8461,20 @@ components: required: - default - id - - jdbc_method - name - version type: object properties: id: - type: integer - format: int64 - example: 5 + type: string + format: uuid + example: 816f55d5-1098-4f60-a4af-c8121c04dcce name: type: string example: mariadb version: type: string - example: '10.5' - jdbc_method: - type: string - example: mariadb + example: '10.5' default: type: boolean example: false @@ -8601,86 +8564,13 @@ components: type: array items: $ref: '#/components/schemas/PrimaryKeyDto' - DatabaseDto: - required: - - accesses - - contact - - exchange_name - - id - - identifiers - - internal_name - - is_public - - is_schema_public - - name - - owner - - subsets - - tables - - views - type: object - properties: - id: - type: integer - format: int64 - example: 3 - name: - type: string - example: Air Quality - description: - type: string - example: Air Quality - tables: - type: array - items: - $ref: '#/components/schemas/TableDto' - views: - type: array - items: - $ref: '#/components/schemas/ViewDto' - container: - $ref: '#/components/schemas/ContainerDto' - accesses: - type: array - items: - $ref: '#/components/schemas/DatabaseAccessDto' - identifiers: - type: array - items: - $ref: '#/components/schemas/IdentifierDto' - subsets: - type: array - items: - $ref: '#/components/schemas/IdentifierDto' - contact: - $ref: '#/components/schemas/UserBriefDto' - owner: - $ref: '#/components/schemas/UserBriefDto' - last_retrieved: - type: string - format: date-time - exchange_name: - type: string - example: dbrepo - exchange_type: - type: string - example: topic - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - preview_image: - type: string ForeignKeyBriefDto: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a ForeignKeyDto: required: - name @@ -8690,9 +8580,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a name: type: string example: fk_name @@ -8730,9 +8620,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: f2b740ec-0b13-4d07-88a9-529d354bba6a column: $ref: '#/components/schemas/ColumnBriefDto' foreign_key: @@ -8746,9 +8636,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 8 + type: string + format: uuid + example: d984f9d7-e8a7-4b81-b59a-862db1871f18 table: $ref: '#/components/schemas/TableBriefDto' column: @@ -8770,9 +8660,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 3 + type: string + format: uuid + example: d346f844-b84c-490f-9aec-725a2dc8f820 name: type: string example: Air Quality @@ -8794,17 +8684,15 @@ components: type: array items: $ref: '#/components/schemas/ColumnDto' - database: - $ref: '#/components/schemas/DatabaseDto' constraints: $ref: '#/components/schemas/ConstraintsDto' last_retrieved: type: string format: date-time database_id: - type: integer - format: int64 - example: 2 + type: string + format: uuid + example: fc29f89c-86a8-4020-9e36-4d954736c6cc internal_name: type: string example: air_quality @@ -8854,9 +8742,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 5 + type: string + format: uuid + example: d984f9d7-e8a7-4b81-b59a-862db1871f13 name: type: string example: uk_name @@ -8866,155 +8754,6 @@ components: type: array items: $ref: '#/components/schemas/ColumnBriefDto' - ViewColumnDto: - required: - - database_id - - id - - internal_name - - is_null_allowed - - name - - ord - - type - type: object - properties: - id: - type: integer - format: int64 - example: 12 - name: - maxLength: 64 - minLength: 0 - type: string - example: Given Name - size: - type: integer - format: int64 - example: 255 - d: - type: integer - format: int64 - example: 0 - description: - maxLength: 2048 - minLength: 0 - type: string - example: Column comment - database_id: - type: integer - format: int64 - example: 1 - ord: - type: integer - format: int32 - example: 0 - internal_name: - maxLength: 64 - minLength: 0 - type: string - example: given_name - index_length: - type: integer - format: int64 - example: 255 - length: - type: integer - format: int64 - example: 255 - type: - type: string - example: varchar - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - is_null_allowed: - type: boolean - example: false - ViewDto: - required: - - columns - - database_id - - id - - identifiers - - internal_name - - name - - owner - - query - - query_hash - type: object - properties: - id: - type: integer - format: int64 - example: 4 - name: - type: string - example: Air Quality - identifiers: - type: array - items: - $ref: '#/components/schemas/IdentifierDto' - query: - type: string - example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC - database: - $ref: '#/components/schemas/DatabaseDto' - owner: - $ref: '#/components/schemas/UserBriefDto' - columns: - type: array - items: - $ref: '#/components/schemas/ViewColumnDto' - last_retrieved: - type: string - format: date-time - database_id: - type: integer - format: int64 - example: 1 - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - initial_view: - type: boolean - description: True if it is the default view for the database - example: true - query_hash: - type: string - example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 TableColumnEntityDto: required: - column_id @@ -9033,17 +8772,17 @@ components: type: string example: open source semantic web framework for Java database_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 475b4107-a64d-4495-a7ef-3cb0dadd4804 table_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 9a9208af-90ea-4382-9a11-0c8f6d89bd1f column_id: - type: integer - format: int64 - example: 1 + type: string + format: uuid + example: 297860e3-3b29-451c-ae8a-a85ed5941018 ContainerBriefDto: required: - count @@ -9056,9 +8795,9 @@ components: type: object properties: id: - type: integer - format: int64 - example: 4 + type: string + format: uuid + example: 7ddb7e87-b965-43a2-9a24-4fa406d998f4 hash: type: string example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 @@ -9086,8 +8825,9 @@ components: type: object properties: id: - type: integer - format: int64 + type: string + format: uuid + example: 8cabc011-4bdf-44d4-9d33-b2648e2ddbf1 uri: type: string name: diff --git a/.docs/api/storage-service.md b/.docs/api/storage-service.md index 939e3dbbcb07bab777118235bc1d97c4956c40af..e962c70966a3438d1379c5809e701510168d8785 100644 --- a/.docs/api/storage-service.md +++ b/.docs/api/storage-service.md @@ -22,19 +22,23 @@ author: Martin Weise We use [SeaweedFS](https://seaweedfs.github.io/) as a high-performance, S3 compatible object store for easy, cloud-ready deployments that by default support replication and monitoring. No graphical user interface is provided out-of-the-box, -administrators can access the S3 storage via S3-compatible clients +administrators can access the S3 storage via S3-compatible clients e.g. [AWS CLI](https://docs.aws.amazon.com/cli/latest/reference/s3/) (see below). -### Users +The default configuration creates admin credentials `seaweedfsadmin:seaweedfsadmin`. By default, one bucket `dbrepo` is +created that holds uploads temporarily. It is recommended to delete the contents regularly. -The default configuration creates one user `seaweedfsadmin` with password `seaweedfsadmin`. +The S3 endpoint of the Storage Service is available on port `9000`. -### Buckets +### Filer UI -The default configuration creates two buckets `dbrepo-upload`, `dbrepo-download`: +The storage service comes with a simple UI that can be used to explore the uploaded files, rename them and delete them. +Please note that the Filer UI is not intended for production and should be turned off for security purposes. -* `dbrepo-upload` for CSV-file upload (for import of data, analysis, etc.) from the User Interface -* `dbrepo-download` for CSV-file download (exporting data, metadata, etc.) +<figure markdown> + +<figcaption>Figure 1: Filer UI</figcaption> +</figure> ## Limitations diff --git a/.docs/api/upload-service.md b/.docs/api/upload-service.md deleted file mode 100644 index 97ca74d14be1c37e31878f4c0d54f76082a16e50..0000000000000000000000000000000000000000 --- a/.docs/api/upload-service.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -author: Martin Weise ---- - -## tl;dr - -!!! debug "Debug Information" - - Image: [`docker.io/tusproject/tusd:v1.12`](https://hub.docker.com/r/tusproject/tusd) - - * Ports: 1080/tcp - * Prometheus: `http://<hostname>:1080/api/upload/metrics` - * API: `http://<hostname>:1080/api/upload` - - To directly access in Kubernetes (for e.g. debugging), forward the svc port to your local machine: - - ```shell - kubectl [-n namespace] port-forward svc/upload-service 1080:80 - ``` - -## Overview - -We use the [TUS](https://tus.io/) open protocol for resume-able file uploads which based entirely on HTTP. Even though -the Upload Service is part of the standard installation, it is an entirely optional component and can be replaced with -any S3-compatible Blob Storage. - -### Architecture - -The Upload Service communicates internally with the [Storage Service](../storage-service) (c.f. [Figure 1](#fig1)). - -<figure id="fig1" markdown> - -<figcaption>Figure 1: Architecture of the Upload Service</figcaption> -</figure> - -The Upload Service is responsible for uploading files (mainly CSV-files) into a Blob Storage that can be accesses trough -the S3 protocol (e.g. our [Storage Service](../storage-service)). Make sure that the Upload Service can be -accessed from the Gateway Service. - -## Limitations - -* No support for authentication. - -!!! question "Do you miss functionality? Do these limitations affect you?" - - We strongly encourage you to help us implement it as we are welcoming contributors to open-source software and get - in [contact](../contact) with us, we happily answer requests for collaboration with attached CV and your programming - experience! - -## Security - -1. We strongly encourage to limit the clients allowed to upload by adding your subnet, e.g. `128.130.0.0/16` - (=TU Wien subnet) to the [Gateway Service](../system-services-gateway) configuration file like this: - - ```nginx title="dbrepo.conf" - location /api/upload { - allow 128.130.0.0/16; - deny all; - ... - } - ``` diff --git a/.docs/changelog.md b/.docs/changelog.md index f70f2769981a64cd0b6ed749865872aa2f038551..e09b3c1139ff51f55fe986caf19be9b8894b9ba1 100644 --- a/.docs/changelog.md +++ b/.docs/changelog.md @@ -2,22 +2,67 @@ author: Martin Weise --- +## v1.7.0 (2025-03-03) + +[:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.7.0) + +!!! warning "Contains Breaking Changes" + + This release updates the Metadata Database schema which is incompatible to v1.6.3! Follow the steps: + + 1. Make a backup of the database with `mariadb-dump`. + 2. Apply the schema changes script: [`schema.sql`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.7/dbrepo-metadata-db/migration/16/schema.sql): + ```shell + mariadb -h 127.0.0.1 -p3306 -u root --password=<password> -D dbrepo < schema.sql + ``` + 3. Install the dependencies from the [`requirements.txt`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.7/dbrepo-metadata-db/migration/16/requirements.txt) + file or use your local environment: + ```shell + pip install dbrepo==1.6.5rc15 + ``` + 4. Run the data migration script [`data.py`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.7/dbrepo-metadata-db/migration/16/data.py): + ```shell + python data.py > data.sql + ``` + It generates the SQL statements used for migrating to the new schema. + 5. Run the generated `data.sql` script: + ```shell + mariadb -h 127.0.0.1 -p3306 -u root --password=<password> -D dbrepo < data.sql + ``` + +#### Features + +* Implemented a basic brute-force security defense strategy in the Auth Service that increments the wait time on wrong + logins in [#494](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/494). +* Implemented a password policy + in [#495](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/495). + +#### Changes + +* Replaced sequential numerical ids with non-guessable random ids in the Metadata Database + in [#491](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/491). +* Changed the interface for executing query in subsets/views + in [#493](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/493). + +#### Removals + +* Removed the Upload Service in favor of an internal stable upload endpoint in the Data Service + in [#492](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues/492). + ## v1.6.5 (2025-02-18) [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.5) -### What's Changed - #### Fixes * Fixed a bug where listing the views in the Python library did not work. +* Fixed a wrong MariaDB configuration where the `innodb_buffer_pool_size` variable was not configured to 70% of the + available memory in the Helm chart. ## v1.6.4 (2025-02-14) [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.4) -### What's Changed - #### Fixes * Fixed a bug where the users were not synced with the Metadata Database @@ -27,8 +72,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.3) -### What's Changed - #### Changes * Refactored the UI to support OIDC and added an event listener to the Auth Service that syncs users on creation to the @@ -38,8 +81,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.2) -### What's Changed - #### Changes * Added interface tests for the Python library in Gitlab CI/CD pipeline @@ -54,8 +95,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.1) -### What's Changed - #### Changes * Added privacy feature for hidden databases (and optionally tables, views, subsets) that hides them completely from @@ -70,8 +109,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.6.0) -### What's Changed - #### Features * Added possibility to modify table description and privacy mode that hides metadata of databases, tables, subsets and @@ -109,8 +146,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.5.3) -### What's Changed - #### Fixes * Fixed a bug where subsets containing sub-queries are not able to retrieve data @@ -120,8 +155,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.5.2) -### What's Changed - #### Changes * Adapt Helm chart to support `runAsNonRoot` throughout and specify `resource` presets for the highly-constrained @@ -141,8 +174,6 @@ author: Martin Weise [:simple-gitlab: GitLab Release](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/tags/v1.5.1) -### What's Changed - #### Fixes * Bug where the data volume could not be calculated when the data length column in the Metadata Database is `null` @@ -160,8 +191,6 @@ author: Martin Weise script [`schema_1.4.5-to-1.5.0.sql`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.5/dbrepo-metadata-db/migration/schema_1.4.5-to-1.5.0.sql) to apply the changes manually. -### What's Changed - #### Features * Added `SERIAL` data type to create incrementing key @@ -196,8 +225,6 @@ author: Martin Weise This release updates the Metadata Database schema which is incompatible to v1.4.5! -### What's Changed - #### Features * Added [Dashboard Service](../api/dashboard-service/) and monitoring in default setup. diff --git a/.docs/images/screenshots/storage-service-filer.png b/.docs/images/screenshots/storage-service-filer.png new file mode 100644 index 0000000000000000000000000000000000000000..c20b9df73e908e86bb559cf687d41c42a590c67c Binary files /dev/null and b/.docs/images/screenshots/storage-service-filer.png differ diff --git a/.docs/index.md b/.docs/index.md index f4c159d7bcfc3693a8e742a3b6b2a82e1250b240..aa9c6e7693f3758fadcddbe05cd5904c5e92b7da 100644 --- a/.docs/index.md +++ b/.docs/index.md @@ -14,7 +14,7 @@ author: Martin Weise   -Documentation for version: [v1.6.5](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/releases). +Documentation for version: [v1.7.0](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/releases). DBRepo is a repository for data in databases that are used from the beginning until the end of a research project supporting data evolution, -citation and -versioning. It implements the query store of the diff --git a/.docs/installation.md b/.docs/installation.md index 1c6db304ccf3d760c44e56b7d49aef49d76330ff..272c62d53281b68af8db66ddcfaa0a3bdac3fa4f 100644 --- a/.docs/installation.md +++ b/.docs/installation.md @@ -11,7 +11,7 @@ author: Martin Weise If you have [Docker](https://docs.docker.com/engine/install/) already installed on your system, you can install DBRepo with: ```shell -curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.6/install.sh | bash +curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.7/install.sh | bash ``` !!! bug "Default installation security disclaimer" @@ -38,7 +38,7 @@ SSL/TLS certificate is recommended. Follow the [secure installation](#secure-ins Execute the installation script to download only the environment and save it to `dist`. ```shell -curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.6/install.sh | DOWNLOAD_ONLY=1 bash +curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.7/install.sh | DOWNLOAD_ONLY=1 bash ``` ### Static Configuration @@ -82,7 +82,7 @@ the variable `IDENTITY_SERVICE_ADMIN_PASSWORD` in `.env`. Update the client secret of the `dbrepo-client`: ```bash -curl -sSL "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.6/.scripts/reg-client-secret.sh" | bash +curl -sSL "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.7/.scripts/reg-client-secret.sh" | bash ``` Also, update the JWT key according to the diff --git a/.docs/kubernetes.md b/.docs/kubernetes.md index e2aa101097df87728a250cc96a8fd17004f839e5..9413c784dfcccf6e14f527495243e33162922f23 100644 --- a/.docs/kubernetes.md +++ b/.docs/kubernetes.md @@ -6,7 +6,7 @@ author: Martin Weise To install DBRepo in your existing cluster, download the sample [ -`values.yaml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.6/helm/dbrepo/values.yaml) +`values.yaml`](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/blob/release-1.7/helm/dbrepo/values.yaml) for your deployment and update the variables, especially `hostname`. ```shell @@ -14,7 +14,7 @@ helm upgrade --install dbrepo \ -n dbrepo \ "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" \ --values ./values.yaml \ - --version "1.6.5" \ + --version "1.7.0" \ --create-namespace \ --cleanup-on-fail ``` diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65f52bea3896d6ed5aea9f06ded440861ae4bf5b..b07becabc3b9c2c3b0ca43f2ad5f358bf524ce61 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ variables: + BUILD_VERSION: "" HOSTALIASES: "./hosts" DOCKER_HOST: "unix:///var/run/dind/docker.sock" DOCKER_VERSION: "27" @@ -9,9 +10,9 @@ variables: NODE_VERSION: "18" SONARQUBE_VERSION: "10.0" BUN_VERSION: "1.1.40" - DOC_VERSION: "1.6" - APP_VERSION: "1.6.5" - CHART_VERSION: "1.6.5" + DOC_VERSION: "1.7" + APP_VERSION: "1.7.0" + CHART_VERSION: "1.7.0" CACHE_FALLBACK_KEY: "${CI_DEFAULT_BRANCH}" # This will supress any download for dependencies and plugins or upload messages which would clutter the console log. # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. @@ -30,13 +31,20 @@ cache: paths: - .m2/repository +workflow: + rules: + - if: $CI_COMMIT_REF_NAME == "dev" + variables: + BUILD_VERSION: "+git.${CI_COMMIT_SHORT_SHA}" + - when: always + stages: - lint - build - - deploy - test - docs - release + - deploy - verify - scan @@ -80,9 +88,9 @@ lint-helm-chart: - apk --no-cache add helm git bash - cp ./helm/dbrepo/values.schema.json ./CI_values.schema.json - helm plugin install https://github.com/losisin/helm-values-schema-json.git - - helm dependency update ./helm/seaweedfs - helm package ./helm/seaweedfs --destination ./build - - helm dependency update ./helm/dbrepo + - helm registry login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY_URL}" + - helm registry login --username "${CI_REGISTRY2_USER}" --password "${CI_REGISTRY2_PASSWORD}" "${CI_REGISTRY2_URL}" script: - bash .scripts/check-helm.sh - helm lint ./helm/dbrepo @@ -137,6 +145,8 @@ lint-open-api-version: build-metadata-service: image: maven:3-openjdk-${JAVA_VERSION} stage: build + only: + - merge_requests script: - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages @@ -155,6 +165,8 @@ build-metadata-service: build-analyse-service: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: build + only: + - merge_requests variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" script: @@ -164,6 +176,8 @@ build-analyse-service: build-lib: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: build + only: + - merge_requests variables: PIPENV_PIPFILE: "./lib/python/Pipfile" script: @@ -173,12 +187,15 @@ build-lib: build-data-service: image: maven:3-openjdk-${JAVA_VERSION} stage: build + only: + - merge_requests needs: - build-metadata-service dependencies: - build-metadata-service - script: + before_script: - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" + script: - "mvn -f ./dbrepo-data-service/pom.xml clean package $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages artifacts: @@ -192,19 +209,26 @@ build-data-service: build-ui: image: oven/bun:${BUN_VERSION}-alpine stage: build + only: + - merge_requests script: - "cd ./dbrepo-ui && bun install && bun run build" build-search-service: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: build - script: + only: + - merge_requests + before_script: - "pip install pipenv" + script: - "cd dbrepo-search-service && pipenv install --system --deploy" build-images: image: docker.io/docker:${DOCKER_VERSION}-dind stage: build + only: + - merge_requests before_script: - "apk add --no-cache make" - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL @@ -214,6 +238,8 @@ build-images: build-helm: image: docker.io/docker:${DOCKER_VERSION}-dind stage: build + only: + - merge_requests before_script: - apk add --no-cache helm make - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg @@ -221,30 +247,11 @@ build-helm: script: - make build-helm -deploy-staging: - image: docker.io/alpine:${ALPINE_VERSION} - stage: deploy - variables: - KUBECONFIG: ./kubecfg - environment: - name: staging/datalab - url: ${CI_ENV_STAGING_URL} - before_script: - - apk add --no-cache helm kubectl make - - echo ${CI_K8S_CONFIG} | base64 -d > ./kubecfg - - make build-helm - - helm -n ${CI_ENV_STAGING_NAMESPACE} uninstall ${CI_ENV_STAGING_RELEASE_NAME} --ignore-not-found - - kubectl -n ${CI_ENV_STAGING_NAMESPACE} delete pvc --all - script: - - helm -n ${CI_ENV_STAGING_NAMESPACE} upgrade --install ${CI_ENV_STAGING_RELEASE_NAME} ./build/dbrepo-${CHART_VERSION}.tgz --create-namespace -f ./.gitlab/agents/dev/values.yaml - only: - refs: - - dev - - master - test-metadata-service: image: maven:3-openjdk-${JAVA_VERSION} stage: test + only: + - merge_requests needs: - build-metadata-service dependencies: @@ -265,6 +272,8 @@ test-metadata-service: test-data-service: image: maven:3-openjdk-${JAVA_VERSION} stage: test + only: + - merge_requests needs: - build-data-service dependencies: @@ -283,16 +292,11 @@ test-data-service: junit: ./dbrepo-data-service/rest-service/target/surefire-reports/TEST-*.xml coverage: '/Total.*?([0-9]{1,3})%/' -test-upload-service: - image: maven:3-openjdk-${JAVA_VERSION} - stage: test - script: - - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" - - "mvn -f ./dbrepo-upload-service/pom.xml clean test $MAVEN_OPTS" - test-analyse-service: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: test + only: + - merge_requests variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" needs: @@ -302,21 +306,23 @@ test-analyse-service: script: - "pip install pipenv" - "pipenv install gunicorn && pipenv install --dev --system --deploy" - - cd ./dbrepo-analyse-service/ && coverage run -m pytest tests/test_determine_dt.py tests/test_determine_pk.py tests/test_s3_client.py --junitxml=report.xml && coverage html --omit="tests/*" && coverage report --omit="tests/*" > ./coverage.txt + - cd ./dbrepo-analyse-service/ && coverage run --rcfile=.coveragerc -m pytest tests/test_determine_dt.py tests/test_determine_pk.py tests/test_s3_client.py && coverage html && coverage xml && coverage report > ./coverage.txt - "cat ./coverage.txt | grep -o 'TOTAL[^%]*%'" artifacts: when: always paths: - - ./dbrepo-analyse-service/report.xml + - ./dbrepo-analyse-service/coverage.xml - ./dbrepo-analyse-service/coverage.txt expire_in: 1 days reports: - junit: ./dbrepo-analyse-service/report.xml + junit: ./dbrepo-analyse-service/coverage.xml coverage: '/TOTAL.*?([0-9]{1,3})%/' test-auth-service-init: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: test + only: + - merge_requests variables: PIPENV_PIPFILE: "./dbrepo-auth-service/init/Pipfile" before_script: @@ -324,21 +330,23 @@ test-auth-service-init: - "pip install pipenv" - "pipenv install gunicorn && pipenv install --dev --system --deploy" script: - - cd ./dbrepo-auth-service/init/ && coverage run -m pytest tests/test_unit_app.py --junitxml=report.xml && coverage html --omit="tests/*" && coverage report --omit="tests/*" > ./coverage.txt + - cd ./dbrepo-auth-service/init/ && coverage run --rcfile=.coveragerc -m pytest tests/test_unit_app.py && coverage html && coverage xml && coverage report > ./coverage.txt - "cat ./coverage.txt | grep -o 'TOTAL[^%]*%'" artifacts: when: always paths: - - ./dbrepo-auth-service/init/report.xml + - ./dbrepo-auth-service/init/coverage.xml - ./dbrepo-auth-service/init/coverage.txt expire_in: 1 days reports: - junit: ./dbrepo-auth-service/init/report.xml + junit: ./dbrepo-auth-service/init/coverage.xml coverage: '/TOTAL.*?([0-9]{1,3})%/' test-search-service: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: test + only: + - merge_requests variables: PIPENV_PIPFILE: "./dbrepo-search-service/Pipfile" needs: @@ -355,21 +363,23 @@ test-search-service: script: - "pip install pipenv" - "pipenv install gunicorn && pipenv install --dev --system --deploy" - - cd ./dbrepo-search-service/ && coverage run -m pytest tests/test_app.py tests/test_jwt.py tests/test_opensearch_client.py tests/test_keycloak_client.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt + - cd ./dbrepo-search-service/ && coverage run --rcfile=.coveragerc -m pytest tests/test_app.py tests/test_jwt.py tests/test_opensearch_client.py tests/test_keycloak_client.py && coverage html && coverage xml && coverage report > ./coverage.txt - "cat ./coverage.txt | grep -o 'TOTAL[^%]*%'" artifacts: when: always paths: - - ./dbrepo-search-service/report.xml + - ./dbrepo-search-service/coverage.xml - ./dbrepo-search-service/coverage.txt expire_in: 1 days reports: - junit: ./dbrepo-search-service/report.xml + junit: ./dbrepo-search-service/coverage.xml coverage: '/TOTAL.*?([0-9]{1,3})%/' test-search-service-init: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: test + only: + - merge_requests variables: PIPENV_PIPFILE: "./dbrepo-search-service/init/Pipfile" needs: @@ -379,21 +389,23 @@ test-search-service-init: script: - "pip install pipenv" - "pipenv install gunicorn && pipenv install --dev --system --deploy" - - cd ./dbrepo-search-service/init/ && coverage run -m pytest tests/test_app.py tests/test_keycloak_client.py tests/test_opensearch_client.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt + - cd ./dbrepo-search-service/init/ && coverage run --rcfile=.coveragerc -m pytest tests/test_app.py tests/test_keycloak_client.py tests/test_opensearch_client.py && coverage html && coverage xml && coverage report > ./coverage.txt - "cat ./coverage.txt | grep -o 'TOTAL[^%]*%'" artifacts: when: always paths: - - ./dbrepo-search-service/report.xml + - ./dbrepo-search-service/coverage.xml - ./dbrepo-search-service/coverage.txt expire_in: 1 days reports: - junit: ./dbrepo-search-service/report.xml + junit: ./dbrepo-search-service/coverage.xml coverage: '/TOTAL.*?([0-9]{1,3})%/' test-lib: image: docker.io/python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} stage: test + only: + - merge_requests variables: PIPENV_PIPFILE: "./lib/python/Pipfile" needs: @@ -403,21 +415,23 @@ test-lib: script: - "pip install pipenv" - "pipenv install gunicorn && pipenv install --dev --system --deploy" - - cd ./lib/python/ && coverage run -m pytest tests/test_unit_analyse.py tests/test_unit_container.py tests/test_unit_database.py tests/test_unit_identifier.py tests/test_unit_license.py tests/test_unit_query.py tests/test_unit_rest_client.py tests/test_unit_table.py tests/test_unit_user.py tests/test_unit_view.py tests/test_unit_rest_client.py --junitxml=report.xml && coverage html --omit="tests/*" && coverage report --omit="tests/*" > ./coverage.txt + - cd ./lib/python/ && coverage run --rcfile=.coveragerc -m pytest tests/test_unit_container.py tests/test_unit_messages.py tests/test_unit_image.py tests/test_unit_concept.py tests/test_unit_database.py tests/test_unit_identifier.py tests/test_unit_license.py tests/test_unit_query.py tests/test_unit_rest_client.py tests/test_unit_table.py tests/test_unit_user.py tests/test_unit_view.py tests/test_unit_unit.py && coverage html && coverage xml && coverage report > ./coverage.txt - "cat ./coverage.txt | grep -o 'TOTAL[^%]*%'" artifacts: when: always paths: - - ./lib/python/report.xml + - ./lib/python/coverage.xml - ./lib/python/coverage.txt expire_in: 1 days reports: - junit: ./lib/python/report.xml + junit: ./lib/python/coverage.xml coverage: '/TOTAL.*?([0-9]{1,3})%/' test-ui: - stage: test image: docker.io/docker:${DOCKER_VERSION}-dind + stage: test + only: + - merge_requests needs: - build-ui dependencies: @@ -434,11 +448,17 @@ release-images: stage: release image: docker:${DOCKER_VERSION}-dind dependencies: - - test-metadata-service - - test-data-service - test-analyse-service + - test-auth-service-init + - test-data-service + - test-lib + - test-metadata-service + - test-search-service + - test-search-service-init + - test-ui only: refs: + - dev - /^release-.*/ before_script: - "docker logout ${CI_REGISTRY_URL}" @@ -470,6 +490,8 @@ release-helm: - "mkdir -p ~/.gnupg" - echo "$CI_GPG_KEYRING" | base64 -d > ~/.gnupg/secring.gpg - echo "$CI_GPG_KEYRING2" | base64 -d > ~/.gnupg/pubring.gpg + - helm registry login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY_URL}" + - helm registry login --username "${CI_REGISTRY2_USER}" --password "${CI_REGISTRY2_PASSWORD}" "${CI_REGISTRY2_URL}" - make build-helm - "helm package ./helm/dbrepo --sign --key 'Martin Weise' --keyring ~/.gnupg/secring.gpg --destination ./build" - "helm plugin install https://github.com/sigstore/helm-sigstore" @@ -552,6 +574,27 @@ verify-dist: script: - "curl -v --output /dev/null --fail https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/${APP_VERSION}/dist.tar.gz" +deploy-staging: + image: docker.io/alpine:${ALPINE_VERSION} + stage: deploy + only: + refs: + - dev + variables: + KUBECONFIG: ./kubecfg + environment: + name: staging/datalab + url: ${CI_ENV_STAGING_URL} + before_script: + - apk add --no-cache helm kubectl make + - echo ${CI_K8S_CONFIG} | base64 -d > ./kubecfg + - make build-helm + - helm -n ${CI_ENV_STAGING_NAMESPACE} uninstall ${CI_ENV_STAGING_RELEASE_NAME} --ignore-not-found + - kubectl -n ${CI_ENV_STAGING_NAMESPACE} delete pvc --all + - echo "${CI_K8S_VALUES}" | base64 -d > ./values.yaml + script: + - helm -n ${CI_ENV_STAGING_NAMESPACE} upgrade --install ${CI_ENV_STAGING_RELEASE_NAME} ./build/dbrepo-${CHART_VERSION}.tgz --create-namespace -f ./values.yaml + scan-sonarqube: image: sonarsource/sonar-scanner-cli:${SONARQUBE_VERSION} stage: scan diff --git a/.gitlab/agents/dev/config.yaml b/.gitlab/agents/dev/config.yaml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.gitlab/agents/dev/values.yaml b/.gitlab/agents/dev/values.yaml deleted file mode 100644 index 5841a5e97bd5d9f9ddde4d13a2b74623a91cf4fb..0000000000000000000000000000000000000000 --- a/.gitlab/agents/dev/values.yaml +++ /dev/null @@ -1,175 +0,0 @@ -hostname: s155.datalab.tuwien.ac.at -gateway: https://s155.datalab.tuwien.ac.at - -metadatadb: - enabled: true - rootUser: - user: root - password: da19c7cf5c0deba7bd47c174a0eb273b - galera: - mariabackup: - user: mariabackup - password: 9e447eeaf3e4b6aa26ea01582f0e8a54 - persistence: - enabled: true - -authservice: - enabled: true - auth: - adminUser: admin - adminPassword: ea72038fa14b968fc0ed09e182ecf624 - postgresql: - auth: - postgresPassword: 129d5b888b8df271fa482da39f15c513 - jwt: - pubkey: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQAB" - client: - id: dbrepo-client - secret: MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG - setupJob: - image: - name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.6.3 - persistence: - enabled: true - -brokerservice: - enabled: true - ldap: - bindpw: b8534187c9adf9618e7bd1c79c7f4639 - -identityservice: - enabled: true - global: - adminUser: admin - adminPassword: b8534187c9adf9618e7bd1c79c7f4639 - users: admin - userPasswords: ea72038fa14b968fc0ed09e182ecf624 - -datadb: - enabled: true - rootUser: - user: root - password: fdf8578499b2083eb3aa03a861ac7912 - galera: - mariabackup: - user: mariabackup - password: ef60e32e3217525474635cd28422c829 - replicaCount: 3 - persistence: - enabled: true - -searchdb: - enabled: true - security: - enabled: false - extraEnvs: - - name: DISABLE_INSTALL_DEMO_CONFIG - value: "true" - persistence: - enabled: true - -analyseservice: - enabled: true - image: - name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.6.3 - -metadataservice: - enabled: true - image: - name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.6.3 - admin: - email: noreply@example.com - deletedRecord: permanent - repositoryName: Database Repository - granularity: YYYY-MM-DDThh:mm:ssZ - datacite: - enabled: false - url: https://api.datacite.org - prefix: "" - username: "" - password: "" - -dataservice: - enabled: true - image: - name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.6.3 - rabbitmq: - consumer: - username: admin - password: ea72038fa14b968fc0ed09e182ecf624 - s3: - auth: - username: a45e7a77607a8906e92237f00ea72f58 - password: e2c4303dcbfd3a2c606fe30d19fcb82b - filePath: /s3 - -searchservice: - enabled: true - image: - name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.6.3 - init: - image: - name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.6.3 - -storageservice: - enabled: true - init: - image: - name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.6.3 - -uploadservice: - enabled: true - -dashboardservice: - enabled: true - -metricdb: - enabled: true - server: - rbac: - create: false - -ui: - enabled: true - image: - name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.6.3 - public: - api: - client: https://s155.datalab.tuwien.ac.at - server: https://s155.datalab.tuwien.ac.at - title: "Database Repository" - logo: "https://ec.tuwien.ac.at/~weise/images/DS_white_hiRes.png" - icon: "https://ec.tuwien.ac.at/~weise/images/favicon.ico" - touch: "https://ec.tuwien.ac.at/~weise/images/DS-icon_white_hiRes.png" - broker: - host: s155.datalab.tuwien.ac.at - extra: "128.130.0.0/15" - database: - extra: "128.130.0.0/15" - pid: - default: - publisher: "TU Wien" - doi: - enabled: false - endpoint: https://doi.org - extraVolumes: [ ] - # - name: images-map - # configMap: - # name: ui-config - extraVolumeMounts: [ ] - # - name: images-map - # mountPath: /static/logo.svg - # subPath: logo.svg - -gatewayservice: - enabled: true - -ingress: - enabled: true - className: nginx - tls: - enabled: true - secretName: ingress-cert - annotations: - cert-manager.io/cluster-issuer: letsencrypt-cluster-issuer -# nginx.ingress.kubernetes.io/whitelist-source-range: 128.130.0.0/15 diff --git a/Makefile b/Makefile index e84c4f80a83a72c864c8a3f85060ef08b9c48f66..e8f2553784f38ea5e656d776e34043886ed1ed4c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: all -APP_VERSION ?= 1.6.5 -CHART_VERSION ?= 1.6.5 +APP_VERSION ?= 1.7.0 +CHART_VERSION ?= 1.7.0 REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo .PHONY: all diff --git a/README.md b/README.md index 628da3f3f3335717b5b4e0962a6ff45d36fed420..901d24dd06dd2863da84c5622f9aa8b157462171 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you have [Docker](https://docs.docker.com/engine/install/) already installed with: ```bash -curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.6/install.sh | bash +curl -sSL https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/release-1.7/install.sh | bash ``` ## Documentation diff --git a/dbrepo-analyse-service/.coveragerc b/dbrepo-analyse-service/.coveragerc new file mode 100644 index 0000000000000000000000000000000000000000..35271a237a7e1c5f3fe0d1d9bda277fb12611efd --- /dev/null +++ b/dbrepo-analyse-service/.coveragerc @@ -0,0 +1,10 @@ +[report] +format = text +omit = + # omit tests + ./tests/* + # omit ext lib + ./omlib/* + +[html] +directory = htmlcov \ No newline at end of file diff --git a/dbrepo-analyse-service/Pipfile b/dbrepo-analyse-service/Pipfile index 06b6434be71e054367e1ef521a3dae8e9401e360..6b144eec80011a340dbbaabc0c3bce5894e3c654 100644 --- a/dbrepo-analyse-service/Pipfile +++ b/dbrepo-analyse-service/Pipfile @@ -21,7 +21,7 @@ numpy = "*" pandas = "*" minio = "*" pydantic = "*" -dbrepo = {path = "./lib/dbrepo-1.6.5.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} opensearch-py = "*" [dev-packages] diff --git a/dbrepo-analyse-service/Pipfile.lock b/dbrepo-analyse-service/Pipfile.lock index 96591a28b95119b0725038b3c2fa66e883d5ba7e..e54efec237dc14ee3048bf0abb369eec540df337 100644 --- a/dbrepo-analyse-service/Pipfile.lock +++ b/dbrepo-analyse-service/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "1013ec1b081d79912b7ec0878b4824cb4f885a96fec148ae728d746de601b493" + "sha256": "0af9d522f713554dd7996401992cffddf372ade320c11d7950bdcd5888aa1a03" }, "pipfile-spec": 6, "requires": { @@ -26,90 +26,90 @@ }, "aiohttp": { "hashes": [ - "sha256:0450ada317a65383b7cce9576096150fdb97396dcfe559109b403c7242faffef", - "sha256:0b5263dcede17b6b0c41ef0c3ccce847d82a7da98709e75cf7efde3e9e3b5cae", - "sha256:0d5176f310a7fe6f65608213cc74f4228e4f4ce9fd10bcb2bb6da8fc66991462", - "sha256:0ed49efcd0dc1611378beadbd97beb5d9ca8fe48579fc04a6ed0844072261b6a", - "sha256:145a73850926018ec1681e734cedcf2716d6a8697d90da11284043b745c286d5", - "sha256:1987770fb4887560363b0e1a9b75aa303e447433c41284d3af2840a2f226d6e0", - "sha256:246067ba0cf5560cf42e775069c5d80a8989d14a7ded21af529a4e10e3e0f0e6", - "sha256:2c311e2f63e42c1bf86361d11e2c4a59f25d9e7aabdbdf53dc38b885c5435cdb", - "sha256:2cee3b117a8d13ab98b38d5b6bdcd040cfb4181068d05ce0c474ec9db5f3c5bb", - "sha256:2de1378f72def7dfb5dbd73d86c19eda0ea7b0a6873910cc37d57e80f10d64e1", - "sha256:30f546358dfa0953db92ba620101fefc81574f87b2346556b90b5f3ef16e55ce", - "sha256:34245498eeb9ae54c687a07ad7f160053911b5745e186afe2d0c0f2898a1ab8a", - "sha256:392432a2dde22b86f70dd4a0e9671a349446c93965f261dbaecfaf28813e5c42", - "sha256:3c0600bcc1adfaaac321422d615939ef300df81e165f6522ad096b73439c0f58", - "sha256:4016e383f91f2814e48ed61e6bda7d24c4d7f2402c75dd28f7e1027ae44ea204", - "sha256:40cd36749a1035c34ba8d8aaf221b91ca3d111532e5ccb5fa8c3703ab1b967ed", - "sha256:413ad794dccb19453e2b97c2375f2ca3cdf34dc50d18cc2693bd5aed7d16f4b9", - "sha256:4a93d28ed4b4b39e6f46fd240896c29b686b75e39cc6992692e3922ff6982b4c", - "sha256:4ee84c2a22a809c4f868153b178fe59e71423e1f3d6a8cd416134bb231fbf6d3", - "sha256:50c5c7b8aa5443304c55c262c5693b108c35a3b61ef961f1e782dd52a2f559c7", - "sha256:525410e0790aab036492eeea913858989c4cb070ff373ec3bc322d700bdf47c1", - "sha256:526c900397f3bbc2db9cb360ce9c35134c908961cdd0ac25b1ae6ffcaa2507ff", - "sha256:54775858c7f2f214476773ce785a19ee81d1294a6bedc5cc17225355aab74802", - "sha256:584096938a001378484aa4ee54e05dc79c7b9dd933e271c744a97b3b6f644957", - "sha256:6130459189e61baac5a88c10019b21e1f0c6d00ebc770e9ce269475650ff7f73", - "sha256:67453e603cea8e85ed566b2700efa1f6916aefbc0c9fcb2e86aaffc08ec38e78", - "sha256:68d54234c8d76d8ef74744f9f9fc6324f1508129e23da8883771cdbb5818cbef", - "sha256:6dfe7f984f28a8ae94ff3a7953cd9678550dbd2a1f9bda5dd9c5ae627744c78e", - "sha256:74bd573dde27e58c760d9ca8615c41a57e719bff315c9adb6f2a4281a28e8798", - "sha256:7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0", - "sha256:76719dd521c20a58a6c256d058547b3a9595d1d885b830013366e27011ffe804", - "sha256:7c3623053b85b4296cd3925eeb725e386644fd5bc67250b3bb08b0f144803e7b", - "sha256:7e44eba534381dd2687be50cbd5f2daded21575242ecfdaf86bbeecbc38dae8e", - "sha256:7fe3d65279bfbee8de0fb4f8c17fc4e893eed2dba21b2f680e930cc2b09075c5", - "sha256:8340def6737118f5429a5df4e88f440746b791f8f1c4ce4ad8a595f42c980bd5", - "sha256:84ede78acde96ca57f6cf8ccb8a13fbaf569f6011b9a52f870c662d4dc8cd854", - "sha256:850ff6155371fd802a280f8d369d4e15d69434651b844bde566ce97ee2277420", - "sha256:87a2e00bf17da098d90d4145375f1d985a81605267e7f9377ff94e55c5d769eb", - "sha256:88d385b8e7f3a870146bf5ea31786ef7463e99eb59e31db56e2315535d811f55", - "sha256:8a2fb742ef378284a50766e985804bd6adb5adb5aa781100b09befdbfa757b65", - "sha256:8dc0fba9a74b471c45ca1a3cb6e6913ebfae416678d90529d188886278e7f3f6", - "sha256:8fa1510b96c08aaad49303ab11f8803787c99222288f310a62f493faf883ede1", - "sha256:8fd12d0f989c6099e7b0f30dc6e0d1e05499f3337461f0b2b0dadea6c64b89df", - "sha256:9060addfa4ff753b09392efe41e6af06ea5dd257829199747b9f15bfad819460", - "sha256:930ffa1925393381e1e0a9b82137fa7b34c92a019b521cf9f41263976666a0d6", - "sha256:936d8a4f0f7081327014742cd51d320296b56aa6d324461a13724ab05f4b2933", - "sha256:97fe431f2ed646a3b56142fc81d238abcbaff08548d6912acb0b19a0cadc146b", - "sha256:9bd8695be2c80b665ae3f05cb584093a1e59c35ecb7d794d1edd96e8cc9201d7", - "sha256:9dec0000d2d8621d8015c293e24589d46fa218637d820894cb7356c77eca3259", - "sha256:a478aa11b328983c4444dacb947d4513cb371cd323f3845e53caeda6be5589d5", - "sha256:a481a574af914b6e84624412666cbfbe531a05667ca197804ecc19c97b8ab1b0", - "sha256:a4ac6a0f0f6402854adca4e3259a623f5c82ec3f0c049374133bcb243132baf9", - "sha256:a5e69046f83c0d3cb8f0d5bd9b8838271b1bc898e01562a04398e160953e8eb9", - "sha256:a7442662afebbf7b4c6d28cb7aab9e9ce3a5df055fc4116cc7228192ad6cb484", - "sha256:aa8a8caca81c0a3e765f19c6953416c58e2f4cc1b84829af01dd1c771bb2f91f", - "sha256:ab3247d58b393bda5b1c8f31c9edece7162fc13265334217785518dd770792b8", - "sha256:b10a47e5390c4b30a0d58ee12581003be52eedd506862ab7f97da7a66805befb", - "sha256:b34508f1cd928ce915ed09682d11307ba4b37d0708d1f28e5774c07a7674cac9", - "sha256:b8d3bb96c147b39c02d3db086899679f31958c5d81c494ef0fc9ef5bb1359b3d", - "sha256:b9d45dbb3aaec05cf01525ee1a7ac72de46a8c425cb75c003acd29f76b1ffe94", - "sha256:bf4480a5438f80e0f1539e15a7eb8b5f97a26fe087e9828e2c0ec2be119a9f72", - "sha256:c160a04283c8c6f55b5bf6d4cad59bb9c5b9c9cd08903841b25f1f7109ef1259", - "sha256:c96a43822f1f9f69cc5c3706af33239489a6294be486a0447fb71380070d4d5f", - "sha256:c9fd9dcf9c91affe71654ef77426f5cf8489305e1c66ed4816f5a21874b094b9", - "sha256:cddb31f8474695cd61fc9455c644fc1606c164b93bff2490390d90464b4655df", - "sha256:ce1bb21fc7d753b5f8a5d5a4bae99566386b15e716ebdb410154c16c91494d7f", - "sha256:d1c031a7572f62f66f1257db37ddab4cb98bfaf9b9434a3b4840bf3560f5e788", - "sha256:d589264dbba3b16e8951b6f145d1e6b883094075283dafcab4cdd564a9e353a0", - "sha256:dc065a4285307607df3f3686363e7f8bdd0d8ab35f12226362a847731516e42c", - "sha256:e10c440d142fa8b32cfdb194caf60ceeceb3e49807072e0dc3a8887ea80e8c16", - "sha256:e3552fe98e90fdf5918c04769f338a87fa4f00f3b28830ea9b78b1bdc6140e0d", - "sha256:e392804a38353900c3fd8b7cacbea5132888f7129f8e241915e90b85f00e3250", - "sha256:e4cecdb52aaa9994fbed6b81d4568427b6002f0a91c322697a4bfcc2b2363f5a", - "sha256:e5148ca8955affdfeb864aca158ecae11030e952b25b3ae15d4e2b5ba299bad2", - "sha256:e6b2732ef3bafc759f653a98881b5b9cdef0716d98f013d376ee8dfd7285abf1", - "sha256:ea756b5a7bac046d202a9a3889b9a92219f885481d78cd318db85b15cc0b7bcf", - "sha256:edb69b9589324bdc40961cdf0657815df674f1743a8d5ad9ab56a99e4833cfdd", - "sha256:f0203433121484b32646a5f5ea93ae86f3d9559d7243f07e8c0eab5ff8e3f70e", - "sha256:f6a19bcab7fbd8f8649d6595624856635159a6527861b9cdc3447af288a00c00", - "sha256:f752e80606b132140883bb262a457c475d219d7163d996dc9072434ffb0784c4", - "sha256:f7914ab70d2ee8ab91c13e5402122edbc77821c66d2758abb53aabe87f013287" + "sha256:00c8ac69e259c60976aa2edae3f13d9991cf079aaa4d3cd5a49168ae3748dee3", + "sha256:01816f07c9cc9d80f858615b1365f8319d6a5fd079cd668cc58e15aafbc76a54", + "sha256:02876bf2f69b062584965507b07bc06903c2dc93c57a554b64e012d636952654", + "sha256:0e9eb7e5764abcb49f0e2bd8f5731849b8728efbf26d0cac8e81384c95acec3f", + "sha256:0f6b2c5b4a4d22b8fb2c92ac98e0747f5f195e8e9448bfb7404cd77e7bfa243f", + "sha256:1982c98ac62c132d2b773d50e2fcc941eb0b8bad3ec078ce7e7877c4d5a2dce7", + "sha256:1e83fb1991e9d8982b3b36aea1e7ad27ea0ce18c14d054c7a404d68b0319eebb", + "sha256:25de43bb3cf83ad83efc8295af7310219af6dbe4c543c2e74988d8e9c8a2a917", + "sha256:28a772757c9067e2aee8a6b2b425d0efaa628c264d6416d283694c3d86da7689", + "sha256:2a4a13dfbb23977a51853b419141cd0a9b9573ab8d3a1455c6e63561387b52ff", + "sha256:2a8a6bc19818ac3e5596310ace5aa50d918e1ebdcc204dc96e2f4d505d51740c", + "sha256:2eabb269dc3852537d57589b36d7f7362e57d1ece308842ef44d9830d2dc3c90", + "sha256:35cda4e07f5e058a723436c4d2b7ba2124ab4e0aa49e6325aed5896507a8a42e", + "sha256:42d689a5c0a0c357018993e471893e939f555e302313d5c61dfc566c2cad6185", + "sha256:4586a68730bd2f2b04a83e83f79d271d8ed13763f64b75920f18a3a677b9a7f0", + "sha256:47dc018b1b220c48089b5b9382fbab94db35bef2fa192995be22cbad3c5730c8", + "sha256:507ab05d90586dacb4f26a001c3abf912eb719d05635cbfad930bdbeb469b36c", + "sha256:5194143927e494616e335d074e77a5dac7cd353a04755330c9adc984ac5a628e", + "sha256:51c3ff9c7a25f3cad5c09d9aacbc5aefb9267167c4652c1eb737989b554fe278", + "sha256:55789e93c5ed71832e7fac868167276beadf9877b85697020c46e9a75471f55f", + "sha256:5724cc77f4e648362ebbb49bdecb9e2b86d9b172c68a295263fa072e679ee69d", + "sha256:5ad8f1c19fe277eeb8bc45741c6d60ddd11d705c12a4d8ee17546acff98e0802", + "sha256:5ceb81a4db2decdfa087381b5fc5847aa448244f973e5da232610304e199e7b2", + "sha256:64815c6f02e8506b10113ddbc6b196f58dbef135751cc7c32136df27b736db09", + "sha256:66047eacbc73e6fe2462b77ce39fc170ab51235caf331e735eae91c95e6a11e4", + "sha256:669dd33f028e54fe4c96576f406ebb242ba534dd3a981ce009961bf49960f117", + "sha256:684eea71ab6e8ade86b9021bb62af4bf0881f6be4e926b6b5455de74e420783a", + "sha256:6b35aab22419ba45f8fc290d0010898de7a6ad131e468ffa3922b1b0b24e9d2e", + "sha256:7104d5b3943c6351d1ad7027d90bdd0ea002903e9f610735ac99df3b81f102ee", + "sha256:718d5deb678bc4b9d575bfe83a59270861417da071ab44542d0fcb6faa686636", + "sha256:747ec46290107a490d21fe1ff4183bef8022b848cf9516970cb31de6d9460088", + "sha256:7836587eef675a17d835ec3d98a8c9acdbeb2c1d72b0556f0edf4e855a25e9c1", + "sha256:78e4dd9c34ec7b8b121854eb5342bac8b02aa03075ae8618b6210a06bbb8a115", + "sha256:7b77ee42addbb1c36d35aca55e8cc6d0958f8419e458bb70888d8c69a4ca833d", + "sha256:7c1b20a1ace54af7db1f95af85da530fe97407d9063b7aaf9ce6a32f44730778", + "sha256:7f27eec42f6c3c1df09cfc1f6786308f8b525b8efaaf6d6bd76c1f52c6511f6a", + "sha256:82c249f2bfa5ecbe4a1a7902c81c0fba52ed9ebd0176ab3047395d02ad96cfcb", + "sha256:85fa0b18558eb1427090912bd456a01f71edab0872f4e0f9e4285571941e4090", + "sha256:89ce611b1eac93ce2ade68f1470889e0173d606de20c85a012bfa24be96cf867", + "sha256:8ce789231404ca8fff7f693cdce398abf6d90fd5dae2b1847477196c243b1fbb", + "sha256:90d571c98d19a8b6e793b34aa4df4cee1e8fe2862d65cc49185a3a3d0a1a3996", + "sha256:9229d8613bd8401182868fe95688f7581673e1c18ff78855671a4b8284f47bcb", + "sha256:93a1f7d857c4fcf7cabb1178058182c789b30d85de379e04f64c15b7e88d66fb", + "sha256:967b93f21b426f23ca37329230d5bd122f25516ae2f24a9cea95a30023ff8283", + "sha256:9840be675de208d1f68f84d578eaa4d1a36eee70b16ae31ab933520c49ba1325", + "sha256:9862d077b9ffa015dbe3ce6c081bdf35135948cb89116e26667dd183550833d1", + "sha256:9b5b37c863ad5b0892cc7a4ceb1e435e5e6acd3f2f8d3e11fa56f08d3c67b820", + "sha256:9e64ca2dbea28807f8484c13f684a2f761e69ba2640ec49dacd342763cc265ef", + "sha256:9fe4eb0e7f50cdb99b26250d9328faef30b1175a5dbcfd6d0578d18456bac567", + "sha256:a01fe9f1e05025eacdd97590895e2737b9f851d0eb2e017ae9574d9a4f0b6252", + "sha256:a08ad95fcbd595803e0c4280671d808eb170a64ca3f2980dd38e7a72ed8d1fea", + "sha256:a4fe27dbbeec445e6e1291e61d61eb212ee9fed6e47998b27de71d70d3e8777d", + "sha256:a7d474c5c1f0b9405c1565fafdc4429fa7d986ccbec7ce55bc6a330f36409cad", + "sha256:a86dc177eb4c286c19d1823ac296299f59ed8106c9536d2b559f65836e0fb2c6", + "sha256:aa36c35e94ecdb478246dd60db12aba57cfcd0abcad43c927a8876f25734d496", + "sha256:ab915a57c65f7a29353c8014ac4be685c8e4a19e792a79fe133a8e101111438e", + "sha256:af55314407714fe77a68a9ccaab90fdb5deb57342585fd4a3a8102b6d4370080", + "sha256:afcb6b275c2d2ba5d8418bf30a9654fa978b4f819c2e8db6311b3525c86fe637", + "sha256:b27961d65639128336b7a7c3f0046dcc62a9443d5ef962e3c84170ac620cec47", + "sha256:b5b95787335c483cd5f29577f42bbe027a412c5431f2f80a749c80d040f7ca9f", + "sha256:b73a2b139782a07658fbf170fe4bcdf70fc597fae5ffe75e5b67674c27434a9f", + "sha256:b88aca5adbf4625e11118df45acac29616b425833c3be7a05ef63a6a4017bfdb", + "sha256:b992778d95b60a21c4d8d4a5f15aaab2bd3c3e16466a72d7f9bfd86e8cea0d4b", + "sha256:ba40b7ae0f81c7029583a338853f6607b6d83a341a3dcde8bed1ea58a3af1df9", + "sha256:baae005092e3f200de02699314ac8933ec20abf998ec0be39448f6605bce93df", + "sha256:c4bea08a6aad9195ac9b1be6b0c7e8a702a9cec57ce6b713698b4a5afa9c2e33", + "sha256:c6070bcf2173a7146bb9e4735b3c62b2accba459a6eae44deea0eb23e0035a23", + "sha256:c929f9a7249a11e4aa5c157091cfad7f49cc6b13f4eecf9b747104befd9f56f2", + "sha256:c97be90d70f7db3aa041d720bfb95f4869d6063fcdf2bb8333764d97e319b7d0", + "sha256:ce10ddfbe26ed5856d6902162f71b8fe08545380570a885b4ab56aecfdcb07f4", + "sha256:cf1f31f83d16ec344136359001c5e871915c6ab685a3d8dee38e2961b4c81730", + "sha256:d2b25b2eeb35707113b2d570cadc7c612a57f1c5d3e7bb2b13870fe284e08fc0", + "sha256:d33851d85537bbf0f6291ddc97926a754c8f041af759e0aa0230fe939168852b", + "sha256:e06cf4852ce8c4442a59bae5a3ea01162b8fcb49ab438d8548b8dc79375dad8a", + "sha256:e271beb2b1dabec5cd84eb488bdabf9758d22ad13471e9c356be07ad139b3012", + "sha256:f55d0f242c2d1fcdf802c8fabcff25a9d85550a4cf3a9cf5f2a6b5742c992839", + "sha256:f81cba651db8795f688c589dd11a4fbb834f2e59bbf9bb50908be36e416dc760", + "sha256:fa1fb1b61881c8405829c50e9cc5c875bfdbf685edf57a76817dfb50643e4a1a", + "sha256:fa48dac27f41b36735c807d1ab093a8386701bbf00eb6b89a0f69d9fa26b3671", + "sha256:fbfef0666ae9e07abfa2c54c212ac18a1f63e13e0760a769f70b5717742f3ece", + "sha256:fe7065e2215e4bba63dc00db9ae654c1ba3950a5fff691475a32f511142fcddb" ], "markers": "python_version >= '3.9'", - "version": "==3.11.12" + "version": "==3.11.13" }, "aiosignal": { "hashes": [ @@ -180,20 +180,20 @@ }, "boto3": { "hashes": [ - "sha256:39957eabdce009353d72d131046489fbbfa15891865d5f069f1e8bfa414e6b81", - "sha256:768c8a4d4a6227fe2258105efa086f1424cba5ca915a5eb2305b2cd979306ad1" + "sha256:024c37c2f85f4b907f5fc817d0db6fda7fd6ab3c6148ee4ed35fe7cecdf7db0c", + "sha256:1bbf8bbacb3932956b7020d9a2c49d72c64e21bae9397ba6d3aadffab5e192eb" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==1.36.22" + "version": "==1.37.4" }, "botocore": { "hashes": [ - "sha256:59520247d5a479731724f97c995d5a1c2aae3b303b324f39d99efcfad1d3019e", - "sha256:75d6b34acb0686ee4d54ff6eb285e78ccfe318407428769d1e3e13351714d890" + "sha256:7e15cd487617440e9eac3144044b6a2bd833d7f3e2bed6a2865693cc11489cc3", + "sha256:89130998c82d53f875a42646b692da507c9871b580fd1aea0f861bf9da36e41a" ], "markers": "python_version >= '3.8'", - "version": "==1.36.22" + "version": "==1.37.4" }, "certifi": { "hashes": [ @@ -273,7 +273,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "platform_python_implementation != 'PyPy'", + "markers": "python_version >= '3.8'", "version": "==1.17.1" }, "charset-normalizer": { @@ -384,46 +384,50 @@ }, "cryptography": { "hashes": [ - "sha256:00918d859aa4e57db8299607086f793fa7813ae2ff5a4637e318a25ef82730f7", - "sha256:1e8d181e90a777b63f3f0caa836844a1182f1f265687fac2115fcf245f5fbec3", - "sha256:1f9a92144fa0c877117e9748c74501bea842f93d21ee00b0cf922846d9d0b183", - "sha256:21377472ca4ada2906bc313168c9dc7b1d7ca417b63c1c3011d0c74b7de9ae69", - "sha256:24979e9f2040c953a94bf3c6782e67795a4c260734e5264dceea65c8f4bae64a", - "sha256:2a46a89ad3e6176223b632056f321bc7de36b9f9b93b2cc1cccf935a3849dc62", - "sha256:322eb03ecc62784536bc173f1483e76747aafeb69c8728df48537eb431cd1911", - "sha256:436df4f203482f41aad60ed1813811ac4ab102765ecae7a2bbb1dbb66dcff5a7", - "sha256:4f422e8c6a28cf8b7f883eb790695d6d45b0c385a2583073f3cec434cc705e1a", - "sha256:53f23339864b617a3dfc2b0ac8d5c432625c80014c25caac9082314e9de56f41", - "sha256:5fed5cd6102bb4eb843e3315d2bf25fede494509bddadb81e03a859c1bc17b83", - "sha256:610a83540765a8d8ce0f351ce42e26e53e1f774a6efb71eb1b41eb01d01c3d12", - "sha256:6c8acf6f3d1f47acb2248ec3ea261171a671f3d9428e34ad0357148d492c7864", - "sha256:6f76fdd6fd048576a04c5210d53aa04ca34d2ed63336d4abd306d0cbe298fddf", - "sha256:72198e2b5925155497a5a3e8c216c7fb3e64c16ccee11f0e7da272fa93b35c4c", - "sha256:887143b9ff6bad2b7570da75a7fe8bbf5f65276365ac259a5d2d5147a73775f2", - "sha256:888fcc3fce0c888785a4876ca55f9f43787f4c5c1cc1e2e0da71ad481ff82c5b", - "sha256:8e6a85a93d0642bd774460a86513c5d9d80b5c002ca9693e63f6e540f1815ed0", - "sha256:94f99f2b943b354a5b6307d7e8d19f5c423a794462bde2bf310c770ba052b1c4", - "sha256:9b336599e2cb77b1008cb2ac264b290803ec5e8e89d618a5e978ff5eb6f715d9", - "sha256:a2d8a7045e1ab9b9f803f0d9531ead85f90c5f2859e653b61497228b18452008", - "sha256:b8272f257cf1cbd3f2e120f14c68bff2b6bdfcc157fafdee84a1b795efd72862", - "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009", - "sha256:d9c5b9f698a83c8bd71e0f4d3f9f839ef244798e5ffe96febfa9714717db7af7", - "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f", - "sha256:df978682c1504fc93b3209de21aeabf2375cb1571d4e61907b3e7a2540e83026", - "sha256:e403f7f766ded778ecdb790da786b418a9f2394f36e8cc8b796cc056ab05f44f", - "sha256:eb3889330f2a4a148abead555399ec9a32b13b7c8ba969b72d8e500eb7ef84cd", - "sha256:f4daefc971c2d1f82f03097dc6f216744a6cd2ac0f04c68fb935ea2ba2a0d420", - "sha256:f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14", - "sha256:fd0ee90072861e276b0ff08bd627abec29e32a53b2be44e41dbcdf87cbee2b00" + "sha256:04abd71114848aa25edb28e225ab5f268096f44cf0127f3d36975bdf1bdf3390", + "sha256:0529b1d5a0105dd3731fa65680b45ce49da4d8115ea76e9da77a875396727b41", + "sha256:1bc312dfb7a6e5d66082c87c34c8a62176e684b6fe3d90fcfe1568de675e6688", + "sha256:268e4e9b177c76d569e8a145a6939eca9a5fec658c932348598818acf31ae9a5", + "sha256:29ecec49f3ba3f3849362854b7253a9f59799e3763b0c9d0826259a88efa02f1", + "sha256:2bf7bf75f7df9715f810d1b038870309342bff3069c5bd8c6b96128cb158668d", + "sha256:3b721b8b4d948b218c88cb8c45a01793483821e709afe5f622861fc6182b20a7", + "sha256:3c00b6b757b32ce0f62c574b78b939afab9eecaf597c4d624caca4f9e71e7843", + "sha256:3dc62975e31617badc19a906481deacdeb80b4bb454394b4098e3f2525a488c5", + "sha256:4973da6ca3db4405c54cd0b26d328be54c7747e89e284fcff166132eb7bccc9c", + "sha256:4e389622b6927d8133f314949a9812972711a111d577a5d1f4bee5e58736b80a", + "sha256:51e4de3af4ec3899d6d178a8c005226491c27c4ba84101bfb59c901e10ca9f79", + "sha256:5f6f90b72d8ccadb9c6e311c775c8305381db88374c65fa1a68250aa8a9cb3a6", + "sha256:6210c05941994290f3f7f175a4a57dbbb2afd9273657614c506d5976db061181", + "sha256:6f101b1f780f7fc613d040ca4bdf835c6ef3b00e9bd7125a4255ec574c7916e4", + "sha256:7bdcd82189759aba3816d1f729ce42ffded1ac304c151d0a8e89b9996ab863d5", + "sha256:7ca25849404be2f8e4b3c59483d9d3c51298a22c1c61a0e84415104dacaf5562", + "sha256:81276f0ea79a208d961c433a947029e1a15948966658cf6710bbabb60fcc2639", + "sha256:8cadc6e3b5a1f144a039ea08a0bdb03a2a92e19c46be3285123d32029f40a922", + "sha256:8e0ddd63e6bf1161800592c71ac794d3fb8001f2caebe0966e77c5234fa9efc3", + "sha256:909c97ab43a9c0c0b0ada7a1281430e4e5ec0458e6d9244c0e821bbf152f061d", + "sha256:96e7a5e9d6e71f9f4fca8eebfd603f8e86c5225bb18eb621b2c1e50b290a9471", + "sha256:9a1e657c0f4ea2a23304ee3f964db058c9e9e635cc7019c4aa21c330755ef6fd", + "sha256:9eb9d22b0a5d8fd9925a7764a054dca914000607dff201a24c791ff5c799e1fa", + "sha256:af4ff3e388f2fa7bff9f7f2b31b87d5651c45731d3e8cfa0944be43dff5cfbdb", + "sha256:b042d2a275c8cee83a4b7ae30c45a15e6a4baa65a179a0ec2d78ebb90e4f6699", + "sha256:bc821e161ae88bfe8088d11bb39caf2916562e0a2dc7b6d56714a48b784ef0bb", + "sha256:c505d61b6176aaf982c5717ce04e87da5abc9a36a5b39ac03905c4aafe8de7aa", + "sha256:c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "sha256:c7362add18b416b69d58c910caa217f980c5ef39b23a38a0880dfd87bdf8cd23", + "sha256:d03806036b4f89e3b13b6218fefea8d5312e450935b1a2d55f0524e2ed7c59d9", + "sha256:d1b3031093a366ac767b3feb8bcddb596671b3aaff82d4050f984da0c248b615", + "sha256:d1c3572526997b36f245a96a2b1713bf79ce99b271bbcf084beb6b9b075f29ea", + "sha256:efcfe97d1b3c79e486554efddeb8f6f53a4cdd4cf6086642784fa31fc384e1d7", + "sha256:f514ef4cd14bb6fb484b4a60203e912cfcb64f2ab139e88c2274511514bf7308" ], "markers": "python_version >= '3.7' and python_full_version not in '3.9.0, 3.9.1'", - "version": "==44.0.1" + "version": "==44.0.2" }, "dbrepo": { "hashes": [ - "sha256:e2312f0d3cff34934578a16b01d646d8309e3a3d1bb4cbda9f984acf97824e00" + "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" ], - "path": "./lib/dbrepo-1.6.5.tar.gz" + "path": "./lib/dbrepo-1.7.0.tar.gz" }, "events": { "hashes": [ @@ -458,11 +462,12 @@ }, "flask-cors": { "hashes": [ - "sha256:5aadb4b950c4e93745034594d9f3ea6591f734bb3662e16e255ffbf5e89c88ef", - "sha256:b9e307d082a9261c100d8fb0ba909eec6a228ed1b60a8315fd85f783d61910bc" + "sha256:6ccb38d16d6b72bbc156c1c3f192bc435bfcc3c2bc864b2df1eb9b2d97b2403c", + "sha256:fa5cb364ead54bbf401a26dbf03030c6b18fb2fcaf70408096a572b409586b0c" ], "index": "pypi", - "version": "==5.0.0" + "markers": "python_version >= '3.9' and python_version < '4.0'", + "version": "==5.0.1" }, "flask-httpauth": { "hashes": [ @@ -847,11 +852,11 @@ }, "mistune": { "hashes": [ - "sha256:02106ac2aa4f66e769debbfa028509a275069dcffce0dfa578edd7b991ee700a", - "sha256:e0740d635f515119f7d1feb6f9b192ee60f0cc649f80a8f944f905706a21654c" + "sha256:4b47731332315cdca99e0ded46fc0004001c1299ff773dfb48fbe1fd226de319", + "sha256:733bf018ba007e8b5f2d3a9eb624034f6ee26c4ea769a98ec533ee111d504dff" ], "markers": "python_version >= '3.8'", - "version": "==3.1.1" + "version": "==3.1.2" }, "multidict": { "hashes": [ @@ -1105,91 +1110,107 @@ }, "propcache": { "hashes": [ - "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4", - "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4", - "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a", - "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f", - "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9", - "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d", - "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e", - "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6", - "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf", - "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034", - "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d", - "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16", - "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30", - "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba", - "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95", - "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d", - "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae", - "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348", - "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2", - "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64", - "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce", - "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54", - "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629", - "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54", - "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1", - "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b", - "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf", - "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b", - "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587", - "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097", - "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea", - "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24", - "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7", - "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541", - "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6", - "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634", - "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3", - "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d", - "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034", - "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465", - "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2", - "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf", - "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1", - "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04", - "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5", - "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583", - "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb", - "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b", - "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c", - "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958", - "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc", - "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4", - "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82", - "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e", - "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce", - "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9", - "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518", - "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536", - "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505", - "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052", - "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff", - "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1", - "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f", - "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681", - "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347", - "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af", - "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246", - "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787", - "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0", - "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f", - "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439", - "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3", - "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6", - "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca", - "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec", - "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d", - "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3", - "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16", - "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717", - "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6", - "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd", - "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212" + "sha256:02df07041e0820cacc8f739510078f2aadcfd3fc57eaeeb16d5ded85c872c89e", + "sha256:03acd9ff19021bd0567582ac88f821b66883e158274183b9e5586f678984f8fe", + "sha256:03c091bb752349402f23ee43bb2bff6bd80ccab7c9df6b88ad4322258d6960fc", + "sha256:07700939b2cbd67bfb3b76a12e1412405d71019df00ca5697ce75e5ef789d829", + "sha256:0c3e893c4464ebd751b44ae76c12c5f5c1e4f6cbd6fbf67e3783cd93ad221863", + "sha256:119e244ab40f70a98c91906d4c1f4c5f2e68bd0b14e7ab0a06922038fae8a20f", + "sha256:11ae6a8a01b8a4dc79093b5d3ca2c8a4436f5ee251a9840d7790dccbd96cb649", + "sha256:15010f29fbed80e711db272909a074dc79858c6d28e2915704cfc487a8ac89c6", + "sha256:19d36bb351ad5554ff20f2ae75f88ce205b0748c38b146c75628577020351e3c", + "sha256:1c8f7d896a16da9455f882870a507567d4f58c53504dc2d4b1e1d386dfe4588a", + "sha256:2383a17385d9800b6eb5855c2f05ee550f803878f344f58b6e194de08b96352c", + "sha256:24c04f8fbf60094c531667b8207acbae54146661657a1b1be6d3ca7773b7a545", + "sha256:2578541776769b500bada3f8a4eeaf944530516b6e90c089aa368266ed70c49e", + "sha256:26a67e5c04e3119594d8cfae517f4b9330c395df07ea65eab16f3d559b7068fe", + "sha256:2b975528998de037dfbc10144b8aed9b8dd5a99ec547f14d1cb7c5665a43f075", + "sha256:2d15bc27163cd4df433e75f546b9ac31c1ba7b0b128bfb1b90df19082466ff57", + "sha256:2d913d36bdaf368637b4f88d554fb9cb9d53d6920b9c5563846555938d5450bf", + "sha256:3302c5287e504d23bb0e64d2a921d1eb4a03fb93a0a0aa3b53de059f5a5d737d", + "sha256:36ca5e9a21822cc1746023e88f5c0af6fce3af3b85d4520efb1ce4221bed75cc", + "sha256:3b812b3cb6caacd072276ac0492d249f210006c57726b6484a1e1805b3cfeea0", + "sha256:3c6ec957025bf32b15cbc6b67afe233c65b30005e4c55fe5768e4bb518d712f1", + "sha256:41de3da5458edd5678b0f6ff66691507f9885f5fe6a0fb99a5d10d10c0fd2d64", + "sha256:42924dc0c9d73e49908e35bbdec87adedd651ea24c53c29cac103ede0ea1d340", + "sha256:4544699674faf66fb6b4473a1518ae4999c1b614f0b8297b1cef96bac25381db", + "sha256:46ed02532cb66612d42ae5c3929b5e98ae330ea0f3900bc66ec5f4862069519b", + "sha256:49ea05212a529c2caffe411e25a59308b07d6e10bf2505d77da72891f9a05641", + "sha256:4fa0e7c9c3cf7c276d4f6ab9af8adddc127d04e0fcabede315904d2ff76db626", + "sha256:507c5357a8d8b4593b97fb669c50598f4e6cccbbf77e22fa9598aba78292b4d7", + "sha256:549722908de62aa0b47a78b90531c022fa6e139f9166be634f667ff45632cc92", + "sha256:58e6d2a5a7cb3e5f166fd58e71e9a4ff504be9dc61b88167e75f835da5764d07", + "sha256:5a16167118677d94bb48bfcd91e420088854eb0737b76ec374b91498fb77a70e", + "sha256:5d62c4f6706bff5d8a52fd51fec6069bef69e7202ed481486c0bc3874912c787", + "sha256:5fa159dcee5dba00c1def3231c249cf261185189205073bde13797e57dd7540a", + "sha256:6032231d4a5abd67c7f71168fd64a47b6b451fbcb91c8397c2f7610e67683810", + "sha256:63f26258a163c34542c24808f03d734b338da66ba91f410a703e505c8485791d", + "sha256:65a37714b8ad9aba5780325228598a5b16c47ba0f8aeb3dc0514701e4413d7c0", + "sha256:67054e47c01b7b349b94ed0840ccae075449503cf1fdd0a1fdd98ab5ddc2667b", + "sha256:67dda3c7325691c2081510e92c561f465ba61b975f481735aefdfc845d2cd043", + "sha256:6985a593417cdbc94c7f9c3403747335e450c1599da1647a5af76539672464d3", + "sha256:6a1948df1bb1d56b5e7b0553c0fa04fd0e320997ae99689488201f19fa90d2e7", + "sha256:6b5b7fd6ee7b54e01759f2044f936dcf7dea6e7585f35490f7ca0420fe723c0d", + "sha256:6c929916cbdb540d3407c66f19f73387f43e7c12fa318a66f64ac99da601bcdf", + "sha256:6f4d7a7c0aff92e8354cceca6fe223973ddf08401047920df0fcb24be2bd5138", + "sha256:728af36011bb5d344c4fe4af79cfe186729efb649d2f8b395d1572fb088a996c", + "sha256:742840d1d0438eb7ea4280f3347598f507a199a35a08294afdcc560c3739989d", + "sha256:75e872573220d1ee2305b35c9813626e620768248425f58798413e9c39741f46", + "sha256:794c3dd744fad478b6232289c866c25406ecdfc47e294618bdf1697e69bd64a6", + "sha256:7c0fdbdf6983526e269e5a8d53b7ae3622dd6998468821d660d0daf72779aefa", + "sha256:7c5f5290799a3f6539cc5e6f474c3e5c5fbeba74a5e1e5be75587746a940d51e", + "sha256:7c6e7e4f9167fddc438cd653d826f2222222564daed4116a02a184b464d3ef05", + "sha256:7cedd25e5f678f7738da38037435b340694ab34d424938041aa630d8bac42663", + "sha256:7e2e068a83552ddf7a39a99488bcba05ac13454fb205c847674da0352602082f", + "sha256:8319293e85feadbbfe2150a5659dbc2ebc4afdeaf7d98936fb9a2f2ba0d4c35c", + "sha256:8526b0941ec5a40220fc4dfde76aed58808e2b309c03e9fa8e2260083ef7157f", + "sha256:8884ba1a0fe7210b775106b25850f5e5a9dc3c840d1ae9924ee6ea2eb3acbfe7", + "sha256:8cb625bcb5add899cb8ba7bf716ec1d3e8f7cdea9b0713fa99eadf73b6d4986f", + "sha256:8d663fd71491dde7dfdfc899d13a067a94198e90695b4321084c6e450743b8c7", + "sha256:8ee1983728964d6070ab443399c476de93d5d741f71e8f6e7880a065f878e0b9", + "sha256:997e7b8f173a391987df40f3b52c423e5850be6f6df0dcfb5376365440b56667", + "sha256:9be90eebc9842a93ef8335291f57b3b7488ac24f70df96a6034a13cb58e6ff86", + "sha256:9ddd49258610499aab83b4f5b61b32e11fce873586282a0e972e5ab3bcadee51", + "sha256:9ecde3671e62eeb99e977f5221abcf40c208f69b5eb986b061ccec317c82ebd0", + "sha256:9ff4e9ecb6e4b363430edf2c6e50173a63e0820e549918adef70515f87ced19a", + "sha256:a254537b9b696ede293bfdbc0a65200e8e4507bc9f37831e2a0318a9b333c85c", + "sha256:a2b9bf8c79b660d0ca1ad95e587818c30ccdb11f787657458d6f26a1ea18c568", + "sha256:a61a68d630e812b67b5bf097ab84e2cd79b48c792857dc10ba8a223f5b06a2af", + "sha256:a7080b0159ce05f179cfac592cda1a82898ca9cd097dacf8ea20ae33474fbb25", + "sha256:a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5", + "sha256:a94ffc66738da99232ddffcf7910e0f69e2bbe3a0802e54426dbf0714e1c2ffe", + "sha256:aa806bbc13eac1ab6291ed21ecd2dd426063ca5417dd507e6be58de20e58dfcf", + "sha256:b0c1a133d42c6fc1f5fbcf5c91331657a1ff822e87989bf4a6e2e39b818d0ee9", + "sha256:b58229a844931bca61b3a20efd2be2a2acb4ad1622fc026504309a6883686fbf", + "sha256:bb2f144c6d98bb5cbc94adeb0447cfd4c0f991341baa68eee3f3b0c9c0e83767", + "sha256:be90c94570840939fecedf99fa72839aed70b0ced449b415c85e01ae67422c90", + "sha256:bf0d9a171908f32d54f651648c7290397b8792f4303821c42a74e7805bfb813c", + "sha256:bf15fc0b45914d9d1b706f7c9c4f66f2b7b053e9517e40123e137e8ca8958b3d", + "sha256:bf4298f366ca7e1ad1d21bbb58300a6985015909964077afd37559084590c929", + "sha256:c441c841e82c5ba7a85ad25986014be8d7849c3cfbdb6004541873505929a74e", + "sha256:cacea77ef7a2195f04f9279297684955e3d1ae4241092ff0cfcef532bb7a1c32", + "sha256:cd54895e4ae7d32f1e3dd91261df46ee7483a735017dc6f987904f194aa5fd14", + "sha256:d1323cd04d6e92150bcc79d0174ce347ed4b349d748b9358fd2e497b121e03c8", + "sha256:d383bf5e045d7f9d239b38e6acadd7b7fdf6c0087259a84ae3475d18e9a2ae8b", + "sha256:d3e7420211f5a65a54675fd860ea04173cde60a7cc20ccfbafcccd155225f8bc", + "sha256:d8074c5dd61c8a3e915fa8fc04754fa55cfa5978200d2daa1e2d4294c1f136aa", + "sha256:df03cd88f95b1b99052b52b1bb92173229d7a674df0ab06d2b25765ee8404bce", + "sha256:e45377d5d6fefe1677da2a2c07b024a6dac782088e37c0b1efea4cfe2b1be19b", + "sha256:e53d19c2bf7d0d1e6998a7e693c7e87300dd971808e6618964621ccd0e01fe4e", + "sha256:e560fd75aaf3e5693b91bcaddd8b314f4d57e99aef8a6c6dc692f935cc1e6bbf", + "sha256:ec5060592d83454e8063e487696ac3783cc48c9a329498bafae0d972bc7816c9", + "sha256:ecc2920630283e0783c22e2ac94427f8cca29a04cfdf331467d4f661f4072dac", + "sha256:ed7161bccab7696a473fe7ddb619c1d75963732b37da4618ba12e60899fefe4f", + "sha256:ee0bd3a7b2e184e88d25c9baa6a9dc609ba25b76daae942edfb14499ac7ec374", + "sha256:ee25f1ac091def37c4b59d192bbe3a206298feeb89132a470325bf76ad122a1e", + "sha256:efa44f64c37cc30c9f05932c740a8b40ce359f51882c70883cc95feac842da4d", + "sha256:f47d52fd9b2ac418c4890aad2f6d21a6b96183c98021f0a48497a904199f006e", + "sha256:f857034dc68d5ceb30fb60afb6ff2103087aea10a01b613985610e007053a121", + "sha256:fb91d20fa2d3b13deea98a690534697742029f4fb83673a3501ae6e3746508b5", + "sha256:fddb8870bdb83456a489ab67c6b3040a8d5a55069aa6f72f9d872235fbc52f54" ], "markers": "python_version >= '3.9'", - "version": "==0.2.1" + "version": "==0.3.0" }, "pycparser": { "hashes": [ @@ -1453,128 +1474,128 @@ }, "rpds-py": { "hashes": [ - "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518", - "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059", - "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61", - "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5", - "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9", - "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543", - "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2", - "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a", - "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d", - "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56", - "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d", - "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd", - "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b", - "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4", - "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99", - "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d", - "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd", - "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe", - "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1", - "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e", - "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f", - "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3", - "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca", - "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d", - "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e", - "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc", - "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea", - "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38", - "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b", - "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c", - "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff", - "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723", - "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e", - "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493", - "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6", - "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83", - "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091", - "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1", - "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627", - "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1", - "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728", - "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16", - "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c", - "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45", - "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7", - "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a", - "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730", - "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967", - "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25", - "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24", - "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055", - "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d", - "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0", - "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e", - "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7", - "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c", - "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f", - "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd", - "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652", - "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8", - "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11", - "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333", - "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96", - "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64", - "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b", - "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e", - "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c", - "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9", - "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec", - "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb", - "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37", - "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad", - "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9", - "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c", - "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf", - "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4", - "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f", - "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d", - "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09", - "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d", - "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566", - "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74", - "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338", - "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15", - "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c", - "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648", - "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84", - "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3", - "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123", - "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520", - "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831", - "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e", - "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf", - "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b", - "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2", - "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3", - "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130", - "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b", - "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de", - "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5", - "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d", - "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00", - "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e" + "sha256:09cd7dbcb673eb60518231e02874df66ec1296c01a4fcd733875755c02014b19", + "sha256:0f3288930b947cbebe767f84cf618d2cbe0b13be476e749da0e6a009f986248c", + "sha256:0fced9fd4a07a1ded1bac7e961ddd9753dd5d8b755ba8e05acba54a21f5f1522", + "sha256:112b8774b0b4ee22368fec42749b94366bd9b536f8f74c3d4175d4395f5cbd31", + "sha256:11dd60b2ffddba85715d8a66bb39b95ddbe389ad2cfcf42c833f1bcde0878eaf", + "sha256:178f8a60fc24511c0eb756af741c476b87b610dba83270fce1e5a430204566a4", + "sha256:1b08027489ba8fedde72ddd233a5ea411b85a6ed78175f40285bd401bde7466d", + "sha256:1bf5be5ba34e19be579ae873da515a2836a2166d8d7ee43be6ff909eda42b72b", + "sha256:1ed7de3c86721b4e83ac440751329ec6a1102229aa18163f84c75b06b525ad7e", + "sha256:1eedaaccc9bb66581d4ae7c50e15856e335e57ef2734dbc5fd8ba3e2a4ab3cb6", + "sha256:243241c95174b5fb7204c04595852fe3943cc41f47aa14c3828bc18cd9d3b2d6", + "sha256:26bb3e8de93443d55e2e748e9fd87deb5f8075ca7bc0502cfc8be8687d69a2ec", + "sha256:271fa2184cf28bdded86bb6217c8e08d3a169fe0bbe9be5e8d96e8476b707122", + "sha256:28358c54fffadf0ae893f6c1050e8f8853e45df22483b7fff2f6ab6152f5d8bf", + "sha256:285019078537949cecd0190f3690a0b0125ff743d6a53dfeb7a4e6787af154f5", + "sha256:2893d778d4671ee627bac4037a075168b2673c57186fb1a57e993465dbd79a93", + "sha256:2a54027554ce9b129fc3d633c92fa33b30de9f08bc61b32c053dc9b537266fed", + "sha256:2c6ae11e6e93728d86aafc51ced98b1658a0080a7dd9417d24bfb955bb09c3c2", + "sha256:2cfa07c346a7ad07019c33fb9a63cf3acb1f5363c33bc73014e20d9fe8b01cdd", + "sha256:35d5631ce0af26318dba0ae0ac941c534453e42f569011585cb323b7774502a5", + "sha256:3614d280bf7aab0d3721b5ce0e73434acb90a2c993121b6e81a1c15c665298ac", + "sha256:3902df19540e9af4cc0c3ae75974c65d2c156b9257e91f5101a51f99136d834c", + "sha256:3aaf141d39f45322e44fc2c742e4b8b4098ead5317e5f884770c8df0c332da70", + "sha256:3d8abf7896a91fb97e7977d1aadfcc2c80415d6dc2f1d0fca5b8d0df247248f3", + "sha256:3e77febf227a1dc3220159355dba68faa13f8dca9335d97504abf428469fb18b", + "sha256:3e9212f52074fc9d72cf242a84063787ab8e21e0950d4d6709886fb62bcb91d5", + "sha256:3ee9d6f0b38efb22ad94c3b68ffebe4c47865cdf4b17f6806d6c674e1feb4246", + "sha256:4233df01a250b3984465faed12ad472f035b7cd5240ea3f7c76b7a7016084495", + "sha256:4263320ed887ed843f85beba67f8b2d1483b5947f2dc73a8b068924558bfeace", + "sha256:4ab923167cfd945abb9b51a407407cf19f5bee35001221f2911dc85ffd35ff4f", + "sha256:4caafd1a22e5eaa3732acb7672a497123354bef79a9d7ceed43387d25025e935", + "sha256:50fb62f8d8364978478b12d5f03bf028c6bc2af04082479299139dc26edf4c64", + "sha256:55ff4151cfd4bc635e51cfb1c59ac9f7196b256b12e3a57deb9e5742e65941ad", + "sha256:5b98b6c953e5c2bda51ab4d5b4f172617d462eebc7f4bfdc7c7e6b423f6da957", + "sha256:5c9ff044eb07c8468594d12602291c635da292308c8c619244e30698e7fc455a", + "sha256:5e9c206a1abc27e0588cf8b7c8246e51f1a16a103734f7750830a1ccb63f557a", + "sha256:5fb89edee2fa237584e532fbf78f0ddd1e49a47c7c8cfa153ab4849dc72a35e6", + "sha256:633462ef7e61d839171bf206551d5ab42b30b71cac8f10a64a662536e057fdef", + "sha256:66f8d2a17e5838dd6fb9be6baaba8e75ae2f5fa6b6b755d597184bfcd3cb0eba", + "sha256:6959bb9928c5c999aba4a3f5a6799d571ddc2c59ff49917ecf55be2bbb4e3722", + "sha256:698a79d295626ee292d1730bc2ef6e70a3ab135b1d79ada8fde3ed0047b65a10", + "sha256:721f9c4011b443b6e84505fc00cc7aadc9d1743f1c988e4c89353e19c4a968ee", + "sha256:72e680c1518733b73c994361e4b06441b92e973ef7d9449feec72e8ee4f713da", + "sha256:75307599f0d25bf6937248e5ac4e3bde5ea72ae6618623b86146ccc7845ed00b", + "sha256:754fba3084b70162a6b91efceee8a3f06b19e43dac3f71841662053c0584209a", + "sha256:759462b2d0aa5a04be5b3e37fb8183615f47014ae6b116e17036b131985cb731", + "sha256:7938c7b0599a05246d704b3f5e01be91a93b411d0d6cc62275f025293b8a11ce", + "sha256:7b77e07233925bd33fc0022b8537774423e4c6680b6436316c5075e79b6384f4", + "sha256:7e5413d2e2d86025e73f05510ad23dad5950ab8417b7fc6beaad99be8077138b", + "sha256:7f3240dcfa14d198dba24b8b9cb3b108c06b68d45b7babd9eefc1038fdf7e707", + "sha256:7f9682a8f71acdf59fd554b82b1c12f517118ee72c0f3944eda461606dfe7eb9", + "sha256:8d67beb6002441faef8251c45e24994de32c4c8686f7356a1f601ad7c466f7c3", + "sha256:9441af1d25aed96901f97ad83d5c3e35e6cd21a25ca5e4916c82d7dd0490a4fa", + "sha256:98b257ae1e83f81fb947a363a274c4eb66640212516becaff7bef09a5dceacaa", + "sha256:9e9f3a3ac919406bc0414bbbd76c6af99253c507150191ea79fab42fdb35982a", + "sha256:a1c66e71ecfd2a4acf0e4bd75e7a3605afa8f9b28a3b497e4ba962719df2be57", + "sha256:a1e17d8dc8e57d8e0fd21f8f0f0a5211b3fa258b2e444c2053471ef93fe25a00", + "sha256:a20cb698c4a59c534c6701b1c24a968ff2768b18ea2991f886bd8985ce17a89f", + "sha256:a970bfaf130c29a679b1d0a6e0f867483cea455ab1535fb427566a475078f27f", + "sha256:a98f510d86f689fcb486dc59e6e363af04151e5260ad1bdddb5625c10f1e95f8", + "sha256:a9d3b728f5a5873d84cba997b9d617c6090ca5721caaa691f3b1a78c60adc057", + "sha256:ad76f44f70aac3a54ceb1813ca630c53415da3a24fd93c570b2dfb4856591017", + "sha256:ae28144c1daa61366205d32abd8c90372790ff79fc60c1a8ad7fd3c8553a600e", + "sha256:b03a8d50b137ee758e4c73638b10747b7c39988eb8e6cd11abb7084266455165", + "sha256:b5a96fcac2f18e5a0a23a75cd27ce2656c66c11c127b0318e508aab436b77428", + "sha256:b5ef909a37e9738d146519657a1aab4584018746a18f71c692f2f22168ece40c", + "sha256:b79f5ced71efd70414a9a80bbbfaa7160da307723166f09b69773153bf17c590", + "sha256:b91cceb5add79ee563bd1f70b30896bd63bc5f78a11c1f00a1e931729ca4f1f4", + "sha256:b92f5654157de1379c509b15acec9d12ecf6e3bc1996571b6cb82a4302060447", + "sha256:c04ca91dda8a61584165825907f5c967ca09e9c65fe8966ee753a3f2b019fe1e", + "sha256:c1f8afa346ccd59e4e5630d5abb67aba6a9812fddf764fd7eb11f382a345f8cc", + "sha256:c5334a71f7dc1160382d45997e29f2637c02f8a26af41073189d79b95d3321f1", + "sha256:c617d7453a80e29d9973b926983b1e700a9377dbe021faa36041c78537d7b08c", + "sha256:c632419c3870507ca20a37c8f8f5352317aca097639e524ad129f58c125c61c6", + "sha256:c6760211eee3a76316cf328f5a8bd695b47b1626d21c8a27fb3b2473a884d597", + "sha256:c698d123ce5d8f2d0cd17f73336615f6a2e3bdcedac07a1291bb4d8e7d82a05a", + "sha256:c76b32eb2ab650a29e423525e84eb197c45504b1c1e6e17b6cc91fcfeb1a4b1d", + "sha256:c8f7e90b948dc9dcfff8003f1ea3af08b29c062f681c05fd798e36daa3f7e3e8", + "sha256:c9e799dac1ffbe7b10c1fd42fe4cd51371a549c6e108249bde9cd1200e8f59b4", + "sha256:cafa48f2133d4daa028473ede7d81cd1b9f9e6925e9e4003ebdf77010ee02f35", + "sha256:ce473a2351c018b06dd8d30d5da8ab5a0831056cc53b2006e2a8028172c37ce5", + "sha256:d31ed4987d72aabdf521eddfb6a72988703c091cfc0064330b9e5f8d6a042ff5", + "sha256:d550d7e9e7d8676b183b37d65b5cd8de13676a738973d330b59dc8312df9c5dc", + "sha256:d6adb81564af0cd428910f83fa7da46ce9ad47c56c0b22b50872bc4515d91966", + "sha256:d6f6512a90bd5cd9030a6237f5346f046c6f0e40af98657568fa45695d4de59d", + "sha256:d7031d493c4465dbc8d40bd6cafefef4bd472b17db0ab94c53e7909ee781b9ef", + "sha256:d9f75a06ecc68f159d5d7603b734e1ff6daa9497a929150f794013aa9f6e3f12", + "sha256:db7707dde9143a67b8812c7e66aeb2d843fe33cc8e374170f4d2c50bd8f2472d", + "sha256:e0397dd0b3955c61ef9b22838144aa4bef6f0796ba5cc8edfc64d468b93798b4", + "sha256:e0df046f2266e8586cf09d00588302a32923eb6386ced0ca5c9deade6af9a149", + "sha256:e14f86b871ea74c3fddc9a40e947d6a5d09def5adc2076ee61fb910a9014fb35", + "sha256:e5963ea87f88bddf7edd59644a35a0feecf75f8985430124c253612d4f7d27ae", + "sha256:e768267cbe051dd8d1c5305ba690bb153204a09bf2e3de3ae530de955f5b5580", + "sha256:e9cb79ecedfc156c0692257ac7ed415243b6c35dd969baa461a6888fc79f2f07", + "sha256:ed6f011bedca8585787e5082cce081bac3d30f54520097b2411351b3574e1219", + "sha256:f3429fb8e15b20961efca8c8b21432623d85db2228cc73fe22756c6637aa39e7", + "sha256:f35eff113ad430b5272bbfc18ba111c66ff525828f24898b4e146eb479a2cdda", + "sha256:f3a6cb95074777f1ecda2ca4fa7717caa9ee6e534f42b7575a8f0d4cb0c24013", + "sha256:f7356a6da0562190558c4fcc14f0281db191cdf4cb96e7604c06acfcee96df15", + "sha256:f88626e3f5e57432e6191cd0c5d6d6b319b635e70b40be2ffba713053e5147dd", + "sha256:fad784a31869747df4ac968a351e070c06ca377549e4ace94775aaa3ab33ee06", + "sha256:fc869af5cba24d45fb0399b0cfdbcefcf6910bf4dee5d74036a57cf5264b3ff4", + "sha256:fee513135b5a58f3bb6d89e48326cd5aa308e4bcdf2f7d59f67c861ada482bf8" ], "markers": "python_version >= '3.9'", - "version": "==0.22.3" + "version": "==0.23.1" }, "s3transfer": { "hashes": [ - "sha256:3b39185cb72f5acc77db1a58b6e25b977f28d20496b6e58d6813d75f464d632f", - "sha256:be6ecb39fadd986ef1701097771f87e4d2f821f27f6071c872143884d2950fbc" + "sha256:ca855bdeb885174b5ffa95b9913622459d4ad8e331fc98eb01e6d5eb6a30655d", + "sha256:edae4977e3a122445660c7c114bba949f9d191bae3b34a096f18a1c8c354527a" ], "markers": "python_version >= '3.8'", - "version": "==0.11.2" + "version": "==0.11.3" }, "setuptools": { "hashes": [ - "sha256:c5afc8f407c626b8313a86e10311dd3f661c6cd9c09d4bf8c15c0e11f9f2b0e6", - "sha256:e3982f444617239225d675215d51f6ba05f845d4eec313da4418fdbb56fb27e3" + "sha256:4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2", + "sha256:558e47c15f1811c1fa7adbd0096669bf76c1d3f433f58324df69f3f5ecac4e8f" ], "markers": "python_version >= '3.9'", - "version": "==75.8.0" + "version": "==75.8.2" }, "six": { "hashes": [ @@ -1886,7 +1907,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "platform_python_implementation != 'PyPy'", + "markers": "python_version >= '3.8'", "version": "==1.17.1" }, "charset-normalizer": { @@ -2169,12 +2190,12 @@ }, "pytest": { "hashes": [ - "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", - "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761" + "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", + "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==8.3.4" + "version": "==8.3.5" }, "python-dateutil": { "hashes": [ diff --git a/dbrepo-analyse-service/build.sh b/dbrepo-analyse-service/build.sh deleted file mode 100755 index 8460f7b7f5d906a14a2f127ed1c86c3a5637a6de..0000000000000000000000000000000000000000 --- a/dbrepo-analyse-service/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# needed for MariaDB Connector/C -apt update && apt install -y curl gcc libmariadb3 libmariadb-dev - -python3 -m venv ./dbrepo-analyse-service/venv -source ./dbrepo-analyse-service/venv/bin/activate -PIPENV_PIPFILE=./dbrepo-analyse-service/Pipfile pipenv install --dev \ No newline at end of file diff --git a/dbrepo-analyse-service/lib/dbrepo-1.6.5-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.6.5-py3-none-any.whl deleted file mode 100644 index 2a5cda78c55f725af708e7ff1d7f4b281586613d..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.6.5-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.6.5.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.6.5.tar.gz deleted file mode 100644 index 5117abc68daa9a4e776392855c6022c8d20d5d31..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.6.5.tar.gz and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl deleted file mode 100644 index b4ceb85027aa4164b602f876080c0f8979534b0e..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0.tar.gz deleted file mode 100644 index e8de842c2945231eb547737851eb6269ee5ba84e..0000000000000000000000000000000000000000 Binary files a/dbrepo-analyse-service/lib/dbrepo-1.6.5rc0.tar.gz and /dev/null differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..b58eb4bc6134164a5c99959cc35adc1160bdeff4 Binary files /dev/null and b/dbrepo-analyse-service/lib/dbrepo-1.7.0-py3-none-any.whl differ diff --git a/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz b/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..56e2f0cd8d4a18039de95dbecfeafe997baab3ce Binary files /dev/null and b/dbrepo-analyse-service/lib/dbrepo-1.7.0.tar.gz differ diff --git a/dbrepo-analyse-service/test.sh b/dbrepo-analyse-service/test.sh deleted file mode 100755 index f77b0f294c88e510cb0373da9a6f3bab69c2f8f7..0000000000000000000000000000000000000000 --- a/dbrepo-analyse-service/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -source ./dbrepo-analyse-service/venv/bin/activate -cd ./dbrepo-analyse-service/ && coverage run -m pytest test/test_determine_dt.py test/test_determine_pk.py test/test_s3_client.py --junitxml=report.xml && coverage html --omit="test/*" && coverage report --omit="test/*" > ./coverage.txt \ No newline at end of file diff --git a/dbrepo-analyse-service/tests/test_s3_client.py b/dbrepo-analyse-service/tests/test_s3_client.py index 4ab03078242ae5f68bd01e23887b603c6de239f9..cbc47a67409caa05a2b54738cc36ccc9534cdaa3 100644 --- a/dbrepo-analyse-service/tests/test_s3_client.py +++ b/dbrepo-analyse-service/tests/test_s3_client.py @@ -117,19 +117,6 @@ class S3ClientTest(unittest.TestCase): else: self.fail('FileNotFoundError not raised') - # @Test - def test_bucket_exists_notExists_fails(self): - - # test - try: - S3Client().bucket_exists_or_exit("idnonotexist") - except FileNotFoundError: - pass - except Exception: - self.fail('unexpected exception raised') - else: - self.fail('FileNotFoundError not raised') - if __name__ == '__main__': unittest.main() diff --git a/dbrepo-auth-service/dbrepo-realm.json b/dbrepo-auth-service/dbrepo-realm.json index bac2ddc9782822da0fac897c7bbc9a2f8ae84ed6..9c6049095c2501876c686b3d03a5f3f92c42017d 100644 --- a/dbrepo-auth-service/dbrepo-realm.json +++ b/dbrepo-auth-service/dbrepo-realm.json @@ -35,16 +35,16 @@ "duplicateEmailsAllowed" : false, "resetPasswordAllowed" : false, "editUsernameAllowed" : false, - "bruteForceProtected" : false, + "bruteForceProtected" : true, "permanentLockout" : false, "maxTemporaryLockouts" : 0, "bruteForceStrategy" : "MULTIPLE", "maxFailureWaitSeconds" : 900, "minimumQuickLoginWaitSeconds" : 60, "waitIncrementSeconds" : 60, - "quickLoginCheckMilliSeconds" : 1000, - "maxDeltaTimeSeconds" : 43200, - "failureFactor" : 30, + "quickLoginCheckMilliSeconds" : 1, + "maxDeltaTimeSeconds" : 1036800, + "failureFactor" : 10, "roles" : { "realm" : [ { "id" : "48f38342-1e3f-427a-995d-c436eaee65cb", @@ -68,55 +68,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c", - "name" : "default-system-roles", - "description" : "${default-system-roles}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "143ba359-5fa2-451e-8296-43ecf20bb251", - "name" : "update-semantic-concept", - "description" : "${update-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c", - "name" : "escalated-container-handling", - "description" : "${escalated-container-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-container", "delete-container" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe", - "name" : "list-tables", - "description" : "${list-tables}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3", - "name" : "default-database-handling", - "description" : "${default-database-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "74648f9a-777e-4ef9-b97b-4c5d749d862f", "name" : "update-search-index", @@ -141,36 +92,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "d89a2881-b642-4abb-b990-196e71372f6b", - "name" : "default-table-handling", - "description" : "${default-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44", - "name" : "create-database-view", - "description" : "${create-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7", - "name" : "default-semantics-handling", - "description" : "${default-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "fe4a01f3-6590-4df6-9ade-5a9c1fae4736", "name" : "create-semantic-unit", @@ -179,25 +100,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8", - "name" : "update-table-statistic", - "description" : "${update-table-statistic}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a", - "name" : "escalated-user-handling", - "description" : "${escalated-user-handling}", - "composite" : true, - "composites" : { - "realm" : [ "find-user" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "be4e1aba-e276-4241-b6ea-01dce6c52f8b", "name" : "find-container", @@ -212,7 +114,7 @@ "description" : "${default-researcher-roles}", "composite" : true, "composites" : { - "realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-view-handling" ] + "realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling", "default-storage-roles", "default-view-handling" ] }, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", @@ -282,213 +184,490 @@ "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "e9854bbb-4580-4757-b1ae-305934173249", - "name" : "create-database-access", - "description" : "${create-database-access}", + "id" : "535f1484-4514-4d24-8d97-e3f6c11a426b", + "name" : "create-container", + "description" : "${create-container}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e", - "name" : "list-databases", - "description" : "${list-databases}", + "id" : "e1383fb7-d54c-4732-9146-93030eb2ca50", + "name" : "escalated-query-handling", + "description" : "${escalated-query-handling}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a", - "name" : "default-view-handling", - "description" : "${default-view-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ] - }, + "id" : "e4cfdc4d-2373-477b-a8df-161db99aba00", + "name" : "create-foreign-identifier", + "description" : "${create-foreign-identifier}", + "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "535f1484-4514-4d24-8d97-e3f6c11a426b", - "name" : "create-container", - "description" : "${create-container}", + "id" : "be051d45-cd74-4b13-8a45-f2d3351bd995", + "name" : "table-semantic-analyse", + "description" : "${table-semantic-analyse}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558", - "name" : "create-maintenance-message", - "description" : "${create-maintenance-message}", + "id" : "272a79a7-e282-4261-8f7d-5d5d1364243a", + "name" : "update-maintenance-message", + "description" : "${update-maintenance-message}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "973f0999-cc70-4b28-9f43-979c470bea8e", - "name" : "default-data-steward-roles", - "description" : "${default-data-steward-roles}", - "composite" : true, - "composites" : { - "realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling" ] - }, + "id" : "b05e9b2b-748d-490b-949b-e78655bf7805", + "name" : "check-foreign-database-access", + "description" : "${check-foreign-database-access}", + "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "e1383fb7-d54c-4732-9146-93030eb2ca50", - "name" : "escalated-query-handling", - "description" : "${escalated-query-handling}", + "id" : "c047d521-cec3-4444-86c4-aef098489b7b", + "name" : "delete-maintenance-message", + "description" : "${delete-maintenance-message}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2", - "name" : "find-user", - "description" : "${find-user}", + "id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76", + "name" : "update-database-view", + "description" : "${update-database-view}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "e4cfdc4d-2373-477b-a8df-161db99aba00", - "name" : "create-foreign-identifier", - "description" : "${create-foreign-identifier}", + "id" : "88f82262-be80-4d18-9fb4-5529da031f33", + "name" : "system", + "description" : "${system}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df", - "name" : "escalated-semantics-handling", - "description" : "${escalated-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ] - }, + "id" : "e14ab76b-1c24-484d-ae2d-478b8457edea", + "name" : "list-licenses", + "description" : "${list-licenses}", + "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "09147c48-273b-450b-8b11-7ef9b9245244", - "name" : "export-table-data", - "description" : "${export-table-data}", + "id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd", + "name" : "modify-foreign-table-column-semantics", + "description" : "${modify-foreign-table-column-semantics}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "d14af590-60a8-4d75-b864-40ee0165bd7f", - "name" : "delete-database-access", - "description" : "${delete-database-access}", + "id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8", + "name" : "list-database-views", + "description" : "${list-database-views}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "be051d45-cd74-4b13-8a45-f2d3351bd995", - "name" : "table-semantic-analyse", - "description" : "${table-semantic-analyse}", + "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", + "name" : "default-roles-dbrepo", + "description" : "${role_default-roles}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "272a79a7-e282-4261-8f7d-5d5d1364243a", - "name" : "update-maintenance-message", - "description" : "${update-maintenance-message}", + "id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443", + "name" : "update-ontology", + "description" : "${update-ontology}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77", - "name" : "update-table", - "description" : "${update-table}", + "id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d", + "name" : "export-query-data", + "description" : "${export-query-data}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "64c16bfb-2015-48ad-a23f-637ff24419cb", - "name" : "default-query-handling", - "description" : "${default-query-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ] - }, + "id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a", + "name" : "default-broker-handling", + "description" : "${default-broker-handling}", + "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "b05e9b2b-748d-490b-949b-e78655bf7805", - "name" : "check-foreign-database-access", - "description" : "${check-foreign-database-access}", + "id" : "71874bde-64a5-4a69-8685-d8998303a80c", + "name" : "delete-table-data", + "description" : "${delete-table-data}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "c047d521-cec3-4444-86c4-aef098489b7b", - "name" : "delete-maintenance-message", - "description" : "${delete-maintenance-message}", + "id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829", + "name" : "delete-container", + "description" : "${delete-container}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "df20b7d1-8d30-4a99-80eb-e8195fab0e76", - "name" : "update-database-view", - "description" : "${update-database-view}", + "id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e", + "name" : "list-containers", + "description" : "${list-containers}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "88f82262-be80-4d18-9fb4-5529da031f33", - "name" : "system", - "description" : "${system}", + "id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7", + "name" : "list-identifiers", + "description" : "${list-identifiers}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "e14ab76b-1c24-484d-ae2d-478b8457edea", - "name" : "list-licenses", - "description" : "${list-licenses}", + "id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e", + "name" : "create-semantic-concept", + "description" : "${create-semantic-concept}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd", - "name" : "modify-foreign-table-column-semantics", - "description" : "${modify-foreign-table-column-semantics}", + "id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5", + "name" : "insert-table-data", + "description" : "${insert-table-data}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8", - "name" : "list-database-views", - "description" : "${list-database-views}", + "id" : "a0942e33-441b-4343-9f02-4353d03f7bbb", + "name" : "find-database", + "description" : "${find-database}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "b372f8f7-d203-4293-b991-ad93fb505917", - "name" : "escalated-database-handling", - "description" : "${escalated-database-handling}", + "id" : "7f3652c7-3073-4566-ab63-25385495ebc3", + "name" : "modify-database-visibility", + "description" : "${modify-database-visibility}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", - "name" : "default-roles-dbrepo", - "description" : "${role_default-roles}", + "id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1", + "name" : "create-table", + "description" : "${create-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8", + "name" : "find-foreign-user", + "description" : "${find-foreign-user}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b", + "name" : "modify-identifier-metadata", + "description" : "${modify-identifier-metadata}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "64c2b8f2-1527-4928-81ea-b2651512d028", + "name" : "delete-ontology", + "description" : "${delete-ontology}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c", + "name" : "check-database-access", + "description" : "${check-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a", + "name" : "modify-user-information", + "description" : "${modify-user-information}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "ba1ad8f2-39aa-487d-987f-645e8a459559", + "name" : "delete-table", + "description" : "${delete-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501", + "name" : "update-database-access", + "description" : "${update-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6f044bad-6651-4408-bffa-20c2d8f92eee", + "name" : "create-identifier", + "description" : "${create-identifier}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "be91195a-e30a-4d15-a8da-0aca0a68782f", + "name" : "escalated-table-handling", + "description" : "${escalated-table-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-foreign-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c", + "name" : "re-execute-query", + "description" : "${re-execute-query}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c", + "name" : "default-system-roles", + "description" : "${default-system-roles}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "check-foreign-database-access", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-table-data", "default-storage-roles", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "143ba359-5fa2-451e-8296-43ecf20bb251", + "name" : "update-semantic-concept", + "description" : "${update-semantic-concept}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c", + "name" : "escalated-container-handling", + "description" : "${escalated-container-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-container", "delete-container" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe", + "name" : "list-tables", + "description" : "${list-tables}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3", + "name" : "default-database-handling", + "description" : "${default-database-handling}", + "composite" : true, + "composites" : { + "realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d89a2881-b642-4abb-b990-196e71372f6b", + "name" : "default-table-handling", + "description" : "${default-table-handling}", + "composite" : true, + "composites" : { + "realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table", "update-table" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44", + "name" : "create-database-view", + "description" : "${create-database-view}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7", + "name" : "default-semantics-handling", + "description" : "${default-semantics-handling}", + "composite" : true, + "composites" : { + "realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8", + "name" : "update-table-statistic", + "description" : "${update-table-statistic}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a", + "name" : "escalated-user-handling", + "description" : "${escalated-user-handling}", + "composite" : true, + "composites" : { + "realm" : [ "find-user" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "e9854bbb-4580-4757-b1ae-305934173249", + "name" : "create-database-access", + "description" : "${create-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e", + "name" : "list-databases", + "description" : "${list-databases}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d75e7938-9d5e-4cb3-8c57-18a446867d3a", + "name" : "default-view-handling", + "description" : "${default-view-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "update-database-view", "create-database-view", "modify-view-visibility", "find-database-view", "list-database-views" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558", + "name" : "create-maintenance-message", + "description" : "${create-maintenance-message}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "973f0999-cc70-4b28-9f43-979c470bea8e", + "name" : "default-data-steward-roles", + "description" : "${default-data-steward-roles}", + "composite" : true, + "composites" : { + "realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling", "default-storage-roles" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2", + "name" : "find-user", + "description" : "${find-user}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df", + "name" : "escalated-semantics-handling", + "description" : "${escalated-semantics-handling}", + "composite" : true, + "composites" : { + "realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "09147c48-273b-450b-8b11-7ef9b9245244", + "name" : "export-table-data", + "description" : "${export-table-data}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "d14af590-60a8-4d75-b864-40ee0165bd7f", + "name" : "delete-database-access", + "description" : "${delete-database-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "6ae766b0-b8b4-4067-a95d-c8576bc4ac77", + "name" : "update-table", + "description" : "${update-table}", + "composite" : false, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "64c16bfb-2015-48ad-a23f-637ff24419cb", + "name" : "default-query-handling", + "description" : "${default-query-handling}", + "composite" : true, + "composites" : { + "realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ] + }, + "clientRole" : false, + "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", + "attributes" : { } + }, { + "id" : "b372f8f7-d203-4293-b991-ad93fb505917", + "name" : "escalated-database-handling", + "description" : "${escalated-database-handling}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", @@ -509,14 +688,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443", - "name" : "update-ontology", - "description" : "${update-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "11f7973e-d1eb-42cb-a35d-c59dfc122775", "name" : "modify-user-theme", @@ -525,14 +696,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d", - "name" : "export-query-data", - "description" : "${export-query-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "da493b7e-fb9b-43ca-82a5-e274ad2e6b39", "name" : "find-query", @@ -571,22 +734,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a", - "name" : "default-broker-handling", - "description" : "${default-broker-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "71874bde-64a5-4a69-8685-d8998303a80c", - "name" : "delete-table-data", - "description" : "${delete-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "7c0306fc-3b03-4c64-87d1-9a34f2073977", "name" : "modify-table-column-semantics", @@ -595,22 +742,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829", - "name" : "delete-container", - "description" : "${delete-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e", - "name" : "list-containers", - "description" : "${list-containers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "795c7bb8-3502-414a-a97b-2ba1cfd6a79c", "name" : "persist-query", @@ -619,45 +750,21 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7", - "name" : "list-identifiers", - "description" : "${list-identifiers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "e4bfaf36-9a5d-43e0-9fa3-0f4ea7bad8d0", "name" : "default-developer-roles", "description" : "${default-developer-roles}", "composite" : true, "composites" : { - "realm" : [ "escalated-query-handling", "escalated-broker-handling", "default-table-handling", "escalated-database-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-maintenance-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling" ] + "realm" : [ "escalated-query-handling", "escalated-broker-handling", "escalated-database-handling", "default-query-handling", "default-user-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling", "default-storage-roles", "default-table-handling", "default-container-handling", "default-database-handling", "default-maintenance-handling" ] }, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e", - "name" : "create-semantic-concept", - "description" : "${create-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5", - "name" : "insert-table-data", - "description" : "${insert-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a0942e33-441b-4343-9f02-4353d03f7bbb", - "name" : "find-database", - "description" : "${find-database}", + "id" : "674ea174-a165-441e-a01c-6b0010354474", + "name" : "upload-file", + "description" : "${upload-file}", "composite" : false, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", @@ -670,14 +777,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "7f3652c7-3073-4566-ab63-25385495ebc3", - "name" : "modify-database-visibility", - "description" : "${modify-database-visibility}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "4a5df51d-f14d-41a2-ad70-6521df5a5b4f", "name" : "offline_access", @@ -694,38 +793,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1", - "name" : "create-table", - "description" : "${create-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8", - "name" : "find-foreign-user", - "description" : "${find-foreign-user}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b", - "name" : "modify-identifier-metadata", - "description" : "${modify-identifier-metadata}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "64c2b8f2-1527-4928-81ea-b2651512d028", - "name" : "delete-ontology", - "description" : "${delete-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "d6e38368-b40f-423b-82e4-e8aa595237c9", "name" : "find-maintenance-message", @@ -734,14 +801,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c", - "name" : "check-database-access", - "description" : "${check-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "74013867-e426-46cc-ab98-2f4a9225ad1e", "name" : "find-table", @@ -750,14 +809,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a", - "name" : "modify-user-information", - "description" : "${modify-user-information}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "c367241f-b5b5-491f-84d5-07fe1bef3877", "name" : "default-identifier-handling", @@ -769,14 +820,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "ba1ad8f2-39aa-487d-987f-645e8a459559", - "name" : "delete-table", - "description" : "${delete-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "09f7bdb0-296f-46c8-a3a3-8f9254fb17e4", "name" : "list-maintenance-messages", @@ -785,14 +828,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501", - "name" : "update-database-access", - "description" : "${update-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "f43e86ed-76de-4ca8-9b5e-c292c9359bfe", "name" : "escalated-broker-handling", @@ -817,25 +852,6 @@ "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } - }, { - "id" : "6f044bad-6651-4408-bffa-20c2d8f92eee", - "name" : "create-identifier", - "description" : "${create-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be91195a-e30a-4d15-a8da-0aca0a68782f", - "name" : "escalated-table-handling", - "description" : "${escalated-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-foreign-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } }, { "id" : "98bee7d6-d78c-4e7f-b6a3-3705968b248c", "name" : "list-ontologies", @@ -845,10 +861,13 @@ "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } }, { - "id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c", - "name" : "re-execute-query", - "description" : "${re-execute-query}", - "composite" : false, + "id" : "a4645bb5-e0b8-43a7-9a76-21ac252a0ac1", + "name" : "default-storage-roles", + "description" : "${default-storage-roles}", + "composite" : true, + "composites" : { + "realm" : [ "upload-file" ] + }, "clientRole" : false, "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", "attributes" : { } @@ -1172,6 +1191,7 @@ }, "defaultGroups" : [ "/researchers" ], "requiredCredentials" : [ "password" ], + "passwordPolicy" : "length(8) and maxLength(64) and specialChars(1) and lowerCase(1) and upperCase(1) and digits(1)", "otpPolicyType" : "totp", "otpPolicyAlgorithm" : "HmacSHA1", "otpPolicyInitialCounter" : 0, @@ -2220,34 +2240,6 @@ "consent.screen.text" : "${offlineAccessScopeConsentText}", "display.on.consent.screen" : "true" } - }, { - "id" : "425abf4a-2ee2-431d-aa92-e373a36fe556", - "name" : "address", - "description" : "OpenID Connect built-in scope: address", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "consent.screen.text" : "${addressScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30", - "name" : "address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-address-mapper", - "consentRequired" : false, - "config" : { - "user.attribute.formatted" : "formatted", - "user.attribute.country" : "country", - "user.attribute.postal_code" : "postal_code", - "userinfo.token.claim" : "true", - "user.attribute.street" : "street", - "id.token.claim" : "true", - "user.attribute.region" : "region", - "access.token.claim" : "true", - "user.attribute.locality" : "locality" - } - } ] }, { "id" : "c96f0b73-ea79-4b46-93ef-d1092297f855", "name" : "rabbitmq.read:*/*", @@ -2294,6 +2286,34 @@ "jsonType.label" : "long" } } ] + }, { + "id" : "425abf4a-2ee2-431d-aa92-e373a36fe556", + "name" : "address", + "description" : "OpenID Connect built-in scope: address", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "consent.screen.text" : "${addressScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30", + "name" : "address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-address-mapper", + "consentRequired" : false, + "config" : { + "user.attribute.formatted" : "formatted", + "user.attribute.country" : "country", + "user.attribute.postal_code" : "postal_code", + "userinfo.token.claim" : "true", + "user.attribute.street" : "street", + "id.token.claim" : "true", + "user.attribute.region" : "region", + "access.token.claim" : "true", + "user.attribute.locality" : "locality" + } + } ] }, { "id" : "37f61543-dad7-4a82-8e10-77acdd1eefdc", "name" : "roles", @@ -2409,7 +2429,7 @@ "subType" : "anonymous", "subComponents" : { }, "config" : { - "allowed-protocol-mapper-types" : [ "saml-role-list-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "oidc-full-name-mapper", "saml-user-attribute-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper" ] + "allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "oidc-address-mapper", "oidc-usermodel-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper" ] } }, { "id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1", @@ -2435,7 +2455,7 @@ "subType" : "authenticated", "subComponents" : { }, "config" : { - "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-attribute-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper", "oidc-address-mapper" ] + "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper" ] } } ], "org.keycloak.userprofile.UserProfileProvider" : [ { @@ -2459,8 +2479,8 @@ "config" : { "ldap.attribute" : [ "createTimestamp" ], "is.mandatory.in.ldap" : [ "false" ], - "read.only" : [ "true" ], "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "true" ], "user.model.attribute" : [ "createTimestamp" ] } }, { @@ -2471,8 +2491,8 @@ "config" : { "ldap.attribute" : [ "sn" ], "is.mandatory.in.ldap" : [ "true" ], - "always.read.value.from.ldap" : [ "true" ], "read.only" : [ "false" ], + "always.read.value.from.ldap" : [ "true" ], "user.model.attribute" : [ "lastName" ] } }, { @@ -2509,13 +2529,13 @@ "membership.attribute.type" : [ "DN" ], "user.roles.retrieve.strategy" : [ "LOAD_GROUPS_BY_MEMBER_ATTRIBUTE" ], "group.name.ldap.attribute" : [ "cn" ], - "preserve.group.inheritance" : [ "false" ], "membership.ldap.attribute" : [ "member" ], "ignore.missing.groups" : [ "false" ], + "preserve.group.inheritance" : [ "false" ], "membership.user.ldap.attribute" : [ "uid" ], - "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], - "group.object.classes" : [ "groupOfNames" ], "memberof.ldap.attribute" : [ "memberOf" ], + "group.object.classes" : [ "groupOfNames" ], + "groups.dn" : [ "ou=users,dc=dbrepo,dc=at" ], "drop.non.existing.groups.during.sync" : [ "false" ], "groups.path" : [ "/" ] } @@ -2527,8 +2547,8 @@ "config" : { "ldap.attribute" : [ "modifyTimestamp" ], "is.mandatory.in.ldap" : [ "false" ], - "read.only" : [ "true" ], "always.read.value.from.ldap" : [ "true" ], + "read.only" : [ "true" ], "user.model.attribute" : [ "modifyTimestamp" ] } }, { @@ -2538,8 +2558,8 @@ "subComponents" : { }, "config" : { "ldap.attribute" : [ "uid" ], - "is.mandatory.in.ldap" : [ "true" ], "attribute.force.default" : [ "false" ], + "is.mandatory.in.ldap" : [ "true" ], "is.binary.attribute" : [ "false" ], "always.read.value.from.ldap" : [ "false" ], "read.only" : [ "false" ], @@ -2548,19 +2568,19 @@ } ] }, "config" : { - "fullSyncPeriod" : [ "-1" ], "pagination" : [ "false" ], + "fullSyncPeriod" : [ "-1" ], "startTls" : [ "false" ], - "usersDn" : [ "ou=users,dc=dbrepo,dc=at" ], "connectionPooling" : [ "true" ], + "usersDn" : [ "ou=users,dc=dbrepo,dc=at" ], "cachePolicy" : [ "DEFAULT" ], "useKerberosForPasswordAuthentication" : [ "false" ], "importEnabled" : [ "true" ], "enabled" : [ "true" ], "bindCredential" : [ "admin" ], - "changedSyncPeriod" : [ "-1" ], - "usernameLDAPAttribute" : [ "uid" ], "bindDn" : [ "cn=admin,dc=dbrepo,dc=at" ], + "usernameLDAPAttribute" : [ "uid" ], + "changedSyncPeriod" : [ "-1" ], "lastSync" : [ "1719252666" ], "vendor" : [ "other" ], "uuidLDAPAttribute" : [ "entryUUID" ], diff --git a/dbrepo-auth-service/init/.coveragerc b/dbrepo-auth-service/init/.coveragerc index 5951051c8d9d6377182ca2b4090cb9008691dfba..a387be84259ecf1c8b1387a407e3cfc528960a30 100644 --- a/dbrepo-auth-service/init/.coveragerc +++ b/dbrepo-auth-service/init/.coveragerc @@ -1,4 +1,9 @@ [report] +omit = + # omit tests + ./tests/* + # omit ext lib + ./omlib/* -exclude_lines = - if __name__ == .__main__.: \ No newline at end of file +[html] +directory = htmlcov diff --git a/dbrepo-auth-service/listeners/target/create-event-listener.jar b/dbrepo-auth-service/listeners/target/create-event-listener.jar index f370c8825750a431296ef68c3d482a2e4eee9389..e95a1e41f167192c570fe210667a3fe5dac77305 100644 Binary files a/dbrepo-auth-service/listeners/target/create-event-listener.jar and b/dbrepo-auth-service/listeners/target/create-event-listener.jar differ diff --git a/dbrepo-dashboard-service/.coverage b/dbrepo-dashboard-service/.coverage deleted file mode 100644 index 506ffe7fba86b0e70757d0f15ea4bb6516472b50..0000000000000000000000000000000000000000 Binary files a/dbrepo-dashboard-service/.coverage and /dev/null differ diff --git a/dbrepo-dashboard-service/Dockerfile b/dbrepo-dashboard-service/Dockerfile index 00fc60339b15b2e1ebeda9dbbf7849c96bd7a401..e4d9d8f5056d01714c0fc15c3840f8bf05cac921 100644 --- a/dbrepo-dashboard-service/Dockerfile +++ b/dbrepo-dashboard-service/Dockerfile @@ -1,9 +1,9 @@ -FROM docker.io/bitnami/grafana:10.4.9-debian-12-r0 AS runtime +FROM docker.io/bitnami/grafana:11.5.1 AS runtime LABEL org.opencontainers.image.authors="martin.weise@tuwien.ac.at" WORKDIR /app -COPY --chown=grafana:grafana ./dashboards /app/dashboards -COPY --chown=grafana:grafana ./provisioning /etc/grafana/provisioning -COPY --chown=grafana:grafana ./grafana.ini /etc/grafana/grafana.ini -COPY --chown=grafana:grafana ./ldap.toml /etc/grafana/ldap.toml +COPY --chown=grafana:grafana ./dashboards /app/dashboards +COPY --chown=grafana:grafana ./provisioning /etc/grafana/provisioning +COPY --chown=grafana:grafana ./grafana.ini /etc/grafana/grafana.ini +COPY --chown=grafana:grafana ./ldap.toml /etc/grafana/ldap.toml diff --git a/dbrepo-dashboard-service/access.py b/dbrepo-dashboard-service/access.py deleted file mode 100644 index 2f576db368e0f898c64b5a2cd3dd35f22f2384f2..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/access.py +++ /dev/null @@ -1,41 +0,0 @@ -import logging - -from grafana_client.client import GrafanaException -from werkzeug.exceptions import NotFound - -from api.dto import Permission -from clients import grafana_client - -statistics_row_title = '${table_id}' - - -def remove_anonymous_read_access(uid: str) -> None: - grafana = grafana_client.connect() - permissions = grafana.dashboard.get_permissions_by_uid(uid) - viewer_role = [permission for permission in permissions if - 'permissionName' in permission and permission['permissionName'] != 'View'] - if len(viewer_role) == 0: - logging.warning(f'Failed to find permissionName=View') - return None - try: - response = grafana_client.generic_post(f'/api/access-control/dashboards/{uid}/builtInRoles/Viewer', - Permission(permission='').model_dump()) - if response.status_code != 200: - raise OSError(f'Failed to remove anonymous read access: {response.content}') - except GrafanaException as e: - raise OSError(f'Failed to remove anonymous read access: {e.message}') - logging.info(f"Removed anonymous read access from dashboard with uid: {uid}") - - -def update_access(uid: str, username: str, permission: Permission) -> None: - try: - response = grafana_client.generic_get(f'/api/users/lookup?loginOrEmail={username}') - if response.status_code == 404: - raise NotFound(f"Failed to find user: {username}") - if response.status_code != 200: - raise OSError(f"Failed to add access to user: {username}") - grafana_client.generic_post(f"/api/access-control/dashboards/{uid}/users/{response.json()['id']}", - permission.model_dump()) - except GrafanaException as e: - logging.error(f'Failed to add access: {e.message}') - logging.info(f"Add access for dashboard with uid: {uid}") diff --git a/dbrepo-dashboard-service/api/dto.py b/dbrepo-dashboard-service/api/dto.py deleted file mode 100644 index e2dab237d52e9aa7a29b93081f20d76c97fabd19..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/api/dto.py +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import annotations - -from typing import Optional - -from pydantic import BaseModel - - -class Datasource(BaseModel): - uid: str - type: str - id: Optional[int] = None - orgId: Optional[int] = None - name: Optional[str] = None - typeLogoUrl: Optional[str] = None - access: Optional[str] = None - url: Optional[str] = None - user: Optional[str] = None - basicAuth: Optional[bool] = None - withCredentials: Optional[bool] = None - isDefault: Optional[bool] = None - version: Optional[int] = None - readOnly: Optional[bool] = None - jsonData: Optional[dict] = None - secureJsonFields: Optional[dict] = None - basicAuthUser: Optional[str] = None - basicAuthPassword: Optional[str] = None - password: Optional[str] = None - - -class CreateDatasource(BaseModel): - name: str - type: str - access: str - url: str - basicAuth: bool - version: int - readOnly: bool - jsonData: Optional[dict] = None - secureJsonData: Optional[dict] = None - basicAuthUser: Optional[str] = None - - -class Permission(BaseModel): - permission: str - - -class CreateDatasourceRequest(BaseModel): - database_internal_name: str - readonly: bool - type: str diff --git a/dbrepo-dashboard-service/clients/grafana_client.py b/dbrepo-dashboard-service/clients/grafana_client.py deleted file mode 100644 index 8f7d5aab0f3b28b702cf83cfd51e98bf1bc3c98e..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/clients/grafana_client.py +++ /dev/null @@ -1,27 +0,0 @@ -import logging -import os - -import requests -from requests import Response - -from grafana_client import GrafanaApi - -url = os.getenv('DASHBOARD_UI_ENDPOINT', 'http://localhost:3000') -username = os.getenv('SYSTEM_USERNAME', 'admin') -password = os.getenv('SYSTEM_PASSWORD', 'admin') - - -def connect() -> GrafanaApi: - return GrafanaApi.from_url(url=f'{url}', credential=(username, password)) - - -def generic_get(api_url: str) -> Response: - request_url = url + api_url - logging.debug(f'generic get url={request_url}, auth=({username}, <reacted>)') - return requests.get(request_url, auth=(username, password)) - - -def generic_post(api_url: str, payload: dict) -> Response: - request_url = url + api_url - logging.debug(f'generic post url={request_url}, payload={payload}, auth=({username}, <reacted>)') - return requests.post(request_url, json=payload, auth=(username, password)) diff --git a/dbrepo-dashboard-service/clients/keycloak_client.py b/dbrepo-dashboard-service/clients/keycloak_client.py deleted file mode 100644 index a04998e90986c7ede455454935e4b9c1cfe16b5a..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/clients/keycloak_client.py +++ /dev/null @@ -1,36 +0,0 @@ -import logging -import requests -from dataclasses import dataclass -from typing import List - -from flask import current_app -from jwt import jwk_from_pem, JWT - - -@dataclass(init=True, eq=True) -class User: - username: str - roles: List[str] - - -class KeycloakClient: - - def obtain_user_token(self, username: str, password: str) -> str: - response = requests.post( - f"{current_app.config['AUTH_SERVICE_ENDPOINT']}/realms/dbrepo/protocol/openid-connect/token", - data={ - "username": username, - "password": password, - "grant_type": "password", - "client_id": current_app.config["AUTH_SERVICE_CLIENT"], - "client_secret": current_app.config["AUTH_SERVICE_CLIENT_SECRET"] - }) - body = response.json() - if "access_token" not in body: - raise AssertionError(f"Failed to obtain user token(s): {response.status_code}") - return response.json()["access_token"] - - def verify_jwt(self, access_token: str) -> User: - public_key = jwk_from_pem(str(current_app.config["JWT_PUBKEY"]).encode('utf-8')) - payload = JWT().decode(message=access_token, key=public_key, do_time_check=True) - return User(username=payload.get('client_id'), roles=payload.get('realm_access')["roles"]) diff --git a/dbrepo-dashboard-service/coverage.txt b/dbrepo-dashboard-service/coverage.txt deleted file mode 100644 index 5436bf1f29acf58ee8eec467fbf34cc949d912d3..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/coverage.txt +++ /dev/null @@ -1,7 +0,0 @@ -Name Stmts Miss Cover --------------------------------------------------- -app.py 210 29 86% -clients/keycloak_client.py 36 9 75% -clients/opensearch_client.py 179 51 72% --------------------------------------------------- -TOTAL 425 89 79% diff --git a/dbrepo-dashboard-service/dashboard.py b/dbrepo-dashboard-service/dashboard.py deleted file mode 100644 index c77c1834ccf5a50340b09ff30ad82821dbad3c0a..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/dashboard.py +++ /dev/null @@ -1,273 +0,0 @@ -import logging -import os - -from dbrepo.api.dto import Database, Table -from grafana_client.client import GrafanaException - -from clients import grafana_client - -statistics_row_title = '${table_id}' - -base_url = os.getenv('BASE_URL', 'http://localhost') -datasource_uid = os.getenv('JSON_DATASOURCE_NAME', 'dbrepojson0') - - -def map_link(title: str, url: str) -> dict: - return dict(targetBlank=True, - asDropdown=False, - includeVars=False, - keepTime=False, - tags=[], - type='link', - icon='info', - title=title, - url=url) - - -def map_statistics_row(dashboard: dict) -> dict | None: - filtered_panels = [panel for panel in dashboard['panels'] if - panel['type'] == 'row' and panel['title'] == statistics_row_title and 'id' in panel] - if len(filtered_panels) > 0 and filtered_panels[0]['id'] is not None: - return filtered_panels[0] - logging.warning(f'Failed to find statistics row id') - return None - - -def map_links(database: Database) -> [dict]: - links = [] - if len(database.identifiers) > 0: - links.append(map_link('Database', f"{base_url}/pid/{database.identifiers[0].id}")) - else: - links.append(map_link('Database', f"{base_url}/database/{database.id}")) - return links - - -def map_templating(database: Database) -> dict: - options = [dict(selected=False, - text=table.name, - value=str(table.id)) for table in database.tables] - selected = dict(selected=True, - text=[table.name for table in database.tables], - value=[str(table.id) for table in database.tables]) - datasource = dict(uid=datasource_uid, - type='yesoreyeram-infinity-datasource') - return dict(list=[dict(description='', - name='table_id', - hide=0, - includeAll=True, - multi=True, - datasource=datasource, - refresh=1, - regex='', - sort=0, - definition='dbrepo-json- (infinity) json', - query=dict(queryType='infinity', - query='', - infinityQuery=dict(format='table', - filters=[], - parser='backend', - refId='variable', - root_selector='', - source='url', - type='json', - url=f"/api/database/{database.id}/table", - columns=[dict(selector='id', - text='value', - type='number'), - dict( - selector='internal_name', - text='name', - type='string')], - url_options=dict(data='', - method='GET'))), - label='Table ID', - skipUrlSync=False, - type='query', - current=selected, - options=options)]) - - -def map_timeseries_panel(database: Database, table: Table) -> dict: - datasource = dict(uid=datasource_uid, - type='yesoreyeram-infinity-datasource') - return dict( - title=table['name'], - type='timeseries', - datasource=datasource, - targets=[dict(datasource=datasource, - format='table', - global_query_id='', - hide=False, - refId='A', - root_selector='', - source='url', - type='json', - url=f"/api/database/{database['id']}/table/{table['id']}", - url_options=dict(data='', - method='GET'))], - gridPos=dict(h=8, - w=12, - x=0, - y=0), - options=dict(legend=dict(displayMode='list', - placement='bottom', - showLegend=True), - tooltip=dict(mode='single', - sort='none')), - fieldConfig=dict( - defaults=dict(color=dict(mode='palette-classic'), - custom=dict( - axisBorderShow=False, - axisCenteredZero=False, - axisColorMode='text', - axisLabel='', - axisPlacement='auto', - barAlignment=0, - drawStyle='line', - fillOpacity=0, - gradientMode='none', - hideFrom=dict(legend=False, - tooltip=False, - viz=False), - insertNulls=False, - lineInterpolation='linear', - lineWidth=1, - pointSize=5, - scaleDistribution=dict(type='linear'), - showPoints='auto', - spanNulls=False, - stacking=dict(group='A', - mode='none'), - thresholdsStyle=dict(mode='absolute'))))) - - -def map_panels(dashboard: dict, database_id: int | None = None) -> [dict]: - datasource = dict(uid=datasource_uid, - type='yesoreyeram-infinity-datasource') - if map_statistics_row(dashboard) is None: - dashboard['panels'].append(dict(collapsed=False, - repeat='table_id', - repeatDirection='h', - title=statistics_row_title, - type='row', - panels=[], - targets=[dict(refId='A', - datasource=datasource)], - gridPos=dict(h=1, - w=24, - x=0, - y=0))) - dashboard['panels'].append(dict(title='Sample', - type='table', - fieldConfig=dict( - defaults=dict( - color=dict(mode='palette-classic'), - custom=dict(axisBorderShow=False, - axisCenteredZero=False, - axisColorMode='text', - axisLabel='', - axisPlacement='auto', - barAlignment=0, - drawStyle='line', - fillOpacity=0, - gradientMode='none', - hideFrom=dict( - legend=False, - tooltip=False, - viz=False), - insertNulls=False, - lineInterpolation='linear', - lineWidth=1, - pointSize=5, - scaleDistribution=dict( - type='linear'), - showPoints='auto', - spanNulls=False, - stacking=dict(group='A', - mode='none'), - thresholdsStyle=dict( - mode='off'))), - overrides=[]), - options=dict(legend=dict(displayMode='list', - placement='bottom', - showLegend=True, - calcs=[]), - tooltip=dict(mode='single', - sort='none')), - targets=[dict(format='json', - columns=[], - datasource=datasource, - filters=[], - global_query_id='', - refId='A', - root_selector='', - source='url', - type='json', - url='/api/database/' + str( - database_id) + '/table/${table_id}/data', - url_options=dict(data='', - method='GET'))], - datasource=datasource, - gridPos=dict(h=4, - w=12, - x=0, - y=0))) - return dashboard['panels'] - - -def find(uid: str): - grafana = grafana_client.connect() - try: - return grafana.dashboard.get_dashboard(uid) - except GrafanaException: - return None - - -def create(database_name: str, uid: str = '') -> dict: - grafana = grafana_client.connect() - dashboard = dict(uid=uid, - title=f'{database_name} Overview', - tags=['generated', 'dbrepo'], - timezone='browser', - fiscalYearStartMonth=1, - panels=[]) - dashboard['panels'] = map_panels(dashboard) - payload = dict(folderUid='', - overwrite=False, - dashboard=dashboard) - dashboard = grafana.dashboard.update_dashboard(payload) - logging.info(f"Created dashboard with uid: {dashboard['uid']}") - return dashboard - - -def find(uid: str) -> dict | None: - grafana = grafana_client.connect() - try: - return grafana.dashboard.get_dashboard(uid)['dashboard'] - except GrafanaException: - return None - - -def delete(uid: str) -> None: - grafana = grafana_client.connect() - grafana.dashboard.delete_dashboard(uid) - - -def update(database: Database) -> dict: - grafana = grafana_client.connect() - dashboard = find(database.dashboard_uid) - # update metadata - if len(database.identifiers) > 0 and len(database.identifiers[0].titles) > 0: - dashboard['title'] = database.identifiers[0].titles[0].title - if len(database.identifiers) > 0 and len(database.identifiers[0].descriptions) > 0: - dashboard['description'] = database.identifiers[0].descriptions[0].description - dashboard['links'] = map_links(database) - dashboard['templating'] = map_templating(database) - # update panels - dashboard['panels'] = map_panels(dashboard, database.id) - payload = dict(folderUid='', - overwrite=True, - dashboard=dashboard) - dashboard = grafana.dashboard.update_dashboard(payload) - logging.info(f"Updated dashboard with uid: {dashboard['uid']}") - return dashboard diff --git a/dbrepo-dashboard-service/report.xml b/dbrepo-dashboard-service/report.xml deleted file mode 100644 index 202b3db684cda7c928023ebabbfa21b929ab63df..0000000000000000000000000000000000000000 --- a/dbrepo-dashboard-service/report.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="0" failures="0" skipped="0" tests="48" time="25.604" timestamp="2025-01-29T15:46:14.797988+01:00" hostname="medusa"><testcase classname="test.test_app.JwtTest" name="test_delete_database_no_auth_fails" time="11.131" /><testcase classname="test.test_app.JwtTest" name="test_delete_database_no_role_fails" time="0.317" /><testcase classname="test.test_app.JwtTest" name="test_delete_database_not_found_fails" time="0.370" /><testcase classname="test.test_app.JwtTest" name="test_delete_database_succeeds" time="0.524" /><testcase classname="test.test_app.JwtTest" name="test_get_fields_fails" time="0.154" /><testcase classname="test.test_app.JwtTest" name="test_get_fields_succeeds" time="0.218" /><testcase classname="test.test_app.JwtTest" name="test_get_fuzzy_search_no_query_fails" time="0.173" /><testcase classname="test.test_app.JwtTest" name="test_get_fuzzy_search_succeeds" time="0.283" /><testcase classname="test.test_app.JwtTest" name="test_get_index_fails" time="0.240" /><testcase classname="test.test_app.JwtTest" name="test_get_index_succeeds" time="0.190" /><testcase classname="test.test_app.JwtTest" name="test_health_succeeds" time="0.160" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_column_succeeds" time="0.386" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_concept_succeeds" time="0.341" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_identifier_succeeds" time="0.312" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_media_type_fails" time="0.140" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_no_body_fails" time="0.134" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_succeeds" time="0.284" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_table_succeeds" time="0.336" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_unit_succeeds" time="0.246" /><testcase classname="test.test_app.JwtTest" name="test_post_general_search_view_succeeds" time="0.281" /><testcase classname="test.test_app.JwtTest" name="test_update_database_empty_body_fails" time="0.177" /><testcase classname="test.test_app.JwtTest" name="test_update_database_malformed_body_fails" time="0.180" /><testcase classname="test.test_app.JwtTest" name="test_update_database_media_type_fails" time="0.231" /><testcase classname="test.test_app.JwtTest" name="test_update_database_no_auth_fails" time="0.119" /><testcase classname="test.test_app.JwtTest" name="test_update_database_no_body_fails" time="0.150" /><testcase classname="test.test_app.JwtTest" name="test_update_database_succeeds" time="0.243" /><testcase classname="test.test_jwt.JwtTest" name="test_get_user_roles_succeeds" time="0.146" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_password_empty_password_fails" time="0.144" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_password_empty_username_fails" time="0.127" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_password_no_password_fails" time="0.142" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_password_no_username_fails" time="0.146" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_password_succeeds" time="0.152" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_token_empty_token_fails" time="0.144" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_token_malformed_token_fails" time="0.143" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_token_no_token_fails" time="0.130" /><testcase classname="test.test_jwt.JwtTest" name="test_verify_token_succeeds" time="0.212" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_delete_database_fails" time="0.120" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_delete_database_succeeds" time="0.172" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_fuzzy_search_succeeds" time="0.190" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_get_fields_for_index_database_succeeds" time="0.201" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_get_fields_for_index_user_succeeds" time="0.202" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_unit_independent_search_fails" time="0.208" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_update_database_create_succeeds" time="0.205" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_update_database_malformed_fails" time="0.237" /><testcase classname="test.test_opensearch_client.OpenSearchClientTest" name="test_update_database_succeeds" time="0.214" /><testcase classname="test.test_keycloak_client.JwtTest" name="test_obtain_user_token_malformed_fails" time="0.112" /><testcase classname="test.test_keycloak_client.JwtTest" name="test_obtain_user_token_succeeds" time="0.149" /><testcase classname="test.test_keycloak_client.JwtTest" name="test_verify_jwt_succeeds" time="0.684" /></testsuite></testsuites> \ No newline at end of file diff --git a/dbrepo-data-service/pom.xml b/dbrepo-data-service/pom.xml index 3f049bd040829373491e3991f7443f31f08c5299..35784c7d1f3167925a43cdab5104ab676189c950 100644 --- a/dbrepo-data-service/pom.xml +++ b/dbrepo-data-service/pom.xml @@ -8,10 +8,15 @@ <version>3.3.5</version> </parent> + <organization> + <name>TU Wien</name> + <url>https://www.tuwien.ac.at</url> + </organization> + <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> <name>dbrepo-data-service</name> - <version>1.6.5</version> + <version>1.7.0</version> <description>Service that manages the data</description> @@ -23,7 +28,7 @@ <module>report</module> </modules> - <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/</url> + <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/</url> <developers> <developer> <name>Martin Weise</name> @@ -54,14 +59,37 @@ <minio.version>8.5.7</minio.version> <guava.version>33.3.0-jre</guava.version> <spark.version>4.0.0-preview2</spark.version> + <keycloak.version>26.0.4</keycloak.version> <scala.version>2.13</scala.version> <antlr-runtime.version>3.5.2</antlr-runtime.version> <micrometer.version>1.10.0</micrometer.version> <!-- see https://github.com/apache/spark/blob/cde8e4a82e20a363861f451ebd5138efb3194ab8/pom.xml --> <hadoop.version>3.4.0</hadoop.version> <jakarta-servlet.version>5.0.0</jakarta-servlet.version> - <sonar.coverage.jacoco.xmlReportPaths>./report/target/site/jacoco-aggregate/jacoco.xml + <sonar.coverage.jacoco.xmlReportPaths> + ./report/target/site/jacoco-aggregate/jacoco.xml </sonar.coverage.jacoco.xmlReportPaths> + <CodeCacheSize>128m</CodeCacheSize> + <extraJavaTestArgs> + -XX:+IgnoreUnrecognizedVMOptions + --add-modules=jdk.incubator.vector + --add-opens=java.base/java.lang=ALL-UNNAMED + --add-opens=java.base/java.lang.invoke=ALL-UNNAMED + --add-opens=java.base/java.lang.reflect=ALL-UNNAMED + --add-opens=java.base/java.io=ALL-UNNAMED + --add-opens=java.base/java.net=ALL-UNNAMED + --add-opens=java.base/java.nio=ALL-UNNAMED + --add-opens=java.base/java.util=ALL-UNNAMED + --add-opens=java.base/java.util.concurrent=ALL-UNNAMED + --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED + --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED + --add-opens=java.base/sun.nio.ch=ALL-UNNAMED + --add-opens=java.base/sun.nio.cs=ALL-UNNAMED + --add-opens=java.base/sun.security.action=ALL-UNNAMED + --add-opens=java.base/sun.util.calendar=ALL-UNNAMED + -Djdk.reflect.useDirectMethodHandle=false + -Dio.netty.tryReflectionSetAccessible=true + </extraJavaTestArgs> </properties> <dependencies> @@ -208,6 +236,22 @@ <artifactId>commons-validator</artifactId> <version>${commons-validator.version}</version> </dependency> + <dependency> + <groupId>org.jooq</groupId> + <artifactId>jooq</artifactId> + <version>${jooq.version}</version> + </dependency> + <!-- Authentication --> + <dependency> + <groupId>org.keycloak</groupId> + <artifactId>keycloak-common</artifactId> + <version>${keycloak.version}</version> + </dependency> + <dependency> + <groupId>org.keycloak</groupId> + <artifactId>keycloak-admin-client</artifactId> + <version>${keycloak.version}</version> + </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-hibernate6</artifactId> @@ -323,7 +367,26 @@ </execution> </executions> </plugin> + <!-- Surefire runs all Java tests --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <!-- Note config is repeated in scalatest config --> + <configuration> + <argLine>@{argLine} -ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g -XX:ReservedCodeCacheSize=${CodeCacheSize} + ${extraJavaTestArgs} + </argLine> + </configuration> + </plugin> </plugins> </build> + <licenses> + <license> + <name>Apache-2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> + <distribution>repo</distribution> + </license> + </licenses> + </project> diff --git a/dbrepo-data-service/querystore/pom.xml b/dbrepo-data-service/querystore/pom.xml index 6270990971c7d35275152c3c27dc07d8543f276c..1aa138f611c7fa5ec2fc4f6dc98beb8a177f24b5 100644 --- a/dbrepo-data-service/querystore/pom.xml +++ b/dbrepo-data-service/querystore/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-data-service-querystore</artifactId> <name>dbrepo-data-service-querystore</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies/> diff --git a/dbrepo-data-service/report/pom.xml b/dbrepo-data-service/report/pom.xml index b78405d9de1c4b93dcaa5fac40f505797cd9209f..98536501d3beb70b5c05f632e673a401b03ae2cd 100644 --- a/dbrepo-data-service/report/pom.xml +++ b/dbrepo-data-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>report</artifactId> <name>dbrepo-data-service-report</name> - <version>1.6.5</version> + <version>1.7.0</version> <description> This module is only intended for the pipeline coverage report. See the detailed report in the respective modules diff --git a/dbrepo-data-service/rest-service/pom.xml b/dbrepo-data-service/rest-service/pom.xml index 4ac7c352a08ddab420e340d13726ed3be9d7a3d1..434c423ef056566305e2d72db984781e7b1429fc 100644 --- a/dbrepo-data-service/rest-service/pom.xml +++ b/dbrepo-data-service/rest-service/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>rest-service</artifactId> <name>dbrepo-data-service-rest-service</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>services</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java index 4d3803a1e1c7159903ae090515edf5d9f353b068..ba1a0e76da6d1dda766d64c33b68ab452d509618 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java @@ -6,7 +6,7 @@ import at.tuwien.api.error.ApiErrorDto; import at.tuwien.api.user.UserDto; import at.tuwien.exception.*; import at.tuwien.service.AccessService; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -31,13 +31,13 @@ import java.util.UUID; @RequestMapping(path = "/api/database/{databaseId}/access") public class AccessEndpoint extends RestEndpoint { + private final CacheService cacheService; private final AccessService accessService; - private final CredentialService credentialService; @Autowired - public AccessEndpoint(AccessService accessService, CredentialService credentialService) { + public AccessEndpoint(CacheService cacheService, AccessService accessService) { + this.cacheService = cacheService; this.accessService = accessService; - this.credentialService = credentialService; } @PostMapping("/{userId}") @@ -74,14 +74,14 @@ public class AccessEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> create(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @Valid @RequestBody CreateAccessDto data) throws NotAllowedException, DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseMalformedException, MetadataServiceException { log.debug("endpoint give access to database, databaseId={}, userId={}", databaseId, userId); - final DatabaseDto database = credentialService.getDatabase(databaseId); - final UserDto user = credentialService.getUser(userId); + final DatabaseDto database = cacheService.getDatabase(databaseId); + final UserDto user = cacheService.getUser(userId); if (database.getAccesses().stream().anyMatch(a -> a.getUser().getId().equals(userId))) { log.error("Failed to create access to user with id {}: already has access", userId); throw new NotAllowedException("Failed to create access to user with id " + userId + ": already has access"); @@ -130,15 +130,15 @@ public class AccessEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @Valid @RequestBody CreateAccessDto access) throws NotAllowedException, DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseMalformedException, MetadataServiceException { log.debug("endpoint modify access to database, databaseId={}, userId={}, access.type={}", databaseId, userId, access.getType()); - final DatabaseDto database = credentialService.getDatabase(databaseId); - final UserDto user = credentialService.getUser(userId); + final DatabaseDto database = cacheService.getDatabase(databaseId); + final UserDto user = cacheService.getUser(userId); if (database.getAccesses().stream().noneMatch(a -> a.getHuserid().equals(userId))) { log.error("Failed to update access to user with id {}: no access", userId); throw new NotAllowedException("Failed to update access to user with id " + userId + ": no access"); @@ -153,22 +153,6 @@ public class AccessEndpoint extends RestEndpoint { } } - @PutMapping - @PreAuthorize("hasAuthority('system')") - @Operation(summary = "Invalidate access cache for database", - security = {@SecurityRequirement(name = "basicAuth")}, - hidden = true) - @ApiResponses(value = { - @ApiResponse(responseCode = "202", - description = "Invalidated access cache succeeded") - }) - public ResponseEntity<Void> invalidateAccess(@NotNull @PathVariable("databaseId") Long databaseId) { - log.debug("endpoint empty access cache for database, databaseId={}", databaseId); - credentialService.invalidateAccess(databaseId); - return ResponseEntity.accepted() - .build(); - } - @DeleteMapping("/{userId}") @PreAuthorize("hasAuthority('system')") @Operation(summary = "Revoke access", @@ -203,13 +187,13 @@ public class AccessEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> revoke(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> revoke(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId) throws NotAllowedException, DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseMalformedException, MetadataServiceException { log.debug("endpoint revoke access to database, databaseId={}, userId={}", databaseId, userId); - final DatabaseDto database = credentialService.getDatabase(databaseId); - final UserDto user = credentialService.getUser(userId); + final DatabaseDto database = cacheService.getDatabase(databaseId); + final UserDto user = cacheService.getUser(userId); if (database.getAccesses().stream().noneMatch(a -> a.getUser().getId().equals(userId))) { log.error("Failed to delete access to user with id {}: no access", userId); throw new NotAllowedException("Failed to delete access to user with id " + userId + ": no access"); diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java index 27848cf517ca0187f8ccd69d5ec894a4a6121304..801c6b638f3e1548711aa9d82989a83c62adde46 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java @@ -10,7 +10,7 @@ import at.tuwien.api.user.internal.UpdateUserPasswordDto; import at.tuwien.exception.*; import at.tuwien.service.AccessService; import at.tuwien.service.ContainerService; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; @@ -28,6 +28,7 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.sql.SQLException; +import java.util.UUID; @Log4j2 @RestController @@ -35,18 +36,18 @@ import java.sql.SQLException; @RequestMapping(path = "/api/database") public class DatabaseEndpoint extends RestEndpoint { + private final CacheService cacheService; private final AccessService accessService; private final DatabaseService databaseService; private final ContainerService containerService; - private final CredentialService credentialService; @Autowired - public DatabaseEndpoint(AccessService accessService, DatabaseService databaseService, - ContainerService containerService, CredentialService credentialService) { + public DatabaseEndpoint(CacheService cacheService, AccessService accessService, DatabaseService databaseService, + ContainerService containerService) { + this.cacheService = cacheService; this.accessService = accessService; this.databaseService = databaseService; this.containerService = containerService; - this.credentialService = credentialService; } @PostMapping @@ -86,7 +87,7 @@ public class DatabaseEndpoint extends RestEndpoint { DatabaseMalformedException, QueryStoreCreateException, MetadataServiceException { log.debug("endpoint create database, data.containerId={}, data.internalName={}, data.username={}", data.getContainerId(), data.getInternalName(), data.getUsername()); - final ContainerDto container = credentialService.getContainer(data.getContainerId()); + final ContainerDto container = cacheService.getContainer(data.getContainerId()); try { final DatabaseDto database = containerService.createDatabase(container, data); containerService.createQueryStore(container, data.getInternalName()); @@ -128,13 +129,13 @@ public class DatabaseEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody UpdateUserPasswordDto data) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, DatabaseMalformedException, MetadataServiceException { log.debug("endpoint update user password in database, databaseId={}, data.username={}", databaseId, data.getUsername()); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { databaseService.update(database, data); return ResponseEntity.status(HttpStatus.ACCEPTED) diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java index 90cb9846b23f79ed4feb1d36e887886b88ad1a06..4ca4810f770651d39351f039ecd8588562a0fd16 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/SubsetEndpoint.java @@ -1,18 +1,21 @@ package at.tuwien.endpoints; import at.tuwien.ExportResourceDto; -import at.tuwien.api.database.CreateViewDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewColumnDto; import at.tuwien.api.database.ViewDto; -import at.tuwien.api.database.query.ExecuteStatementDto; import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.query.QueryPersistDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.api.error.ApiErrorDto; import at.tuwien.exception.*; +import at.tuwien.gateway.MetadataServiceGateway; import at.tuwien.mapper.MariaDbMapper; import at.tuwien.mapper.MetadataMapper; -import at.tuwien.service.*; +import at.tuwien.service.CacheService; +import at.tuwien.service.DatabaseService; +import at.tuwien.service.StorageService; +import at.tuwien.service.SubsetService; import at.tuwien.validation.EndpointValidator; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; @@ -50,27 +53,27 @@ import java.util.UUID; @RequestMapping(path = "/api/database/{databaseId}/subset") public class SubsetEndpoint extends RestEndpoint { + private final CacheService cacheService; private final MariaDbMapper mariaDbMapper; private final SubsetService subsetService; private final MetadataMapper metadataMapper; - private final MetricsService metricsService; private final StorageService storageService; private final DatabaseService databaseService; - private final CredentialService credentialService; private final EndpointValidator endpointValidator; + private final MetadataServiceGateway metadataServiceGateway; @Autowired - public SubsetEndpoint(MariaDbMapper mariaDbMapper, SubsetService subsetService, MetadataMapper metadataMapper, - MetricsService metricsService, StorageService storageService, DatabaseService databaseService, - CredentialService credentialService, EndpointValidator endpointValidator) { + public SubsetEndpoint(CacheService cacheService, MariaDbMapper mariaDbMapper, SubsetService subsetService, + MetadataMapper metadataMapper, StorageService storageService, DatabaseService databaseService, + EndpointValidator endpointValidator, MetadataServiceGateway metadataServiceGateway) { + this.cacheService = cacheService; this.mariaDbMapper = mariaDbMapper; this.subsetService = subsetService; this.metadataMapper = metadataMapper; - this.metricsService = metricsService; this.storageService = storageService; this.databaseService = databaseService; - this.credentialService = credentialService; this.endpointValidator = endpointValidator; + this.metadataServiceGateway = metadataServiceGateway; } @GetMapping @@ -100,13 +103,13 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<QueryDto>> list(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<List<QueryDto>> list(@NotNull @PathVariable("databaseId") UUID databaseId, @RequestParam(name = "persisted", required = false) Boolean filterPersisted, Principal principal) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, QueryNotFoundException, NotAllowedException, MetadataServiceException { log.debug("endpoint find subsets in database, databaseId={}, filterPersisted={}", databaseId, filterPersisted); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); final List<QueryDto> queries; try { @@ -157,8 +160,8 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<?> findById(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("subsetId") Long subsetId, + public ResponseEntity<?> findById(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("subsetId") UUID subsetId, @NotNull @RequestHeader("Accept") String accept, @RequestParam(required = false) Instant timestamp, Principal principal) @@ -167,7 +170,7 @@ public class SubsetEndpoint extends RestEndpoint { MetadataServiceException, TableNotFoundException, QueryMalformedException, NotAllowedException { log.debug("endpoint find subset in database, databaseId={}, subsetId={}, accept={}, timestamp={}", databaseId, subsetId, accept, timestamp); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); final QueryDto subset; try { @@ -181,7 +184,7 @@ public class SubsetEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } - if (accept == null || accept.isEmpty() || accept.isBlank()) { + if (accept == null || accept.isBlank()) { accept = MediaType.APPLICATION_JSON_VALUE; log.debug("accept header not set: default to {}", accept); } @@ -192,8 +195,7 @@ public class SubsetEndpoint extends RestEndpoint { case "text/csv": log.trace("accept header matches csv"); final String query = mariaDbMapper.rawSelectQuery(subset.getQuery(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(database, query, timestamp, null, null, null, null); - metricsService.countSubsetGetData(databaseId, subsetId); + final Dataset<Row> dataset = subsetService.getData(database, query); final ExportResourceDto resource = storageService.transformDataset(dataset); final HttpHeaders headers = new HttpHeaders(); headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); @@ -247,8 +249,8 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> create(@NotNull @PathVariable("databaseId") Long databaseId, - @Valid @RequestBody ExecuteStatementDto data, + public ResponseEntity<List<Map<String, Object>>> create(@NotNull @PathVariable("databaseId") UUID databaseId, + @Valid @RequestBody SubsetDto data, Principal principal, @NotNull HttpServletRequest request, @RequestParam(required = false) Instant timestamp, @@ -258,13 +260,12 @@ public class SubsetEndpoint extends RestEndpoint { QueryNotFoundException, StorageUnavailableException, QueryMalformedException, StorageNotFoundException, QueryStoreInsertException, TableMalformedException, PaginationException, QueryNotSupportedException, NotAllowedException, UserNotFoundException, MetadataServiceException, TableNotFoundException, - ViewMalformedException, ViewNotFoundException { - log.debug("endpoint create subset in database, databaseId={}, data.statement={}, page={}, size={}, " + - "timestamp={}", databaseId, data.getStatement(), page, size, - timestamp); + ViewMalformedException, ViewNotFoundException, ImageNotFoundException { + log.debug("endpoint create subset in database, databaseId={}, page={}, size={}, timestamp={}", databaseId, + page, size, timestamp); /* check */ endpointValidator.validateDataParams(page, size); - endpointValidator.validateForbiddenStatements(data.getStatement()); + endpointValidator.validateSubsetParams(data); /* parameters */ final UUID userId; if (principal != null) { @@ -285,10 +286,10 @@ public class SubsetEndpoint extends RestEndpoint { log.debug("timestamp not set: default to {}", timestamp); } /* create */ - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); endpointValidator.validateOnlyPrivateSchemaAccess(database, principal); try { - final Long subsetId = subsetService.create(database, data.getStatement(), timestamp, userId); + final UUID subsetId = subsetService.create(database, data, timestamp, userId); return getData(databaseId, subsetId, principal, request, timestamp, page, size); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); @@ -304,9 +305,9 @@ public class SubsetEndpoint extends RestEndpoint { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Retrieved subset data", - headers = {@Header(name = "X-Count", description = "Number of rows", schema = @Schema(implementation = Long.class)), + headers = {@Header(name = "X-Count", description = "Number of rows", schema = @Schema(implementation = UUID.class)), @Header(name = "X-Headers", description = "The list of headers separated by comma", schema = @Schema(implementation = String.class)), - @Header(name = "X-Id", description = "The subset id", schema = @Schema(implementation = Long.class), required = true), + @Header(name = "X-Id", description = "The subset id", schema = @Schema(implementation = UUID.class), required = true), @Header(name = "Access-Control-Expose-Headers", description = "Reverse proxy exposing of custom headers", schema = @Schema(implementation = String.class), required = true)}, content = {@Content( mediaType = "application/json", @@ -332,26 +333,26 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("subsetId") Long subsetId, + public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("subsetId") UUID subsetId, Principal principal, @NotNull HttpServletRequest request, @RequestParam(required = false) Instant timestamp, @RequestParam(required = false) Long page, @RequestParam(required = false) Long size) throws PaginationException, DatabaseNotFoundException, RemoteUnavailableException, NotAllowedException, - QueryNotFoundException, DatabaseUnavailableException, TableMalformedException, QueryMalformedException, - UserNotFoundException, MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { + QueryNotFoundException, DatabaseUnavailableException, QueryMalformedException, UserNotFoundException, + MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { log.debug("endpoint get subset data, databaseId={}, subsetId={}, principal.name={} page={}, size={}", databaseId, subsetId, principal != null ? principal.getName() : null, page, size); endpointValidator.validateDataParams(page, size); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); if (!database.getIsPublic()) { if (principal == null) { log.error("Failed to re-execute query: no authentication found"); throw new NotAllowedException("Failed to re-execute query: no authentication found"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } log.trace("visibility for database: is_public={}, is_schema_public={}", database.getIsPublic(), database.getIsSchemaPublic()); /* parameters */ @@ -379,16 +380,11 @@ public class SubsetEndpoint extends RestEndpoint { .headers(headers) .build(); } + subset.setIdentifiers(metadataServiceGateway.getIdentifiers(database.getId(), subset.getId())); final String query = mariaDbMapper.rawSelectQuery(subset.getQuery(), timestamp, page, size); - final Dataset<Row> dataset = subsetService.getData(database, query, timestamp, page, size, null, null); - metricsService.countSubsetGetData(databaseId, subsetId); + final Dataset<Row> dataset = subsetService.getData(database, query); final String viewName = metadataMapper.queryDtoToViewName(subset); - databaseService.createView(database, CreateViewDto.builder() - .name(viewName) - .isPublic(false) - .isSchemaPublic(false) - .query(query) - .build()); + databaseService.createView(database, viewName, subset.getQuery()); final ViewDto view = databaseService.inspectView(database, viewName); headers.set("Access-Control-Expose-Headers", "X-Id X-Headers"); headers.set("X-Headers", String.join(",", view.getColumns().stream().map(ViewColumnDto::getInternalName).toList())); @@ -439,16 +435,16 @@ public class SubsetEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<QueryDto> persist(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("queryId") Long queryId, + public ResponseEntity<QueryDto> persist(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("queryId") UUID queryId, @NotNull @Valid @RequestBody QueryPersistDto data, @NotNull Principal principal) throws NotAllowedException, RemoteUnavailableException, DatabaseNotFoundException, QueryStorePersistException, DatabaseUnavailableException, QueryNotFoundException, UserNotFoundException, MetadataServiceException { log.debug("endpoint persist query, databaseId={}, queryId={}, data.persist={}, principal.name={}", databaseId, queryId, data.getPersist(), principal.getName()); - final DatabaseDto database = credentialService.getDatabase(databaseId); - credentialService.getAccess(databaseId, getId(principal)); + final DatabaseDto database = cacheService.getDatabase(databaseId); + cacheService.getAccess(databaseId, getId(principal)); try { subsetService.persist(database, queryId, data.getPersist()); final QueryDto dto = subsetService.findById(database, queryId); diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java index 82ed0a96f7596e025301f11e6ebceed2cd393acc..6914726cb84a886d97210dce9f1f60ac19db53b5 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java @@ -41,6 +41,7 @@ import java.sql.SQLException; import java.time.Instant; import java.util.List; import java.util.Map; +import java.util.UUID; @Log4j2 @RestController @@ -48,28 +49,25 @@ import java.util.Map; @RequestMapping(path = "/api/database/{databaseId}/table") public class TableEndpoint extends RestEndpoint { + private final CacheService cacheService; private final TableService tableService; private final MariaDbMapper mariaDbMapper; private final SubsetService subsetService; - private final MetricsService metricsService; private final StorageService storageService; private final DatabaseService databaseService; - private final CredentialService credentialService; private final EndpointValidator endpointValidator; private final MetadataServiceGateway metadataServiceGateway; @Autowired - public TableEndpoint(TableService tableService, MariaDbMapper mariaDbMapper, SubsetService subsetService, - MetricsService metricsService, StorageService storageService, DatabaseService databaseService, - CredentialService credentialService, EndpointValidator endpointValidator, - MetadataServiceGateway metadataServiceGateway) { + public TableEndpoint(CacheService cacheService, TableService tableService, MariaDbMapper mariaDbMapper, + SubsetService subsetService, StorageService storageService, DatabaseService databaseService, + EndpointValidator endpointValidator, MetadataServiceGateway metadataServiceGateway) { + this.cacheService = cacheService; this.tableService = tableService; this.mariaDbMapper = mariaDbMapper; this.subsetService = subsetService; - this.metricsService = metricsService; this.storageService = storageService; this.databaseService = databaseService; - this.credentialService = credentialService; this.endpointValidator = endpointValidator; this.metadataServiceGateway = metadataServiceGateway; } @@ -106,7 +104,7 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableDto> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<TableDto> create(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody TableCreateDto data) throws DatabaseNotFoundException, RemoteUnavailableException, TableMalformedException, DatabaseUnavailableException, TableExistsException, TableNotFoundException, QueryMalformedException, MetadataServiceException, ContainerNotFoundException { @@ -117,7 +115,7 @@ public class TableEndpoint extends RestEndpoint { throw new TableMalformedException("Table must have a primary key"); } /* create */ - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { final TableDto table = databaseService.createTable(database, data); return ResponseEntity.status(HttpStatus.CREATED) @@ -155,15 +153,17 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableDto> update(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<TableDto> update(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @Valid @RequestBody TableUpdateDto data) throws RemoteUnavailableException, - TableMalformedException, DatabaseUnavailableException, TableNotFoundException, MetadataServiceException { + TableMalformedException, DatabaseUnavailableException, TableNotFoundException, MetadataServiceException, + DatabaseNotFoundException { log.debug("endpoint update table, databaseId={}, data.description={}", databaseId, data.getDescription()); /* create */ - final TableDto table = credentialService.getTable(databaseId, tableId); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.updateTable(table, data); + tableService.updateTable(database, table, data); return ResponseEntity.status(HttpStatus.ACCEPTED) .build(); } catch (SQLException e) { @@ -199,14 +199,15 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, - QueryMalformedException, MetadataServiceException { + QueryMalformedException, MetadataServiceException, DatabaseNotFoundException { log.debug("endpoint delete table, databaseId={}, tableId={}", databaseId, tableId); - final TableDto table = credentialService.getTable(databaseId, tableId); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.delete(table); + tableService.delete(database, table); return ResponseEntity.status(HttpStatus.ACCEPTED) .build(); } catch (SQLException e) { @@ -249,8 +250,8 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @RequestParam(required = false) Instant timestamp, @RequestParam(required = false) Long page, @RequestParam(required = false) Long size, @@ -274,30 +275,29 @@ public class TableEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } - final TableDto table = credentialService.getTable(databaseId, tableId); + final TableDto table = cacheService.getTable(databaseId, tableId); if (!table.getIsPublic()) { if (principal == null) { log.error("Failed find table data: authentication required"); throw new NotAllowedException("Failed to find table data: authentication required"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } + final DatabaseDto database = cacheService.getDatabase(databaseId); try { final HttpHeaders headers = new HttpHeaders(); if (request.getMethod().equals("HEAD")) { headers.set("Access-Control-Expose-Headers", "X-Count"); - headers.set("X-Count", "" + tableService.getCount(table, timestamp)); + headers.set("X-Count", "" + tableService.getCount(database, table, timestamp)); return ResponseEntity.ok() .headers(headers) .build(); } headers.set("Access-Control-Expose-Headers", "X-Headers"); headers.set("X-Headers", String.join(",", table.getColumns().stream().map(ColumnDto::getInternalName).toList())); - final String query = mariaDbMapper.defaultRawSelectQuery(table.getDatabase().getInternalName(), + final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), table.getInternalName(), timestamp, page, size); - final Dataset<Row> dataset = subsetService.getData(credentialService.getDatabase(table.getTdbid()), - query, timestamp, page, size, null, null); - metricsService.countTableGetData(databaseId, tableId); + final Dataset<Row> dataset = subsetService.getData(database, query); return ResponseEntity.ok() .headers(headers) .body(transform(dataset)); @@ -337,20 +337,21 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> insertRawTuple(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> insertRawTuple(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @Valid @RequestBody TupleDto data, @NotNull Principal principal, @RequestHeader("Authorization") String authorization) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, TableMalformedException, QueryMalformedException, NotAllowedException, StorageUnavailableException, - StorageNotFoundException, MetadataServiceException { + StorageNotFoundException, MetadataServiceException, DatabaseNotFoundException { log.debug("endpoint insert raw table data, databaseId={}, tableId={}", databaseId, tableId); - final TableDto table = credentialService.getTable(databaseId, tableId); - final DatabaseAccessDto access = credentialService.getAccess(databaseId, getId(principal)); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseAccessDto access = cacheService.getAccess(databaseId, getId(principal)); endpointValidator.validateOnlyWriteOwnOrWriteAllAccess(access.getType(), table.getOwner().getId(), getId(principal)); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.createTuple(table, data); + tableService.createTuple(database, table, data); metadataServiceGateway.updateTableStatistics(databaseId, tableId, authorization); return ResponseEntity.status(HttpStatus.CREATED) .build(); @@ -390,20 +391,22 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> updateRawTuple(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> updateRawTuple(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @Valid @RequestBody TupleUpdateDto data, @NotNull Principal principal, @RequestHeader("Authorization") String authorization) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, - TableMalformedException, QueryMalformedException, NotAllowedException, MetadataServiceException { + TableMalformedException, QueryMalformedException, NotAllowedException, MetadataServiceException, + DatabaseNotFoundException { log.debug("endpoint update raw table data, databaseId={}, tableId={}, data.keys={}", databaseId, tableId, data.getKeys()); - final TableDto table = credentialService.getTable(databaseId, tableId); - final DatabaseAccessDto access = credentialService.getAccess(databaseId, getId(principal)); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseAccessDto access = cacheService.getAccess(databaseId, getId(principal)); endpointValidator.validateOnlyWriteOwnOrWriteAllAccess(access.getType(), table.getOwner().getId(), getId(principal)); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.updateTuple(table, data); + tableService.updateTuple(database, table, data); metadataServiceGateway.updateTableStatistics(databaseId, tableId, authorization); return ResponseEntity.status(HttpStatus.ACCEPTED) .build(); @@ -443,20 +446,22 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> deleteRawTuple(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> deleteRawTuple(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @Valid @RequestBody TupleDeleteDto data, @NotNull Principal principal, @RequestHeader("Authorization") String authorization) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, - TableMalformedException, QueryMalformedException, NotAllowedException, MetadataServiceException { + TableMalformedException, QueryMalformedException, NotAllowedException, MetadataServiceException, + DatabaseNotFoundException { log.debug("endpoint delete raw table data, databaseId={}, tableId={}, data.keys={}", databaseId, tableId, data.getKeys()); - final TableDto table = credentialService.getTable(databaseId, tableId); - final DatabaseAccessDto access = credentialService.getAccess(databaseId, getId(principal)); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseAccessDto access = cacheService.getAccess(databaseId, getId(principal)); endpointValidator.validateOnlyWriteOwnOrWriteAllAccess(access.getType(), table.getOwner().getId(), getId(principal)); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.deleteTuple(table, data); + tableService.deleteTuple(database, table, data); metadataServiceGateway.updateTableStatistics(databaseId, tableId, authorization); return ResponseEntity.status(HttpStatus.ACCEPTED) .build(); @@ -498,12 +503,12 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<TableHistoryDto>> getHistory(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<List<TableHistoryDto>> getHistory(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @RequestParam(value = "size", required = false) Long size, Principal principal) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, NotAllowedException, MetadataServiceException, - PaginationException { + PaginationException, DatabaseNotFoundException { log.debug("endpoint find table history, databaseId={}, tableId={}", databaseId, tableId); if (size != null && size <= 0) { log.error("Invalid size: must be > 0"); @@ -512,16 +517,17 @@ public class TableEndpoint extends RestEndpoint { log.debug("size not set: default to 100L"); size = 100L; } - final TableDto table = credentialService.getTable(databaseId, tableId); + final TableDto table = cacheService.getTable(databaseId, tableId); if (!table.getIsPublic()) { if (principal == null) { log.error("Failed to find table history: no authentication found"); throw new NotAllowedException("Failed to find table history: no authentication found"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - final List<TableHistoryDto> dto = tableService.history(table, size); + final List<TableHistoryDto> dto = tableService.history(database, table, size); return ResponseEntity.status(HttpStatus.OK) .body(dto); } catch (SQLException e) { @@ -567,11 +573,11 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<TableDto>> getSchema(@NotNull @PathVariable("databaseId") Long databaseId) + public ResponseEntity<List<TableDto>> getSchema(@NotNull @PathVariable("databaseId") UUID databaseId) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, DatabaseMalformedException, TableNotFoundException, MetadataServiceException { log.debug("endpoint inspect table schemas, databaseId={}", databaseId); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { return ResponseEntity.ok(databaseService.exploreTables(database)); } catch (SQLException e) { @@ -612,8 +618,8 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @RequestParam(required = false) Instant timestamp, Principal principal) throws RemoteUnavailableException, TableNotFoundException, NotAllowedException, StorageUnavailableException, @@ -624,19 +630,19 @@ public class TableEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } - final TableDto table = credentialService.getTable(databaseId, tableId); + final TableDto table = cacheService.getTable(databaseId, tableId); if (!table.getIsPublic()) { if (principal == null) { log.error("Failed to export private table: principal is null"); throw new NotAllowedException("Failed to export private table: principal is null"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } - final String query = mariaDbMapper.defaultRawSelectQuery(table.getDatabase().getInternalName(), + final DatabaseDto database = cacheService.getDatabase(databaseId); + final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), table.getInternalName(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(credentialService.getDatabase(table.getTdbid()), - query, timestamp, null, null, null, null); - metricsService.countTableGetData(databaseId, tableId); + final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(table.getDatabaseId()), + query); final ExportResourceDto resource = storageService.transformDataset(dataset); final HttpHeaders headers = new HttpHeaders(); headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); @@ -676,24 +682,25 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> importDataset(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> importDataset(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @Valid @RequestBody ImportDto data, @NotNull Principal principal, @RequestHeader("Authorization") String authorization) throws RemoteUnavailableException, TableNotFoundException, NotAllowedException, MetadataServiceException, StorageNotFoundException, MalformedException, StorageUnavailableException, QueryMalformedException, - DatabaseUnavailableException { + DatabaseUnavailableException, DatabaseNotFoundException { log.debug("endpoint insert table data, databaseId={}, tableId={}, data.location={}", databaseId, tableId, data.getLocation()); - final TableDto table = credentialService.getTable(databaseId, tableId); - final DatabaseAccessDto access = credentialService.getAccess(databaseId, getId(principal)); + final TableDto table = cacheService.getTable(databaseId, tableId); + final DatabaseAccessDto access = cacheService.getAccess(databaseId, getId(principal)); endpointValidator.validateOnlyWriteOwnOrWriteAllAccess(access.getType(), table.getOwner().getId(), getId(principal)); if (data.getLineTermination() == null) { data.setLineTermination("\\r\\n"); log.debug("line termination not present, default to {}", data.getLineTermination()); } + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - tableService.importDataset(table, data); + tableService.importDataset(database, table, data); } catch (SQLException | TableMalformedException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database", e); @@ -730,14 +737,14 @@ public class TableEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableStatisticDto> statistic(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId) + public ResponseEntity<TableStatisticDto> statistic(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId) throws DatabaseUnavailableException, RemoteUnavailableException, TableNotFoundException, - MetadataServiceException, TableMalformedException { + MetadataServiceException, TableMalformedException, DatabaseNotFoundException { log.debug("endpoint generate table statistic, databaseId={}, tableId={}", databaseId, tableId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - return ResponseEntity.ok(tableService.getStatistics( - credentialService.getTable(databaseId, tableId))); + return ResponseEntity.ok(tableService.getStatistics(database, cacheService.getTable(databaseId, tableId))); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database", e); diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/UploadEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/UploadEndpoint.java new file mode 100644 index 0000000000000000000000000000000000000000..9d338e42bfce56b8274d460b121b27709705b54c --- /dev/null +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/UploadEndpoint.java @@ -0,0 +1,70 @@ +package at.tuwien.endpoints; + +import at.tuwien.api.database.ViewDto; +import at.tuwien.api.error.ApiErrorDto; +import at.tuwien.api.file.UploadResponseDto; +import at.tuwien.exception.*; +import at.tuwien.service.StorageService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import jakarta.validation.constraints.NotNull; +import lombok.extern.log4j.Log4j2; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; + +@Log4j2 +@RestController +@CrossOrigin(origins = "*") +@RequestMapping(path = "/api/upload") +public class UploadEndpoint extends RestEndpoint { + + private final StorageService storageService; + + @Autowired + public UploadEndpoint(StorageService storageService) { + this.storageService = storageService; + } + + @PostMapping + @PreAuthorize("hasAuthority('upload-file')") + @Operation(summary = "Uploads a multipart file", + description = "Uploads a multipart file to the Storage Service. Requires role `upload-file`.", + security = {@SecurityRequirement(name = "basicAuth"), @SecurityRequirement(name = "bearerAuth")}) + @ApiResponses(value = { + @ApiResponse(responseCode = "201", + description = "Uploaded the file", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ViewDto.class))}), + @ApiResponse(responseCode = "503", + description = "Failed to establish connection with the storage service", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) + public ResponseEntity<UploadResponseDto> create(@NotNull @RequestParam("file") MultipartFile file) throws DatabaseUnavailableException, + DatabaseNotFoundException, RemoteUnavailableException, ViewMalformedException, MetadataServiceException { + log.debug("endpoint upload file, file.originalFilename={}", file.getOriginalFilename()); + try { + final String key = storageService.putObject(file.getBytes()); + return ResponseEntity.status(HttpStatus.CREATED) + .body(UploadResponseDto.builder() + .s3Key(key) + .build()); + } catch (IOException e) { + log.error("Failed to establish connection to database: {}", e.getMessage()); + throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); + } + } + +} diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java index 25dfd50dd434df444a45c4f7850fcdd803f0e9de..5c1fdb57dbc30b428d104e4c145f4a0064105f78 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java @@ -37,6 +37,7 @@ import java.sql.SQLException; import java.time.Instant; import java.util.List; import java.util.Map; +import java.util.UUID; @Log4j2 @RestController @@ -45,28 +46,23 @@ import java.util.Map; public class ViewEndpoint extends RestEndpoint { private final ViewService viewService; - private final TableService tableService; + private final CacheService cacheService; private final MariaDbMapper mariaDbMapper; private final SubsetService subsetService; - private final MetricsService metricsService; private final StorageService storageService; private final DatabaseService databaseService; - private final CredentialService credentialService; private final EndpointValidator endpointValidator; @Autowired - public ViewEndpoint(ViewService viewService, TableService tableService, MariaDbMapper mariaDbMapper, - SubsetService subsetService, MetricsService metricsService, StorageService storageService, - DatabaseService databaseService, CredentialService credentialService, + public ViewEndpoint(ViewService viewService, CacheService cacheService, MariaDbMapper mariaDbMapper, + SubsetService subsetService, StorageService storageService, DatabaseService databaseService, EndpointValidator endpointValidator) { this.viewService = viewService; - this.tableService = tableService; + this.cacheService = cacheService; this.mariaDbMapper = mariaDbMapper; this.subsetService = subsetService; - this.metricsService = metricsService; this.storageService = storageService; this.databaseService = databaseService; - this.credentialService = credentialService; this.endpointValidator = endpointValidator; } @@ -107,11 +103,11 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<ViewDto>> getSchema(@NotNull @PathVariable("databaseId") Long databaseId) + public ResponseEntity<List<ViewDto>> getSchema(@NotNull @PathVariable("databaseId") UUID databaseId) throws DatabaseUnavailableException, DatabaseNotFoundException, RemoteUnavailableException, DatabaseMalformedException, MetadataServiceException, ViewNotFoundException { log.debug("endpoint inspect view schemas, databaseId={}", databaseId); - final DatabaseDto database = credentialService.getDatabase(databaseId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { return ResponseEntity.ok(databaseService.exploreViews(database)); } catch (SQLException e) { @@ -152,14 +148,19 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ViewDto> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<ViewDto> create(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody CreateViewDto data) throws DatabaseUnavailableException, - DatabaseNotFoundException, RemoteUnavailableException, ViewMalformedException, MetadataServiceException { + DatabaseNotFoundException, RemoteUnavailableException, ViewMalformedException, MetadataServiceException, + TableNotFoundException, ImageNotFoundException, QueryMalformedException { log.debug("endpoint create view, databaseId={}, data.name={}", databaseId, data.getName()); - final DatabaseDto database = credentialService.getDatabase(databaseId); + /* check */ + endpointValidator.validateSubsetParams(data.getQuery()); + /* create */ + final DatabaseDto database = cacheService.getDatabase(databaseId); try { return ResponseEntity.status(HttpStatus.CREATED) - .body(databaseService.createView(database, data)); + .body(databaseService.createView(database, mariaDbMapper.nameToInternalName(data.getName()), + mariaDbMapper.subsetDtoToRawQuery(database, data.getQuery()))); } catch (SQLException e) { log.error("Failed to establish connection to database: {}", e.getMessage()); throw new DatabaseUnavailableException("Failed to establish connection to database: " + e.getMessage(), e); @@ -195,14 +196,15 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId) throws DatabaseUnavailableException, RemoteUnavailableException, ViewNotFoundException, - ViewMalformedException, MetadataServiceException { + ViewMalformedException, MetadataServiceException, DatabaseNotFoundException { log.debug("endpoint delete view, databaseId={}, viewId={}", databaseId, viewId); - final ViewDto view = credentialService.getView(databaseId, viewId); + final ViewDto view = cacheService.getView(databaseId, viewId); + final DatabaseDto database = cacheService.getDatabase(databaseId); try { - viewService.delete(view); + viewService.delete(database, view); return ResponseEntity.status(HttpStatus.ACCEPTED) .build(); } catch (SQLException e) { @@ -250,8 +252,8 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId, + public ResponseEntity<List<Map<String, Object>>> getData(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, @RequestParam(required = false) Long page, @RequestParam(required = false) Long size, @RequestParam(required = false) Instant timestamp, @@ -275,30 +277,30 @@ public class ViewEndpoint extends RestEndpoint { timestamp = Instant.now(); log.debug("timestamp not set: default to {}", timestamp); } - final ViewDto view = credentialService.getView(databaseId, viewId); + final ViewDto view = cacheService.getView(databaseId, viewId); if (!view.getIsPublic()) { if (principal == null) { log.error("Failed to get data from view: unauthorized"); throw new NotAllowedException("Failed to get data from view: unauthorized"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } + final DatabaseDto database = cacheService.getDatabase(databaseId); try { final HttpHeaders headers = new HttpHeaders(); if (request.getMethod().equals("HEAD")) { headers.set("Access-Control-Expose-Headers", "X-Count"); - headers.set("X-Count", "" + viewService.count(view, timestamp)); + headers.set("X-Count", "" + viewService.count(database, view, timestamp)); return ResponseEntity.ok() .headers(headers) .build(); } headers.set("Access-Control-Expose-Headers", "X-Headers"); headers.set("X-Headers", String.join(",", view.getColumns().stream().map(ViewColumnDto::getInternalName).toList())); - final String query = mariaDbMapper.defaultRawSelectQuery(view.getDatabase().getInternalName(), + final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), view.getInternalName(), timestamp, page, size); - final Dataset<Row> dataset = subsetService.getData(credentialService.getDatabase(databaseId), - query, timestamp, page, size, null, null); - metricsService.countViewGetData(databaseId, viewId); + final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(databaseId), + query); return ResponseEntity.ok() .headers(headers) .body(transform(dataset)); @@ -340,8 +342,8 @@ public class ViewEndpoint extends RestEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId, + public ResponseEntity<InputStreamResource> exportDataset(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, @RequestParam(required = false) Instant timestamp, Principal principal) throws RemoteUnavailableException, ViewNotFoundException, NotAllowedException, MetadataServiceException, @@ -353,19 +355,19 @@ public class ViewEndpoint extends RestEndpoint { log.debug("timestamp not set: default to {}", timestamp); } /* parameters */ - final ViewDto view = credentialService.getView(databaseId, viewId); + final ViewDto view = cacheService.getView(databaseId, viewId); if (!view.getIsPublic()) { if (principal == null) { log.error("Failed to export private view: principal is null"); throw new NotAllowedException("Failed to export private view: principal is null"); } - credentialService.getAccess(databaseId, getId(principal)); + cacheService.getAccess(databaseId, getId(principal)); } - final String query = mariaDbMapper.defaultRawSelectQuery(view.getDatabase().getInternalName(), + final DatabaseDto database = cacheService.getDatabase(databaseId); + final String query = mariaDbMapper.defaultRawSelectQuery(database.getInternalName(), view.getInternalName(), timestamp, null, null); - final Dataset<Row> dataset = subsetService.getData(credentialService.getDatabase(databaseId), - query, timestamp, null, null, null, null); - metricsService.countViewGetData(databaseId, viewId); + final Dataset<Row> dataset = subsetService.getData(cacheService.getDatabase(databaseId), + query); final ExportResourceDto resource = storageService.transformDataset(dataset); final HttpHeaders headers = new HttpHeaders(); headers.add("Content-Disposition", "attachment; filename=\"" + resource.getFilename() + "\""); diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java index cf3f25fd2632e8427bf21afdc59634b4c46b91f6..0926b1cf023a8a67b1712b7f2e2283c58083273c 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java @@ -458,6 +458,13 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return generic_handle(e.getClass(), e.getLocalizedMessage()); } + @Hidden + @ResponseStatus(code = HttpStatus.CONFLICT) + @ExceptionHandler(ViewExistsException.class) + public ResponseEntity<ApiErrorDto> handle(ViewExistsException e) { + return generic_handle(e.getClass(), e.getLocalizedMessage()); + } + @Hidden @ResponseStatus(code = HttpStatus.BAD_REQUEST) @ExceptionHandler(ViewMalformedException.class) diff --git a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/validation/EndpointValidator.java b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/validation/EndpointValidator.java index 9ad13f5be68bf6714f5d18fec4973fe9898b38f6..ebb39f7c1879e354233a163c4ef677376ee2e44b 100644 --- a/dbrepo-data-service/rest-service/src/main/java/at/tuwien/validation/EndpointValidator.java +++ b/dbrepo-data-service/rest-service/src/main/java/at/tuwien/validation/EndpointValidator.java @@ -3,10 +3,13 @@ package at.tuwien.validation; import at.tuwien.api.database.AccessTypeDto; import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.DatabaseDto; +import at.tuwien.api.database.query.FilterDto; +import at.tuwien.api.database.query.FilterTypeDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.config.QueryConfig; import at.tuwien.endpoints.RestEndpoint; import at.tuwien.exception.*; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -24,10 +27,10 @@ import java.util.regex.Pattern; public class EndpointValidator extends RestEndpoint { private final QueryConfig queryConfig; - private final CredentialService credentialService; + private final CacheService credentialService; @Autowired - public EndpointValidator(QueryConfig queryConfig, CredentialService credentialService) { + public EndpointValidator(QueryConfig queryConfig, CacheService credentialService) { this.queryConfig = queryConfig; this.credentialService = credentialService; } @@ -63,6 +66,22 @@ public class EndpointValidator extends RestEndpoint { validateOnlyAccess(database, principal, writeAccessOnly); } + public void validateSubsetParams(SubsetDto subset) throws QueryMalformedException { + if (subset.getFilter() != null) { + final List<FilterDto> filters = subset.getFilter(); + FilterTypeDto previous = null; + for (int i = 0; i < filters.size(); i++) { + final FilterDto filter = filters.get(i); + if ((i == 0 && !filter.getType().equals(FilterTypeDto.WHERE)) || + (i > 0 && !previous.equals(FilterTypeDto.WHERE) && (filter.getType().equals(FilterTypeDto.AND) || filter.getType().equals(FilterTypeDto.OR)))) { + log.error("Failed to validate subset: invalid specification, must be where-[(and|or)-where]"); + throw new QueryMalformedException("Failed to validate subset: invalid specification, must be where-[(and|or)-where]"); + } + previous = filter.getType(); + } + } + } + public void validateOnlyPrivateSchemaHasRole(DatabaseDto database, Principal principal, String role) throws NotAllowedException { if (database.getIsSchemaPublic()) { diff --git a/dbrepo-data-service/rest-service/src/main/resources/init/querystore.sql b/dbrepo-data-service/rest-service/src/main/resources/init/querystore.sql deleted file mode 100644 index de488f89ee3b9b24426927bb114a3e73f4d6daf0..0000000000000000000000000000000000000000 --- a/dbrepo-data-service/rest-service/src/main/resources/init/querystore.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE PROCEDURE hash_table(IN name VARCHAR(255), OUT hash VARCHAR(255), OUT count BIGINT) BEGIN DECLARE _sql TEXT; SELECT CONCAT('SELECT SHA2(GROUP_CONCAT(CONCAT_WS(\'\',', GROUP_CONCAT(CONCAT('`', column_name, '`') ORDER BY column_name), ') SEPARATOR \',\'), 256) AS hash, COUNT(*) AS count FROM `', name, '` INTO @hash, @count;') FROM `information_schema`.`columns` WHERE `table_schema` = DATABASE() AND `table_name` = name INTO _sql; PREPARE stmt FROM _sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET hash = @hash; SET count = @count; END; -CREATE PROCEDURE store_query(IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _username varchar(255) DEFAULT REGEXP_REPLACE(current_user(), '@.*', ''); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; -CREATE DEFINER = 'root' PROCEDURE _store_query(IN _username VARCHAR(255), IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; \ No newline at end of file diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java index d4daa90741fa306a2d5c19093d5ad9ebe0d6ba2a..e03ea299a229c41ee6a5a5c342ea7af69ebc4bd4 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java @@ -30,10 +30,10 @@ public class MariaDbConfig { log.debug("created database {}", database); } - public static void createInitDatabase(ContainerDto container, DatabaseDto database) throws SQLException { - final String jdbc = "jdbc:mariadb://" + container.getHost() + ":" + container.getPort(); + public static void createInitDatabase(DatabaseDto database) throws SQLException { + final String jdbc = "jdbc:mariadb://" + database.getContainer().getHost() + ":" + database.getContainer().getPort(); log.trace("connect to database {}", jdbc); - try (Connection connection = DriverManager.getConnection(jdbc, container.getUsername(), container.getPassword())) { + try (Connection connection = DriverManager.getConnection(jdbc, database.getContainer().getUsername(), database.getContainer().getPassword())) { ResourceDatabasePopulator populator = new ResourceDatabasePopulator(new ClassPathResource("init/" + database.getInternalName() + ".sql"), new ClassPathResource("init/users.sql"), new ClassPathResource("init/querystore.sql")); populator.setSeparator(";\n"); populator.populate(connection); @@ -141,11 +141,11 @@ public class MariaDbConfig { } } - public static void insertQueryStore(DatabaseDto database, QueryDto query, UUID userId) throws SQLException { + public static UUID insertQueryStore(DatabaseDto database, QueryDto query, UUID userId) throws SQLException { final String jdbc = "jdbc:mariadb://" + database.getContainer().getHost() + ":" + database.getContainer().getPort() + "/" + database.getInternalName(); log.trace("connect to database: {}", jdbc); try (Connection connection = DriverManager.getConnection(jdbc, database.getContainer().getUsername(), database.getContainer().getPassword())) { - final PreparedStatement prepareStatement = connection.prepareStatement( + PreparedStatement prepareStatement = connection.prepareStatement( "INSERT INTO qs_queries (created_by, query, query_normalized, is_persisted, query_hash, result_hash, result_number, created, executed) VALUES (?,?,?,?,?,?,?,?,?)"); prepareStatement.setString(1, String.valueOf(userId)); prepareStatement.setString(2, query.getQuery()); @@ -158,6 +158,13 @@ public class MariaDbConfig { prepareStatement.setTimestamp(9, Timestamp.from(query.getExecution())); log.trace("prepared statement: {}", prepareStatement); prepareStatement.executeUpdate(); + /* select */ + prepareStatement = connection.prepareStatement("SELECT id FROM qs_queries WHERE query_hash = ? LIMIT 1"); + prepareStatement.setString(1, query.getQueryHash()); + final ResultSet result = prepareStatement.executeQuery(); + UUID queryId; + result.next(); + return UUID.fromString(result.getString(1)); } } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/AccessEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/AccessEndpointUnitTest.java index 3cbdf09af1f7705b2dd3fa550c24770618ba99d1..d41e0609bae2f356a68dd5baddee150d73356a68 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/AccessEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/AccessEndpointUnitTest.java @@ -6,7 +6,7 @@ import at.tuwien.api.user.UserDto; import at.tuwien.endpoints.AccessEndpoint; import at.tuwien.exception.*; import at.tuwien.service.AccessService; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; @@ -34,7 +34,7 @@ public class AccessEndpointUnitTest extends AbstractUnitTest { private AccessEndpoint accessEndpoint; @MockBean - private CredentialService credentialService; + private CacheService credentialService; @MockBean private AccessService accessService; diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/DatabaseEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/DatabaseEndpointUnitTest.java index 43f7b9353e0381a6bc001b1a563036e20e8daae1..e2a6c550d04a62dcc08fb2603c50c7c05af750c9 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/DatabaseEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/DatabaseEndpointUnitTest.java @@ -7,7 +7,7 @@ import at.tuwien.endpoints.DatabaseEndpoint; import at.tuwien.exception.*; import at.tuwien.service.AccessService; import at.tuwien.service.ContainerService; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; @@ -48,7 +48,7 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { private DatabaseService databaseService; @MockBean - private CredentialService credentialService; + private CacheService credentialService; @BeforeEach public void beforeEach() { diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java index 8837ccb0d1c96f3dff61c0826fcabb956ecdc914..9cdb0d99c82e399c1d8297c1c71dd1f6dd963a31 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/SubsetEndpointUnitTest.java @@ -1,13 +1,13 @@ package at.tuwien.endpoint; -import at.tuwien.api.database.CreateViewDto; import at.tuwien.api.database.DatabaseDto; -import at.tuwien.api.database.query.ExecuteStatementDto; import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.query.QueryPersistDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.endpoints.SubsetEndpoint; import at.tuwien.exception.*; -import at.tuwien.service.CredentialService; +import at.tuwien.gateway.MetadataServiceGateway; +import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import at.tuwien.service.StorageService; import at.tuwien.service.SubsetService; @@ -34,8 +34,10 @@ import java.sql.SQLException; import java.time.Instant; import java.util.List; import java.util.Map; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.*; @Log4j2 @@ -62,7 +64,10 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { private DatabaseService databaseService; @MockBean - private CredentialService credentialService; + private CacheService credentialService; + + @MockBean + private MetadataServiceGateway metadataServiceGateway; @BeforeEach public void beforeEach() { @@ -147,7 +152,9 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME) public void findById_privateDataPrivateSchema_succeeds() throws DatabaseNotFoundException, SQLException, - RemoteUnavailableException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, DatabaseUnavailableException, TableNotFoundException, StorageUnavailableException, NotAllowedException, ViewMalformedException, QueryMalformedException, FormatNotAvailableException { + RemoteUnavailableException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, + DatabaseUnavailableException, TableNotFoundException, StorageUnavailableException, NotAllowedException, + QueryMalformedException, FormatNotAvailableException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) @@ -159,13 +166,29 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { generic_findById(DATABASE_1_ID, QUERY_1_ID, "application/json", null, USER_1_PRINCIPAL); } + @Test + @WithMockUser(username = USER_1_USERNAME) + public void findById_privateDataPrivateSchemaAcceptEmpty_succeeds() throws DatabaseNotFoundException, SQLException, + RemoteUnavailableException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, + DatabaseUnavailableException, TableNotFoundException, StorageUnavailableException, NotAllowedException, + QueryMalformedException, FormatNotAvailableException { + + /* mock */ + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); + when(subsetService.findById(DATABASE_1_PRIVILEGED_DTO, QUERY_1_ID)) + .thenReturn(QUERY_1_DTO); + + /* test */ + generic_findById(DATABASE_1_ID, QUERY_1_ID, null, null, USER_1_PRINCIPAL); + } + @Test @WithMockUser(username = USER_3_USERNAME) public void findById_publicDataPrivateSchema_succeeds() throws DatabaseNotFoundException, SQLException, RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, NotAllowedException, StorageUnavailableException, QueryMalformedException, QueryNotFoundException, - FormatNotAvailableException, TableNotFoundException, MetadataServiceException, - ViewMalformedException { + FormatNotAvailableException, TableNotFoundException, MetadataServiceException { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) @@ -199,7 +222,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { public void findById_privateDataPrivateSchemaAcceptCsv_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotFoundException, FormatNotAvailableException, SQLException, MetadataServiceException, - TableNotFoundException, ViewMalformedException, NotAllowedException { + TableNotFoundException, NotAllowedException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -207,7 +230,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(subsetService.findById(DATABASE_1_PRIVILEGED_DTO, QUERY_1_ID)) .thenReturn(QUERY_5_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(null), eq(null), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(storageService.transformDataset(any(Dataset.class))) .thenReturn(EXPORT_RESOURCE_DTO); @@ -243,7 +266,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(subsetService.findById(DATABASE_4_PRIVILEGED_DTO, QUERY_5_ID)) .thenReturn(QUERY_5_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(storageService.transformDataset(any(Dataset.class))) .thenReturn(EXPORT_RESOURCE_DTO); @@ -294,43 +317,28 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { TableMalformedException, NotAllowedException, QueryNotSupportedException, PaginationException, StorageNotFoundException, DatabaseUnavailableException, StorageUnavailableException, SQLException, QueryMalformedException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, - MetadataServiceException, TableNotFoundException, ViewMalformedException, ViewNotFoundException { + MetadataServiceException, TableNotFoundException, ViewMalformedException, ViewNotFoundException, + ImageNotFoundException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_5_STATEMENT) - .build(); /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); - when(subsetService.findById(eq(DATABASE_3_PRIVILEGED_DTO), anyLong())) + when(subsetService.findById(any(DatabaseDto.class), any(UUID.class))) .thenReturn(QUERY_5_DTO); + when(subsetService.create(any(DatabaseDto.class), any(SubsetDto.class), any(Instant.class), any(UUID.class))) + .thenReturn(QUERY_5_ID); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) .thenReturn(QUERY_5_VIEW_DTO); + when(metadataServiceGateway.getIdentifiers(DATABASE_3_ID, QUERY_5_ID)) + .thenReturn(List.of()); when(httpServletRequest.getMethod()) .thenReturn("POST"); /* test */ - subsetEndpoint.create(DATABASE_3_ID, request, USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); - } - - @Test - @WithMockUser(username = USER_1_USERNAME, authorities = {"execute-query"}) - public void create_forbiddenKeyword_fails() { - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement("SELECT COUNT(id) FROM tbl") - .build(); - - /* mock */ - when(httpServletRequest.getMethod()) - .thenReturn("POST"); - - /* test */ - assertThrows(QueryNotSupportedException.class, () -> { - subsetEndpoint.create(DATABASE_3_ID, request, USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); - }); + subsetEndpoint.create(DATABASE_3_ID, QUERY_5_SUBSET_DTO, USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); } @Test @@ -340,39 +348,35 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { PaginationException, StorageNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, SQLException, MetadataServiceException, TableNotFoundException, ViewMalformedException, - ViewNotFoundException { + ViewNotFoundException, ImageNotFoundException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_5_STATEMENT) - .build(); /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.create(any(DatabaseDto.class), eq(QUERY_5_STATEMENT), any(Instant.class), eq(USER_1_ID))) + when(subsetService.create(any(DatabaseDto.class), any(SubsetDto.class), any(Instant.class), eq(USER_1_ID))) .thenReturn(QUERY_5_ID); when(subsetService.findById(any(DatabaseDto.class), eq(QUERY_5_ID))) .thenReturn(QUERY_5_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); - when(databaseService.createView(any(DatabaseDto.class), any(CreateViewDto.class))) + when(databaseService.createView(any(DatabaseDto.class), anyString(), anyString())) .thenReturn(QUERY_5_VIEW_DTO); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) .thenReturn(QUERY_5_VIEW_DTO); + when(metadataServiceGateway.getIdentifiers(DATABASE_3_ID, QUERY_5_ID)) + .thenReturn(List.of()); when(httpServletRequest.getMethod()) .thenReturn("POST"); /* test */ - subsetEndpoint.create(DATABASE_3_ID, request, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + subsetEndpoint.create(DATABASE_3_ID, QUERY_5_SUBSET_DTO, USER_1_PRINCIPAL, httpServletRequest, null, null, null); } @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"execute-query"}) public void create_databaseNotFound_fails() throws RemoteUnavailableException, DatabaseNotFoundException, MetadataServiceException { - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_5_STATEMENT) - .build(); /* mock */ doThrow(DatabaseNotFoundException.class) @@ -383,36 +387,36 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(DatabaseNotFoundException.class, () -> { - subsetEndpoint.create(DATABASE_3_ID, request, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + subsetEndpoint.create(DATABASE_3_ID, QUERY_5_SUBSET_DTO, USER_1_PRINCIPAL, httpServletRequest, null, null, null); }); } @Test @WithAnonymousUser - public void create_publicDataPublicSchemaAnonymous_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, - MetadataServiceException, UserNotFoundException, QueryStoreInsertException, TableMalformedException, - NotAllowedException, SQLException, QueryNotFoundException, DatabaseUnavailableException, - StorageUnavailableException, QueryMalformedException, QueryNotSupportedException, PaginationException, - StorageNotFoundException, TableNotFoundException, ViewMalformedException, ViewNotFoundException { + public void create_publicDataPublicSchemaAnonymous_succeeds() throws DatabaseNotFoundException, + RemoteUnavailableException, MetadataServiceException, UserNotFoundException, QueryStoreInsertException, + TableMalformedException, NotAllowedException, SQLException, QueryNotFoundException, PaginationException, + DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, + QueryNotSupportedException, StorageNotFoundException, TableNotFoundException, ViewMalformedException, + ViewNotFoundException, ImageNotFoundException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_5_STATEMENT) - .build(); /* mock */ when(credentialService.getDatabase(DATABASE_4_ID)) .thenReturn(DATABASE_4_PRIVILEGED_DTO); - when(subsetService.findById(eq(DATABASE_4_PRIVILEGED_DTO), anyLong())) - .thenReturn(QUERY_5_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.findById(eq(DATABASE_4_PRIVILEGED_DTO), any(UUID.class))) + .thenReturn(QUERY_9_DTO); + when(subsetService.create(eq(DATABASE_4_PRIVILEGED_DTO), any(SubsetDto.class), any(Instant.class), eq(null))) + .thenReturn(QUERY_9_ID); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) - .thenReturn(QUERY_5_VIEW_DTO); + .thenReturn(QUERY_9_VIEW_DTO); when(httpServletRequest.getMethod()) .thenReturn("POST"); /* test */ - subsetEndpoint.create(DATABASE_4_ID, request, null, httpServletRequest, null, null, null); + subsetEndpoint.create(DATABASE_4_ID, QUERY_9_SUBSET_DTO, null, httpServletRequest, null, null, null); } @Test @@ -421,26 +425,28 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { MetadataServiceException, UserNotFoundException, QueryStoreInsertException, TableMalformedException, NotAllowedException, SQLException, QueryNotFoundException, DatabaseUnavailableException, StorageUnavailableException, QueryMalformedException, QueryNotSupportedException, PaginationException, - StorageNotFoundException, TableNotFoundException, ViewMalformedException, ViewNotFoundException { + StorageNotFoundException, TableNotFoundException, ViewMalformedException, ViewNotFoundException, + ImageNotFoundException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_1_STATEMENT) - .build(); /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(subsetService.findById(eq(DATABASE_1_PRIVILEGED_DTO), anyLong())) + when(subsetService.findById(any(DatabaseDto.class), any(UUID.class))) .thenReturn(QUERY_1_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.create(any(DatabaseDto.class), any(SubsetDto.class), any(Instant.class), any(UUID.class))) + .thenReturn(QUERY_1_ID); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) .thenReturn(QUERY_1_VIEW_DTO); + when(metadataServiceGateway.getIdentifiers(DATABASE_1_ID, QUERY_1_ID)) + .thenReturn(List.of(IDENTIFIER_1_BRIEF_DTO, IDENTIFIER_2_BRIEF_DTO)); when(httpServletRequest.getMethod()) .thenReturn("POST"); /* test */ - subsetEndpoint.create(DATABASE_1_ID, request, USER_1_PRINCIPAL, httpServletRequest, null, null, null); + subsetEndpoint.create(DATABASE_1_ID, QUERY_1_SUBSET_DTO, USER_1_PRINCIPAL, httpServletRequest, null, null, null); } @Test @@ -449,29 +455,28 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { MetadataServiceException, UserNotFoundException, QueryNotFoundException, QueryMalformedException, TableNotFoundException, RemoteUnavailableException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); - final ExecuteStatementDto request = ExecuteStatementDto.builder() - .statement(QUERY_5_STATEMENT) - .build(); /* mock */ when(credentialService.getDatabase(DATABASE_2_ID)) .thenReturn(DATABASE_2_PRIVILEGED_DTO); - when(subsetService.findById(eq(DATABASE_2_PRIVILEGED_DTO), anyLong())) - .thenReturn(QUERY_2_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.findById(eq(DATABASE_2_PRIVILEGED_DTO), any(UUID.class))) + .thenReturn(QUERY_8_DTO); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); + when(metadataServiceGateway.getIdentifiers(DATABASE_2_ID, QUERY_8_ID)) + .thenReturn(List.of()); when(httpServletRequest.getMethod()) .thenReturn("POST"); /* test */ assertThrows(NotAllowedException.class, () -> { - subsetEndpoint.create(DATABASE_2_ID, request, null, httpServletRequest, null, null, null); + subsetEndpoint.create(DATABASE_2_ID, QUERY_8_SUBSET_DTO, null, httpServletRequest, null, null, null); }); } @Test public void getData_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, UserNotFoundException, - NotAllowedException, SQLException, QueryNotFoundException, TableMalformedException, QueryMalformedException, + NotAllowedException, SQLException, QueryNotFoundException, QueryMalformedException, DatabaseUnavailableException, PaginationException, MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); @@ -483,10 +488,12 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(QUERY_5_DTO); when(subsetService.reExecuteCount(DATABASE_3_PRIVILEGED_DTO, QUERY_5_DTO)) .thenReturn(QUERY_5_RESULT_NUMBER); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) .thenReturn(QUERY_5_VIEW_DTO); + when(metadataServiceGateway.getIdentifiers(DATABASE_3_ID, QUERY_5_ID)) + .thenReturn(List.of()); when(httpServletRequest.getMethod()) .thenReturn("GET"); @@ -523,9 +530,9 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME) public void getData_private_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, - UserNotFoundException, DatabaseUnavailableException, NotAllowedException, TableMalformedException, - QueryMalformedException, QueryNotFoundException, PaginationException, SQLException, - MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { + UserNotFoundException, DatabaseUnavailableException, NotAllowedException, QueryMalformedException, + QueryNotFoundException, PaginationException, SQLException, MetadataServiceException, + TableNotFoundException, ViewNotFoundException, ViewMalformedException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ @@ -535,10 +542,12 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { .thenReturn(QUERY_1_DTO); when(subsetService.reExecuteCount(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO)) .thenReturn(QUERY_1_RESULT_NUMBER); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(databaseService.inspectView(any(DatabaseDto.class), anyString())) .thenReturn(QUERY_1_VIEW_DTO); + when(metadataServiceGateway.getIdentifiers(DATABASE_1_ID, QUERY_1_ID)) + .thenReturn(List.of(IDENTIFIER_1_BRIEF_DTO, IDENTIFIER_2_BRIEF_DTO)); when(httpServletRequest.getMethod()) .thenReturn("GET"); @@ -584,9 +593,9 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME) public void getData_privateHead_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, - UserNotFoundException, DatabaseUnavailableException, NotAllowedException, TableMalformedException, - QueryMalformedException, QueryNotFoundException, PaginationException, SQLException, - MetadataServiceException, TableNotFoundException, ViewNotFoundException, ViewMalformedException { + UserNotFoundException, DatabaseUnavailableException, NotAllowedException, QueryMalformedException, + QueryNotFoundException, PaginationException, SQLException, MetadataServiceException, + TableNotFoundException, ViewNotFoundException, ViewMalformedException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) @@ -705,7 +714,7 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { }); } - protected List<QueryDto> generic_list(Long databaseId, DatabaseDto database, Principal principal) + protected List<QueryDto> generic_list(UUID databaseId, DatabaseDto database, Principal principal) throws NotAllowedException, DatabaseUnavailableException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException { @@ -725,11 +734,11 @@ public class SubsetEndpointUnitTest extends AbstractUnitTest { return response.getBody(); } - protected void generic_findById(Long databaseId, Long subsetId, String accept, Instant timestamp, + protected void generic_findById(UUID databaseId, UUID subsetId, String accept, Instant timestamp, Principal principal) throws UserNotFoundException, DatabaseUnavailableException, StorageUnavailableException, NotAllowedException, QueryMalformedException, QueryNotFoundException, DatabaseNotFoundException, RemoteUnavailableException, FormatNotAvailableException, - MetadataServiceException, TableNotFoundException, ViewMalformedException { + MetadataServiceException, TableNotFoundException { /* test */ final ResponseEntity<?> response = subsetEndpoint.findById(databaseId, subsetId, accept, timestamp, principal); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java index b37007a0108946429481c7fa229eb575bc6e98f0..25f3b60ceac1f47225e73c237cefc215c21f1696 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java @@ -4,10 +4,11 @@ import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.query.ImportDto; import at.tuwien.api.database.table.*; +import at.tuwien.api.database.table.internal.TableCreateDto; import at.tuwien.endpoints.TableEndpoint; import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import at.tuwien.service.SubsetService; import at.tuwien.service.TableService; @@ -68,7 +69,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { private DatabaseService databaseService; @MockBean - private CredentialService credentialService; + private CacheService credentialService; @MockBean private MetadataServiceGateway metadataServiceGateway; @@ -103,10 +104,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(databaseService.createTable(DATABASE_1_PRIVILEGED_DTO, TABLE_4_CREATE_INTERNAL_DTO)) - .thenReturn(TABLE_4_PRIVILEGED_DTO); - when(databaseService.inspectTable(DATABASE_1_PRIVILEGED_DTO, TABLE_4_INTERNALNAME)) - .thenReturn(TABLE_4_PRIVILEGED_DTO); + when(databaseService.createTable(any(DatabaseDto.class), any(TableCreateDto.class))) + .thenReturn(TABLE_4_DTO); + when(databaseService.inspectTable(any(DatabaseDto.class), anyString())) + .thenReturn(TABLE_4_DTO); /* test */ final ResponseEntity<TableDto> response = tableEndpoint.create(DATABASE_1_ID, TABLE_4_CREATE_INTERNAL_DTO); @@ -170,12 +171,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void statistic_succeeds() throws DatabaseUnavailableException, TableNotFoundException, SQLException, - TableMalformedException, RemoteUnavailableException, MetadataServiceException { + TableMalformedException, RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(tableService.getStatistics(any(TableDto.class))) + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + when(tableService.getStatistics(any(DatabaseDto.class), any(TableDto.class))) .thenReturn(TABLE_8_STATISTIC_DTO); /* test */ @@ -186,14 +189,16 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void statistic_unavailable_fails() throws TableNotFoundException, TableMalformedException, - RemoteUnavailableException, MetadataServiceException, SQLException { + RemoteUnavailableException, MetadataServiceException, SQLException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); doThrow(SQLException.class) .when(tableService) - .getStatistics(any(TableDto.class)); + .getStatistics(any(DatabaseDto.class), any(TableDto.class)); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -220,14 +225,17 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) public void delete_succeeds() throws RemoteUnavailableException, DatabaseUnavailableException, - TableNotFoundException, QueryMalformedException, SQLException, MetadataServiceException { + TableNotFoundException, QueryMalformedException, SQLException, MetadataServiceException, + DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doNothing() .when(tableService) - .delete(TABLE_1_PRIVILEGED_DTO); + .delete(DATABASE_1_DTO, TABLE_1_DTO); /* test */ final ResponseEntity<Void> response = tableEndpoint.delete(DATABASE_1_ID, TABLE_1_ID); @@ -263,14 +271,16 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) public void delete_unavailable_fails() throws RemoteUnavailableException, TableNotFoundException, SQLException, - MetadataServiceException, QueryMalformedException { + MetadataServiceException, QueryMalformedException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doThrow(SQLException.class) .when(tableService) - .delete(TABLE_1_PRIVILEGED_DTO); + .delete(any(DatabaseDto.class), any(TableDto.class)); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -286,17 +296,17 @@ public class TableEndpointUnitTest extends AbstractUnitTest { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(credentialService.getDatabase(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(credentialService.getTable(DATABASE_1_ID, TABLE_4_ID)) + .thenReturn(TABLE_4_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(httpServletRequest.getMethod()) .thenReturn("GET"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_1_ID, TABLE_4_ID, null, null, null, httpServletRequest, null); assertEquals(HttpStatus.OK, response.getStatusCode()); } @@ -309,17 +319,19 @@ public class TableEndpointUnitTest extends AbstractUnitTest { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(tableService.getCount(eq(TABLE_8_PRIVILEGED_DTO), any(Instant.class))) + when(credentialService.getTable(DATABASE_2_ID, TABLE_5_ID)) + .thenReturn(TABLE_5_DTO); + when(credentialService.getDatabase(DATABASE_2_ID)) + .thenReturn(DATABASE_2_PRIVILEGED_DTO); + when(tableService.getCount(any(DatabaseDto.class), any(TableDto.class), any(Instant.class))) .thenReturn(3L); - when(subsetService.getData(eq(DATABASE_3_PRIVILEGED_DTO), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(eq(DATABASE_2_DTO), anyString())) .thenReturn(mock); when(httpServletRequest.getMethod()) .thenReturn("HEAD"); /* test */ - final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + final ResponseEntity<List<Map<String, Object>>> response = tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, httpServletRequest, null); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getHeaders().get("Access-Control-Expose-Headers")); assertEquals("X-Count", response.getHeaders().get("Access-Control-Expose-Headers").get(0)); @@ -335,7 +347,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); /* test */ assertThrows(NotAllowedException.class, () -> { @@ -350,7 +362,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_2_ID); @@ -361,25 +373,42 @@ public class TableEndpointUnitTest extends AbstractUnitTest { }); } + @Test + @WithAnonymousUser + public void getData_notAllowed_fails() throws TableNotFoundException, RemoteUnavailableException, + MetadataServiceException{ + + /* mock */ + when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) + .thenReturn(TABLE_8_DTO); + when(httpServletRequest.getMethod()) + .thenReturn("GET"); + + /* test */ + assertThrows(NotAllowedException.class, () -> { + tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + }); + } + @Test @WithAnonymousUser public void getData_unavailable_fails() throws TableNotFoundException, RemoteUnavailableException, MetadataServiceException, QueryMalformedException, DatabaseNotFoundException { /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(credentialService.getDatabase(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); + when(credentialService.getTable(DATABASE_2_ID, TABLE_5_ID)) + .thenReturn(TABLE_5_DTO); + when(credentialService.getDatabase(DATABASE_2_ID)) + .thenReturn(DATABASE_2_DTO); doThrow(QueryMalformedException.class) .when(subsetService) - .getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null)); + .getData(any(DatabaseDto.class), anyString()); when(httpServletRequest.getMethod()) .thenReturn("GET"); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { - tableEndpoint.getData(DATABASE_3_ID, TABLE_8_ID, null, null, null, httpServletRequest, null); + tableEndpoint.getData(DATABASE_2_ID, TABLE_5_ID, null, null, null, httpServletRequest, null); }); } @@ -390,7 +419,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); doThrow(RemoteUnavailableException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_2_ID); @@ -411,12 +440,12 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); when(credentialService.getDatabase(DATABASE_1_ID)) .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(access); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(httpServletRequest.getMethod()) .thenReturn("GET"); @@ -446,7 +475,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_succeeds() throws DatabaseUnavailableException, TableNotFoundException, TableMalformedException, NotAllowedException, QueryMalformedException, RemoteUnavailableException, - SQLException, StorageUnavailableException, StorageNotFoundException, MetadataServiceException { + SQLException, StorageUnavailableException, StorageNotFoundException, MetadataServiceException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -456,12 +485,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .createTuple(TABLE_8_PRIVILEGED_DTO, request); + .createTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -473,7 +504,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME) - public void insertRawTuple_noRole_fails() { + public void insertRawTuple_noRole_fails() throws DatabaseNotFoundException, RemoteUnavailableException, + MetadataServiceException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -481,6 +513,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { }}) .build(); + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { tableEndpoint.insertRawTuple(DATABASE_3_ID, TABLE_8_ID, request, USER_3_PRINCIPAL, TOKEN_ACCESS_TOKEN); @@ -490,7 +526,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_tableNotFound_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -499,6 +535,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .build(); /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); doThrow(TableNotFoundException.class) .when(credentialService) .getTable(DATABASE_3_ID, TABLE_8_ID); @@ -512,7 +550,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_readAccess_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -522,7 +560,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_READ_ACCESS_DTO); @@ -536,7 +576,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_unavailable_fails() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, MetadataServiceException, TableMalformedException, StorageUnavailableException, - SQLException, QueryMalformedException, StorageNotFoundException { + SQLException, QueryMalformedException, StorageNotFoundException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -546,12 +586,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doThrow(SQLException.class) .when(tableService) - .createTuple(TABLE_8_PRIVILEGED_DTO, request); + .createTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -563,7 +605,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_writeOwnAccess_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, DatabaseUnavailableException, TableMalformedException, QueryMalformedException, - StorageUnavailableException, StorageNotFoundException, MetadataServiceException { + StorageUnavailableException, StorageNotFoundException, MetadataServiceException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -573,7 +615,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); @@ -584,7 +628,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void insertRawTuple_writeOwnAccessForeign_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -594,7 +638,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); @@ -606,9 +652,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) - public void insertRawTuple_writeAllAccessForeign_succeeds() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, DatabaseUnavailableException, TableMalformedException, QueryMalformedException, - StorageUnavailableException, StorageNotFoundException, MetadataServiceException { + public void insertRawTuple_writeAllAccessForeign_succeeds() throws TableNotFoundException, + RemoteUnavailableException, NotAllowedException, DatabaseUnavailableException, TableMalformedException, + QueryMalformedException, StorageUnavailableException, StorageNotFoundException, MetadataServiceException, + DatabaseNotFoundException { final TupleDto request = TupleDto.builder() .data(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 7L); @@ -618,7 +665,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); @@ -630,7 +679,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_succeeds() throws DatabaseUnavailableException, TableNotFoundException, TableMalformedException, NotAllowedException, QueryMalformedException, RemoteUnavailableException, - SQLException, MetadataServiceException { + SQLException, MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -643,12 +692,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .updateTuple(TABLE_8_PRIVILEGED_DTO, request); + .updateTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -660,7 +711,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME) - public void updateTuple_noRole_fails() { + public void updateTuple_noRole_fails() throws DatabaseNotFoundException, RemoteUnavailableException, + MetadataServiceException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -671,6 +723,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { }}) .build(); + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { tableEndpoint.updateRawTuple(DATABASE_3_ID, TABLE_8_ID, request, USER_3_PRINCIPAL, TOKEN_ACCESS_TOKEN); @@ -680,7 +736,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_tableNotFound_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -692,6 +748,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .build(); /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); doThrow(TableNotFoundException.class) .when(credentialService) .getTable(DATABASE_3_ID, TABLE_8_ID); @@ -705,7 +763,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_readAccess_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -718,7 +776,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_READ_ACCESS_DTO); @@ -731,7 +791,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_unavailable_fails() throws TableNotFoundException, RemoteUnavailableException, SQLException, - NotAllowedException, MetadataServiceException, TableMalformedException, QueryMalformedException { + NotAllowedException, MetadataServiceException, TableMalformedException, QueryMalformedException, + DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -744,12 +805,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); doThrow(SQLException.class) .when(tableService) - .updateTuple(TABLE_8_PRIVILEGED_DTO, request); + .updateTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -761,7 +824,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_writeOwnAccess_succeeds() throws DatabaseUnavailableException, TableNotFoundException, TableMalformedException, NotAllowedException, QueryMalformedException, RemoteUnavailableException, - SQLException, MetadataServiceException { + SQLException, MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -774,12 +837,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .updateTuple(TABLE_8_PRIVILEGED_DTO, request); + .updateTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -789,10 +854,84 @@ public class TableEndpointUnitTest extends AbstractUnitTest { assertEquals(HttpStatus.ACCEPTED, response.getStatusCode()); } + @Test + @WithMockUser(username = USER_1_USERNAME, authorities = {"system"}) + public void update_succeeds() throws DatabaseUnavailableException, TableNotFoundException, + TableMalformedException, RemoteUnavailableException, SQLException, MetadataServiceException, + DatabaseNotFoundException { + + /* mock */ + when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + doNothing() + .when(tableService) + .updateTable(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, TABLE_8_UPDATE_DTO); + + /* test */ + final ResponseEntity<TableDto> response = tableEndpoint.update(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + assertEquals(HttpStatus.ACCEPTED, response.getStatusCode()); + } + + @Test + @WithMockUser(username = USER_1_USERNAME, authorities = {"system"}) + public void update_tableNotFound_fails() throws TableNotFoundException, RemoteUnavailableException, + MetadataServiceException, DatabaseNotFoundException { + + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + doThrow(TableNotFoundException.class) + .when(credentialService) + .getTable(DATABASE_3_ID, TABLE_8_ID); + + /* test */ + assertThrows(TableNotFoundException.class, () -> { + tableEndpoint.update(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + }); + } + + @Test + @WithMockUser(username = USER_1_USERNAME, authorities = {"system"}) + public void update_unavailable_fails() throws TableNotFoundException, RemoteUnavailableException, + MetadataServiceException, DatabaseNotFoundException { + + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + doThrow(RemoteUnavailableException.class) + .when(credentialService) + .getTable(DATABASE_3_ID, TABLE_8_ID); + + /* test */ + assertThrows(RemoteUnavailableException.class, () -> { + tableEndpoint.update(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + }); + } + + @Test + @WithMockUser(username = USER_1_USERNAME, authorities = {"system"}) + public void update_exception_fails() throws TableNotFoundException, RemoteUnavailableException, + MetadataServiceException, DatabaseNotFoundException { + + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + doThrow(MetadataServiceException.class) + .when(credentialService) + .getTable(DATABASE_3_ID, TABLE_8_ID); + + /* test */ + assertThrows(MetadataServiceException.class, () -> { + tableEndpoint.update(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + }); + } + @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_writeOwnAccessForeign_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -805,7 +944,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); @@ -819,7 +960,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void updateTuple_writeAllAccessForeign_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, DatabaseUnavailableException, TableMalformedException, QueryMalformedException, - SQLException, MetadataServiceException { + SQLException, MetadataServiceException, DatabaseNotFoundException { final TupleUpdateDto request = TupleUpdateDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -832,12 +973,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); doNothing() .when(tableService) - .updateTuple(TABLE_8_PRIVILEGED_DTO, request); + .updateTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -851,7 +994,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_succeeds() throws DatabaseUnavailableException, TableNotFoundException, TableMalformedException, NotAllowedException, QueryMalformedException, RemoteUnavailableException, - SQLException, MetadataServiceException { + SQLException, MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -860,12 +1003,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .deleteTuple(TABLE_8_PRIVILEGED_DTO, request); + .deleteTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -877,13 +1022,18 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME) - public void deleteTuple_noRole_fails() { + public void deleteTuple_noRole_fails() throws DatabaseNotFoundException, RemoteUnavailableException, + MetadataServiceException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); }}) .build(); + /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); + /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { tableEndpoint.deleteRawTuple(DATABASE_3_ID, TABLE_8_ID, request, USER_3_PRINCIPAL, TOKEN_ACCESS_TOKEN); @@ -893,7 +1043,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_tableNotFound_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -901,6 +1051,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { .build(); /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); doThrow(TableNotFoundException.class) .when(credentialService) .getTable(DATABASE_3_ID, TABLE_8_ID); @@ -914,7 +1066,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_readAccess_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -923,7 +1075,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_READ_ACCESS_DTO); @@ -936,7 +1090,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_unavailable_fails() throws TableNotFoundException, RemoteUnavailableException, SQLException, - NotAllowedException, MetadataServiceException, TableMalformedException, QueryMalformedException { + NotAllowedException, MetadataServiceException, TableMalformedException, QueryMalformedException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -945,12 +1099,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); doThrow(SQLException.class) .when(tableService) - .deleteTuple(TABLE_8_PRIVILEGED_DTO, request); + .deleteTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -962,7 +1118,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_writeOwnAccess_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, TableMalformedException, SQLException, QueryMalformedException, - DatabaseUnavailableException, MetadataServiceException { + DatabaseUnavailableException, MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -971,12 +1127,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .deleteTuple(TABLE_8_PRIVILEGED_DTO, request); + .deleteTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -989,7 +1147,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_writeOwnAccessForeign_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -998,7 +1156,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); @@ -1012,7 +1172,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"delete-table-data"}) public void deleteTuple_writeAllAccessForeign_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, DatabaseUnavailableException, TableMalformedException, QueryMalformedException, - SQLException, MetadataServiceException { + SQLException, MetadataServiceException, DatabaseNotFoundException { final TupleDeleteDto request = TupleDeleteDto.builder() .keys(new HashMap<>() {{ put(COLUMN_8_1_INTERNAL_NAME, 6L); @@ -1021,12 +1181,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); doNothing() .when(tableService) - .deleteTuple(TABLE_8_PRIVILEGED_DTO, request); + .deleteTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -1039,27 +1201,31 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void getHistory_succeeds() throws DatabaseUnavailableException, TableNotFoundException, - RemoteUnavailableException, SQLException, NotAllowedException, MetadataServiceException, PaginationException { + RemoteUnavailableException, SQLException, NotAllowedException, MetadataServiceException, PaginationException, DatabaseNotFoundException { /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(tableService.history(TABLE_8_PRIVILEGED_DTO, null)) + when(credentialService.getTable(DATABASE_2_ID, TABLE_5_ID)) + .thenReturn(TABLE_5_DTO); + when(credentialService.getDatabase(DATABASE_2_ID)) + .thenReturn(DATABASE_2_PRIVILEGED_DTO); + when(tableService.history(DATABASE_2_PRIVILEGED_DTO, TABLE_5_DTO, null)) .thenReturn(List.of()); /* test */ - final ResponseEntity<List<TableHistoryDto>> response = tableEndpoint.getHistory(DATABASE_3_ID, TABLE_8_ID, null, null); + final ResponseEntity<List<TableHistoryDto>> response = tableEndpoint.getHistory(DATABASE_2_ID, TABLE_5_ID, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); } @Test @WithAnonymousUser public void getHistory_privateNoRole_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); /* test */ assertThrows(NotAllowedException.class, () -> { @@ -1081,11 +1247,13 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_4_USERNAME) public void getHistory_privateNoAccess_fails() throws NotAllowedException, RemoteUnavailableException, - TableNotFoundException, MetadataServiceException { + TableNotFoundException, MetadataServiceException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_4_ID); @@ -1099,14 +1267,15 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_2_USERNAME) public void getHistory_private_succeeds() throws NotAllowedException, RemoteUnavailableException, SQLException, - TableNotFoundException, MetadataServiceException, DatabaseUnavailableException, PaginationException { + TableNotFoundException, MetadataServiceException, DatabaseUnavailableException, PaginationException, + DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(DATABASE_1_USER_2_READ_ACCESS_DTO); - when(tableService.history(TABLE_1_PRIVILEGED_DTO, 10L)) + when(tableService.history(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, 10L)) .thenReturn(List.of()); /* test */ @@ -1117,27 +1286,31 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void getHistory_unavailable_succeeds() throws RemoteUnavailableException, SQLException, - TableNotFoundException, MetadataServiceException { + TableNotFoundException, MetadataServiceException, DatabaseNotFoundException { /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + when(credentialService.getTable(DATABASE_2_ID, TABLE_5_ID)) + .thenReturn(TABLE_5_DTO); + when(credentialService.getDatabase(DATABASE_2_ID)) + .thenReturn(DATABASE_2_PRIVILEGED_DTO); doThrow(SQLException.class) .when(tableService) - .history(TABLE_8_PRIVILEGED_DTO, 100L); + .history(any(DatabaseDto.class), any(TableDto.class), anyLong()); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { - tableEndpoint.getHistory(DATABASE_3_ID, TABLE_8_ID, null, null); + tableEndpoint.getHistory(DATABASE_2_ID, TABLE_5_ID, null, null); }); } @Test @WithAnonymousUser public void getHistory_tableNotFound_fails() throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { /* mock */ + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); doThrow(TableNotFoundException.class) .when(credentialService) .getTable(DATABASE_3_ID, TABLE_8_ID); @@ -1155,15 +1328,15 @@ public class TableEndpointUnitTest extends AbstractUnitTest { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ - when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); - when(credentialService.getDatabase(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(null), eq(null), eq(null), eq(null))) + when(credentialService.getTable(DATABASE_1_ID, TABLE_4_ID)) + .thenReturn(TABLE_4_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); /* test */ - final ResponseEntity<InputStreamResource> response = tableEndpoint.exportDataset(DATABASE_3_ID, TABLE_8_ID, null, null); + final ResponseEntity<InputStreamResource> response = tableEndpoint.exportDataset(DATABASE_1_ID, TABLE_4_ID, null, null); assertEquals(HttpStatus.OK, response.getStatusCode()); } @@ -1177,12 +1350,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(access); when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(null), eq(null), eq(null), eq(null))) + .thenReturn(DATABASE_1_DTO); + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); /* test */ @@ -1193,11 +1368,13 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_4_USERNAME) public void exportData_privateNoAccess_fails() throws TableNotFoundException, NotAllowedException, - RemoteUnavailableException, MetadataServiceException { + RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_4_ID); @@ -1216,9 +1393,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); - when(databaseService.exploreTables(DATABASE_3_PRIVILEGED_DTO)) - .thenReturn(List.of(TABLE_8_PRIVILEGED_DTO)); + .thenReturn(DATABASE_3_DTO); + when(databaseService.exploreTables(DATABASE_3_DTO)) + .thenReturn(List.of(TABLE_8_DTO)); /* test */ final ResponseEntity<List<TableDto>> response = tableEndpoint.getSchema(DATABASE_3_ID); @@ -1252,10 +1429,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_3_ID)) - .thenReturn(DATABASE_3_PRIVILEGED_DTO); + .thenReturn(DATABASE_3_DTO); doThrow(SQLException.class) .when(databaseService) - .exploreTables(DATABASE_3_PRIVILEGED_DTO); + .exploreTables(DATABASE_3_DTO); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -1266,7 +1443,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void importDataset_succeeds() throws TableNotFoundException, NotAllowedException, RemoteUnavailableException, - MetadataServiceException, StorageNotFoundException, MalformedException, StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException, SQLException, TableMalformedException { + MetadataServiceException, StorageNotFoundException, MalformedException, StorageUnavailableException, + DatabaseUnavailableException, QueryMalformedException, SQLException, TableMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination(null) @@ -1275,12 +1454,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); doNothing() .when(tableService) - .importDataset(TABLE_8_PRIVILEGED_DTO, request); + .importDataset(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); doNothing() .when(metadataServiceGateway) .updateTableStatistics(DATABASE_3_ID, TABLE_8_ID, TOKEN_ACCESS_TOKEN); @@ -1330,7 +1511,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void importDataset_unavailable_fails() throws RemoteUnavailableException, TableNotFoundException, MetadataServiceException, NotAllowedException, StorageNotFoundException, MalformedException, - StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException { + StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException, DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1339,12 +1520,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); doThrow(SQLException.class) .when(tableService) - .importDataset(any(TableDto.class), eq(request)); + .importDataset(any(DatabaseDto.class), any(TableDto.class), eq(request)); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -1356,7 +1539,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void importDataset_writeOwnAccess_fails() throws RemoteUnavailableException, TableNotFoundException, MetadataServiceException, NotAllowedException, StorageNotFoundException, MalformedException, - StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException { + StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1365,12 +1549,14 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); doThrow(SQLException.class) .when(tableService) - .importDataset(any(TableDto.class), eq(request)); + .importDataset(any(DatabaseDto.class), any(TableDto.class), eq(request)); /* test */ assertThrows(NotAllowedException.class, () -> { @@ -1381,7 +1567,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void importDataset_readAccess_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1390,7 +1576,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_READ_ACCESS_DTO); @@ -1404,7 +1592,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"insert-table-data"}) public void importDataset_writeOwnAccess_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, MetadataServiceException, StorageNotFoundException, MalformedException, - StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException { + StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1413,7 +1602,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_1_WRITE_OWN_ACCESS_DTO); @@ -1424,7 +1615,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void importDataset_writeOwnAccessForeign_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1433,7 +1624,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_3_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_OWN_ACCESS_DTO); @@ -1447,7 +1640,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_3_USERNAME, authorities = {"insert-table-data"}) public void importDataset_writeAllAccessForeign_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, MetadataServiceException, StorageNotFoundException, - MalformedException, StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException { + MalformedException, StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1456,7 +1650,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_3_ID, TABLE_8_ID)) - .thenReturn(TABLE_8_PRIVILEGED_DTO); + .thenReturn(TABLE_8_DTO); + when(credentialService.getDatabase(DATABASE_3_ID)) + .thenReturn(DATABASE_3_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_3_ID, USER_1_ID)) .thenReturn(DATABASE_3_USER_3_WRITE_ALL_ACCESS_DTO); @@ -1468,7 +1664,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_2_USERNAME, authorities = {"insert-table-data"}) public void importDataset_privateForeign_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, MetadataServiceException, StorageNotFoundException, MalformedException, - StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException { + StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1477,7 +1674,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(DATABASE_1_USER_2_WRITE_ALL_ACCESS_DTO); @@ -1489,7 +1688,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_2_USERNAME, authorities = {"insert-table-data"}) public void importDataset_private_succeeds() throws TableNotFoundException, RemoteUnavailableException, NotAllowedException, MetadataServiceException, StorageNotFoundException, MalformedException, - StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException { + StorageUnavailableException, DatabaseUnavailableException, QueryMalformedException, + DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1498,7 +1698,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_2_ID)) - .thenReturn(TABLE_2_PRIVILEGED_DTO); + .thenReturn(TABLE_2_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(DATABASE_1_USER_2_WRITE_OWN_ACCESS_DTO); @@ -1509,7 +1711,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_2_USERNAME, authorities = {"insert-table-data"}) public void importDataset_privateForeign_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1518,7 +1720,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(DATABASE_1_USER_2_WRITE_OWN_ACCESS_DTO); @@ -1531,7 +1735,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_2_USERNAME, authorities = {"insert-table-data"}) public void importDataset_privateReadAccess_fails() throws TableNotFoundException, RemoteUnavailableException, - NotAllowedException, MetadataServiceException { + NotAllowedException, MetadataServiceException, DatabaseNotFoundException { final ImportDto request = ImportDto.builder() .header(true) .lineTermination("\\n") @@ -1540,7 +1744,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_2_ID)) - .thenReturn(TABLE_2_PRIVILEGED_DTO); + .thenReturn(TABLE_2_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_2_ID)) .thenReturn(DATABASE_1_USER_2_READ_ACCESS_DTO); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java index b003ebfb4fd427c0b6bd92aef0595915f5c2bdbd..0393be3dad8da280f29cc1be9133ffa42c9f6cb2 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/endpoint/ViewEndpointUnitTest.java @@ -4,7 +4,7 @@ import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.endpoints.ViewEndpoint; import at.tuwien.exception.*; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.service.DatabaseService; import at.tuwien.service.SubsetService; import at.tuwien.service.ViewService; @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.*; @Log4j2 @@ -46,7 +47,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { private DatabaseService databaseService; @MockBean - private CredentialService credentialService; + private CacheService credentialService; @MockBean private HttpServletRequest httpServletRequest; @@ -68,13 +69,14 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) public void create_succeeds() throws DatabaseNotFoundException, RemoteUnavailableException, ViewMalformedException, - SQLException, DatabaseUnavailableException, MetadataServiceException { + SQLException, DatabaseUnavailableException, MetadataServiceException, TableNotFoundException, + ImageNotFoundException, QueryMalformedException { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(databaseService.createView(DATABASE_1_PRIVILEGED_DTO, VIEW_1_CREATE_DTO)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); + when(databaseService.createView(any(DatabaseDto.class), anyString(), anyString())) + .thenReturn(VIEW_1_DTO); /* test */ final ResponseEntity<ViewDto> response = viewEndpoint.create(DATABASE_1_ID, VIEW_1_CREATE_DTO); @@ -88,10 +90,10 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); doThrow(SQLException.class) .when(databaseService) - .createView(DATABASE_1_PRIVILEGED_DTO, VIEW_1_CREATE_DTO); + .createView(any(DatabaseDto.class), anyString(), anyString()); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -106,9 +108,9 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(databaseService.createView(DATABASE_1_PRIVILEGED_DTO, VIEW_1_CREATE_DTO)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); + when(databaseService.createView(DATABASE_1_DTO, VIEW_1_NAME, VIEW_1_QUERY)) + .thenReturn(VIEW_1_DTO); /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { @@ -139,8 +141,8 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); - when(databaseService.exploreViews(DATABASE_1_PRIVILEGED_DTO)) + .thenReturn(DATABASE_1_DTO); + when(databaseService.exploreViews(DATABASE_1_DTO)) .thenReturn(List.of(VIEW_1_DTO, VIEW_2_DTO, VIEW_3_DTO)); /* test */ @@ -181,10 +183,10 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); doThrow(SQLException.class) .when(databaseService) - .exploreViews(DATABASE_1_PRIVILEGED_DTO); + .exploreViews(DATABASE_1_DTO); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -205,14 +207,16 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) public void delete_succeeds() throws RemoteUnavailableException, ViewMalformedException, ViewNotFoundException, - SQLException, DatabaseUnavailableException, MetadataServiceException { + SQLException, DatabaseUnavailableException, MetadataServiceException, DatabaseNotFoundException { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doNothing() .when(viewService) - .delete(VIEW_1_PRIVILEGED_DTO); + .delete(DATABASE_1_PRIVILEGED_DTO, VIEW_1_DTO); /* test */ final ResponseEntity<Void> response = viewEndpoint.delete(DATABASE_1_ID, VIEW_1_ID); @@ -222,14 +226,16 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) public void delete_unavailable_fails() throws RemoteUnavailableException, ViewMalformedException, SQLException, - MetadataServiceException, ViewNotFoundException { + MetadataServiceException, ViewNotFoundException, DatabaseNotFoundException { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); doThrow(SQLException.class) .when(viewService) - .delete(VIEW_1_PRIVILEGED_DTO); + .delete(DATABASE_1_PRIVILEGED_DTO, VIEW_1_DTO); /* test */ assertThrows(DatabaseUnavailableException.class, () -> { @@ -247,7 +253,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { .thenReturn(DATABASE_1_PRIVILEGED_DTO); doNothing() .when(viewService) - .delete(VIEW_1_PRIVILEGED_DTO); + .delete(DATABASE_1_PRIVILEGED_DTO,VIEW_1_DTO); /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { @@ -274,18 +280,18 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) public void getData_privateDataPrivateSchema_succeeds() throws RemoteUnavailableException, ViewNotFoundException, - SQLException, DatabaseUnavailableException, QueryMalformedException, PaginationException, - NotAllowedException, MetadataServiceException, TableNotFoundException, DatabaseNotFoundException { + DatabaseUnavailableException, QueryMalformedException, PaginationException, NotAllowedException, + MetadataServiceException, TableNotFoundException, DatabaseNotFoundException { final Dataset<Row> mock = sparkSession.emptyDataFrame(); /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); when(credentialService.getDatabase(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_1_ID)) .thenReturn(DATABASE_1_USER_1_READ_ACCESS_DTO); - when(subsetService.getData(any(DatabaseDto.class), anyString(), any(Instant.class), eq(0L), eq(10L), eq(null), eq(null))) + when(subsetService.getData(any(DatabaseDto.class), anyString())) .thenReturn(mock); when(httpServletRequest.getMethod()) .thenReturn("GET"); @@ -296,6 +302,31 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } + @Test + @WithAnonymousUser + public void getData_privateDataPrivateSchemaAnonymous_fails() throws RemoteUnavailableException, + ViewNotFoundException, QueryMalformedException, NotAllowedException, MetadataServiceException, + TableNotFoundException, DatabaseNotFoundException { + final Dataset<Row> mock = sparkSession.emptyDataFrame(); + + /* mock */ + when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) + .thenReturn(VIEW_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); + when(credentialService.getAccess(DATABASE_1_ID, USER_1_ID)) + .thenReturn(DATABASE_1_USER_1_READ_ACCESS_DTO); + when(subsetService.getData(any(DatabaseDto.class), anyString())) + .thenReturn(mock); + when(httpServletRequest.getMethod()) + .thenReturn("GET"); + + /* test */ + assertThrows(NotAllowedException.class, () -> { + viewEndpoint.getData(DATABASE_1_ID, VIEW_1_ID, null, null, null, httpServletRequest, null); + }); + } + @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"view-database-view-data"}) public void getData_privateHead_succeeds() throws RemoteUnavailableException, ViewNotFoundException, @@ -304,12 +335,14 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_3_ID)) - .thenReturn(VIEW_3_PRIVILEGED_DTO); + .thenReturn(VIEW_3_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(credentialService.getAccess(DATABASE_1_ID, USER_1_ID)) .thenReturn(DATABASE_1_USER_1_READ_ACCESS_DTO); when(httpServletRequest.getMethod()) .thenReturn("HEAD"); - when(viewService.count(eq(VIEW_3_PRIVILEGED_DTO), any(Instant.class))) + when(viewService.count(any(DatabaseDto.class), eq(VIEW_3_DTO), any(Instant.class))) .thenReturn(VIEW_3_DATA_COUNT); /* test */ @@ -331,7 +364,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); when(httpServletRequest.getMethod()) .thenReturn("GET"); doThrow(NotAllowedException.class) @@ -367,7 +400,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_4_ID); @@ -385,7 +418,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_4_ID); @@ -419,7 +452,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* mock */ when(credentialService.getView(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); doThrow(NotAllowedException.class) .when(credentialService) .getAccess(DATABASE_1_ID, USER_4_ID); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/gateway/MetadataServiceGatewayUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/gateway/MetadataServiceGatewayUnitTest.java index affb56208032bc818ce5f1dbe1d99008613ffa32..1ea87d2fc15cf72497784e85cfccaf14f796ad17 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/gateway/MetadataServiceGatewayUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/gateway/MetadataServiceGatewayUnitTest.java @@ -51,23 +51,14 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { @Test public void getTableById_succeeds() throws TableNotFoundException, RemoteUnavailableException, MetadataServiceException { - final HttpHeaders headers = new HttpHeaders(); - headers.set("X-Username", CONTAINER_1_PRIVILEGED_USERNAME); - headers.set("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD); /* mock */ when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(TableDto.class))) .thenReturn(ResponseEntity.status(HttpStatus.OK) - .headers(headers) - .body(TABLE_1_PRIVILEGED_DTO)); + .body(TABLE_1_DTO)); /* test */ final TableDto response = metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID); - assertEquals(IMAGE_1_JDBC, response.getDatabase().getContainer().getImage().getJdbcMethod()); - assertEquals(CONTAINER_1_HOST, response.getDatabase().getContainer().getHost()); - assertEquals(CONTAINER_1_PORT, response.getDatabase().getContainer().getPort()); - assertEquals(CONTAINER_1_PRIVILEGED_USERNAME, response.getDatabase().getContainer().getUsername()); - assertEquals(CONTAINER_1_PRIVILEGED_PASSWORD, response.getDatabase().getContainer().getPassword()); assertEquals(TABLE_1_INTERNAL_NAME, response.getInternalName()); } @@ -105,7 +96,7 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { /* mock */ when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(TableDto.class))) .thenReturn(ResponseEntity.status(HttpStatus.NO_CONTENT) - .body(TABLE_1_PRIVILEGED_DTO)); + .body(TABLE_1_DTO)); /* test */ assertThrows(MetadataServiceException.class, () -> { @@ -113,27 +104,6 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { }); } - @Test - public void getTableById_headerMissing_fails() { - final List<String> customHeaders = List.of("X-Username", "X-Password"); - - for (int i = 0; i < customHeaders.size(); i++) { - final HttpHeaders headers = new HttpHeaders(); - for (int j = 0; j < i; j++) { - headers.add(customHeaders.get(j), ""); - } - /* mock */ - when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(TableDto.class))) - .thenReturn(ResponseEntity.status(HttpStatus.OK) - .headers(headers) - .body(TABLE_1_PRIVILEGED_DTO)); - /* test */ - assertThrows(MetadataServiceException.class, () -> { - metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID); - }); - } - } - @Test public void getTableById_emptyBody_fails() { final HttpHeaders headers = new HttpHeaders(); @@ -156,8 +126,12 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { public void getDatabaseById_succeeds() throws RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { final HttpHeaders headers = new HttpHeaders(); + headers.set("X-Host", CONTAINER_1_HOST); + headers.set("X-Port", "" + CONTAINER_1_PORT); headers.set("X-Username", CONTAINER_1_PRIVILEGED_USERNAME); headers.set("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD); + headers.set("X-Jdbc-Method", IMAGE_1_JDBC); + headers.set("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port"); /* mock */ when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(DatabaseDto.class))) @@ -254,8 +228,12 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { @Test public void getContainerById_succeeds() throws RemoteUnavailableException, ContainerNotFoundException, MetadataServiceException { final HttpHeaders headers = new HttpHeaders(); + headers.set("X-Host", CONTAINER_1_HOST); + headers.set("X-Port", "" + CONTAINER_1_PORT); headers.set("X-Username", CONTAINER_1_PRIVILEGED_USERNAME); headers.set("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD); + headers.set("X-Jdbc-Method", IMAGE_1_JDBC); + headers.set("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port"); /* mock */ when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(ContainerDto.class))) @@ -351,15 +329,11 @@ public class MetadataServiceGatewayUnitTest extends AbstractUnitTest { @Test public void getViewById_succeeds() throws RemoteUnavailableException, ViewNotFoundException, MetadataServiceException { - final HttpHeaders headers = new HttpHeaders(); - headers.set("X-Username", CONTAINER_1_PRIVILEGED_USERNAME); - headers.set("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD); /* mock */ when(internalRestTemplate.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), eq(ViewDto.class))) .thenReturn(ResponseEntity.ok() - .headers(headers) - .body(VIEW_1_PRIVILEGED_DTO)); + .body(VIEW_1_DTO)); /* test */ final ViewDto response = metadataServiceGateway.getViewById(CONTAINER_1_ID, VIEW_1_ID); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerIntegrationTest.java index bca5e1141082e320fe1bef132335fea7e30b7be3..bf63189bf22e08a6c6c46df6623ef1a782345b98 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerIntegrationTest.java @@ -2,10 +2,11 @@ package at.tuwien.listener; import at.tuwien.config.MariaDbConfig; import at.tuwien.config.MariaDbContainerConfig; +import at.tuwien.exception.DatabaseNotFoundException; import at.tuwien.exception.MetadataServiceException; import at.tuwien.exception.RemoteUnavailableException; import at.tuwien.exception.TableNotFoundException; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; @@ -42,7 +43,7 @@ import static org.mockito.Mockito.when; public class DefaultListenerIntegrationTest extends AbstractUnitTest { @MockBean - private CredentialService credentialService; + private CacheService credentialService; @Autowired private DefaultListener defaultListener; @@ -58,17 +59,19 @@ public class DefaultListenerIntegrationTest extends AbstractUnitTest { genesis(); /* database */ MariaDbConfig.dropAllDatabases(CONTAINER_1_PRIVILEGED_DTO); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test public void onMessage_succeeds(CapturedOutput output) throws TableNotFoundException, RemoteUnavailableException, - MetadataServiceException { + MetadataServiceException, DatabaseNotFoundException { final Message request = buildMessage("dbrepo." + DATABASE_1_ID + "." + TABLE_1_ID, "{\"id\":4,\"date\":\"2023-10-03\",\"mintemp\":15.0,\"rainfall\":0.2}", new HashMap<>()); /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); /* test */ defaultListener.onMessage(request); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerUnitTest.java index 74042aa5788c38205d8b73abff31aadf162999e3..686a134dc56f5c118a5e25b2cb0150eb05ac47fd 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/listener/DefaultListenerUnitTest.java @@ -2,10 +2,11 @@ package at.tuwien.listener; import at.tuwien.config.MariaDbConfig; import at.tuwien.config.MariaDbContainerConfig; +import at.tuwien.exception.DatabaseNotFoundException; import at.tuwien.exception.MetadataServiceException; import at.tuwien.exception.RemoteUnavailableException; import at.tuwien.exception.TableNotFoundException; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; @@ -38,7 +39,7 @@ import static org.mockito.Mockito.when; public class DefaultListenerUnitTest extends AbstractUnitTest { @MockBean - private CredentialService credentialService; + private CacheService credentialService; @Autowired private DefaultListener defaultListener; @@ -54,7 +55,7 @@ public class DefaultListenerUnitTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropAllDatabases(CONTAINER_1_PRIVILEGED_DTO); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test @@ -77,12 +78,14 @@ public class DefaultListenerUnitTest extends AbstractUnitTest { @Test public void onMessage_messageMalformed_fails(CapturedOutput output) throws TableNotFoundException, - RemoteUnavailableException, MetadataServiceException { - final Message request = buildMessage("dbrepo.1.1", "{,}", new HashMap<>()); + RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException { + final Message request = buildMessage(TABLE_1_ROUTING_KEY, "{,}", new HashMap<>()); /* mock */ when(credentialService.getTable(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); + when(credentialService.getDatabase(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); /* test */ defaultListener.onMessage(request); @@ -92,7 +95,7 @@ public class DefaultListenerUnitTest extends AbstractUnitTest { @Test public void onMessage_tableNotFound_fails(CapturedOutput output) throws TableNotFoundException, RemoteUnavailableException, MetadataServiceException { - final Message request = buildMessage("dbrepo.1.1", "{\"id\":1}", new HashMap<>()); + final Message request = buildMessage(TABLE_1_ROUTING_KEY, "{\"id\": 1}", new HashMap<>()); /* mock */ doThrow(TableNotFoundException.class) diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java index 120fe49d8f98f61e36840b69d8c33fa00bc27053..ae03fdbf68cefc1db05455d0ec228ea00be1c12f 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java @@ -2,22 +2,20 @@ package at.tuwien.mvc; import at.tuwien.api.database.query.ExecuteStatementDto; import at.tuwien.api.database.query.ImportDto; +import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.query.QueryPersistDto; import at.tuwien.api.database.table.TupleDeleteDto; import at.tuwien.api.database.table.TupleDto; import at.tuwien.api.database.table.TupleUpdateDto; import at.tuwien.config.MetricsConfig; -import at.tuwien.endpoints.*; +import at.tuwien.endpoints.SubsetEndpoint; +import at.tuwien.endpoints.TableEndpoint; +import at.tuwien.endpoints.ViewEndpoint; import at.tuwien.listener.DefaultListener; import at.tuwien.test.AbstractUnitTest; -import io.micrometer.observation.annotation.Observed; import io.micrometer.observation.tck.TestObservationRegistry; -import io.swagger.v3.oas.annotations.Operation; import jakarta.servlet.http.HttpServletRequest; import lombok.extern.log4j.Log4j2; -import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -31,14 +29,11 @@ import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.*; +import java.util.HashMap; +import java.util.List; import static at.tuwien.utils.RabbitMqUtils.buildMessage; import static io.micrometer.observation.tck.TestObservationRegistryAssert.assertThat; -import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @@ -63,12 +58,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { @Autowired private HttpServletRequest httpServletRequest; - @Autowired - private AccessEndpoint accessEndpoint; /* no metrics */ - - @Autowired - private DatabaseEndpoint databaseEndpoint; /* no metrics */ - @Autowired private SubsetEndpoint subsetEndpoint; @@ -78,8 +67,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { @Autowired private ViewEndpoint viewEndpoint; - private static final Map<String, String> metrics = new TreeMap<>(); /* sorted */ - @TestConfiguration static class ObservationTestConfiguration { @@ -89,16 +76,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { } } - @BeforeAll - public static void beforeAll() { - FileUtils.deleteQuietly(new File("../metrics.txt")); - } - - @AfterAll - public static void afterAll() throws IOException { - saveObservedMetrics(metrics); - } - @Test public void prometheus_succeeds() throws Exception { @@ -121,7 +98,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* test */ assertThat(registry) .hasObservationWithNameEqualTo("dbrepo_message_receive"); - generic_openApiDocs(DefaultListener.class); } @Test @@ -135,7 +111,7 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* ignore */ } try { - subsetEndpoint.create(DATABASE_1_ID, ExecuteStatementDto.builder().statement(QUERY_5_STATEMENT).build(), USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); + subsetEndpoint.create(DATABASE_1_ID, QUERY_1_SUBSET_DTO, USER_1_PRINCIPAL, httpServletRequest, null, 0L, 10L); } catch (Exception e) { /* ignore */ } @@ -161,7 +137,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(SubsetEndpoint.class); } @Test @@ -212,7 +187,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(TableEndpoint.class); } @Test @@ -229,21 +203,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* test */ assertThat(registry) .hasObservationWithNameEqualTo("dbrepo_view_data"); - generic_openApiDocs(ViewEndpoint.class); - } - - private static void generic_openApiDocs(Class<?> endpoint) { - final List<Method> methods = Arrays.stream(endpoint.getMethods()) - .filter(m -> m.getDeclaringClass().equals(endpoint)) - .toList(); - methods.forEach(m -> { - final Observed observed = m.getDeclaredAnnotation(Observed.class); - final Operation operation = m.getDeclaredAnnotation(Operation.class); - if (observed != null) { - assertNotNull(operation); - metrics.put(observed.name(), operation.summary()); - } - }); } } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/AccessServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/AccessServiceIntegrationTest.java index 2c174e0a3da88a30e2e8ed8d739cf0200fd5a237..abcfd4a175b2cd62cc8fef73c4f9627bc2077d62 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/AccessServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/AccessServiceIntegrationTest.java @@ -45,7 +45,7 @@ public class AccessServiceIntegrationTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceIntegrationTest.java index e1579fbe95d8d04cbdbe41f87f5dc066b874b26c..ef4f8713c87058268bdf86c653248c425113a7b8 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceIntegrationTest.java @@ -79,7 +79,7 @@ public class ContainerServiceIntegrationTest extends AbstractUnitTest { } @Test - public void createQueryStore_succeeds() throws SQLException, QueryStoreCreateException, InterruptedException { + public void createQueryStore_succeeds() throws SQLException, QueryStoreCreateException { /* test */ createQueryStore_generic(DATABASE_1_INTERNALNAME); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/CredentialServiceUnitTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/CredentialServiceUnitTest.java index 07e283640a92bd68a774158d196578a0ab9fd23d..95121ad704006cd814cf4962597e6382bc72b284 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/CredentialServiceUnitTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/CredentialServiceUnitTest.java @@ -8,7 +8,7 @@ import at.tuwien.api.database.table.TableDto; import at.tuwien.api.user.UserDto; import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; -import at.tuwien.service.impl.CredentialServiceImpl; +import at.tuwien.service.impl.CacheServiceImpl; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; @@ -30,7 +30,7 @@ import static org.mockito.Mockito.when; public class CredentialServiceUnitTest extends AbstractUnitTest { @Autowired - private CredentialServiceImpl credentialService; + private CacheServiceImpl credentialService; @MockBean private MetadataServiceGateway metadataServiceGateway; @@ -48,7 +48,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getDatabaseById(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_1_DTO); /* test */ final DatabaseDto response = credentialService.getDatabase(DATABASE_1_ID); @@ -62,7 +62,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getDatabaseById(DATABASE_1_ID)) - .thenReturn(DATABASE_1_PRIVILEGED_DTO) + .thenReturn(DATABASE_1_DTO) .thenThrow(RuntimeException.class) /* should never be thrown */; credentialService.getDatabase(DATABASE_1_ID); @@ -78,8 +78,8 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getDatabaseById(DATABASE_1_ID)) - .thenReturn(DATABASE_2_PRIVILEGED_DTO) /* needs to be different id for test case */ - .thenReturn(DATABASE_1_PRIVILEGED_DTO); + .thenReturn(DATABASE_2_DTO) /* needs to be different id for test case */ + .thenReturn(DATABASE_1_DTO); /* pre-condition */ final DatabaseDto tmp = credentialService.getDatabase(DATABASE_1_ID); @@ -98,7 +98,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getContainerById(CONTAINER_1_ID)) - .thenReturn(CONTAINER_1_PRIVILEGED_DTO); + .thenReturn(CONTAINER_1_DTO); /* test */ final ContainerDto response = credentialService.getContainer(CONTAINER_1_ID); @@ -127,9 +127,9 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { InterruptedException, ContainerNotFoundException { /* mock */ - when(metadataServiceGateway.getContainerById(DATABASE_1_ID)) - .thenReturn(CONTAINER_2_PRIVILEGED_DTO) /* needs to be different id for test case */ - .thenReturn(CONTAINER_1_PRIVILEGED_DTO); + when(metadataServiceGateway.getContainerById(CONTAINER_1_ID)) + .thenReturn(CONTAINER_2_DTO) /* needs to be different id for test case */ + .thenReturn(CONTAINER_1_DTO); /* pre-condition */ final ContainerDto tmp = credentialService.getContainer(CONTAINER_1_ID); @@ -251,7 +251,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); /* test */ final TableDto response = credentialService.getTable(DATABASE_1_ID, TABLE_1_ID); @@ -265,7 +265,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO) + .thenReturn(TABLE_1_DTO) .thenThrow(RuntimeException.class) /* should never be thrown */; credentialService.getTable(DATABASE_1_ID, TABLE_1_ID); @@ -281,8 +281,8 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_2_PRIVILEGED_DTO) /* needs to be different id for test case */ - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_2_DTO) /* needs to be different id for test case */ + .thenReturn(TABLE_1_DTO); /* pre-condition */ final TableDto tmp = credentialService.getTable(DATABASE_1_ID, TABLE_1_ID); @@ -301,7 +301,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getViewById(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_1_DTO); /* test */ final ViewDto response = credentialService.getView(DATABASE_1_ID, VIEW_1_ID); @@ -314,7 +314,7 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getViewById(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_1_PRIVILEGED_DTO) + .thenReturn(VIEW_1_DTO) .thenThrow(RuntimeException.class) /* should never be thrown */; credentialService.getView(DATABASE_1_ID, VIEW_1_ID); @@ -330,8 +330,8 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getViewById(DATABASE_1_ID, VIEW_1_ID)) - .thenReturn(VIEW_2_PRIVILEGED_DTO) /* needs to be different id for test case */ - .thenReturn(VIEW_1_PRIVILEGED_DTO); + .thenReturn(VIEW_2_DTO) /* needs to be different id for test case */ + .thenReturn(VIEW_1_DTO); /* pre-condition */ final ViewDto tmp = credentialService.getView(DATABASE_1_ID, VIEW_1_ID); @@ -344,26 +344,4 @@ public class CredentialServiceUnitTest extends AbstractUnitTest { assertEquals(VIEW_1_ID, response.getId()); } - @Test - public void invalidateAccess_succeeds() throws NotAllowedException, RemoteUnavailableException, - MetadataServiceException { - - /* mock */ - when(metadataServiceGateway.getAccess(DATABASE_1_ID, USER_1_ID)) - .thenReturn(DATABASE_1_USER_1_READ_ACCESS_DTO) - .thenThrow(RuntimeException.class); - - /* pre-condition */ - final DatabaseAccessDto response = credentialService.getAccess(DATABASE_1_ID, USER_1_ID); - assertNotNull(response); - - /* test */ - credentialService.invalidateAccess(DATABASE_1_ID); - - /* post-condition */ - assertThrows(RuntimeException.class, () -> { - credentialService.getAccess(DATABASE_1_ID, USER_1_ID); - }); - } - } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceIntegrationTest.java index 6663a71d135033e5fb4a3b3810d04d54130e270a..40fdb982ab062bb502597e899ac04caec496b564 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceIntegrationTest.java @@ -4,9 +4,7 @@ import at.tuwien.api.database.ViewColumnDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableBriefDto; import at.tuwien.api.database.table.TableDto; -import at.tuwien.api.database.table.columns.ColumnDto; -import at.tuwien.api.database.table.columns.ColumnTypeDto; -import at.tuwien.api.database.table.columns.CreateTableColumnDto; +import at.tuwien.api.database.table.columns.*; import at.tuwien.api.database.table.constraints.ConstraintsDto; import at.tuwien.api.database.table.constraints.CreateTableConstraintsDto; import at.tuwien.api.database.table.constraints.foreign.CreateForeignKeyDto; @@ -39,6 +37,7 @@ import java.sql.SQLException; import java.util.LinkedList; import java.util.List; import java.util.Set; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; @@ -64,9 +63,9 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_2_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_2_DTO); + MariaDbConfig.createInitDatabase(DATABASE_2_PRIVILEGED_DTO); Thread.sleep(1000) /* wait for test container some more */; } @@ -74,7 +73,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { public void createView_succeeds() throws SQLException, ViewMalformedException { /* test */ - databaseService.createView(DATABASE_1_PRIVILEGED_DTO, VIEW_1_CREATE_DTO); + databaseService.createView(DATABASE_1_PRIVILEGED_DTO, VIEW_1_NAME, VIEW_1_QUERY); } @Test @@ -85,7 +84,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final ViewDto view0 = response.get(0); assertEquals("not_in_metadata_db2", view0.getName()); assertEquals("not_in_metadata_db2", view0.getInternalName()); - assertEquals(DATABASE_1_ID, view0.getVdbid()); + assertEquals(DATABASE_1_ID, view0.getDatabaseId()); assertEquals(USER_1_BRIEF_DTO, view0.getOwner()); assertFalse(view0.getIsInitialView()); assertEquals(DATABASE_1_PUBLIC, view0.getIsPublic()); @@ -150,7 +149,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto response = databaseService.inspectTable(DATABASE_1_PRIVILEGED_DTO, "not_in_metadata_db"); assertEquals("not_in_metadata_db", response.getInternalName()); assertEquals("not_in_metadata_db", response.getName()); - assertEquals(DATABASE_1_ID, response.getTdbid()); + assertEquals(DATABASE_1_ID, response.getDatabaseId()); assertTrue(response.getIsVersioned()); assertEquals(DATABASE_1_PUBLIC, response.getIsPublic()); final List<ColumnDto> columns = response.getColumns(); @@ -186,7 +185,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto response = databaseService.inspectTable(DATABASE_2_PRIVILEGED_DTO, "experiments"); assertEquals("experiments", response.getInternalName()); assertEquals("experiments", response.getName()); - assertEquals(DATABASE_2_ID, response.getTdbid()); + assertEquals(DATABASE_2_ID, response.getDatabaseId()); assertTrue(response.getIsVersioned()); assertEquals(DATABASE_2_PUBLIC, response.getIsPublic()); assertNotNull(response.getOwner()); @@ -205,10 +204,10 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { assertColumn(columns.get(0), null, null, DATABASE_2_ID, "id", "id", ColumnTypeDto.BIGINT, 19L, 0L, false, null); assertColumn(columns.get(1), null, null, DATABASE_2_ID, "mode", "mode", ColumnTypeDto.ENUM, 3L, null, false, null); assertEquals(2, columns.get(1).getEnums().size()); - assertEquals(List.of("ABC", "DEF"), columns.get(1).getEnums()); + assertEquals(List.of("ABC", "DEF"), columns.get(1).getEnums().stream().map(EnumDto::getValue).toList()); assertColumn(columns.get(2), null, null, DATABASE_2_ID, "seq", "seq", ColumnTypeDto.SET, 5L, null, true, null); assertEquals(3, columns.get(2).getSets().size()); - assertEquals(List.of("1", "2", "3"), columns.get(2).getSets()); + assertEquals(List.of("1", "2", "3"), columns.get(2).getSets().stream().map(SetDto::getValue).toList()); /* ignore rest (constraints) */ } @@ -219,7 +218,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto response = databaseService.inspectTable(DATABASE_1_PRIVILEGED_DTO, "weather_aus"); assertEquals("weather_aus", response.getInternalName()); assertEquals("weather_aus", response.getName()); - assertEquals(DATABASE_1_ID, response.getTdbid()); + assertEquals(DATABASE_1_ID, response.getDatabaseId()); assertTrue(response.getIsVersioned()); assertEquals(DATABASE_1_PUBLIC, response.getIsPublic()); assertNotNull(response.getOwner()); @@ -439,7 +438,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final ViewDto response = databaseService.inspectView(DATABASE_1_PRIVILEGED_DTO, "not_in_metadata_db2"); assertEquals("not_in_metadata_db2", response.getInternalName()); assertEquals("not_in_metadata_db2", response.getName()); - assertEquals(DATABASE_1_ID, response.getVdbid()); + assertEquals(DATABASE_1_ID, response.getDatabaseId()); assertEquals(USER_1_BRIEF_DTO, response.getOwner()); assertFalse(response.getIsInitialView()); assertEquals(DATABASE_1_PUBLIC, response.getIsPublic()); @@ -473,7 +472,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto table0 = response.get(0); Assertions.assertEquals("complex_foreign_keys", table0.getInternalName()); Assertions.assertEquals("complex_foreign_keys", table0.getName()); - Assertions.assertEquals(DATABASE_1_ID, table0.getTdbid()); + Assertions.assertEquals(DATABASE_1_ID, table0.getDatabaseId()); assertTrue(table0.getIsVersioned()); Assertions.assertEquals(DATABASE_1_PUBLIC, table0.getIsPublic()); final List<ColumnDto> columns0 = table0.getColumns(); @@ -520,7 +519,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto table1 = response.get(1); Assertions.assertEquals("complex_primary_key", table1.getInternalName()); Assertions.assertEquals("complex_primary_key", table1.getName()); - Assertions.assertEquals(DATABASE_1_ID, table1.getTdbid()); + Assertions.assertEquals(DATABASE_1_ID, table1.getDatabaseId()); assertTrue(table1.getIsVersioned()); Assertions.assertEquals(DATABASE_1_PUBLIC, table1.getIsPublic()); final List<ColumnDto> columns1 = table1.getColumns(); @@ -548,7 +547,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto table2 = response.get(2); Assertions.assertEquals("exotic_boolean", table2.getInternalName()); Assertions.assertEquals("exotic_boolean", table2.getName()); - Assertions.assertEquals(DATABASE_1_ID, table2.getTdbid()); + Assertions.assertEquals(DATABASE_1_ID, table2.getDatabaseId()); assertTrue(table2.getIsVersioned()); Assertions.assertEquals(DATABASE_1_PUBLIC, table2.getIsPublic()); final List<ColumnDto> columns2 = table2.getColumns(); @@ -569,7 +568,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { final TableDto table3 = response.get(3); Assertions.assertEquals("not_in_metadata_db", table3.getInternalName()); Assertions.assertEquals("not_in_metadata_db", table3.getName()); - Assertions.assertEquals(DATABASE_1_ID, table3.getTdbid()); + Assertions.assertEquals(DATABASE_1_ID, table3.getDatabaseId()); assertTrue(table3.getIsVersioned()); Assertions.assertEquals(DATABASE_1_PUBLIC, table3.getIsPublic()); final List<ColumnDto> columns3 = table3.getColumns(); @@ -709,21 +708,7 @@ public class DatabaseServiceIntegrationTest extends AbstractUnitTest { assertEquals(TABLE_1_COLUMNS.size(), response.getColumns().size()); } - protected static void assertViewColumn(ViewColumnDto column, ViewColumnDto other) { - assertNotNull(column); - assertNotNull(other); - assertEquals(column.getId(), other.getId()); - assertEquals(column.getDatabaseId(), other.getDatabaseId()); - assertEquals(column.getName(), other.getName()); - assertEquals(column.getInternalName(), other.getInternalName()); - assertEquals(column.getColumnType(), other.getColumnType()); - assertEquals(column.getSize(), other.getSize()); - assertEquals(column.getD(), other.getD()); - assertEquals(column.getIsNullAllowed(), other.getIsNullAllowed()); - assertEquals(column.getDescription(), other.getDescription()); - } - - protected static void assertColumn(ColumnDto column, Long id, Long tableId, Long databaseId, String name, + protected static void assertColumn(ColumnDto column, UUID id, UUID tableId, UUID databaseId, String name, String internalName, ColumnTypeDto type, Long size, Long d, Boolean nullAllowed, String description) { log.trace("assert column: {}", internalName); diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/QueueServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/QueueServiceIntegrationTest.java index 18b2dd8e01bc8d8e10f1de9bea9798846868bc6d..6996ecb9f49821b329471c6dd91dca0b4fcc74d5 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/QueueServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/QueueServiceIntegrationTest.java @@ -2,7 +2,7 @@ package at.tuwien.service; import at.tuwien.config.MariaDbConfig; import at.tuwien.config.MariaDbContainerConfig; -import at.tuwien.exception.ContainerNotFoundException; +import at.tuwien.exception.DatabaseNotFoundException; import at.tuwien.exception.MetadataServiceException; import at.tuwien.exception.RemoteUnavailableException; import at.tuwien.exception.TableNotFoundException; @@ -53,12 +53,12 @@ public class QueueServiceIntegrationTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test - public void insert_succeeds() throws SQLException, RemoteUnavailableException, ContainerNotFoundException, - TableNotFoundException, MetadataServiceException { + public void insert_succeeds() throws SQLException, RemoteUnavailableException, TableNotFoundException, + MetadataServiceException, DatabaseNotFoundException { final Map<String, Object> request = new HashMap<>() {{ put("id", 4L); put("date", "2023-10-03"); @@ -68,29 +68,31 @@ public class QueueServiceIntegrationTest extends AbstractUnitTest { }}; /* mock */ - when(metadataServiceGateway.getContainerById(CONTAINER_1_ID)) - .thenReturn(CONTAINER_1_PRIVILEGED_DTO); + when(metadataServiceGateway.getDatabaseById(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); /* test */ - queueService.insert(TABLE_1_PRIVILEGED_DTO, request); + queueService.insert(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); } @Test public void insert_onlyMandatoryFields_succeeds() throws SQLException, RemoteUnavailableException, - TableNotFoundException, MetadataServiceException { + TableNotFoundException, MetadataServiceException, DatabaseNotFoundException { final Map<String, Object> request = new HashMap<>() {{ put("id", 5L); put("date", "2023-10-04"); }}; /* mock */ + when(metadataServiceGateway.getDatabaseById(DATABASE_1_ID)) + .thenReturn(DATABASE_1_PRIVILEGED_DTO); when(metadataServiceGateway.getTableById(DATABASE_1_ID, TABLE_1_ID)) - .thenReturn(TABLE_1_PRIVILEGED_DTO); + .thenReturn(TABLE_1_DTO); /* test */ - queueService.insert(TABLE_1_PRIVILEGED_DTO, request); + queueService.insert(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); } } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java index 56115690b503ce3c71bb241fdd84704710a0bb0b..d05979af36b59882a76078bb424aa3e43230933f 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/SubsetServiceIntegrationTest.java @@ -1,6 +1,6 @@ package at.tuwien.service; -import at.tuwien.api.database.query.QueryDto; +import at.tuwien.api.database.query.*; import at.tuwien.api.identifier.IdentifierBriefDto; import at.tuwien.config.MariaDbConfig; import at.tuwien.config.MariaDbContainerConfig; @@ -8,9 +8,14 @@ import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; +import org.apache.spark.sql.Dataset; +import org.apache.spark.sql.Row; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; @@ -20,7 +25,12 @@ import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Testcontainers; import java.sql.SQLException; +import java.time.Instant; +import java.util.LinkedList; import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; @@ -32,11 +42,19 @@ import static org.mockito.Mockito.when; public class SubsetServiceIntegrationTest extends AbstractUnitTest { @Autowired - private SubsetService queryService; + private SubsetService subsetService; @MockBean private MetadataServiceGateway metadataServiceGateway; + public static Stream<Arguments> create_arguments() { + return Stream.of( + Arguments.arguments("singleQuote", "' DROP TABLE `weather_location`; --"), + Arguments.arguments("singleQuoteEscaped", "\' DROP TABLE `weather_location`; --"), + Arguments.arguments("doubleQuote", "\" DROP TABLE `weather_location`; --") + ); + } + @Container private static MariaDBContainer<?> mariaDBContainer = MariaDbContainerConfig.getContainer(); @@ -45,7 +63,7 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test @@ -55,8 +73,8 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { /* test */ final List<QueryDto> response = findAll_generic(null); assertEquals(2, response.size()); - assertEquals(1L, response.get(0).getId()); - assertEquals(2L, response.get(1).getId()); + assertNotNull(response.get(0).getId()); + assertNotNull(response.get(1).getId()); } @Test @@ -66,7 +84,7 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { /* test */ final List<QueryDto> response = findAll_generic(true); assertEquals(1, response.size()); - assertEquals(1L, response.get(0).getId()); + assertNotNull(response.get(0).getId()); } @Test @@ -76,15 +94,18 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { /* test */ final List<QueryDto> response = findAll_generic(false); assertEquals(1, response.size()); - assertEquals(2L, response.get(0).getId()); + assertNotNull(response.get(0).getId()); } @Test public void findById_succeeds() throws SQLException, QueryNotFoundException, UserNotFoundException, RemoteUnavailableException, MetadataServiceException, DatabaseNotFoundException, InterruptedException { + /* mock */ + final UUID queryId = MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO, USER_1_ID); + /* test */ - findById_generic(QUERY_1_ID); + findById_generic(queryId); } @Test @@ -92,7 +113,7 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(QueryNotFoundException.class, () -> { - findById_generic(9999L); + findById_generic(UUID.randomUUID()); }); } @@ -102,13 +123,14 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { InterruptedException { /* mock */ + final UUID queryId2 = MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_2_DTO, USER_1_ID); when(metadataServiceGateway.getUserById(USER_1_ID)) .thenReturn(USER_1_DTO); /* test */ - persist_generic(QUERY_2_ID, List.of(IDENTIFIER_5_BRIEF_DTO), true); - final QueryDto response = queryService.findById(DATABASE_1_PRIVILEGED_DTO, QUERY_2_ID); - assertEquals(2L, response.getId()); + persist_generic(queryId2, List.of(IDENTIFIER_5_BRIEF_DTO), true); + final QueryDto response = subsetService.findById(DATABASE_1_PRIVILEGED_DTO, queryId2); + assertEquals(queryId2, response.getId()); assertTrue(response.getIsPersisted()); } @@ -118,17 +140,150 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { InterruptedException { /* mock */ + final UUID queryId1 = MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO, USER_1_ID); when(metadataServiceGateway.getUserById(USER_1_ID)) .thenReturn(USER_1_DTO); /* test */ - persist_generic(QUERY_1_ID, List.of(IDENTIFIER_2_BRIEF_DTO), false); - final QueryDto response = queryService.findById(DATABASE_1_PRIVILEGED_DTO, QUERY_1_ID); - assertEquals(1L, response.getId()); + persist_generic(queryId1, List.of(IDENTIFIER_2_BRIEF_DTO), false); + final QueryDto response = subsetService.findById(DATABASE_1_PRIVILEGED_DTO, queryId1); + assertEquals(queryId1, response.getId()); assertFalse(response.getIsPersisted()); } - protected void findById_generic(Long queryId) throws RemoteUnavailableException, SQLException, + @Test + public void getData_succeeds() throws QueryMalformedException, TableNotFoundException { + final List<List<String>> expected = List.of( + List.of("1", "2008-12-01", "Albury", "13.4", "0.6"), + List.of("2", "2008-12-02", "Albury", "7.4", "0.0"), + List.of("3", "2008-12-03", "Albury", "12.9", "0.0")); + + + /* test */ + final Dataset<Row> response = subsetService.getData(DATABASE_1_PRIVILEGED_DTO, QUERY_1_STATEMENT); + assertNotNull(response); + final List<List<String>> mapped = response.collectAsList() + .stream() + .map(row -> { + final List<String> map = new LinkedList<>(); + for (int i = 0; i < response.columns().length; i++) { + map.add(row.get(i) != null ? String.valueOf(row.get(i)) : ""); + } + return map; + }) + .toList(); + assertEquals(expected, mapped); + } + + @Test + public void getData_notFound_fails() { + + /* test */ + assertThrows(TableNotFoundException.class, () -> { + subsetService.getData(DATABASE_1_PRIVILEGED_DTO, "SELECT 1 FROM i_do_not_exist"); + }); + } + + @Test + public void reExecuteCount_succeeds() throws SQLException, QueryMalformedException { + + /* test */ + final Long response = subsetService.reExecuteCount(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO); + assertNotNull(response); + } + + @Test + public void reExecuteCount_malformed_fails() { + final QueryDto request = QueryDto.builder() + .execution(Instant.now()) + .databaseId(DATABASE_1_ID) + .query("SELECT") // <<< + .build(); + + /* test */ + assertThrows(QueryMalformedException.class, () -> { + subsetService.reExecuteCount(DATABASE_1_PRIVILEGED_DTO, request); + }); + } + + @Test + public void executeCountNonPersistent_succeeds() throws SQLException, QueryMalformedException { + + /* test */ + final Long response = subsetService.executeCountNonPersistent(DATABASE_1_PRIVILEGED_DTO, QUERY_1_STATEMENT, QUERY_1_CREATED); + assertNotNull(response); + } + + @Test + public void executeCountNonPersistent_malformed_fails() { + + /* test */ + assertThrows(QueryMalformedException.class, () -> { + subsetService.executeCountNonPersistent(DATABASE_1_PRIVILEGED_DTO, "SELECT", QUERY_1_CREATED); + }); + } + + @Test + public void executeCountNonPersistent_illegalQuery_fails() { + + /* test */ + assertThrows(QueryMalformedException.class, () -> { + subsetService.executeCountNonPersistent(DATABASE_1_PRIVILEGED_DTO, "DROP DATABASE `weather`", QUERY_1_CREATED); + }); + } + + @Test + public void storeQuery_succeeds() throws SQLException, QueryStoreInsertException, ViewMalformedException { + + /* test */ + final UUID response = subsetService.storeQuery(DATABASE_1_PRIVILEGED_DTO, QUERY_1_STATEMENT, QUERY_1_CREATED, USER_1_ID); + assertNotNull(response); + } + + @Test + public void create_succeeds() throws SQLException, QueryStoreInsertException, ViewMalformedException, + TableNotFoundException, QueryMalformedException, ImageNotFoundException { + + /* test */ + final UUID response = subsetService.create(DATABASE_1_PRIVILEGED_DTO, QUERY_1_SUBSET_DTO, QUERY_1_CREATED, USER_1_ID); + assertNotNull(response); + } + + @ParameterizedTest + @MethodSource("create_arguments") + public void create_illegalQuery_succeeds(String name, String injection) throws TableNotFoundException, + QueryStoreInsertException, ViewMalformedException, SQLException, QueryMalformedException, + ImageNotFoundException { + final SubsetDto request = SubsetDto.builder() + .tableId(TABLE_1_ID) + .columns(new LinkedList<>(List.of(COLUMN_1_1_ID, COLUMN_1_2_ID, COLUMN_1_3_ID, COLUMN_1_4_ID, COLUMN_1_5_ID))) + .filter(new LinkedList<>(List.of(FilterDto.builder() + .type(FilterTypeDto.WHERE) + .columnId(COLUMN_1_1_ID) + .operatorId(IMAGE_1_OPERATORS_2_ID) + .value(injection) + .build()))) + .order(new LinkedList<>(List.of(OrderDto.builder() + .columnId(COLUMN_1_1_ID) + .direction(OrderTypeDto.ASC) + .build()))) + .build(); + + /* test */ + subsetService.create(DATABASE_1_PRIVILEGED_DTO, request, QUERY_1_CREATED, USER_1_ID); + assertEquals(1, MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT 1 WHERE EXISTS (SELECT * FROM `weather_location`)", Set.of()).size()); + } + + @Test + public void storeQuery_fails() { + + /* test */ + assertThrows(QueryStoreInsertException.class, () -> { + subsetService.storeQuery(DATABASE_1_PRIVILEGED_DTO, "DROP DATABASE `weather`", QUERY_1_CREATED, USER_1_ID); + }); + } + + protected void findById_generic(UUID queryId) throws RemoteUnavailableException, SQLException, UserNotFoundException, QueryNotFoundException, MetadataServiceException, DatabaseNotFoundException, InterruptedException { @@ -136,15 +291,14 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { Thread.sleep(1000) /* wait for test container some more */; /* mock */ - when(metadataServiceGateway.getIdentifiers(DATABASE_1_ID, QUERY_1_ID)) + when(metadataServiceGateway.getIdentifiers(DATABASE_1_ID, queryId)) .thenReturn(List.of(IDENTIFIER_2_BRIEF_DTO)); when(metadataServiceGateway.getUserById(USER_1_ID)) .thenReturn(USER_1_DTO); - MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO, USER_1_ID); /* test */ - final QueryDto response = queryService.findById(DATABASE_1_PRIVILEGED_DTO, queryId); - assertEquals(QUERY_1_ID, response.getId()); + final QueryDto response = subsetService.findById(DATABASE_1_PRIVILEGED_DTO, queryId); + assertEquals(queryId, response.getId()); } protected List<QueryDto> findAll_generic(Boolean filterPersisted) throws SQLException, QueryNotFoundException, @@ -161,10 +315,10 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { .thenReturn(List.of(IDENTIFIER_2_BRIEF_DTO, IDENTIFIER_5_BRIEF_DTO)); /* test */ - return queryService.findAll(DATABASE_1_PRIVILEGED_DTO, filterPersisted); + return subsetService.findAll(DATABASE_1_PRIVILEGED_DTO, filterPersisted); } - protected void persist_generic(Long queryId, List<IdentifierBriefDto> identifiers, Boolean persist) + protected void persist_generic(UUID queryId, List<IdentifierBriefDto> identifiers, Boolean persist) throws RemoteUnavailableException, SQLException, QueryStorePersistException, MetadataServiceException, DatabaseNotFoundException, InterruptedException { @@ -174,11 +328,9 @@ public class SubsetServiceIntegrationTest extends AbstractUnitTest { /* mock */ when(metadataServiceGateway.getIdentifiers(DATABASE_1_ID, queryId)) .thenReturn(identifiers); - MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_1_DTO, USER_1_ID); - MariaDbConfig.insertQueryStore(DATABASE_1_PRIVILEGED_DTO, QUERY_2_DTO, USER_1_ID); /* test */ - queryService.persist(DATABASE_1_PRIVILEGED_DTO, queryId, persist); + subsetService.persist(DATABASE_1_PRIVILEGED_DTO, queryId, persist); } } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java index f235f39d63a905e34017933bcc6365c85a299442..77e91361db1ddbc733251c0617ff658bd199ea7a 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java @@ -79,8 +79,8 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_2_INTERNALNAME); MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_3_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_3_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_3_PRIVILEGED_DTO); /* s3 */ if (s3Client.listBuckets().buckets().stream().noneMatch(b -> b.name().equals(s3Config.getS3Bucket()))) { s3Client.createBucket(CreateBucketRequest.builder() @@ -110,7 +110,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.updateTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.updateTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 1", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("1", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); // <<< @@ -137,7 +137,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.updateTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.updateTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 4", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("4", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); // <<< @@ -163,7 +163,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.updateTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.updateTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 1", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("1", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); // <<< @@ -189,7 +189,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.updateTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.updateTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 1", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("1", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); // <<< @@ -213,7 +213,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.createTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.createTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 4", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("4", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); @@ -240,7 +240,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(), RequestBody.fromFile(new File("src/test/resources/csv/keyboard.csv"))); /* test */ - tableService.createTuple(TABLE_8_PRIVILEGED_DTO, request); + tableService.createTuple(DATABASE_3_PRIVILEGED_DTO, TABLE_8_DTO, request); final List<Map<String, byte[]>> result = MariaDbConfig.selectQueryByteArr(DATABASE_3_PRIVILEGED_DTO, "SELECT raw FROM mfcc WHERE raw IS NOT NULL", Set.of("raw")); assertNotNull(result.get(0).get("raw")); assertArrayEquals(Files.toByteArray(new File("src/test/resources/csv/keyboard.csv")), result.get(0).get("raw")); @@ -261,7 +261,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.createTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.createTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id, `date`, location, mintemp, rainfall FROM weather_aus WHERE id = 4", Set.of("id", "date", "location", "mintemp", "rainfall")); assertEquals("4", result.get(0).get("id")); assertEquals("2023-10-03", result.get(0).get("date")); @@ -280,7 +280,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.deleteTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.deleteTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id FROM weather_aus WHERE id = 1", Set.of("id")); assertEquals(0, result.size()); } @@ -297,7 +297,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(); /* test */ - tableService.deleteTuple(TABLE_1_PRIVILEGED_DTO, request); + tableService.deleteTuple(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); final List<Map<String, String>> result = MariaDbConfig.selectQuery(DATABASE_1_PRIVILEGED_DTO, "SELECT id FROM weather_aus WHERE id = 1", Set.of("id")); assertEquals(0, result.size()); } @@ -307,7 +307,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { public void getStatistics_succeeds() throws TableMalformedException, SQLException, TableNotFoundException { /* test */ - final TableStatisticDto response = tableService.getStatistics(TABLE_2_PRIVILEGED_DTO); + final TableStatisticDto response = tableService.getStatistics(DATABASE_1_PRIVILEGED_DTO, TABLE_2_DTO); assertEquals(TABLE_2_COLUMNS.size(), response.getColumns().size()); log.trace("response rows: {}", response.getRows()); assertEquals(3L, response.getRows()); @@ -336,7 +336,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { public void delete_succeeds() throws SQLException, QueryMalformedException { /* test */ - tableService.delete(TABLE_1_PRIVILEGED_DTO); + tableService.delete(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO); } @Test @@ -347,7 +347,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(QueryMalformedException.class, () -> { - tableService.delete(TABLE_5_PRIVILEGED_DTO); + tableService.delete(DATABASE_2_PRIVILEGED_DTO, TABLE_5_DTO); }); } @@ -355,7 +355,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { public void getCount_succeeds() throws SQLException, QueryMalformedException { /* test */ - final Long response = tableService.getCount(TABLE_1_PRIVILEGED_DTO, null); + final Long response = tableService.getCount(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, null); assertEquals(3, response); } @@ -363,7 +363,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { public void getCount_timestamp_succeeds() throws SQLException, QueryMalformedException { /* test */ - final Long response = tableService.getCount(TABLE_1_PRIVILEGED_DTO, Instant.ofEpochSecond(0)); + final Long response = tableService.getCount(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, Instant.ofEpochSecond(0)); assertEquals(0, response); } @@ -375,7 +375,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(QueryMalformedException.class, () -> { - tableService.getCount(TABLE_5_PRIVILEGED_DTO, null); + tableService.getCount(DATABASE_2_PRIVILEGED_DTO, TABLE_5_DTO, null); }); } @@ -383,11 +383,11 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { public void history_succeeds() throws SQLException, TableNotFoundException { /* test */ - final List<TableHistoryDto> response = tableService.history(TABLE_1_PRIVILEGED_DTO, 1000L); + final List<TableHistoryDto> response = tableService.history(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, 1000L); assertEquals(1, response.size()); final TableHistoryDto history0 = response.get(0); assertNotNull(history0.getTimestamp()); - assertEquals("INSERT", history0.getEvent()); + assertEquals(HistoryEventTypeDto.INSERT, history0.getEvent()); assertEquals(3, history0.getTotal()); } @@ -399,7 +399,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(TableNotFoundException.class, () -> { - tableService.history(TABLE_5_PRIVILEGED_DTO, null); + tableService.history(DATABASE_2_PRIVILEGED_DTO, TABLE_5_DTO, null); }); } @@ -421,7 +421,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { .build(), RequestBody.fromFile(new File("src/test/resources/csv/weather_aus.csv"))); /* test */ - tableService.importDataset(TABLE_1_PRIVILEGED_DTO, request); + tableService.importDataset(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); } @Test @@ -442,7 +442,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(TableMalformedException.class, () -> { - tableService.importDataset(TABLE_1_PRIVILEGED_DTO, request); + tableService.importDataset(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); }); } @@ -464,7 +464,7 @@ public class TableServiceIntegrationTest extends AbstractUnitTest { /* test */ assertThrows(MalformedException.class, () -> { - tableService.importDataset(TABLE_1_PRIVILEGED_DTO, request); + tableService.importDataset(DATABASE_1_PRIVILEGED_DTO, TABLE_1_DTO, request); }); } diff --git a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ViewServiceIntegrationTest.java b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ViewServiceIntegrationTest.java index 2edf7f5f28a2e607ba55eb38ca82547f112a60f5..5e99f4afbcf1c144ed3566d62a21dd0cd5f771e4 100644 --- a/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ViewServiceIntegrationTest.java +++ b/dbrepo-data-service/rest-service/src/test/java/at/tuwien/service/ViewServiceIntegrationTest.java @@ -34,14 +34,14 @@ public class ViewServiceIntegrationTest extends AbstractUnitTest { genesis(); /* metadata database */ MariaDbConfig.dropDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_INTERNALNAME); - MariaDbConfig.createInitDatabase(CONTAINER_1_PRIVILEGED_DTO, DATABASE_1_PRIVILEGED_DTO); + MariaDbConfig.createInitDatabase(DATABASE_1_PRIVILEGED_DTO); } @Test public void delete_succeeds() throws SQLException, ViewMalformedException { /* test */ - viewService.delete(VIEW_1_PRIVILEGED_DTO); + viewService.delete(DATABASE_1_PRIVILEGED_DTO, VIEW_1_DTO); } } diff --git a/dbrepo-data-service/rest-service/src/test/resources/init/querystore.sql b/dbrepo-data-service/rest-service/src/test/resources/init/querystore.sql index 3e7471df3e1eb3a1bb79db7246ecb805a06f495c..c5cb8d31dcee26afba046ca79cae129265baaef8 100644 --- a/dbrepo-data-service/rest-service/src/test/resources/init/querystore.sql +++ b/dbrepo-data-service/rest-service/src/test/resources/init/querystore.sql @@ -1,5 +1,5 @@ CREATE SEQUENCE `qs_queries_seq` NOCACHE; -CREATE TABLE `qs_queries` ( `id` bigint not null primary key default nextval(`qs_queries_seq`), `created` datetime not null default now(), `executed` datetime not null default now(), `created_by` varchar(36), `query` text not null, `query_normalized` text not null, `is_persisted` boolean not null, `query_hash` varchar(255) not null, `result_hash` varchar(255), `result_number` bigint ) WITH SYSTEM VERSIONING; +CREATE TABLE `qs_queries` ( `id` varchar(36) not null primary key default uuid(), `created` datetime not null default now(), `executed` datetime not null default now(), `created_by` varchar(36), `query` text not null, `query_normalized` text not null, `is_persisted` boolean not null, `query_hash` varchar(255) not null, `result_hash` varchar(255), `result_number` bigint ) WITH SYSTEM VERSIONING; CREATE PROCEDURE hash_table(IN name VARCHAR(255), OUT hash VARCHAR(255), OUT count BIGINT) BEGIN DECLARE _sql TEXT; SELECT CONCAT('SELECT SHA2(GROUP_CONCAT(CONCAT_WS(\'\',', GROUP_CONCAT(CONCAT('`', column_name, '`') ORDER BY column_name), ') SEPARATOR \',\'), 256) AS hash, COUNT(*) AS count FROM `', name, '` INTO @hash, @count;') FROM `information_schema`.`columns` WHERE `table_schema` = DATABASE() AND `table_name` = name INTO _sql; PREPARE stmt FROM _sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET hash = @hash; SET count = @count; END; -CREATE PROCEDURE store_query(IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _username varchar(255) DEFAULT REGEXP_REPLACE(current_user(), '@.*', ''); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; -CREATE DEFINER = 'root' PROCEDURE _store_query(IN _username VARCHAR(255), IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; \ No newline at end of file +CREATE PROCEDURE store_query(IN query TEXT, IN executed DATETIME, OUT queryId varchar(36)) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _username varchar(255) DEFAULT REGEXP_REPLACE(current_user(), '@.*', ''); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; +CREATE DEFINER = 'root' PROCEDURE _store_query(IN _username VARCHAR(255), IN query TEXT, IN executed DATETIME, OUT queryId varchar(36)) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END; \ No newline at end of file diff --git a/dbrepo-data-service/services/pom.xml b/dbrepo-data-service/services/pom.xml index 3b1ea7b0e925cc60074d23407d8be6b1eba5abbb..5252e6a3d30439671d085b9ac2d6bca81bf462c0 100644 --- a/dbrepo-data-service/services/pom.xml +++ b/dbrepo-data-service/services/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>services</artifactId> <name>dbrepo-data-service-services</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>dbrepo-data-service-querystore</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </dependency> </dependencies> diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java index 3140f77cb585ef3ba02937b514ed3a1cd36631da..1e9d1c4bf0653758f4334f44d5c665610b7fc0fa 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java @@ -13,6 +13,7 @@ import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; @@ -52,13 +53,13 @@ public class AuthTokenFilter extends OncePerRequestFilter { filterChain.doFilter(request, response); } - public UserDetails verifyJwt(String token) throws ServletException { + public UserDetails verifyJwt(String token) throws BadCredentialsException { final KeyFactory kf; try { kf = KeyFactory.getInstance("RSA"); } catch (NoSuchAlgorithmException e) { log.error("Failed to find RSA algorithm"); - throw new ServletException("Failed to find RSA algorithm", e); + throw new BadCredentialsException("Failed to find RSA algorithm", e); } final X509EncodedKeySpec keySpecX509 = new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)); final RSAPublicKey pubKey; @@ -66,7 +67,7 @@ public class AuthTokenFilter extends OncePerRequestFilter { pubKey = (RSAPublicKey) kf.generatePublic(keySpecX509); } catch (InvalidKeySpecException e) { log.error("Provided public key is invalid"); - throw new ServletException("Provided public key is invalid", e); + throw new BadCredentialsException("Provided public key is invalid", e); } final Algorithm algorithm = Algorithm.RSA256(pubKey, null); final Verification verification = JWT.require(algorithm); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java index 80fdd15f1daff7625508eb8d46d9b54332a5150f..f7f51c0b0d5eab1d06d5e83cc93256cf5211c911 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java @@ -1,13 +1,10 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; -import at.tuwien.exception.*; import at.tuwien.gateway.KeycloakGateway; -import jakarta.servlet.ServletException; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; @@ -29,13 +26,8 @@ public class BasicAuthenticationProvider implements AuthenticationManager { @Override public Authentication authenticate(Authentication auth) throws AuthenticationException { - try { - final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); - final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); - return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); - } catch (ServletException | CredentialsInvalidException | AccountNotSetupException | - AuthServiceConnectionException e) { - throw new BadCredentialsException("Failed to authenticate with authentication service", e); - } + final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); + final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); + return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java index 20955bcdb36912e3f8dd4ed695a4e688f1177ccf..b0edc929ed0097ce94e65153707dc47406f0f3c9 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/auth/InternalRequestInterceptor.java @@ -2,7 +2,6 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; import at.tuwien.config.GatewayConfig; -import at.tuwien.exception.*; import at.tuwien.gateway.KeycloakGateway; import lombok.extern.log4j.Log4j2; import org.springframework.http.HttpHeaders; @@ -31,15 +30,10 @@ public class InternalRequestInterceptor implements ClientHttpRequestInterceptor throws IOException { final HttpHeaders headers = request.getHeaders(); headers.setAccept(List.of(MediaType.APPLICATION_JSON)); - try { - final TokenDto token = keycloakGateway.obtainUserToken(gatewayConfig.getSystemUsername(), - gatewayConfig.getSystemPassword()); - headers.setBearerAuth(token.getAccessToken()); - log.trace("set bearer token for internal user: {}", gatewayConfig.getSystemUsername()); - } catch (AuthServiceConnectionException | CredentialsInvalidException | AccountNotSetupException e) { - log.error("Failed to obtain token for internal user: {}", gatewayConfig.getSystemUsername()); - throw new IOException("Failed to obtain token for internal user", e); - } + final TokenDto token = keycloakGateway.obtainUserToken(gatewayConfig.getSystemUsername(), + gatewayConfig.getSystemPassword()); + headers.setBearerAuth(token.getAccessToken()); + log.trace("set bearer token for internal user: {}", gatewayConfig.getSystemUsername()); return execution.execute(request, body); } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java index c798537b5b378822a82119b2ffcb7ec4c7bf1384..6fc7e7250cad33f8d2b9f81f3e2ec95f9fa934b9 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/CacheConfig.java @@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit; public class CacheConfig { @Value("${dbrepo.credentialCacheTimeout}") - private Long credentialCacheTimeout; + private Integer credentialCacheTimeout; @Bean public Cache<UUID, UserDto> userCache() { @@ -27,28 +27,28 @@ public class CacheConfig { } @Bean - public Cache<Long, ViewDto> viewCache() { - return new ExpiryCache<Long, ViewDto>().build(); + public Cache<UUID, ViewDto> viewCache() { + return new ExpiryCache<UUID, ViewDto>().build(); } @Bean - public Cache<Long, DatabaseAccessDto> accessCache() { - return new ExpiryCache<Long, DatabaseAccessDto>().build(); + public Cache<UUID, DatabaseAccessDto> accessCache() { + return new ExpiryCache<UUID, DatabaseAccessDto>().build(); } @Bean - public Cache<Long, TableDto> tableCache() { - return new ExpiryCache<Long, TableDto>().build(); + public Cache<UUID, TableDto> tableCache() { + return new ExpiryCache<UUID, TableDto>().build(); } @Bean - public Cache<Long, DatabaseDto> databaseCache() { - return new ExpiryCache<Long, DatabaseDto>().build(); + public Cache<UUID, DatabaseDto> databaseCache() { + return new ExpiryCache<UUID, DatabaseDto>().build(); } @Bean - public Cache<Long, ContainerDto> containerCache() { - return new ExpiryCache<Long, ContainerDto>().build(); + public Cache<UUID, ContainerDto> containerCache() { + return new ExpiryCache<UUID, ContainerDto>().build(); } class ExpiryCache<K, T> { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java index c511f2b511ff3cd66d52f63a55ca8ca73ce2a6c9..1a92faf86f39c5568b9fd927499a61874aacc09c 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/GatewayConfig.java @@ -5,6 +5,7 @@ import at.tuwien.gateway.KeycloakGateway; import lombok.Getter; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/config/KeycloakConfig.java b/dbrepo-data-service/services/src/main/java/at/tuwien/config/KeycloakConfig.java index cc6960ba39be294a61e059f3a3f45ecfc8e820fd..57183b87672a078c1462ad25b9d3504b4ffe38b9 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/config/KeycloakConfig.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/config/KeycloakConfig.java @@ -1,8 +1,11 @@ package at.tuwien.config; import lombok.Getter; +import org.keycloak.admin.client.Keycloak; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.web.client.RestTemplate; @Getter @Configuration @@ -22,4 +25,11 @@ public class KeycloakConfig { @Value("${dbrepo.keycloak.clientSecret}") private String keycloakClientSecret; + + private final String realm = "dbrepo"; + + @Bean + public Keycloak keycloak() { + return Keycloak.getInstance(keycloakEndpoint, "master", keycloakUsername, keycloakPassword, "admin-cli"); + } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/KeycloakGateway.java b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/KeycloakGateway.java index 9e6a5f56bda37fc1b3d9af9fca8158a5fcce27f7..21fbf674db6fbee0890528c2cb465eab53bba1c2 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/KeycloakGateway.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/KeycloakGateway.java @@ -4,10 +4,11 @@ import at.tuwien.api.keycloak.TokenDto; import at.tuwien.exception.AccountNotSetupException; import at.tuwien.exception.AuthServiceConnectionException; import at.tuwien.exception.CredentialsInvalidException; +import at.tuwien.exception.NotAllowedException; +import org.springframework.security.authentication.BadCredentialsException; public interface KeycloakGateway { - TokenDto obtainUserToken(String username, String password) throws AuthServiceConnectionException, - CredentialsInvalidException, AccountNotSetupException; + TokenDto obtainUserToken(String username, String password) throws BadCredentialsException; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/MetadataServiceGateway.java b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/MetadataServiceGateway.java index f7fe2f207512791b17144cea27cedcc5f7bfd2b9..38b28ebcac140827059fa0e510d5250755eaaf37 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/MetadataServiceGateway.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/MetadataServiceGateway.java @@ -24,7 +24,7 @@ public interface MetadataServiceGateway { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - ContainerDto getContainerById(Long containerId) throws RemoteUnavailableException, + ContainerDto getContainerById(UUID containerId) throws RemoteUnavailableException, ContainerNotFoundException, MetadataServiceException; /** @@ -36,7 +36,7 @@ public interface MetadataServiceGateway { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - DatabaseDto getDatabaseById(Long id) throws DatabaseNotFoundException, RemoteUnavailableException, + DatabaseDto getDatabaseById(UUID id) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException; /** @@ -49,7 +49,7 @@ public interface MetadataServiceGateway { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - TableDto getTableById(Long databaseId, Long id) throws TableNotFoundException, RemoteUnavailableException, + TableDto getTableById(UUID databaseId, UUID id) throws TableNotFoundException, RemoteUnavailableException, MetadataServiceException; /** @@ -62,7 +62,7 @@ public interface MetadataServiceGateway { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - ViewDto getViewById(Long databaseId, Long id) throws RemoteUnavailableException, ViewNotFoundException, + ViewDto getViewById(UUID databaseId, UUID id) throws RemoteUnavailableException, ViewNotFoundException, MetadataServiceException; /** @@ -86,7 +86,7 @@ public interface MetadataServiceGateway { * @throws NotAllowedException The access to this database is denied for the given user. * @throws MetadataServiceException The remote service returned invalid data. */ - DatabaseAccessDto getAccess(Long databaseId, UUID userId) throws RemoteUnavailableException, NotAllowedException, + DatabaseAccessDto getAccess(UUID databaseId, UUID userId) throws RemoteUnavailableException, NotAllowedException, MetadataServiceException; /** @@ -99,7 +99,7 @@ public interface MetadataServiceGateway { * @throws DatabaseNotFoundException The database was not found. * @throws MetadataServiceException The remote service returned invalid data. */ - List<IdentifierBriefDto> getIdentifiers(@NotNull Long databaseId, Long subsetId) throws MetadataServiceException, + List<IdentifierBriefDto> getIdentifiers(@NotNull UUID databaseId, UUID subsetId) throws MetadataServiceException, RemoteUnavailableException, DatabaseNotFoundException; /** @@ -112,6 +112,6 @@ public interface MetadataServiceGateway { * @throws TableNotFoundException The table was not found. * @throws MetadataServiceException The remote service returned invalid data. */ - void updateTableStatistics(Long databaseId, Long tableId, String authorization) throws TableNotFoundException, + void updateTableStatistics(UUID databaseId, UUID tableId, String authorization) throws TableNotFoundException, MetadataServiceException, RemoteUnavailableException; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java index 1e235de4c63d883f2807c67e94480105750f5019..1e14a4b4ceec8e3738f7796b4867fb1dd455ea8d 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java @@ -2,67 +2,47 @@ package at.tuwien.gateway.impl; import at.tuwien.api.keycloak.TokenDto; import at.tuwien.config.KeycloakConfig; -import at.tuwien.exception.AccountNotSetupException; -import at.tuwien.exception.AuthServiceConnectionException; -import at.tuwien.exception.CredentialsInvalidException; import at.tuwien.gateway.KeycloakGateway; +import at.tuwien.mapper.MetadataMapper; +import jakarta.ws.rs.NotAuthorizedException; import lombok.extern.log4j.Log4j2; +import org.keycloak.OAuth2Constants; +import org.keycloak.admin.client.Keycloak; +import org.keycloak.admin.client.KeycloakBuilder; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.*; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.stereotype.Service; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.HttpServerErrorException; -import org.springframework.web.client.RestTemplate; @Log4j2 @Service public class KeycloakGatewayImpl implements KeycloakGateway { private final KeycloakConfig keycloakConfig; + private final MetadataMapper metadataMapper; @Autowired - public KeycloakGatewayImpl(KeycloakConfig keycloakConfig) { + public KeycloakGatewayImpl(KeycloakConfig keycloakConfig, MetadataMapper metadataMapper) { this.keycloakConfig = keycloakConfig; + this.metadataMapper = metadataMapper; } @Override - public TokenDto obtainUserToken(String username, String password) throws AuthServiceConnectionException, - CredentialsInvalidException, AccountNotSetupException { - final HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - final MultiValueMap<String, String> payload = new LinkedMultiValueMap<>(); - payload.add("username", username); - payload.add("password", password); - payload.add("grant_type", "password"); - payload.add("scope", "openid roles"); - payload.add("client_id", keycloakConfig.getKeycloakClient()); - payload.add("client_secret", keycloakConfig.getKeycloakClientSecret()); - final String url = keycloakConfig.getKeycloakEndpoint() + "/realms/dbrepo/protocol/openid-connect/token"; - log.trace("request user token from url: {}", url); - final ResponseEntity<TokenDto> response; - try { - response = new RestTemplate() - .exchange(url, HttpMethod.POST, new HttpEntity<>(payload, headers), TokenDto.class); - } catch (HttpServerErrorException e) { + public TokenDto obtainUserToken(String username, String password) throws BadCredentialsException { + try (Keycloak userKeycloak = KeycloakBuilder.builder() + .serverUrl(keycloakConfig.getKeycloakEndpoint()) + .realm(keycloakConfig.getRealm()) + .grantType(OAuth2Constants.PASSWORD) + .clientId(keycloakConfig.getKeycloakClient()) + .clientSecret(keycloakConfig.getKeycloakClientSecret()) + .username(username) + .password(password) + .build()) { + return metadataMapper.accessTokenResponseToTokenDto(userKeycloak.tokenManager() + .getAccessToken()); + } catch (NotAuthorizedException e) { log.error("Failed to obtain user token: {}", e.getMessage()); - throw new AuthServiceConnectionException("Failed to obtain user token: " + e.getMessage(), e); - } catch (HttpClientErrorException.BadRequest e) { - if (e.getResponseBodyAsByteArray() != null && e.getResponseBodyAsByteArray().length > 0) { - final String error = e.getResponseBodyAsString(); - if (error != null && error.contains("invalid_grant")) { - log.error("Failed to obtain user token: {}", error); - throw new AccountNotSetupException("Failed to obtain user token: " + error, e); - } - } - log.error("Failed to obtain user token: bad request"); - throw new CredentialsInvalidException("Bad request", e); - } catch (HttpClientErrorException.Unauthorized e) { - log.error("Failed to obtain user token: invalid credentials"); - throw new CredentialsInvalidException("Invalid credentials: " + e.getMessage(), e); + throw new BadCredentialsException("Failed to obtain user token", e); } - return response.getBody(); } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/MetadataServiceGatewayImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/MetadataServiceGatewayImpl.java index 7b02192b7ed0209bae55614808e5c236d03da6ef..ab0ab9dea59ce1af070ff3ca3463109b82c41806 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/MetadataServiceGatewayImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/gateway/impl/MetadataServiceGatewayImpl.java @@ -44,11 +44,11 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { } @Override - public ContainerDto getContainerById(Long containerId) throws RemoteUnavailableException, + public ContainerDto getContainerById(UUID containerId) throws RemoteUnavailableException, ContainerNotFoundException, MetadataServiceException { final ResponseEntity<ContainerDto> response; final String url = "/api/container/" + containerId; - log.debug("get container info from metadata service: {}", url); + log.debug("get container info from metadata service: {}", url); try { response = internalRestTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY, ContainerDto.class); @@ -63,30 +63,33 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find container with id {}: service responded unsuccessful: {}", containerId, response.getStatusCode()); throw new MetadataServiceException("Failed to find container: service responded unsuccessful: " + response.getStatusCode()); } - final List<String> expectedHeaders = List.of("X-Username", "X-Password"); + final List<String> expectedHeaders = List.of("X-Username", "X-Password", "X-Jdbc-Method", "X-Host", "X-Port"); if (!response.getHeaders().keySet().containsAll(expectedHeaders)) { - log.error("Failed to find all container headers"); + log.error("Failed to find all container headers"); log.debug("expected headers: {}", expectedHeaders); log.debug("found headers: {}", response.getHeaders().keySet()); - throw new MetadataServiceException("Failed to find all container headers"); + throw new MetadataServiceException("Failed to find all container headers"); } if (response.getBody() == null) { log.error("Failed to find container with id {}: body is empty", containerId); throw new MetadataServiceException("Failed to find container with id " + containerId + ": body is empty"); } final ContainerDto container = metadataMapper.containerDtoToContainerDto(response.getBody()); + container.setHost(response.getHeaders().get("X-Host").get(0)); + container.setPort(Integer.parseInt(response.getHeaders().get("X-Port").get(0))); container.setUsername(response.getHeaders().get("X-Username").get(0)); container.setPassword(response.getHeaders().get("X-Password").get(0)); + container.getImage().setJdbcMethod(response.getHeaders().get("X-Jdbc-Method").get(0)); container.setLastRetrieved(Instant.now()); return container; } @Override - public DatabaseDto getDatabaseById(Long id) throws DatabaseNotFoundException, RemoteUnavailableException, + public DatabaseDto getDatabaseById(UUID id) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException { final ResponseEntity<DatabaseDto> response; final String url = "/api/database/" + id; - log.debug("get database info from metadata service: {}", url); + log.debug("get database info from metadata service: {}", url); try { response = internalRestTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY, DatabaseDto.class); } catch (ResourceAccessException | HttpServerErrorException e) { @@ -100,7 +103,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find database with id {}: service responded unsuccessful: {}", id, response.getStatusCode()); throw new MetadataServiceException("Failed to find database: service responded unsuccessful: " + response.getStatusCode()); } - final List<String> expectedHeaders = List.of("X-Username", "X-Password"); + final List<String> expectedHeaders = List.of("X-Username", "X-Password", "X-Jdbc-Method", "X-Host", "X-Port"); if (!response.getHeaders().keySet().containsAll(expectedHeaders)) { log.error("Failed to find all database headers"); log.debug("expected headers: {}", expectedHeaders); @@ -112,18 +115,21 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { throw new MetadataServiceException("Failed to find database with id " + id + ": body is empty"); } final DatabaseDto database = response.getBody(); + database.getContainer().setHost(response.getHeaders().get("X-Host").get(0)); + database.getContainer().setPort(Integer.parseInt(response.getHeaders().get("X-Port").get(0))); database.getContainer().setUsername(response.getHeaders().get("X-Username").get(0)); database.getContainer().setPassword(response.getHeaders().get("X-Password").get(0)); + database.getContainer().getImage().setJdbcMethod(response.getHeaders().get("X-Jdbc-Method").get(0)); database.setLastRetrieved(Instant.now()); return database; } @Override - public TableDto getTableById(Long databaseId, Long id) throws TableNotFoundException, + public TableDto getTableById(UUID databaseId, UUID id) throws TableNotFoundException, RemoteUnavailableException, MetadataServiceException { final ResponseEntity<TableDto> response; final String url = "/api/database/" + databaseId + "/table/" + id; - log.debug("get table info from metadata service: {}", url); + log.debug("get table info from metadata service: {}", url); try { response = internalRestTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY, TableDto.class); } catch (ResourceAccessException | HttpServerErrorException e) { @@ -137,26 +143,17 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find table with id {}: service responded unsuccessful: {}", id, response.getStatusCode()); throw new MetadataServiceException("Failed to find table: service responded unsuccessful: " + response.getStatusCode()); } - final List<String> expectedHeaders = List.of("X-Username", "X-Password"); - if (!response.getHeaders().keySet().containsAll(expectedHeaders)) { - log.error("Failed to find all table headers"); - log.debug("expected headers: {}", expectedHeaders); - log.debug("found headers: {}", response.getHeaders().keySet()); - throw new MetadataServiceException("Failed to find all table headers"); - } if (response.getBody() == null) { log.error("Failed to find table with id {}: body is empty", id); throw new MetadataServiceException("Failed to find table with id " + id + ": body is empty"); } final TableDto table = metadataMapper.tableDtoToTableDto(response.getBody()); - table.getDatabase().getContainer().setUsername(response.getHeaders().get("X-Username").get(0)); - table.getDatabase().getContainer().setPassword(response.getHeaders().get("X-Password").get(0)); table.setLastRetrieved(Instant.now()); return table; } @Override - public ViewDto getViewById(Long databaseId, Long id) throws RemoteUnavailableException, + public ViewDto getViewById(UUID databaseId, UUID id) throws RemoteUnavailableException, ViewNotFoundException, MetadataServiceException { final ResponseEntity<ViewDto> response; final String url = "/api/database/" + databaseId + "/view/" + id; @@ -174,20 +171,11 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { log.error("Failed to find view with id {}: service responded unsuccessful: {}", id, response.getStatusCode()); throw new MetadataServiceException("Failed to find view: service responded unsuccessful: " + response.getStatusCode()); } - final List<String> expectedHeaders = List.of("X-Username", "X-Password"); - if (!response.getHeaders().keySet().containsAll(expectedHeaders)) { - log.error("Failed to find all view headers"); - log.debug("expected headers: {}", expectedHeaders); - log.debug("found headers: {}", response.getHeaders().keySet()); - throw new MetadataServiceException("Failed to find all view headers"); - } if (response.getBody() == null) { log.error("Failed to find view with id {}: body is empty", id); throw new MetadataServiceException("Failed to find view with id " + id + ": body is empty"); } final ViewDto view = metadataMapper.viewDtoToViewDto(response.getBody()); - view.getDatabase().getContainer().setUsername(response.getHeaders().get("X-Username").get(0)); - view.getDatabase().getContainer().setPassword(response.getHeaders().get("X-Password").get(0)); view.setLastRetrieved(Instant.now()); return view; } @@ -230,7 +218,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { } @Override - public DatabaseAccessDto getAccess(Long databaseId, UUID userId) throws RemoteUnavailableException, + public DatabaseAccessDto getAccess(UUID databaseId, UUID userId) throws RemoteUnavailableException, NotAllowedException, MetadataServiceException { final ResponseEntity<DatabaseAccessDto> response; final String url = "/api/database/" + databaseId + "/access/" + userId; @@ -256,7 +244,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { } @Override - public List<IdentifierBriefDto> getIdentifiers(@NotNull Long databaseId, Long subsetId) throws MetadataServiceException, + public List<IdentifierBriefDto> getIdentifiers(@NotNull UUID databaseId, UUID subsetId) throws MetadataServiceException, RemoteUnavailableException, DatabaseNotFoundException { final ResponseEntity<IdentifierBriefDto[]> response; final String url = "/api/identifier?dbid=" + databaseId + (subsetId != null ? ("&qid=" + subsetId) : ""); @@ -282,7 +270,7 @@ public class MetadataServiceGatewayImpl implements MetadataServiceGateway { } @Override - public void updateTableStatistics(Long databaseId, Long tableId, String authorization) throws TableNotFoundException, + public void updateTableStatistics(UUID databaseId, UUID tableId, String authorization) throws TableNotFoundException, MetadataServiceException, RemoteUnavailableException { final ResponseEntity<Void> response; final String url = "/api/database/" + databaseId + "/table/" + tableId + "/statistic"; diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/listener/DefaultListener.java b/dbrepo-data-service/services/src/main/java/at/tuwien/listener/DefaultListener.java index d2a66ab548d44192638801189f0bd36294f6c321..929ede0a8f3e7ee1467a2def289c836d9823f531 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/listener/DefaultListener.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/listener/DefaultListener.java @@ -1,10 +1,12 @@ package at.tuwien.listener; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.table.TableDto; +import at.tuwien.exception.DatabaseNotFoundException; import at.tuwien.exception.MetadataServiceException; import at.tuwien.exception.RemoteUnavailableException; import at.tuwien.exception.TableNotFoundException; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import at.tuwien.service.QueueService; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -21,20 +23,21 @@ import java.io.IOException; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; +import java.util.UUID; @Log4j2 @Component public class DefaultListener implements MessageListener { + private final CacheService cacheService; private final ObjectMapper objectMapper; private final QueueService queueService; - private final CredentialService credentialService; @Autowired - public DefaultListener(ObjectMapper objectMapper, QueueService queueService, CredentialService credentialService) { + public DefaultListener(CacheService cacheService, ObjectMapper objectMapper, QueueService queueService) { + this.cacheService = cacheService; this.objectMapper = objectMapper; this.queueService = queueService; - this.credentialService = credentialService; } @Override @@ -53,20 +56,23 @@ public class DefaultListener implements MessageListener { log.error("Failed to map database and table names from routing key: is not 3-part"); return; } - final Long databaseId = Long.parseLong(parts[1]); - final Long tableId = Long.parseLong(parts[2]); + final UUID databaseId = UUID.fromString(parts[1]); + final UUID tableId = UUID.fromString(parts[2]); log.trace("received message for table with id {} of database id {}: {} bytes", tableId, databaseId, message.getMessageProperties().getContentLength()); final Map<String, Object> body; try { - final TableDto table = credentialService.getTable(databaseId, tableId); + final DatabaseDto database = cacheService.getDatabase(databaseId); + final TableDto table = cacheService.getTable(databaseId, tableId); body = objectMapper.readValue(message.getBody(), typeRef); - queueService.insert(table, body); + queueService.insert(database, table, body); } catch (IOException e) { log.error("Failed to read object: {}", e.getMessage()); } catch (SQLException | RemoteUnavailableException e) { log.error("Failed to insert tuple: {}", e.getMessage()); } catch (TableNotFoundException | MetadataServiceException e) { log.error("Failed to find table: {}", e.getMessage()); + } catch (DatabaseNotFoundException e) { + log.error("Failed to find database: {}", e.getMessage()); } } } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/DataMapper.java b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/DataMapper.java index 956d50b0dd8705d8dd3f783b2c73270d10cf2398..9692b48b9e171fbf87e534612190e8c4f1ae2bd8 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/DataMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/DataMapper.java @@ -4,14 +4,8 @@ import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewColumnDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.query.QueryDto; -import at.tuwien.api.database.table.TableBriefDto; -import at.tuwien.api.database.table.TableDto; -import at.tuwien.api.database.table.TableHistoryDto; -import at.tuwien.api.database.table.TableStatisticDto; -import at.tuwien.api.database.table.columns.ColumnBriefDto; -import at.tuwien.api.database.table.columns.ColumnDto; -import at.tuwien.api.database.table.columns.ColumnStatisticDto; -import at.tuwien.api.database.table.columns.ColumnTypeDto; +import at.tuwien.api.database.table.*; +import at.tuwien.api.database.table.columns.*; import at.tuwien.api.database.table.constraints.ConstraintsDto; import at.tuwien.api.database.table.constraints.foreign.ForeignKeyBriefDto; import at.tuwien.api.database.table.constraints.foreign.ForeignKeyDto; @@ -20,7 +14,6 @@ import at.tuwien.api.database.table.constraints.foreign.ReferenceTypeDto; import at.tuwien.api.database.table.constraints.primary.PrimaryKeyDto; import at.tuwien.api.database.table.constraints.unique.UniqueDto; import at.tuwien.api.user.UserBriefDto; -import at.tuwien.config.QueryConfig; import at.tuwien.exception.TableNotFoundException; import org.apache.hadoop.shaded.com.google.common.hash.Hashing; import org.apache.hadoop.shaded.org.apache.commons.io.FileUtils; @@ -55,9 +48,6 @@ public interface DataMapper { ColumnBriefDto columnDtoToColumnBriefDto(ColumnDto data); /* redundant */ - @Mappings({ - @Mapping(target = "databaseId", source = "tdbid") - }) TableBriefDto tableDtoToTableBriefDto(TableDto data); /* redundant */ @@ -65,9 +55,11 @@ public interface DataMapper { ForeignKeyBriefDto foreignKeyDtoToForeignKeyBriefDto(ForeignKeyDto data); - default String rabbitMqTupleToInsertOrUpdateQuery(TableDto table, Map<String, Object> data) { + default String rabbitMqTupleToInsertOrUpdateQuery(String databaseName, TableDto table, Map<String, Object> data) { /* parameterized query for prepared statement */ final StringBuilder statement = new StringBuilder("INSERT INTO `") + .append(databaseName) + .append("`.`") .append(table.getInternalName()) .append("` (") .append(data.keySet() @@ -96,7 +88,7 @@ public interface DataMapper { return ViewDto.builder() .name(resultSet.getString(1)) .internalName(resultSet.getString(1)) - .vdbid(database.getId()) + .databaseId(database.getId()) .isInitialView(false) .isPublic(database.getIsPublic()) .isSchemaPublic(database.getIsSchemaPublic()) @@ -136,7 +128,7 @@ public interface DataMapper { .name(resultSet.getString(10)) .internalName(resultSet.getString(10)) .tableId(table.getId()) - .databaseId(table.getTdbid()) + .databaseId(table.getDatabaseId()) .description(resultSet.getString(11)) .build(); final String dataType = resultSet.getString(8); @@ -144,14 +136,18 @@ public interface DataMapper { column.setEnums(Arrays.stream(dataType.substring(0, resultSet.getString(8).length() - 1) .replace("enum(", "") .split(",")) - .map(value -> value.replace("'", "")) + .map(value -> EnumDto.builder() + .value(value.replace("'", "")) + .build()) .toList()); } if (column.getColumnType().equals(ColumnTypeDto.SET)) { column.setSets(Arrays.stream(dataType.substring(0, dataType.length() - 1) .replace("set(", "") .split(",")) - .map(value -> value.replace("'", "")) + .map(value -> SetDto.builder() + .value(value.replace("'", "")) + .build()) .toList()); } /* fix boolean and set size for others */ @@ -174,7 +170,7 @@ public interface DataMapper { return table; } - default ViewDto resultSetToTable(ResultSet resultSet, ViewDto view, QueryConfig queryConfig) throws SQLException { + default ViewDto resultSetToTable(ResultSet resultSet, ViewDto view) throws SQLException { final ViewColumnDto column = ViewColumnDto.builder() .ordinalPosition(resultSet.getInt(1) - 1) /* start at zero */ .isNullAllowed(resultSet.getString(3).equals("YES")) @@ -182,7 +178,7 @@ public interface DataMapper { .d(resultSet.getString(7) != null ? resultSet.getLong(7) : null) .name(resultSet.getString(10)) .internalName(resultSet.getString(10)) - .databaseId(view.getVdbid()) + .databaseId(view.getDatabaseId()) .build(); /* fix boolean and set size for others */ if (resultSet.getString(8).equalsIgnoreCase("tinyint(1)")) { @@ -194,14 +190,13 @@ public interface DataMapper { } view.getColumns() .add(column); - log.trace("parsed view column: {}.{}", view.getInternalName(), column.getInternalName()); return view; } default QueryDto resultSetToQueryDto(@NotNull ResultSet data) throws SQLException { /* note that next() is called outside this mapping function */ final QueryDto subset = QueryDto.builder() - .id(data.getLong(1)) + .id(UUID.fromString(data.getString(1))) .query(data.getString(4)) .queryHash(data.getString(5)) .resultHash(data.getString(6)) @@ -227,7 +222,7 @@ public interface DataMapper { .timestamp(LocalDateTime.parse(resultSet.getString(1), mariaDbFormatter) .atZone(ZoneId.of("UTC")) .toInstant()) - .event(resultSet.getString(2)) + .event(HistoryEventTypeDto.valueOf(resultSet.getString(2).toUpperCase())) .total(resultSet.getLong(3)) .build()); } @@ -277,12 +272,12 @@ public interface DataMapper { .column(ColumnBriefDto.builder() .name(columnName) .internalName(columnName) - .databaseId(table.getTdbid()) + .databaseId(table.getDatabaseId()) .build()) .referencedColumn(ColumnBriefDto.builder() .name(referencedColumnName) .internalName(referencedColumnName) - .databaseId(table.getTdbid()) + .databaseId(table.getDatabaseId()) .build()) .build(); if (optional1.isPresent()) { @@ -299,7 +294,7 @@ public interface DataMapper { .referencedTable(TableBriefDto.builder() .name(referencedTable) .internalName(referencedTable) - .databaseId(table.getTdbid()) + .databaseId(table.getDatabaseId()) .build()) .references(new LinkedList<>(List.of(foreignKeyReference))) .onDelete(deleteRule) @@ -329,7 +324,7 @@ public interface DataMapper { .avgRowLength(resultSet.getLong(4)) .dataLength(resultSet.getLong(5)) .maxDataLength(resultSet.getLong(6)) - .tdbid(database.getId()) + .databaseId(database.getId()) .queueName("dbrepo") .routingKey("dbrepo") .description(resultSet.getString(10)) diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MariaDbMapper.java b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MariaDbMapper.java index 8be9ef68e3dff7246a061664d10273eee95d24f0..66d8219c2a7205d0e320b7b22c07b8a90d284e2f 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MariaDbMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MariaDbMapper.java @@ -1,5 +1,11 @@ package at.tuwien.mapper; +import at.tuwien.api.container.image.OperatorDto; +import at.tuwien.api.database.DatabaseDto; +import at.tuwien.api.database.query.FilterDto; +import at.tuwien.api.database.query.FilterTypeDto; +import at.tuwien.api.database.query.OrderDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.TupleDeleteDto; import at.tuwien.api.database.table.TupleDto; @@ -7,9 +13,14 @@ import at.tuwien.api.database.table.TupleUpdateDto; import at.tuwien.api.database.table.columns.ColumnDto; import at.tuwien.api.database.table.columns.ColumnTypeDto; import at.tuwien.api.database.table.columns.CreateTableColumnDto; +import at.tuwien.exception.ImageNotFoundException; import at.tuwien.exception.QueryMalformedException; import at.tuwien.exception.TableMalformedException; +import at.tuwien.exception.TableNotFoundException; import at.tuwien.utils.MariaDbUtil; +import org.jooq.Record; +import org.jooq.*; +import org.jooq.conf.ParamType; import org.mapstruct.Mapper; import org.mapstruct.Named; @@ -27,6 +38,9 @@ import java.util.*; import java.util.regex.Pattern; import java.util.stream.Collectors; +import static org.jooq.impl.DSL.field; +import static org.jooq.impl.DSL.select; + @Mapper(componentModel = "spring", uses = {MetadataMapper.class, DataMapper.class}) public interface MariaDbMapper { @@ -112,14 +126,8 @@ public interface MariaDbMapper { return statement.toString(); } - default String queryStoreCreateSequenceRawQuery() { - final String statement = "CREATE SEQUENCE `qs_queries_seq` NOCACHE;"; - log.trace("mapped create query store sequence statement: {}", statement); - return statement; - } - default String queryStoreCreateTableRawQuery() { - final String statement = "CREATE TABLE `qs_queries` ( `id` bigint not null primary key default nextval(`qs_queries_seq`), `created` datetime not null default now(), `executed` datetime not null default now(), `created_by` varchar(36), `query` text not null, `query_normalized` text not null, `is_persisted` boolean not null, `query_hash` varchar(255) not null, `result_hash` varchar(255), `result_number` bigint) WITH SYSTEM VERSIONING;"; + final String statement = "CREATE TABLE `qs_queries` ( `id` VARCHAR(36) NOT NULL PRIMARY KEY DEFAULT UUID(), `created` datetime NOT NULL DEFAULT NOW(), `executed` datetime NOT NULL default now(), `created_by` VARCHAR(36), `query` text NOT NULL, `query_normalized` text NOT NULL, `is_persisted` boolean NOT NULL, `query_hash` VARCHAR(255) NOT NULL, `result_hash` VARCHAR(255), `result_number` bigint) WITH SYSTEM VERSIONING;"; log.trace("mapped create query store table statement: {}", statement); return statement; } @@ -131,13 +139,13 @@ public interface MariaDbMapper { } default String queryStoreCreateStoreQueryProcedureRawQuery() { - final String statement = "CREATE PROCEDURE store_query(IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _username varchar(255) DEFAULT REGEXP_REPLACE(current_user(), '@.*', ''); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END;"; + final String statement = "CREATE PROCEDURE store_query(IN query TEXT, IN executed DATETIME, OUT queryId VARCHAR(36)) BEGIN DECLARE _queryhash VARCHAR(255) DEFAULT SHA2(query, 256); DECLARE _username VARCHAR(255) DEFAULT REGEXP_REPLACE(current_user(), '@.*', ''); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END;"; log.trace("mapped create query store store_query procedure statement: {}", statement); return statement; } default String queryStoreCreateInternalStoreQueryProcedureRawQuery() { - final String statement = "CREATE DEFINER = 'root' PROCEDURE _store_query(IN _username VARCHAR(255), IN query TEXT, IN executed DATETIME, OUT queryId BIGINT) BEGIN DECLARE _queryhash varchar(255) DEFAULT SHA2(query, 256); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END;"; + final String statement = "CREATE DEFINER = 'root' PROCEDURE _store_query(IN _username VARCHAR(255), IN query TEXT, IN executed DATETIME, OUT queryId VARCHAR(36)) BEGIN DECLARE _queryhash VARCHAR(255) DEFAULT SHA2(query, 256); DECLARE _query TEXT DEFAULT CONCAT('CREATE OR REPLACE TABLE _tmp AS (', query, ')'); PREPARE stmt FROM _query; EXECUTE stmt; DEALLOCATE PREPARE stmt; CALL hash_table('_tmp', @hash, @count); DROP TABLE IF EXISTS `_tmp`; IF @hash IS NULL THEN INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` IS NULL); ELSE INSERT INTO `qs_queries` (`created_by`, `query`, `query_normalized`, `is_persisted`, `query_hash`, `result_hash`, `result_number`, `executed`) SELECT _username, query, query, false, _queryhash, @hash, @count, executed WHERE NOT EXISTS (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); SET queryId = (SELECT `id` FROM `qs_queries` WHERE `query_hash` = _queryhash AND `result_hash` = @hash); END IF; END;"; log.trace("mapped create query store _store_query procedure statement: {}", statement); return statement; } @@ -179,10 +187,14 @@ public interface MariaDbMapper { } @Named("dropView") - default String dropViewRawQuery(String viewName) { - final String statement = "DROP VIEW IF EXISTS `" + viewName + "`;"; + default String dropViewRawQuery(String databaseName, String viewName) { + final StringBuilder statement = new StringBuilder("DROP VIEW IF EXISTS `") + .append(databaseName) + .append("`.`") + .append(viewName) + .append("`;"); log.trace("mapped drop view statement: {}", statement); - return statement; + return statement.toString(); } default String databaseViewSelectRawQuery() { @@ -295,19 +307,24 @@ public interface MariaDbMapper { return statement.toString(); } - default String tableNameToUpdateTableRawQuery(String internalName) { + default String tableNameToUpdateTableRawQuery(String databaseName, String internalName) { final StringBuilder stringBuilder = new StringBuilder("ALTER TABLE `") + .append(databaseName) + .append("`.`") .append(internalName) .append("` COMMENT = ?;"); log.trace("mapped update table statement: {}", stringBuilder); return stringBuilder.toString(); } - default String tableCreateDtoToCreateTableRawQuery(at.tuwien.api.database.table.internal.TableCreateDto data) { + default String tableCreateDtoToCreateTableRawQuery(String databaseName, + at.tuwien.api.database.table.internal.TableCreateDto data) { final StringBuilder stringBuilder = new StringBuilder("CREATE TABLE `") + .append(databaseName) + .append("`.`") .append(nameToInternalName(data.getName())) .append("` ("); - log.trace("primary key column(s) exist: {}", data.getConstraints().getPrimaryKey()); + log.trace("PRIMARY KEY column(s) exist: {}", data.getConstraints().getPrimaryKey()); final int[] idx = {0}; for (CreateTableColumnDto column : data.getColumns()) { stringBuilder.append(idx[0]++ > 0 ? ", " : "") @@ -326,11 +343,11 @@ public interface MariaDbMapper { } } - /* create primary key index */ + /* create PRIMARY KEY index */ if (data.getConstraints() != null) { log.trace("constraints are {}", data.getConstraints()); if (data.getConstraints().getPrimaryKey() != null && !data.getConstraints().getPrimaryKey().isEmpty()) { - /* create primary key index */ + /* create PRIMARY KEY index */ stringBuilder.append(", PRIMARY KEY (") .append(String.join(",", data.getConstraints() .getPrimaryKey() @@ -475,16 +492,18 @@ public interface MariaDbMapper { } @Named("dropTableQuery") - default String dropTableRawQuery(String tableName) { - return dropTableRawQuery(tableName, true); + default String dropTableRawQuery(String databaseName, String tableName) { + return dropTableRawQuery(databaseName, tableName, true); } - default String dropTableRawQuery(String tableName, Boolean force) { + default String dropTableRawQuery(String databaseName, String tableName, Boolean force) { final StringBuilder statement = new StringBuilder("DROP TABLE "); if (!force) { statement.append("IF EXISTS "); } statement.append("`") + .append(databaseName) + .append("`.`") .append(tableName) .append("`;"); log.trace("mapped drop table query: {}", statement); @@ -513,13 +532,15 @@ public interface MariaDbMapper { return statement.toString(); } - default String tupleToRawDeleteQuery(TableDto table, TupleDeleteDto data) throws TableMalformedException { + default String tupleToRawDeleteQuery(String databaseName, TableDto table, TupleDeleteDto data) throws TableMalformedException { log.trace("table csv to delete query, table.id={}, data.keys={}", table.getId(), data.getKeys()); if (table.getColumns().isEmpty()) { throw new TableMalformedException("Columns are not known"); } /* parameterized query for prepared statement */ final StringBuilder statement = new StringBuilder("DELETE FROM `") + .append(databaseName) + .append("`.`") .append(table.getInternalName()) .append("` WHERE "); final int[] idx = new int[]{0}; @@ -534,14 +555,14 @@ public interface MariaDbMapper { return statement.toString(); } - default String tupleToRawUpdateQuery(TableDto table, TupleUpdateDto data) + default String tupleToRawUpdateQuery(String databaseName, TableDto table, TupleUpdateDto data) throws TableMalformedException { if (table.getColumns().isEmpty()) { throw new TableMalformedException("Columns are not known"); } /* parameterized query for prepared statement */ final StringBuilder statement = new StringBuilder("UPDATE `") - .append(table.getDatabase().getInternalName()) + .append(databaseName) .append("`.`") .append(table.getInternalName()) .append("` SET "); @@ -573,13 +594,13 @@ public interface MariaDbMapper { return statement.toString(); } - default String tupleToRawCreateQuery(TableDto table, TupleDto data) throws TableMalformedException { + default String tupleToRawCreateQuery(String databaseName, TableDto table, TupleDto data) throws TableMalformedException { if (table.getColumns().isEmpty()) { throw new TableMalformedException("Columns are not known"); } /* parameterized query for prepared statement */ final StringBuilder statement = new StringBuilder("INSERT INTO `") - .append(table.getDatabase().getInternalName()) + .append(databaseName) .append("`.`") .append(table.getInternalName()) .append("` ("); @@ -794,4 +815,160 @@ public interface MariaDbMapper { return statement.toString(); } + default SelectConditionStep<Record> subsetDtoToSelectConditions(SelectJoinStep<Record> step, DatabaseDto database, + SubsetDto data) throws TableNotFoundException, + ImageNotFoundException { + if (data.getFilter() == null || data.getFilter().isEmpty()) { + return step.where(); + } + SelectConditionStep<Record> conditions = step.where(); + FilterTypeDto next = null; + for (int i = 0; i < data.getFilter().size(); i++) { + final FilterDto filter = data.getFilter().get(i); + final ColumnDto column = columnIdToColumnDto(database, filter.getColumnId()); + if (i == 0) { + conditions = step.where(filterDtoToCondition(database, column, filter)); + } else if (next != null) { + if (next.equals(FilterTypeDto.OR)) { + conditions = conditions.or(filterDtoToCondition(database, column, filter)); + } else if (next.equals(FilterTypeDto.AND)) { + conditions = conditions.and(filterDtoToCondition(database, column, filter)); + } + } + next = filter.getType(); + } + return conditions; + } + + default Condition filterDtoToCondition(DatabaseDto database, ColumnDto column, FilterDto data) + throws ImageNotFoundException { + final String operator = operatorIdToOperatorDto(database, data.getOperatorId()).getValue(); + switch (operator) { + case "=": + case "<=>": + return field(column.getInternalName()).eq(data.getValue()); + case "<": + return field(column.getInternalName()).lt(data.getValue()); + case "<=": + return field(column.getInternalName()).le(data.getValue()); + case ">": + return field(column.getInternalName()).gt(data.getValue()); + case ">=": + return field(column.getInternalName()).ge(data.getValue()); + case "!=": + return field(column.getInternalName()).ne(data.getValue()); + case "LIKE": + return field(column.getInternalName()).like(data.getValue()); + case "NOT LIKE": + return field(column.getInternalName()).notLike(data.getValue()); + case "IN": + return field(column.getInternalName()).in(data.getValue()); + case "NOT IN": + return field(column.getInternalName()).notIn(data.getValue()); + case "IS NOT NULL": + return field(column.getInternalName()).isNotNull(); + case "IS NULL": + return field(column.getInternalName()).isNull(); + case "REGEXP": + return field(column.getInternalName()).likeRegex(data.getValue()); + case "NOT REGEXP": + return field(column.getInternalName()).notLikeRegex(data.getValue()); + } + log.error("Failed to map operator: {}", operator); + throw new IllegalArgumentException("Failed to map operator: " + operator); + } + + default SelectSeekStepN<Record> subsetDtoToSelectOrder(SelectConditionStep<Record> step, DatabaseDto database, + SubsetDto data) throws TableNotFoundException { + final List<OrderField<Object>> sort = new LinkedList<>(); + for (OrderDto order : data.getOrder()) { + final ColumnDto column = columnIdToColumnDto(database, order.getColumnId()); + if (order.getDirection() == null) { + sort.add(field(column.getInternalName())); + continue; + } + switch (order.getDirection()) { + case ASC -> sort.add(field(column.getInternalName()).asc()); + case DESC -> sort.add(field(column.getInternalName()).desc()); + } + } + return step.orderBy(sort); + } + + default String subsetDtoToRawQuery(DatabaseDto database, SubsetDto data) throws TableNotFoundException, ImageNotFoundException { + final TableDto table = tableIdToTableDto(database, data.getTableId()); + final List<Field<Object>> columns = table.getColumns() + .stream() + .filter(c -> data.getColumns().contains(c.getId())) + .map(c -> field(c.getInternalName())) + .toList(); + final SelectJoinStep<Record> query = select(columns) + .from(table.getInternalName()); + final SelectConditionStep<Record> where = subsetDtoToSelectConditions(query, database, data); + final String sql; + if (data.getOrder() == null) { + sql = where.getSQL(ParamType.INLINED); + } else { + sql = subsetDtoToSelectOrder(where, database, data) + .getSQL(ParamType.INLINED); + } + log.trace("mapped prepared query: {}", sql); + return sql; + } + + default ColumnDto columnIdToColumnDto(TableDto table, UUID columnId) throws TableNotFoundException { + final Optional<ColumnDto> optional = table.getColumns() + .stream() + .filter(c -> c.getId().equals(columnId)) + .findFirst(); + if (optional.isEmpty()) { + log.error("Failed to find filtered column with id: {}", columnId); + throw new TableNotFoundException("Failed to find filtered column"); + } + return optional.get(); + } + + default ColumnDto columnIdToColumnDto(DatabaseDto database, UUID columnId) throws TableNotFoundException { + if (columnId == null) { + return null; + } + final Optional<ColumnDto> optional = database.getTables() + .stream() + .map(TableDto::getColumns) + .flatMap(List::stream) + .filter(column -> column.getId().equals(columnId)) + .findFirst(); + if (optional.isEmpty()) { + log.error("Failed to find column: {}", columnId); + throw new TableNotFoundException("Failed to find column"); + } + return optional.get(); + } + + default OperatorDto operatorIdToOperatorDto(DatabaseDto database, UUID operatorId) throws ImageNotFoundException { + final Optional<OperatorDto> optional = database.getContainer() + .getImage() + .getOperators() + .stream() + .filter(op -> op.getId().equals(operatorId)) + .findFirst(); + if (optional.isEmpty()) { + log.error("Failed to find operator with id: {}", operatorId); + throw new ImageNotFoundException("Failed to find operator"); + } + return optional.get(); + } + + default TableDto tableIdToTableDto(DatabaseDto database, UUID tableId) throws TableNotFoundException { + final Optional<TableDto> optional = database.getTables() + .stream() + .filter(t -> t.getId().equals(tableId)) + .findFirst(); + if (optional.isEmpty()) { + log.error("Failed to find table with id: {}", tableId); + throw new TableNotFoundException("Failed to find table"); + } + return optional.get(); + } + } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java index 116737e2ed01bbcfb890174881d9abb14f5e1614..7bdf8fa14118f7f6cca621cf01e7567ce608dfdc 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/mapper/MetadataMapper.java @@ -12,12 +12,16 @@ import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.columns.ColumnDto; import at.tuwien.api.identifier.IdentifierBriefDto; import at.tuwien.api.identifier.IdentifierDto; +import at.tuwien.api.keycloak.TokenDto; import at.tuwien.api.user.UserBriefDto; import at.tuwien.api.user.UserDto; +import org.keycloak.representations.AccessTokenResponse; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; +import java.util.UUID; + @Mapper(componentModel = "spring", imports = {DatabaseDto.class, ContainerDto.class, ImageDto.class}) public interface MetadataMapper { @@ -43,16 +47,18 @@ public interface MetadataMapper { UserDto userDtoToUserDto(UserDto data); - UserBriefDto userDtoToUserBriefDto(UserDto data); - @Mappings({ - @Mapping(target = "databaseId", source = "tdbid") + @Mapping(target = "accessToken", source = "token") }) + TokenDto accessTokenResponseToTokenDto(AccessTokenResponse data); + + UserBriefDto userDtoToUserBriefDto(UserDto data); + TableBriefDto tableDtoToTableBriefDto(TableDto data); IdentifierBriefDto identifierDtoToIdentifierBriefDto(IdentifierDto data); - default String metricToUri(String baseUrl, Long databaseId, Long tableId, Long subsetId, Long viewId) { + default String metricToUri(String baseUrl, UUID databaseId, UUID tableId, UUID subsetId, UUID viewId) { final StringBuilder uri = new StringBuilder(baseUrl) .append("/database/") .append(databaseId); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java similarity index 87% rename from dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java rename to dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java index fe3df343dba29ca489a8559e1cc741b7cc03359c..c5ffcc1638253a942d7a04b562314082e94865dc 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/CredentialService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/CacheService.java @@ -10,7 +10,7 @@ import at.tuwien.exception.*; import java.util.UUID; -public interface CredentialService { +public interface CacheService { /** * Gets credentials for a database with given id either from the cache (if not expired) or retrieves them from the @@ -22,7 +22,7 @@ public interface CredentialService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - DatabaseDto getDatabase(Long id) throws DatabaseNotFoundException, RemoteUnavailableException, + DatabaseDto getDatabase(UUID id) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException; /** @@ -35,7 +35,7 @@ public interface CredentialService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - ContainerDto getContainer(Long id) throws ContainerNotFoundException, RemoteUnavailableException, + ContainerDto getContainer(UUID id) throws ContainerNotFoundException, RemoteUnavailableException, MetadataServiceException; /** @@ -49,7 +49,7 @@ public interface CredentialService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - TableDto getTable(Long databaseId, Long tableId) throws RemoteUnavailableException, + TableDto getTable(UUID databaseId, UUID tableId) throws RemoteUnavailableException, MetadataServiceException, TableNotFoundException; /** @@ -63,7 +63,7 @@ public interface CredentialService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - ViewDto getView(Long databaseId, Long viewId) throws RemoteUnavailableException, + ViewDto getView(UUID databaseId, UUID viewId) throws RemoteUnavailableException, MetadataServiceException, ViewNotFoundException; /** @@ -90,13 +90,6 @@ public interface CredentialService { * @throws RemoteUnavailableException The remote service is not available. * @throws MetadataServiceException The remote service returned invalid data. */ - DatabaseAccessDto getAccess(Long databaseId, UUID userId) throws RemoteUnavailableException, + DatabaseAccessDto getAccess(UUID databaseId, UUID userId) throws RemoteUnavailableException, MetadataServiceException, NotAllowedException; - - /** - * Invalidate the caches to force a refresh of access to a database with given id. - * - * @param databaseId The database id. - */ - void invalidateAccess(Long databaseId); } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/DatabaseService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/DatabaseService.java index c325d7b33a06b9dd5d773262d79a512893b67643..8f07b6bfb29d527e99fc85504bf00c15b5424f89 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/DatabaseService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/DatabaseService.java @@ -1,6 +1,5 @@ package at.tuwien.service; -import at.tuwien.api.database.CreateViewDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableDto; @@ -40,12 +39,13 @@ public interface DatabaseService { /** * Creates a view in given data database with view definition. * @param database The data database object. - * @param data The view definition. + * @param viewName The view name. + * @param query The view query. * @return The generated view. * @throws SQLException * @throws ViewMalformedException */ - ViewDto createView(DatabaseDto database, CreateViewDto data) throws SQLException, + ViewDto createView(DatabaseDto database, String viewName, String query) throws SQLException, ViewMalformedException; /** diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/MetricsService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/MetricsService.java deleted file mode 100644 index 131bae7287292192931ea09e70cc8709512c9029..0000000000000000000000000000000000000000 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/MetricsService.java +++ /dev/null @@ -1,10 +0,0 @@ -package at.tuwien.service; - -public interface MetricsService { - - void countTableGetData(Long databaseId, Long tableId); - - void countSubsetGetData(Long databaseId, Long subsetId); - - void countViewGetData(Long databaseId, Long viewId); -} diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/QueueService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/QueueService.java index 6a03f5d767115314f6683ae726caaaf26538ebf9..1e8ba52923af628991d2994236378bab2e991e56 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/QueueService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/QueueService.java @@ -1,5 +1,6 @@ package at.tuwien.service; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.table.TableDto; import java.sql.SQLException; @@ -10,9 +11,10 @@ public interface QueueService { /** * Inserts data into the table of a given database. * + * @param database The database. * @param table The table. * @param data The data. * @throws SQLException The connection to the database could not be established. */ - void insert(TableDto table, Map<String, Object> data) throws SQLException; + void insert(DatabaseDto database, TableDto table, Map<String, Object> data) throws SQLException; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/StorageService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/StorageService.java index 135e5cae1fdcc395d055ee2cd7b49517c4ddd361..7ba3f93e714135e402ef506793393d0703f5aaa4 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/StorageService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/StorageService.java @@ -13,6 +13,8 @@ import java.util.List; public interface StorageService { + String putObject(byte[] content); + /** * Loads an object of a bucket from the Storage Service into an input stream. * diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/SubsetService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/SubsetService.java index e2fc56002799d26e75fc05ca496cb76d330cdb07..30d4baca5c0c4f555206f866cf886a4439dac58e 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/SubsetService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/SubsetService.java @@ -1,8 +1,8 @@ package at.tuwien.service; -import at.tuwien.api.SortTypeDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.query.QueryDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.exception.*; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; @@ -18,15 +18,15 @@ public interface SubsetService { * Creates a subset from the given statement at given time in the given database. * * @param database The database. - * @param statement The subset statement. + * @param subset The subset information. * @param timestamp The timestamp as of which the data is queried. If smaller than <now>, historic data is queried. * @param userId The user id of the creating user. * @return The query id. * @throws QueryStoreInsertException The query store refused to insert the query. * @throws SQLException The connection to the database could not be established. */ - Long create(DatabaseDto database, String statement, Instant timestamp, UUID userId) - throws QueryStoreInsertException, SQLException; + UUID create(DatabaseDto database, SubsetDto subset, Instant timestamp, UUID userId) + throws QueryStoreInsertException, SQLException, QueryMalformedException, TableNotFoundException, ImageNotFoundException, ViewMalformedException; /** * Counts the subset row count of a query of a given subset in the given database. @@ -34,26 +34,21 @@ public interface SubsetService { * @param database The database. * @param query The subset. * @return The row count. - * @throws TableMalformedException The table is malformed. + * @throws QueryMalformedException The query is malformed. * @throws SQLException The connection to the database could not be established. */ - Long reExecuteCount(DatabaseDto database, QueryDto query) throws TableMalformedException, - SQLException, QueryMalformedException; + Long reExecuteCount(DatabaseDto database, QueryDto query) throws SQLException, QueryMalformedException; /** * Retrieve data from a subset in a database and optionally paginate with number of page and size of results. * * @param database The database. * @param query The query statements. - * @param page The page number. - * @param size Te result size. * @return The data. * @throws QueryMalformedException The mapped query produced a database error. * @throws TableNotFoundException The database table is malformed. */ - Dataset<Row> getData(DatabaseDto database, String query, Instant timestamp, Long page, Long size, - SortTypeDto sortDirection, String sortColumn) throws QueryMalformedException, - TableNotFoundException; + Dataset<Row> getData(DatabaseDto database, String query) throws QueryMalformedException, TableNotFoundException; /** * Finds all queries in the query store of the given database id and query id. @@ -79,10 +74,9 @@ public interface SubsetService { * @return The row count. * @throws SQLException The connection to the database could not be established. * @throws QueryMalformedException The mapped query produced a database error. - * @throws TableMalformedException The database table is malformed. */ Long executeCountNonPersistent(DatabaseDto database, String statement, Instant timestamp) - throws SQLException, QueryMalformedException, TableMalformedException; + throws SQLException, QueryMalformedException; /** * Finds a query in the query store of the given database id and query id. @@ -97,21 +91,21 @@ public interface SubsetService { * @throws DatabaseNotFoundException The database metadata was not found in the Metadata Service. * @throws MetadataServiceException Communication with the Metadata Service failed. */ - QueryDto findById(DatabaseDto database, Long queryId) throws QueryNotFoundException, SQLException, + QueryDto findById(DatabaseDto database, UUID queryId) throws QueryNotFoundException, SQLException, RemoteUnavailableException, UserNotFoundException, DatabaseNotFoundException, MetadataServiceException; /** * Inserts a query and metadata to the query store of a given database id. * * @param database The database. - * @param query The query statement. + * @param statement The query statement. * @param userId The user id. * @return The stored query id on success. * @throws SQLException The connection to the database could not be established. * @throws QueryStoreInsertException The query store failed to insert the query. */ - Long storeQuery(DatabaseDto database, String query, Instant timestamp, UUID userId) throws SQLException, - QueryStoreInsertException; + UUID storeQuery(DatabaseDto database, String statement, Instant timestamp, UUID userId) throws SQLException, + QueryStoreInsertException, ViewMalformedException; /** * Persists a query to be displayed in the frontend. @@ -122,7 +116,7 @@ public interface SubsetService { * @throws SQLException The connection to the database could not be established. * @throws QueryStorePersistException The query store failed to persist/unpersist the query. */ - void persist(DatabaseDto database, Long queryId, Boolean persist) throws SQLException, + void persist(DatabaseDto database, UUID queryId, Boolean persist) throws SQLException, QueryStorePersistException; /** diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/TableService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/TableService.java index f664a82cf32050512f5eeb7d9e2b206289153568..bb2b53432c41e0a521165c0bbdfb197579936331 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/TableService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/TableService.java @@ -1,5 +1,6 @@ package at.tuwien.service; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.query.ImportDto; import at.tuwien.api.database.table.*; import at.tuwien.exception.*; @@ -19,7 +20,7 @@ public interface TableService { * @throws TableMalformedException The table statistic generation was unsuccessful, likely due to a bug in the mapping. * @throws TableNotFoundException The table could not be inspected in the data database. */ - TableStatisticDto getStatistics(TableDto table) throws SQLException, TableMalformedException, + TableStatisticDto getStatistics(DatabaseDto database, TableDto table) throws SQLException, TableMalformedException, TableNotFoundException; /** @@ -31,7 +32,7 @@ public interface TableService { * @throws TableMalformedException The table schema is malformed. * @throws TableNotFoundException The table could not be inspected in the metadata database. */ - void updateTable(TableDto table, TableUpdateDto data) throws SQLException, + void updateTable(DatabaseDto database, TableDto table, TableUpdateDto data) throws SQLException, TableMalformedException, TableNotFoundException; /** @@ -41,7 +42,7 @@ public interface TableService { * @throws SQLException Failed to parse SQL query, contains invalid syntax. * @throws QueryMalformedException The drop table query is malformed. */ - void delete(TableDto table) throws SQLException, QueryMalformedException; + void delete(DatabaseDto database, TableDto table) throws SQLException, QueryMalformedException; /** * Obtains the table history for a given table object. @@ -52,7 +53,7 @@ public interface TableService { * @throws SQLException Failed to parse SQL query, contains invalid syntax. * @throws TableNotFoundException The table could not be found in the data database. */ - List<TableHistoryDto> history(TableDto table, Long size) throws SQLException, TableNotFoundException; + List<TableHistoryDto> history(DatabaseDto database, TableDto table, Long size) throws SQLException, TableNotFoundException; /** * Obtains the table data tuples count at time. @@ -63,7 +64,7 @@ public interface TableService { * @throws SQLException Failed to parse SQL query, contains invalid syntax. * @throws QueryMalformedException The count query is malformed, likely due to a bug in the application. */ - Long getCount(TableDto table, Instant timestamp) throws SQLException, + Long getCount(DatabaseDto database, TableDto table, Instant timestamp) throws SQLException, QueryMalformedException; /** @@ -78,7 +79,7 @@ public interface TableService { * @throws SQLException Failed to parse SQL query, contains invalid syntax. * @throws QueryMalformedException The import query is malformed, likely due to a bug in the application. */ - void importDataset(TableDto table, ImportDto data) throws MalformedException, StorageNotFoundException, + void importDataset(DatabaseDto database, TableDto table, ImportDto data) throws MalformedException, StorageNotFoundException, StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException; /** @@ -90,7 +91,7 @@ public interface TableService { * @throws TableMalformedException The tuple is malformed and does not fit the table schema. * @throws QueryMalformedException The delete query is malformed, likely due to a bug in the application. */ - void deleteTuple(TableDto table, TupleDeleteDto data) throws SQLException, + void deleteTuple(DatabaseDto database, TableDto table, TupleDeleteDto data) throws SQLException, TableMalformedException, QueryMalformedException; /** @@ -104,7 +105,7 @@ public interface TableService { * @throws StorageUnavailableException Failed to establish a connection with the Storage Service. * @throws StorageNotFoundException The storage service was not able to find the dataset for import. */ - void createTuple(TableDto table, TupleDto data) throws SQLException, + void createTuple(DatabaseDto database, TableDto table, TupleDto data) throws SQLException, QueryMalformedException, TableMalformedException, StorageUnavailableException, StorageNotFoundException; /** @@ -116,6 +117,6 @@ public interface TableService { * @throws QueryMalformedException The update query is malformed, likely due to a bug in the application. * @throws TableMalformedException The tuple is malformed and does not fit the table schema. */ - void updateTuple(TableDto table, TupleUpdateDto data) throws SQLException, + void updateTuple(DatabaseDto database, TableDto table, TupleUpdateDto data) throws SQLException, QueryMalformedException, TableMalformedException; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/ViewService.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/ViewService.java index 8f721f9974b0a35d5158fba0d67f9bf7a95faf70..7f64f72ebefeb7daa3811aedf5f41765e2ec28d6 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/ViewService.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/ViewService.java @@ -1,5 +1,6 @@ package at.tuwien.service; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.exception.QueryMalformedException; import at.tuwien.exception.ViewMalformedException; @@ -12,20 +13,22 @@ public interface ViewService { /** * Deletes a view. * + * @param database The database. * @param view The view. * @throws SQLException The connection to the data database was unsuccessful. * @throws ViewMalformedException The query is malformed and was rejected by the data database. */ - void delete(ViewDto view) throws SQLException, ViewMalformedException; + void delete(DatabaseDto database, ViewDto view) throws SQLException, ViewMalformedException; /** * Counts tuples in a view at system-versioned timestamp. * + * @param database The database. * @param view The view. * @param timestamp The system-versioned timestamp. * @return The number of tuples. * @throws SQLException The connection to the data database was unsuccessful. * @throws QueryMalformedException The query is malformed and was rejected by the data database. */ - Long count(ViewDto view, Instant timestamp) throws SQLException, QueryMalformedException; + Long count(DatabaseDto database, ViewDto view, Instant timestamp) throws SQLException, QueryMalformedException; } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java similarity index 78% rename from dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java rename to dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java index fbc800bf4719bee556dc597ad593de93b8e9e0be..c23f77edd68af67fbe09d3d9c5b4746b3eebbd83 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CredentialServiceImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/CacheServiceImpl.java @@ -8,7 +8,7 @@ import at.tuwien.api.database.table.TableDto; import at.tuwien.api.user.UserDto; import at.tuwien.exception.*; import at.tuwien.gateway.MetadataServiceGateway; -import at.tuwien.service.CredentialService; +import at.tuwien.service.CacheService; import com.github.benmanes.caffeine.cache.Cache; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -18,33 +18,32 @@ import java.util.UUID; @Log4j2 @Service -public class CredentialServiceImpl implements CredentialService { +public class CacheServiceImpl implements CacheService { private final MetadataServiceGateway gateway; private final Cache<UUID, UserDto> userCache; - private final Cache<Long, ViewDto> viewCache; - private final Cache<Long, DatabaseAccessDto> accessCache; - private final Cache<Long, TableDto> tableCache; - private final Cache<Long, DatabaseDto> databaseCache; - private final Cache<Long, ContainerDto> containerCache; + private final Cache<UUID, ViewDto> viewCache; + private final Cache<UUID, TableDto> tableCache; + private final Cache<UUID, DatabaseDto> databaseCache; + private final Cache<UUID, ContainerDto> containerCache; + private final Cache<UUID, DatabaseAccessDto> accessCache; @Autowired - public CredentialServiceImpl(MetadataServiceGateway gateway, Cache<UUID, UserDto> userCache, - Cache<Long, ViewDto> viewCache, Cache<Long, DatabaseAccessDto> accessCache, - Cache<Long, TableDto> tableCache, - Cache<Long, DatabaseDto> databaseCache, - Cache<Long, ContainerDto> containerCache) { + public CacheServiceImpl(MetadataServiceGateway gateway, Cache<UUID, UserDto> userCache, + Cache<UUID, ViewDto> viewCache, Cache<UUID, TableDto> tableCache, + Cache<UUID, DatabaseAccessDto> accessCache, Cache<UUID, DatabaseDto> databaseCache, + Cache<UUID, ContainerDto> containerCache) { this.gateway = gateway; this.userCache = userCache; this.viewCache = viewCache; - this.accessCache = accessCache; this.tableCache = tableCache; + this.accessCache = accessCache; this.databaseCache = databaseCache; this.containerCache = containerCache; } @Override - public DatabaseDto getDatabase(Long id) throws DatabaseNotFoundException, RemoteUnavailableException, + public DatabaseDto getDatabase(UUID id) throws DatabaseNotFoundException, RemoteUnavailableException, MetadataServiceException { final DatabaseDto cacheDatabase = databaseCache.getIfPresent(id); if (cacheDatabase != null) { @@ -58,7 +57,7 @@ public class CredentialServiceImpl implements CredentialService { } @Override - public TableDto getTable(Long databaseId, Long tableId) throws RemoteUnavailableException, + public TableDto getTable(UUID databaseId, UUID tableId) throws RemoteUnavailableException, MetadataServiceException, TableNotFoundException { final TableDto cacheTable = tableCache.getIfPresent(tableId); if (cacheTable != null) { @@ -72,13 +71,7 @@ public class CredentialServiceImpl implements CredentialService { } @Override - public void invalidateAccess(Long databaseId) { - accessCache.invalidate(databaseId); - log.debug("invalidated access for database with id {} in cache", databaseId); - } - - @Override - public ContainerDto getContainer(Long id) throws RemoteUnavailableException, MetadataServiceException, + public ContainerDto getContainer(UUID id) throws RemoteUnavailableException, MetadataServiceException, ContainerNotFoundException { final ContainerDto cacheContainer = containerCache.getIfPresent(id); if (cacheContainer != null) { @@ -92,7 +85,7 @@ public class CredentialServiceImpl implements CredentialService { } @Override - public ViewDto getView(Long databaseId, Long viewId) throws RemoteUnavailableException, + public ViewDto getView(UUID databaseId, UUID viewId) throws RemoteUnavailableException, MetadataServiceException, ViewNotFoundException { final ViewDto cacheView = viewCache.getIfPresent(viewId); if (cacheView != null) { @@ -120,7 +113,7 @@ public class CredentialServiceImpl implements CredentialService { } @Override - public DatabaseAccessDto getAccess(Long databaseId, UUID userId) throws RemoteUnavailableException, + public DatabaseAccessDto getAccess(UUID databaseId, UUID userId) throws RemoteUnavailableException, MetadataServiceException, NotAllowedException { final DatabaseAccessDto cacheAccess = accessCache.getIfPresent(databaseId); if (cacheAccess != null) { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceMariaDbImpl.java index aedba1aed2902b35b424832d117e200dcc02aca9..9e35574d8ddb1eb21b9fd566d009abceecf49043 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceMariaDbImpl.java @@ -71,10 +71,6 @@ public class ContainerServiceMariaDbImpl extends DataConnector implements Contai try { /* create query store */ long start = System.currentTimeMillis(); - connection.prepareStatement(mariaDbMapper.queryStoreCreateSequenceRawQuery()) - .execute(); - log.trace("executed statement in {} ms", System.currentTimeMillis() - start); - start = System.currentTimeMillis(); connection.prepareStatement(mariaDbMapper.queryStoreCreateTableRawQuery()) .execute(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DataConnector.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DataConnector.java index 37a345426ae560aee202d5acbcc4d62d79f85f2b..6e6e316b5af1b2e21cbc3f0d1ad1dc7e2232dca4 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DataConnector.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DataConnector.java @@ -2,8 +2,6 @@ package at.tuwien.service.impl; import at.tuwien.api.container.ContainerDto; import at.tuwien.api.database.DatabaseDto; -import at.tuwien.api.database.ViewDto; -import at.tuwien.api.database.table.TableDto; import com.mchange.v2.c3p0.ComboPooledDataSource; import lombok.extern.log4j.Log4j2; import org.springframework.stereotype.Service; @@ -25,14 +23,6 @@ public abstract class DataConnector { return dataSource; } - public ComboPooledDataSource getDataSource(ViewDto view) { - return getDataSource(view.getDatabase().getContainer(), view.getDatabase().getInternalName()); - } - - public ComboPooledDataSource getDataSource(TableDto table) { - return getDataSource(table.getDatabase().getContainer(), table.getDatabase().getInternalName()); - } - public ComboPooledDataSource getDataSource(ContainerDto container) { return getDataSource(container, null); } @@ -48,10 +38,6 @@ public abstract class DataConnector { return sb.toString(); } - public String getSparkUrl(TableDto table) { - return getSparkUrl(table.getDatabase().getContainer(), table.getDatabase().getInternalName()); - } - public String getSparkUrl(DatabaseDto databaseDto) { return getSparkUrl(databaseDto.getContainer(), databaseDto.getInternalName()); } diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceMariaDbImpl.java index 4d899c99782f99813c3618dd4c051a2a2a0f2da8..846fa86a4c967c04ed1a6b9c2b60befdbe82096c 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceMariaDbImpl.java @@ -1,13 +1,11 @@ package at.tuwien.service.impl; -import at.tuwien.api.database.CreateViewDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.constraints.unique.UniqueDto; import at.tuwien.api.database.table.internal.TableCreateDto; import at.tuwien.api.user.internal.UpdateUserPasswordDto; -import at.tuwien.config.QueryConfig; import at.tuwien.exception.*; import at.tuwien.mapper.DataMapper; import at.tuwien.mapper.MariaDbMapper; @@ -32,15 +30,13 @@ import java.util.List; public class DatabaseServiceMariaDbImpl extends DataConnector implements DatabaseService { private final DataMapper dataMapper; - private final QueryConfig queryConfig; private final MariaDbMapper mariaDbMapper; private final MetadataMapper metadataMapper; @Autowired - public DatabaseServiceMariaDbImpl(DataMapper dataMapper, QueryConfig queryConfig, MariaDbMapper mariaDbMapper, + public DatabaseServiceMariaDbImpl(DataMapper dataMapper, MariaDbMapper mariaDbMapper, MetadataMapper metadataMapper) { this.dataMapper = dataMapper; - this.queryConfig = queryConfig; this.mariaDbMapper = mariaDbMapper; this.metadataMapper = metadataMapper; } @@ -62,7 +58,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas throw new ViewNotFoundException("Failed to find view in the information schema"); } final ViewDto view = dataMapper.schemaResultSetToView(database, resultSet1); - view.setVdbid(database.getId()); + view.setDatabaseId(database.getId()); view.setOwner(database.getOwner()); /* obtain view columns */ start = System.currentTimeMillis(); @@ -100,7 +96,8 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas try { /* create table if not exists */ final long start = System.currentTimeMillis(); - connection.prepareStatement(mariaDbMapper.tableCreateDtoToCreateTableRawQuery(data)) + connection.prepareStatement(mariaDbMapper.tableCreateDtoToCreateTableRawQuery(database.getInternalName(), + data)) .execute(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); connection.commit(); @@ -115,34 +112,33 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas } finally { dataSource.close(); } - log.info("Created table with name {}", tableName); - final TableDto table = inspectTable(database, tableName); - return table; + log.info("Created table with name {}.{}", database.getInternalName(), tableName); + return inspectTable(database, tableName); } @Override - public ViewDto createView(DatabaseDto database, CreateViewDto data) throws SQLException, + public ViewDto createView(DatabaseDto database, String viewName, String query) throws SQLException, ViewMalformedException { final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); ViewDto view = ViewDto.builder() - .name(data.getName()) - .internalName(mariaDbMapper.nameToInternalName(data.getName())) - .query(data.getQuery()) + .name(viewName) + .internalName(mariaDbMapper.nameToInternalName(viewName)) + .query(query) .queryHash(Hashing.sha256() - .hashString(data.getQuery(), StandardCharsets.UTF_8) + .hashString(query, StandardCharsets.UTF_8) .toString()) .isPublic(database.getIsPublic()) .owner(database.getOwner()) .identifiers(new LinkedList<>()) .isInitialView(false) - .vdbid(database.getId()) + .databaseId(database.getId()) .columns(new LinkedList<>()) .build(); try { /* create view if not exists */ final long start = System.currentTimeMillis(); - connection.prepareStatement(mariaDbMapper.viewCreateRawQuery(view.getInternalName(), data.getQuery())) + connection.prepareStatement(mariaDbMapper.viewCreateRawQuery(view.getInternalName(), query)) .execute(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); /* select view columns */ @@ -151,7 +147,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas statement2.setString(2, view.getInternalName()); final ResultSet resultSet2 = statement2.executeQuery(); while (resultSet2.next()) { - view = dataMapper.resultSetToTable(resultSet2, view, queryConfig); + view = dataMapper.resultSetToTable(resultSet2, view); } connection.commit(); } catch (SQLException e) { @@ -296,7 +292,7 @@ public class DatabaseServiceMariaDbImpl extends DataConnector implements Databas }); } } - table.setTdbid(database.getId()); + table.setDatabaseId(database.getId()); table.setOwner(database.getOwner()); final TableDto tmpTable = table; tmpTable.getColumns() diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/MetricsServicePrometheusImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/MetricsServicePrometheusImpl.java deleted file mode 100644 index 73754c9f5f2183d24f2576548b57a3f8a672b7a7..0000000000000000000000000000000000000000 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/MetricsServicePrometheusImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package at.tuwien.service.impl; - -import at.tuwien.config.MetricsConfig; -import at.tuwien.mapper.MetadataMapper; -import at.tuwien.service.MetricsService; -import io.micrometer.core.instrument.Counter; -import io.micrometer.core.instrument.Metrics; -import lombok.extern.log4j.Log4j2; -import org.springframework.stereotype.Service; - -@Log4j2 -@Service -public class MetricsServicePrometheusImpl implements MetricsService { - - private final MetricsConfig metricsConfig; - private final MetadataMapper metadataMapper; - - public MetricsServicePrometheusImpl(MetricsConfig metricsConfig, MetadataMapper metadataMapper) { - this.metricsConfig = metricsConfig; - this.metadataMapper = metadataMapper; - } - - @Override - public void countTableGetData(Long databaseId, Long tableId) { - countGetData(databaseId, tableId, null, null); - } - - @Override - public void countSubsetGetData(Long databaseId, Long subsetId) { - countGetData(databaseId, null, subsetId, null); - } - - @Override - public void countViewGetData(Long databaseId, Long viewId) { - countGetData(databaseId, null, null, viewId); - } - - public void countGetData(Long databaseId, Long tableId, Long subsetId, Long viewId) { - Counter.builder("dbrepo.datasource.data.get") - .tag("uri", metadataMapper.metricToUri(metricsConfig.getBaseUrl(), databaseId, tableId, subsetId, viewId)) - .tag("protocol", "http") - .description("The total number of accessed data sources") - .register(Metrics.globalRegistry) - .increment(); - } - -} diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java index 4db29335fbfc4cbdbb8086a2009cb588613d1969..07b889d536c14719988c768b16998ab9fcc1b55c 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/QueueServiceRabbitMqImpl.java @@ -1,5 +1,6 @@ package at.tuwien.service.impl; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.columns.ColumnDto; import at.tuwien.mapper.DataMapper; @@ -30,13 +31,14 @@ public class QueueServiceRabbitMqImpl extends DataConnector implements QueueServ } @Override - public void insert(TableDto table, Map<String, Object> data) throws SQLException { - final ComboPooledDataSource dataSource = getDataSource(table); + public void insert(DatabaseDto database, TableDto table, Map<String, Object> data) throws SQLException { + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { final int[] idx = new int[]{1}; final PreparedStatement preparedStatement = connection.prepareStatement( - dataMapper.rabbitMqTupleToInsertOrUpdateQuery(metadataMapper.tableDtoToTableDto(table), data)); + dataMapper.rabbitMqTupleToInsertOrUpdateQuery(database.getInternalName(), + metadataMapper.tableDtoToTableDto(table), data)); for (Map.Entry<String, Object> entry : data.entrySet()) { final Optional<ColumnDto> optional = table.getColumns().stream().filter(c -> c.getInternalName().equals(entry.getKey())).findFirst(); if (optional.isEmpty()) { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/StorageServiceS3Impl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/StorageServiceS3Impl.java index dc1c74d3f14bd583ceb072d886be499af18b884f..d7f3c0da30e3ef937149adf9264b8580f9bf8cef 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/StorageServiceS3Impl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/StorageServiceS3Impl.java @@ -8,15 +8,18 @@ import at.tuwien.exception.StorageUnavailableException; import at.tuwien.exception.TableMalformedException; import at.tuwien.service.StorageService; import lombok.extern.log4j.Log4j2; +import org.apache.commons.lang3.RandomStringUtils; import org.apache.spark.sql.*; import org.apache.spark.sql.catalyst.ExtendedAnalysisException; import org.apache.spark.sql.types.StructField; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.InputStreamResource; import org.springframework.stereotype.Service; +import software.amazon.awssdk.core.sync.RequestBody; import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.GetObjectRequest; import software.amazon.awssdk.services.s3.model.NoSuchKeyException; +import software.amazon.awssdk.services.s3.model.PutObjectRequest; import software.amazon.awssdk.services.s3.model.S3Exception; import java.io.*; @@ -43,6 +46,18 @@ public class StorageServiceS3Impl implements StorageService { this.sparkSession = sparkSession; } + @Override + public String putObject(byte[] content) { + final String key = "dbr_" + RandomStringUtils.randomAlphanumeric(96) + .toLowerCase(); + s3Client.putObject(PutObjectRequest.builder() + .key(key) + .bucket(s3Config.getS3Bucket()) + .build(), RequestBody.fromBytes(content)); + log.debug("put object in S3 bucket {} with key: {}", s3Config.getS3Bucket(), key); + return key; + } + @Override public InputStream getObject(String bucket, String key) throws StorageNotFoundException, StorageUnavailableException { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java index bdfdb14838a608ce87b40a94faebe52a27546a63..a2b70ece8623d321683aaa73b6bd29dd8e7b524b 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/SubsetServiceMariaDbImpl.java @@ -1,8 +1,8 @@ package at.tuwien.service.impl; -import at.tuwien.api.SortTypeDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.query.QueryDto; +import at.tuwien.api.database.query.SubsetDto; import at.tuwien.api.identifier.IdentifierBriefDto; import at.tuwien.api.identifier.IdentifierTypeDto; import at.tuwien.exception.*; @@ -44,9 +44,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer } @Override - public Dataset<Row> getData(DatabaseDto database, String query, Instant timestamp, Long page, Long size, - SortTypeDto sortDirection, String sortColumn) - throws QueryMalformedException, TableNotFoundException { + public Dataset<Row> getData(DatabaseDto database, String query) throws QueryMalformedException, TableNotFoundException { try { return sparkSession.read() .format("jdbc") @@ -56,11 +54,10 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer .option("query", query) .load(); } catch (Exception e) { - if (e instanceof ExtendedAnalysisException exception) { - if (exception.getSimpleMessage().contains("TABLE_OR_VIEW_NOT_FOUND")) { - log.error("Failed to find named reference: {}", exception.getSimpleMessage()); - throw new TableNotFoundException("Failed to find named reference: " + exception.getSimpleMessage()) /* remove throwable on purpose, clutters the output */; - } + if (e instanceof ExtendedAnalysisException && e.getMessage().contains("TABLE_OR_VIEW_NOT_FOUND") + || e instanceof SQLSyntaxErrorException && e.getMessage().contains("doesn't exist")) { + log.error("Failed to find named reference: {}", e.getMessage()); + throw new TableNotFoundException("Failed to find named reference: " + e.getMessage()) /* remove throwable on purpose, clutters the output */; } log.error("Malformed query: {}", e.getMessage()); throw new QueryMalformedException("Malformed query: " + e.getMessage(), e); @@ -68,14 +65,15 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer } @Override - public Long create(DatabaseDto database, String statement, Instant timestamp, UUID userId) - throws QueryStoreInsertException, SQLException { + public UUID create(DatabaseDto database, SubsetDto subset, Instant timestamp, UUID userId) + throws QueryStoreInsertException, SQLException, QueryMalformedException, TableNotFoundException, + ImageNotFoundException, ViewMalformedException { + final String statement = mariaDbMapper.subsetDtoToRawQuery(database, subset); return storeQuery(database, statement, timestamp, userId); } @Override - public Long reExecuteCount(DatabaseDto database, QueryDto query) throws TableMalformedException, - SQLException, QueryMalformedException { + public Long reExecuteCount(DatabaseDto database, QueryDto query) throws SQLException, QueryMalformedException { return executeCountNonPersistent(database, query.getQuery(), query.getExecution()); } @@ -115,7 +113,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer @Override public Long executeCountNonPersistent(DatabaseDto database, String statement, Instant timestamp) - throws SQLException, QueryMalformedException, TableMalformedException { + throws SQLException, QueryMalformedException { final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { @@ -126,28 +124,27 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer return mariaDbMapper.resultSetToNumber(resultSet); } catch (SQLException e) { log.error("Failed to map object: {}", e.getMessage()); - throw new TableMalformedException("Failed to map object: " + e.getMessage(), e); + throw new QueryMalformedException("Failed to map object: " + e.getMessage(), e); } finally { dataSource.close(); } } @Override - public QueryDto findById(DatabaseDto database, Long queryId) throws QueryNotFoundException, SQLException, - RemoteUnavailableException, DatabaseNotFoundException, MetadataServiceException { + public QueryDto findById(DatabaseDto database, UUID queryId) throws QueryNotFoundException, + SQLException, RemoteUnavailableException, DatabaseNotFoundException, MetadataServiceException { final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { final long start = System.currentTimeMillis(); final PreparedStatement preparedStatement = connection.prepareStatement(mariaDbMapper.queryStoreFindQueryRawQuery()); - preparedStatement.setLong(1, queryId); + preparedStatement.setString(1, String.valueOf(queryId)); final ResultSet resultSet = preparedStatement.executeQuery(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); if (!resultSet.next()) { throw new QueryNotFoundException("Failed to find query"); } final QueryDto query = dataMapper.resultSetToQueryDto(resultSet); - query.setIdentifiers(metadataServiceGateway.getIdentifiers(database.getId(), queryId)); query.setOwner(database.getOwner()); query.setDatabaseId(database.getId()); return query; @@ -160,10 +157,10 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer } @Override - public Long storeQuery(DatabaseDto database, String query, Instant timestamp, UUID userId) throws SQLException, + public UUID storeQuery(DatabaseDto database, String query, Instant timestamp, UUID userId) throws SQLException, QueryStoreInsertException { /* save */ - final Long queryId; + final UUID queryId; final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { @@ -177,10 +174,10 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer } callableStatement.setString(2, query); callableStatement.setTimestamp(3, Timestamp.from(timestamp)); - callableStatement.registerOutParameter(4, Types.BIGINT); + callableStatement.registerOutParameter(4, Types.VARCHAR); callableStatement.executeUpdate(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); - queryId = callableStatement.getLong(4); + queryId = UUID.fromString(callableStatement.getString(4)); callableStatement.close(); log.info("Stored query with id {} in database with name {}", queryId, database.getInternalName()); connection.commit(); @@ -195,7 +192,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer } @Override - public void persist(DatabaseDto database, Long queryId, Boolean persist) throws SQLException, + public void persist(DatabaseDto database, UUID queryId, Boolean persist) throws SQLException, QueryStorePersistException { final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); @@ -204,7 +201,7 @@ public class SubsetServiceMariaDbImpl extends DataConnector implements SubsetSer final long start = System.currentTimeMillis(); final PreparedStatement preparedStatement = connection.prepareStatement(mariaDbMapper.queryStoreUpdateQueryRawQuery()); preparedStatement.setBoolean(1, persist); - preparedStatement.setLong(2, queryId); + preparedStatement.setString(2, String.valueOf(queryId)); preparedStatement.executeUpdate(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); } catch (SQLException e) { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java index 466f7539fd250666962d08a75ffffd5aa61480fa..a646de02b3b560a7dc6967c108a4f7369e33fd65 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/TableServiceMariaDbImpl.java @@ -1,5 +1,6 @@ package at.tuwien.service.impl; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.query.ImportDto; import at.tuwien.api.database.table.*; import at.tuwien.api.database.table.columns.ColumnDto; @@ -50,9 +51,9 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } @Override - public TableStatisticDto getStatistics(TableDto table) throws SQLException, TableMalformedException, + public TableStatisticDto getStatistics(DatabaseDto database, TableDto table) throws SQLException, TableMalformedException, TableNotFoundException { - final ComboPooledDataSource dataSource = getDataSource(table); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); final TableStatisticDto statistic; try { @@ -60,14 +61,14 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi final long start = System.currentTimeMillis(); final String query = mariaDbMapper.tableColumnStatisticsSelectRawQuery(table.getColumns(), table.getInternalName()); if (query == null) { - log.debug("table {}.{} does not have columns that can be analysed for statistical properties (i.e. no numeric columns)", table.getDatabase().getInternalName(), table.getInternalName()); + log.debug("table {}.{} does not have columns that can be analysed for statistical properties", database.getInternalName(), table.getInternalName()); statistic = null; } else { final ResultSet resultSet = connection.prepareStatement(query) .executeQuery(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); statistic = dataMapper.resultSetToTableStatistic(resultSet); - final TableDto tmpTable = databaseService.inspectTable(table.getDatabase(), table.getInternalName()); + final TableDto tmpTable = databaseService.inspectTable(database, table.getInternalName()); statistic.setAvgRowLength(tmpTable.getAvgRowLength()); statistic.setDataLength(tmpTable.getDataLength()); statistic.setMaxDataLength(tmpTable.getMaxDataLength()); @@ -91,14 +92,15 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } @Override - public void updateTable(TableDto table, TableUpdateDto data) throws SQLException, + public void updateTable(DatabaseDto database, TableDto table, TableUpdateDto data) throws SQLException, TableMalformedException { - final ComboPooledDataSource dataSource = getDataSource(table.getDatabase()); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* create table if not exists */ final long start = System.currentTimeMillis(); - final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tableNameToUpdateTableRawQuery(table.getInternalName())); + final PreparedStatement statement = connection.prepareStatement( + mariaDbMapper.tableNameToUpdateTableRawQuery(database.getInternalName(), table.getInternalName())); log.trace("prepare with arg 1={}", data.getDescription()); if (data.getDescription() == null) { statement.setString(1, ""); @@ -115,17 +117,18 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } finally { dataSource.close(); } - log.info("Updated table with name {}", table.getInternalName()); + log.info("Updated table with name {}.{}", database.getInternalName(), table.getInternalName()); } @Override - public void delete(TableDto table) throws SQLException, QueryMalformedException { - final ComboPooledDataSource dataSource = getDataSource(table.getDatabase()); + public void delete(DatabaseDto database, TableDto table) throws SQLException, QueryMalformedException { + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* create table if not exists */ final long start = System.currentTimeMillis(); - connection.prepareStatement(mariaDbMapper.dropTableRawQuery(table.getInternalName())) + connection.prepareStatement(mariaDbMapper.dropTableRawQuery(database.getInternalName(), + table.getInternalName())) .execute(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); connection.commit(); @@ -136,63 +139,63 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } finally { dataSource.close(); } - log.info("Deleted table with name {}", table.getInternalName()); + log.info("Deleted table with name {}.{}", database.getInternalName(), table.getInternalName()); } @Override - public List<TableHistoryDto> history(TableDto table, Long size) throws SQLException, + public List<TableHistoryDto> history(DatabaseDto database, TableDto table, Long size) throws SQLException, TableNotFoundException { - final ComboPooledDataSource dataSource = getDataSource(table.getDatabase()); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); final List<TableHistoryDto> history; try { /* find table data */ final long start = System.currentTimeMillis(); final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectHistoryRawQuery( - table.getDatabase().getInternalName(), table.getInternalName(), size)) + database.getInternalName(), table.getInternalName(), size)) .executeQuery(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); history = dataMapper.resultSetToTableHistory(resultSet); connection.commit(); } catch (SQLException e) { connection.rollback(); - log.error("Failed to find history for table {}.{}: {}", table.getDatabase(), table.getInternalName(), e.getMessage()); - throw new TableNotFoundException("Failed to find history for table " + table.getDatabase() + "." + table.getInternalName() + ": " + e.getMessage(), e); + log.error("Failed to find history for table {}.{}: {}", database, table.getInternalName(), e.getMessage()); + throw new TableNotFoundException("Failed to find history for table " + database + "." + table.getInternalName() + ": " + e.getMessage(), e); } finally { dataSource.close(); } - log.info("Find history for table {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Find history for table {}.{}", database.getInternalName(), table.getInternalName()); return history; } @Override - public Long getCount(TableDto table, Instant timestamp) throws SQLException, + public Long getCount(DatabaseDto database, TableDto table, Instant timestamp) throws SQLException, QueryMalformedException { - final ComboPooledDataSource dataSource = getDataSource(table.getDatabase()); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); final Long queryResult; try { /* find table data */ final long start = System.currentTimeMillis(); final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectCountRawQuery( - table.getDatabase().getInternalName(), table.getInternalName(), timestamp)) + database.getInternalName(), table.getInternalName(), timestamp)) .executeQuery(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); } catch (SQLException e) { connection.rollback(); - log.error("Failed to find row count from table {}.{}: {}", table.getDatabase(), table.getInternalName(), e.getMessage()); - throw new QueryMalformedException("Failed to find row count from table " + table.getDatabase() + "." + table.getInternalName() + ": " + e.getMessage(), e); + log.error("Failed to find row count from table {}.{}: {}", database, table.getInternalName(), e.getMessage()); + throw new QueryMalformedException("Failed to find row count from table " + database + "." + table.getInternalName() + ": " + e.getMessage(), e); } finally { dataSource.close(); } - log.info("Find row count from table {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Find row count from table {}.{}", database.getInternalName(), table.getInternalName()); return queryResult; } @Override - public void importDataset(TableDto table, ImportDto data) throws MalformedException, + public void importDataset(DatabaseDto database, TableDto table, ImportDto data) throws MalformedException, StorageNotFoundException, StorageUnavailableException, SQLException, QueryMalformedException, TableMalformedException { final List<String> columns = table.getColumns() @@ -202,8 +205,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi final Dataset<Row> dataset = storageService.loadDataset(columns, data.getLocation(), String.valueOf(data.getSeparator()), data.getHeader()); final Properties properties = new Properties(); - properties.setProperty("user", table.getDatabase().getContainer().getUsername()); - properties.setProperty("password", table.getDatabase().getContainer().getPassword()); + properties.setProperty("user", database.getContainer().getUsername()); + properties.setProperty("password", database.getContainer().getPassword()); final String temporaryTable = table.getInternalName() + "_tmp"; try { log.trace("import dataset to temporary table: {}", temporaryTable); @@ -211,7 +214,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .mode(SaveMode.Overwrite) .option("header", data.getHeader()) .option("inferSchema", "true") - .jdbc(getSparkUrl(table), temporaryTable, properties); + .jdbc(getSparkUrl(database), temporaryTable, properties); } catch (Exception e) { if (e instanceof AnalysisException exception) { final String message = exception.getSimpleMessage() @@ -222,8 +225,8 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi log.error("Failed to write dataset: {}", e.getMessage()); throw new MalformedException("Failed to write dataset: " + e.getMessage()) /* remove throwable on purpose, clutters the output */; } - /* import .csv from sidecar to database */ - final ComboPooledDataSource dataSource = getDataSource(table); + /* import .csv to database */ + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* import tuple */ @@ -237,25 +240,27 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi throw new QueryMalformedException("Failed to import tuple: " + e.getMessage(), e); } finally { /* delete temporary table */ - connection.prepareStatement(mariaDbMapper.dropTableRawQuery(temporaryTable, false)) + connection.prepareStatement(mariaDbMapper.dropTableRawQuery(database.getInternalName(), temporaryTable, + false)) .execute(); connection.commit(); dataSource.close(); } - log.info("Imported dataset into table: {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Imported dataset into table: {}.{}", database, table.getInternalName()); } @Override - public void deleteTuple(TableDto table, TupleDeleteDto data) throws SQLException, + public void deleteTuple(DatabaseDto database, TableDto table, TupleDeleteDto data) throws SQLException, TableMalformedException, QueryMalformedException { log.trace("delete tuple: {}", data); /* prepare the statement */ - final ComboPooledDataSource dataSource = getDataSource(table); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* import tuple */ final int[] idx = new int[]{1}; - final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawDeleteQuery(table, data)); + final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawDeleteQuery( + database.getInternalName(), table, data)); for (String column : data.getKeys().keySet()) { mariaDbMapper.prepareStatementWithColumnTypeObject(statement, getColumnType(table.getColumns(), column), idx[0], column, data.getKeys().get(column)); @@ -272,12 +277,12 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } finally { dataSource.close(); } - log.info("Deleted tuple(s) from table: {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Deleted tuple(s) from table: {}.{}", database.getInternalName(), table.getInternalName()); } @Override - public void createTuple(TableDto table, TupleDto data) throws SQLException, QueryMalformedException, - TableMalformedException, StorageUnavailableException, StorageNotFoundException { + public void createTuple(DatabaseDto database, TableDto table, TupleDto data) throws SQLException, + QueryMalformedException, TableMalformedException, StorageUnavailableException, StorageNotFoundException { log.trace("create tuple: {}", data); /* for each LOB-like data-column, retrieve the bytes and replace the value */ for (String key : data.getData().keySet()) { @@ -294,12 +299,13 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi .replace(key, blob); } /* prepare the statement */ - final ComboPooledDataSource dataSource = getDataSource(table); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* create tuple */ final int[] idx = new int[]{1}; - final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawCreateQuery(table, data)); + final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawCreateQuery( + database.getInternalName(), table, data)); for (Map.Entry<String, Object> entry : data.getData().entrySet()) { mariaDbMapper.prepareStatementWithColumnTypeObject(statement, getColumnType(table.getColumns(), entry.getKey()), idx[0], entry.getKey(), entry.getValue()); @@ -316,19 +322,20 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } finally { dataSource.close(); } - log.info("Created tuple(s) in table: {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Created tuple(s) in table: {}.{}", database.getInternalName(), table.getInternalName()); } @Override - public void updateTuple(TableDto table, TupleUpdateDto data) throws SQLException, + public void updateTuple(DatabaseDto database, TableDto table, TupleUpdateDto data) throws SQLException, QueryMalformedException, TableMalformedException { log.trace("update tuple: {}", data); /* prepare the statement */ - final ComboPooledDataSource dataSource = getDataSource(table); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { final int[] idx = new int[]{1}; - final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawUpdateQuery(table, data)); + final PreparedStatement statement = connection.prepareStatement(mariaDbMapper.tupleToRawUpdateQuery( + database.getInternalName(), table, data)); /* set data */ for (Map.Entry<String, Object> entry : data.getData().entrySet()) { mariaDbMapper.prepareStatementWithColumnTypeObject(statement, @@ -352,7 +359,7 @@ public class TableServiceMariaDbImpl extends DataConnector implements TableServi } finally { dataSource.close(); } - log.info("Updated tuple(s) from table: {}.{}", table.getDatabase(), table.getInternalName()); + log.info("Updated tuple(s) from table: {}.{}", database.getInternalName(), table.getInternalName()); } public ColumnTypeDto getColumnType(List<ColumnDto> columns, String name) throws QueryMalformedException { diff --git a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java index fff524047e10b575f773fe23656f86944514843a..c1ba33ae4ae91639ba14d715a569b4b596880625 100644 --- a/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java +++ b/dbrepo-data-service/services/src/main/java/at/tuwien/service/impl/ViewServiceMariaDbImpl.java @@ -1,5 +1,6 @@ package at.tuwien.service.impl; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.ViewDto; import at.tuwien.exception.QueryMalformedException; import at.tuwien.exception.ViewMalformedException; @@ -27,13 +28,14 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService } @Override - public void delete(ViewDto view) throws SQLException, ViewMalformedException { - final ComboPooledDataSource dataSource = getDataSource(view); + public void delete(DatabaseDto database, ViewDto view) throws SQLException, ViewMalformedException { + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); try { /* drop view if exists */ final long start = System.currentTimeMillis(); - connection.prepareStatement(mariaDbMapper.dropViewRawQuery(view.getInternalName())) + connection.prepareStatement(mariaDbMapper.dropViewRawQuery(database.getInternalName(), + view.getInternalName())) .execute(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); connection.commit(); @@ -44,32 +46,32 @@ public class ViewServiceMariaDbImpl extends DataConnector implements ViewService } finally { dataSource.close(); } - log.info("Deleted view {}.{}", view.getDatabase(), view.getInternalName()); + log.info("Deleted view {}.{}", database.getInternalName(), view.getInternalName()); } @Override - public Long count(ViewDto view, Instant timestamp) throws SQLException, + public Long count(DatabaseDto database, ViewDto view, Instant timestamp) throws SQLException, QueryMalformedException { - final ComboPooledDataSource dataSource = getDataSource(view); + final ComboPooledDataSource dataSource = getDataSource(database); final Connection connection = dataSource.getConnection(); final Long queryResult; try { /* find view data */ final long start = System.currentTimeMillis(); final ResultSet resultSet = connection.prepareStatement(mariaDbMapper.selectCountRawQuery( - view.getDatabase().getInternalName(), view.getInternalName(), timestamp)) + database.getInternalName(), view.getInternalName(), timestamp)) .executeQuery(); log.trace("executed statement in {} ms", System.currentTimeMillis() - start); queryResult = mariaDbMapper.resultSetToNumber(resultSet); connection.commit(); } catch (SQLException e) { connection.rollback(); - log.error("Failed to find row count from view {}.{}: {}", view.getDatabase(), view.getInternalName(), e.getMessage()); - throw new QueryMalformedException("Failed to find row count from view " + view.getDatabase() + "." + view.getInternalName() + ": " + e.getMessage(), e); + log.error("Failed to find row count from view {}.{}: {}", database.getInternalName(), view.getInternalName(), e.getMessage()); + throw new QueryMalformedException("Failed to find row count from view " + database.getInternalName() + "." + view.getInternalName() + ": " + e.getMessage(), e); } finally { dataSource.close(); } - log.info("Find row count from view {}.{}", view.getDatabase(), view.getInternalName()); + log.info("Find row count from view {}.{}", database.getInternalName(), view.getInternalName()); return queryResult; } diff --git a/dbrepo-gateway-service/dbrepo.conf b/dbrepo-gateway-service/dbrepo.conf index 60348a8197261ce82e73cdf8b81553ba6a4ffdac..165aba7643fcda32b94784d757d93e253814a1e0 100644 --- a/dbrepo-gateway-service/dbrepo.conf +++ b/dbrepo-gateway-service/dbrepo.conf @@ -36,10 +36,6 @@ upstream ui { server ui:3000; } -upstream upload { - server upload-service:8080; -} - upstream dashboard-service { server dashboard-service:3000; } @@ -52,7 +48,7 @@ server { listen 8080 default_server; server_name _; - location /dashboard/ { + location /dashboard { rewrite ^/dashboard/(.*) /$1 break; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -63,7 +59,7 @@ server { } # Proxy Grafana Live WebSocket connections. - location /dashboard/api/live/ { + location /dashboard/api/live { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -105,14 +101,12 @@ server { } location /api/upload { -# allow 128.130.0.0/16; -# deny all; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; - proxy_pass http://upload; + proxy_pass http://data; proxy_read_timeout 90; # Disable request and response buffering proxy_request_buffering off; @@ -129,7 +123,7 @@ server { proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/table/([0-9]+)/(data|history|export) { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/table/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|history|export)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -138,7 +132,7 @@ server { proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/view/([0-9]+)/(data|export) { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/(data|export)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -147,7 +141,7 @@ server { proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/view { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/view" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -156,7 +150,7 @@ server { proxy_read_timeout 90; } - location ~ /api/database/([0-9]+)/subset { + location ~ "/api/database/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/subset" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -165,7 +159,7 @@ server { proxy_read_timeout 600; } - location ~ /api/(database|concept|container|identifier|image|message|license|oai|ontology|unit|user) { + location ~ "/api/(database|concept|container|identifier|image|message|license|oai|ontology|unit|user)" { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -174,7 +168,7 @@ server { proxy_read_timeout 90; } - location ~ /pid/([0-9]+) { + location ~ "/pid/([0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})" { rewrite /pid/(.*) /api/identifier/$1 break; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/dbrepo-metadata-db/1_setup-schema.sql b/dbrepo-metadata-db/1_setup-schema.sql index e2bde25ed6d64f69c4f8d6e897a49a672e3f9a71..7e7978cad83580c330a28ef03ce3fd84623ee01e 100644 --- a/dbrepo-metadata-db/1_setup-schema.sql +++ b/dbrepo-metadata-db/1_setup-schema.sql @@ -2,390 +2,344 @@ BEGIN; CREATE TABLE IF NOT EXISTS `mdb_users` ( - id character varying(36) NOT NULL, - keycloak_id character varying(36) NOT NULL, - username character varying(255) NOT NULL, - firstname character varying(255), - lastname character varying(255), - orcid character varying(255), - affiliation character varying(255), - is_internal BOOLEAN NOT NULL DEFAULT FALSE, - mariadb_password character varying(255) NOT NULL, - theme character varying(255) NOT NULL default ('light'), - language character varying(3) NOT NULL default ('en'), - PRIMARY KEY (id), - UNIQUE (keycloak_id), - UNIQUE (username) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + keycloak_id VARCHAR(36) NOT NULL, + username VARCHAR(255) NOT NULL, + firstname VARCHAR(255), + lastname VARCHAR(255), + orcid VARCHAR(255), + affiliation VARCHAR(255), + is_internal BOOLEAN NOT NULL DEFAULT FALSE, + mariadb_password VARCHAR(255) NOT NULL, + theme VARCHAR(255) NOT NULL DEFAULT ('light'), + language VARCHAR(3) NOT NULL DEFAULT ('en'), + PRIMARY KEY (`id`), + UNIQUE (`keycloak_id`), + UNIQUE (`username`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_images` ( - id SERIAL, - registry character varying(255) NOT NULL DEFAULT 'docker.io', - name character varying(255) NOT NULL, - version character varying(255) NOT NULL, - default_port integer NOT NULL, - dialect character varying(255) NOT NULL, - driver_class character varying(255) NOT NULL, - jdbc_method character varying(255) NOT NULL, - is_default BOOLEAN NOT NULL DEFAULT FALSE, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - PRIMARY KEY (id), - UNIQUE (name, version), - UNIQUE (is_default) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + registry VARCHAR(255) NOT NULL DEFAULT 'docker.io', + name VARCHAR(255) NOT NULL, + version VARCHAR(255) NOT NULL, + DEFAULT_port INT NOT NULL, + dialect VARCHAR(255) NOT NULL, + driver_class VARCHAR(255) NOT NULL, + jdbc_method VARCHAR(255) NOT NULL, + is_DEFAULT BOOLEAN NOT NULL DEFAULT FALSE, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE (`name`, `version`), + UNIQUE (`is_DEFAULT`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_containers` ( - id SERIAL, - internal_name character varying(255) NOT NULL, - name character varying(255) NOT NULL, - host character varying(255) NOT NULL, - port integer NOT NULL default 3306, - ui_host character varying(255) NOT NULL default host, - ui_port integer NOT NULL default port, - ui_additional_flags text, - sidecar_host character varying(255), - sidecar_port integer, - image_id bigint NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - privileged_username character varying(255) NOT NULL, - privileged_password character varying(255) NOT NULL, - quota integer NOT NULL DEFAULT 50, - PRIMARY KEY (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_data` -( - ID SERIAL, - PROVENANCE text, - FileEncoding text, - FileType character varying(100), - Version text, - Seperator text, - PRIMARY KEY (ID) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + internal_name VARCHAR(255) NOT NULL, + name VARCHAR(255) NOT NULL, + host VARCHAR(255) NOT NULL, + port INT NOT NULL DEFAULT 3306, + ui_host VARCHAR(255) NOT NULL DEFAULT host, + ui_port INT NOT NULL DEFAULT port, + ui_additional_flags TEXT, + image_id VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + privileged_username VARCHAR(255) NOT NULL, + privileged_password VARCHAR(255) NOT NULL, + quota INT, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES mdb_images (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_licenses` ( - identifier character varying(255) NOT NULL, - uri text NOT NULL, - description text NOT NULL, - PRIMARY KEY (identifier), + identifier VARCHAR(255) NOT NULL, + uri TEXT NOT NULL, + description TEXT NOT NULL, + PRIMARY KEY (`identifier`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_databases` ( - id SERIAL, - cid BIGINT UNSIGNED NOT NULL, - name character varying(255) NOT NULL, - internal_name character varying(255) NOT NULL, - exchange_name character varying(255) NOT NULL, - description text, - engine character varying(20), - is_public boolean NOT NULL DEFAULT TRUE, - is_schema_public boolean NOT NULL DEFAULT TRUE, - image longblob, - owned_by character varying(36), - contact_person character varying(36), - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - PRIMARY KEY (id), - FOREIGN KEY (cid) REFERENCES mdb_containers (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id), - FOREIGN KEY (contact_person) REFERENCES mdb_users (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_databases_subjects` -( - dbid BIGINT NOT NULL, - subjects character varying(255) NOT NULL, - PRIMARY KEY (dbid, subjects) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cid VARCHAR(36) NOT NULL, + name VARCHAR(255) NOT NULL, + internal_name VARCHAR(255) NOT NULL, + exchange_name VARCHAR(255) NOT NULL, + description TEXT, + engine VARCHAR(20), + is_public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + image LONGBLOB, + owned_by VARCHAR(36) NOT NULL, + contact_person VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + PRIMARY KEY (`id`), + FOREIGN KEY (`cid`) REFERENCES mdb_containers (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`), + FOREIGN KEY (`contact_person`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_tables` ( - ID SERIAL, - tDBID BIGINT UNSIGNED NOT NULL, - tName VARCHAR(64) NOT NULL, - internal_name VARCHAR(64) NOT NULL, - queue_name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tDBID VARCHAR(36) NOT NULL, + tName VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, + queue_name VARCHAR(255) NOT NULL, routing_key VARCHAR(255), tDescription VARCHAR(2048), num_rows BIGINT, data_length BIGINT, max_data_length BIGINT, avg_row_length BIGINT, - `separator` CHAR(1), - quote CHAR(1), - element_null VARCHAR(50), - skip_lines BIGINT, - element_true VARCHAR(50), - element_false VARCHAR(50), - Version TEXT, - created timestamp NOT NULL DEFAULT NOW(), - versioned boolean not null default true, - is_public boolean not null default true, - is_schema_public boolean not null default true, - owned_by character varying(36) NOT NULL, - last_modified timestamp, - PRIMARY KEY (ID), - UNIQUE (tDBID, internal_name), - FOREIGN KEY (tDBID) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) + created TIMESTAMP NOT NULL DEFAULT NOW(), + versioned BOOLEAN NOT NULL DEFAULT TRUE, + is_public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + owned_by VARCHAR(36) NOT NULL DEFAULT UUID(), + last_modified TIMESTAMP, + PRIMARY KEY (`ID`), + UNIQUE (`tDBID`, `internal_name`), + FOREIGN KEY (`tDBID`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns` ( - ID SERIAL, - tID BIGINT UNSIGNED NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tID VARCHAR(36) NOT NULL, cName VARCHAR(64), internal_name VARCHAR(64) NOT NULL, Datatype ENUM ('CHAR','VARCHAR','BINARY','VARBINARY','TINYBLOB','TINYTEXT','TEXT','BLOB','MEDIUMTEXT','MEDIUMBLOB','LONGTEXT','LONGBLOB','ENUM','SET','SERIAL','BIT','TINYINT','BOOL','SMALLINT','MEDIUMINT','INT','BIGINT','FLOAT','DOUBLE','DECIMAL','DATE','DATETIME','TIMESTAMP','TIME','YEAR'), length BIGINT UNSIGNED NULL, - ordinal_position INTEGER NOT NULL, + ordinal_position INT NOT NULL, index_length BIGINT UNSIGNED NULL, description VARCHAR(2048), size BIGINT UNSIGNED, d BIGINT UNSIGNED, - is_null_allowed BOOLEAN NOT NULL DEFAULT true, + is_null_allowed BOOLEAN NOT NULL DEFAULT TRUE, val_min NUMERIC NULL, val_max NUMERIC NULL, mean NUMERIC NULL, median NUMERIC NULL, std_dev Numeric NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - FOREIGN KEY (tID) REFERENCES mdb_tables (ID) ON DELETE CASCADE, - PRIMARY KEY (ID), - UNIQUE (tID, internal_name) + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + FOREIGN KEY (`tID`) REFERENCES mdb_tables (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`ID`), + UNIQUE (`tID`, `internal_name`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_enums` ( - id SERIAL, - column_id BIGINT UNSIGNED NOT NULL, - value CHARACTER VARYING(255) NOT NULL, - FOREIGN KEY (column_id) REFERENCES mdb_columns (ID) ON DELETE CASCADE, - PRIMARY KEY (id) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + column_id VARCHAR(36) NOT NULL, + value VARCHAR(255) NOT NULL, + FOREIGN KEY (`column_id`) REFERENCES mdb_columns (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_sets` ( - id SERIAL, - column_id BIGINT UNSIGNED NOT NULL, - value CHARACTER VARYING(255) NOT NULL, - FOREIGN KEY (column_id) REFERENCES mdb_columns (ID) ON DELETE CASCADE, - PRIMARY KEY (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_columns_nom` -( - cID BIGINT UNSIGNED, - tID BIGINT UNSIGNED, - maxlength INTEGER, - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_columns_cat` -( - cID BIGINT UNSIGNED, - tID BIGINT UNSIGNED, - num_cat INTEGER, - -- cat_array TEXT[], - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + column_id VARCHAR(36) NOT NULL, + value VARCHAR(255) NOT NULL, + FOREIGN KEY (`column_id`) REFERENCES mdb_columns (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key` ( - fkid SERIAL, - tid BIGINT UNSIGNED NOT NULL, - rtid BIGINT UNSIGNED NOT NULL, - name VARCHAR(255) NOT NULL, - on_update VARCHAR(50) NULL, - on_delete VARCHAR(50) NULL, - position INT NULL, - PRIMARY KEY (fkid), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE, - FOREIGN KEY (rtid) REFERENCES mdb_tables (id) + fkid VARCHAR(36) NOT NULL DEFAULT UUID(), + tid VARCHAR(36) NOT NULL, + rtid VARCHAR(36) NOT NULL, + name VARCHAR(255) NOT NULL, + on_update VARCHAR(50) NULL, + on_delete VARCHAR(50) NULL, + position INT NULL, + PRIMARY KEY (`fkid`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE, + FOREIGN KEY (`rtid`) REFERENCES mdb_tables (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_primary_key` ( - pkid SERIAL, - tID BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (pkid), - FOREIGN KEY (tID) REFERENCES mdb_tables (id) ON DELETE CASCADE, - FOREIGN KEY (cid) REFERENCES mdb_columns (id) ON DELETE CASCADE + pkid VARCHAR(36) NOT NULL DEFAULT UUID(), + tID VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + PRIMARY KEY (`pkid`), + FOREIGN KEY (`tID`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE, + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key_reference` ( - id SERIAL, - fkid BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - rcid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (id), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + fkid VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + rcid VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), UNIQUE (fkid, cid, rcid), - FOREIGN KEY (fkid) REFERENCES mdb_constraints_foreign_key (fkid) ON UPDATE CASCADE, - FOREIGN KEY (cid) REFERENCES mdb_columns (id), - FOREIGN KEY (rcid) REFERENCES mdb_columns (id) + FOREIGN KEY (`fkid`) REFERENCES mdb_constraints_foreign_key (`fkid`) ON UPDATE CASCADE, + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`), + FOREIGN KEY (`rcid`) REFERENCES mdb_columns (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_unique` ( - uid SERIAL, - name VARCHAR(255) NOT NULL, - tid BIGINT UNSIGNED NOT NULL, - position INT NULL, - PRIMARY KEY (uid), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE + uid VARCHAR(36) NOT NULL DEFAULT UUID(), + name VARCHAR(255) NOT NULL, + tid VARCHAR(36) NOT NULL, + position INT NULL, + PRIMARY KEY (`uid`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS `mdb_constraints_unique_columns` ( - id SERIAL, - uid BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (uid) REFERENCES mdb_constraints_unique (uid), - FOREIGN KEY (cid) REFERENCES mdb_columns (id) ON DELETE CASCADE + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uid VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`uid`) REFERENCES mdb_constraints_unique (`uid`), + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_checks` ( - id SERIAL, - tid BIGINT UNSIGNED NOT NULL, - checks VARCHAR(255) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tid VARCHAR(36) NOT NULL, + checks VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_concepts` ( - id SERIAL, - uri text not null, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uri TEXT NOT NULL, name VARCHAR(255) null, description TEXT null, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (id), + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (`id`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_units` ( - id SERIAL, - uri text not null, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uri TEXT NOT NULL, name VARCHAR(255) null, description TEXT null, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (id), + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (`id`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_concepts` ( - id BIGINT UNSIGNED NOT NULL, - cID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cID VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (id, cid), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + FOREIGN KEY (`id`) REFERENCES mdb_concepts (`id`), + FOREIGN KEY (`cID`) REFERENCES mdb_columns (`ID`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_units` ( - id BIGINT UNSIGNED NOT NULL, - cID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cID VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (id, cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + FOREIGN KEY (id) REFERENCES mdb_units (id), + FOREIGN KEY (`cID`) REFERENCES mdb_columns (`ID`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_view` ( - id SERIAL, - vdbid BIGINT UNSIGNED NOT NULL, - vName VARCHAR(64) NOT NULL, - internal_name VARCHAR(64) NOT NULL, - Query TEXT NOT NULL, - query_hash VARCHAR(255) NOT NULL, - Public BOOLEAN NOT NULL DEFAULT TRUE, - is_schema_public boolean NOT NULL DEFAULT TRUE, - InitialView BOOLEAN NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - owned_by character varying(36) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (vdbid) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_banner_messages` -( - id SERIAL, - type ENUM ('ERROR', 'WARNING', 'INFO') NOT NULL default 'INFO', + id VARCHAR(36) NOT NULL DEFAULT UUID(), + vdbid VARCHAR(36) NOT NULL, + vName VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, + Query TEXT NOT NULL, + query_hash VARCHAR(255) NOT NULL, + Public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + InitialView BOOLEAN NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + owned_by VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE (`vdbid`, `internal_name`), + FOREIGN KEY (`vdbid`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`) +) WITH SYSTEM VERSIONING; + +CREATE TABLE IF NOT EXISTS `mdb_messages` +( + id VARCHAR(36) NOT NULL DEFAULT UUID(), + type ENUM ('ERROR', 'WARNING', 'INFO') NOT NULL DEFAULT 'INFO', message TEXT NOT NULL, link TEXT NULL, - link_text VARCHAR(255) NULL, - display_start timestamp NULL, - display_end timestamp NULL, - PRIMARY KEY (id) + link_TEXT VARCHAR(255) NULL, + display_start TIMESTAMP NULL, + display_end TIMESTAMP NULL, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_ontologies` ( - id SERIAL, - prefix VARCHAR(8) NOT NULL, - uri TEXT NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + prefix VARCHAR(8) NOT NULL, + uri TEXT NOT NULL, uri_pattern TEXT, - sparql_endpoint TEXT NULL, - rdf_path TEXT NULL, - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - UNIQUE (prefix), + sparql_endpoint TEXT NULL, + rdf_path TEXT NULL, + last_modified TIMESTAMP, + created TIMESTAMP NOT NULL DEFAULT NOW(), + UNIQUE (`prefix`), UNIQUE (uri(200)), - PRIMARY KEY (id) + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_view_columns` ( - id SERIAL, - view_id BIGINT UNSIGNED NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + view_id VARCHAR(36) NOT NULL, name VARCHAR(64), - internal_name VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, column_type ENUM ('CHAR','VARCHAR','BINARY','VARBINARY','TINYBLOB','TINYTEXT','TEXT','BLOB','MEDIUMTEXT','MEDIUMBLOB','LONGTEXT','LONGBLOB','ENUM','SET','BIT','TINYINT','BOOL','SMALLINT','MEDIUMINT','INT','BIGINT','FLOAT','DOUBLE','DECIMAL','DATE','DATETIME','TIMESTAMP','TIME','YEAR'), - ordinal_position INTEGER NOT NULL, + ordinal_position INT NOT NULL, size BIGINT UNSIGNED, d BIGINT UNSIGNED, - is_null_allowed BOOLEAN NOT NULL DEFAULT true, - PRIMARY KEY (id), - FOREIGN KEY (view_id) REFERENCES mdb_view (id) ON DELETE CASCADE, + is_null_allowed BOOLEAN NOT NULL DEFAULT TRUE, + PRIMARY KEY (`id`), + FOREIGN KEY (`view_id`) REFERENCES mdb_view (`id`) ON DELETE CASCADE, UNIQUE (view_id, internal_name) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifiers` ( - id SERIAL, - dbid BIGINT UNSIGNED NOT NULL, - qid BIGINT UNSIGNED, - vid BIGINT UNSIGNED, - tid BIGINT UNSIGNED, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + dbid VARCHAR(36) NOT NULL, + qid VARCHAR(36), + vid VARCHAR(36), + tid VARCHAR(36), publisher VARCHAR(255) NOT NULL, language VARCHAR(2), - publication_year INTEGER NOT NULL, - publication_month INTEGER, - publication_day INTEGER, + publication_year INT NOT NULL, + publication_month INT, + publication_day INT, identifier_type ENUM ('DATABASE', 'SUBSET', 'VIEW', 'TABLE') NOT NULL, status ENUM ('DRAFT', 'PUBLISHED') NOT NULL DEFAULT ('PUBLISHED'), query TEXT, @@ -398,154 +352,150 @@ CREATE TABLE IF NOT EXISTS `mdb_identifiers` created TIMESTAMP NOT NULL DEFAULT NOW(), owned_by VARCHAR(36) NOT NULL, last_modified TIMESTAMP, - PRIMARY KEY (id), /* must be a single id from persistent identifier concept */ - FOREIGN KEY (dbid) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) + PRIMARY KEY (`id`), /* must be a single id from persistent identifier concept */ + FOREIGN KEY (`dbid`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`), + FOREIGN KEY (`vid`) REFERENCES mdb_view (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_licenses` ( - pid BIGINT UNSIGNED NOT NULL, - license_id VARCHAR(255) NOT NULL, + pid VARCHAR(36) NOT NULL DEFAULT UUID(), + license_id VARCHAR(255) NOT NULL, PRIMARY KEY (pid, license_id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id), - FOREIGN KEY (license_id) REFERENCES mdb_licenses (identifier) + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`), + FOREIGN KEY (`license_id`) REFERENCES mdb_licenses (`identifier`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_titles` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - title text NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + title TEXT NOT NULL, title_type ENUM ('ALTERNATIVE_TITLE', 'SUBTITLE', 'TRANSLATED_TITLE', 'OTHER'), language VARCHAR(2), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_funders` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - funder_name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + funder_name VARCHAR(255) NOT NULL, funder_identifier TEXT, funder_identifier_type ENUM ('CROSSREF_FUNDER_ID', 'GRID', 'ISNI', 'ROR', 'OTHER'), - scheme_uri text, + scheme_uri TEXT, award_number VARCHAR(255), - award_title text, + award_title TEXT, language VARCHAR(255), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_descriptions` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - description text NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + description TEXT NOT NULL, description_type ENUM ('ABSTRACT', 'METHODS', 'SERIES_INFORMATION', 'TABLE_OF_CONTENTS', 'TECHNICAL_INFO', 'OTHER'), language VARCHAR(2), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; -CREATE TABLE IF NOT EXISTS `mdb_related_identifiers` +CREATE TABLE IF NOT EXISTS `mdb_identifier_related` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - value varchar(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL DEFAULT UUID(), + value VARCHAR(255) NOT NULL, type ENUM ('DOI','URL','URN','ARK','ARXIV','BIBCODE','EAN13','EISSN','HANDLE','IGSN','ISBN','ISTC','LISSN','LSID','PMID','PURL','UPC','W3ID') NOT NULL, relation ENUM ('IS_CITED_BY','CITES','IS_SUPPLEMENT_TO','IS_SUPPLEMENTED_BY','IS_CONTINUED_BY','CONTINUES','IS_DESCRIBED_BY','DESCRIBES','HAS_METADATA','IS_METADATA_FOR','HAS_VERSION','IS_VERSION_OF','IS_NEW_VERSION_OF','IS_PREVIOUS_VERSION_OF','IS_PART_OF','HAS_PART','IS_PUBLISHED_IN','IS_REFERENCED_BY','REFERENCES','IS_DOCUMENTED_BY','DOCUMENTS','IS_COMPILED_BY','COMPILES','IS_VARIANT_FORM_OF','IS_ORIGINAL_FORM_OF','IS_IDENTICAL_TO','IS_REVIEWED_BY','REVIEWS','IS_DERIVED_FROM','IS_SOURCE_OF','IS_REQUIRED_BY','REQUIRES','IS_OBSOLETED_BY','OBSOLETES') NOT NULL, - PRIMARY KEY (id), /* must be a single id from persistent identifier concept */ - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id), + PRIMARY KEY (`id`), /* must be a single id from persistent identifier concept */ + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`), UNIQUE (pid, value) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_creators` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - given_names text, - family_name text, - creator_name VARCHAR(255) NOT NULL, - name_type ENUM ('PERSONAL', 'ORGANIZATIONAL') default 'PERSONAL', - name_identifier text, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + given_names TEXT, + family_name TEXT, + creator_name VARCHAR(255) NOT NULL, + name_type ENUM ('PERSONAL', 'ORGANIZATIONAL') DEFAULT 'PERSONAL', + name_identifier TEXT, name_identifier_scheme ENUM ('ROR', 'GRID', 'ISNI', 'ORCID'), - name_identifier_scheme_uri text, + name_identifier_scheme_uri TEXT, affiliation VARCHAR(255), - affiliation_identifier text, + affiliation_identifier TEXT, affiliation_identifier_scheme ENUM ('ROR', 'GRID', 'ISNI'), - affiliation_identifier_scheme_uri text, - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_update` -( - uUserID character varying(255) NOT NULL, - uDBID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (uUserID, uDBID), - FOREIGN KEY (uDBID) REFERENCES mdb_databases (id) + affiliation_identifier_scheme_uri TEXT, + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_access` ( - aUserID character varying(255) NOT NULL, - aDBID BIGINT UNSIGNED REFERENCES mdb_databases (id), + aUserID VARCHAR(255) NOT NULL, + aDBID VARCHAR(36) NOT NULL, attime TIMESTAMP, download BOOLEAN, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (aUserID, aDBID) + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (aUserID, aDBID), + FOREIGN KEY (`aDBID`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`aUserID`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_have_access` ( - user_id character varying(36) NOT NULL, - database_id BIGINT UNSIGNED REFERENCES mdb_databases (id), + user_id VARCHAR(36) NOT NULL, + database_id VARCHAR(36) NOT NULL, access_type ENUM ('READ', 'WRITE_OWN', 'WRITE_ALL') NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (user_id, database_id), - FOREIGN KEY (user_id) REFERENCES mdb_users (id) + FOREIGN KEY (`database_id`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`user_id`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_image_types` ( - id SERIAL, - image_id BIGINT UNSIGNED NOT NULL, - display_name varchar(255) NOT NULL, - value varchar(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + image_id VARCHAR(36) NOT NULL, + display_name VARCHAR(255) NOT NULL, + value VARCHAR(255) NOT NULL, size_min INT UNSIGNED, size_max INT UNSIGNED, - size_default INT UNSIGNED, - size_required BOOLEAN COMMENT 'When setting NULL, the service assumes the data type has no size', + size_DEFAULT INT UNSIGNED, + size_required BOOLEAN comment 'When setting NULL, the service assumes the data type has no size', size_step INT UNSIGNED, d_min INT UNSIGNED, d_max INT UNSIGNED, - d_default INT UNSIGNED, - d_required BOOLEAN COMMENT 'When setting NULL, the service assumes the data type has no d', + d_DEFAULT INT UNSIGNED, + d_required BOOLEAN comment 'When setting NULL, the service assumes the data type has no d', d_step INT UNSIGNED, type_hint TEXT, data_hint TEXT, - documentation TEXT NOT NULL, - is_generated BOOLEAN NOT NULL, - is_quoted BOOLEAN NOT NULL, - is_buildable BOOLEAN NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (image_id) REFERENCES `mdb_images` (`id`), - UNIQUE (value) + documentation TEXT NOT NULL, + is_generated BOOLEAN NOT NULL, + is_quoted BOOLEAN NOT NULL, + is_buildable BOOLEAN NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES `mdb_images` (`id`), + UNIQUE (`value`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_image_operators` ( - id SERIAL, - image_id BIGINT UNSIGNED NOT NULL, - display_name varchar(255) NOT NULL, - value varchar(255) NOT NULL, - documentation TEXT NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (image_id) REFERENCES `mdb_images` (`id`), - UNIQUE (value) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + image_id VARCHAR(36) NOT NULL, + display_name VARCHAR(255) NOT NULL, + value VARCHAR(255) NOT NULL, + documentation TEXT NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES `mdb_images` (`id`), + UNIQUE (image_id, value) ) WITH SYSTEM VERSIONING; COMMIT; @@ -558,110 +508,103 @@ VALUES ('CC0-1.0', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode' ('CC-BY-4.0', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited.'); -INSERT INTO `mdb_images` (name, registry, version, default_port, dialect, driver_class, jdbc_method) -VALUES ('mariadb', 'docker.io', '11.1.3', 3306, 'org.hibernate.dialect.MariaDBDialect', 'org.mariadb.jdbc.Driver', - 'mariadb'); +INSERT INTO `mdb_images` (id, name, registry, version, DEFAULT_port, dialect, driver_class, jdbc_method) +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'mariadb', 'docker.io', '11.1.3', 3306, + 'org.hibernate.dialect.MariaDBDialect', 'org.mariadb.jdbc.Driver', 'mariadb'); -INSERT INTO `mdb_image_types` (image_id, display_name, value, size_min, size_max, size_default, size_required, - size_step, d_min, d_max, d_default, d_required, d_step, type_hint, data_hint, +INSERT INTO `mdb_image_types` (image_id, display_name, value, size_min, size_max, size_DEFAULT, size_required, + size_step, d_min, d_max, d_DEFAULT, d_required, d_step, type_hint, data_hint, documentation, is_quoted, is_buildable, is_generated) -VALUES (1, 'BIGINT(size)', 'bigint', 0, null, null, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bigint/', false, true, false), - (1, 'BINARY(size)', 'binary', 0, 255, 255, true, 1, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/binary/', false, true, false), - (1, 'BIT(size)', 'bit', 0, 64, null, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bit/', false, true, false), - (1, 'BLOB(size)', 'blob', 0, 65535, null, false, 1, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/blob/', false, false, false), - (1, 'BOOL', 'bool', null, null, null, null, null, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bool/', false, true, false), - (1, 'CHAR(size)', 'char', 0, 255, 255, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/char/', false, true, false), - (1, 'DATE', 'date', null, null, null, null, null, null, null, null, null, null, - 'min. 1000-01-01, max. 9999-12-31', 'e.g. YYYY-MM-DD, YY-MM-DD, YYMMDD, YYYY/MM/DD', - 'https://mariadb.com/kb/en/date/', true, true, false), - (1, 'DATETIME(fsp)', 'datetime', 0, 6, null, null, 1, null, null, null, null, null, - 'fsp=microsecond precision, min. 1000-01-01 00:00:00.0, max. 9999-12-31 23:59:59.9', +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BIGINT(size)', 'bigint', 0, null, null, FALSE, 1, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/bigint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BINARY(size)', 'binary', 0, 255, 255, TRUE, 1, null, null, null, null, + null, 'size in Bytes', null, 'https://mariadb.com/kb/en/binary/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BIT(size)', 'bit', 0, 64, null, FALSE, 1, null, null, null, null, null, + null, null, 'https://mariadb.com/kb/en/bit/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BLOB(size)', 'blob', 0, 65535, null, FALSE, 1, null, null, null, null, + null, 'size in Bytes', null, 'https://mariadb.com/kb/en/blob/', FALSE, FALSE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BOOL', 'bool', null, null, null, null, null, null, null, null, null, + null, null, null, 'https://mariadb.com/kb/en/bool/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'CHAR(size)', 'char', 0, 255, 255, FALSE, 1, null, null, null, null, + null, null, null, 'https://mariadb.com/kb/en/char/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DATE', 'date', null, null, null, null, null, null, null, null, null, + null, 'min. 1000-01-01, max. 9999-12-31', 'e.g. YYYY-MM-DD, YY-MM-DD, YYMMDD, YYYY/MM/DD', + 'https://mariadb.com/kb/en/date/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DATETIME(fsp)', 'datetime', 0, 6, null, null, 1, null, null, null, + null, null, 'fsp=microsecond precision, min. 1000-01-01 00:00:00.0, max. 9999-12-31 23:59:59.9', 'e.g. YYYY-MM-DD HH:MM:SS, YY-MM-DD HH:MM:SS, YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, YYMMDD', - 'https://mariadb.com/kb/en/datetime/', true, true, false), - (1, 'DECIMAL(size, d)', 'decimal', 0, 65, null, false, 1, 0, 38, null, false, null, null, null, - 'https://mariadb.com/kb/en/decimal/', false, true, false), - (1, 'DOUBLE(size, d)', 'double', null, null, null, false, null, null, null, null, false, null, null, null, - 'https://mariadb.com/kb/en/double/', false, true, false), - (1, 'ENUM(v1,v2,...)', 'enum', null, null, null, null, null, null, null, null, null, null, null, - 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/enum/', true, true, false), - (1, 'FLOAT(size)', 'float', null, null, null, false, null, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/float/', false, true, false), - (1, 'INT(size)', 'int', null, null, null, false, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/int/', false, true, false), - (1, 'LONGBLOB', 'longblob', null, null, null, null, null, null, null, null, null, null, 'max. 3.999 GiB', null, - 'https://mariadb.com/kb/en/longblob/', false, true, false), - (1, 'LONGTEXT', 'longtext', null, null, null, null, null, null, null, null, null, null, 'max. 3.999 GiB', null, - 'https://mariadb.com/kb/en/longtext/', true, true, false), - (1, 'MEDIUMBLOB', 'mediumblob', null, null, null, null, null, null, null, null, null, null, 'max. 15.999 MiB', - null, 'https://mariadb.com/kb/en/mediumblob/', false, true, false), - (1, 'MEDIUMINT', 'mediumint', null, null, null, null, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/mediumint/', false, true, false), - (1, 'MEDIUMTEXT', 'mediumtext', null, null, null, null, null, null, null, null, null, null, 'size in Bytes', - null, 'https://mariadb.com/kb/en/mediumtext/', true, true, false), - (1, 'SERIAL', 'serial', null, null, null, null, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/bigint/', true, true, true), - (1, 'SET(v1,v2,...)', 'set', null, null, null, null, null, null, null, null, null, null, null, - 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/set/', true, true, false), - (1, 'SMALLINT(size)', 'smallint', 0, null, null, false, null, null, null, null, null, null, 'size in Bytes', - null, 'https://mariadb.com/kb/en/smallint/', false, true, false), - (1, 'TEXT(size)', 'text', 0, null, null, false, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/text/', true, true, false), - (1, 'TIME(fsp)', 'time', 0, 6, 0, false, null, null, null, null, null, null, + 'https://mariadb.com/kb/en/datetime/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DECIMAL(size, d)', 'decimal', 0, 65, null, FALSE, 1, 0, 38, null, + FALSE, null, null, null, 'https://mariadb.com/kb/en/decimal/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DOUBLE(size, d)', 'double', null, null, null, FALSE, null, null, null, + null, FALSE, null, null, null, 'https://mariadb.com/kb/en/double/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'ENUM(v1,v2,...)', 'enum', null, null, null, null, null, null, null, + null, null, null, null, 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/enum/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'FLOAT(size)', 'float', null, null, null, FALSE, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/float/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'INT(size)', 'int', null, null, null, FALSE, null, null, null, null, + null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/int/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LONGBLOB', 'longblob', null, null, null, null, null, null, null, null, + null, null, 'max. 3.999 GiB', null, 'https://mariadb.com/kb/en/longblob/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LONGTEXT', 'longtext', null, null, null, null, null, null, null, null, + null, null, 'max. 3.999 GiB', null, 'https://mariadb.com/kb/en/longtext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMBLOB', 'mediumblob', null, null, null, null, null, null, null, + null, null, null, 'max. 15.999 MiB', null, 'https://mariadb.com/kb/en/mediumblob/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMINT', 'mediumint', null, null, null, null, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/mediumint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMTEXT', 'mediumtext', null, null, null, null, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/mediumtext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SERIAL', 'serial', null, null, null, null, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/bigint/', TRUE, TRUE, TRUE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SET(v1,v2,...)', 'set', null, null, null, null, null, null, null, null, + null, null, null, 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/set/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SMALLINT(size)', 'smallint', 0, null, null, FALSE, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/smallint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TEXT(size)', 'text', 0, null, null, FALSE, null, null, null, null, + null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/text/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TIME(fsp)', 'time', 0, 6, 0, FALSE, null, null, null, null, null, null, 'fsp=microsecond precision, min. 0, max. 6', 'e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S', - 'https://mariadb.com/kb/en/time/', true, true, false), - (1, 'TIMESTAMP(fsp)', 'timestamp', 0, 6, 0, false, null, null, null, null, null, null, - 'fsp=microsecond precision, min. 0, max. 6', + 'https://mariadb.com/kb/en/time/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TIMESTAMP(fsp)', 'timestamp', 0, 6, 0, FALSE, null, null, null, null, + null, null, 'fsp=microsecond precision, min. 0, max. 6', 'e.g. YYYY-MM-DD HH:MM:SS, YY-MM-DD HH:MM:SS, YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, YYMMDD', - 'https://mariadb.com/kb/en/timestamp/', true, true, false), - (1, 'TINYBLOB', 'tinyblob', null, null, null, null, null, null, null, null, null, null, null, - 'fsp=microsecond precision, min. 0, max. 6', 'https://mariadb.com/kb/en/timestamp/', false, true, false), - (1, 'TINYINT(size)', 'tinyint', 0, null, null, false, null, null, null, null, null, null, null, - 'size in Bytes', 'https://mariadb.com/kb/en/tinyint/', false, true, false), - (1, 'TINYTEXT', 'tinytext', null, null, null, null, null, null, null, null, null, null, null, - 'max. 255 characters', 'https://mariadb.com/kb/en/tinytext/', true, true, false), - (1, 'YEAR', 'year', 2, 4, null, false, 2, null, null, null, null, null, 'min. 1901, max. 2155', 'e.g. YYYY, YY', - 'https://mariadb.com/kb/en/year/', false, true, false), - (1, 'VARBINARY(size)', 'varbinary', 0, null, null, true, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/varbinary/', false, true, false), - (1, 'VARCHAR(size)', 'varchar', 0, 65532, 255, true, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/varchar/', false, true, false); + 'https://mariadb.com/kb/en/timestamp/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYBLOB', 'tinyblob', null, null, null, null, null, null, null, null, + null, null, null, 'fsp=microsecond precision, min. 0, max. 6', 'https://mariadb.com/kb/en/timestamp/', FALSE, + TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYINT(size)', 'tinyint', 0, null, null, FALSE, null, null, null, + null, null, null, null, 'size in Bytes', 'https://mariadb.com/kb/en/tinyint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYTEXT', 'tinytext', null, null, null, null, null, null, null, null, + null, null, null, 'max. 255 characters', 'https://mariadb.com/kb/en/tinytext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'YEAR', 'year', 2, 4, null, FALSE, 2, null, null, null, null, null, + 'min. 1901, max. 2155', 'e.g. YYYY, YY', 'https://mariadb.com/kb/en/year/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'VARBINARY(size)', 'varbinary', 0, null, null, TRUE, null, null, null, + null, null, null, null, null, 'https://mariadb.com/kb/en/varbinary/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'VARCHAR(size)', 'varchar', 0, 65532, 255, TRUE, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/varchar/', FALSE, TRUE, FALSE); + INSERT INTO `mdb_image_operators` (image_id, display_name, value, documentation) -VALUES (1, 'Equal operator', '=', 'https://mariadb.com/kb/en/assignment-operators-assignment-operator/'), - (1, 'NULL-safe equal operator', '<=>', 'https://mariadb.com/kb/en/null-safe-equal/'), - (1, 'Less-than operator', '<', 'https://mariadb.com/kb/en/less-than/'), - (1, 'Less than or equal operator', '<=', 'https://mariadb.com/kb/en/less-than-or-equal/'), - (1, 'Greater-than operator', '>', 'https://mariadb.com/kb/en/greater-than/'), - (1, 'Greater than or equal operator', '>=', 'https://mariadb.com/kb/en/greater-than-or-equal/'), - (1, 'Not equal operator', '!=', 'https://mariadb.com/kb/en/not-equal/'), - (1, 'Addition operator', '+', 'https://mariadb.com/kb/en/addition-operator/'), - (1, 'Division operator', '/', 'https://mariadb.com/kb/en/division-operator/'), - (1, 'Modulo operator', '%', 'https://mariadb.com/kb/en/modulo-operator/'), - (1, 'Multiplication operator', '*', 'https://mariadb.com/kb/en/multiplication-operator/'), - (1, 'Subtraction operator', '-', 'https://mariadb.com/kb/en/subtraction-operator-/'), - (1, 'LIKE', 'LIKE', 'https://mariadb.com/kb/en/like/'), - (1, 'NOT LIKE', 'NOT LIKE', 'https://mariadb.com/kb/en/not-like/'), - (1, 'IN', 'IN', 'https://mariadb.com/kb/en/in/'), - (1, 'NOT IN', 'NOT IN', 'https://mariadb.com/kb/en/not-in/'), - (1, 'IS', 'IS', 'https://mariadb.com/kb/en/is/'), - (1, 'IS NOT', 'IS NOT', 'https://mariadb.com/kb/en/is-not/'), - (1, 'IS NOT NULL', 'IS NOT NULL', 'https://mariadb.com/kb/en/is-not-null/'), - (1, 'IS NULL', 'IS NULL', 'https://mariadb.com/kb/en/is-null/'), - (1, 'ISNULL', 'ISNULL', 'https://mariadb.com/kb/en/isnull/'), - (1, 'REGEXP', 'REGEXP', 'https://mariadb.com/kb/en/regexp/'), - (1, 'NOT REGEXP', 'NOT REGEXP', 'https://mariadb.com/kb/en/not-regexp/'), - (1, 'Bitwise AND', '&', 'https://mariadb.com/kb/en/bitwise_and/'), - (1, 'Bitwise OR', '|', 'https://mariadb.com/kb/en/bitwise-or/'), - (1, 'Bitwise XOR', '^', 'https://mariadb.com/kb/en/bitwise-xor/'), - (1, 'Bitwise NOT', '~', 'https://mariadb.com/kb/en/bitwise-not/'), - (1, 'Left shift', '<<', 'https://mariadb.com/kb/en/shift-left/'), - (1, 'Right shift', '>>', 'https://mariadb.com/kb/en/shift-right/'); +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Equal operator', '=', + 'https://mariadb.com/kb/en/assignment-operators-assignment-operator/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NULL-safe equal operator', '<=>', + 'https://mariadb.com/kb/en/null-safe-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Less-than operator', '<', 'https://mariadb.com/kb/en/less-than/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Less than or equal operator', '<=', + 'https://mariadb.com/kb/en/less-than-or-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Greater-than operator', '>', + 'https://mariadb.com/kb/en/greater-than/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Greater than or equal operator', '>=', + 'https://mariadb.com/kb/en/greater-than-or-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Not equal operator', '!=', 'https://mariadb.com/kb/en/not-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LIKE', 'LIKE', 'https://mariadb.com/kb/en/like/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT LIKE', 'NOT LIKE', 'https://mariadb.com/kb/en/not-like/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IN', 'IN', 'https://mariadb.com/kb/en/in/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT IN', 'NOT IN', 'https://mariadb.com/kb/en/not-in/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IS NOT NULL', 'IS NOT NULL', 'https://mariadb.com/kb/en/is-not-null/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IS NULL', 'IS NULL', 'https://mariadb.com/kb/en/is-null/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'REGEXP', 'REGEXP', 'https://mariadb.com/kb/en/regexp/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT REGEXP', 'NOT REGEXP', 'https://mariadb.com/kb/en/not-regexp/'); INSERT INTO `mdb_ontologies` (prefix, uri, uri_pattern, sparql_endpoint, rdf_path) diff --git a/dbrepo-metadata-db/2_setup-data.sql b/dbrepo-metadata-db/2_setup-data.sql index e806e1e181dbdcc3f0e4e29f837bffac7123317c..dc4917cd8bd1ce95be2159bb225b1524383081e7 100644 --- a/dbrepo-metadata-db/2_setup-data.sql +++ b/dbrepo-metadata-db/2_setup-data.sql @@ -1,8 +1,8 @@ BEGIN; -INSERT INTO `mdb_containers` (name, internal_name, image_id, host, port, ui_host, ui_port, sidecar_host, sidecar_port, - privileged_username, privileged_password) -VALUES ('mariadb:11.1.3-debian-11-r6', 'mariadb_11_1_3', 1, 'data-db', 3306, 'localhost', 3306, 'data-db-sidecar', 8080, - 'root', 'dbrepo'); +INSERT INTO `mdb_containers` (id, name, internal_name, image_id, host, port, ui_host, ui_port, privileged_username, + privileged_password) +VALUES ('6cfb3b8e-1792-4e46-871a-f3d103527203', 'mariadb:11.1.3-debian-11-r6', 'mariadb_11_1_3', + 'd79cb089-363c-488b-9717-649e44d8fcc5', 'data-db', 3306, 'localhost', 3306, 'root', 'dbrepo'); COMMIT; diff --git a/dbrepo-metadata-db/migration/16/data.py b/dbrepo-metadata-db/migration/16/data.py new file mode 100644 index 0000000000000000000000000000000000000000..fe627c2befe1ddb99ee176778e8b41cdcde6cd1f --- /dev/null +++ b/dbrepo-metadata-db/migration/16/data.py @@ -0,0 +1,210 @@ +#!/usr/bin/env python3 +import os +import uuid + +from dbrepo.RestClient import RestClient + +endpoint = os.getenv('METADATA_SERVICE_ENDPOINT', 'https://dbrepo1.ec.tuwien.ac.at') +username = os.getenv('SYSTEM_USERNAME', 'admin') +password = os.getenv('SYSTEM_PASSWORD', 'f24870437f82adf567c0b03179f15e21') +client = RestClient(endpoint=endpoint, username=username, password=password) + +plan: [str] = [] + + +def update_concepts() -> None: + plan.append("-- concepts") + plan.append("BEGIN;") + for concept in client.get_concepts(): + old_id: int = concept.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_columns_concepts SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append(f"UPDATE mdb_concepts SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append("COMMIT;") + + +def update_ontologies() -> None: + plan.append("-- ontologies") + plan.append("BEGIN;") + for ontology in client.get_ontologies(): + old_id = ontology.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_ontologies SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append("COMMIT;") + + +def update_units() -> None: + plan.append("-- units") + plan.append("BEGIN;") + for unit in client.get_units(): + old_id: int = unit.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_columns_units SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append(f"UPDATE mdb_units SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append("COMMIT;") + + +def update_images() -> None: + plan.append("-- images") + plan.append("BEGIN;") + for _image in client.get_images(): + old_id: int = _image.id + image = client.get_image(old_id) + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_images SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append(f"UPDATE mdb_image_operators SET image_id = '{new_id}' WHERE image_id = '{old_id}';") + plan.append(f"UPDATE mdb_image_types SET image_id = '{new_id}' WHERE image_id = '{old_id}';") + plan.append(f"UPDATE mdb_containers SET image_id = '{new_id}' WHERE image_id = '{old_id}';") + for operator in image.operators: + o_old_id: int = operator.id + o_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_image_operators SET id = '{o_new_id}' WHERE id = '{o_old_id}';") + for data_type in image.data_types: + d_old_id: int = data_type.id + d_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_image_types SET id = '{d_new_id}' WHERE id = '{d_old_id}';") + plan.append("COMMIT;") + + +def update_containers() -> None: + plan.append("-- containers") + plan.append("BEGIN;") + for containers in client.get_containers(): + old_id: int = containers.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_containers SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append(f"UPDATE mdb_databases SET cid = '{new_id}' WHERE cid = '{old_id}';") + plan.append("COMMIT;") + + +def update_databases() -> None: + plan.append("-- databases") + plan.append("BEGIN;") + for _database in client.get_databases(): + database = client.get_database(database_id=_database.id) + old_id: int = database.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_tables SET tDBID = '{new_id}' WHERE tDBID = '{old_id}';") + plan.append(f"UPDATE mdb_have_access SET database_id = '{new_id}' WHERE database_id = '{old_id}';") + plan.append(f"UPDATE mdb_view SET vdbid = '{new_id}' WHERE vdbid = '{old_id}';") + plan.append(f"UPDATE mdb_identifiers SET dbid = '{new_id}' WHERE dbid = '{old_id}';") + plan.append(f"UPDATE mdb_access SET aDBID = '{new_id}' WHERE aDBID = '{old_id}';") + for view in database.views: + v_old_id: int = view.id + v_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifiers SET vid = '{v_new_id}' WHERE vid = '{v_old_id}';") + plan.append(f"UPDATE mdb_view_columns SET id = UUID(), view_id = '{v_new_id}' WHERE id = '{v_old_id}';") + for table in database.tables: + tbl_old_id: int = table.id + tbl_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifiers SET tid = '{tbl_new_id}' WHERE tid = '{tbl_old_id}';") + plan.append(f"UPDATE mdb_columns SET tID = '{tbl_new_id}' WHERE tID = '{tbl_old_id}';") + plan.append(f"UPDATE mdb_constraints_primary_key SET pkid = UUID(), tID = '{tbl_new_id}' WHERE tID = '{tbl_old_id}';") + plan.append(f"UPDATE mdb_constraints_unique SET tid = '{tbl_new_id}' WHERE tid = '{tbl_old_id}';") + plan.append( + f"UPDATE mdb_constraints_checks SET id = UUID(), tid = '{tbl_new_id}' WHERE tid = '{tbl_old_id}';") + for fk in table.constraints.foreign_keys: + fk_old_id: int = fk.id + fk_new_id: uuid = uuid.uuid4() + plan.append( + f"UPDATE mdb_constraints_foreign_key SET fkid = '{fk_new_id}', tid = '{tbl_new_id}' WHERE fkid = '{fk_old_id}';") + for fkref in fk.references: + fkref_old_id = fkref.id + plan.append( + f"UPDATE mdb_constraints_foreign_key_reference SET id = UUID(), fkid = '{fk_new_id}' WHERE fkid = '{fkref_old_id}';") + for pk in table.constraints.primary_key: + pk_old_id: int = pk.id + plan.append( + f"UPDATE mdb_constraints_primary_key SET pkid = UUID(), tID = '{tbl_new_id}' WHERE tID = {pk_old_id};") + for uk in table.constraints.uniques: + uk_old_id: int = uk.id + uk_new_id: uuid = uuid.uuid4() + plan.append( + f"UPDATE mdb_constraints_unique SET uid = '{uk_new_id}', tid = '{tbl_new_id}' WHERE uid = '{uk_old_id}';") + plan.append( + f"UPDATE mdb_constraints_unique_columns SET id = UUID(), uid = '{uk_new_id}' WHERE uid = '{uk_old_id}';") + for column in table.columns: + col_old_id: int = column.id + col_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_columns SET ID = '{col_new_id}' WHERE ID = '{col_old_id}';") + plan.append(f"UPDATE mdb_constraints_unique_columns SET cid = '{col_new_id}' WHERE cid = '{col_old_id}';") + plan.append(f"UPDATE mdb_constraints_primary_key SET cid = '{col_new_id}' WHERE cid = '{col_old_id}';") + plan.append( + f"UPDATE mdb_constraints_foreign_key_reference SET cid = '{col_new_id}' WHERE cid = '{col_old_id}';") + plan.append( + f"UPDATE mdb_constraints_foreign_key_reference SET rcid = '{col_new_id}' WHERE rcid = '{col_old_id}';") + plan.append(f"UPDATE mdb_columns_concepts SET cID = '{col_new_id}' WHERE cID = '{col_old_id}';") + plan.append(f"UPDATE mdb_columns_units SET cID = '{col_new_id}' WHERE cID = '{col_old_id}';") + plan.append(f"UPDATE mdb_columns_sets SET column_id = '{col_new_id}' WHERE column_id = '{col_old_id}';") + plan.append(f"UPDATE mdb_columns_enums SET column_id = '{col_new_id}' WHERE column_id = '{col_old_id}';") + for set in column.sets: + s_old_id: int = set.id + s_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_columns_sets SET id = '{s_new_id}' WHERE id = '{s_old_id}';") + for enum in column.enums: + e_old_id: int = enum.id + e_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_columns_enums SET id = '{e_new_id}' WHERE id = '{e_old_id}';") + plan.append(f"UPDATE mdb_tables SET ID = '{tbl_new_id}' WHERE ID = '{tbl_old_id}';") + plan.append(f"UPDATE mdb_databases SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append("COMMIT;") + + +def update_messages() -> None: + plan.append("-- messages") + plan.append("BEGIN;") + for message in client.get_messages(): + old_id = message.id + new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_messages SET id = '{new_id}' WHERE id = '{old_id}';") + plan.append("COMMIT;") + + +def update_identifiers() -> None: + plan.append("-- identifiers") + plan.append("BEGIN;") + for _identifier in client.get_identifiers(): + identifier = client.get_identifier(identifier_id=_identifier.id) + i_old_id: int = identifier.id + i_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifiers SET ID = '{i_new_id}' WHERE id = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_titles SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_descriptions SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_creators SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_funders SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + plan.append(f"UPDATE mdb_identifier_licenses SET pid = '{i_new_id}' WHERE pid = '{i_old_id}';") + for title in identifier.titles: + t_old_id = title.id + t_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifier_titles SET id = '{t_new_id}' WHERE id = '{t_old_id}';") + for description in identifier.descriptions: + d_old_id = description.id + d_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifier_descriptions SET id = '{d_new_id}' WHERE id = '{d_old_id}';") + for creator in identifier.creators: + c_old_id = creator.id + c_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifier_creators SET id = '{c_new_id}' WHERE id = '{c_old_id}';") + for funder in identifier.funders: + f_old_id = funder.id + f_new_id: uuid = uuid.uuid4() + plan.append(f"UPDATE mdb_identifier_funders SET id = '{f_new_id}' WHERE id = '{f_old_id}';") + plan.append("COMMIT;") + + +if __name__ == '__main__': + plan.append("SET FOREIGN_KEY_CHECKS=0;") + plan.append("BEGIN;") + plan.append(f"INSERT INTO mdb_have_access SELECT uu.id as user_id, d.id as database_id, 'WRITE_ALL' as access_type, NOW() as created FROM mdb_databases d, mdb_users uu WHERE NOT EXISTS(SELECT 1 FROM mdb_have_access a JOIN mdb_users u ON a.user_id = u.id AND u.is_internal = TRUE) AND uu.is_internal = TRUE;") + plan.append("COMMIT;") + update_concepts() + update_units() + update_messages() + update_ontologies() + update_images() + update_containers() + update_databases() + update_identifiers() + update_messages() + plan.append("SET FOREIGN_KEY_CHECKS=1;") + print("\n".join(plan)) diff --git a/dbrepo-metadata-db/migration/16/requirements.txt b/dbrepo-metadata-db/migration/16/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..f7e737b2ce17efb23b11a5b0b562651f59ddeada --- /dev/null +++ b/dbrepo-metadata-db/migration/16/requirements.txt @@ -0,0 +1 @@ +dbrepo==1.6.5rc15 \ No newline at end of file diff --git a/dbrepo-metadata-db/migration/16/schema.sql b/dbrepo-metadata-db/migration/16/schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..68a87f1a67ab770fbb24df68584beeba53d47859 --- /dev/null +++ b/dbrepo-metadata-db/migration/16/schema.sql @@ -0,0 +1,616 @@ +DROP TABLE IF EXISTS `mdb_data`; +DROP TABLE IF EXISTS `mdb_columns_nom`; +DROP TABLE IF EXISTS `mdb_columns_cat`; +DROP TABLE IF EXISTS `mdb_update`; +DROP TABLE IF EXISTS `mdb_databases_subjects`; +DROP TABLE IF EXISTS `mdb_images_date`; +-- mdb_ontologies +ALTER TABLE `mdb_ontologies` + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_ontologies + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_ontologies` + DROP PRIMARY KEY; +-- mdb_concepts +ALTER TABLE mdb_concepts + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_concepts + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_concepts` + DROP PRIMARY KEY; +-- mdb_units +ALTER TABLE `mdb_units` + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_units + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_units` + DROP PRIMARY KEY; +-- mdb_messages +ALTER TABLE `mdb_banner_messages` + DROP SYSTEM VERSIONING; +ALTER TABLE `mdb_banner_messages` RENAME `mdb_messages`; +ALTER TABLE mdb_messages + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_messages` + DROP PRIMARY KEY; +-- mdb_image_operators +ALTER TABLE mdb_image_operators + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_image_operators + DROP FOREIGN KEY mdb_image_operators_ibfk_1; +ALTER TABLE mdb_image_operators + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_image_operators` + DROP PRIMARY KEY; +ALTER TABLE mdb_image_operators + CHANGE COLUMN image_id image_id VARCHAR(36) NOT NULL; +-- mdb_image_types +ALTER TABLE mdb_image_types + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_image_types + DROP FOREIGN KEY mdb_image_types_ibfk_1; +ALTER TABLE mdb_image_types + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_image_types` + DROP PRIMARY KEY; +ALTER TABLE mdb_image_types + CHANGE COLUMN image_id image_id VARCHAR(36) NOT NULL; +-- mdb_access +ALTER TABLE mdb_access + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_access + DROP FOREIGN KEY mdb_access_ibfk_1; +ALTER TABLE mdb_access + CHANGE COLUMN aDBID aDBID VARCHAR(36) NOT NULL; +ALTER TABLE `mdb_access` + DROP PRIMARY KEY; +-- mdb_have_access +ALTER TABLE mdb_have_access + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_have_access + DROP FOREIGN KEY mdb_have_access_ibfk_1; +ALTER TABLE mdb_have_access + DROP FOREIGN KEY mdb_have_access_ibfk_2; +ALTER TABLE mdb_have_access + CHANGE COLUMN user_id user_id VARCHAR(36) NOT NULL; +ALTER TABLE mdb_have_access + CHANGE COLUMN database_id database_id VARCHAR(36) NOT NULL; +ALTER TABLE `mdb_have_access` + DROP PRIMARY KEY;-- mdb_identifier_creators +ALTER TABLE mdb_identifier_creators + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifier_creators + DROP FOREIGN KEY mdb_identifier_creators_ibfk_1; +ALTER TABLE mdb_identifier_creators + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifier_creators` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifier_creators + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +-- mdb_identifier_descriptions +ALTER TABLE mdb_identifier_descriptions + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifier_descriptions + DROP FOREIGN KEY mdb_identifier_descriptions_ibfk_1; +ALTER TABLE mdb_identifier_descriptions + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifier_descriptions` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifier_descriptions + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +-- mdb_identifier_funders +ALTER TABLE mdb_identifier_funders + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifier_funders + DROP FOREIGN KEY mdb_identifier_funders_ibfk_1; +ALTER TABLE mdb_identifier_funders + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifier_funders` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifier_funders + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +-- mdb_identifier_licenses +ALTER TABLE mdb_identifier_licenses + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifier_licenses + DROP FOREIGN KEY mdb_identifier_licenses_ibfk_1; +ALTER TABLE mdb_identifier_licenses + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +ALTER TABLE `mdb_identifier_licenses` + DROP PRIMARY KEY; +-- mdb_identifier_titles +ALTER TABLE mdb_identifier_titles + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifier_titles + DROP FOREIGN KEY mdb_identifier_titles_ibfk_1; +ALTER TABLE mdb_identifier_titles + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifier_titles` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifier_titles + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +-- mdb_identifier_licenses +ALTER TABLE mdb_related_identifiers + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_related_identifiers + DROP FOREIGN KEY mdb_related_identifiers_ibfk_1; +ALTER TABLE mdb_related_identifiers RENAME mdb_identifier_related; +ALTER TABLE mdb_identifier_related + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifier_related` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifier_related + CHANGE COLUMN pid pid VARCHAR(36) NOT NULL; +-- mdb_identifiers +ALTER TABLE mdb_identifiers + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_identifiers + DROP FOREIGN KEY mdb_identifiers_ibfk_1; +ALTER TABLE mdb_identifiers + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_identifiers` + DROP PRIMARY KEY; +ALTER TABLE mdb_identifiers + CHANGE COLUMN dbid dbid VARCHAR(36) NOT NULL; +ALTER TABLE mdb_identifiers + CHANGE COLUMN qid qid VARCHAR(36); +ALTER TABLE mdb_identifiers + CHANGE COLUMN tid tid VARCHAR(36); +ALTER TABLE mdb_identifiers + CHANGE COLUMN vid vid VARCHAR(36); +-- mdb_columns_concepts +ALTER TABLE mdb_columns_concepts + DROP SYSTEM VERSIONING; +ALTER TABLE `mdb_columns_concepts` + DROP PRIMARY KEY; +ALTER TABLE mdb_columns_concepts + DROP FOREIGN KEY mdb_columns_concepts_ibfk_1; +ALTER TABLE mdb_columns_concepts + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE mdb_columns_concepts + CHANGE COLUMN cID cID VARCHAR(36) NOT NULL; +-- mdb_columns_enums +ALTER TABLE mdb_columns_enums + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_columns_enums + DROP FOREIGN KEY mdb_columns_enums_ibfk_1; +ALTER TABLE mdb_columns_enums + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_columns_enums` + DROP PRIMARY KEY; +ALTER TABLE mdb_columns_enums + CHANGE COLUMN column_id column_id VARCHAR(36) NOT NULL; +-- mdb_columns_sets +ALTER TABLE mdb_columns_sets + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_columns_sets + DROP FOREIGN KEY mdb_columns_sets_ibfk_1; +ALTER TABLE mdb_columns_sets + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_columns_sets` + DROP PRIMARY KEY; +ALTER TABLE mdb_columns_sets + CHANGE COLUMN column_id column_id VARCHAR(36) NOT NULL; +-- mdb_columns_units +ALTER TABLE mdb_columns_units + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_columns_units + DROP FOREIGN KEY mdb_columns_units_ibfk_1; +ALTER TABLE mdb_columns_units + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_columns_units` + DROP PRIMARY KEY; +ALTER TABLE mdb_columns_units + CHANGE COLUMN cID cID VARCHAR(36) NOT NULL; +-- mdb_constraints_checks +ALTER TABLE mdb_constraints_checks + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_constraints_checks + DROP FOREIGN KEY mdb_constraints_checks_ibfk_1; +ALTER TABLE mdb_constraints_checks + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_checks` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_checks + CHANGE COLUMN tid tid VARCHAR(36) NOT NULL; +-- mdb_constraints_foreign_key_reference +ALTER TABLE mdb_constraints_foreign_key_reference + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_constraints_foreign_key_reference + DROP FOREIGN KEY mdb_constraints_foreign_key_reference_ibfk_1; +ALTER TABLE mdb_constraints_foreign_key_reference + DROP FOREIGN KEY mdb_constraints_foreign_key_reference_ibfk_2; +ALTER TABLE mdb_constraints_foreign_key_reference + DROP FOREIGN KEY mdb_constraints_foreign_key_reference_ibfk_3; +ALTER TABLE mdb_constraints_foreign_key_reference + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_foreign_key_reference` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_foreign_key_reference + CHANGE COLUMN fkid fkid VARCHAR(36) NOT NULL; +ALTER TABLE mdb_constraints_foreign_key_reference + CHANGE COLUMN cid cid VARCHAR(36) NOT NULL; +ALTER TABLE mdb_constraints_foreign_key_reference + CHANGE COLUMN rcid rcid VARCHAR(36) NOT NULL; +-- mdb_constraints_foreign_key +ALTER TABLE mdb_constraints_foreign_key + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_constraints_foreign_key + DROP FOREIGN KEY mdb_constraints_foreign_key_ibfk_1; +ALTER TABLE mdb_constraints_foreign_key + DROP FOREIGN KEY mdb_constraints_foreign_key_ibfk_2; +ALTER TABLE mdb_constraints_foreign_key + CHANGE COLUMN fkid fkid VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_foreign_key` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_foreign_key + CHANGE COLUMN tid tid VARCHAR(36) NOT NULL; +ALTER TABLE mdb_constraints_foreign_key + CHANGE COLUMN rtid rtid VARCHAR(36) NOT NULL; +-- mdb_constraints_primary_key +ALTER TABLE mdb_constraints_primary_key + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_constraints_primary_key + DROP FOREIGN KEY mdb_constraints_primary_key_ibfk_1; +ALTER TABLE mdb_constraints_primary_key + DROP FOREIGN KEY mdb_constraints_primary_key_ibfk_2; +ALTER TABLE mdb_constraints_primary_key + CHANGE COLUMN pkid pkid VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_primary_key` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_primary_key + CHANGE COLUMN tID tID VARCHAR(36) NOT NULL; +ALTER TABLE mdb_constraints_primary_key + CHANGE COLUMN cid cid VARCHAR(36) NOT NULL; +-- mdb_constraints_unique_columns +ALTER TABLE mdb_constraints_unique_columns + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_constraints_unique_columns + DROP FOREIGN KEY mdb_constraints_unique_columns_ibfk_1; +ALTER TABLE mdb_constraints_unique_columns + DROP FOREIGN KEY mdb_constraints_unique_columns_ibfk_2; +ALTER TABLE mdb_constraints_unique_columns + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_unique_columns` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_unique_columns + CHANGE COLUMN uid uid VARCHAR(36) NOT NULL; +ALTER TABLE mdb_constraints_unique_columns + CHANGE COLUMN cid cid VARCHAR(36) NOT NULL; +-- mdb_constraints_unique +ALTER TABLE mdb_constraints_unique + DROP FOREIGN KEY mdb_constraints_unique_ibfk_1; +ALTER TABLE mdb_constraints_unique + CHANGE COLUMN uid uid VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_constraints_unique` + DROP PRIMARY KEY; +ALTER TABLE mdb_constraints_unique + CHANGE COLUMN tid tid VARCHAR(36) NOT NULL; +-- mdb_columns +ALTER TABLE mdb_columns + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_columns + DROP FOREIGN KEY mdb_columns_ibfk_1; +ALTER TABLE mdb_columns + CHANGE COLUMN ID ID VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_columns` + DROP PRIMARY KEY; +ALTER TABLE mdb_columns + CHANGE COLUMN tID tID VARCHAR(36) NOT NULL; +-- mdb_tables +ALTER TABLE mdb_tables + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_tables + DROP COLUMN `separator`; +ALTER TABLE mdb_tables + DROP COLUMN `quote`; +ALTER TABLE mdb_tables + DROP COLUMN `element_false`; +ALTER TABLE mdb_tables + DROP COLUMN `element_null`; +ALTER TABLE mdb_tables + DROP COLUMN `element_true`; +ALTER TABLE mdb_tables + DROP COLUMN `skip_lines`; +ALTER TABLE mdb_tables + DROP FOREIGN KEY mdb_tables_ibfk_1; +ALTER TABLE mdb_tables + CHANGE COLUMN ID ID VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_tables` + DROP PRIMARY KEY; +ALTER TABLE mdb_tables + CHANGE COLUMN tDBID tDBID VARCHAR(36) NOT NULL; +-- mdb_view_columns +ALTER TABLE mdb_view_columns + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_view_columns + DROP FOREIGN KEY mdb_view_columns_ibfk_1; +ALTER TABLE mdb_view_columns + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_view_columns` + DROP PRIMARY KEY; +ALTER TABLE mdb_view_columns + CHANGE COLUMN view_id view_id VARCHAR(36) NOT NULL; +-- mdb_view +ALTER TABLE mdb_view + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_view + DROP FOREIGN KEY mdb_view_ibfk_1; +ALTER TABLE mdb_view + CHANGE COLUMN ID ID VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_view` + DROP PRIMARY KEY; +ALTER TABLE mdb_view + CHANGE COLUMN vdbid vdbid VARCHAR(36) NOT NULL; +-- mdb_databases +ALTER TABLE mdb_databases + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_databases + DROP FOREIGN KEY mdb_databases_ibfk_1; +ALTER TABLE mdb_databases + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_databases` + DROP PRIMARY KEY; +ALTER TABLE mdb_databases + CHANGE COLUMN cid cid VARCHAR(36) NOT NULL; +-- mdb_containers +ALTER TABLE mdb_containers + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_containers + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_containers` + DROP PRIMARY KEY; +ALTER TABLE mdb_containers + DROP FOREIGN KEY mdb_containers_ibfk_1; +ALTER TABLE mdb_containers + CHANGE COLUMN image_id image_id VARCHAR(36) NOT NULL; +-- mdb_images +ALTER TABLE mdb_images + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_images + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +ALTER TABLE `mdb_images` + DROP PRIMARY KEY; +-- mdb_users +ALTER TABLE mdb_users + DROP SYSTEM VERSIONING; +ALTER TABLE mdb_users + CHANGE COLUMN id id VARCHAR(36) NOT NULL DEFAULT UUID(); +-- mdb_images +ALTER TABLE mdb_images + ADD PRIMARY KEY (id); +ALTER TABLE mdb_images + ADD SYSTEM VERSIONING; +-- mdb_containers +ALTER TABLE mdb_containers + ADD PRIMARY KEY (id); +ALTER TABLE mdb_containers + ADD FOREIGN KEY (image_id) REFERENCES mdb_images (id); +ALTER TABLE mdb_containers + ADD SYSTEM VERSIONING; +-- mdb_concepts +ALTER TABLE mdb_concepts + ADD PRIMARY KEY (id); +ALTER TABLE mdb_concepts + ADD SYSTEM VERSIONING; +-- mdb_databases +ALTER TABLE mdb_databases + ADD FOREIGN KEY (cid) REFERENCES mdb_containers (id); +ALTER TABLE mdb_databases + ADD PRIMARY KEY (id); +ALTER TABLE mdb_databases + ADD SYSTEM VERSIONING; +-- mdb_tables +ALTER TABLE mdb_tables + ADD FOREIGN KEY (tDBID) REFERENCES mdb_databases (id); +ALTER TABLE mdb_tables + ADD PRIMARY KEY (ID); +ALTER TABLE mdb_tables + ADD SYSTEM VERSIONING; +-- mdb_constraints_checks +ALTER TABLE mdb_constraints_checks + ADD FOREIGN KEY (tid) REFERENCES mdb_tables (id); +ALTER TABLE mdb_constraints_checks + ADD PRIMARY KEY (id); +ALTER TABLE mdb_constraints_checks + ADD SYSTEM VERSIONING; +-- mdb_constraints_foreign_key +ALTER TABLE mdb_constraints_foreign_key + ADD FOREIGN KEY (tid) REFERENCES mdb_tables (id); +ALTER TABLE mdb_constraints_foreign_key + ADD PRIMARY KEY (fkid); +-- mdb_columns +ALTER TABLE mdb_columns + ADD FOREIGN KEY (tID) REFERENCES mdb_tables (id); +ALTER TABLE mdb_columns + ADD PRIMARY KEY (ID); +ALTER TABLE mdb_columns + ADD SYSTEM VERSIONING; +-- mdb_constraints_foreign_key_reference +ALTER TABLE mdb_constraints_foreign_key_reference + ADD PRIMARY KEY (id); +ALTER TABLE mdb_constraints_foreign_key_reference + ADD FOREIGN KEY (fkid) REFERENCES mdb_constraints_foreign_key (fkid); +ALTER TABLE mdb_constraints_foreign_key_reference + ADD FOREIGN KEY (cid) REFERENCES mdb_columns (ID); +ALTER TABLE mdb_constraints_foreign_key_reference + ADD FOREIGN KEY (rcid) REFERENCES mdb_columns (ID); +ALTER TABLE mdb_constraints_foreign_key_reference + ADD SYSTEM VERSIONING; +-- mdb_constraints_foreign_key +ALTER TABLE mdb_constraints_foreign_key + ADD FOREIGN KEY (rtid) REFERENCES mdb_tables (`id`) ON DELETE CASCADE; +ALTER TABLE mdb_constraints_foreign_key + ADD SYSTEM VERSIONING; +-- mdb_constraints_primary_key +ALTER TABLE mdb_constraints_primary_key + ADD PRIMARY KEY (pkid); +ALTER TABLE mdb_constraints_primary_key + ADD FOREIGN KEY (tID) REFERENCES mdb_tables (ID); +ALTER TABLE mdb_constraints_primary_key + ADD FOREIGN KEY (cid) REFERENCES mdb_columns (ID); +ALTER TABLE mdb_constraints_primary_key + ADD SYSTEM VERSIONING; +-- mdb_constraints_unique +ALTER TABLE mdb_constraints_unique + ADD PRIMARY KEY (uid); +ALTER TABLE mdb_constraints_unique + ADD FOREIGN KEY (tid) REFERENCES mdb_tables (ID); +ALTER TABLE mdb_constraints_unique + ADD SYSTEM VERSIONING; +-- mdb_constraints_unique_columns +ALTER TABLE mdb_constraints_unique_columns + ADD PRIMARY KEY (id); +ALTER TABLE mdb_constraints_unique_columns + ADD FOREIGN KEY (uid) REFERENCES mdb_constraints_unique (uid); +ALTER TABLE mdb_constraints_unique_columns + ADD FOREIGN KEY (cid) REFERENCES mdb_columns (ID); +ALTER TABLE mdb_constraints_unique_columns + ADD SYSTEM VERSIONING; +-- mdb_columns_enums +ALTER TABLE mdb_columns_enums + ADD PRIMARY KEY (id); +ALTER TABLE mdb_columns_enums + ADD FOREIGN KEY (column_id) REFERENCES mdb_columns (id); +ALTER TABLE mdb_columns_enums + ADD SYSTEM VERSIONING; +-- mdb_columns_sets +ALTER TABLE mdb_columns_sets + ADD PRIMARY KEY (id); +ALTER TABLE mdb_columns_sets + ADD FOREIGN KEY (column_id) REFERENCES mdb_columns (id); +ALTER TABLE mdb_columns_sets + ADD SYSTEM VERSIONING; +-- mdb_units +ALTER TABLE mdb_units + ADD PRIMARY KEY (id); +-- mdb_columns_units +ALTER TABLE mdb_units + ADD SYSTEM VERSIONING; +ALTER TABLE mdb_columns_units + ADD PRIMARY KEY (id); +ALTER TABLE mdb_columns_units + ADD FOREIGN KEY (id) REFERENCES mdb_units (id); +ALTER TABLE mdb_columns_units + ADD FOREIGN KEY (cID) REFERENCES mdb_columns (id); +ALTER TABLE mdb_columns_units + ADD SYSTEM VERSIONING; +-- mdb_columns_concepts +ALTER TABLE mdb_columns_concepts + ADD PRIMARY KEY (id, cid); +ALTER TABLE mdb_columns_concepts + ADD FOREIGN KEY (id) REFERENCES mdb_concepts (id); +ALTER TABLE mdb_columns_concepts + ADD FOREIGN KEY (cID) REFERENCES mdb_columns (id); +ALTER TABLE mdb_columns_concepts + ADD SYSTEM VERSIONING; +-- mdb_view +ALTER TABLE mdb_view + ADD PRIMARY KEY (id); +ALTER TABLE mdb_view + ADD FOREIGN KEY (vdbid) REFERENCES mdb_databases (id); +ALTER TABLE mdb_view + ADD SYSTEM VERSIONING; +-- mdb_view_columns +ALTER TABLE mdb_view_columns + ADD PRIMARY KEY (id); +ALTER TABLE mdb_view_columns + ADD FOREIGN KEY (view_id) REFERENCES mdb_view (id); +ALTER TABLE mdb_view_columns + ADD SYSTEM VERSIONING; +-- mdb_access +ALTER TABLE mdb_access + ADD PRIMARY KEY (aUserID, aDBID); +ALTER TABLE mdb_access + ADD FOREIGN KEY (aDBID) REFERENCES mdb_databases (id); +ALTER TABLE mdb_access + ADD FOREIGN KEY (aUserID) REFERENCES mdb_users (id); +ALTER TABLE mdb_access + ADD SYSTEM VERSIONING; +-- mdb_identifiers +ALTER TABLE mdb_identifiers + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifiers + ADD FOREIGN KEY (dbid) REFERENCES mdb_databases (id); +ALTER TABLE mdb_identifiers + ADD FOREIGN KEY (tid) REFERENCES mdb_tables (id); +ALTER TABLE mdb_identifiers + ADD FOREIGN KEY (vid) REFERENCES mdb_view (id); +ALTER TABLE mdb_identifiers + ADD SYSTEM VERSIONING; +-- mdb_identifier_licenses +ALTER TABLE mdb_identifier_licenses + ADD PRIMARY KEY (pid, license_id); +ALTER TABLE mdb_identifier_licenses + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_licenses + ADD SYSTEM VERSIONING; +-- mdb_identifier_titles +ALTER TABLE mdb_identifier_titles + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifier_titles + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_titles + ADD SYSTEM VERSIONING; +-- mdb_identifier_funders +ALTER TABLE mdb_identifier_funders + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifier_funders + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_funders + ADD SYSTEM VERSIONING; +-- mdb_identifier_descriptions +ALTER TABLE mdb_identifier_descriptions + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifier_descriptions + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_descriptions + ADD SYSTEM VERSIONING; +-- mdb_identifier_creators +ALTER TABLE mdb_identifier_creators + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifier_creators + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_creators + ADD SYSTEM VERSIONING; +-- mdb_identifier_related +ALTER TABLE mdb_identifier_related + ADD PRIMARY KEY (id); +ALTER TABLE mdb_identifier_related + ADD FOREIGN KEY (pid) REFERENCES mdb_identifiers (id); +ALTER TABLE mdb_identifier_related + ADD SYSTEM VERSIONING; +-- mdb_users +ALTER TABLE mdb_users + ADD SYSTEM VERSIONING; +-- mdb_have_access +ALTER TABLE mdb_have_access + ADD PRIMARY KEY (user_id, database_id); +ALTER TABLE mdb_have_access + ADD FOREIGN KEY (database_id) REFERENCES mdb_databases (id); +ALTER TABLE mdb_have_access + ADD FOREIGN KEY (user_id) REFERENCES mdb_users (id); +ALTER TABLE mdb_have_access + ADD SYSTEM VERSIONING; +-- mdb_image_types +ALTER TABLE mdb_image_types + ADD PRIMARY KEY (id); +ALTER TABLE mdb_image_types + ADD FOREIGN KEY (image_id) REFERENCES mdb_images (id); +ALTER TABLE mdb_image_types + ADD SYSTEM VERSIONING; +-- mdb_image_operators +ALTER TABLE mdb_image_operators + ADD PRIMARY KEY (id); +ALTER TABLE mdb_image_operators + ADD FOREIGN KEY (image_id) REFERENCES mdb_images (id); +ALTER TABLE mdb_image_operators + ADD SYSTEM VERSIONING; +-- mdb_ontologies +ALTER TABLE mdb_ontologies + ADD PRIMARY KEY (id); +ALTER TABLE mdb_ontologies + ADD SYSTEM VERSIONING; +-- mdb_messages +ALTER TABLE `mdb_messages` + ADD SYSTEM VERSIONING; \ No newline at end of file diff --git a/dbrepo-metadata-service/api/pom.xml b/dbrepo-metadata-service/api/pom.xml index 37e8bec63f5b772f35dc97529c899edea14200fe..6c3b1aa13fbe0ccac21e0e0ce1ede0a78e6f340d 100644 --- a/dbrepo-metadata-service/api/pom.xml +++ b/dbrepo-metadata-service/api/pom.xml @@ -6,18 +6,18 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-api</artifactId> <name>dbrepo-metadata-service-api</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service-entities</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> <scope>compile</scope> </dependency> </dependencies> diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/CredentialDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/CredentialDto.java deleted file mode 100644 index a9f95ad04d9c5e2ca8c953dc5169f5f0d9250bb0..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/CredentialDto.java +++ /dev/null @@ -1,31 +0,0 @@ -package at.tuwien.api.auth; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class CredentialDto { - - @NotBlank - @Schema(example = "password") - private String type; - - @NotBlank - @Schema(example = "abc123") - private String value; - - @NotNull - @Schema(example = "false") - private Boolean temporary; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/JwtResponseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/JwtResponseDto.java deleted file mode 100644 index 93d562ca77a81caf86f93a9ec6e96184f706d7ae..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/JwtResponseDto.java +++ /dev/null @@ -1,36 +0,0 @@ -package at.tuwien.api.auth; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.util.List; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class JwtResponseDto { - - @NotNull - @ToString.Exclude - private String token; - - private String type; - - private Long id; - - @Schema(example = "user") - private String username; - - @Schema(example = "user@example.com") - private String email; - - private List<String> roles; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/KeycloakErrorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/KeycloakErrorDto.java deleted file mode 100644 index 01c0a2d0348a2facf9009d9b865fd52338f2bab9..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/KeycloakErrorDto.java +++ /dev/null @@ -1,31 +0,0 @@ -package at.tuwien.api.auth; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -import java.io.Serializable; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class KeycloakErrorDto implements Serializable { - - @NotNull - @Schema(example = "invalid_grant") - private String error; - - @NotNull - @JsonProperty("error_description") - private String errorDescription; - - private String errorMessage; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/TokenIntrospectDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/TokenIntrospectDto.java deleted file mode 100644 index 8a2fa624b5794a36304949c3269ac3958beeaee1..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/TokenIntrospectDto.java +++ /dev/null @@ -1,83 +0,0 @@ -package at.tuwien.api.auth; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@EqualsAndHashCode -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class TokenIntrospectDto { - - @NotNull - @Schema(description = "expiration timestamp", example = "1679602372") - private Long exp; - - @NotNull - @Schema(example = "1679602072") - private Long iat; - - @NotNull - @Schema(example = "6aa375aa-d5bb-4b1e-9f89-347084a739e3") - private String jti; - - @NotNull - @Schema(description = "issuer", example = "6aa375aa-d5bb-4b1e-9f89-347084a739e3") - private String iss; - - @NotNull - @Schema(description = "user id", example = "9670828b-8159-4642-be19-e77ca018e644") - private String sub; - - @NotNull - @Schema(description = "type", example = "Bearer") - private String typ; - - @NotNull - @Schema(example = "0170887f-4ffc-4bb7-9292-9334132cd430") - private String azp; - - @NotNull - @Schema(example = "0170887f-4ffc-4bb7-9292-9334132cd430") - @JsonProperty("session_state") - private String sessionState; - - @NotNull - @Schema(example = "1") - private Integer acr; - - @NotNull - @JsonProperty("allowed-origins") - @Schema(example = "[\"*\"]") - private String[] allowedOrigins; - - @NotNull - @JsonProperty("realm_access") - private RealmAccessDto realmAccess; - - @NotNull - @JsonProperty("client_id") - @Schema(example = "dbrepo-client") - private String clientId; - - @NotNull - @JsonProperty("preferred_username") - @Schema(example = "jdoe") - private String username; - - @NotNull - @Schema(example = "openid email profile") - private String scope; - - @NotNull - @Schema(example = "true") - private Boolean active; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerBriefDto.java index 71e7601b164bbda3a1efd21557d9695322ad0715..91253b12baaefc02c0b078bf31fd832a01f29864 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerBriefDto.java @@ -10,6 +10,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.time.Instant; +import java.util.UUID; @Getter @Setter @@ -22,8 +23,8 @@ import java.time.Instant; public class ContainerBriefDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "7ddb7e87-b965-43a2-9a24-4fa406d998f4") + private UUID id; @NotNull @Schema(example = "f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerDto.java index 913ab26d9d4469fb3335d5dc1da8463c9afc0bd6..39eb0116527395ca9dcfdf634e44b675fc46b122 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/ContainerDto.java @@ -2,6 +2,7 @@ package at.tuwien.api.container; import at.tuwien.api.CacheableDto; import at.tuwien.api.container.image.ImageDto; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; @@ -10,6 +11,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.time.Instant; +import java.util.UUID; @Getter @Setter @@ -22,8 +24,8 @@ import java.time.Instant; public class ContainerDto extends CacheableDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "7ddb7e87-b965-43a2-9a24-4fa406d998f4") + private UUID id; @NotBlank @Schema(example = "Air Quality") @@ -34,24 +36,17 @@ public class ContainerDto extends CacheableDto { @Schema(example = "air_quality") private String internalName; + @JsonIgnore @Schema(example = "data-db") private String host; + @JsonIgnore @Schema(example = "3306") private Integer port; - @JsonProperty("ui_host") - @Schema(example = "example.com") - private String uiHost; - - @JsonProperty("ui_port") - @Schema(example = "3306") - private Integer uiPort; - @NotNull private ImageDto image; - @NotNull @Schema(example = "50") private Long quota; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/CreateContainerDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/CreateContainerDto.java index 23062ffd9082098f13524ddd283b39310ecf39d5..f2ac7df46abb989797bc1bab23d8145d71ee5687 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/CreateContainerDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/CreateContainerDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -22,8 +24,8 @@ public class CreateContainerDto { @NotNull @JsonProperty("image_id") - @Schema(example = "1", description = "Image ID") - private Long imageId; + @Schema(example = "2360f3c4-85e0-4fac-a7c6-73b296b9dde2", description = "Image ID") + private UUID imageId; @NotBlank @Schema(example = "data-db2", description = "Hostname of container") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/DataTypeDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/DataTypeDto.java index a4215c03928529186468081dfa054d6fd434f820..908f54a1b45fb247f13550b15cf8c2ce5d80e821 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/DataTypeDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/DataTypeDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -17,6 +19,10 @@ import lombok.extern.jackson.Jacksonized; @ToString public class DataTypeDto { + @NotNull + @Schema(example = "816f55d5-1098-4f60-a4af-c8121c04dcca") + private UUID id; + @NotBlank @JsonProperty("display_name") @Schema(example = "TIME(fsp)") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageBriefDto.java index 6a9a970c0f5b3931bbcab7f53be099138d568c12..ecbd050966f43c6f8fbe8a04b6f458570448fd59 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageBriefDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -18,8 +20,8 @@ import lombok.extern.jackson.Jacksonized; public class ImageBriefDto { @NotNull - @Schema(example = "5") - private Long id; + @Schema(example = "816f55d5-1098-4f60-a4af-c8121c04dcce") + private UUID id; @NotBlank @Schema(example = "mariadb") @@ -29,11 +31,6 @@ public class ImageBriefDto { @Schema(example = "10.5") private String version; - @NotBlank - @JsonProperty("jdbc_method") - @Schema(example = "mariadb") - private String jdbcMethod; - @NotNull @JsonProperty("default") @Schema(example = "false") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java index a9c37fb8485db0e90b4b5d56b91b53ad4ec47940..ec4b0ad4894bcb220d03d4bb86828ba3b25bfc63 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/ImageDto.java @@ -1,5 +1,6 @@ package at.tuwien.api.container.image; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; @@ -8,6 +9,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -20,12 +22,8 @@ import java.util.List; public class ImageDto { @NotNull - @Schema(example = "1") - private Long id; - - @NotBlank - @Schema(example = "docker.io/library") - private String registry; + @Schema(example = "816f55d5-1098-4f60-a4af-c8121c04dcce") + private UUID id; @NotBlank @Schema(example = "mariadb") @@ -36,16 +34,7 @@ public class ImageDto { private String version; @NotBlank - @JsonProperty("driver_class") - @Schema(example = "org.mariadb.jdbc.Driver") - private String driverClass; - - @NotBlank - @Schema(example = "org.hibernate.dialect.MariaDBDialect") - private String dialect; - - @NotBlank - @JsonProperty("jdbc_method") + @JsonIgnore @Schema(example = "mariadb") private String jdbcMethod; @@ -54,11 +43,6 @@ public class ImageDto { @Schema(example = "false") private Boolean isDefault; - @NotNull - @JsonProperty("default_port") - @Schema(example = "3306") - private Integer defaultPort; - @NotNull @JsonProperty("data_types") private List<DataTypeDto> dataTypes; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java index 96113b5347e6fcd8d99878154686927da9c978ac..7eaee0481064384e762b296661565f5534714beb 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/container/image/OperatorDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -17,7 +19,9 @@ import lombok.extern.jackson.Jacksonized; @ToString public class OperatorDto { - private Long id; + @NotNull + @Schema(example = "816f55d5-1098-4f60-a4af-c8121c04dccf") + private UUID id; @NotBlank @JsonProperty("display_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateDatabaseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateDatabaseDto.java index c10d6b0b5e2618a6c3854e591d99e477be952035..e7fd08e771176346fb13d361f2c436ce3aaf6627 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateDatabaseDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateDatabaseDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,8 +21,8 @@ public class CreateDatabaseDto { @NotNull @JsonProperty("container_id") - @Schema(example = "1") - private Long cid; + @Schema(example = "0888e108-d521-46e2-9d3e-82099185305b") + private UUID cid; @NotBlank @Schema(example = "Air Quality") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateViewDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateViewDto.java index 366845d08304881519c80f4984106626bf52a01a..9a9558470f575e07e9baf77b531911a80dac8757 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateViewDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/CreateViewDto.java @@ -1,5 +1,6 @@ package at.tuwien.api.database; +import at.tuwien.api.database.query.SubsetDto; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; @@ -23,9 +24,8 @@ public class CreateViewDto { @Schema(example = "Air Quality") private String name; - @NotBlank - @Schema(example = "SELECT `id` FROM `air_quality`") - private String query; + @NotNull + private SubsetDto query; @NotNull @JsonProperty("is_public") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseAccessDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseAccessDto.java index d065a5892afb0cb342c12975f562820d1eeb6b10..7e393561f844b3f10f8fc450b04a29158e3e3cbd 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseAccessDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseAccessDto.java @@ -26,7 +26,7 @@ public class DatabaseAccessDto { @NotNull @JsonIgnore - private Long hdbid; + private UUID hdbid; @NotNull private UserBriefDto user; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseBriefDto.java index 4cff48db18b1b337de7ae9d3a50c986e4c329028..4bb262b781d3c18013cf3ae65401e39f2469c3e1 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseBriefDto.java @@ -23,8 +23,8 @@ import java.util.UUID; public class DatabaseBriefDto { @NotNull - @Schema(example = "3") - private Long id; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID id; @NotBlank @Schema(example = "Air Quality") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseDto.java index d6ea2bff9e2203439891e3a1a6aec6f17afc86a6..0c8c85a41c54fa81bcf9a37a15fe0187df4182eb 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/DatabaseDto.java @@ -1,6 +1,7 @@ package at.tuwien.api.database; import at.tuwien.api.CacheableDto; +import at.tuwien.api.container.ContainerBriefDto; import at.tuwien.api.container.ContainerDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.identifier.IdentifierDto; @@ -14,6 +15,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -26,8 +28,8 @@ import java.util.List; public class DatabaseDto extends CacheableDto { @NotNull - @Schema(example = "3") - private Long id; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID id; @NotBlank @Schema(example = "Air Quality") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewBriefDto.java index f68067e8a870f01b402b23a3b27bd0a065e186fd..47107ac54fe042b026e3a0ac954e5be2650b59d8 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewBriefDto.java @@ -20,13 +20,13 @@ import java.util.UUID; public class ViewBriefDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "787439d0-e85e-400c-a7e6-996a023bfad9") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long vdbid; + @Schema(example = "2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4") + private UUID vdbid; @NotBlank @Schema(example = "Air Quality") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewColumnDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewColumnDto.java index 24cca8e4cc7325904c83845d42d060814753d171..766fbfd32103992a8af744c1c105948ebc02f09a 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewColumnDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewColumnDto.java @@ -9,6 +9,8 @@ import jakarta.validation.constraints.Size; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -20,13 +22,13 @@ import lombok.extern.jackson.Jacksonized; public class ViewColumnDto { @NotNull - @Schema(example = "12") - private Long id; + @Schema(example = "6aec3a91-2e0b-4e92-a16a-9c3c5e892da1") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "2b5b2b03-fdd0-40d6-afe0-e5d02fd839e4") + private UUID databaseId; @NotNull @JsonProperty("ord") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewDto.java index 82a7081e16f08a2cc2c3a7c02a28760adc7ef9d1..1e54da2978935edcb21d396ae66258e37281f785 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/ViewDto.java @@ -12,6 +12,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -24,13 +25,13 @@ import java.util.List; public class ViewDto extends CacheableDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "787439d0-e85e-400c-a7e6-996a023bfad9") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long vdbid; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID databaseId; @NotBlank @Schema(example = "Air Quality") @@ -65,10 +66,6 @@ public class ViewDto extends CacheableDto { @Schema(example = "7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916") private String queryHash; - @ToString.Exclude - @EqualsAndHashCode.Exclude - private DatabaseDto database; - @NotNull private UserBriefDto owner; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/internal/CreateDatabaseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/internal/CreateDatabaseDto.java index b2efa7567e6e33b30664cd35adf652c7531a3026..76ee117931565173e94b4eb8684bc9a7ecd6d0d1 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/internal/CreateDatabaseDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/internal/CreateDatabaseDto.java @@ -20,8 +20,8 @@ public class CreateDatabaseDto { @NotNull @JsonProperty("container_id") - @Schema(example = "1") - private Long containerId; + @Schema(example = "83ea2326-f8f6-4263-baf8-cdf88a54efc7") + private UUID containerId; @NotBlank @JsonProperty("internal_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/ExecuteInternalQueryDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/ExecuteInternalQueryDto.java deleted file mode 100644 index 1cc1d501c825d99c564564b71b268f76f431cf56..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/ExecuteInternalQueryDto.java +++ /dev/null @@ -1,21 +0,0 @@ -package at.tuwien.api.database.query; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class ExecuteInternalQueryDto { - - @JsonProperty("container_id") - private String containerId; - - private String query; - -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterDto.java new file mode 100644 index 0000000000000000000000000000000000000000..3fe8744661c4308d7403b950a15bfed104d9e5a1 --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterDto.java @@ -0,0 +1,39 @@ +package at.tuwien.api.database.query; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.*; +import lombok.extern.jackson.Jacksonized; + +import java.util.UUID; + +@Getter +@Setter +@Builder +@EqualsAndHashCode +@NoArgsConstructor +@AllArgsConstructor +@Jacksonized +@ToString +public class FilterDto { + + @NotNull + @Schema(example = "where") + private FilterTypeDto type; + + @NotNull + @JsonProperty("column_id") + @Schema(example = "14128033-54b5-4818-a489-21b0dded86e2") + private UUID columnId; + + @NotNull + @JsonProperty("operator_id") + @Schema(example = "67c5b54d-2eb0-4f42-8dc1-a504562e9f32") + private UUID operatorId; + + @NotNull + @Schema(example = "1") + private String value; + +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterTypeDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterTypeDto.java new file mode 100644 index 0000000000000000000000000000000000000000..eb9c12f7b2a19c85a79de149e356d4e362037daf --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/FilterTypeDto.java @@ -0,0 +1,28 @@ +package at.tuwien.api.database.query; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public enum FilterTypeDto { + + @JsonProperty("where") + WHERE("where"), + + @JsonProperty("or") + OR("or"), + + @JsonProperty("and") + AND("and"); + + private String name; + + FilterTypeDto(String name) { + this.name = name; + } + + @Override + public String toString() { + return this.name; + } +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/RefreshTokenRequestDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderDto.java similarity index 55% rename from dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/RefreshTokenRequestDto.java rename to dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderDto.java index 05b8dfd3b5f51007011ea2f2f0d87e34181aeae4..bb58ad483145927ee0f12fd60d553123228f488d 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/RefreshTokenRequestDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderDto.java @@ -1,4 +1,4 @@ -package at.tuwien.api.auth; +package at.tuwien.api.database.query; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; @@ -6,6 +6,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -14,11 +16,14 @@ import lombok.extern.jackson.Jacksonized; @AllArgsConstructor @Jacksonized @ToString -public class RefreshTokenRequestDto { +public class OrderDto { @NotNull - @JsonProperty("refresh_token") - @Schema(example = "refresh_token") - private String refreshToken; + @JsonProperty("column_id") + @Schema(example = "e891ba86-0258-41a6-a8d9-ff58bc10b618") + private UUID columnId; + + @Schema(example = "asc") + private OrderTypeDto direction; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderTypeDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderTypeDto.java new file mode 100644 index 0000000000000000000000000000000000000000..ee05a75e47995ef1153a0d8517430cb103cbcc34 --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/OrderTypeDto.java @@ -0,0 +1,25 @@ +package at.tuwien.api.database.query; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public enum OrderTypeDto { + + @JsonProperty("asc") + ASC("asc"), + + @JsonProperty("desc") + DESC("desc"); + + private String name; + + OrderTypeDto(String name) { + this.name = name; + } + + @Override + public String toString() { + return this.name; + } +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryBriefDto.java index 90a1af28bcf14d64d51eca1db1cc6b46760079fb..c55a108cfcb215bca68e2d826ab09be39283cccf 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryBriefDto.java @@ -12,6 +12,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @@ -25,11 +26,13 @@ import java.util.List; public class QueryBriefDto { @NotNull - private Long id; + @Schema(example = "83ea2326-f8f6-4263-baf8-cdf88a54efc7") + private UUID id; @NotNull @JsonProperty("database_id") - private Long databaseId; + @Schema(example = "1a6fb0c0-49c3-4a22-a515-35f7a3dd8e62") + private UUID databaseId; @NotNull private UserBriefDto owner; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryDto.java index 41cb641a5d8cdf8ccc6187c2f083447e4cdb4714..24915a3dd5f4cbe82dd93744d214b2488b99acd5 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/QueryDto.java @@ -1,5 +1,6 @@ package at.tuwien.api.database.query; +import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.identifier.IdentifierBriefDto; import at.tuwien.api.user.UserBriefDto; import com.fasterxml.jackson.annotation.JsonFormat; @@ -12,6 +13,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -24,13 +26,13 @@ import java.util.List; public class QueryDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "83ea2326-f8f6-4263-baf8-cdf88a54efc7") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID databaseId; @NotNull private UserBriefDto owner; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/SubsetDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/SubsetDto.java new file mode 100644 index 0000000000000000000000000000000000000000..6e8c238417a7d81d65a08b639fb3ddcd9b1750df --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/query/SubsetDto.java @@ -0,0 +1,35 @@ +package at.tuwien.api.database.query; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.*; +import lombok.extern.jackson.Jacksonized; + +import java.util.List; +import java.util.UUID; + +@Getter +@Setter +@Builder +@EqualsAndHashCode +@NoArgsConstructor +@AllArgsConstructor +@Jacksonized +@ToString +public class SubsetDto { + + @NotNull + @JsonProperty("table_id") + @Schema(example = "f7df2a7d-4ade-4c78-97b0-7c744d0893c7") + private UUID tableId; + + @NotNull + @Schema(example = "[\"e891ba86-0258-41a6-a8d9-ff58bc10b618\"]") + private List<UUID> columns; + + private List<FilterDto> filter; + + private List<OrderDto> order; + +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/HistoryEventTypeDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/HistoryEventTypeDto.java new file mode 100644 index 0000000000000000000000000000000000000000..83d8441752b2922860997b2703131317ed69dd63 --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/HistoryEventTypeDto.java @@ -0,0 +1,27 @@ +package at.tuwien.api.database.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; + +@Getter +@Schema +public enum HistoryEventTypeDto { + + @JsonProperty("insert") + INSERT("insert"), + + @JsonProperty("delete") + DELETE("delete"); + + private String name; + + HistoryEventTypeDto(String name) { + this.name = name; + } + + @Override + public String toString() { + return this.name; + } +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableBriefDto.java index 98932f30a294febdc3df41290888c0d6d3ae7e5d..3ba910b97950253569a080246cd603ccec6d9854 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableBriefDto.java @@ -20,13 +20,13 @@ import java.util.UUID; public class TableBriefDto { @NotNull - @Schema(example = "3") - private Long id; + @Schema(example = "41ed10e0-687b-4e18-8521-810f5cffbce1") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "2") - private Long databaseId; + @Schema(example = "a8fec026-dfaf-4b1d-8f6c-f01720d91705") + private UUID databaseId; @NotBlank @Schema(example = "Air Quality") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableDto.java index 1021d167ca1364eb63b06d321040e708c4f7d6e2..3dde7091830b02f226a0526885986c264e93704d 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableDto.java @@ -2,6 +2,7 @@ package at.tuwien.api.database.table; import at.tuwien.api.CacheableDto; import at.tuwien.api.container.ContainerDto; +import at.tuwien.api.database.DatabaseBriefDto; import at.tuwien.api.database.DatabaseDto; import at.tuwien.api.database.table.columns.ColumnDto; import at.tuwien.api.database.table.constraints.ConstraintsDto; @@ -18,6 +19,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -30,13 +32,13 @@ import java.util.List; public class TableDto extends CacheableDto { @NotNull - @Schema(example = "3") - private Long id; + @Schema(example = "d346f844-b84c-490f-9aec-725a2dc8f820") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "2") - private Long tdbid; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID databaseId; @NotBlank @Schema(example = "Air Quality") @@ -107,10 +109,6 @@ public class TableDto extends CacheableDto { @NotNull private List<ColumnDto> columns; - @ToString.Exclude - @EqualsAndHashCode.Exclude - private DatabaseDto database; - @NotNull private ConstraintsDto constraints; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableHistoryDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableHistoryDto.java index 35df29430ff652372bb11487ada42ae55c02367c..e6ed6672350788bf3dc730a5273f0a5b35ec0c7d 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableHistoryDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableHistoryDto.java @@ -24,7 +24,8 @@ public class TableHistoryDto { private Instant timestamp; @NotNull - private String event; + @Schema(example = "INSERT") + private HistoryEventTypeDto event; @NotNull @Schema(example = "1") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableKeyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableKeyDto.java deleted file mode 100644 index 010bc68af285bb9fadd741355687e1a9218d1448..0000000000000000000000000000000000000000 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/TableKeyDto.java +++ /dev/null @@ -1,24 +0,0 @@ -package at.tuwien.api.database.table; - -import jakarta.validation.constraints.NotNull; -import lombok.*; -import lombok.extern.jackson.Jacksonized; - -@Getter -@Setter -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Jacksonized -@ToString -public class TableKeyDto { - - @NotNull - private Long containerId; - - @NotNull - private Long databaseId; - - @NotNull - private Long id; -} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnBriefDto.java index bc13700bdd83dfac5fe23c133509c0184834b7a9..08ee40caa46f977fe3b7bd81055d94ab18d410c5 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnBriefDto.java @@ -8,6 +8,8 @@ import jakarta.validation.constraints.Size; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,18 +21,18 @@ import lombok.extern.jackson.Jacksonized; public class ColumnBriefDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "a453e444-e00d-41ca-902c-11e9c54b39f1") + private UUID id; @NotNull - @Schema(example = "2") @JsonProperty("database_id") - private Long databaseId; + @Schema(example = "911f9052-c58c-4e1c-b3f2-66af2107be16") + private UUID databaseId; @NotNull - @Schema(example = "3") @JsonProperty("table_id") - private Long tableId; + @Schema(example = "bfffa915-a547-4466-9c65-ddc0d38fdb08") + private UUID tableId; @NotBlank @Size(max = 64) diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnDto.java index 462821b53c0a8a01a7acb36f15a25641ac895cd8..0df8efbf23e1aef143ed7d999cd9fd252e691349 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/ColumnDto.java @@ -13,6 +13,7 @@ import lombok.extern.jackson.Jacksonized; import java.math.BigDecimal; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -25,18 +26,18 @@ import java.util.List; public class ColumnDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "a453e444-e00d-41ca-902c-11e9c54b39f1") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "2") - private Long databaseId; + @Schema(example = "911f9052-c58c-4e1c-b3f2-66af2107be16") + private UUID databaseId; @NotNull @JsonProperty("table_id") - @Schema(example = "3") - private Long tableId; + @Schema(example = "bfffa915-a547-4466-9c65-ddc0d38fdb08") + private UUID tableId; @NotNull @JsonProperty("ord") @@ -119,12 +120,10 @@ public class ColumnDto { @Schema(example = "false") private Boolean isNullAllowed; - @Schema(example = "[\"val1\"]") @Parameter(description = "enum values, only considered when type = ENUM") - private List<String> enums; + private List<EnumDto> enums; - @Schema(example = "[\"val1\"]") @Parameter(description = "enum values, only considered when type = ENUM") - private List<String> sets; + private List<SetDto> sets; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/CreateTableColumnDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/CreateTableColumnDto.java index ca7f3b8d58a3ee08a342b6df0452719c786b863b..9733f64a163fcede451627fbbe2fc6a9b8df405d 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/CreateTableColumnDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/CreateTableColumnDto.java @@ -28,7 +28,7 @@ public class CreateTableColumnDto { private Long indexLength; @NotNull - @Schema(example = "string") + @Schema(example = "varchar") private ColumnTypeDto type; @Schema(example = "255") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/SubjectModifyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/EnumDto.java similarity index 53% rename from dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/SubjectModifyDto.java rename to dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/EnumDto.java index a82f6669ed62eac5402e0141d2bf414d01dbc462..9038648513bb949a99895070cfcedf6e96260bbb 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/SubjectModifyDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/EnumDto.java @@ -1,10 +1,12 @@ -package at.tuwien.api.database; +package at.tuwien.api.database.table.columns; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -13,12 +15,14 @@ import lombok.extern.jackson.Jacksonized; @AllArgsConstructor @Jacksonized @ToString -public class SubjectModifyDto { +public class EnumDto { - private Long id; + @NotNull + @Schema(example = "5343bb3d-14d3-4eb7-a86f-b8fc553cb315") + private UUID id; @NotNull - @Schema(example = "air") - private String name; + @Schema(example = "3") + private String value; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/LoginRequestDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/SetDto.java similarity index 56% rename from dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/LoginRequestDto.java rename to dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/SetDto.java index 809de9881bc424fefe1da8937df03217facb1456..6986212592d56a16633fc41b0b7ce4b28257bc97 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/auth/LoginRequestDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/SetDto.java @@ -1,10 +1,12 @@ -package at.tuwien.api.auth; +package at.tuwien.api.database.table.columns; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -13,14 +15,14 @@ import lombok.extern.jackson.Jacksonized; @AllArgsConstructor @Jacksonized @ToString -public class LoginRequestDto { +public class SetDto { @NotNull - @Schema(example = "user") - private String username; + @Schema(example = "7eb4eded-bacc-4a91-84db-a9ae6ddafda7") + private UUID id; @NotNull - @ToString.Exclude - private String password; + @Schema(example = "3") + private String value; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptBriefDto.java index 3cc1231c7452aa809ef7ecf4d85244d0c9f400e0..160807e7aaf1e7c59e33dc7813a4d4691fd06ba3 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptBriefDto.java @@ -6,6 +6,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -17,8 +19,8 @@ import lombok.extern.jackson.Jacksonized; public class ConceptBriefDto { @NotNull - @Schema(example = "23") - private Long id; + @Schema(example = "8cabc011-4bdf-44d4-9d33-b2648e2ddbf1") + private UUID id; @NotBlank @Schema(example = "http://www.wikidata.org/entity/Q202444") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptDto.java index da00e64e8362ed298ba2bb9e2e98a596af716431..13595569439bc999e40c58a2be29469883631909 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/ConceptDto.java @@ -1,12 +1,14 @@ package at.tuwien.api.database.table.columns.concepts; import at.tuwien.api.database.table.columns.ColumnBriefDto; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -19,7 +21,8 @@ import java.util.List; public class ConceptDto { @NotNull - private Long id; + @Schema(example = "8cabc011-4bdf-44d4-9d33-b2648e2ddbf1") + private UUID id; @NotBlank private String uri; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitBriefDto.java index 15d9ae90823e05491b692932af518a768cfc1305..789f3de1500900848205e0598e8fab89f9a50c11 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitBriefDto.java @@ -6,6 +6,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -17,8 +19,8 @@ import lombok.extern.jackson.Jacksonized; public class UnitBriefDto { @NotNull - @Schema(example = "34") - private Long id; + @Schema(example = "ba1935e8-6817-488f-af0a-f54389af9000") + private UUID id; @NotBlank @Schema(example = "http://www.wikidata.org/entity/Q1422583") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitDto.java index 48c7180c067123ec4ea09b0eb1b6cd167c4c9d7b..ca3899f7cc1f7d858d4e85fa0aa3107e6633dbf7 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/columns/concepts/UnitDto.java @@ -1,12 +1,14 @@ package at.tuwien.api.database.table.columns.concepts; import at.tuwien.api.database.table.columns.ColumnBriefDto; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -19,7 +21,8 @@ import java.util.List; public class UnitDto { @NotNull - private Long id; + @Schema(example = "ba1935e8-6817-488f-af0a-f54389af9000") + private UUID id; @NotBlank private String uri; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/CreateForeignKeyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/CreateForeignKeyDto.java index 31e43b0c6a4377b59d096f5acf5b6bf43067a295..5e1d0a9f86c8055c69d5c4c03ac8f7c06aec6206 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/CreateForeignKeyDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/CreateForeignKeyDto.java @@ -1,6 +1,7 @@ package at.tuwien.api.database.table.constraints.foreign; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; @@ -17,19 +18,24 @@ import java.util.List; public class CreateForeignKeyDto { @NotNull + @Schema(example = "[\"id\"]") private List<String> columns; @NotNull + @Schema(example = "sensor") @JsonProperty("referenced_table") private String referencedTable; @NotNull + @Schema(example = "[\"other_id\"]") @JsonProperty("referenced_columns") private List<String> referencedColumns; + @Schema(example = "cascade") @JsonProperty("on_update") private ReferenceTypeDto onUpdate; + @Schema(example = "cascade") @JsonProperty("on_delete") private ReferenceTypeDto onDelete; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyBriefDto.java index 56dd9863245a51219c1604c43636dd27adea2bd8..4acc205efdebaec4b6e82c322a539d9fb945a30c 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyBriefDto.java @@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -13,6 +15,6 @@ import lombok.extern.jackson.Jacksonized; @ToString public class ForeignKeyBriefDto { - @Schema(example = "8") - private Long id; + @Schema(example = "f2b740ec-0b13-4d07-88a9-529d354bba6a") + private UUID id; } diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyDto.java index 254666f9eb6b056501bc08ecebb745c5eac61345..94063c77dc579a13aad2c52af5ac32739fdf89d0 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyDto.java @@ -10,6 +10,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -20,8 +21,8 @@ import java.util.List; @ToString public class ForeignKeyDto { - @Schema(example = "4") - private Long id; + @Schema(example = "f2b740ec-0b13-4d07-88a9-529d354bba6a") + private UUID id; @NotNull @Schema(example = "fk_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyReferenceDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyReferenceDto.java index f0d5b249cdbc41222a5c71c6d41855f1aa5cc5df..2423b92a624042f6b638b8baa1b1dbe818b14235 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyReferenceDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/foreign/ForeignKeyReferenceDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -16,8 +18,8 @@ import lombok.extern.jackson.Jacksonized; @ToString public class ForeignKeyReferenceDto { - @Schema(example = "8") - private Long id; + @Schema(example = "f2b740ec-0b13-4d07-88a9-529d354bba6a") + private UUID id; @NotNull @JsonProperty("foreign_key") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/primary/PrimaryKeyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/primary/PrimaryKeyDto.java index 86d1d49960d2c9496ce5d23e26fa99edadec344e..59117a579576e86cd9b01828695de57aaece9fd7 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/primary/PrimaryKeyDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/primary/PrimaryKeyDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -16,8 +18,8 @@ import lombok.extern.jackson.Jacksonized; @ToString public class PrimaryKeyDto { - @Schema(example = "8") - private Long id; + @Schema(example = "d984f9d7-e8a7-4b81-b59a-862db1871f18") + private UUID id; @NotNull private TableBriefDto table; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/unique/UniqueDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/unique/UniqueDto.java index 755f3a31b7a9634bff74c8992bb384719297c256..64db6dfde0b0ce6d8de017a0cba9f61c7e64d304 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/unique/UniqueDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/database/table/constraints/unique/UniqueDto.java @@ -8,6 +8,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -19,8 +20,8 @@ import java.util.List; public class UniqueDto { @NotNull - @Schema(example = "5") - private Long id; + @Schema(example = "d984f9d7-e8a7-4b81-b59a-862db1871f13") + private UUID id; @NotNull @Schema(example = "uk_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/file/UploadResponseDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/file/UploadResponseDto.java new file mode 100644 index 0000000000000000000000000000000000000000..3b1cdab22301aa8d97a9427d9fc58fe5398d542d --- /dev/null +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/file/UploadResponseDto.java @@ -0,0 +1,19 @@ +package at.tuwien.api.file; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import lombok.*; + +@Getter +@Setter +@ToString +@Builder +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class UploadResponseDto { + + @NotBlank + @JsonProperty("s3_key") + String s3Key; +} diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreateIdentifierDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreateIdentifierDto.java index db55272383828e1bfc0c870f086ecc2c27ecba03..5f2e73fc07badf436c3527fc8423b21d641967b7 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreateIdentifierDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreateIdentifierDto.java @@ -11,6 +11,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -23,20 +24,20 @@ public class CreateIdentifierDto { @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "d002e8d5-8db4-4ff7-ab3a-bc3f52d9ec44") + private UUID databaseId; @JsonProperty("query_id") @Schema(example = "null") - private Long queryId; + private UUID queryId; @JsonProperty("view_id") @Schema(example = "null") - private Long viewId; + private UUID viewId; @JsonProperty("table_id") @Schema(example = "null") - private Long tableId; + private UUID tableId; @NotNull @Schema(example = "database") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorBriefDto.java index 8265a1106bc8daef632f887e9c38c148d765fb01..95b0d588f7bccc0c812c3bd823f94022d3da9d38 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorBriefDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @@ -19,8 +21,8 @@ import lombok.extern.jackson.Jacksonized; public class CreatorBriefDto { @NotNull - @Schema(example = "11") - private Long id; + @Schema(example = "e41f94a6-2b94-4a12-ac0e-678684e1c070") + private UUID id; @NotBlank @JsonProperty("creator_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorDto.java index a3a2976901aee60e60162788dd10df239206e826..1382baec51d8f3de1b048fafc8d8f564aecc6e4f 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/CreatorDto.java @@ -9,6 +9,8 @@ import jakarta.validation.constraints.NotNull; import lombok.extern.jackson.Jacksonized; import org.springframework.data.annotation.Id; +import java.util.UUID; + @Getter @Setter @@ -21,8 +23,8 @@ import org.springframework.data.annotation.Id; public class CreatorDto { @NotNull - @Schema(example = "11") - private Long id; + @Schema(example = "e41f94a6-2b94-4a12-ac0e-678684e1c070") + private UUID id; @Schema(example = "Josiah") private String firstname; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierBriefDto.java index f94edc2cf75421855a8bcd761252e6aba249bb27..0434d1b21fe85c60b0596507e65e1bb7a67b3be9 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierBriefDto.java @@ -20,25 +20,25 @@ import java.util.UUID; public class IdentifierBriefDto { @NotNull - @Schema(example = "2") - private Long id; + @Schema(example = "b97cd56b-66ca-4354-9e6c-f47210cfaaec") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "fc29f89c-86a8-4020-9e36-4d954736c6cc") + private UUID databaseId; @JsonProperty("query_id") @Schema(example = "1") - private Long queryId; + private UUID queryId; @JsonProperty("table_id") @Schema(example = "1") - private Long tableId; + private UUID tableId; @JsonProperty("view_id") @Schema(example = "1") - private Long viewId; + private UUID viewId; @NotNull @Schema(example = "database") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDescriptionDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDescriptionDto.java index fbcbb3afe7b6cb9ca27aee16b2875c5ed5d03c1b..32ff2455ccde07b8d8ce39ad674245d65dd21174 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDescriptionDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDescriptionDto.java @@ -8,6 +8,8 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import org.springframework.data.annotation.Id; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,8 +21,8 @@ import org.springframework.data.annotation.Id; public class IdentifierDescriptionDto { @NotNull - @Schema(example = "3") - private Long id; + @Schema(example = "e0e9692c-910b-4b60-b53a-fc7c358a917d") + private UUID id; @Schema(example = "Air quality reports at Stephansplatz, Vienna") private String description; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java index 53d40ecd781169f531a6cf215d370fd69be9d2b0..57ecb5ad625017fec1571a1da53a83cbd5fcf852 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierDto.java @@ -13,6 +13,7 @@ import lombok.extern.jackson.Jacksonized; import java.time.Instant; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -25,25 +26,25 @@ import java.util.List; public class IdentifierDto { @NotNull - @Schema(example = "2") - private Long id; + @Schema(example = "b97cd56b-66ca-4354-9e6c-f47210cfaaec") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "null") + private UUID databaseId; @JsonProperty("query_id") - @Schema(example = "1") - private Long queryId; + @Schema(example = "null") + private UUID queryId; @JsonProperty("table_id") - @Schema(example = "1") - private Long tableId; + @Schema(example = "null") + private UUID tableId; @JsonProperty("view_id") - @Schema(example = "1") - private Long viewId; + @Schema(example = "null") + private UUID viewId; @NotNull @Schema(example = "database") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierFunderDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierFunderDto.java index 93084d2d17679b94d825600761c1aa03c3b1bdde..4184f2cf2afade6121711cca63a629b047156120 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierFunderDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierFunderDto.java @@ -8,6 +8,8 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import org.springframework.data.annotation.Id; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,8 +21,8 @@ import org.springframework.data.annotation.Id; public class IdentifierFunderDto { @NotNull - @Schema(example = "2") - private Long id; + @Schema(example = "39693413-e0ce-46da-ad5e-029c0556d439") + private UUID id; @NotBlank @JsonProperty("funder_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierSaveDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierSaveDto.java index ed4d445de0ffd2686a84331981d3d5899a4a9b65..f63c3ae79cdc84c9c4ec85edb62917282e06c815 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierSaveDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierSaveDto.java @@ -11,6 +11,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.util.List; +import java.util.UUID; @Getter @Setter @@ -22,25 +23,25 @@ import java.util.List; public class IdentifierSaveDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "68e11675-1e0f-4d24-a6d9-887ad1c4445d") + private UUID id; @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "null") + private UUID databaseId; @JsonProperty("query_id") @Schema(example = "null") - private Long queryId; + private UUID queryId; @JsonProperty("view_id") @Schema(example = "null") - private Long viewId; + private UUID viewId; @JsonProperty("table_id") @Schema(example = "null") - private Long tableId; + private UUID tableId; @NotNull @Schema(example = "database") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierTitleDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierTitleDto.java index 27e3b323eaca7d9ab481af61059a05fbe576c42d..d995527d88d281e22f96b220cd0566e05811dbbc 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierTitleDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/IdentifierTitleDto.java @@ -8,6 +8,8 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import org.springframework.data.annotation.Id; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,8 +21,8 @@ import org.springframework.data.annotation.Id; public class IdentifierTitleDto { @NotNull - @Schema(example = "4") - private Long id; + @Schema(example = "70ce5164-fd74-413f-8712-f996b91defbf") + private UUID id; @Schema(example = "Airquality Demonstrator") private String title; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/RelatedIdentifierDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/RelatedIdentifierDto.java index 6ff5d9aed1297f5a12755d76d03cc668a273e0e5..7205bc6e0b76e823bb3d2405aced77dd41b9adb5 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/RelatedIdentifierDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/RelatedIdentifierDto.java @@ -12,6 +12,7 @@ import lombok.extern.jackson.Jacksonized; import org.springframework.data.annotation.Id; import java.time.Instant; +import java.util.UUID; @Getter @Setter @@ -24,8 +25,8 @@ import java.time.Instant; public class RelatedIdentifierDto { @NotNull - @Schema(example = "8") - private Long id; + @Schema(example = "ce9d11f0-60a2-448d-a3e4-44719a443e8a") + private UUID id; @NotNull @Schema(example = "10.70124/dc4zh-9ce78") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierCreatorDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierCreatorDto.java index c87ff81d3c058edd475d89102c8e29468dae211e..0866a5cb3b5dc36f7ad0484dddf860c7371816d9 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierCreatorDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierCreatorDto.java @@ -8,6 +8,8 @@ import lombok.*; import jakarta.validation.constraints.NotBlank; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -18,8 +20,8 @@ import lombok.extern.jackson.Jacksonized; public class SaveIdentifierCreatorDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "da9dd034-00a8-4517-b93d-d1b2adfee418") + private UUID id; @Schema(example = "Josiah") private String firstname; diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierDescriptionDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierDescriptionDto.java index 1d251db634d4f1a6cb0b369013c113aae69f1968..bc1ad4f3dfd98fbbbd4c2edc1d73f562cc1f0d23 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierDescriptionDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierDescriptionDto.java @@ -8,6 +8,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -18,8 +20,8 @@ import lombok.extern.jackson.Jacksonized; public class SaveIdentifierDescriptionDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "35bd84d8-b181-43c8-b786-4d024e4f843c") + private UUID id; @NotBlank @Schema(example = "Air quality reports at Stephansplatz, Vienna") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierFunderDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierFunderDto.java index 89bea57a1cf5c69a4184fae5edc3d77f8062bb39..1709c109b28a9aa3c57c10bcea1589d445d91c6c 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierFunderDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierFunderDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -17,8 +19,8 @@ import lombok.extern.jackson.Jacksonized; public class SaveIdentifierFunderDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "1c6b9212-a315-44b9-946c-3682a7a0e517") + private UUID id; @NotBlank @JsonProperty("funder_name") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierTitleDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierTitleDto.java index 0832a77cee0323db7220cf88ff295982fee2c0a1..07ebc35e2ca6ce2458746ee9253dbf9dc296a337 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierTitleDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveIdentifierTitleDto.java @@ -8,6 +8,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -18,8 +20,8 @@ import lombok.extern.jackson.Jacksonized; public class SaveIdentifierTitleDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "2af9f40e-eaf5-4ea1-861a-1a696587bf29") + private UUID id; @NotBlank @Schema(example = "Airquality Demonstrator") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveRelatedIdentifierDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveRelatedIdentifierDto.java index b3a95eee06fe4cc0cb91fb8df822e52c3f507221..d22c8216e366d602e119abe824af6f543a5fac8f 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveRelatedIdentifierDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/identifier/SaveRelatedIdentifierDto.java @@ -6,6 +6,8 @@ import lombok.extern.jackson.Jacksonized; import jakarta.validation.constraints.NotNull; +import java.util.UUID; + @Getter @Setter @Builder @@ -16,8 +18,8 @@ import jakarta.validation.constraints.NotNull; public class SaveRelatedIdentifierDto { @NotNull - @Schema(example = "1") - private Long id; + @Schema(example = "5bb272c7-7421-4f74-83ac-0486812d0f44") + private UUID id; @NotNull @Schema(example = "10.70124/dc4zh-9ce78") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/maintenance/BannerMessageDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/maintenance/BannerMessageDto.java index e9c15c212e100f997e6c4afc6c585a4726e92feb..d344ccd6b461460d77b7f865ab03e44d84fc6956 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/maintenance/BannerMessageDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/maintenance/BannerMessageDto.java @@ -9,6 +9,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.time.Instant; +import java.util.UUID; @Getter @Setter @@ -21,9 +22,11 @@ import java.time.Instant; public class BannerMessageDto { @NotNull - private Long id; + @Schema(example = "ae3f795b-a3da-4ebe-bdc4-21a8ce631e6f") + private UUID id; @NotNull + @Schema(example = "WARNING") private BannerMessageTypeDto type; @NotBlank diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyBriefDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyBriefDto.java index b908b6e09e26ea5938b7eb0b44554db0a746d22e..29d5116a70bfe3b59c1223534616eebb80b9c57e 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyBriefDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyBriefDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -18,7 +20,8 @@ import lombok.extern.jackson.Jacksonized; public class OntologyBriefDto { @NotNull - private Long id; + @Schema(example = "7c491e40-082a-47b8-b82c-51d03c520466") + private UUID id; @NotBlank @Schema(example = "http://www.wikidata.org/") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyDto.java index 686cd9f030c952ace5d85a0eecb3f049bcd1a2a9..a3e7c46d014d5de6c06ec5ed3608f51cb8700de3 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/OntologyDto.java @@ -10,6 +10,7 @@ import lombok.*; import lombok.extern.jackson.Jacksonized; import java.time.Instant; +import java.util.UUID; @Getter @Setter @@ -22,7 +23,8 @@ import java.time.Instant; public class OntologyDto { @NotNull - private Long id; + @Schema(example = "7c491e40-082a-47b8-b82c-51d03c520466") + private UUID id; @NotBlank @Schema(example = "http://www.wikidata.org/") diff --git a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/TableColumnEntityDto.java b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/TableColumnEntityDto.java index 79ea8d6a5a511a5794df53c455dddd912678219e..f4a2147a29cbdb1f0ee7aa03a26fa500eb370d91 100644 --- a/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/TableColumnEntityDto.java +++ b/dbrepo-metadata-service/api/src/main/java/at/tuwien/api/semantics/TableColumnEntityDto.java @@ -7,6 +7,8 @@ import jakarta.validation.constraints.NotNull; import lombok.*; import lombok.extern.jackson.Jacksonized; +import java.util.UUID; + @Getter @Setter @Builder @@ -19,18 +21,18 @@ public class TableColumnEntityDto { @NotNull @JsonProperty("database_id") - @Schema(example = "1") - private Long databaseId; + @Schema(example = "475b4107-a64d-4495-a7ef-3cb0dadd4804") + private UUID databaseId; @NotNull @JsonProperty("table_id") - @Schema(example = "1") - private Long tableId; + @Schema(example = "9a9208af-90ea-4382-9a11-0c8f6d89bd1f") + private UUID tableId; @NotNull @JsonProperty("column_id") - @Schema(example = "1") - private Long columnId; + @Schema(example = "297860e3-3b29-451c-ae8a-a85ed5941018") + private UUID columnId; @NotBlank @Schema(example = "https://www.wikidata.org/entity/Q1686799") diff --git a/dbrepo-metadata-service/entities/pom.xml b/dbrepo-metadata-service/entities/pom.xml index b73a11050c8d9ea55bf8649a1694bfc1c00c7600..313309e18831501558a149cab52920bb90e89e91 100644 --- a/dbrepo-metadata-service/entities/pom.xml +++ b/dbrepo-metadata-service/entities/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-entities</artifactId> <name>dbrepo-metadata-service-entity</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies/> diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/Container.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/Container.java index a2fb1264cc360f0de0d5502306b215d79a442a70..458dcec7ebb282ff5abc703668aa8010ca3e5d97 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/Container.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/Container.java @@ -5,14 +5,14 @@ import at.tuwien.entities.database.Database; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import java.util.List; - -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -26,9 +26,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Container { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false) private String name; @@ -48,8 +48,8 @@ public class Container { @Column private Integer uiPort; - @Column(nullable = false, columnDefinition = "INT DEFAULT 50") - private Integer quota = 50; + @Column + private Integer quota; @Column private String uiAdditionalFlags; @@ -84,4 +84,11 @@ public class Container { @Column private String privilegedPassword; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java index 7e04ce2086c3b4e9e677548b106cc28ddc9756ee..336a278d7d8ff6f2f4d2b56ebbde1f156e198659 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/ContainerImage.java @@ -4,14 +4,14 @@ import at.tuwien.entities.container.Container; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import java.util.List; - -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -28,9 +28,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class ContainerImage { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - public Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false) private String name; @@ -79,4 +79,11 @@ public class ContainerImage { @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL, CascadeType.PERSIST}, mappedBy = "image") private List<Operator> operators; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java index 5f4ddbfb8c6dd8a657a88432d4606fa6f9c56f7e..347ca47e960e74f846eea32b3ddc166e3a0efc0e 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/DataType.java @@ -2,9 +2,10 @@ package at.tuwien.entities.container.image; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -18,9 +19,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class DataType { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - public Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(name = "display_name", nullable = false) private String displayName; @@ -75,4 +76,11 @@ public class DataType { }) private ContainerImage image; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java index 1ecedc5e16cef533008a28db7d022acab336c8d7..adeb6dd8ef7c977222021d3c1b0fdb54fb304a17 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/container/image/Operator.java @@ -2,9 +2,10 @@ package at.tuwien.entities.container.image; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -18,9 +19,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Operator { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - public Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(name = "display_name", nullable = false) private String displayName; @@ -39,4 +40,11 @@ public class Operator { }) private ContainerImage image; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/Database.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/Database.java index d90a702db33c759a511480fa0e89c37efc2773fc..b57f04066856d37fd35944b052e832bf0db4e4f6 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/Database.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/Database.java @@ -33,6 +33,7 @@ import static jakarta.persistence.GenerationType.IDENTITY; }) @NamedQueries({ @NamedQuery(name = "Database.findAllDesc", query = "select distinct d from Database d order by d.id desc"), + @NamedQuery(name = "Database.findAllByInternalNameDesc", query = "select distinct d from Database d where d.internalName = ?1 order by d.id desc"), @NamedQuery(name = "Database.findAllAtLestReadAccessDesc", query = "select distinct d from Database d where exists(select a.hdbid from DatabaseAccess a where a.huserid = ?1 and a.hdbid = d.id) order by d.id desc"), @NamedQuery(name = "Database.findAllPublicOrSchemaPublicDesc", query = "select distinct d from Database d where d.isPublic = true or d.isSchemaPublic = true order by d.id desc"), @NamedQuery(name = "Database.findAllPublicOrSchemaPublicOrReadAccessDesc", query = "select distinct d from Database d where d.isPublic = true or d.isSchemaPublic = true or exists(select a.hdbid from DatabaseAccess a where a.huserid = ?1 and a.hdbid = d.id) order by d.id desc"), @@ -42,9 +43,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Database implements Serializable { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @JdbcTypeCode(java.sql.Types.VARCHAR) @Column(name = "owned_by", columnDefinition = "VARCHAR(36)") @@ -56,8 +57,8 @@ public class Database implements Serializable { }) private User owner; - @Column(nullable = false) - private Long cid; + @Column(nullable = false, columnDefinition = "VARCHAR(36)") + private UUID cid; @ToString.Exclude @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE) @@ -131,4 +132,11 @@ public class Database implements Serializable { @Column(columnDefinition = "TIMESTAMP") private Instant lastModified; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccess.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccess.java index 6a2622be3e7137c97b68ab9ad91e24edd4fae293..e5f7dd3012d9d5b510f7e072dfadf255297e4a8e 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccess.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccess.java @@ -42,8 +42,9 @@ public class DatabaseAccess { private User user; @Id - @Column(name = "database_id", updatable = false) - private Long hdbid; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(name = "database_id", nullable = false, columnDefinition = "VARCHAR(36)") + private UUID hdbid; @ToString.Exclude @EqualsAndHashCode.Exclude diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccessKey.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccessKey.java index 83806068525ef9073e0bb18ca01b1a933f74a090..b6963c290c38186fc7d78af149b07622804e7301 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccessKey.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/DatabaseAccessKey.java @@ -10,5 +10,5 @@ public class DatabaseAccessKey implements Serializable { private UUID huserid; - private Long hdbid; + private UUID hdbid; } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/View.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/View.java index 67e6d6d18ac26a1cb2641ed45ae9e969c7393164..8f84a8f066d577e6ba009f6ffbc4ff144d671fc8 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/View.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/View.java @@ -17,8 +17,6 @@ import java.time.Instant; import java.util.List; import java.util.UUID; -import static jakarta.persistence.GenerationType.IDENTITY; - @Data @Entity @Builder @@ -27,7 +25,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; @NoArgsConstructor @EqualsAndHashCode @EntityListeners(AuditingEntityListener.class) -@Table(name = "mdb_view") +@Table(name = "mdb_view", uniqueConstraints = { + @UniqueConstraint(columnNames = {"vdbid", "internalName"}) +}) @NamedQueries({ @NamedQuery(name = "View.findAllPublicByDatabaseId", query = "select v from View v where v.database.id = ?1 and v.isPublic = true"), @NamedQuery(name = "View.findAllPublicOrMineByDatabaseId", query = "select v from View v where v.database.id = ?1 and (v.isPublic = true or v.ownedBy = ?2)"), @@ -37,13 +37,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class View { @Id - @org.springframework.data.annotation.Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; - - @Column(updatable = false, nullable = false) - private Long vdbid; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @ToString.Exclude @JdbcTypeCode(java.sql.Types.VARCHAR) @@ -90,10 +86,9 @@ public class View { @ToString.Exclude @EqualsAndHashCode.Exclude - @org.springframework.data.annotation.Transient @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ - @JoinColumn(name = "vdbid", referencedColumnName = "id", insertable = false, updatable = false) + @JoinColumn(name = "vdbid", referencedColumnName = "id") }) private Database database; @@ -114,4 +109,11 @@ public class View { @Column(columnDefinition = "TIMESTAMP") private Instant lastModified; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java index 7ef6e8b9d63c30e05313514c78ad562306318185..2b18132e8cca75d05ee203143a5dbba40eabf21f 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/ViewColumn.java @@ -3,8 +3,11 @@ package at.tuwien.entities.database; import at.tuwien.entities.database.table.columns.TableColumnType; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; +import java.util.UUID; + import static jakarta.persistence.GenerationType.IDENTITY; @Data @@ -21,9 +24,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class ViewColumn implements Comparable<ViewColumn> { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @ToString.Exclude @EqualsAndHashCode.Exclude @@ -59,4 +62,11 @@ public class ViewColumn implements Comparable<ViewColumn> { public int compareTo(ViewColumn viewColumn) { return Integer.compare(this.ordinalPosition, viewColumn.getOrdinalPosition()); } + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/Table.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/Table.java index 3cdb01d7d38477cc8a77b4e12ed9af61d04ecfba..1e2aa72b924cdd6c1a37aa5c98f64728ba92fc20 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/Table.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/Table.java @@ -38,12 +38,12 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Table { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(name = "ID", updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(updatable = false, nullable = false) - private Long tdbid; + private UUID tdbid; @JdbcTypeCode(java.sql.Types.VARCHAR) @Column(name = "owned_by", columnDefinition = "VARCHAR(36)") @@ -128,5 +128,12 @@ public class Table { @Column(columnDefinition = "TIMESTAMP") private Instant lastModified; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnEnum.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..99002c812970c355b27ead84e2f6ad3626ec2132 --- /dev/null +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnEnum.java @@ -0,0 +1,45 @@ +package at.tuwien.entities.database.table.columns; + +import jakarta.persistence.*; +import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; + +import java.util.UUID; + +import static jakarta.persistence.GenerationType.IDENTITY; + +@Data +@Entity +@Builder(toBuilder = true) +@ToString +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode +@jakarta.persistence.Table(name = "mdb_columns_enums", uniqueConstraints = { + @UniqueConstraint(columnNames = {"value"}) +}) +public class ColumnEnum { + + @Id + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; + + @ToString.Exclude + @EqualsAndHashCode.Exclude + @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE}) + @JoinColumns({ + @JoinColumn(name = "column_id", referencedColumnName = "id", nullable = false) + }) + private TableColumn column; + + @Column(columnDefinition = "VARCHAR(255)") + private String value; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } +} diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnSet.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnSet.java new file mode 100644 index 0000000000000000000000000000000000000000..036c0202db40719227b90e6be6f30a8157a5e0fd --- /dev/null +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/ColumnSet.java @@ -0,0 +1,45 @@ +package at.tuwien.entities.database.table.columns; + +import jakarta.persistence.*; +import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; + +import java.util.UUID; + +import static jakarta.persistence.GenerationType.IDENTITY; + +@Data +@Entity +@Builder(toBuilder = true) +@ToString +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode +@Table(name = "mdb_columns_sets", uniqueConstraints = { + @UniqueConstraint(columnNames = {"value"}) +}) +public class ColumnSet { + + @Id + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; + + @ToString.Exclude + @EqualsAndHashCode.Exclude + @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE}) + @JoinColumns({ + @JoinColumn(name = "column_id", referencedColumnName = "id", nullable = false) + }) + private TableColumn column; + + @Column(columnDefinition = "VARCHAR(255)") + private String value; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } +} diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java index 9f4c4e0606802a475e5873e3d0ebc57455a6a0e2..eefa648dfd2aea752e1fd8a5944ea3fe51c234c3 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumn.java @@ -4,6 +4,9 @@ import at.tuwien.entities.database.table.Table; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; +import org.hibernate.annotations.OnDelete; +import org.hibernate.annotations.OnDeleteAction; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; @@ -11,6 +14,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.math.BigDecimal; import java.time.Instant; import java.util.List; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -31,9 +35,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class TableColumn implements Comparable<TableColumn> { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @ToString.Exclude @EqualsAndHashCode.Exclude @@ -83,15 +87,13 @@ public class TableColumn implements Comparable<TableColumn> { inverseJoinColumns = @JoinColumn(name = "id", referencedColumnName = "id")) private TableColumnUnit unit; - @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) - @CollectionTable(name = "mdb_columns_enums", joinColumns = @JoinColumn(name = "column_id")) - @Column(name = "value", nullable = false) - private List<String> enums; + @OnDelete(action = OnDeleteAction.CASCADE) + @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}, mappedBy = "column") + private List<ColumnEnum> enums; - @ElementCollection(fetch = FetchType.LAZY, targetClass = String.class) - @CollectionTable(name = "mdb_columns_sets", joinColumns = @JoinColumn(name = "column_id")) - @Column(name = "value", nullable = false) - private List<String> sets; + @OnDelete(action = OnDeleteAction.CASCADE) + @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.MERGE, CascadeType.PERSIST}, mappedBy = "column") + private List<ColumnSet> sets; @Column private Long size; @@ -129,4 +131,11 @@ public class TableColumn implements Comparable<TableColumn> { public int compareTo(TableColumn tableColumn) { return Integer.compare(this.ordinalPosition, tableColumn.getOrdinalPosition()); } + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnConcept.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnConcept.java index 5a9e8292be0af3e99050bc87be1ba7b8b9756bf7..edf39d84e36a41fdf9d783fb3c5fdaea4fd920cf 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnConcept.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnConcept.java @@ -3,11 +3,13 @@ package at.tuwien.entities.database.table.columns; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import java.util.List; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -29,9 +31,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class TableColumnConcept { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(updatable = false, nullable = false, columnDefinition = "TEXT") private String uri; @@ -57,4 +59,11 @@ public class TableColumnConcept { }, joinColumns = @JoinColumn(name = "id", referencedColumnName = "id")) private List<TableColumn> columns; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnUnit.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnUnit.java index 7e8fe915b3b9de49e53eb0806da1f5ed03608a1d..9d48062d33a3489892fee857b0c06440336e362c 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnUnit.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/columns/TableColumnUnit.java @@ -3,11 +3,13 @@ package at.tuwien.entities.database.table.columns; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; import java.util.List; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -29,9 +31,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class TableColumnUnit { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(updatable = false, nullable = false, columnDefinition = "TEXT") private String uri; @@ -57,4 +59,11 @@ public class TableColumnUnit { }, joinColumns = @JoinColumn(name = "id", referencedColumnName = "id")) private List<TableColumn> columns; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKey.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKey.java index 76de9463cfa37048fb45d2b091b472190124ff1b..92271b32328ed66215311389de57413b722d5ebe 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKey.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKey.java @@ -3,11 +3,11 @@ package at.tuwien.entities.database.table.constraints.foreignKey; import at.tuwien.entities.database.table.Table; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.util.List; - -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -21,9 +21,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class ForeignKey { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(name = "fkid", updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(name = "fkid", nullable = false, columnDefinition = "VARCHAR(36) DEFAULT UUID()") + private UUID id; @Column(updatable = false, nullable = false) private String name; @@ -54,4 +54,11 @@ public class ForeignKey { @Column(columnDefinition = "VARCHAR(50)") @Enumerated(EnumType.STRING) private ReferenceType onDelete; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKeyReference.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKeyReference.java index ed2691fc524a3de33788ed977b1ba213b18b5bfe..850b25ac5ca3d156600c5c0b5be92663c33f2cca 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKeyReference.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/foreignKey/ForeignKeyReference.java @@ -3,8 +3,11 @@ package at.tuwien.entities.database.table.constraints.foreignKey; import at.tuwien.entities.database.table.columns.TableColumn; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; +import java.util.UUID; + import static jakarta.persistence.GenerationType.IDENTITY; @Data @@ -21,9 +24,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class ForeignKeyReference { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @ToString.Exclude @EqualsAndHashCode.Exclude @@ -45,4 +48,11 @@ public class ForeignKeyReference { }) private TableColumn referencedColumn; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/primaryKey/PrimaryKey.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/primaryKey/PrimaryKey.java index 407e2fb7f3f98b6a8b65d28636c92afaceb3e69c..26e0f132991a5b8bf7a1b2f572575f8f6a48820f 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/primaryKey/PrimaryKey.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/primaryKey/PrimaryKey.java @@ -4,9 +4,10 @@ import at.tuwien.entities.database.table.Table; import at.tuwien.entities.database.table.columns.TableColumn; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -20,9 +21,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class PrimaryKey { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(name = "pkid", updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(name = "pkid", nullable = false, columnDefinition = "VARCHAR(36) DEFAULT UUID()") + private UUID id; @ToString.Exclude @EqualsAndHashCode.Exclude @@ -41,4 +42,11 @@ public class PrimaryKey { @JoinColumn(name = "cid", referencedColumnName = "id", nullable = false) }) private TableColumn column; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/unique/Unique.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/unique/Unique.java index c0dfc467109cf794dda89925393b442286254da5..e1ad4c4c4d167bf5ccf21b33d5a22e67d424d988 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/unique/Unique.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/database/table/constraints/unique/Unique.java @@ -4,11 +4,11 @@ import at.tuwien.entities.database.table.Table; import at.tuwien.entities.database.table.columns.TableColumn; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.util.List; - -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -22,9 +22,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Unique { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(name = "uid", updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(name = "uid", nullable = false, columnDefinition = "VARCHAR(36) DEFAULT UUID()") + private UUID id; @Column(updatable = false, nullable = false) private String name; @@ -51,4 +51,11 @@ public class Unique { } ) private List<TableColumn> columns; + + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Creator.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Creator.java index 1b0692ae50adf8d6ca280a5403908cb3e8d65f42..cdbcf797773cc2d7e9d7dbdecb6dc0fcb0d6afae 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Creator.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Creator.java @@ -2,8 +2,11 @@ package at.tuwien.entities.identifier; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; +import java.util.UUID; + import static jakarta.persistence.GenerationType.IDENTITY; @Data @@ -18,10 +21,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Creator { @Id - @org.springframework.data.annotation.Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(name = "given_names") private String firstname; @@ -104,4 +106,11 @@ public class Creator { return this.getFirstname().charAt(0) + ". " + this.getLastname(); } + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Identifier.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Identifier.java index b98a1b8c6b7509ef0772f69e2af343b1b63d386e..43dbb849e341c7aba5dbfc4a3097115ef1ce378b 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Identifier.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/Identifier.java @@ -39,18 +39,18 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Identifier implements Serializable { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; - @Column(name = "qid") - private Long queryId; + @Column(name = "qid", columnDefinition = "VARCHAR(36)") + private UUID queryId; - @Column(name = "tid") - private Long tableId; + @Column(name = "tid", columnDefinition = "VARCHAR(36)") + private UUID tableId; - @Column(name = "vid") - private Long viewId; + @Column(name = "vid", columnDefinition = "VARCHAR(36)") + private UUID viewId; /** * Creators are created/updated/deleted by the Identifier entity. @@ -176,6 +176,13 @@ public class Identifier implements Serializable { @Column(columnDefinition = "TIMESTAMP") private Instant lastModified; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierDescription.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierDescription.java index af684d2347b20bd54a959040b7b07937fc69952f..32adddccfc7c73750a1fd516edc6c4638d150739 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierDescription.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierDescription.java @@ -3,9 +3,11 @@ package at.tuwien.entities.identifier; import at.tuwien.entities.database.LanguageType; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.io.Serializable; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -21,10 +23,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class IdentifierDescription implements Serializable { @Id - @org.springframework.data.annotation.Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false, columnDefinition = "TEXT") private String description; @@ -44,6 +45,13 @@ public class IdentifierDescription implements Serializable { }) private Identifier identifier; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierFunder.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierFunder.java index c5720223467f5e52ac54354c11dc21baf36fcd0d..5b69b2e8f70a947dad40460609b0ee5ffc530dfa 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierFunder.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierFunder.java @@ -2,9 +2,11 @@ package at.tuwien.entities.identifier; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.io.Serializable; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -20,9 +22,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class IdentifierFunder implements Serializable { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false) private String funderName; @@ -50,6 +52,13 @@ public class IdentifierFunder implements Serializable { }) private Identifier identifier; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierTitle.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierTitle.java index cecc2c5c9804114529be0c6543de1ea69f5668aa..769ff12a678a9f18d10f877e29461585f5cd2b59 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierTitle.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/IdentifierTitle.java @@ -3,9 +3,11 @@ package at.tuwien.entities.identifier; import at.tuwien.entities.database.LanguageType; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.io.Serializable; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -21,9 +23,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class IdentifierTitle implements Serializable { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false, columnDefinition = "TEXT") private String title; @@ -43,6 +45,13 @@ public class IdentifierTitle implements Serializable { }) private Identifier identifier; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/RelatedIdentifier.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/RelatedIdentifier.java index e8b1acde125265bdda9d94918daf0bf478ff4904..24ac7adb1fe1fabd49491a320b29256f8178a0de 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/RelatedIdentifier.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/identifier/RelatedIdentifier.java @@ -2,9 +2,10 @@ package at.tuwien.entities.identifier; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; -import static jakarta.persistence.GenerationType.IDENTITY; +import java.util.UUID; @Data @Entity @@ -14,15 +15,15 @@ import static jakarta.persistence.GenerationType.IDENTITY; @NoArgsConstructor @EqualsAndHashCode @EntityListeners(AuditingEntityListener.class) -@Table(name = "mdb_related_identifiers", uniqueConstraints = { +@Table(name = "mdb_identifier_related", uniqueConstraints = { @UniqueConstraint(columnNames = {"id", "pid"}) }) public class RelatedIdentifier { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false) private String value; @@ -42,6 +43,13 @@ public class RelatedIdentifier { }) private Identifier identifier; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/maintenance/BannerMessage.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/maintenance/BannerMessage.java index f22cee71a7a3dc4a97c8294619b5ec8931db1714..8a5f2d76a3d4b73f89d7223af8df88c7ac7efdb9 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/maintenance/BannerMessage.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/maintenance/BannerMessage.java @@ -2,9 +2,11 @@ package at.tuwien.entities.maintenance; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -16,16 +18,16 @@ import static jakarta.persistence.GenerationType.IDENTITY; @NoArgsConstructor @EqualsAndHashCode @EntityListeners(AuditingEntityListener.class) -@Table(name = "mdb_banner_messages") +@Table(name = "mdb_messages") @NamedQueries({ @NamedQuery(name = "BannerMessage.findByActive", query = "select m from BannerMessage m where (m.displayStart = null and m.displayEnd = null) or (m.displayStart = null and m.displayEnd >= NOW()) or (m.displayStart <= NOW() and m.displayEnd >= NOW()) or (m.displayStart <= NOW() and m.displayEnd = null)") }) public class BannerMessage { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false, columnDefinition = "ENUM('ERROR','WARNING','INFO')") @Enumerated(EnumType.STRING) @@ -46,4 +48,11 @@ public class BannerMessage { @Column(columnDefinition = "TIMESTAMP") private Instant displayEnd; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/semantics/Ontology.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/semantics/Ontology.java index 576aab1e375028a9a776ae96cb0ea983f84e7274..664b284c3d087250fee1623a624f77305e19c1eb 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/semantics/Ontology.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/semantics/Ontology.java @@ -2,11 +2,13 @@ package at.tuwien.entities.semantics; import jakarta.persistence.*; import lombok.*; +import org.hibernate.annotations.JdbcTypeCode; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.time.Instant; +import java.util.UUID; import static jakarta.persistence.GenerationType.IDENTITY; @@ -27,9 +29,9 @@ import static jakarta.persistence.GenerationType.IDENTITY; public class Ontology { @Id - @GeneratedValue(strategy = IDENTITY) - @Column(updatable = false, nullable = false) - private Long id; + @JdbcTypeCode(java.sql.Types.VARCHAR) + @Column(columnDefinition = "VARCHAR(36)") + private UUID id; @Column(nullable = false, unique = true) private String uri; @@ -56,4 +58,11 @@ public class Ontology { @Column(columnDefinition = "TIMESTAMP") private Instant lastModified; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/user/User.java b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/user/User.java index 156fc3b4c8efbd44e4d8389b50a7cb0f65814aac..44d36e5e03c1e38a3fd9ecd807abce21116eb768 100644 --- a/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/user/User.java +++ b/dbrepo-metadata-service/entities/src/main/java/at/tuwien/entities/user/User.java @@ -27,7 +27,7 @@ public class User { @Id @JdbcTypeCode(java.sql.Types.VARCHAR) - @Column(name = "ID", nullable = false, columnDefinition = "VARCHAR(36)") + @Column(name = "ID", columnDefinition = "VARCHAR(36)") private UUID id; @JdbcTypeCode(java.sql.Types.VARCHAR) @@ -68,4 +68,11 @@ public class User { @Column(name = "is_internal", nullable = false, updatable = false, columnDefinition = "bool default false") private Boolean isInternal; + @PrePersist + public void prePersist() { + if (this.id == null) { + this.id = UUID.randomUUID(); + } + } + } diff --git a/dbrepo-metadata-service/oai/pom.xml b/dbrepo-metadata-service/oai/pom.xml index a9c3a1f388e6f1e7e55c6e1ec47f4e3d7acf70fc..54c464b11a31cea0e588f797fa38012c573a1d02 100644 --- a/dbrepo-metadata-service/oai/pom.xml +++ b/dbrepo-metadata-service/oai/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-oai</artifactId> <name>dbrepo-metadata-service-oai</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies/> diff --git a/dbrepo-metadata-service/pom.xml b/dbrepo-metadata-service/pom.xml index 54115d9e16441c6f651c9dad9579089bee2d6e1e..dec6e42b20ea0aa7c7c26d5ef3e08ff24f08c9fa 100644 --- a/dbrepo-metadata-service/pom.xml +++ b/dbrepo-metadata-service/pom.xml @@ -8,10 +8,15 @@ <version>3.3.5</version> </parent> + <organization> + <name>TU Wien</name> + <url>https://www.tuwien.ac.at</url> + </organization> + <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> <name>dbrepo-metadata-service</name> - <version>1.6.5</version> + <version>1.7.0</version> <description>Service that manages the metadata</description> @@ -27,7 +32,7 @@ <module>report</module> </modules> - <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/</url> + <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/</url> <developers> <developer> <name>Martin Weise</name> @@ -60,8 +65,10 @@ <aws-s3.version>2.25.23</aws-s3.version> <jackson.version>2.15.2</jackson.version> <minio.version>8.5.7</minio.version> - <sonar.coverage.jacoco.xmlReportPaths>./report/target/site/jacoco-aggregate/jacoco.xml + <sonar.coverage.jacoco.xmlReportPaths> + ./report/target/site/jacoco-aggregate/jacoco.xml </sonar.coverage.jacoco.xmlReportPaths> + <CodeCacheSize>128m</CodeCacheSize> </properties> <dependencies> @@ -308,8 +315,25 @@ </goals> </execution> </executions> + </plugin><!-- Surefire runs all Java tests --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <!-- Note config is repeated in scalatest config --> + <configuration> + <argLine>@{argLine} -ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g -XX:ReservedCodeCacheSize=${CodeCacheSize} + </argLine> + </configuration> </plugin> </plugins> </build> + <licenses> + <license> + <name>Apache-2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> + <distribution>repo</distribution> + </license> + </licenses> + </project> diff --git a/dbrepo-metadata-service/report/pom.xml b/dbrepo-metadata-service/report/pom.xml index f78cb7c2599f35692bbf13b8e001c683eadb01d3..6bcb8d579b67439ad4bcd590cf5af3819f70218e 100644 --- a/dbrepo-metadata-service/report/pom.xml +++ b/dbrepo-metadata-service/report/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-report</artifactId> <name>dbrepo-metadata-service-report</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/repositories/pom.xml b/dbrepo-metadata-service/repositories/pom.xml index 696b3c223ae7a5ac113efe544b21a6b5ba67f3a0..4d3b5f933d2c39674b2f9e58461387c0a2cffdb8 100644 --- a/dbrepo-metadata-service/repositories/pom.xml +++ b/dbrepo-metadata-service/repositories/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-repositories</artifactId> <name>dbrepo-metadata-service-repositories</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/exception/ViewExistsException.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/exception/ViewExistsException.java new file mode 100644 index 0000000000000000000000000000000000000000..265974db55184f6f770190068c79596b39281b6d --- /dev/null +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/exception/ViewExistsException.java @@ -0,0 +1,21 @@ +package at.tuwien.exception; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(code = HttpStatus.CONFLICT, reason = "error.view.exists") +public class ViewExistsException extends Exception { + + public ViewExistsException(String msg) { + super(msg); + } + + public ViewExistsException(String msg, Throwable thr) { + super(msg + ": " + thr.getLocalizedMessage(), thr); + } + + public ViewExistsException(Throwable thr) { + super(thr); + } + +} diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java index cff05b8d6f1d670398703c12f79d86aefe8be1be..2d18ca0c49124539a6b9aa6072396aa247eb8167 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/mapper/MetadataMapper.java @@ -318,7 +318,7 @@ public interface MetadataMapper { Identifier identifierDtoToIdentifier(IdentifierDto data); @Mappings({ - @Mapping(target = "databaseId", source = "database.id"), + @Mapping(target = "databaseId", source = "database.id") }) IdentifierDto identifierToIdentifierDto(Identifier data); @@ -563,17 +563,13 @@ public interface MetadataMapper { .name(data.getName()) .internalName(data.getInternalName()) .owner(userToUserBriefDto(data.getOwner())) - .tdbid(data.getTdbid()) + .databaseId(data.getTdbid()) .isPublic(data.getIsPublic()) .isSchemaPublic(data.getIsSchemaPublic()) .isVersioned(true) .description(data.getDescription()) .identifiers(new LinkedList<>()) .columns(new LinkedList<>()) - .database(databaseToDatabaseDto(data.getDatabase() - .toBuilder() - .tables(null) - .build())) .constraints(constraintsToConstraintsDto(data.getConstraints())) .build(); if (data.getIdentifiers() != null) { @@ -600,15 +596,15 @@ public interface MetadataMapper { table.getConstraints() .getForeignKeys() .forEach(fk -> { - fk.getTable().setDatabaseId(table.getTdbid()); - fk.getReferencedTable().setDatabaseId(table.getTdbid()); + fk.getTable().setDatabaseId(table.getDatabaseId()); + fk.getReferencedTable().setDatabaseId(table.getDatabaseId()); fk.getReferences() .forEach(ref -> { ref.setForeignKey(foreignKeyDtoToForeignKeyBriefDto(fk)); ref.getColumn().setTableId(table.getId()); - ref.getColumn().setDatabaseId(table.getTdbid()); + ref.getColumn().setDatabaseId(table.getDatabaseId()); ref.getReferencedColumn().setTableId(fk.getReferencedTable().getId()); - ref.getReferencedColumn().setDatabaseId(table.getTdbid()); + ref.getReferencedColumn().setDatabaseId(table.getDatabaseId()); }); }); table.getConstraints() @@ -766,6 +762,8 @@ public interface MetadataMapper { @Mapping(target = "isNullAllowed", source = "data.nullAllowed"), @Mapping(target = "name", source = "data.name"), @Mapping(target = "internalName", expression = "java(nameToInternalName(data.getName()))"), + @Mapping(target = "enums", ignore = true), + @Mapping(target = "sets", ignore = true), }) TableColumn columnCreateDtoToTableColumn(CreateTableColumnDto data, ContainerImage image); @@ -821,16 +819,18 @@ public interface MetadataMapper { } @Mappings({ - @Mapping(target = "database.views", ignore = true), - @Mapping(target = "database.tables", ignore = true) + @Mapping(target = "databaseId", source = "database.id") }) ViewDto viewToViewDto(View data); @Mappings({ - @Mapping(target = "databaseId", source = "view.vdbid"), + @Mapping(target = "databaseId", source = "view.database.id"), }) ViewColumnDto viewColumnToViewColumnDto(ViewColumn data); + @Mappings({ + @Mapping(target = "vdbid", source = "database.id") + }) ViewBriefDto viewToViewBriefDto(View data); @Mappings({ diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/BannerMessageRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/BannerMessageRepository.java index 8d7aee77e712a3c47f9ebc676457c158a9a13381..c12dc7b83f562ec1237dc7941db60700a78f1a59 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/BannerMessageRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/BannerMessageRepository.java @@ -5,9 +5,10 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; +import java.util.UUID; @Repository -public interface BannerMessageRepository extends JpaRepository<BannerMessage, Long> { +public interface BannerMessageRepository extends JpaRepository<BannerMessage, UUID> { List<BannerMessage> findByActive(); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ConceptRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ConceptRepository.java index c77641200c7856dc3300cbba66f008265f17a60f..1e70cfdfb245c7de9cda405444c6bd43176cca14 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ConceptRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ConceptRepository.java @@ -5,9 +5,10 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; +import java.util.UUID; @Repository -public interface ConceptRepository extends JpaRepository<TableColumnConcept, Long> { +public interface ConceptRepository extends JpaRepository<TableColumnConcept, UUID> { Optional<TableColumnConcept> findByUri(String uri); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ContainerRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ContainerRepository.java index 8155aef9cc3f67eb83c52ed5bb15c4a67c50c208..536802cf4165e746dc8a27ed796c058ed86d44e5 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ContainerRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ContainerRepository.java @@ -7,9 +7,10 @@ import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; +import java.util.UUID; @Repository -public interface ContainerRepository extends JpaRepository<Container, Long> { +public interface ContainerRepository extends JpaRepository<Container, UUID> { Optional<Container> findByInternalName(String internalName); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/DatabaseRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/DatabaseRepository.java index 38a0a8044162cbf3abe9178de26fca4a21e7ee4c..d984cb333737851a03c9227e1a76b0643a8282b6 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/DatabaseRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/DatabaseRepository.java @@ -9,7 +9,7 @@ import java.util.Optional; import java.util.UUID; @Repository -public interface DatabaseRepository extends JpaRepository<Database, Long> { +public interface DatabaseRepository extends JpaRepository<Database, UUID> { List<Database> findAllDesc(); @@ -23,4 +23,6 @@ public interface DatabaseRepository extends JpaRepository<Database, Long> { List<Database> findAllPublicOrSchemaPublicByInternalNameDesc(String internalName); + List<Database> findAllByInternalNameDesc(String internalName); + } diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/IdentifierRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/IdentifierRepository.java index 12b309ec521e84c7eaed1bf446442498bfd4c481..9e49f2aa1c5e530dfe60a65aa1e1b4a35fdb0e01 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/IdentifierRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/IdentifierRepository.java @@ -6,9 +6,10 @@ import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; +import java.util.UUID; @Repository -public interface IdentifierRepository extends JpaRepository<Identifier, Long> { +public interface IdentifierRepository extends JpaRepository<Identifier, UUID> { /** * Finds identifiers by given database id. @@ -16,7 +17,7 @@ public interface IdentifierRepository extends JpaRepository<Identifier, Long> { * @param databaseId The database id. * @return List of matching identifiers. */ - List<Identifier> findByDatabaseId(Long databaseId); + List<Identifier> findByDatabaseId(UUID databaseId); /** * Finds identifiers by given database id and query id. @@ -25,11 +26,11 @@ public interface IdentifierRepository extends JpaRepository<Identifier, Long> { * @param queryId The query id. * @return List of matching identifiers. */ - List<Identifier> findByDatabaseIdAndQueryId(Long databaseId, Long queryId); + List<Identifier> findByDatabaseIdAndQueryId(UUID databaseId, UUID queryId); - List<Identifier> findDatabaseIdentifier(Long databaseId); + List<Identifier> findDatabaseIdentifier(UUID databaseId); - List<Identifier> findSubsetIdentifier(Long databaseId, Long queryId); + List<Identifier> findSubsetIdentifier(UUID databaseId, UUID queryId); List<Identifier> findAllDatabaseIdentifiers(); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ImageRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ImageRepository.java index 23fa40c5be1fd3a6e9e430fafcaccc896e37970d..6282ed90405ba08a69cadb9a8ec0a7fd01f17888 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ImageRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ImageRepository.java @@ -4,11 +4,11 @@ import at.tuwien.entities.container.image.ContainerImage; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; -import java.util.List; import java.util.Optional; +import java.util.UUID; @Repository -public interface ImageRepository extends JpaRepository<ContainerImage, Long> { +public interface ImageRepository extends JpaRepository<ContainerImage, UUID> { Optional<ContainerImage> findByNameAndVersion(String name, String version); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/OntologyRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/OntologyRepository.java index a7fad56076dc454ad1a67a1350ce5d6d2fa926ad..69b4e204be72c14d60f45ff9535fa89bc9de7629 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/OntologyRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/OntologyRepository.java @@ -6,9 +6,10 @@ import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; +import java.util.UUID; @Repository -public interface OntologyRepository extends JpaRepository<Ontology, Long> { +public interface OntologyRepository extends JpaRepository<Ontology, UUID> { List<Ontology> findAllProcessable(); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/TableRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/TableRepository.java index fda9e78ce537b20201ecf88487171a9bb956ea16..bc126eaa27660e84b9e71d5adea18859e1be4fe7 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/TableRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/TableRepository.java @@ -4,10 +4,12 @@ import at.tuwien.entities.database.table.Table; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; +import java.util.UUID; + /** * TO BE USED READONLY */ @Repository -public interface TableRepository extends JpaRepository<Table, Long> { +public interface TableRepository extends JpaRepository<Table, UUID> { } diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/UnitRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/UnitRepository.java index 3bcb0c0a49c0d73ff7d20af29fee6a5c17226d3d..6676410730a1f562638e1bc32053b2b8a5fc5c2b 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/UnitRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/UnitRepository.java @@ -5,9 +5,10 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; +import java.util.UUID; @Repository -public interface UnitRepository extends JpaRepository<TableColumnUnit, Long> { +public interface UnitRepository extends JpaRepository<TableColumnUnit, UUID> { Optional<TableColumnUnit> findByUri(String uri); diff --git a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ViewRepository.java b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ViewRepository.java index de678d90ae99d41a76987be29b1a001929222ceb..50544822e50db796ca862be696640b8edf3c73a1 100644 --- a/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ViewRepository.java +++ b/dbrepo-metadata-service/repositories/src/main/java/at/tuwien/repository/ViewRepository.java @@ -4,10 +4,12 @@ import at.tuwien.entities.database.View; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; +import java.util.UUID; + /** * TO BE USED READONLY */ @Repository -public interface ViewRepository extends JpaRepository<View, Long> { +public interface ViewRepository extends JpaRepository<View, UUID> { } diff --git a/dbrepo-metadata-service/rest-service/pom.xml b/dbrepo-metadata-service/rest-service/pom.xml index f3d420f35ec25fb27dd66a8df3a90561e649b33d..9e9f23d11fdbab4fc2308bead597a7626272ceb1 100644 --- a/dbrepo-metadata-service/rest-service/pom.xml +++ b/dbrepo-metadata-service/rest-service/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-rest-service</artifactId> <name>dbrepo-metadata-service-rest</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java index 9c109c87d68664793b3033d7be123d71a7b02d69..79dc5fd8e987dfad2d8e59dcd14ac156803fab91 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java @@ -38,15 +38,15 @@ public class AccessEndpoint extends AbstractEndpoint { private final UserService userService; private final AccessService accessService; - private final MetadataMapper databaseMapper; + private final MetadataMapper metadataMapper; private final DatabaseService databaseService; @Autowired - public AccessEndpoint(UserService userService, AccessService accessService, MetadataMapper databaseMapper, + public AccessEndpoint(UserService userService, AccessService accessService, MetadataMapper metadataMapper, DatabaseService databaseService) { this.userService = userService; this.accessService = accessService; - this.databaseMapper = databaseMapper; + this.metadataMapper = metadataMapper; this.databaseService = databaseService; } @@ -89,7 +89,7 @@ public class AccessEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseAccessDto> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseAccessDto> create(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @Valid @RequestBody CreateAccessDto data, @NotNull Principal principal) throws NotAllowedException, DataServiceException, @@ -151,7 +151,7 @@ public class AccessEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> update(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @Valid @RequestBody CreateAccessDto data, @NotNull Principal principal) throws NotAllowedException, @@ -203,7 +203,7 @@ public class AccessEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseAccessDto> find(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseAccessDto> find(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @NotNull Principal principal) throws DatabaseNotFoundException, UserNotFoundException, AccessNotFoundException, NotAllowedException { @@ -219,7 +219,7 @@ public class AccessEndpoint extends AbstractEndpoint { final Database database = databaseService.findById(databaseId); final User user = userService.findById(userId); final DatabaseAccess access = accessService.find(database, user); - return ResponseEntity.ok(databaseMapper.databaseAccessToDatabaseAccessDto(access)); + return ResponseEntity.ok(metadataMapper.databaseAccessToDatabaseAccessDto(access)); } @DeleteMapping("/{userId}") @@ -258,7 +258,7 @@ public class AccessEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> revoke(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<Void> revoke(@NotNull @PathVariable("databaseId") UUID databaseId, @PathVariable("userId") UUID userId, @NotNull Principal principal) throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, UserNotFoundException, AccessNotFoundException, diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ContainerEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ContainerEndpoint.java index b5d153318cc9688d13784a80df41c6f28a862de3..266430372d0796408030364a8f61f9642c05e415 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ContainerEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ContainerEndpoint.java @@ -1,8 +1,8 @@ package at.tuwien.endpoints; import at.tuwien.api.container.ContainerBriefDto; -import at.tuwien.api.container.CreateContainerDto; import at.tuwien.api.container.ContainerDto; +import at.tuwien.api.container.CreateContainerDto; import at.tuwien.api.error.ApiErrorDto; import at.tuwien.entities.container.Container; import at.tuwien.exception.ContainerAlreadyExistsException; @@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; @@ -129,7 +130,7 @@ public class ContainerEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ContainerDto> findById(@NotNull @PathVariable("containerId") Long containerId, + public ResponseEntity<ContainerDto> findById(@NotNull @PathVariable("containerId") UUID containerId, Principal principal) throws ContainerNotFoundException { log.debug("endpoint find container, containerId={}", containerId); @@ -137,9 +138,12 @@ public class ContainerEndpoint extends AbstractEndpoint { final HttpHeaders headers = new HttpHeaders(); if (isSystem(principal)) { log.trace("attach privileged credential information"); + headers.set("X-Host", container.getHost()); + headers.set("X-Port", "" + container.getPort()); headers.set("X-Username", container.getPrivilegedUsername()); headers.set("X-Password", container.getPrivilegedPassword()); - headers.set("Access-Control-Expose-Headers", "X-Username X-Password"); + headers.set("X-Jdbc-Method", container.getImage().getJdbcMethod()); + headers.set("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port"); } return ResponseEntity.ok() .headers(headers) @@ -167,7 +171,7 @@ public class ContainerEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("containerId") Long containerId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("containerId") UUID containerId) throws ContainerNotFoundException { log.debug("endpoint delete container, containerId={}", containerId); containerService.remove(containerService.find(containerId)); diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java index 41cc59ca6ad3aa8b3a74bf3ae5eda482231863be..9eadffd0df3ded54ec74af23f8cd6baedb347416 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/DatabaseEndpoint.java @@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; import java.util.Optional; +import java.util.UUID; @Log4j2 @RestController @@ -44,16 +45,16 @@ import java.util.Optional; public class DatabaseEndpoint extends AbstractEndpoint { private final UserService userService; - private final MetadataMapper databaseMapper; + private final MetadataMapper metadataMapper; private final StorageService storageService; private final DatabaseService databaseService; private final ContainerService containerService; @Autowired - public DatabaseEndpoint(UserService userService, MetadataMapper databaseMapper, StorageService storageService, + public DatabaseEndpoint(UserService userService, MetadataMapper metadataMapper, StorageService storageService, DatabaseService databaseService, ContainerService containerService) { this.userService = userService; - this.databaseMapper = databaseMapper; + this.metadataMapper = metadataMapper; this.storageService = storageService; this.databaseService = databaseService; this.containerService = containerService; @@ -79,15 +80,24 @@ public class DatabaseEndpoint extends AbstractEndpoint { final List<Database> databases; if (principal != null) { if (internalName != null) { - log.debug("filter request to contain only public databases or where user with id {} has at least read access that match internal name {}", getId(principal), internalName); - databases = databaseService.findAllPublicOrSchemaPublicOrReadAccessByInternalName(getId(principal), internalName); + if (isSystem(principal)) { + log.debug("filter request to contain only databases that match internal name: {}", internalName); + databases = databaseService.findByInternalName(internalName); + } else { + log.debug("filter request to contain only public databases or where user with id {} has at least read access that match internal name: {}", getId(principal), internalName); + databases = databaseService.findAllPublicOrSchemaPublicOrReadAccessByInternalName(getId(principal), internalName); + } } else { - log.debug("filter request to contain only databases where user with id {} has at least read access", getId(principal)); - databases = databaseService.findAllPublicOrSchemaPublicOrReadAccess(getId(principal)); + if (isSystem(principal)) { + databases = databaseService.findAll(); + } else { + log.debug("filter request to contain only databases where user with id {} has at least read access", getId(principal)); + databases = databaseService.findAllPublicOrSchemaPublicOrReadAccess(getId(principal)); + } } } else { if (internalName != null) { - log.debug("filter request to contain only public databases that match internal name {}", internalName); + log.debug("filter request to contain only public databases that match internal name: {}", internalName); databases = databaseService.findAllPublicOrSchemaPublicByInternalName(internalName); } else { log.debug("filter request to contain only public databases"); @@ -100,7 +110,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { return ResponseEntity.status(HttpStatus.OK) .headers(headers) .body(databases.stream() - .map(databaseMapper::databaseToDatabaseBriefDto) + .map(metadataMapper::databaseToDatabaseBriefDto) .toList()); } @@ -160,13 +170,13 @@ public class DatabaseEndpoint extends AbstractEndpoint { ContainerQuotaException { log.debug("endpoint create database, data.name={}", data.getName()); final Container container = containerService.find(data.getCid()); - if (container.getDatabases().size() + 1 > container.getQuota()) { + if (container.getQuota() != null && container.getDatabases().size() + 1 > container.getQuota()) { log.error("Failed to create database: quota of {} exceeded", container.getQuota()); throw new ContainerQuotaException("Failed to create database: quota of " + container.getQuota() + " exceeded"); } final User caller = userService.findById(getId(principal)); return ResponseEntity.status(HttpStatus.CREATED) - .body(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + .body(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.create(container, data, caller, userService.findAllInternalUsers())))); } @@ -209,7 +219,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseBriefDto> refreshTableMetadata(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseBriefDto> refreshTableMetadata(@NotNull @PathVariable("databaseId") UUID databaseId, @NotNull Principal principal) throws DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, NotAllowedException, QueryNotFoundException, MalformedException, @@ -220,7 +230,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { log.error("Failed to refresh database tables metadata: not owner"); throw new NotAllowedException("Failed to refresh tables metadata: not owner"); } - return ResponseEntity.ok(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + return ResponseEntity.ok(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.updateTableMetadata(database)))); } @@ -258,7 +268,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseBriefDto> refreshViewMetadata(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseBriefDto> refreshViewMetadata(@NotNull @PathVariable("databaseId") UUID databaseId, @NotNull Principal principal) throws DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, NotAllowedException, QueryNotFoundException, ViewNotFoundException { @@ -268,7 +278,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { log.error("Failed to refresh database views metadata: not owner"); throw new NotAllowedException("Failed to refresh database views metadata: not owner"); } - return ResponseEntity.ok(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + return ResponseEntity.ok(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.updateViewMetadata(database)))); } @@ -311,7 +321,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseBriefDto> visibility(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseBriefDto> visibility(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody DatabaseModifyVisibilityDto data, @NotNull Principal principal) throws DatabaseNotFoundException, NotAllowedException, SearchServiceException, SearchServiceConnectionException, UserNotFoundException { @@ -322,7 +332,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { throw new NotAllowedException("Failed to modify database visibility: not owner"); } return ResponseEntity.accepted() - .body(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + .body(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.modifyVisibility(database, data)))); } @@ -365,7 +375,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseBriefDto> transfer(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseBriefDto> transfer(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody DatabaseTransferDto data, @NotNull Principal principal) throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, UserNotFoundException, @@ -378,7 +388,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { throw new NotAllowedException("Failed to transfer database: not owner"); } return ResponseEntity.accepted() - .body(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + .body(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.modifyOwner(database, newOwner)))); } @@ -421,7 +431,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<DatabaseBriefDto> modifyImage(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<DatabaseBriefDto> modifyImage(@NotNull @PathVariable("databaseId") UUID databaseId, @Valid @RequestBody DatabaseModifyImageDto data, @NotNull Principal principal) throws NotAllowedException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, @@ -437,7 +447,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { image = storageService.getBytes(data.getKey()); } return ResponseEntity.accepted() - .body(databaseMapper.databaseDtoToDatabaseBriefDto(databaseMapper.databaseToDatabaseDto( + .body(metadataMapper.databaseDtoToDatabaseBriefDto(metadataMapper.databaseToDatabaseDto( databaseService.modifyImage(database, image)))); } @@ -456,7 +466,7 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}) }) - public ResponseEntity<byte[]> findPreviewImage(@NotNull @PathVariable("databaseId") Long databaseId) + public ResponseEntity<byte[]> findPreviewImage(@NotNull @PathVariable("databaseId") UUID databaseId) throws DatabaseNotFoundException { log.debug("endpoint get database preview image, databaseId={}", databaseId); return ResponseEntity.ok() @@ -485,24 +495,13 @@ public class DatabaseEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "404", - description = "Database, user or exchange could not be found", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "502", - description = "Connection to the broker service could not be established", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "503", - description = "Failed to find queue information in broker service", + description = "Database could not be found", content = {@Content( mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), + schema = @Schema(implementation = ApiErrorDto.class))}) }) - public ResponseEntity<DatabaseDto> findById(@NotNull @PathVariable("databaseId") Long databaseId, - Principal principal) throws DataServiceException, - DataServiceConnectionException, DatabaseNotFoundException, ExchangeNotFoundException, UserNotFoundException, + public ResponseEntity<DatabaseDto> findById(@NotNull @PathVariable("databaseId") UUID databaseId, + Principal principal) throws DatabaseNotFoundException, NotAllowedException { log.debug("endpoint find database, databaseId={}", databaseId); final Database database = databaseService.findById(databaseId); @@ -521,14 +520,14 @@ public class DatabaseEndpoint extends AbstractEndpoint { .size(); database.setTables(database.getTables() .stream() - .filter(t -> t.getIsPublic() || t.getIsSchemaPublic() || optional.isPresent()) + .filter(t -> t.getIsPublic() || t.getIsSchemaPublic() || optional.isPresent() || isSystem(principal)) .toList()); log.trace("filtered database tables from {} to {}", tables, database.getTables().size()); final int views = database.getViews() .size(); database.setViews(database.getViews() .stream() - .filter(v -> v.getIsPublic() || v.getIsSchemaPublic() || optional.isPresent()) + .filter(v -> v.getIsPublic() || v.getIsSchemaPublic() || optional.isPresent() || isSystem(principal)) .toList()); log.trace("filtered database views from {} to {}", views, database.getViews().size()); if (!isSystem(principal) && !database.getOwner().getId().equals(getId(principal))) { @@ -553,12 +552,16 @@ public class DatabaseEndpoint extends AbstractEndpoint { .toList()); database.setAccesses(List.of()); } - final DatabaseDto dto = databaseMapper.databaseToDatabaseDto(database); + final DatabaseDto dto = metadataMapper.databaseToDatabaseDto(database); final HttpHeaders headers = new HttpHeaders(); if (isSystem(principal)) { + log.trace("attach privileged credential information"); + headers.set("X-Host", database.getContainer().getHost()); + headers.set("X-Port", "" + database.getContainer().getPort()); headers.set("X-Username", database.getContainer().getPrivilegedUsername()); headers.set("X-Password", database.getContainer().getPrivilegedPassword()); - headers.set("Access-Control-Expose-Headers", "X-Username X-Password"); + headers.set("X-Jdbc-Method", database.getContainer().getImage().getJdbcMethod()); + headers.set("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port"); } else { removeInternalData(dto.getContainer()); } diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java index b3d699086ee93b943801a3139a2e2488dc9dcc8c..31dd1e542d53112ff42b49a6e5f6269255088ac6 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/IdentifierEndpoint.java @@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; import java.util.Objects; +import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -90,10 +91,10 @@ public class IdentifierEndpoint extends AbstractEndpoint { }) public ResponseEntity<?> findAll(@Valid @RequestParam(value = "type", required = false) IdentifierTypeDto type, @Valid @RequestParam(value = "status", required = false) IdentifierStatusTypeDto status, - @Valid @RequestParam(value = "dbid", required = false) Long dbid, - @Valid @RequestParam(value = "qid", required = false) Long qid, - @Valid @RequestParam(value = "vid", required = false) Long vid, - @Valid @RequestParam(value = "tid", required = false) Long tid, + @Valid @RequestParam(value = "dbid", required = false) UUID dbid, + @Valid @RequestParam(value = "qid", required = false) UUID qid, + @Valid @RequestParam(value = "vid", required = false) UUID vid, + @Valid @RequestParam(value = "tid", required = false) UUID tid, @RequestHeader(HttpHeaders.ACCEPT) String accept, Principal principal) { log.debug("endpoint find identifiers, type={}, status={}, dbid={}, qid={}, vid={}, tid={}, accept={}", type, @@ -185,7 +186,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<?> find(@Valid @PathVariable("identifierId") Long identifierId, + public ResponseEntity<?> find(@Valid @PathVariable("identifierId") UUID identifierId, @RequestHeader(HttpHeaders.ACCEPT) String accept, Principal principal) throws IdentifierNotFoundException, DataServiceException, DataServiceConnectionException, MalformedException, FormatNotAvailableException, @@ -278,7 +279,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("identifierId") Long identifierId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("identifierId") UUID identifierId) throws IdentifierNotFoundException, NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException { @@ -332,7 +333,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<IdentifierDto> publish(@Valid @PathVariable("identifierId") Long identifierId) + public ResponseEntity<IdentifierDto> publish(@Valid @PathVariable("identifierId") UUID identifierId) throws SearchServiceException, DatabaseNotFoundException, SearchServiceConnectionException, MalformedException, DataServiceConnectionException, IdentifierNotFoundException, ExternalServiceException { log.debug("endpoint publish identifier, identifierId={}", identifierId); @@ -380,7 +381,7 @@ public class IdentifierEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<IdentifierDto> save(@NotNull @PathVariable("identifierId") Long identifierId, + public ResponseEntity<IdentifierDto> save(@NotNull @PathVariable("identifierId") UUID identifierId, @NotNull @Valid @RequestBody IdentifierSaveDto data, @NotNull Principal principal) throws UserNotFoundException, DatabaseNotFoundException, MalformedException, NotAllowedException, DataServiceException, diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ImageEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ImageEndpoint.java index 2aaad860a8bbb70e4d7023b00587cc0ad70b7e94..62c00d1ee8d4ef5a395b22e77595859c44774c56 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ImageEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ImageEndpoint.java @@ -10,7 +10,7 @@ import at.tuwien.exception.ImageAlreadyExistsException; import at.tuwien.exception.ImageInvalidException; import at.tuwien.exception.ImageNotFoundException; import at.tuwien.mapper.MetadataMapper; -import at.tuwien.service.impl.ImageServiceImpl; +import at.tuwien.service.ImageService; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.ArraySchema; @@ -31,6 +31,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; +import java.util.UUID; @Log4j2 @RestController @@ -39,11 +40,11 @@ import java.util.List; @RequestMapping(path = "/api/image") public class ImageEndpoint extends AbstractEndpoint { + private final ImageService imageService; private final MetadataMapper metadataMapper; - private final ImageServiceImpl imageService; @Autowired - public ImageEndpoint(ImageServiceImpl imageService, MetadataMapper metadataMapper) { + public ImageEndpoint(ImageService imageService, MetadataMapper metadataMapper) { this.imageService = imageService; this.metadataMapper = metadataMapper; } @@ -119,7 +120,7 @@ public class ImageEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ImageDto> findById(@NotNull @PathVariable("imageId") Long imageId) throws ImageNotFoundException { + public ResponseEntity<ImageDto> findById(@NotNull @PathVariable("imageId") UUID imageId) throws ImageNotFoundException { log.debug("endpoint find image, imageId={}", imageId); return ResponseEntity.ok() .body(metadataMapper.containerImageToImageDto(imageService.find(imageId))); @@ -144,7 +145,7 @@ public class ImageEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ImageDto> update(@NotNull @PathVariable("imageId") Long imageId, + public ResponseEntity<ImageDto> update(@NotNull @PathVariable("imageId") UUID imageId, @RequestBody @Valid ImageChangeDto changeDto) throws ImageNotFoundException { log.debug("endpoint update image, imageId={}, changeDto={}", imageId, changeDto); @@ -170,7 +171,7 @@ public class ImageEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("imageId") Long imageId) throws ImageNotFoundException { + public ResponseEntity<Void> delete(@NotNull @PathVariable("imageId") UUID imageId) throws ImageNotFoundException { log.debug("endpoint delete image, imageId={}", imageId); imageService.delete(imageService.find(imageId)); return ResponseEntity.accepted() diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/MessageEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/MessageEndpoint.java index 0aeeac9401c796b82060d363a5e1ed01e6ac0e61..656279a86d680877849d9d2aa6fce327b6ba8ecb 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/MessageEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/MessageEndpoint.java @@ -27,6 +27,7 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.UUID; @Log4j2 @CrossOrigin(origins = "*") @@ -83,7 +84,7 @@ public class MessageEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<BannerMessageDto> find(@NotNull @PathVariable("messageId") Long messageId) + public ResponseEntity<BannerMessageDto> find(@NotNull @PathVariable("messageId") UUID messageId) throws MessageNotFoundException { log.debug("endpoint find one maintenance message, messageId={}", messageId); return ResponseEntity.ok(metadataMapper.bannerMessageToBannerMessageDto( @@ -128,7 +129,7 @@ public class MessageEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<BannerMessageDto> update(@NotNull @PathVariable("messageId") Long messageId, + public ResponseEntity<BannerMessageDto> update(@NotNull @PathVariable("messageId") UUID messageId, @Valid @RequestBody BannerMessageUpdateDto data) throws MessageNotFoundException { log.debug("endpoint update maintenance message, messageId={}, data={}", messageId, data); @@ -154,7 +155,7 @@ public class MessageEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("messageId") Long messageId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("messageId") UUID messageId) throws MessageNotFoundException { log.debug("endpoint delete maintenance message, messageId={}", messageId); final BannerMessage message = bannerMessageService.find(messageId); diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/OntologyEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/OntologyEndpoint.java index 7bc6bc037e75501bfd7de5006150550a7a42366b..c723568556ce097c600ece7b8aad9b57d3914b77 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/OntologyEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/OntologyEndpoint.java @@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; +import java.util.UUID; @Log4j2 @CrossOrigin(origins = "*") @@ -83,7 +84,7 @@ public class OntologyEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<OntologyDto> find(@NotNull @PathVariable("ontologyId") Long ontologyId) + public ResponseEntity<OntologyDto> find(@NotNull @PathVariable("ontologyId") UUID ontologyId) throws OntologyNotFoundException { log.debug("endpoint find all ontologies, ontologyId={}", ontologyId); return ResponseEntity.ok(metadataMapper.ontologyToOntologyDto(ontologyService.find(ontologyId))); @@ -127,7 +128,7 @@ public class OntologyEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<OntologyDto> update(@NotNull @PathVariable("ontologyId") Long ontologyId, + public ResponseEntity<OntologyDto> update(@NotNull @PathVariable("ontologyId") UUID ontologyId, @NotNull @Valid @RequestBody OntologyModifyDto data) throws OntologyNotFoundException { log.debug("endpoint update ontology, ontologyId={}, data={}", ontologyId, data); @@ -153,7 +154,7 @@ public class OntologyEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("ontologyId") Long ontologyId) + public ResponseEntity<Void> delete(@NotNull @PathVariable("ontologyId") UUID ontologyId) throws OntologyNotFoundException { log.debug("endpoint delete ontology, ontologyId={}", ontologyId); ontologyService.delete(ontologyService.find(ontologyId)); @@ -194,7 +195,7 @@ public class OntologyEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<EntityDto>> find(@NotNull @PathVariable("ontologyId") Long id, + public ResponseEntity<List<EntityDto>> find(@NotNull @PathVariable("ontologyId") UUID id, @RequestParam(name = "label", required = false) String label, @RequestParam(name = "uri", required = false) String uri) throws OntologyNotFoundException, UriMalformedException, FilterBadRequestException, MalformedException { diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java index 08535fde69a20f162ea3d4478110d9360db55f99..f04f66eb8e5c3d7527e84abcb0ef1861cb02dc42 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java @@ -1,7 +1,7 @@ package at.tuwien.endpoints; -import at.tuwien.api.database.table.TableBriefDto; import at.tuwien.api.database.table.CreateTableDto; +import at.tuwien.api.database.table.TableBriefDto; import at.tuwien.api.database.table.TableDto; import at.tuwien.api.database.table.TableUpdateDto; import at.tuwien.api.database.table.columns.ColumnDto; @@ -17,7 +17,6 @@ import at.tuwien.service.*; import at.tuwien.validation.EndpointValidator; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.headers.Header; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -28,7 +27,6 @@ import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -37,6 +35,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; @Log4j2 @@ -89,7 +88,7 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<TableBriefDto>> list(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<List<TableBriefDto>> list(@NotNull @PathVariable("databaseId") UUID databaseId, Principal principal) throws NotAllowedException, DatabaseNotFoundException, UserNotFoundException, AccessNotFoundException { log.debug("endpoint list tables, databaseId={}", databaseId); @@ -98,7 +97,7 @@ public class TableEndpoint extends AbstractEndpoint { endpointValidator.validateOnlyPrivateSchemaHasRole(database, principal, "list-tables"); return ResponseEntity.ok(database.getTables() .stream() - .filter(t -> t.getIsPublic() || t.getIsSchemaPublic()) + .filter(t -> t.getIsPublic() || t.getIsSchemaPublic() || (principal != null && isSystem(principal))) .map(metadataMapper::tableToTableBriefDto) .collect(Collectors.toList())); } @@ -142,8 +141,8 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<EntityDto>> analyseTable(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<List<EntityDto>> analyseTable(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @NotNull Principal principal) throws MalformedException, TableNotFoundException, DatabaseNotFoundException, NotAllowedException { log.debug("endpoint analyse table semantics, databaseId={}, tableId={}, principal.name={}", databaseId, tableId, @@ -194,8 +193,8 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> updateStatistic(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> updateStatistic(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @NotNull Principal principal) throws TableNotFoundException, DatabaseNotFoundException, SearchServiceException, NotAllowedException, SearchServiceConnectionException, MalformedException, DataServiceException, DataServiceConnectionException { @@ -251,9 +250,9 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ColumnDto> updateColumn(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, - @NotNull @PathVariable("columnId") Long columnId, + public ResponseEntity<ColumnDto> updateColumn(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, + @NotNull @PathVariable("columnId") UUID columnId, @NotNull @Valid @RequestBody ColumnSemanticsUpdateDto updateDto, @NotNull Principal principal) throws NotAllowedException, MalformedException, DataServiceException, DataServiceConnectionException, UserNotFoundException, @@ -301,9 +300,9 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<TableColumnEntityDto>> analyseTableColumn(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, - @NotNull @PathVariable("columnId") Long columnId, + public ResponseEntity<List<TableColumnEntityDto>> analyseTableColumn(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, + @NotNull @PathVariable("columnId") UUID columnId, @NotNull Principal principal) throws MalformedException, TableNotFoundException, DatabaseNotFoundException { log.debug("endpoint analyse table column semantics, databaseId={}, tableId={}, columnId={}, principal.name={}", @@ -358,7 +357,7 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableBriefDto> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<TableBriefDto> create(@NotNull @PathVariable("databaseId") UUID databaseId, @NotNull @Valid @RequestBody CreateTableDto data, @NotNull Principal principal) throws NotAllowedException, MalformedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, UserNotFoundException, @@ -413,8 +412,8 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableBriefDto> update(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<TableBriefDto> update(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @NotNull @Valid @RequestBody TableUpdateDto data, @NotNull Principal principal) throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, TableNotFoundException, @@ -441,9 +440,6 @@ public class TableEndpoint extends AbstractEndpoint { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Find table successfully", - headers = {@Header(name = "X-Username", description = "The authentication username", schema = @Schema(implementation = String.class)), - @Header(name = "X-Password", description = "The authentication password", schema = @Schema(implementation = String.class)), - @Header(name = "Access-Control-Expose-Headers", description = "Expose custom headers", schema = @Schema(implementation = String.class))}, content = {@Content( mediaType = "application/json", schema = @Schema(implementation = TableDto.class))}), @@ -457,22 +453,11 @@ public class TableEndpoint extends AbstractEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "502", - description = "Failed to establish connection with broker service", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), - @ApiResponse(responseCode = "503", - description = "Failed to obtain queue information from broker service", - content = {@Content( - mediaType = "application/json", - schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<TableDto> findById(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, - Principal principal) throws DataServiceException, - DataServiceConnectionException, TableNotFoundException, DatabaseNotFoundException, QueueNotFoundException, - UserNotFoundException, NotAllowedException, AccessNotFoundException { + public ResponseEntity<TableDto> findById(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, + Principal principal) throws TableNotFoundException, + DatabaseNotFoundException, UserNotFoundException, NotAllowedException { log.debug("endpoint find table, databaseId={}, tableId={}", databaseId, tableId); final Database database = databaseService.findById(databaseId); final Table table = tableService.findById(database, tableId); @@ -496,16 +481,7 @@ public class TableEndpoint extends AbstractEndpoint { table.setConstraints(null); } final TableDto dto = metadataMapper.tableToTableDto(table); - final HttpHeaders headers = new HttpHeaders(); - if (isSystem(principal)) { - headers.set("X-Username", table.getDatabase().getContainer().getPrivilegedUsername()); - headers.set("X-Password", table.getDatabase().getContainer().getPrivilegedPassword()); - headers.set("Access-Control-Expose-Headers", "X-Username X-Password"); - } else { - removeInternalData(dto.getDatabase().getContainer()); - } return ResponseEntity.ok() - .headers(headers) .body(dto); } @@ -545,8 +521,8 @@ public class TableEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("tableId") Long tableId, + public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("tableId") UUID tableId, @NotNull Principal principal) throws NotAllowedException, DataServiceException, DataServiceConnectionException, TableNotFoundException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException { diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/UserEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/UserEndpoint.java index 3636aa63a300d62364ea11e1c77122b40053d0be..8f3e15529e962e279454e40b194217accb9e2d39 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/UserEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/UserEndpoint.java @@ -10,8 +10,6 @@ import at.tuwien.exception.AuthServiceException; import at.tuwien.exception.NotAllowedException; import at.tuwien.exception.UserNotFoundException; import at.tuwien.mapper.MetadataMapper; -import at.tuwien.service.AuthenticationService; -import at.tuwien.service.DatabaseService; import at.tuwien.service.UserService; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; @@ -43,17 +41,12 @@ import java.util.UUID; public class UserEndpoint extends AbstractEndpoint { private final UserService userService; - private final MetadataMapper userMapper; - private final DatabaseService databaseService; - private final AuthenticationService authenticationService; + private final MetadataMapper metadataMapper; @Autowired - public UserEndpoint(UserService userService, MetadataMapper userMapper, DatabaseService databaseService, - AuthenticationService authenticationService) { + public UserEndpoint(UserService userService, MetadataMapper metadataMapper) { this.userService = userService; - this.userMapper = userMapper; - this.databaseService = databaseService; - this.authenticationService = authenticationService; + this.metadataMapper = metadataMapper; } @GetMapping @@ -74,7 +67,7 @@ public class UserEndpoint extends AbstractEndpoint { return ResponseEntity.ok(userService.findAll() .stream() .filter(user -> !user.getIsInternal()) - .map(userMapper::userToUserBriefDto) + .map(metadataMapper::userToUserBriefDto) .toList()); } log.trace("filter by username: {}", username); @@ -83,7 +76,7 @@ public class UserEndpoint extends AbstractEndpoint { if (user.getIsInternal()) { return ResponseEntity.ok(List.of()); } - return ResponseEntity.ok(List.of(userMapper.userToUserBriefDto(user))); + return ResponseEntity.ok(List.of(metadataMapper.userToUserBriefDto(user))); } catch (UserNotFoundException e) { log.trace("filter by username {} failed: return empty list", username); return ResponseEntity.ok(List.of()); @@ -110,7 +103,7 @@ public class UserEndpoint extends AbstractEndpoint { public ResponseEntity<UserBriefDto> create(@NotNull @Valid @RequestBody CreateUserDto data) { log.debug("endpoint create user, data.id={}, data.username={}", data.getId(), data.getUsername()); return ResponseEntity.status(HttpStatus.CREATED) - .body(userMapper.userToUserBriefDto( + .body(metadataMapper.userToUserBriefDto( userService.create(data))); } @@ -160,7 +153,7 @@ public class UserEndpoint extends AbstractEndpoint { } return ResponseEntity.status(HttpStatus.OK) .headers(headers) - .body(userMapper.userToUserDto(user)); + .body(metadataMapper.userToUserDto(user)); } @PutMapping("/{userId}") @@ -208,7 +201,7 @@ public class UserEndpoint extends AbstractEndpoint { throw new NotAllowedException("Failed to modify user: not current user " + user.getId()); } return ResponseEntity.accepted() - .body(userMapper.userToUserBriefDto( + .body(metadataMapper.userToUserBriefDto( userService.modify(user, data))); } diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java index e8b40de8b2bfa05f9901a01ce0e269fbbffefe41..432b84d50f125895287516e0e628110e207f1a83 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/endpoints/ViewEndpoint.java @@ -1,7 +1,7 @@ package at.tuwien.endpoints; -import at.tuwien.api.database.ViewBriefDto; import at.tuwien.api.database.CreateViewDto; +import at.tuwien.api.database.ViewBriefDto; import at.tuwien.api.database.ViewDto; import at.tuwien.api.database.ViewUpdateDto; import at.tuwien.api.error.ApiErrorDto; @@ -15,7 +15,6 @@ import at.tuwien.service.UserService; import at.tuwien.service.ViewService; import io.micrometer.observation.annotation.Observed; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.headers.Header; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; @@ -26,7 +25,6 @@ import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -35,6 +33,7 @@ import org.springframework.web.bind.annotation.*; import java.security.Principal; import java.util.List; +import java.util.UUID; import java.util.stream.Collectors; @Log4j2 @@ -75,7 +74,7 @@ public class ViewEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<List<ViewBriefDto>> findAll(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<List<ViewBriefDto>> findAll(@NotNull @PathVariable("databaseId") UUID databaseId, Principal principal) throws UserNotFoundException, DatabaseNotFoundException { log.debug("endpoint find all views, databaseId={}", databaseId); @@ -120,6 +119,11 @@ public class ViewEndpoint extends AbstractEndpoint { content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "409", + description = "View exists with name", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), @ApiResponse(responseCode = "423", description = "Create view resulted in an invalid query statement", content = {@Content( @@ -136,17 +140,22 @@ public class ViewEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ViewBriefDto> create(@NotNull @PathVariable("databaseId") Long databaseId, + public ResponseEntity<ViewBriefDto> create(@NotNull @PathVariable("databaseId") UUID databaseId, @NotNull @Valid @RequestBody CreateViewDto data, @NotNull Principal principal) throws NotAllowedException, MalformedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, - UserNotFoundException, SearchServiceException, SearchServiceConnectionException { + UserNotFoundException, SearchServiceException, SearchServiceConnectionException, TableNotFoundException, + ImageNotFoundException, ViewExistsException { log.debug("endpoint create view, databaseId={}, data={}", databaseId, data); final Database database = databaseService.findById(databaseId); if (!database.getOwner().getId().equals(getId(principal))) { log.error("Failed to create view: not the database owner"); throw new NotAllowedException("Failed to create view: not the database owner"); } + if (database.getViews().stream().anyMatch(v -> v.getInternalName().equals(metadataMapper.nameToInternalName(data.getName())))) { + log.error("Failed to create view: name exists"); + throw new ViewExistsException("Failed to create view: name exists"); + } log.trace("create view for database {}", database); return ResponseEntity.status(HttpStatus.CREATED) .body(metadataMapper.viewToViewBriefDto( @@ -162,14 +171,6 @@ public class ViewEndpoint extends AbstractEndpoint { @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Find view successfully", - headers = {@Header(name = "X-Username", description = "The authentication username", schema = @Schema(implementation = String.class)), - @Header(name = "X-Password", description = "The authentication password", schema = @Schema(implementation = String.class)), - @Header(name = "X-Host", description = "The database hostname", schema = @Schema(implementation = String.class)), - @Header(name = "X-Port", description = "The database port number", schema = @Schema(implementation = Integer.class)), - @Header(name = "X-Type", description = "The JDBC connection type", schema = @Schema(implementation = String.class)), - @Header(name = "X-Database", description = "The database internal name", schema = @Schema(implementation = String.class)), - @Header(name = "X-View", description = "The view internal name", schema = @Schema(implementation = String.class)), - @Header(name = "Access-Control-Expose-Headers", description = "Expose custom headers", schema = @Schema(implementation = String.class))}, content = {@Content( mediaType = "application/json", schema = @Schema(implementation = ViewDto.class))}), @@ -184,31 +185,15 @@ public class ViewEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ViewDto> find(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId, + public ResponseEntity<ViewDto> find(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, Principal principal) throws DatabaseNotFoundException, ViewNotFoundException { log.debug("endpoint find view, databaseId={}, viewId={}", databaseId, viewId); final Database database = databaseService.findById(databaseId); final View view = viewService.findById(database, viewId); - final HttpHeaders headers = new HttpHeaders(); - if (isSystem(principal)) { - headers.set("X-Username", database.getContainer().getPrivilegedUsername()); - headers.set("X-Password", database.getContainer().getPrivilegedPassword()); - headers.set("X-Host", database.getContainer().getHost()); - headers.set("X-Port", "" + database.getContainer().getPort()); - headers.set("X-Type", database.getContainer().getImage().getJdbcMethod()); - headers.set("X-Database", database.getInternalName()); - headers.set("X-View", view.getInternalName()); - headers.set("Access-Control-Expose-Headers", "X-Username X-Password X-Host X-Port X-Type X-Database X-View"); - } - final ViewDto dto = metadataMapper.viewToViewDto(view); - if (!isSystem(principal)) { - removeInternalData(dto.getDatabase().getContainer()); - } return ResponseEntity.status(HttpStatus.OK) - .headers(headers) - .body(dto); + .body(metadataMapper.viewToViewDto(view)); } @DeleteMapping("/{viewId}") @@ -252,8 +237,8 @@ public class ViewEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId, + public ResponseEntity<Void> delete(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, @NotNull Principal principal) throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, ViewNotFoundException, SearchServiceException, SearchServiceConnectionException, UserNotFoundException { @@ -305,8 +290,8 @@ public class ViewEndpoint extends AbstractEndpoint { mediaType = "application/json", schema = @Schema(implementation = ApiErrorDto.class))}), }) - public ResponseEntity<ViewBriefDto> update(@NotNull @PathVariable("databaseId") Long databaseId, - @NotNull @PathVariable("viewId") Long viewId, + public ResponseEntity<ViewBriefDto> update(@NotNull @PathVariable("databaseId") UUID databaseId, + @NotNull @PathVariable("viewId") UUID viewId, @NotNull @Valid @RequestBody ViewUpdateDto data, @NotNull Principal principal) throws NotAllowedException, DataServiceConnectionException, DatabaseNotFoundException, ViewNotFoundException, SearchServiceException, diff --git a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java index aca2f9f356840af623ac0443fa6392092a5f865a..eadce489d9e2cb689012e5f9f4eaafeed0093566 100644 --- a/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java +++ b/dbrepo-metadata-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java @@ -473,6 +473,13 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return generic_handle(e.getClass(), e.getLocalizedMessage()); } + @Hidden + @ResponseStatus(code = HttpStatus.CONFLICT) + @ExceptionHandler(ViewExistsException.class) + public ResponseEntity<ApiErrorDto> handle(ViewExistsException e) { + return generic_handle(e.getClass(), e.getLocalizedMessage()); + } + @Hidden @ResponseStatus(code = HttpStatus.BAD_REQUEST) @ExceptionHandler(ViewMalformedException.class) diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/AccessEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/AccessEndpointUnitTest.java index 376769e3c318eaabc93e2a65def2673d85d3e7d2..49b5d48de8602ad79473142a3f05e36c336d97b9 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/AccessEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/AccessEndpointUnitTest.java @@ -347,7 +347,7 @@ public class AccessEndpointUnitTest extends AbstractUnitTest { assertNull(response.getBody()); } - protected void generic_find(Long databaseId, Database database, DatabaseAccess access, Principal principal, + protected void generic_find(UUID databaseId, Database database, DatabaseAccess access, Principal principal, User caller, UUID userId, User user) throws UserNotFoundException, DatabaseNotFoundException, AccessNotFoundException, NotAllowedException { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ContainerEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ContainerEndpointUnitTest.java index 00185d9ea134c33eba73ba7c24a02ff2d606ab1d..67078ee40971e42f91d04b764cc5bd0f4ac2d088 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ContainerEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ContainerEndpointUnitTest.java @@ -25,6 +25,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.security.Principal; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.doNothing; @@ -68,10 +69,13 @@ public class ContainerEndpointUnitTest extends AbstractUnitTest { /* test */ final ResponseEntity<ContainerDto> response = findById_generic(CONTAINER_1_ID, CONTAINER_1, USER_LOCAL_ADMIN_PRINCIPAL); - final HttpHeaders headers = response.getHeaders() ; + final HttpHeaders headers = response.getHeaders(); + assertEquals(List.of(CONTAINER_1_HOST), headers.get("X-Host")); + assertEquals(List.of("" + CONTAINER_1_PORT), headers.get("X-Port")); assertEquals(List.of(CONTAINER_1_PRIVILEGED_USERNAME), headers.get("X-Username")); assertEquals(List.of(CONTAINER_1_PRIVILEGED_PASSWORD), headers.get("X-Password")); - assertEquals(List.of("X-Username X-Password"), headers.get("Access-Control-Expose-Headers")); + assertEquals(List.of(IMAGE_1_JDBC), headers.get("X-Jdbc-Method")); + assertEquals(List.of("X-Username X-Password X-Jdbc-Method X-Host X-Port"), headers.get("Access-Control-Expose-Headers")); } @Test @@ -178,7 +182,7 @@ public class ContainerEndpointUnitTest extends AbstractUnitTest { /* ## GENERIC TEST CASES ## */ /* ################################################################################################### */ - public ResponseEntity<ContainerDto> findById_generic(Long containerId, Container container, Principal principal) + public ResponseEntity<ContainerDto> findById_generic(UUID containerId, Container container, Principal principal) throws ContainerNotFoundException { /* mock */ @@ -192,7 +196,7 @@ public class ContainerEndpointUnitTest extends AbstractUnitTest { return response; } - public void delete_generic(Long containerId, Container container) throws ContainerNotFoundException { + public void delete_generic(UUID containerId, Container container) throws ContainerNotFoundException { /* mock */ when(containerService.find(containerId)) diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/DatabaseEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/DatabaseEndpointUnitTest.java index 1340d552d1b8ff3da3be847704d3d9ccd328eabc..a52a0a8880420651c649776c48ff77814c31d34f 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/DatabaseEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/DatabaseEndpointUnitTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -333,6 +334,30 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { list_generic("i_do_not_exist", USER_1_PRINCIPAL, 0); } + @Test + @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) + public void list_hasSystemRole_succeeds() { + + /* mock */ + when(databaseService.findAll()) + .thenReturn(List.of(DATABASE_1, DATABASE_2, DATABASE_3, DATABASE_4)); + + /* test */ + list_generic(null, USER_LOCAL_ADMIN_PRINCIPAL, 4); + } + + @Test + @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) + public void list_hasSystemRoleFilterByName_succeeds() { + + /* mock */ + when(databaseService.findByInternalName(DATABASE_1_INTERNALNAME)) + .thenReturn(List.of(DATABASE_1)); + + /* test */ + list_generic(DATABASE_1_INTERNALNAME, USER_LOCAL_ADMIN_PRINCIPAL, 1); + } + @Test @WithAnonymousUser public void list_filterNoResult_succeeds() { @@ -563,11 +588,13 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser - public void findById_anonymousPublicSchemaNoAccess_succeeds() throws UserNotFoundException, NotAllowedException, - DataServiceException, DatabaseNotFoundException, ExchangeNotFoundException, DataServiceConnectionException { + public void findById_anonymousPublicSchemaNoAccess_succeeds() throws NotAllowedException, + DatabaseNotFoundException { /* test */ - final DatabaseDto database = findById_generic(DATABASE_2_ID, DATABASE_2, null); + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_2_ID, DATABASE_2, null); + final DatabaseDto database = response.getBody(); + assertNotNull(database); assertEquals(3, database.getTables().size()); assertEquals(1, database.getViews().size()); assertEquals(0, database.getAccesses().size()); @@ -575,17 +602,32 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) - public void findById_privateSchemaNoAccessInternalUser_succeeds() throws UserNotFoundException, - NotAllowedException, DataServiceException, DatabaseNotFoundException, ExchangeNotFoundException, - DataServiceConnectionException { + public void findById_privateSchemaNoAccessInternalUser_succeeds() throws NotAllowedException, + DatabaseNotFoundException { /* test */ - final DatabaseDto database = findById_generic(DATABASE_3_ID, DATABASE_3, USER_LOCAL_ADMIN_PRINCIPAL); - assertEquals(0, database.getTables().size()); + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_3_ID, DATABASE_3, USER_LOCAL_ADMIN_PRINCIPAL); + final DatabaseDto database = response.getBody(); + assertNotNull(database); + assertEquals(1, database.getTables().size()); assertEquals(1, database.getViews().size()); assertNotEquals(0, database.getAccesses().size()); } + @Test + @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME, authorities = {"system"}) + public void findById_privateSchemaPrivateDataNoAccessInternalUser_succeeds() throws NotAllowedException, + DatabaseNotFoundException { + + /* test */ + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_1_ID, DATABASE_1, USER_LOCAL_ADMIN_PRINCIPAL); + final DatabaseDto database = response.getBody(); + assertNotNull(database); + assertEquals(4, database.getTables().size()); + assertEquals(3, database.getViews().size()); + assertNotEquals(0, database.getAccesses().size()); + } + @Test @WithAnonymousUser public void findById_privateSchema_fails() { @@ -608,15 +650,16 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME) - public void findById_ownerSeesAccessRights_succeeds() throws DataServiceException, DataServiceConnectionException, - DatabaseNotFoundException, ExchangeNotFoundException, UserNotFoundException, NotAllowedException { + public void findById_ownerSeesAccessRights_succeeds() throws DatabaseNotFoundException, NotAllowedException { /* mock */ when(accessService.list(DATABASE_1)) .thenReturn(List.of(DATABASE_1_USER_1_WRITE_ALL_ACCESS, DATABASE_1_USER_2_READ_ACCESS)); /* test */ - final DatabaseDto database = findById_generic(DATABASE_1_ID, DATABASE_1, USER_1_PRINCIPAL); + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_1_ID, DATABASE_1, USER_1_PRINCIPAL); + final DatabaseDto database = response.getBody(); + assertNotNull(database); assertEquals(4, database.getTables().size()); assertEquals(3, database.getViews().size()); assertEquals(3, database.getAccesses().size()); @@ -624,15 +667,16 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_2_USERNAME) - public void findById_hiddenAccessRights_succeeds() throws DataServiceException, DataServiceConnectionException, - DatabaseNotFoundException, ExchangeNotFoundException, UserNotFoundException, NotAllowedException { + public void findById_hiddenAccessRights_succeeds() throws DatabaseNotFoundException, NotAllowedException { /* mock */ when(accessService.list(DATABASE_1)) .thenReturn(List.of(DATABASE_1_USER_1_WRITE_ALL_ACCESS, DATABASE_1_USER_2_READ_ACCESS)); /* test */ - final DatabaseDto database = findById_generic(DATABASE_1_ID, DATABASE_1, USER_2_PRINCIPAL); + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_1_ID, DATABASE_1, USER_2_PRINCIPAL); + final DatabaseDto database = response.getBody(); + assertNotNull(database); assertEquals(4, database.getTables().size()); assertEquals(3, database.getViews().size()); assertEquals(0, database.getAccesses().size()); @@ -640,15 +684,16 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME) - public void findById_hiddenAccessRightsSeesOwn_succeeds() throws DataServiceException, DataServiceConnectionException, - DatabaseNotFoundException, ExchangeNotFoundException, UserNotFoundException, NotAllowedException { + public void findById_hiddenAccessRightsSeesOwn_succeeds() throws DatabaseNotFoundException, NotAllowedException { /* mock */ when(accessService.list(DATABASE_1)) .thenReturn(List.of(DATABASE_1_USER_1_WRITE_ALL_ACCESS, DATABASE_1_USER_2_READ_ACCESS)); /* test */ - final DatabaseDto database = findById_generic(DATABASE_1_ID, DATABASE_1, USER_1_PRINCIPAL); + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_1_ID, DATABASE_1, USER_1_PRINCIPAL); + final DatabaseDto database = response.getBody(); + assertNotNull(database); assertEquals(4, database.getTables().size()); assertEquals(3, database.getViews().size()); assertEquals(3, database.getAccesses().size()); @@ -674,6 +719,21 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { }); } + @Test + @WithMockUser(username = USER_LOCAL_ADMIN_USERNAME) + public void findById_system_succeeds() throws NotAllowedException, DatabaseNotFoundException { + + /* test */ + final ResponseEntity<DatabaseDto> response = findById_generic(DATABASE_1_ID, DATABASE_1, USER_LOCAL_ADMIN_PRINCIPAL); + final HttpHeaders headers = response.getHeaders(); + assertEquals(List.of(CONTAINER_1_HOST), headers.get("X-Host")); + assertEquals(List.of("" + CONTAINER_1_PORT), headers.get("X-Port")); + assertEquals(List.of(CONTAINER_1_PRIVILEGED_USERNAME), headers.get("X-Username")); + assertEquals(List.of(CONTAINER_1_PRIVILEGED_PASSWORD), headers.get("X-Password")); + assertEquals(List.of(IMAGE_1_JDBC), headers.get("X-Jdbc-Method")); + assertEquals(List.of("X-Username X-Password X-Jdbc-Method X-Host X-Port"), headers.get("Access-Control-Expose-Headers")); + } + @Test @WithAnonymousUser public void findPreviewImage_anonymous_succeeds() throws DatabaseNotFoundException { @@ -743,7 +803,7 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { doNothing() .when(messageQueueService) .setVirtualHostPermissions(user); - when(databaseService.findById(anyLong())) + when(databaseService.findById(any(UUID.class))) .thenReturn(DATABASE_1); /* test */ @@ -752,7 +812,7 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - public void visibility_generic(Long databaseId, Database database, DatabaseModifyVisibilityDto data, + public void visibility_generic(UUID databaseId, Database database, DatabaseModifyVisibilityDto data, Principal principal) throws NotAllowedException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, UserNotFoundException { @@ -774,9 +834,8 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - public DatabaseDto findById_generic(Long databaseId, Database database, Principal principal) - throws DataServiceConnectionException, DatabaseNotFoundException, ExchangeNotFoundException, - DataServiceException, UserNotFoundException, NotAllowedException { + public ResponseEntity<DatabaseDto> findById_generic(UUID databaseId, Database database, Principal principal) + throws DatabaseNotFoundException, NotAllowedException { /* mock */ if (database != null) { @@ -791,12 +850,11 @@ public class DatabaseEndpointUnitTest extends AbstractUnitTest { /* test */ final ResponseEntity<DatabaseDto> response = databaseEndpoint.findById(databaseId, principal); assertEquals(HttpStatus.OK, response.getStatusCode()); - final DatabaseDto body = response.getBody(); - assertNotNull(body); - return body; + return response; } - public ResponseEntity<byte[]> findPreviewImage_generic(Long databaseId, Database database) throws DatabaseNotFoundException { + public ResponseEntity<byte[]> findPreviewImage_generic(UUID databaseId, Database database) + throws DatabaseNotFoundException { /* mock */ if (database != null) { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java index 419393b485096b84f6495bfcd6ce2910e0c9ae46..1e003041027ed22072d167eae81fab3a5d32c813 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/IdentifierEndpointUnitTest.java @@ -41,6 +41,7 @@ import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.security.Principal; import java.util.List; +import java.util.UUID; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.*; @@ -92,32 +93,32 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { public static Stream<Arguments> malformedDatabase_parameters() { return Stream.of( - Arguments.arguments("queryId", 9999L, null, null), - Arguments.arguments("viewId", null, 9999L, null), - Arguments.arguments("tableId", null, null, 9999L) + Arguments.arguments("queryId", "deadbeef-1f60-4297-9eab-5b0321d96dd7", null, null), + Arguments.arguments("viewId", null, "deadbeef-1f60-4297-9eab-5b0321d96dd7", null), + Arguments.arguments("tableId", null, null, "deadbeef-1f60-4297-9eab-5b0321d96dd7") ); } public static Stream<Arguments> malformedSubset_parameters() { return Stream.of( Arguments.arguments("queryId", null, null, null), - Arguments.arguments("viewId", null, 9999L, null), - Arguments.arguments("tableId", null, null, 9999L) + Arguments.arguments("viewId", null, "deadbeef-1f60-4297-9eab-5b0321d96dd7", null), + Arguments.arguments("tableId", null, null, "deadbeef-1f60-4297-9eab-5b0321d96dd7") ); } public static Stream<Arguments> malformedView_parameters() { return Stream.of( - Arguments.arguments("queryId", 9999L, null, null), + Arguments.arguments("queryId", "deadbeef-1f60-4297-9eab-5b0321d96dd7", null, null), Arguments.arguments("viewId", null, null, null), - Arguments.arguments("tableId", null, null, 9999L) + Arguments.arguments("tableId", null, null, "deadbeef-1f60-4297-9eab-5b0321d96dd7") ); } public static Stream<Arguments> malformedTable_parameters() { return Stream.of( - Arguments.arguments("queryId", 9999L, null, null), - Arguments.arguments("viewId", null, 9999L, null), + Arguments.arguments("queryId", "deadbeef-1f60-4297-9eab-5b0321d96dd7", null, null), + Arguments.arguments("viewId", null, "deadbeef-1f60-4297-9eab-5b0321d96dd7", null), Arguments.arguments("tableId", null, null, null) ); } @@ -125,7 +126,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { public static Stream<Arguments> findAll_anonymousFilterDatabase_parameters() { return Stream.of( Arguments.arguments("dbid", DATABASE_1_ID, null, null, null, null, 1), - Arguments.arguments("qid", DATABASE_1_ID, QUERY_1_ID, null, null, null, 0), + Arguments.arguments("qid", DATABASE_1_ID, QUERY_1_ID, null, null, null, 1), Arguments.arguments("vid", DATABASE_1_ID, null, VIEW_1_ID, null, null, 0), Arguments.arguments("tid", DATABASE_1_ID, null, null, TABLE_1_ID, null, 0), Arguments.arguments("status_published", DATABASE_1_ID, null, null, null, "PUBLISHED", 1), @@ -143,7 +144,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { public static Stream<Arguments> findAll_filterDatabase_parameters() { return Stream.of( Arguments.arguments("database_dbid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, null, null, 1, USER_1_PRINCIPAL), - Arguments.arguments("database_qid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, QUERY_1_ID, null, null, 0, USER_1_PRINCIPAL), + Arguments.arguments("database_qid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, QUERY_1_ID, null, null, 1, USER_1_PRINCIPAL), Arguments.arguments("database_vid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, VIEW_1_ID, null, 0, USER_1_PRINCIPAL), Arguments.arguments("database_tid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, null, TABLE_1_ID, 0, USER_1_PRINCIPAL), Arguments.arguments("subset_dbid", IdentifierTypeDto.SUBSET, null, DATABASE_1_ID, null, null, null, 1, USER_1_PRINCIPAL), @@ -159,7 +160,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { Arguments.arguments("table_vid", IdentifierTypeDto.TABLE, null, DATABASE_1_ID, null, VIEW_1_ID, null, 0, USER_1_PRINCIPAL), Arguments.arguments("table_tid", IdentifierTypeDto.TABLE, null, DATABASE_1_ID, null, null, TABLE_1_ID, 1, USER_1_PRINCIPAL), Arguments.arguments("anon_database_dbid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, null, null, 1, null), - Arguments.arguments("anon_database_qid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, QUERY_1_ID, null, null, 0, null), + Arguments.arguments("anon_database_qid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, QUERY_1_ID, null, null, 1, null), Arguments.arguments("anon_database_vid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, VIEW_1_ID, null, 0, null), Arguments.arguments("anon_database_tid", IdentifierTypeDto.DATABASE, null, DATABASE_1_ID, null, null, TABLE_1_ID, 0, null), Arguments.arguments("anon_subset_dbid", IdentifierTypeDto.SUBSET, null, DATABASE_1_ID, null, null, null, 1, null), @@ -210,8 +211,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("findAll_anonymousFilterDatabase_parameters") @WithAnonymousUser - public void findAll_anonymousFilterDatabase_succeeds(String name, Long databaseId, Long queryId, Long viewId, - Long tableId, IdentifierStatusTypeDto status, + public void findAll_anonymousFilterDatabase_succeeds(String name, UUID databaseId, UUID queryId, UUID viewId, + UUID tableId, IdentifierStatusTypeDto status, Integer expectedSize) throws ViewNotFoundException, TableNotFoundException, DatabaseNotFoundException { @@ -239,7 +240,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("findAll_filterSubset_parameters") @WithMockUser(username = USER_2_USERNAME) - public void findAll_filterSubset_succeeds(String name, Long databaseId, Long queryId, Long viewId, Long tableId, + public void findAll_filterSubset_succeeds(String name, UUID databaseId, UUID queryId, UUID viewId, UUID tableId, IdentifierStatusTypeDto status, Integer expectedSize) { /* mock */ @@ -258,8 +259,8 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("findAll_anonymousFilterDatabase_parameters") @WithAnonymousUser - public void findAll_wrongPrincipalFilterDatabase_succeeds(String name, Long databaseId, Long queryId, Long viewId, - Long tableId, IdentifierStatusTypeDto status, + public void findAll_wrongPrincipalFilterDatabase_succeeds(String name, UUID databaseId, UUID queryId, UUID viewId, + UUID tableId, IdentifierStatusTypeDto status, Integer expectedSize) throws ViewNotFoundException, TableNotFoundException, DatabaseNotFoundException { @@ -288,7 +289,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @MethodSource("findAll_filterDatabase_parameters") @WithAnonymousUser public void findAll_filterDatabase_succeeds(String name, IdentifierTypeDto type, IdentifierStatusTypeDto status, - Long databaseId, Long queryId, Long viewId, Long tableId, + UUID databaseId, UUID queryId, UUID viewId, UUID tableId, Integer expectedSize, Principal principal) throws ViewNotFoundException, TableNotFoundException, DatabaseNotFoundException { @@ -1115,7 +1116,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { final ResponseEntity<?> response = generic_find(null, null); assertEquals(HttpStatus.MOVED_PERMANENTLY, response.getStatusCode()); assertNotNull(response.getHeaders().get("Location")); - assertEquals(endpointConfig.getWebsiteUrl() + "/database/" + IDENTIFIER_1_DATABASE_ID + "/info?pid=" + IDENTIFIER_1_DATABASE_ID, + assertEquals(endpointConfig.getWebsiteUrl() + "/database/" + DATABASE_1_ID + "/info?pid=" + IDENTIFIER_1_ID, response.getHeaders().getFirst("Location")); } @@ -1148,7 +1149,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { SearchServiceException, SearchServiceConnectionException, TableNotFoundException, ExternalServiceException { /* mock */ - when(dataServiceGateway.findQuery(DATABASE_2_ID, IDENTIFIER_5_QUERY_ID)) + when(dataServiceGateway.findQuery(DATABASE_2_ID, QUERY_2_ID)) .thenReturn(QUERY_2_DTO); /* test */ @@ -1158,12 +1159,12 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("malformedSubset_parameters") @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) - public void save_malformedSubset_fails(String name, Long queryId, Long viewId, Long tableId) { + public void save_malformedSubset_fails(String name, UUID queryId, UUID viewId, UUID tableId) { final IdentifierSaveDto request = IdentifierSaveDto.builder() .queryId(queryId) .viewId(viewId) .tableId(tableId) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of()) @@ -1183,12 +1184,12 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("malformedView_parameters") @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) - public void save_malformedView_fails(String name, Long queryId, Long viewId, Long tableId) { + public void save_malformedView_fails(String name, UUID queryId, UUID viewId, UUID tableId) { final IdentifierSaveDto request = IdentifierSaveDto.builder() .queryId(queryId) .viewId(viewId) .tableId(tableId) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of()) @@ -1208,12 +1209,12 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("malformedTable_parameters") @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) - public void save_malformedTable_fails(String name, Long queryId, Long viewId, Long tableId) { + public void save_malformedTable_fails(String name, UUID queryId, UUID viewId, UUID tableId) { final IdentifierSaveDto request = IdentifierSaveDto.builder() .queryId(queryId) .viewId(viewId) .tableId(tableId) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of()) @@ -1233,12 +1234,12 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("malformedDatabase_parameters") @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) - public void save_malformedDatabase_fails(String name, Long queryId, Long viewId, Long tableId) { + public void save_malformedDatabase_fails(String name, UUID queryId, UUID viewId, UUID tableId) { final IdentifierSaveDto request = IdentifierSaveDto.builder() .queryId(queryId) .viewId(viewId) .tableId(tableId) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of()) @@ -1259,7 +1260,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) public void save_invalidDateDay_fails() { final IdentifierSaveDto request = IdentifierSaveDto.builder() - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of(IDENTIFIER_1_RELATED_IDENTIFIER_5_CREATE_DTO)) @@ -1281,7 +1282,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) public void save_invalidDateMonth_fails() { final IdentifierSaveDto request = IdentifierSaveDto.builder() - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) .relatedIdentifiers(List.of(IDENTIFIER_1_RELATED_IDENTIFIER_5_CREATE_DTO)) @@ -1319,7 +1320,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) public void save_invalidTable_fails() { final IdentifierSaveDto request = IdentifierSaveDto.builder() - .viewId(1L) // <-- + .viewId(UUID.randomUUID()) // <-- .databaseId(DATABASE_1_ID) .descriptions(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO)) .titles(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO)) @@ -1341,7 +1342,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { @ParameterizedTest @MethodSource("save_parameters") @WithMockUser(username = USER_1_USERNAME, authorities = {"create-identifier"}) - public void save_noForeign_fails(String name, Long databaseId, Database database, DatabaseAccess access, + public void save_noForeign_fails(String name, UUID databaseId, Database database, DatabaseAccess access, Identifier identifier, IdentifierSaveDto data, Principal principal, User user) { /* test */ @@ -1455,7 +1456,7 @@ public class IdentifierEndpointUnitTest extends AbstractUnitTest { /* ## GENERIC TEST CASES ## */ /* ################################################################################################### */ - protected void generic_save(Long databaseId, Database database, DatabaseAccess access, Identifier identifier, + protected void generic_save(UUID databaseId, Database database, DatabaseAccess access, Identifier identifier, IdentifierSaveDto data, Principal principal, User user) throws MalformedException, NotAllowedException, DataServiceException, DataServiceConnectionException, UserNotFoundException, DatabaseNotFoundException, AccessNotFoundException, QueryNotFoundException, diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ImageEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ImageEndpointUnitTest.java index bf1b2ffa55c51e74ebb7d643d374407954bfdbd3..b5be98cfb6f8ce6fc0ed840c065dca5524b10502 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ImageEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ImageEndpointUnitTest.java @@ -25,6 +25,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.security.Principal; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; @@ -260,7 +261,7 @@ public class ImageEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - public void findById_generic(Long imageId, ContainerImage image) throws ImageNotFoundException { + public void findById_generic(UUID imageId, ContainerImage image) throws ImageNotFoundException { /* mock */ when(imageService.find(imageId)) @@ -272,7 +273,7 @@ public class ImageEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - public void delete_generic(Long imageId, ContainerImage image) throws ImageNotFoundException { + public void delete_generic(UUID imageId, ContainerImage image) throws ImageNotFoundException { /* mock */ when(imageService.find(imageId)) @@ -284,7 +285,7 @@ public class ImageEndpointUnitTest extends AbstractUnitTest { assertNull(response.getBody()); } - public void modify_generic(Long imageId, ContainerImage image, ImageChangeDto data) throws ImageNotFoundException { + public void modify_generic(UUID imageId, ContainerImage image, ImageChangeDto data) throws ImageNotFoundException { /* mock */ when(imageService.find(imageId)) diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MessageEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MessageEndpointUnitTest.java index 22516074ae83d88c5140de9e9fb0d32e575e598d..0fabc67c9175fdde835e8c14a8cbbabdc14d158f 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MessageEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MessageEndpointUnitTest.java @@ -21,6 +21,7 @@ import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; @@ -215,7 +216,7 @@ public class MessageEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - protected void find_generic(Long messageId, BannerMessage message) throws MessageNotFoundException { + protected void find_generic(UUID messageId, BannerMessage message) throws MessageNotFoundException { /* mock */ if (message != null) { @@ -245,7 +246,7 @@ public class MessageEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - protected void update_generic(BannerMessageUpdateDto data, Long messageId, BannerMessage message) + protected void update_generic(BannerMessageUpdateDto data, UUID messageId, BannerMessage message) throws MessageNotFoundException { /* mock */ @@ -260,7 +261,7 @@ public class MessageEndpointUnitTest extends AbstractUnitTest { assertNotNull(response.getBody()); } - protected void delete_generic(Long messageId, BannerMessage message) throws MessageNotFoundException { + protected void delete_generic(UUID messageId, BannerMessage message) throws MessageNotFoundException { /* mock */ if (message != null) { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MetadataEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MetadataEndpointUnitTest.java index 8853728d471e3649c5b5108a21ea5404e5ed1ea2..98f756a1c0a0de2674ecca8732dd319411a95223 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MetadataEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/MetadataEndpointUnitTest.java @@ -19,6 +19,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; import java.util.Optional; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when; @@ -143,7 +144,7 @@ public class MetadataEndpointUnitTest extends AbstractUnitTest { public void getRecord_dc_succeeds() { final OaiRecordParameters parameters = new OaiRecordParameters(); parameters.setMetadataPrefix("oai_dc"); - parameters.setIdentifier("oai:1"); + parameters.setIdentifier("oai:" + IDENTIFIER_1_ID); /* mock */ when(identifierRepository.findById(IDENTIFIER_1_ID)) @@ -163,7 +164,7 @@ public class MetadataEndpointUnitTest extends AbstractUnitTest { public void getRecord_datacite_succeeds() { final OaiRecordParameters parameters = new OaiRecordParameters(); parameters.setMetadataPrefix("oai_datacite"); - parameters.setIdentifier("oai:1"); + parameters.setIdentifier("oai:" + IDENTIFIER_1_ID); /* mock */ when(identifierRepository.findById(IDENTIFIER_1_ID)) @@ -183,7 +184,7 @@ public class MetadataEndpointUnitTest extends AbstractUnitTest { public void getRecord_invalidIdentifierPrefix_succeeds() { final OaiRecordParameters parameters = new OaiRecordParameters(); parameters.setMetadataPrefix("oai_datacite"); - parameters.setIdentifier("ark:1"); + parameters.setIdentifier("ark:" + IDENTIFIER_1_ID); /* mock */ when(identifierRepository.findById(IDENTIFIER_1_ID)) @@ -201,7 +202,7 @@ public class MetadataEndpointUnitTest extends AbstractUnitTest { public void getRecord_notFound_fails() { final OaiRecordParameters parameters = new OaiRecordParameters(); parameters.setMetadataPrefix("oai_dc"); - parameters.setIdentifier("oai:9999"); + parameters.setIdentifier("oai:" + UUID.randomUUID()); /* mock */ when(identifierRepository.findById(IDENTIFIER_1_ID)) diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/OntologyEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/OntologyEndpointUnitTest.java index c3f276c2dfca9a557117571bfa3a147b0f8bc507..ab3d0775ad1a694d9f33d822e65e37ae8772b032 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/OntologyEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/OntologyEndpointUnitTest.java @@ -26,6 +26,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.security.Principal; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; @@ -84,20 +85,21 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = {"execute-semantic-query"}) public void find_noSparql_fails() throws OntologyNotFoundException { + final UUID id = UUID.randomUUID(); final Ontology mock = Ontology.builder() - .id(9999L) + .id(id) .uri(ONTOLOGY_1_URI) .uriPattern(ONTOLOGY_1_URI_PATTERN) .sparqlEndpoint(null) // <<< .build(); /* mock */ - when(ontologyService.find(9999L)) + when(ontologyService.find(id)) .thenReturn(mock); /* test */ assertThrows(OntologyNotFoundException.class, () -> { - ontologyEndpoint.find(9999L, null, UNIT_1_URI); + ontologyEndpoint.find(id, null, UNIT_1_URI); }); } @@ -107,7 +109,7 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(OntologyNotFoundException.class, () -> { - find_generic(99999L, null); + find_generic(UUID.randomUUID(), null); }); } @@ -293,7 +295,7 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { assertEquals(4, body.size()); } - public void find_generic(Long ontologyId, Ontology ontology) throws OntologyNotFoundException { + public void find_generic(UUID ontologyId, Ontology ontology) throws OntologyNotFoundException { /* mock */ if (ontology != null) { @@ -340,7 +342,7 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { assertNotNull(body); } - public void update_generic(Long ontologyId, OntologyModifyDto modifyDto, Ontology ontology) + public void update_generic(UUID ontologyId, OntologyModifyDto modifyDto, Ontology ontology) throws OntologyNotFoundException { /* mock */ @@ -362,7 +364,7 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { assertNotNull(body); } - public void delete_generic(Long ontologyId, Ontology ontology) throws OntologyNotFoundException { + public void delete_generic(UUID ontologyId, Ontology ontology) throws OntologyNotFoundException { /* mock */ doNothing() @@ -374,7 +376,7 @@ public class OntologyEndpointUnitTest extends AbstractUnitTest { assertEquals(HttpStatus.ACCEPTED, response.getStatusCode()); } - public List<EntityDto> find_generic(Long ontologyId, String label, String uri, Ontology ontology, + public List<EntityDto> find_generic(UUID ontologyId, String label, String uri, Ontology ontology, EntityDto entityDto) throws MalformedException, UriMalformedException, FilterBadRequestException, OntologyNotFoundException { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/TableEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/TableEndpointUnitTest.java index 16551784c883cc69dfbb87504fafc504f1af7015..12b6e0a2477246c22a29414fc2d5a1794574e689 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/TableEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/TableEndpointUnitTest.java @@ -57,6 +57,12 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @MockBean private AccessService accessService; + @MockBean + private UnitService unitService; + + @MockBean + private ConceptService conceptService; + @MockBean private TableService tableService; @@ -372,6 +378,142 @@ public class TableEndpointUnitTest extends AbstractUnitTest { }); } + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_sets_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name("sex") + .type(ColumnTypeDto.SET) + .sets(List.of("male", "female")) + .build())) + .build(); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_enum_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name("sex") + .type(ColumnTypeDto.ENUM) + .enums(List.of("male", "female")) + .build())) + .build(); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_hasUnit_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException, UnitNotFoundException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name(UNIT_1_NAME) + .type(ColumnTypeDto.INT) + .unitUri(UNIT_1_URI) + .build())) + .build(); + + /* mock */ + when(unitService.find(UNIT_1_URI)) + .thenReturn(UNIT_1); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_hasUnitNotFound_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name(UNIT_1_NAME) + .type(ColumnTypeDto.INT) + .unitUri(UNIT_1_URI) + .build())) + .build(); + + /* mock */ + when(unitService.create(UNIT_1)) + .thenReturn(UNIT_1); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_hasConcept_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException, ConceptNotFoundException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name(CONCEPT_1_NAME) + .type(ColumnTypeDto.INT) + .conceptUri(UNIT_1_URI) + .build())) + .build(); + + /* mock */ + when(conceptService.find(CONCEPT_1_URI)) + .thenReturn(CONCEPT_1); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + + @Test + @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) + public void create_hasConceptNotFound_succeeds() throws UserNotFoundException, SearchServiceException, NotAllowedException, + SemanticEntityNotFoundException, DataServiceConnectionException, TableNotFoundException, MalformedException, + DataServiceException, DatabaseNotFoundException, AccessNotFoundException, OntologyNotFoundException, + TableExistsException, SearchServiceConnectionException { + final CreateTableDto request = CreateTableDto.builder() + .name("Some Table") + .description("Some Description") + .columns(List.of(CreateTableColumnDto.builder() + .name("precipitation") + .type(ColumnTypeDto.INT) + .conceptUri(UNIT_1_URI) + .build())) + .build(); + + /* mock */ + when(conceptService.create(CONCEPT_1)) + .thenReturn(CONCEPT_1); + + /* test */ + generic_create(DATABASE_3_ID, DATABASE_3, request, USER_1_PRINCIPAL, USER_1, DATABASE_3_USER_1_WRITE_OWN_ACCESS); + } + @ParameterizedTest @MethodSource("canHaveSizeAndD_parameters") @WithMockUser(username = USER_3_USERNAME, authorities = {"create-table"}) @@ -524,22 +666,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser - public void findById_publicDatabasePrivateDataPrivateSchemaAnonymous_succeeds() throws UserNotFoundException, - TableNotFoundException, NotAllowedException, DataServiceException, DatabaseNotFoundException, - AccessNotFoundException, QueueNotFoundException, DataServiceConnectionException { - - /* test */ - final ResponseEntity<TableDto> response = generic_findById(DATABASE_3_ID, DATABASE_3, TABLE_8_ID, TABLE_8, null, null, null); - final TableDto body = response.getBody(); - assertNull(body.getConstraints()); - assertEquals(List.of(), body.getColumns()); - } - - @Test - @WithAnonymousUser - public void findById_publicDataPublicSchemaAnonymous_succeeds() throws DataServiceException, - DataServiceConnectionException, TableNotFoundException, DatabaseNotFoundException, AccessNotFoundException, - QueueNotFoundException, UserNotFoundException, NotAllowedException { + public void findById_publicDataPublicSchemaAnonymous_succeeds() throws UserNotFoundException, + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ generic_findById(DATABASE_4_ID, DATABASE_4, TABLE_9_ID, TABLE_9, null, null, null); @@ -567,9 +695,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = "find-table") - public void findById_publicHasRole_succeeds() throws DataServiceException, DataServiceConnectionException, - TableNotFoundException, DatabaseNotFoundException, AccessNotFoundException, QueueNotFoundException, - UserNotFoundException, NotAllowedException { + public void findById_publicHasRole_succeeds() throws UserNotFoundException, + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ final ResponseEntity<TableDto> response = generic_findById(DATABASE_3_ID, DATABASE_3, TABLE_8_ID, TABLE_8, USER_1_PRINCIPAL, USER_1, DATABASE_1_USER_1_READ_ACCESS); @@ -580,9 +707,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_4_USERNAME) - public void findById_publicNoRole_succeeds() throws DataServiceException, DataServiceConnectionException, - TableNotFoundException, DatabaseNotFoundException, AccessNotFoundException, QueueNotFoundException, - UserNotFoundException, NotAllowedException { + public void findById_publicNoRole_succeeds() throws UserNotFoundException, + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ generic_findById(DATABASE_3_ID, DATABASE_3, TABLE_8_ID, TABLE_8, USER_1_PRINCIPAL, USER_1, null); @@ -633,7 +759,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { - analyseTableColumn_generic(DATABASE_1_ID, DATABASE_1, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), null); + analyseTableColumn_generic(DATABASE_1_ID, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), null); }); } @@ -643,7 +769,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(org.springframework.security.access.AccessDeniedException.class, () -> { - analyseTableColumn_generic(DATABASE_1_ID, DATABASE_1, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), USER_4_PRINCIPAL); + analyseTableColumn_generic(DATABASE_1_ID, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), USER_4_PRINCIPAL); }); } @@ -653,7 +779,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { DatabaseNotFoundException { /* test */ - analyseTableColumn_generic(DATABASE_1_ID, DATABASE_1, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), USER_1_PRINCIPAL); + analyseTableColumn_generic(DATABASE_1_ID, TABLE_1_ID, TABLE_1_COLUMNS.get(0).getId(), TABLE_1_COLUMNS.get(0), USER_1_PRINCIPAL); } @Test @@ -852,7 +978,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { DatabaseNotFoundException, AccessNotFoundException, SearchServiceException, SearchServiceConnectionException, OntologyNotFoundException, SemanticEntityNotFoundException { final ColumnSemanticsUpdateDto request = ColumnSemanticsUpdateDto.builder() - .unitUri(UNIT_1_URI) + .unitUri(null) + .conceptUri(null) .build(); /* test */ @@ -935,8 +1062,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithAnonymousUser public void findById_privateDatabasePrivateDataPublicSchemaAnonymous_fails() throws UserNotFoundException, - TableNotFoundException, NotAllowedException, DataServiceException, DatabaseNotFoundException, - AccessNotFoundException, QueueNotFoundException, DataServiceConnectionException { + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ generic_findById(DATABASE_1_ID, DATABASE_1, TABLE_2_ID, TABLE_2, null, null, null); @@ -944,19 +1070,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_4_USERNAME) - public void findById_privateSchemaNotOwnerNoAccess_fails() { - - /* test */ - assertThrows(NotAllowedException.class, () -> { - generic_findById(DATABASE_3_ID, DATABASE_3, TABLE_8_ID, TABLE_8, USER_4_PRINCIPAL, USER_4, null); - }); - } - - @Test - @WithMockUser(username = USER_4_USERNAME) - public void findById_publicSchemaNotOwnerNoAccess_succeeds() throws UserNotFoundException, TableNotFoundException, - NotAllowedException, DataServiceException, DatabaseNotFoundException, AccessNotFoundException, - QueueNotFoundException, DataServiceConnectionException { + public void findById_publicSchemaNotOwnerNoAccess_succeeds() throws UserNotFoundException, + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ final ResponseEntity<TableDto> response = generic_findById(DATABASE_1_ID, DATABASE_1, TABLE_2_ID, TABLE_2, USER_4_PRINCIPAL, USER_4, null); @@ -987,9 +1102,8 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_1_USERNAME, authorities = "find-table") - public void findById_privateHasRole_succeeds() throws DataServiceException, DataServiceConnectionException, - TableNotFoundException, DatabaseNotFoundException, AccessNotFoundException, QueueNotFoundException, - UserNotFoundException, NotAllowedException { + public void findById_privateHasRole_succeeds() throws UserNotFoundException, + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ final ResponseEntity<TableDto> response = generic_findById(DATABASE_1_ID, DATABASE_1, TABLE_1_ID, TABLE_1, USER_1_PRINCIPAL, USER_1, DATABASE_1_USER_1_READ_ACCESS); @@ -1001,8 +1115,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { @Test @WithMockUser(username = USER_4_USERNAME) public void findById_privateDatabasePrivateDataPrivateSchemaNoRole_succeeds() throws UserNotFoundException, - TableNotFoundException, NotAllowedException, DataServiceException, DatabaseNotFoundException, - AccessNotFoundException, QueueNotFoundException, DataServiceConnectionException { + TableNotFoundException, NotAllowedException, DatabaseNotFoundException, AccessNotFoundException { /* test */ generic_findById(DATABASE_1_ID, DATABASE_1, TABLE_1_ID, TABLE_1, USER_4_PRINCIPAL, USER_4, DATABASE_1_USER_4_READ_ACCESS); @@ -1131,7 +1244,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* ## GENERIC TEST CASES ## */ /* ################################################################################################### */ - public void analyseTable_generic(Long databaseId, Database database, Long tableId, Table table, Principal principal) + public void analyseTable_generic(UUID databaseId, Database database, UUID tableId, Table table, Principal principal) throws MalformedException, TableNotFoundException, DatabaseNotFoundException, NotAllowedException { /* mock */ @@ -1149,9 +1262,9 @@ public class TableEndpointUnitTest extends AbstractUnitTest { assertNotNull(body); } - public void analyseTableColumn_generic(Long databaseId, Database database, Long tableId, Long columnId, - TableColumn tableColumn, Principal principal) - throws MalformedException, TableNotFoundException, DatabaseNotFoundException { + public void analyseTableColumn_generic(UUID databaseId, UUID tableId, UUID columnId, TableColumn tableColumn, + Principal principal) throws MalformedException, TableNotFoundException, + DatabaseNotFoundException { /* mock */ when(entityService.suggestByColumn(tableColumn)) @@ -1165,7 +1278,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { assertNotNull(body); } - protected ResponseEntity<List<TableBriefDto>> generic_list(Long databaseId, Database database, Principal principal, + protected ResponseEntity<List<TableBriefDto>> generic_list(UUID databaseId, Database database, Principal principal, User user, DatabaseAccess access) throws NotAllowedException, DatabaseNotFoundException, AccessNotFoundException, UserNotFoundException { @@ -1193,7 +1306,7 @@ public class TableEndpointUnitTest extends AbstractUnitTest { return tableEndpoint.list(databaseId, principal); } - protected ResponseEntity<TableBriefDto> generic_create(Long databaseId, Database database, CreateTableDto data, + protected ResponseEntity<TableBriefDto> generic_create(UUID databaseId, Database database, CreateTableDto data, Principal principal, User user, DatabaseAccess access) throws MalformedException, NotAllowedException, DataServiceException, DataServiceConnectionException, UserNotFoundException, DatabaseNotFoundException, AccessNotFoundException, TableNotFoundException, @@ -1226,11 +1339,10 @@ public class TableEndpointUnitTest extends AbstractUnitTest { return tableEndpoint.create(databaseId, data, principal); } - protected ResponseEntity<TableDto> generic_findById(Long databaseId, Database database, Long tableId, + protected ResponseEntity<TableDto> generic_findById(UUID databaseId, Database database, UUID tableId, Table table, Principal principal, User user, - DatabaseAccess access) throws DataServiceException, - DataServiceConnectionException, TableNotFoundException, DatabaseNotFoundException, AccessNotFoundException, - QueueNotFoundException, UserNotFoundException, NotAllowedException { + DatabaseAccess access) throws TableNotFoundException, + DatabaseNotFoundException, AccessNotFoundException, UserNotFoundException, NotAllowedException { /* mock */ if (database != null) { @@ -1277,15 +1389,15 @@ public class TableEndpointUnitTest extends AbstractUnitTest { /* mock */ when(databaseService.findById(DATABASE_1_ID)) .thenReturn(DATABASE_1); - when(tableService.findById(any(Database.class), anyLong())) + when(tableService.findById(any(Database.class), any(UUID.class))) .thenReturn(table); /* test */ return tableEndpoint.delete(DATABASE_1_ID, TABLE_1_ID, principal); } - protected ResponseEntity<ColumnDto> generic_updateColumn(Long databaseId, Database database, Long tableId, - Table table, Long columnId, TableColumn column, + protected ResponseEntity<ColumnDto> generic_updateColumn(UUID databaseId, Database database, UUID tableId, + Table table, UUID columnId, TableColumn column, Principal principal, User user, ColumnSemanticsUpdateDto data, DatabaseAccess access) throws DataServiceException, DataServiceConnectionException, MalformedException, NotAllowedException, diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/UserEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/UserEndpointUnitTest.java index c69701e6dd649565e8070c8c2403b0867c1aed19..5f0341fa7b53d828554d01f166acbc1c81241860 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/UserEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/UserEndpointUnitTest.java @@ -8,8 +8,6 @@ import at.tuwien.entities.user.User; import at.tuwien.exception.AuthServiceException; import at.tuwien.exception.NotAllowedException; import at.tuwien.exception.UserNotFoundException; -import at.tuwien.service.AuthenticationService; -import at.tuwien.service.DatabaseService; import at.tuwien.service.UserService; import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; @@ -44,12 +42,6 @@ public class UserEndpointUnitTest extends AbstractUnitTest { @MockBean private UserService userService; - @MockBean - private DatabaseService databaseService; - - @MockBean - private AuthenticationService authenticationService; - @Autowired private UserEndpoint userEndpoint; diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ViewEndpointUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ViewEndpointUnitTest.java index d1434ef9e4035cd13d81a4f12ec68bad71683bf1..ac5a8ef524fe8c4bc40c47e7b8ba0325508a7cc5 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ViewEndpointUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/endpoints/ViewEndpointUnitTest.java @@ -103,7 +103,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(AccessDeniedException.class, () -> { - create_generic(DATABASE_3_ID, DATABASE_3, null, null, null, null); + create_generic(DATABASE_3_ID, DATABASE_3, "View", null, null, null, null); }); } @@ -113,7 +113,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - create_generic(DATABASE_3_ID, DATABASE_3, USER_2_PRINCIPAL, USER_2_ID, USER_2, null); + create_generic(DATABASE_3_ID, DATABASE_3, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, null); }); } @@ -123,7 +123,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - create_generic(DATABASE_3_ID, DATABASE_3, USER_2_PRINCIPAL, USER_2_ID, USER_2, DATABASE_2_USER_1_READ_ACCESS); + create_generic(DATABASE_3_ID, DATABASE_3, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, DATABASE_2_USER_1_READ_ACCESS); }); } @@ -133,7 +133,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(AccessDeniedException.class, () -> { - create_generic(DATABASE_3_ID, DATABASE_3, USER_2_PRINCIPAL, USER_2_ID, USER_2, null); + create_generic(DATABASE_3_ID, DATABASE_3, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, null); }); } @@ -141,10 +141,21 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { @WithMockUser(username = USER_1_USERNAME, authorities = {"create-database-view"}) public void create_succeeds() throws UserNotFoundException, SearchServiceException, MalformedException, NotAllowedException, DataServiceException, DatabaseNotFoundException, AccessNotFoundException, - SearchServiceConnectionException, DataServiceConnectionException { + SearchServiceConnectionException, DataServiceConnectionException, TableNotFoundException, + ImageNotFoundException, ViewExistsException { /* test */ - create_generic(DATABASE_1_ID, DATABASE_1, USER_1_PRINCIPAL, USER_1_ID, USER_1, DATABASE_1_USER_1_WRITE_ALL_ACCESS); + create_generic(DATABASE_1_ID, DATABASE_1, "View", USER_1_PRINCIPAL, USER_1_ID, USER_1, DATABASE_1_USER_1_WRITE_ALL_ACCESS); + } + + @Test + @WithMockUser(username = USER_1_USERNAME, authorities = {"create-database-view"}) + public void create_exists_fails() { + + /* test */ + assertThrows(ViewExistsException.class, () -> { + create_generic(DATABASE_1_ID, DATABASE_1, VIEW_1_NAME, USER_1_PRINCIPAL, USER_1_ID, USER_1, DATABASE_1_USER_1_WRITE_ALL_ACCESS); + }); } @Test @@ -174,25 +185,6 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { find_generic(DATABASE_3_ID, DATABASE_3, USER_2_PRINCIPAL, USER_2_ID, USER_2, DATABASE_2_USER_1_READ_ACCESS); } - @Test - @WithMockUser(username = USER_2_USERNAME) - public void find_publicSystem_succeeds() throws UserNotFoundException, DatabaseNotFoundException, - AccessNotFoundException, ViewNotFoundException { - - /* test */ - final ResponseEntity<ViewDto> response = find_generic(DATABASE_3_ID, DATABASE_3, USER_LOCAL_ADMIN_PRINCIPAL, - USER_LOCAL_ADMIN_ID, null, null); - final HttpHeaders headers = response.getHeaders(); - assertEquals(List.of(CONTAINER_1_PRIVILEGED_USERNAME), headers.get("X-Username")); - assertEquals(List.of(CONTAINER_1_PRIVILEGED_PASSWORD), headers.get("X-Password")); - assertEquals(List.of(CONTAINER_1_HOST), headers.get("X-Host")); - assertEquals(List.of("" + CONTAINER_1_PORT), headers.get("X-Port")); - assertEquals(List.of(IMAGE_1_JDBC), headers.get("X-Type")); - assertEquals(List.of(DATABASE_3_INTERNALNAME), headers.get("X-Database")); - assertEquals(List.of(VIEW_5_INTERNAL_NAME), headers.get("X-View")); - assertEquals(List.of("X-Username X-Password X-Host X-Port X-Type X-Database X-View"), headers.get("Access-Control-Expose-Headers")); - } - @Test @WithMockUser(username = USER_2_USERNAME) public void find_publicHasRoleHasAccess_succeeds() throws UserNotFoundException, DatabaseNotFoundException, @@ -288,7 +280,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(AccessDeniedException.class, () -> { - create_generic(DATABASE_1_ID, DATABASE_1, null, null, null, null); + create_generic(DATABASE_1_ID, DATABASE_1, "View", null, null, null, null); }); } @@ -298,7 +290,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - create_generic(DATABASE_1_ID, DATABASE_1, USER_2_PRINCIPAL, USER_2_ID, USER_2, null); + create_generic(DATABASE_1_ID, DATABASE_1, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, null); }); } @@ -308,7 +300,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - create_generic(DATABASE_1_ID, DATABASE_1, USER_2_PRINCIPAL, USER_2_ID, USER_2, DATABASE_2_USER_1_READ_ACCESS); + create_generic(DATABASE_1_ID, DATABASE_1, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, DATABASE_2_USER_1_READ_ACCESS); }); } @@ -318,7 +310,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* test */ assertThrows(AccessDeniedException.class, () -> { - create_generic(DATABASE_1_ID, DATABASE_1, USER_2_PRINCIPAL, USER_2_ID, USER_2, null); + create_generic(DATABASE_1_ID, DATABASE_1, "View", USER_2_PRINCIPAL, USER_2_ID, USER_2, null); }); } @@ -441,7 +433,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { /* ## GENERIC TEST CASES ## */ /* ################################################################################################### */ - protected void findAll_generic(Long databaseId, Database database, Principal principal, UUID userId, User user, + protected void findAll_generic(UUID databaseId, Database database, Principal principal, UUID userId, User user, DatabaseAccess access) throws AccessNotFoundException, UserNotFoundException, DatabaseNotFoundException { @@ -477,13 +469,14 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { } } - protected void create_generic(Long databaseId, Database database, Principal principal, UUID userId, User user, - DatabaseAccess access) throws MalformedException, DataServiceException, + protected void create_generic(UUID databaseId, Database database, String viewName, Principal principal, UUID userId, + User user, DatabaseAccess access) throws MalformedException, DataServiceException, DataServiceConnectionException, NotAllowedException, UserNotFoundException, DatabaseNotFoundException, - AccessNotFoundException, SearchServiceException, SearchServiceConnectionException { + AccessNotFoundException, SearchServiceException, SearchServiceConnectionException, TableNotFoundException, + ImageNotFoundException, ViewExistsException { final CreateViewDto request = CreateViewDto.builder() - .name(VIEW_1_NAME) - .query(VIEW_1_QUERY) + .name(viewName) + .query(VIEW_1_SUBSET_DTO) .isPublic(VIEW_1_PUBLIC) .build(); @@ -514,7 +507,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { assertEquals(VIEW_1_NAME, response.getBody().getName()); } - protected ResponseEntity<ViewDto> find_generic(Long databaseId, Database database, Principal principal, + protected ResponseEntity<ViewDto> find_generic(UUID databaseId, Database database, Principal principal, UUID userId, User user, DatabaseAccess access) throws DatabaseNotFoundException, UserNotFoundException, AccessNotFoundException, ViewNotFoundException { @@ -533,10 +526,10 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { if (principal != null) { when(userService.findById(userId)) .thenReturn(user); - when(viewService.findById(any(Database.class), anyLong())) + when(viewService.findById(any(Database.class), any(UUID.class))) .thenReturn(VIEW_5); } else { - when(viewService.findById(any(Database.class), anyLong())) + when(viewService.findById(any(Database.class), any(UUID.class))) .thenReturn(VIEW_5); } @@ -548,7 +541,7 @@ public class ViewEndpointUnitTest extends AbstractUnitTest { return response; } - protected void delete_generic(Long databaseId, Database database, Long viewId, View view, Principal principal, + protected void delete_generic(UUID databaseId, Database database, UUID viewId, View view, Principal principal, UUID userId, User user, DatabaseAccess access) throws NotAllowedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, AccessNotFoundException, SearchServiceException, SearchServiceConnectionException, ViewNotFoundException, UserNotFoundException { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/entities/EntitiesUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/entities/EntitiesUnitTest.java new file mode 100644 index 0000000000000000000000000000000000000000..4fdb83bcd73535f5c0aae86cccdd29ab7b6361d5 --- /dev/null +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/entities/EntitiesUnitTest.java @@ -0,0 +1,20 @@ +package at.tuwien.entities; + +import at.tuwien.test.AbstractUnitTest; +import lombok.extern.log4j.Log4j2; +import org.junit.jupiter.api.Test; + +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@Log4j2 +public class EntitiesUnitTest extends AbstractUnitTest { + + @Test + public void uuidVersion_succeeds() { + + /* test */ + assertEquals(4, UUID.randomUUID().version()); + } +} diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java index 8db76d729ac1864ff0164ed1e3c9f5f1dfd01383..5508a6245e40021cf307d474bc056dfc64861920 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/gateway/DataServiceGatewayUnitTest.java @@ -1116,8 +1116,7 @@ public class DataServiceGatewayUnitTest extends AbstractUnitTest { } @Test - public void getTableStatistics_emptyBody_fails() throws TableNotFoundException, DataServiceException, - DataServiceConnectionException { + public void getTableStatistics_emptyBody_fails() { /* mock */ when(dataServiceRestTemplate.exchange(anyString(), eq(HttpMethod.GET), eq(HttpEntity.EMPTY), eq(TableStatisticDto.class))) @@ -1125,7 +1124,9 @@ public class DataServiceGatewayUnitTest extends AbstractUnitTest { .build()); /* test */ - dataServiceGateway.getTableStatistics(DATABASE_3_ID, TABLE_8_ID); + assertThrows(DataServiceException.class, () -> { + dataServiceGateway.getTableStatistics(DATABASE_3_ID, TABLE_8_ID); + }); } @Test diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mapper/MetadataMapperUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mapper/MetadataMapperUnitTest.java index 6505506eeaca607cd96e3324e869c2db0907cc4f..ac1103d2e5ad0a4c9a12b781c575ddff9aa39bcf 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mapper/MetadataMapperUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mapper/MetadataMapperUnitTest.java @@ -1,7 +1,9 @@ package at.tuwien.mapper; +import at.tuwien.api.database.ViewDto; import at.tuwien.api.identifier.IdentifierTypeDto; import at.tuwien.api.user.UserBriefDto; +import at.tuwien.entities.database.View; import at.tuwien.entities.identifier.Identifier; import at.tuwien.entities.identifier.IdentifierType; import at.tuwien.test.AbstractUnitTest; @@ -87,7 +89,7 @@ public class MetadataMapperUnitTest extends AbstractUnitTest { assertNull(response.getDatabase()); assertNull(response.getViewId()); assertNull(response.getTableId()); - assertEquals(IDENTIFIER_2_QUERY_ID, response.getQueryId()); + assertEquals(QUERY_1_ID, response.getQueryId()); assertNull(response.getDoi()); assertEquals(IDENTIFIER_2_TYPE, response.getType()); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/AuthenticationPrivilegedIntegrationMvcTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/AuthenticationPrivilegedIntegrationMvcTest.java index 0365db6c4a09dfaedb742528b3bb08d4784d53f1..e6535ccf19a5879f8bc581a6bb2e40fc0376be20 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/AuthenticationPrivilegedIntegrationMvcTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/AuthenticationPrivilegedIntegrationMvcTest.java @@ -12,6 +12,7 @@ import at.tuwien.repository.UserRepository; import at.tuwien.test.AbstractUnitTest; import at.tuwien.utils.KeycloakUtils; import dasniko.testcontainers.keycloak.KeycloakContainer; +import jakarta.transaction.Transactional; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -96,11 +97,8 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest keycloakUtils.createUser(USER_1_ID, USER_1_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/database/1").with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID).with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) .andDo(print()) - .andExpect(header().doesNotExist("X-Username")) - .andExpect(header().doesNotExist("X-Password")) - .andExpect(header().doesNotExist("Access-Control-Expose-Headers")) .andExpect(status().isOk()); } @@ -111,11 +109,14 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest keycloakUtils.createUser(USER_LOCAL_ADMIN_ID, USER_LOCAL_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/database/1").with(httpBasic(USER_LOCAL_ADMIN_USERNAME, USER_LOCAL_ADMIN_PASSWORD))) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID).with(httpBasic(USER_LOCAL_ADMIN_USERNAME, USER_LOCAL_ADMIN_PASSWORD))) .andDo(print()) + .andExpect(header().string("X-Host", CONTAINER_1_HOST)) + .andExpect(header().string("X-Port", "" + CONTAINER_1_PORT)) .andExpect(header().string("X-Username", CONTAINER_1_PRIVILEGED_USERNAME)) .andExpect(header().string("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD)) - .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password")) + .andExpect(header().string("X-Jdbc-Method", IMAGE_1_JDBC)) + .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port")) .andExpect(status().isOk()); } @@ -127,11 +128,14 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest final TokenDto jwt = keycloakGateway.obtainUserToken(USER_LOCAL_ADMIN_USERNAME, USER_LOCAL_ADMIN_PASSWORD); /* test */ - this.mockMvc.perform(get("/api/database/1").header("Authorization", "Bearer " + jwt.getAccessToken())) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID).header("Authorization", "Bearer " + jwt.getAccessToken())) .andDo(print()) + .andExpect(header().string("X-Host", CONTAINER_1_HOST)) + .andExpect(header().string("X-Port", "" + CONTAINER_1_PORT)) .andExpect(header().string("X-Username", CONTAINER_1_PRIVILEGED_USERNAME)) .andExpect(header().string("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD)) - .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password")) + .andExpect(header().string("X-Jdbc-Method", IMAGE_1_JDBC)) + .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password X-Jdbc-Method X-Host X-Port")) .andExpect(status().isOk()); } @@ -144,11 +148,8 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest /* test */ - this.mockMvc.perform(get("/api/database/1/table/1").header("Authorization", "Bearer " + jwt.getAccessToken())) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID + "/table/" + TABLE_1_ID).header("Authorization", "Bearer " + jwt.getAccessToken())) .andDo(print()) - .andExpect(header().string("X-Username", CONTAINER_1_PRIVILEGED_USERNAME)) - .andExpect(header().string("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD)) - .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password")) .andExpect(status().isOk()); } @@ -159,11 +160,8 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest keycloakUtils.createUser(USER_1_ID, USER_1_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/database/1/table/1").with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID + "/table/" + TABLE_1_ID).with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) .andDo(print()) - .andExpect(header().doesNotExist("X-Username")) - .andExpect(header().doesNotExist("X-Password")) - .andExpect(header().doesNotExist("Access-Control-Expose-Headers")) .andExpect(status().isOk()); } @@ -174,26 +172,21 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest keycloakUtils.createUser(USER_LOCAL_ADMIN_ID, USER_LOCAL_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/database/1/table/1").with(httpBasic(USER_LOCAL_ADMIN_USERNAME, USER_LOCAL_ADMIN_PASSWORD))) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID + "/table/" + TABLE_1_ID).with(httpBasic(USER_LOCAL_ADMIN_USERNAME, USER_LOCAL_ADMIN_PASSWORD))) .andDo(print()) - .andExpect(header().string("X-Username", CONTAINER_1_PRIVILEGED_USERNAME)) - .andExpect(header().string("X-Password", CONTAINER_1_PRIVILEGED_PASSWORD)) - .andExpect(header().string("Access-Control-Expose-Headers", "X-Username X-Password")) .andExpect(status().isOk()); } @Test + @Transactional public void findById_view_basicUser_succeeds() throws Exception { /* mock */ keycloakUtils.createUser(USER_1_ID, USER_1_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/database/1/view/1").with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) + this.mockMvc.perform(get("/api/database/" + DATABASE_1_ID + "/view/" + VIEW_1_ID).with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) .andDo(print()) - .andExpect(header().doesNotExist("X-Username")) - .andExpect(header().doesNotExist("X-Password")) - .andExpect(header().doesNotExist("Access-Control-Expose-Headers")) .andExpect(status().isOk()); } @@ -204,11 +197,8 @@ public class AuthenticationPrivilegedIntegrationMvcTest extends AbstractUnitTest keycloakUtils.createUser(USER_1_ID, USER_1_KEYCLOAK_SIGNUP_REQUEST); /* test */ - this.mockMvc.perform(get("/api/container/1").with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) + this.mockMvc.perform(get("/api/container/" + CONTAINER_1_ID).with(httpBasic(USER_1_USERNAME, USER_1_PASSWORD))) .andDo(print()) - .andExpect(header().doesNotExist("X-Username")) - .andExpect(header().doesNotExist("X-Password")) - .andExpect(header().doesNotExist("Access-Control-Expose-Headers")) .andExpect(status().isOk()); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/MetadataEndpointMvcTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/MetadataEndpointMvcTest.java index 96af6cfa8d14e4974a4afb8e410d9cc9a29bbbeb..7f9ba9743d24f1d888f2a488bd8330755478d1e9 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/MetadataEndpointMvcTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/MetadataEndpointMvcTest.java @@ -122,7 +122,7 @@ public class MetadataEndpointMvcTest extends AbstractUnitTest { .thenReturn(Optional.of(IDENTIFIER_1)); /* test */ - this.mockMvc.perform(get("/api/oai?verb=GetRecord&identifier=oai:1")) + this.mockMvc.perform(get("/api/oai?verb=GetRecord&identifier=oai:" + IDENTIFIER_1_ID)) .andDo(print()) .andExpect(content().contentType("text/xml;charset=UTF-8")) .andExpect(xpath("//request[@verb='GetRecord']").exists()) diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java index 7611a0a8b539124d14a66c0a1b5c7465cf8d8e7f..2adc2f0647150f47605cb4b0d70566c041cd81f7 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/mvc/PrometheusEndpointMvcTest.java @@ -9,13 +9,8 @@ import at.tuwien.api.identifier.IdentifierTypeDto; import at.tuwien.config.MetricsConfig; import at.tuwien.endpoints.*; import at.tuwien.test.AbstractUnitTest; -import io.micrometer.observation.annotation.Observed; import io.micrometer.observation.tck.TestObservationRegistry; -import io.swagger.v3.oas.annotations.Operation; import lombok.extern.log4j.Log4j2; -import org.apache.commons.io.FileUtils; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -30,13 +25,7 @@ import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.Arrays; import java.util.List; -import java.util.Map; -import java.util.TreeMap; import static io.micrometer.observation.tck.TestObservationRegistryAssert.assertThat; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -99,8 +88,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { @Autowired private ViewEndpoint viewEndpoint; - private static final Map<String, String> metrics = new TreeMap<>(); /* sorted */ - @TestConfiguration static class ObservationTestConfiguration { @@ -110,16 +97,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { } } - @BeforeAll - public static void beforeAll() { - FileUtils.deleteQuietly(new File("../metrics.md")); - } - - @AfterAll - public static void afterAll() throws IOException { - saveObservedMetrics(metrics); - } - @Test public void prometheus_succeeds() throws Exception { @@ -160,7 +137,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(AccessEndpoint.class); } @Test @@ -194,7 +170,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(ContainerEndpoint.class); } @Test @@ -243,7 +218,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(DatabaseEndpoint.class); } @Test @@ -289,7 +263,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(IdentifierEndpoint.class); } @Test @@ -329,7 +302,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(ImageEndpoint.class); } @Test @@ -346,7 +318,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { /* test */ assertThat(registry) .hasObservationWithNameEqualTo("dbrepo_license_findall"); - generic_openApiDocs(LicenseEndpoint.class); } @Test @@ -385,7 +356,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(MessageEndpoint.class); } @Test @@ -419,7 +389,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(MetadataEndpoint.class); } @Test @@ -463,7 +432,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(OntologyEndpoint.class); } @Test @@ -482,7 +450,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(ConceptEndpoint.class); } @Test @@ -501,7 +468,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(UnitEndpoint.class); } @Test @@ -563,7 +529,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(TableEndpoint.class); } @Test @@ -592,7 +557,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(UserEndpoint.class); } @Test @@ -627,16 +591,6 @@ public class PrometheusEndpointMvcTest extends AbstractUnitTest { assertThat(registry) .hasObservationWithNameEqualTo(metric); } - generic_openApiDocs(ViewEndpoint.class); - } - - private static void generic_openApiDocs(Class<?> endpoint) { - final List<Method> methods = Arrays.stream(endpoint.getMethods()) - .filter(m -> m.getDeclaringClass().equals(endpoint)) - .toList(); - methods.forEach(m -> { - metrics.put(m.getDeclaredAnnotation(Observed.class).name(), m.getDeclaredAnnotation(Operation.class).summary()); - }); } } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceUnitTest.java index bb19a404ddf23f29e257808974c0ebd787e3c416..a6fbbf759269d7f6b9331dc829ad2b83197be1ad 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ContainerServiceUnitTest.java @@ -1,11 +1,13 @@ package at.tuwien.service; import at.tuwien.api.container.CreateContainerDto; -import at.tuwien.test.AbstractUnitTest; import at.tuwien.entities.container.Container; -import at.tuwien.exception.*; +import at.tuwien.exception.ContainerAlreadyExistsException; +import at.tuwien.exception.ContainerNotFoundException; +import at.tuwien.exception.ImageNotFoundException; import at.tuwien.repository.ContainerRepository; import at.tuwien.repository.ImageRepository; +import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -20,11 +22,11 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; import java.util.Optional; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.when; @Log4j2 @@ -87,7 +89,7 @@ public class ContainerServiceUnitTest extends AbstractUnitTest { public void create_imageNotFound_fails() { final CreateContainerDto request = CreateContainerDto.builder() .name(CONTAINER_3_NAME) - .imageId(9999L) + .imageId(UUID.randomUUID()) .build(); /* mock */ @@ -169,14 +171,14 @@ public class ContainerServiceUnitTest extends AbstractUnitTest { assertEquals(limit, response.size()); } - protected void find_generic(Long containerId, Container container) throws ContainerNotFoundException { + protected void find_generic(UUID containerId, Container container) throws ContainerNotFoundException { /* mock */ if (container != null) { when(containerRepository.findById(containerId)) .thenReturn(Optional.of(container)); } else { - when(containerRepository.findById(anyLong())) + when(containerRepository.findById(any(UUID.class))) .thenReturn(Optional.empty()); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DataCiteIdentifierServicePersistenceTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DataCiteIdentifierServicePersistenceTest.java index b77bc30d3811ed30c7994129ae2110e12903d0f9..260aebe7be411cd1ac32c63160a8964d26c0f9a3 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DataCiteIdentifierServicePersistenceTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DataCiteIdentifierServicePersistenceTest.java @@ -36,6 +36,7 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; @@ -88,7 +89,7 @@ public class DataCiteIdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final List<Identifier> response = dataCiteIdentifierService.findAll(null, null, null, null, null); assertEquals(7, response.size()); - for (Long id : List.of(IDENTIFIER_1_ID, IDENTIFIER_2_ID, IDENTIFIER_3_ID, IDENTIFIER_4_ID, IDENTIFIER_5_ID, IDENTIFIER_6_ID, IDENTIFIER_7_ID)) { + for (UUID id : List.of(IDENTIFIER_1_ID, IDENTIFIER_2_ID, IDENTIFIER_3_ID, IDENTIFIER_4_ID, IDENTIFIER_5_ID, IDENTIFIER_6_ID, IDENTIFIER_7_ID)) { assertTrue(response.stream().map(Identifier::getId).toList().contains(id)); } } @@ -110,7 +111,7 @@ public class DataCiteIdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final List<Identifier> response = dataCiteIdentifierService.findAll(null, null, QUERY_1_ID, null, null); - assertEquals(1, response.size()); + assertEquals(2, response.size()); } @Test diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServicePersistenceTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServicePersistenceTest.java index 9c91084f77cdac6c554cb11ea847bbb447185283..b1886aa835f2cc0cb2aac9e53365d869ec30724c 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServicePersistenceTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServicePersistenceTest.java @@ -63,16 +63,6 @@ public class DatabaseServicePersistenceTest extends AbstractUnitTest { assertEquals(DATABASE_1, response); } - @Test - @Transactional(readOnly = true) - public void findAllPublicOrSchemaPublicByInternalName_succeeds() { - - /* test */ - final List<Database> response = databaseService.findAllPublicOrSchemaPublicByInternalName(DATABASE_3_INTERNALNAME); - assertEquals(1, response.size()); - assertEquals(DATABASE_3, response.get(0)); - } - @Test @Transactional(readOnly = true) public void findAllPublicOrSchemaPublicByInternalName_privateEmpty_succeeds() { @@ -91,16 +81,4 @@ public class DatabaseServicePersistenceTest extends AbstractUnitTest { assertEquals(0, response.size()); } - @Test - @Transactional(readOnly = true) - public void findAllAtLestReadAccess_privateAccess_succeeds() { - - /* test */ - final List<Database> response = databaseService.findAllAtLestReadAccess(USER_2_ID); - assertEquals(3, response.size()); - assertEquals(DATABASE_4, response.get(0)); - assertEquals(DATABASE_2, response.get(1)); - assertEquals(DATABASE_1, response.get(2)); - } - } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceUnitTest.java index 18d037fe452cb6cdab5b4d0f0fe68b5ed6142cf0..85829f6ae64809f594f19d512d0cd1dcfbe80de6 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/DatabaseServiceUnitTest.java @@ -22,9 +22,11 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; import java.util.Optional; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.*; @Log4j2 @@ -347,12 +349,12 @@ public class DatabaseServiceUnitTest extends AbstractUnitTest { public void find_fails() { /* mock */ - when(databaseRepository.findById(anyLong())) + when(databaseRepository.findById(any(UUID.class))) .thenReturn(Optional.empty()); /* test */ assertThrows(DatabaseNotFoundException.class, () -> { - databaseService.findById(9999L); + databaseService.findById(UUID.randomUUID()); }); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/EntityServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/EntityServiceUnitTest.java index fd6ac82762ad838bb846a185d19ae57af55ea8e9..afe3b6e2b8b9c5e93c1afebed2eabb4a6fc9daa0 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/EntityServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/EntityServiceUnitTest.java @@ -133,6 +133,7 @@ public class EntityServiceUnitTest extends AbstractUnitTest { } @Test + @Disabled public void suggestTableColumnSemantics_succeeds() throws MalformedException { /* mock */ diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/IdentifierServicePersistenceTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/IdentifierServicePersistenceTest.java index 40fc28fe4d89524a928d474e0d3328853bee5df7..c053afa51d4de9404a69aa5eee8b81cb1e567384 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/IdentifierServicePersistenceTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/IdentifierServicePersistenceTest.java @@ -1,21 +1,20 @@ package at.tuwien.service; -import at.tuwien.entities.database.License; -import at.tuwien.repository.ContainerRepository; -import at.tuwien.repository.DatabaseRepository; -import at.tuwien.repository.LicenseRepository; -import at.tuwien.repository.UserRepository; -import at.tuwien.test.AbstractUnitTest; import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.identifier.BibliographyTypeDto; import at.tuwien.entities.database.Database; +import at.tuwien.entities.database.License; import at.tuwien.entities.identifier.*; import at.tuwien.exception.*; import at.tuwien.gateway.DataServiceGateway; import at.tuwien.gateway.SearchServiceGateway; +import at.tuwien.repository.ContainerRepository; +import at.tuwien.repository.DatabaseRepository; +import at.tuwien.repository.LicenseRepository; +import at.tuwien.repository.UserRepository; +import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; @@ -32,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; @@ -84,7 +84,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final List<Identifier> response = identifierService.findAll(null, null, null, null, null); assertEquals(7, response.size()); - for (Long id : List.of(IDENTIFIER_1_ID, IDENTIFIER_2_ID, IDENTIFIER_3_ID, IDENTIFIER_4_ID, IDENTIFIER_5_ID, IDENTIFIER_6_ID, IDENTIFIER_7_ID)) { + for (UUID id : List.of(IDENTIFIER_1_ID, IDENTIFIER_2_ID, IDENTIFIER_3_ID, IDENTIFIER_4_ID, IDENTIFIER_5_ID, IDENTIFIER_6_ID, IDENTIFIER_7_ID)) { assertTrue(response.stream().map(Identifier::getId).toList().contains(id)); } } @@ -106,7 +106,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final List<Identifier> response = identifierService.findAll(null, null, QUERY_1_ID, null, null); - assertEquals(1, response.size()); + assertEquals(2, response.size()); } @Test @@ -131,17 +131,11 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final List<Identifier> response = identifierService.findByDatabaseIdAndQueryId(DATABASE_1_ID, QUERY_1_ID); - assertEquals(1, response.size()); + assertEquals(2, response.size()); final Identifier identifier0 = response.get(0); - assertEquals(IDENTIFIER_2_ID, identifier0.getId()); - } - - @Test - public void findByDatabaseIdAndQueryId_fails() { - - /* test */ - final List<Identifier> response = identifierService.findByDatabaseIdAndQueryId(DATABASE_1_ID, QUERY_1_ID); - assertEquals(1, response.size()); + assertEquals(IDENTIFIER_1_ID, identifier0.getId()); + final Identifier identifier1 = response.get(1); + assertEquals(IDENTIFIER_2_ID, identifier1.getId()); } @Test @@ -149,7 +143,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ assertThrows(IdentifierNotFoundException.class, () -> { - identifierService.find(9999L); + identifierService.find(UUID.randomUUID()); }); } @@ -173,7 +167,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { QueryNotFoundException, SearchServiceException, SearchServiceConnectionException, ExternalServiceException { /* mock */ - when(dataServiceGateway.findQuery(IDENTIFIER_5_DATABASE_ID, IDENTIFIER_5_QUERY_ID)) + when(dataServiceGateway.findQuery(DATABASE_2_ID, QUERY_2_ID)) .thenReturn(QUERY_2_DTO); when(searchServiceGateway.update(any(Database.class))) .thenReturn(DATABASE_2_BRIEF_DTO); @@ -307,7 +301,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { QueryNotFoundException, SearchServiceException, SearchServiceConnectionException, ExternalServiceException { /* mock */ - when(dataServiceGateway.findQuery(IDENTIFIER_5_DATABASE_ID, IDENTIFIER_5_QUERY_ID)) + when(dataServiceGateway.findQuery(DATABASE_2_ID, QUERY_2_ID)) .thenReturn(QUERY_2_DTO); /* test */ @@ -326,7 +320,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { assertEquals(IDENTIFIER_5_DESCRIPTION_1_TYPE, description0.getDescriptionType()); assertNull(response.getDoi()); assertEquals(IDENTIFIER_5_PUBLISHER, response.getPublisher()); - assertEquals(IDENTIFIER_5_DATABASE_ID, response.getDatabase().getId()); + assertEquals(DATABASE_2_ID, response.getDatabase().getId()); assertNull(response.getLanguage()); assertEquals(IDENTIFIER_5_PUBLICATION_YEAR, response.getPublicationYear()); assertEquals(IDENTIFIER_5_PUBLICATION_MONTH, response.getPublicationMonth()); @@ -439,12 +433,12 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { ExternalServiceException { /* mock */ - when(dataServiceGateway.findQuery(IDENTIFIER_2_DATABASE_ID, IDENTIFIER_2_QUERY_ID)) + when(dataServiceGateway.findQuery(DATABASE_1_ID, QUERY_1_ID)) .thenReturn(QUERY_1_DTO); /* test */ final Identifier response = identifierService.save(DATABASE_1, USER_1, IDENTIFIER_2_SAVE_DTO); - assertEquals(IDENTIFIER_2_DATABASE_ID, response.getDatabase().getId()); + assertEquals(DATABASE_1_ID, response.getDatabase().getId()); assertEquals(IDENTIFIER_2_QUERY, response.getQuery()); assertEquals(IDENTIFIER_2_QUERY_HASH, response.getQueryHash()); assertEquals(IDENTIFIER_2_RESULT_HASH, response.getResultHash()); @@ -460,7 +454,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final Identifier response = identifierService.save(DATABASE_1, USER_1, IDENTIFIER_3_SAVE_DTO); - assertEquals(IDENTIFIER_3_DATABASE_ID, response.getDatabase().getId()); + assertEquals(DATABASE_1_ID, response.getDatabase().getId()); assertEquals(IDENTIFIER_3_QUERY, response.getQuery()); assertEquals(IDENTIFIER_3_QUERY_HASH, response.getQueryHash()); assertEquals(IDENTIFIER_3_RESULT_HASH, response.getResultHash()); @@ -476,7 +470,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final Identifier response = identifierService.create(DATABASE_1, USER_1, IDENTIFIER_1_CREATE_DTO); - assertEquals(8L, response.getId()); + assertNotNull(response.getId()); } @Test @@ -487,7 +481,7 @@ public class IdentifierServicePersistenceTest extends AbstractUnitTest { /* test */ final Identifier response = identifierService.create(DATABASE_1, USER_1, IDENTIFIER_1_CREATE_WITH_DOI_DTO); - assertEquals(8L, response.getId()); + assertNotNull(response.getId()); assertEquals(IDENTIFIER_1_DOI, response.getDoi()); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MessageServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MessageServiceUnitTest.java index d07a5facb802db9c4b2b0e70c2e465b6bfda1636..fb7806f454684e10e8dd819018a03283b90fb418 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MessageServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MessageServiceUnitTest.java @@ -18,6 +18,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; import java.util.Optional; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -88,12 +89,12 @@ public class MessageServiceUnitTest extends AbstractUnitTest { public void find_notFound_fails() { /* mock */ - when(bannerMessageRepository.findById(anyLong())) + when(bannerMessageRepository.findById(any(UUID.class))) .thenReturn(Optional.empty()); /* test */ assertThrows(MessageNotFoundException.class, () -> { - bannerMessageService.find(9999L); + bannerMessageService.find(UUID.randomUUID()); }); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MetadataServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MetadataServiceUnitTest.java index fa10d09a877c5a967086f855efd091eee1f5efe2..2f4fd3a85aaca28de490b2953acde20804fb70cd 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MetadataServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/MetadataServiceUnitTest.java @@ -1,9 +1,5 @@ package at.tuwien.service; -import at.tuwien.oaipmh.OaiErrorType; -import at.tuwien.oaipmh.OaiListIdentifiersParameters; -import at.tuwien.oaipmh.OaiRecordParameters; -import at.tuwien.test.AbstractUnitTest; import at.tuwien.api.crossref.CrossrefDto; import at.tuwien.api.orcid.OrcidDto; import at.tuwien.api.ror.RorDto; @@ -13,6 +9,10 @@ import at.tuwien.exception.*; import at.tuwien.gateway.CrossrefGateway; import at.tuwien.gateway.OrcidGateway; import at.tuwien.gateway.RorGateway; +import at.tuwien.oaipmh.OaiErrorType; +import at.tuwien.oaipmh.OaiListIdentifiersParameters; +import at.tuwien.oaipmh.OaiRecordParameters; +import at.tuwien.test.AbstractUnitTest; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.log4j.Log4j2; @@ -29,10 +29,10 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.List; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.when; @@ -114,11 +114,11 @@ public class MetadataServiceUnitTest extends AbstractUnitTest { @Transactional public void getRecord_succeeds() throws IdentifierNotFoundException { final OaiRecordParameters parameters = OaiRecordParameters.builder() - .identifier("oai:1") + .identifier("oai:" + IDENTIFIER_1_ID) .build(); /* mock */ - when(identifierService.find(1L)) + when(identifierService.find(IDENTIFIER_1_ID)) .thenReturn(IDENTIFIER_1); /* test */ @@ -133,13 +133,13 @@ public class MetadataServiceUnitTest extends AbstractUnitTest { @Test public void getRecord_oaiNotFound_fails() throws IdentifierNotFoundException { final OaiRecordParameters parameters = OaiRecordParameters.builder() - .identifier("oai:9999") + .identifier("oai:deadbeef-bf9c-4943-a30a-ee5295f5b8c2") .build(); /* mock */ doThrow(IdentifierNotFoundException.class) .when(identifierService) - .find(anyLong()); + .find(any(UUID.class)); /* test */ assertThrows(IdentifierNotFoundException.class, () -> { diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServicePersistenceTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServicePersistenceTest.java index b0efccab9ac856f727ee3377554e7cf8a01bb2c7..459c3b6dbe9b96077c1c48d8aadd5955a03b1303 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServicePersistenceTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServicePersistenceTest.java @@ -1,8 +1,8 @@ package at.tuwien.service; import at.tuwien.api.database.table.CreateTableDto; -import at.tuwien.api.database.table.columns.CreateTableColumnDto; import at.tuwien.api.database.table.columns.ColumnTypeDto; +import at.tuwien.api.database.table.columns.CreateTableColumnDto; import at.tuwien.api.database.table.constraints.CreateTableConstraintsDto; import at.tuwien.entities.database.Database; import at.tuwien.entities.database.table.Table; @@ -32,11 +32,11 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Set; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.doNothing; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; @Log4j2 @SpringBootTest @@ -155,7 +155,91 @@ public class TableServicePersistenceTest extends AbstractUnitTest { /* test */ assertThrows(MalformedException.class, () -> { - tableService.findColumnById(TABLE_1, 9999L); + tableService.findColumnById(TABLE_1, UUID.randomUUID()); + }); + } + + @Test + public void updateTable_succeeds() throws TableNotFoundException, SearchServiceException, DataServiceException, + DatabaseNotFoundException, SearchServiceConnectionException, DataServiceConnectionException { + + /* mock */ + doNothing() + .when(dataServiceGateway) + .updateTable(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + when(searchServiceGateway.update(any(Database.class))) + .thenReturn(DATABASE_3_BRIEF_DTO); + + /* test */ + final Table response = tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); + assertTrue(response.getIsPublic()); + assertTrue(response.getIsSchemaPublic()); + assertNull(response.getDescription()); + } + + @Test + public void updateTable_dataServiceConnection_fails() throws DataServiceException, DatabaseNotFoundException, + DataServiceConnectionException { + + /* mock */ + doThrow(DataServiceConnectionException.class) + .when(dataServiceGateway) + .updateTable(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + + /* test */ + assertThrows(DataServiceConnectionException.class, () -> { + tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); + }); + } + + @Test + public void updateTable_dataService_fails() throws DataServiceException, DatabaseNotFoundException, + DataServiceConnectionException { + + /* mock */ + doThrow(DataServiceException.class) + .when(dataServiceGateway) + .updateTable(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + + /* test */ + assertThrows(DataServiceException.class, () -> { + tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); + }); + } + + @Test + public void updateTable_searchServiceConnection_fails() throws DataServiceException, DatabaseNotFoundException, + DataServiceConnectionException, SearchServiceException, SearchServiceConnectionException { + + /* mock */ + doNothing() + .when(dataServiceGateway) + .updateTable(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + doThrow(SearchServiceConnectionException.class) + .when(searchServiceGateway) + .update(any(Database.class)); + + /* test */ + assertThrows(SearchServiceConnectionException.class, () -> { + tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); + }); + } + + @Test + public void updateTable_searchService_fails() throws DataServiceException, DatabaseNotFoundException, + DataServiceConnectionException, SearchServiceException, SearchServiceConnectionException { + + /* mock */ + doNothing() + .when(dataServiceGateway) + .updateTable(DATABASE_3_ID, TABLE_8_ID, TABLE_8_UPDATE_DTO); + doThrow(SearchServiceException.class) + .when(searchServiceGateway) + .update(any(Database.class)); + + /* test */ + assertThrows(SearchServiceException.class, () -> { + tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); }); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServiceUnitTest.java index 8cb5081f6d98b68971f71f2da5538ab72bd772a8..9b0b7fcb1a241e20048fb70f85fb8b209db5f10d 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/TableServiceUnitTest.java @@ -2,14 +2,17 @@ package at.tuwien.service; import at.tuwien.api.database.table.CreateTableDto; import at.tuwien.api.database.table.TableStatisticDto; -import at.tuwien.api.database.table.columns.CreateTableColumnDto; +import at.tuwien.api.database.table.TableUpdateDto; import at.tuwien.api.database.table.columns.ColumnStatisticDto; import at.tuwien.api.database.table.columns.ColumnTypeDto; +import at.tuwien.api.database.table.columns.CreateTableColumnDto; import at.tuwien.api.database.table.columns.concepts.ColumnSemanticsUpdateDto; import at.tuwien.api.database.table.constraints.CreateTableConstraintsDto; import at.tuwien.api.database.table.constraints.foreign.CreateForeignKeyDto; import at.tuwien.entities.database.Database; import at.tuwien.entities.database.table.Table; +import at.tuwien.entities.database.table.columns.ColumnEnum; +import at.tuwien.entities.database.table.columns.ColumnSet; import at.tuwien.entities.database.table.columns.TableColumn; import at.tuwien.entities.database.table.columns.TableColumnType; import at.tuwien.entities.database.table.constraints.Constraints; @@ -340,6 +343,54 @@ public class TableServiceUnitTest extends AbstractUnitTest { assertEquals(0, constraints.getForeignKeys().size()); } + @Test + public void createTable_enumsSets_succeeds() throws DataServiceException, + DataServiceConnectionException, UserNotFoundException, TableNotFoundException, DatabaseNotFoundException, + TableExistsException, SearchServiceException, SearchServiceConnectionException, MalformedException, + OntologyNotFoundException, SemanticEntityNotFoundException { + final CreateTableDto request = CreateTableDto.builder() + .name("New Table") + .description("A wonderful table") + .columns(new LinkedList<>(List.of(CreateTableColumnDto.builder() + .name("sex") + .type(ColumnTypeDto.ENUM) // <<< + .enums(new LinkedList<>(List.of("male", "female", "other"))) + .build(), + CreateTableColumnDto.builder() + .name("status") + .type(ColumnTypeDto.SET) // <<< + .sets(new LinkedList<>(List.of("single", "married", "divorced", "widowed"))) + .build()))) + .constraints(CreateTableConstraintsDto.builder() + .checks(Set.of()) + .uniques(List.of()) + .foreignKeys(List.of()) + .primaryKey(Set.of()) + .build()) + .build(); + + /* mock */ + when(userService.findByUsername(USER_1_USERNAME)) + .thenReturn(USER_1); + doNothing() + .when(dataServiceGateway) + .createTable(eq(DATABASE_1_ID), any(CreateTableDto.class)); + when(databaseRepository.save(any(Database.class))) + .thenReturn(DATABASE_1); + when(searchServiceGateway.update(any(Database.class))) + .thenReturn(DATABASE_1_BRIEF_DTO); + + /* test */ + final Table response = tableService.createTable(DATABASE_1, request, USER_1_PRINCIPAL); + final TableColumn column0 = response.getColumns().get(0); + assertEquals("sex", column0.getInternalName()); + assertEquals(TableColumnType.ENUM, column0.getColumnType()); + assertEquals(List.of("male", "female", "other"), column0.getEnums().stream().map(ColumnEnum::getValue).toList()); + final TableColumn column1 = response.getColumns().get(1); + assertEquals("status", column1.getInternalName()); + assertEquals(List.of("single", "married", "divorced", "widowed"), column1.getSets().stream().map(ColumnSet::getValue).toList()); + } + @Test public void createTable_dateFormatNotFound_fails() throws DataServiceException, DataServiceConnectionException, UserNotFoundException, DatabaseNotFoundException, TableExistsException, SearchServiceException, @@ -377,6 +428,23 @@ public class TableServiceUnitTest extends AbstractUnitTest { }); } + @Test + public void updateTable_succeeds() throws DataServiceException, DataServiceConnectionException, + TableNotFoundException, DatabaseNotFoundException, SearchServiceException, + SearchServiceConnectionException { + + /* mock */ + doNothing() + .when(dataServiceGateway) + .updateTable(any(UUID.class), any(UUID.class), any(TableUpdateDto.class)); + when(searchServiceGateway.update(any(Database.class))) + .thenReturn(DATABASE_3_BRIEF_DTO); + + /* test */ + final Table response = tableService.updateTable(TABLE_8, TABLE_8_UPDATE_DTO); + assertNotNull(response.getId()); + } + @Test public void create_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, UserNotFoundException, TableNotFoundException, DatabaseNotFoundException, TableExistsException, diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ViewServiceUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ViewServiceUnitTest.java index 4ba217a60c0b5a520e7fcd1c59a610769530760e..e99fef1acc76dd0067b9b94233dea06c7c23b30b 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ViewServiceUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/service/ViewServiceUnitTest.java @@ -1,13 +1,13 @@ package at.tuwien.service; -import at.tuwien.repository.DatabaseRepository; -import at.tuwien.test.AbstractUnitTest; import at.tuwien.api.database.CreateViewDto; import at.tuwien.entities.database.Database; import at.tuwien.entities.database.View; import at.tuwien.exception.*; import at.tuwien.gateway.DataServiceGateway; import at.tuwien.gateway.SearchServiceGateway; +import at.tuwien.repository.DatabaseRepository; +import at.tuwien.test.AbstractUnitTest; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -18,6 +18,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.testcontainers.junit.jupiter.Testcontainers; +import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -49,10 +50,11 @@ public class ViewServiceUnitTest extends AbstractUnitTest { @Test public void create_succeeds() throws MalformedException, DataServiceException, DataServiceConnectionException, - DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException { + DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, TableNotFoundException, + ImageNotFoundException { final CreateViewDto request = CreateViewDto.builder() .name(VIEW_1_NAME) - .query(VIEW_1_QUERY) + .query(VIEW_1_SUBSET_DTO) .isPublic(VIEW_1_PUBLIC) .build(); @@ -88,7 +90,7 @@ public class ViewServiceUnitTest extends AbstractUnitTest { /* test */ assertThrows(ViewNotFoundException.class, () -> { - viewService.findById(DATABASE_1, 9999L); + viewService.findById(DATABASE_1, UUID.randomUUID()); }); } diff --git a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/validator/EndpointValidatorUnitTest.java b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/validator/EndpointValidatorUnitTest.java index 8105a7fb8907b508a336876e9c5e6ce94916e59d..1e7ce07afde0616c8915549cfa3e1bcc72bcb658 100644 --- a/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/validator/EndpointValidatorUnitTest.java +++ b/dbrepo-metadata-service/rest-service/src/test/java/at/tuwien/validator/EndpointValidatorUnitTest.java @@ -26,10 +26,12 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.junit.jupiter.SpringExtension; import java.util.List; +import java.util.UUID; import java.util.stream.Stream; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.ArgumentMatchers.*; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.when; @@ -176,7 +178,7 @@ public class EndpointValidatorUnitTest extends AbstractUnitTest { DatabaseNotFoundException, AccessNotFoundException { /* mock */ - when(databaseService.findById(anyLong())) + when(databaseService.findById(any(UUID.class))) .thenReturn(DATABASE_3); /* test */ diff --git a/dbrepo-metadata-service/rest-service/src/test/resources/init/dbrepo-realm.json b/dbrepo-metadata-service/rest-service/src/test/resources/init/dbrepo-realm.json index fb6df2007f2c5d50ab9ad744b622e248ea158cde..9cba9bceda462b48c59b058f43d0ddef8dd1f6c6 100644 --- a/dbrepo-metadata-service/rest-service/src/test/resources/init/dbrepo-realm.json +++ b/dbrepo-metadata-service/rest-service/src/test/resources/init/dbrepo-realm.json @@ -1475,6 +1475,39 @@ "claim.name" : "language", "jsonType.label" : "String" } + }, { + "id" : "9bdc3e60-09b8-4241-915e-29f083434026", + "name" : "provider", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usersessionmodel-note-mapper", + "consentRequired" : false, + "config" : { + "user.session.note" : "identity_provider", + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "identity_provider", + "jsonType.label" : "String", + "access.tokenResponse.claim" : "false" + } + }, { + "id" : "e567cb5c-8856-4124-8b86-f19cd53d7c71", + "name" : "setup_finished", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "SETUP_FINISHED", + "id.token.claim" : "true", + "lightweight.claim" : "false", + "access.token.claim" : "true", + "claim.name" : "setup_finished", + "jsonType.label" : "boolean" + } }, { "id" : "b817424d-7f91-43d8-b7d0-6a32582377fb", "name" : "family name", @@ -2326,12 +2359,12 @@ "strictTransportSecurity" : "max-age=31536000; includeSubDomains" }, "smtpServer" : { }, - "loginTheme" : "keycloak", + "loginTheme" : "keycloak.v2", "accountTheme" : "", "adminTheme" : "", "emailTheme" : "", "eventsEnabled" : false, - "eventsListeners" : [ "jboss-logging" ], + "eventsListeners" : [ "create-event-listener", "jboss-logging" ], "enabledEventTypes" : [ "SEND_RESET_PASSWORD", "UPDATE_CONSENT_ERROR", "GRANT_CONSENT", "VERIFY_PROFILE_ERROR", "REMOVE_TOTP", "REVOKE_GRANT", "UPDATE_TOTP", "LOGIN_ERROR", "CLIENT_LOGIN", "RESET_PASSWORD_ERROR", "IMPERSONATE_ERROR", "CODE_TO_TOKEN_ERROR", "CUSTOM_REQUIRED_ACTION", "OAUTH2_DEVICE_CODE_TO_TOKEN_ERROR", "RESTART_AUTHENTICATION", "IMPERSONATE", "UPDATE_PROFILE_ERROR", "LOGIN", "OAUTH2_DEVICE_VERIFY_USER_CODE", "UPDATE_PASSWORD_ERROR", "CLIENT_INITIATED_ACCOUNT_LINKING", "TOKEN_EXCHANGE", "AUTHREQID_TO_TOKEN", "LOGOUT", "REGISTER", "DELETE_ACCOUNT_ERROR", "CLIENT_REGISTER", "IDENTITY_PROVIDER_LINK_ACCOUNT", "DELETE_ACCOUNT", "UPDATE_PASSWORD", "CLIENT_DELETE", "FEDERATED_IDENTITY_LINK_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN", "CLIENT_DELETE_ERROR", "VERIFY_EMAIL", "CLIENT_LOGIN_ERROR", "RESTART_AUTHENTICATION_ERROR", "EXECUTE_ACTIONS", "REMOVE_FEDERATED_IDENTITY_ERROR", "TOKEN_EXCHANGE_ERROR", "PERMISSION_TOKEN", "SEND_IDENTITY_PROVIDER_LINK_ERROR", "EXECUTE_ACTION_TOKEN_ERROR", "SEND_VERIFY_EMAIL", "OAUTH2_DEVICE_AUTH", "EXECUTE_ACTIONS_ERROR", "REMOVE_FEDERATED_IDENTITY", "OAUTH2_DEVICE_CODE_TO_TOKEN", "IDENTITY_PROVIDER_POST_LOGIN", "IDENTITY_PROVIDER_LINK_ACCOUNT_ERROR", "OAUTH2_DEVICE_VERIFY_USER_CODE_ERROR", "UPDATE_EMAIL", "REGISTER_ERROR", "REVOKE_GRANT_ERROR", "EXECUTE_ACTION_TOKEN", "LOGOUT_ERROR", "UPDATE_EMAIL_ERROR", "CLIENT_UPDATE_ERROR", "AUTHREQID_TO_TOKEN_ERROR", "UPDATE_PROFILE", "CLIENT_REGISTER_ERROR", "FEDERATED_IDENTITY_LINK", "SEND_IDENTITY_PROVIDER_LINK", "SEND_VERIFY_EMAIL_ERROR", "RESET_PASSWORD", "CLIENT_INITIATED_ACCOUNT_LINKING_ERROR", "OAUTH2_DEVICE_AUTH_ERROR", "UPDATE_CONSENT", "REMOVE_TOTP_ERROR", "VERIFY_EMAIL_ERROR", "SEND_RESET_PASSWORD_ERROR", "CLIENT_UPDATE", "CUSTOM_REQUIRED_ACTION_ERROR", "IDENTITY_PROVIDER_POST_LOGIN_ERROR", "UPDATE_TOTP_ERROR", "CODE_TO_TOKEN", "VERIFY_PROFILE", "GRANT_CONSENT_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN_ERROR" ], "adminEventsEnabled" : false, "adminEventsDetailsEnabled" : false, @@ -2379,7 +2412,7 @@ "subType" : "anonymous", "subComponents" : { }, "config" : { - "allowed-protocol-mapper-types" : [ "oidc-usermodel-property-mapper", "oidc-usermodel-attribute-mapper", "saml-role-list-mapper", "oidc-address-mapper", "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-attribute-mapper", "saml-user-property-mapper" ] + "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "oidc-usermodel-property-mapper", "saml-user-attribute-mapper", "oidc-address-mapper", "saml-user-property-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-role-list-mapper" ] } }, { "id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1", @@ -2405,7 +2438,7 @@ "subType" : "authenticated", "subComponents" : { }, "config" : { - "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-property-mapper", "oidc-usermodel-property-mapper", "oidc-usermodel-attribute-mapper", "oidc-address-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-attribute-mapper" ] + "allowed-protocol-mapper-types" : [ "oidc-address-mapper", "oidc-usermodel-attribute-mapper", "saml-user-property-mapper", "saml-user-attribute-mapper", "saml-role-list-mapper", "oidc-usermodel-property-mapper", "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper" ] } } ], "org.keycloak.userprofile.UserProfileProvider" : [ { diff --git a/dbrepo-metadata-service/rest-service/src/test/resources/init/weather_at.sql b/dbrepo-metadata-service/rest-service/src/test/resources/init/weather_at.sql index d02e1945506e5d66bb17dd10582f81814b940ad1..35fd3f88fe38862d9723c41b3fd746d122000a31 100644 --- a/dbrepo-metadata-service/rest-service/src/test/resources/init/weather_at.sql +++ b/dbrepo-metadata-service/rest-service/src/test/resources/init/weather_at.sql @@ -1,11 +1,17 @@ CREATE -DATABASE weather_at; + DATABASE weather_at; USE -weather_at; + weather_at; CREATE TABLE weather_location ( location VARCHAR(255) PRIMARY KEY, lat DOUBLE PRECISION NULL, lng DOUBLE PRECISION NULL -) WITH SYSTEM VERSIONING COMMENT 'Weather location'; \ No newline at end of file +) WITH SYSTEM VERSIONING COMMENT 'Weather location'; + +INSERT INTO weather_location (location, lat, lng) +VALUES ('Sakhir', 26.0318979, 50.5084668), + ('Fiorano', 44.534308, 10.8551698), + ('Spielberg', 47.219672, 14.7625382), + ('Fuji', 35.3726836, 138.927587); \ No newline at end of file diff --git a/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata0.json b/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata0.json index 250db21b8f997330463558b8540a23d2f4521778..228849fe625df9c0b50dbb97542bd94057173d2f 100644 --- a/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata0.json +++ b/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata0.json @@ -1,5 +1,5 @@ { - "id": 7, + "id": "b216ae00-a31d-4ecb-95fb-37eb4da3946f", "type": "database", "titles": [], "descriptions": [], @@ -11,7 +11,7 @@ "licenses": [], "creators": [ { - "id": 1, + "id": "b899c367-06c7-4f47-8aea-5f15061ee3ee", "firstname": "Max", "lastname": "Mustermann", "creator_name": "Mustermann, Max", diff --git a/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata1.json b/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata1.json index 2a0da11e13c832bb1c9578e6982733fb2eb51c3f..82633c0de717d903bdf4011394b2130a4a626740 100644 --- a/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata1.json +++ b/dbrepo-metadata-service/rest-service/src/test/resources/json/metadata1.json @@ -1,16 +1,16 @@ { - "id": 1, - "query_id": 1, + "id": "679a83f2-ef23-4b4b-98f7-ad77b9d68733", + "query_id": "60494137-f000-459e-acd3-4fcadbdf14ca", "type": "subset", "doi": "10.12345/183", "titles": [ { - "id": 1, + "id": "3df6b286-9bd2-4ae3-b8f4-29c217544bef", "title": "Austrian weather data", "language": "en" }, { - "id": 2, + "id": "903a7e5b-8014-4b8a-b8fd-44f477880905", "title": "Österreichische Wetterdaten", "type": "TranslatedTitle", "language": "de" @@ -18,7 +18,7 @@ ], "descriptions": [ { - "id": 1, + "id": "1c438756-93f0-4797-983c-175a17e18c2c", "description": "Selecting all from the weather Austrian table", "language": "en" } @@ -32,7 +32,7 @@ "publisher": "Austrian Government", "creators": [ { - "id": 1, + "id": "667cd1d6-4f94-4808-b5cb-12e5ec0788d8", "firstname": "Max", "lastname": "Mustermann", "creator_name": "Mustermann, Max", diff --git a/dbrepo-metadata-service/services/pom.xml b/dbrepo-metadata-service/services/pom.xml index b817658a09424af38fb372ce440258e0b8be7b38..906fa5258b02807565c4acc0e361d5c65bd65b77 100644 --- a/dbrepo-metadata-service/services/pom.xml +++ b/dbrepo-metadata-service/services/pom.xml @@ -6,12 +6,12 @@ <parent> <artifactId>dbrepo-metadata-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-services</artifactId> <name>dbrepo-metadata-service-services</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java index 35dd5fe2b6b4f54b882d20c5685c57847dfc2c1d..b056eafe1749fe10d2e9e3a6fcfbbe80f2d27152 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java @@ -13,6 +13,7 @@ import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; @@ -52,13 +53,13 @@ public class AuthTokenFilter extends OncePerRequestFilter { filterChain.doFilter(request, response); } - public UserDetails verifyJwt(String token) throws ServletException { + public UserDetails verifyJwt(String token) throws BadCredentialsException { final KeyFactory kf; try { kf = KeyFactory.getInstance("RSA"); } catch (NoSuchAlgorithmException e) { log.error("Failed to find RSA algorithm"); - throw new ServletException("Failed to find RSA algorithm", e); + throw new BadCredentialsException("Failed to find RSA algorithm", e); } final X509EncodedKeySpec keySpecX509 = new X509EncodedKeySpec(Base64.getDecoder().decode(publicKey)); final RSAPublicKey pubKey; @@ -66,7 +67,7 @@ public class AuthTokenFilter extends OncePerRequestFilter { pubKey = (RSAPublicKey) kf.generatePublic(keySpecX509); } catch (InvalidKeySpecException e) { log.error("Provided public key is invalid"); - throw new ServletException("Provided public key is invalid", e); + throw new BadCredentialsException("Provided public key is invalid", e); } final Algorithm algorithm = Algorithm.RSA256(pubKey, null); final Verification verification = JWT.require(algorithm); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java index d6535bad491b18744afecbe4fdc4792dfd3e7f33..27a1c271af871b6253540674e9777368afa42e4a 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/auth/BasicAuthenticationProvider.java @@ -2,11 +2,9 @@ package at.tuwien.auth; import at.tuwien.api.keycloak.TokenDto; import at.tuwien.gateway.KeycloakGateway; -import jakarta.servlet.ServletException; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; @@ -28,13 +26,9 @@ public class BasicAuthenticationProvider implements AuthenticationManager { @Override public Authentication authenticate(Authentication auth) throws AuthenticationException { - try { - final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); - final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); - log.debug("set basic auth principal: {}", userDetails); - return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); - } catch (ServletException e) { - throw new BadCredentialsException("Failed to authenticate with authentication service", e); - } + final TokenDto tokenDto = keycloakGateway.obtainUserToken(auth.getName(), auth.getCredentials().toString()); + final UserDetails userDetails = authTokenFilter.verifyJwt(tokenDto.getAccessToken()); + log.debug("set basic auth principal: {}", userDetails); + return new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities()); } } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java index 4ee76c36bf7adf98fe38a32fcab869759ec3af0a..5bb0303e16c14145f1e08ee913b4c4dcabdead61 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/DataServiceGateway.java @@ -29,7 +29,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws DatabaseNotFoundException Some of the privileged parameters of the given database were not provided by the metadata service. */ - void createAccess(Long databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, + void createAccess(UUID databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException; /** @@ -42,7 +42,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws AccessNotFoundException Some of the privileged parameters of the given database were not provided by the metadata service. */ - void updateAccess(Long databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, + void updateAccess(UUID databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, DataServiceException, AccessNotFoundException; /** @@ -54,7 +54,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws AccessNotFoundException Some of the privileged parameters of the given database were not provided by the metadata service. */ - void deleteAccess(Long databaseId, UUID userId) throws DataServiceConnectionException, DataServiceException, + void deleteAccess(UUID databaseId, UUID userId) throws DataServiceConnectionException, DataServiceException, AccessNotFoundException; /** @@ -78,10 +78,10 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws DatabaseNotFoundException Some of the privileged parameters of the given database were not provided by the metadata service. */ - void updateDatabase(Long databaseId, UpdateUserPasswordDto data) throws DataServiceConnectionException, + void updateDatabase(UUID databaseId, UpdateUserPasswordDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException; - void updateTable(Long databaseId, Long tableId, TableUpdateDto data) throws DataServiceConnectionException, + void updateTable(UUID databaseId, UUID tableId, TableUpdateDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException; /** @@ -94,7 +94,7 @@ public interface DataServiceGateway { * @throws DatabaseNotFoundException Some of the privileged parameters of the given database were not provided by the metadata service. * @throws TableExistsException A table with this internal name exists already in the database. */ - void createTable(Long databaseId, CreateTableDto data) throws DataServiceConnectionException, DataServiceException, + void createTable(UUID databaseId, CreateTableDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException, TableExistsException; /** @@ -106,7 +106,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws TableNotFoundException The given table was not found in the database. */ - void deleteTable(Long databaseId, Long tableId) throws DataServiceConnectionException, DataServiceException, + void deleteTable(UUID databaseId, UUID tableId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException; /** @@ -118,7 +118,7 @@ public interface DataServiceGateway { * @throws DataServiceConnectionException The connection to the data service could not be established. * @throws DataServiceException The data service responded unexpectedly. */ - ViewDto createView(Long databaseId, CreateViewDto data) throws DataServiceConnectionException, DataServiceException; + ViewDto createView(UUID databaseId, CreateViewDto data) throws DataServiceConnectionException, DataServiceException; /** * Deletes a given view in the given database. @@ -129,7 +129,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws ViewNotFoundException The given view was not found in the database. */ - void deleteView(Long databaseId, Long viewId) throws DataServiceConnectionException, DataServiceException, + void deleteView(UUID databaseId, UUID viewId) throws DataServiceConnectionException, DataServiceException, ViewNotFoundException; /** @@ -142,7 +142,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws QueryNotFoundException The given query was not found in the query store. */ - QueryDto findQuery(Long databaseId, Long queryId) throws DataServiceConnectionException, DataServiceException, + QueryDto findQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, DataServiceException, QueryNotFoundException; /** @@ -155,7 +155,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws QueryNotFoundException The given query was not found in the query store. */ - ExportResourceDto exportQuery(Long databaseId, Long queryId) throws DataServiceConnectionException, + ExportResourceDto exportQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, DataServiceException, QueryNotFoundException; /** @@ -167,7 +167,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws TableNotFoundException The table was not found in the database. */ - List<TableDto> getTableSchemas(Long databaseId) throws DataServiceConnectionException, DataServiceException, + List<TableDto> getTableSchemas(UUID databaseId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException; /** @@ -179,7 +179,7 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws ViewNotFoundException The table was not found in the database. */ - List<ViewDto> getViewSchemas(Long databaseId) throws DataServiceConnectionException, DataServiceException, + List<ViewDto> getViewSchemas(UUID databaseId) throws DataServiceConnectionException, DataServiceException, ViewNotFoundException; /** @@ -192,6 +192,6 @@ public interface DataServiceGateway { * @throws DataServiceException The data service responded unexpectedly. * @throws TableNotFoundException The table was not found in the database. */ - TableStatisticDto getTableStatistics(Long databaseId, Long tableId) throws DataServiceConnectionException, + TableStatisticDto getTableStatistics(UUID databaseId, UUID tableId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException; } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/SearchServiceGateway.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/SearchServiceGateway.java index 6632a08194411f74d5b4d22d4f1e0de6eda91a47..1b3b20485f22d1f11ef92c6bc1698271923e9f0f 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/SearchServiceGateway.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/SearchServiceGateway.java @@ -4,9 +4,11 @@ import at.tuwien.api.database.DatabaseBriefDto; import at.tuwien.entities.database.Database; import at.tuwien.exception.*; +import java.util.UUID; + public interface SearchServiceGateway { DatabaseBriefDto update(Database database) throws SearchServiceConnectionException, SearchServiceException, DatabaseNotFoundException; - void delete(Long databaseId) throws SearchServiceConnectionException, SearchServiceException, DatabaseNotFoundException; + void delete(UUID databaseId) throws SearchServiceConnectionException, SearchServiceException, DatabaseNotFoundException; } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java index 6ee2ef084b962e30bd614dd1073aecf65a0ced09..8feed3b291444ea674317673d74fa59bba4b5cad 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/DataServiceGatewayImpl.java @@ -41,7 +41,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void createAccess(Long databaseId, UUID userId, AccessTypeDto access) + public void createAccess(UUID databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/access/" + userId; @@ -66,7 +66,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void updateAccess(Long databaseId, UUID userId, AccessTypeDto access) + public void updateAccess(UUID databaseId, UUID userId, AccessTypeDto access) throws DataServiceConnectionException, DataServiceException, AccessNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/access/" + userId; @@ -91,7 +91,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void deleteAccess(Long databaseId, UUID userId) throws DataServiceConnectionException, DataServiceException, + public void deleteAccess(UUID databaseId, UUID userId) throws DataServiceConnectionException, DataServiceException, AccessNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/access/" + userId; @@ -140,7 +140,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void updateDatabase(Long databaseId, UpdateUserPasswordDto data) throws DataServiceConnectionException, + public void updateDatabase(UUID databaseId, UpdateUserPasswordDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId; @@ -164,7 +164,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void updateTable(Long databaseId, Long tableId, TableUpdateDto data) throws DataServiceConnectionException, + public void updateTable(UUID databaseId, UUID tableId, TableUpdateDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/table/" + tableId; @@ -188,7 +188,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void createTable(Long databaseId, CreateTableDto data) throws DataServiceConnectionException, DataServiceException, + public void createTable(UUID databaseId, CreateTableDto data) throws DataServiceConnectionException, DataServiceException, DatabaseNotFoundException, TableExistsException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/table"; @@ -215,7 +215,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void deleteTable(Long databaseId, Long tableId) throws DataServiceConnectionException, DataServiceException, + public void deleteTable(UUID databaseId, UUID tableId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/table/" + tableId; @@ -239,7 +239,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public ViewDto createView(Long databaseId, CreateViewDto data) throws DataServiceConnectionException, DataServiceException { + public ViewDto createView(UUID databaseId, CreateViewDto data) throws DataServiceConnectionException, DataServiceException { final ResponseEntity<ViewDto> response; final String path = "/api/database/" + databaseId + "/view"; log.trace("create view at endpoint {} with path {}", gatewayConfig.getDataEndpoint(), path); @@ -264,7 +264,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public void deleteView(Long databaseId, Long viewId) throws DataServiceConnectionException, DataServiceException, + public void deleteView(UUID databaseId, UUID viewId) throws DataServiceConnectionException, DataServiceException, ViewNotFoundException { final ResponseEntity<Void> response; final String path = "/api/database/" + databaseId + "/view/" + viewId; @@ -288,7 +288,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public QueryDto findQuery(Long databaseId, Long queryId) throws DataServiceConnectionException, DataServiceException, + public QueryDto findQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, DataServiceException, QueryNotFoundException { final ResponseEntity<QueryDto> response; final String path = "/api/database/" + databaseId + "/subset/" + queryId; @@ -316,7 +316,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public ExportResourceDto exportQuery(Long databaseId, Long queryId) throws DataServiceConnectionException, + public ExportResourceDto exportQuery(UUID databaseId, UUID queryId) throws DataServiceConnectionException, DataServiceException, QueryNotFoundException { final ResponseEntity<ExportResourceDto> response; final String path = "/api/database/" + databaseId + "/subset/" + queryId; @@ -341,7 +341,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public List<TableDto> getTableSchemas(Long databaseId) throws DataServiceConnectionException, DataServiceException, + public List<TableDto> getTableSchemas(UUID databaseId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException { final ResponseEntity<TableDto[]> response; final String path = "/api/database/" + databaseId + "/table"; @@ -372,7 +372,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public List<ViewDto> getViewSchemas(Long databaseId) throws DataServiceConnectionException, DataServiceException, + public List<ViewDto> getViewSchemas(UUID databaseId) throws DataServiceConnectionException, DataServiceException, ViewNotFoundException { final ResponseEntity<ViewDto[]> response; final String path = "/api/database/" + databaseId + "/view"; @@ -403,7 +403,7 @@ public class DataServiceGatewayImpl implements DataServiceGateway { } @Override - public TableStatisticDto getTableStatistics(Long databaseId, Long tableId) throws DataServiceConnectionException, + public TableStatisticDto getTableStatistics(UUID databaseId, UUID tableId) throws DataServiceConnectionException, DataServiceException, TableNotFoundException { final ResponseEntity<TableStatisticDto> response; final String path = "/api/database/" + databaseId + "/table/" + tableId + "/statistic"; @@ -424,7 +424,12 @@ public class DataServiceGatewayImpl implements DataServiceGateway { log.error("Failed to analyse table statistic: wrong http code: {}", response.getStatusCode()); throw new DataServiceException("Failed to analyse table statistic: wrong http code: " + response.getStatusCode()); } - return response.getBody(); + final TableStatisticDto body = response.getBody(); + if (body == null) { + log.error("Failed to analyse table statistic: empty body: {}", response.getStatusCode()); + throw new DataServiceException("Failed to analyse table statistic: empty body"); + } + return body; } } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java index d088fb63ef7ce3085d49030f584123f71c3c9543..4eb96aeee5b025b996d2bbbaf783a625f25372e2 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/KeycloakGatewayImpl.java @@ -8,6 +8,7 @@ import at.tuwien.exception.UserNotFoundException; import at.tuwien.gateway.KeycloakGateway; import at.tuwien.mapper.MetadataMapper; import jakarta.ws.rs.ForbiddenException; +import jakarta.ws.rs.NotAuthorizedException; import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.core.Response; import lombok.extern.log4j.Log4j2; @@ -16,6 +17,8 @@ import org.keycloak.admin.client.Keycloak; import org.keycloak.admin.client.KeycloakBuilder; import org.keycloak.admin.client.resource.UserResource; import org.keycloak.representations.idm.UserRepresentation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.stereotype.Service; import java.util.List; @@ -29,6 +32,7 @@ public class KeycloakGatewayImpl implements KeycloakGateway { private final KeycloakConfig keycloakConfig; private final MetadataMapper metadataMapper; + @Autowired public KeycloakGatewayImpl(Keycloak keycloak, KeycloakConfig keycloakConfig, MetadataMapper metadataMapper) { this.keycloak = keycloak; this.keycloakConfig = keycloakConfig; @@ -36,7 +40,7 @@ public class KeycloakGatewayImpl implements KeycloakGateway { } @Override - public TokenDto obtainUserToken(String username, String password) { + public TokenDto obtainUserToken(String username, String password) throws BadCredentialsException { try (Keycloak userKeycloak = KeycloakBuilder.builder() .serverUrl(keycloakConfig.getKeycloakEndpoint()) .realm(keycloakConfig.getRealm()) @@ -48,6 +52,9 @@ public class KeycloakGatewayImpl implements KeycloakGateway { .build()) { return metadataMapper.accessTokenResponseToTokenDto(userKeycloak.tokenManager() .getAccessToken()); + } catch (NotAuthorizedException e) { + log.error("Failed to obtain user token: {}", e.getMessage()); + throw new BadCredentialsException("Failed to obtain user token", e); } } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/SearchServiceGatewayImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/SearchServiceGatewayImpl.java index 503cad47ec5d2a8abd7ec4e76757b2f8ddb48ecd..89b4dff5c71eb3f58b2fe1e9ac0616ab743cd5f6 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/SearchServiceGatewayImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/gateway/impl/SearchServiceGatewayImpl.java @@ -18,6 +18,8 @@ import org.springframework.web.client.HttpServerErrorException; import org.springframework.web.client.ResourceAccessException; import org.springframework.web.client.RestTemplate; +import java.util.UUID; + @Log4j2 @Service public class SearchServiceGatewayImpl implements SearchServiceGateway { @@ -64,7 +66,7 @@ public class SearchServiceGatewayImpl implements SearchServiceGateway { } @Override - public void delete(Long databaseId) throws SearchServiceConnectionException, SearchServiceException, DatabaseNotFoundException { + public void delete(UUID databaseId) throws SearchServiceConnectionException, SearchServiceException, DatabaseNotFoundException { final ResponseEntity<Void> response; final String path = "/api/search/database/" + databaseId; log.trace("delete database at endpoint {} with path {}", gatewayConfig.getSearchEndpoint(), path); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/BannerMessageService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/BannerMessageService.java index 3be407e6b2ef4d89dfa29e4dd61829836fb08594..a7973b6171d8cf941a0cc24b264b69f76255628e 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/BannerMessageService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/BannerMessageService.java @@ -6,6 +6,7 @@ import at.tuwien.entities.maintenance.BannerMessage; import at.tuwien.exception.MessageNotFoundException; import java.util.List; +import java.util.UUID; public interface BannerMessageService { @@ -30,7 +31,7 @@ public interface BannerMessageService { * @return The message, if successful. * @throws MessageNotFoundException The message was not found in the metadata database. */ - BannerMessage find(Long id) throws MessageNotFoundException; + BannerMessage find(UUID id) throws MessageNotFoundException; /** * Creates a new maintenance message in the metadata database. diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ContainerService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ContainerService.java index 9aa2dc6c89839999c255595d65deb7399e702feb..d559b5134d6b34b3d5855debb30ece42115caff5 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ContainerService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ContainerService.java @@ -2,9 +2,12 @@ package at.tuwien.service; import at.tuwien.api.container.CreateContainerDto; import at.tuwien.entities.container.Container; -import at.tuwien.exception.*; +import at.tuwien.exception.ContainerAlreadyExistsException; +import at.tuwien.exception.ContainerNotFoundException; +import at.tuwien.exception.ImageNotFoundException; import java.util.List; +import java.util.UUID; public interface ContainerService { @@ -34,7 +37,7 @@ public interface ContainerService { * @return The container object, if successful. * @throws ContainerNotFoundException The container was not found in the metadata database. */ - Container find(Long id) throws ContainerNotFoundException; + Container find(UUID id) throws ContainerNotFoundException; /** * Retrieve a list of all containers from the metadata database diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/DatabaseService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/DatabaseService.java index 4e3765fd6ec8231d8bcfdcdaae83c0c96bcb8788..2f6aa6f3726627d7965c5466fa7db662cf88ddc4 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/DatabaseService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/DatabaseService.java @@ -23,6 +23,8 @@ public interface DatabaseService { List<Database> findAllPublicOrSchemaPublic(); + List<Database> findByInternalName(String internalName); + List<Database> findAllPublicOrSchemaPublicOrReadAccessByInternalName(UUID userId, String internalName); /** @@ -54,7 +56,7 @@ public interface DatabaseService { * @return The database, if successful. * @throws DatabaseNotFoundException The database was not found in the metadata database. */ - Database findById(Long databaseId) throws DatabaseNotFoundException; + Database findById(UUID databaseId) throws DatabaseNotFoundException; /** * Creates a new database with minimal metadata in the metadata database and creates a new database on the container. diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java index 47183700f91df1b24194fef24d931992b6b8b932..605ded7d37faad52fc7119f4dd0a958c199b68b8 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/IdentifierService.java @@ -12,6 +12,7 @@ import org.springframework.core.io.InputStreamResource; import org.springframework.stereotype.Service; import java.util.List; +import java.util.UUID; @Service public interface IdentifierService { @@ -29,7 +30,7 @@ public interface IdentifierService { * @param databaseId The database id. * @return The list of identifiers. */ - List<Identifier> findAll(Long databaseId); + List<Identifier> findAll(UUID databaseId); /** * Finds an identifier by given id. @@ -38,7 +39,7 @@ public interface IdentifierService { * @return The identifier, if successful. * @throws IdentifierNotFoundException The identifier does not exist. */ - Identifier find(Long id) throws IdentifierNotFoundException; + Identifier find(UUID id) throws IdentifierNotFoundException; /** * Finds an identifier by given doi. @@ -56,7 +57,7 @@ public interface IdentifierService { * @param queryId The query id. * @return The list of identifiers. */ - List<Identifier> findByDatabaseIdAndQueryId(Long databaseId, Long queryId); + List<Identifier> findByDatabaseIdAndQueryId(UUID databaseId, UUID queryId); /** * Finds all identifiers in the metadata database which are identifying databases. @@ -83,7 +84,7 @@ public interface IdentifierService { * @param tableId Optional. The table id. * @return The list of identifiers. */ - List<Identifier> findAll(IdentifierTypeDto type, Long databaseId, Long queryId, Long viewId, Long tableId); + List<Identifier> findAll(IdentifierTypeDto type, UUID databaseId, UUID queryId, UUID viewId, UUID tableId); /** * Publishes a draft identifier with DataCite. @@ -95,7 +96,6 @@ public interface IdentifierService { * @throws SearchServiceConnectionException * @throws MalformedException * @throws DataServiceConnectionException - * @throws IdentifierNotFoundException */ Identifier publish(Identifier identifier) throws SearchServiceException, DatabaseNotFoundException, SearchServiceConnectionException, MalformedException, DataServiceConnectionException, diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ImageService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ImageService.java index cc51082d65f1b72a066208b83276169fd36d8f5d..c5f353c7a18a5cb5e6eecd6819b7923e4b49d08e 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ImageService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ImageService.java @@ -9,6 +9,7 @@ import at.tuwien.exception.ImageNotFoundException; import java.security.Principal; import java.util.List; +import java.util.UUID; public interface ImageService { @@ -25,7 +26,7 @@ public interface ImageService { * @param imageId The image id. * @return The image, if successful. */ - ContainerImage find(Long imageId) throws ImageNotFoundException; + ContainerImage find(UUID imageId) throws ImageNotFoundException; /** * Creates a new container image in the metadata database. diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/OntologyService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/OntologyService.java index 6755a64952f35b14c9681ec839bafd3856a40e91..c8e4c7067642ca1b948a321dba5d004d0f9eb2d2 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/OntologyService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/OntologyService.java @@ -7,6 +7,7 @@ import at.tuwien.exception.OntologyNotFoundException; import java.security.Principal; import java.util.List; +import java.util.UUID; public interface OntologyService { @@ -31,7 +32,7 @@ public interface OntologyService { * @return The ontology, if successful. * @throws OntologyNotFoundException The ontology was not found in the metadata database. */ - Ontology find(Long ontologyId) throws OntologyNotFoundException; + Ontology find(UUID ontologyId) throws OntologyNotFoundException; Ontology find(String entityUri) throws OntologyNotFoundException; diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/TableService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/TableService.java index c0880c07dc8230d803ad455093cbea17c3145f61..2edea6ebeb2a61a80e4891a59afe4fd018e42109 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/TableService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/TableService.java @@ -9,6 +9,7 @@ import at.tuwien.entities.database.table.columns.TableColumn; import at.tuwien.exception.*; import java.security.Principal; +import java.util.UUID; public interface TableService { @@ -19,7 +20,7 @@ public interface TableService { * @param tableId The table id. * @return The table, if successful. */ - Table findById(Database database, Long tableId) throws TableNotFoundException, DatabaseNotFoundException; + Table findById(Database database, UUID tableId) throws TableNotFoundException, DatabaseNotFoundException; /** * Find a table in the metadata database by database id and table name. @@ -57,7 +58,7 @@ public interface TableService { TableColumn update(TableColumn column, ColumnSemanticsUpdateDto updateDto) throws DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, SearchServiceConnectionException, MalformedException, OntologyNotFoundException, SemanticEntityNotFoundException; - TableColumn findColumnById(Table table, Long columnId) throws MalformedException; + TableColumn findColumnById(Table table, UUID columnId) throws MalformedException; void updateStatistics(Table table) throws SearchServiceException, DatabaseNotFoundException, SearchServiceConnectionException, MalformedException, TableNotFoundException, DataServiceException, DataServiceConnectionException; } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ViewService.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ViewService.java index 4d183f1cc467d070a51a89edca99850c81a9b2ed..54c9dd80bf7ed56040a55f019ca2e6b127a20cf9 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ViewService.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/ViewService.java @@ -8,6 +8,7 @@ import at.tuwien.entities.user.User; import at.tuwien.exception.*; import java.util.List; +import java.util.UUID; public interface ViewService { @@ -18,7 +19,7 @@ public interface ViewService { * @param viewId The view id. * @return The view, if successful. */ - View findById(Database database, Long viewId) throws ViewNotFoundException; + View findById(Database database, UUID viewId) throws ViewNotFoundException; /** * Find all views by database id. @@ -50,11 +51,10 @@ public interface ViewService { * @throws DatabaseNotFoundException * @throws SearchServiceException * @throws SearchServiceConnectionException - * @throws ViewNotFoundException */ View create(Database database, User user, CreateViewDto data) throws MalformedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, - SearchServiceConnectionException; + SearchServiceConnectionException, TableNotFoundException, ImageNotFoundException; /** * @param database diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java index 1c302c206871234da50f2cc9de234d7c94a84d66..e5b59ebda8accad54421a1ed9834c7114b9ab911 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java @@ -72,8 +72,8 @@ public class AccessServiceImpl implements AccessService { .hdbid(database.getId()) .database(database) .huserid(user.getId()) - .type(metadataMapper.accessTypeDtoToAccessType(type)) .user(user) + .type(metadataMapper.accessTypeDtoToAccessType(type)) .build(); database.getAccesses() .add(access); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/BannerMessageServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/BannerMessageServiceImpl.java index ac465232503374a1bd3df7d09e46bef00c473673..d75d384b3c293e68d00eba2da092ae85214617d5 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/BannerMessageServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/BannerMessageServiceImpl.java @@ -13,6 +13,7 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; +import java.util.UUID; @Log4j2 @Service @@ -39,7 +40,7 @@ public class BannerMessageServiceImpl implements BannerMessageService { } @Override - public BannerMessage find(Long id) throws MessageNotFoundException { + public BannerMessage find(UUID id) throws MessageNotFoundException { final Optional<BannerMessage> optional = bannerMessageRepository.findById(id); if (optional.isEmpty()) { log.error("Failed to find banner message with id {}", id); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java index 2a3c3215367605b943a3a2701c47b139c20c1b5d..d92b6c17dc052728af0eb2e861baecdcda150995 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; +import java.util.UUID; @Log4j2 @Service @@ -81,7 +82,7 @@ public class ContainerServiceImpl implements ContainerService { @Override @Transactional - public Container find(Long id) throws ContainerNotFoundException { + public Container find(UUID id) throws ContainerNotFoundException { final Optional<Container> container = containerRepository.findById(id); if (container.isEmpty()) { log.error("Failed to find container with id {} in metadata database", id); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java index b4e42a67e15939c2b779fc0dbe9d392371588c76..0c8ce27d1214b1ac47c6756d7f5d3fbe4c77adcd 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DataCiteIdentifierServiceImpl.java @@ -33,6 +33,7 @@ import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import java.util.List; +import java.util.UUID; @Slf4j @Primary @@ -64,7 +65,7 @@ public class DataCiteIdentifierServiceImpl implements IdentifierService { @Override @Transactional(readOnly = true) - public List<Identifier> findAll(IdentifierTypeDto type, Long databaseId, Long queryId, Long viewId, Long tableId) { + public List<Identifier> findAll(IdentifierTypeDto type, UUID databaseId, UUID queryId, UUID viewId, UUID tableId) { return identifierService.findAll(type, databaseId, queryId, viewId, tableId); } @@ -79,7 +80,7 @@ public class DataCiteIdentifierServiceImpl implements IdentifierService { @Override @Transactional(readOnly = true) - public List<Identifier> findByDatabaseIdAndQueryId(Long databaseId, Long queryId) { + public List<Identifier> findByDatabaseIdAndQueryId(UUID databaseId, UUID queryId) { return identifierService.findByDatabaseIdAndQueryId(databaseId, queryId); } @@ -167,13 +168,13 @@ public class DataCiteIdentifierServiceImpl implements IdentifierService { } @Override - public List<Identifier> findAll(Long databaseId) { + public List<Identifier> findAll(UUID databaseId) { return identifierService.findAll(databaseId); } @Override @Transactional(readOnly = true) - public Identifier find(Long identifierId) throws IdentifierNotFoundException { + public Identifier find(UUID identifierId) throws IdentifierNotFoundException { return identifierService.find(identifierId); } diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java index 8b4c73fb2f063cfc779fa001b7982675d74cf447..d01e5c0b6e1470362916a45dae689b155d1c92f2 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java @@ -62,6 +62,11 @@ public class DatabaseServiceImpl implements DatabaseService { return databaseRepository.findAllPublicOrSchemaPublicDesc(); } + @Override + public List<Database> findByInternalName(String internalName) { + return databaseRepository.findAllByInternalNameDesc(internalName); + } + @Override public List<Database> findAllPublicOrSchemaPublicOrReadAccessByInternalName(UUID userId, String internalName) { return databaseRepository.findAllPublicOrSchemaPublicOrReadAccessByInternalNameDesc(userId, internalName); @@ -84,7 +89,7 @@ public class DatabaseServiceImpl implements DatabaseService { @Override @Transactional(readOnly = true) - public Database findById(Long id) throws DatabaseNotFoundException { + public Database findById(UUID id) throws DatabaseNotFoundException { final Optional<Database> database = databaseRepository.findById(id); if (database.isEmpty()) { log.error("Failed to find database with id {} in metadata database", id); @@ -130,10 +135,10 @@ public class DatabaseServiceImpl implements DatabaseService { final Database entity1 = databaseRepository.save(entity); entity1.getAccesses() .add(metadataMapper.userToWriteAllAccess(entity1, user)); - entity1.getAccesses() - .addAll(internalUsers.stream() - .map(internalUser -> metadataMapper.userToWriteAllAccess(entity1, internalUser)) - .toList()); +// entity1.getAccesses() +// .addAll(internalUsers.stream() +// .map(internalUser -> metadataMapper.userToWriteAllAccess(entity1, internalUser)) +// .toList()); final Database database = databaseRepository.save(entity1); /* create in search service */ searchServiceGateway.update(database); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java index 96b8bd83963cca91e4731812ee0812a54a4630dc..b1d1f45932c61bb755a615f22a6a919297ffec46 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/IdentifierServiceImpl.java @@ -31,10 +31,7 @@ import org.thymeleaf.context.Context; import org.thymeleaf.exceptions.TemplateInputException; import java.nio.charset.Charset; -import java.util.LinkedList; -import java.util.List; -import java.util.Objects; -import java.util.Optional; +import java.util.*; import java.util.stream.Stream; @Slf4j @@ -69,13 +66,13 @@ public class IdentifierServiceImpl implements IdentifierService { } @Override - public List<Identifier> findAll(Long databaseId) { + public List<Identifier> findAll(UUID databaseId) { return identifierRepository.findByDatabaseId(databaseId); } @Override @Transactional(readOnly = true) - public Identifier find(Long identifierId) throws IdentifierNotFoundException { + public Identifier find(UUID identifierId) throws IdentifierNotFoundException { final Optional<Identifier> optional = identifierRepository.findById(identifierId); if (optional.isEmpty()) { log.error("Failed to find identifier with id: {}", identifierId); @@ -97,7 +94,7 @@ public class IdentifierServiceImpl implements IdentifierService { @Override @Transactional(readOnly = true) - public List<Identifier> findByDatabaseIdAndQueryId(Long databaseId, Long queryId) { + public List<Identifier> findByDatabaseIdAndQueryId(UUID databaseId, UUID queryId) { return identifierRepository.findByDatabaseIdAndQueryId(databaseId, queryId); } @@ -113,7 +110,7 @@ public class IdentifierServiceImpl implements IdentifierService { @Override @Transactional(readOnly = true) - public List<Identifier> findAll(IdentifierTypeDto type, Long databaseId, Long queryId, Long viewId, Long tableId) { + public List<Identifier> findAll(IdentifierTypeDto type, UUID databaseId, UUID queryId, UUID viewId, UUID tableId) { final List<Identifier> identifiers = this.identifierRepository.findAll(); log.trace("found {} identifiers before applying filter(s)", identifiers.size()); Stream<Identifier> stream = identifiers.stream(); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ImageServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ImageServiceImpl.java index 84fdffcf43b1e6e6f110bf0acf72d4ca75a3a3cf..b82c8ca38290d5bc24dff6f60a14c5051ecf4697 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ImageServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ImageServiceImpl.java @@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional; import java.security.Principal; import java.util.List; import java.util.Optional; +import java.util.UUID; @Slf4j @Service @@ -41,7 +42,7 @@ public class ImageServiceImpl implements ImageService { @Override @Transactional - public ContainerImage find(Long imageId) throws ImageNotFoundException { + public ContainerImage find(UUID imageId) throws ImageNotFoundException { final Optional<ContainerImage> image = imageRepository.findById(imageId); if (image.isEmpty()) { log.error("Failed to find image with id {}", imageId); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/MetadataServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/MetadataServiceImpl.java index 14c621e2f9d10799864d8d85a6f019353ca67b08..1b6051f5437ba8a07ee10eef0ebe1c5ef5e67587 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/MetadataServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/MetadataServiceImpl.java @@ -28,6 +28,7 @@ import org.thymeleaf.context.Context; import java.time.Instant; import java.util.List; import java.util.Optional; +import java.util.UUID; @Slf4j @Service @@ -97,7 +98,7 @@ public class MetadataServiceImpl implements MetadataService { if (parameters.getIdentifier().startsWith("doi")) { identifier = identifierService.findByDoi(parameters.getIdentifier().substring(4)); } else if (parameters.getIdentifier().startsWith("oai")) { - identifier = identifierService.find(Long.parseLong(parameters.getIdentifier().substring(4))); + identifier = identifierService.find(UUID.fromString(parameters.getIdentifier().substring(4))); } else { final String prefix = parameters.getIdentifier().substring(0, 3); log.error("Invalid prefix: {}", prefix); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/OntologyServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/OntologyServiceImpl.java index 3f242914e9ac0f187b7e05258d7fe16edf0715c2..d40239a06eb560272aea8acdf35a0f3bdc39fe4f 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/OntologyServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/OntologyServiceImpl.java @@ -17,6 +17,7 @@ import java.net.URISyntaxException; import java.security.Principal; import java.util.List; import java.util.Optional; +import java.util.UUID; @Log4j2 @Service @@ -45,7 +46,7 @@ public class OntologyServiceImpl implements OntologyService { } @Override - public Ontology find(Long id) throws OntologyNotFoundException { + public Ontology find(UUID id) throws OntologyNotFoundException { final Optional<Ontology> optional = ontologyRepository.findById(id); if (optional.isEmpty()) { log.error("Failed to find ontology with id {}", id); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java index da92fb7ef59eac9af0df3cf1f779da150c2d437f..f5e2821f2663b0ce18df27784638eda4a9cef767 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java @@ -3,15 +3,13 @@ package at.tuwien.service.impl; import at.tuwien.api.database.table.CreateTableDto; import at.tuwien.api.database.table.TableStatisticDto; import at.tuwien.api.database.table.TableUpdateDto; -import at.tuwien.api.database.table.columns.CreateTableColumnDto; import at.tuwien.api.database.table.columns.ColumnStatisticDto; +import at.tuwien.api.database.table.columns.CreateTableColumnDto; import at.tuwien.api.database.table.columns.concepts.ColumnSemanticsUpdateDto; import at.tuwien.config.RabbitConfig; import at.tuwien.entities.database.Database; import at.tuwien.entities.database.table.Table; -import at.tuwien.entities.database.table.columns.TableColumn; -import at.tuwien.entities.database.table.columns.TableColumnConcept; -import at.tuwien.entities.database.table.columns.TableColumnUnit; +import at.tuwien.entities.database.table.columns.*; import at.tuwien.entities.user.User; import at.tuwien.exception.*; import at.tuwien.gateway.DataServiceGateway; @@ -25,10 +23,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.security.Principal; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; @Log4j2 @Service @@ -62,7 +57,7 @@ public class TableServiceImpl implements TableService { @Override @Transactional(readOnly = true) - public Table findById(Database database, Long tableId) throws TableNotFoundException { + public Table findById(Database database, UUID tableId) throws TableNotFoundException { final Optional<Table> table = database.getTables() .stream() .filter(t -> t.getId().equals(tableId)) @@ -119,6 +114,24 @@ public class TableServiceImpl implements TableService { for (int i = 0; i < data.getColumns().size(); i++) { final CreateTableColumnDto c = data.getColumns().get(i); final TableColumn column = metadataMapper.columnCreateDtoToTableColumn(c, database.getContainer().getImage()); + if (c.getEnums() != null) { + column.setEnums(c.getEnums() + .stream() + .map(e -> ColumnEnum.builder() + .column(column) + .value(e) + .build()) + .toList()); + } + if (c.getSets() != null) { + column.setSets(c.getSets() + .stream() + .map(e -> ColumnSet.builder() + .column(column) + .value(e) + .build()) + .toList()); + } column.setOrdinalPosition(idx[0]++); column.setTable(table); if (c.getUnitUri() != null) { @@ -265,7 +278,7 @@ public class TableServiceImpl implements TableService { @Override @Transactional(readOnly = true) - public TableColumn findColumnById(Table table, Long columnId) throws MalformedException { + public TableColumn findColumnById(Table table, UUID columnId) throws MalformedException { final Optional<TableColumn> optional = table.getColumns() .stream() .filter(c -> c.getId().equals(columnId)) @@ -283,9 +296,6 @@ public class TableServiceImpl implements TableService { DatabaseNotFoundException, SearchServiceConnectionException, MalformedException, TableNotFoundException, DataServiceException, DataServiceConnectionException { final TableStatisticDto statistic = dataServiceGateway.getTableStatistics(table.getTdbid(), table.getId()); - if (statistic == null) { - return; - } table.setNumRows(statistic.getRows()); table.setDataLength(statistic.getDataLength()); table.setAvgRowLength(statistic.getAvgRowLength()); diff --git a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ViewServiceImpl.java b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ViewServiceImpl.java index 8ca688b1edcc869be309561b4c9fef434e081285..51c9832e267aac53cb02e09802839ebbdc6b151c 100644 --- a/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ViewServiceImpl.java +++ b/dbrepo-metadata-service/services/src/main/java/at/tuwien/service/impl/ViewServiceImpl.java @@ -22,6 +22,7 @@ import java.nio.charset.StandardCharsets; import java.util.LinkedList; import java.util.List; import java.util.Optional; +import java.util.UUID; @Log4j2 @Service @@ -42,14 +43,14 @@ public class ViewServiceImpl implements ViewService { } @Override - public View findById(Database database, Long viewId) throws ViewNotFoundException { + public View findById(Database database, UUID viewId) throws ViewNotFoundException { final Optional<View> optional = database.getViews() .stream() .filter(v -> v.getId().equals(viewId)) .findFirst(); if (optional.isEmpty()) { - log.error("Failed to find view with id {}", viewId); - throw new ViewNotFoundException("Failed to find view with id " + viewId); + log.error("Failed to find view with id: {}", viewId); + throw new ViewNotFoundException("Failed to find view with id: " + viewId); } return optional.get(); } @@ -89,20 +90,15 @@ public class ViewServiceImpl implements ViewService { @Transactional public View create(Database database, User creator, CreateViewDto data) throws MalformedException, DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, SearchServiceException, - SearchServiceConnectionException { + SearchServiceConnectionException, TableNotFoundException, ImageNotFoundException { /* create in metadata database */ final View view = View.builder() - .vdbid(database.getId()) .database(database) .name(data.getName()) .internalName(metadataMapper.nameToInternalName(data.getName())) .ownedBy(creator.getId()) .owner(creator) .identifiers(new LinkedList<>()) - .query(data.getQuery()) - .queryHash(Hashing.sha256() - .hashString(data.getQuery(), StandardCharsets.UTF_8) - .toString()) .columns(new LinkedList<>()) .isInitialView(false) .isSchemaPublic(data.getIsSchemaPublic()) @@ -117,6 +113,10 @@ public class ViewServiceImpl implements ViewService { .toList()); view.getColumns() .forEach(column -> column.setView(view)); + view.setQuery(rawView.getQuery()); + view.setQueryHash(Hashing.sha256() + .hashString(rawView.getQuery(), StandardCharsets.UTF_8) + .toString()); database.getViews() .add(view); database = databaseRepository.save(database); diff --git a/dbrepo-metadata-service/test/pom.xml b/dbrepo-metadata-service/test/pom.xml index a68140ebac0f0d0289e88e14a754a8f72a6f18cc..792523227eaa968b3dd8c340779bece2323cb461 100644 --- a/dbrepo-metadata-service/test/pom.xml +++ b/dbrepo-metadata-service/test/pom.xml @@ -6,12 +6,12 @@ <parent> <groupId>at.tuwien</groupId> <artifactId>dbrepo-metadata-service</artifactId> - <version>1.6.5</version> + <version>1.7.0</version> </parent> <artifactId>dbrepo-metadata-service-test</artifactId> <name>dbrepo-metadata-service-test</name> - <version>1.6.5</version> + <version>1.7.0</version> <dependencies> <dependency> diff --git a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java index f78366fe89f6c631ae29da8020af629f71c528e6..230aada37a32157fbf17cb999edb1cf00cd9a0cd 100644 --- a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java +++ b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/AbstractUnitTest.java @@ -56,18 +56,12 @@ public abstract class AbstractUnitTest extends BaseTest { DATABASE_1_DTO.setViews(new LinkedList<>(List.of(VIEW_1_DTO, VIEW_2_DTO, VIEW_3_DTO))); TABLE_1_DTO.setColumns(new LinkedList<>(TABLE_1_COLUMNS_DTO)); TABLE_1_DTO.setConstraints(TABLE_1_CONSTRAINTS_DTO); - TABLE_1_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); - TABLE_1_PRIVILEGED_DTO.setColumns(new LinkedList<>(TABLE_1_COLUMNS_DTO)); - TABLE_1_PRIVILEGED_DTO.setConstraints(TABLE_1_CONSTRAINTS_DTO); TABLE_2.setDatabase(DATABASE_1); TABLE_2.setColumns(new LinkedList<>(TABLE_2_COLUMNS)); TABLE_2_CONSTRAINTS.getForeignKeys().get(0).getReferences().get(0).setForeignKey(TABLE_2_CONSTRAINTS.getForeignKeys().get(0)); TABLE_2.setConstraints(TABLE_2_CONSTRAINTS); TABLE_2_DTO.setColumns(new LinkedList<>(TABLE_2_COLUMNS_DTO)); TABLE_2_DTO.setConstraints(TABLE_2_CONSTRAINTS_DTO); - TABLE_2_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); - TABLE_2_PRIVILEGED_DTO.setColumns(new LinkedList<>(TABLE_2_COLUMNS_DTO)); - TABLE_2_PRIVILEGED_DTO.setConstraints(TABLE_2_CONSTRAINTS_DTO); TABLE_3.setDatabase(DATABASE_1); TABLE_3.setColumns(new LinkedList<>(TABLE_3_COLUMNS)); TABLE_3.setConstraints(TABLE_3_CONSTRAINTS); @@ -78,19 +72,13 @@ public abstract class AbstractUnitTest extends BaseTest { TABLE_4.setConstraints(TABLE_4_CONSTRAINTS); TABLE_4_DTO.setColumns(TABLE_4_COLUMNS_DTO); TABLE_4_DTO.setConstraints(TABLE_4_CONSTRAINTS_DTO); - TABLE_4_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); - TABLE_4_PRIVILEGED_DTO.setColumns(new LinkedList<>(TABLE_4_COLUMNS_DTO)); - TABLE_4_PRIVILEGED_DTO.setConstraints(TABLE_4_CONSTRAINTS_DTO); VIEW_1.setDatabase(DATABASE_1); VIEW_1.setColumns(new LinkedList<>(VIEW_1_COLUMNS)); VIEW_1.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_3))); - VIEW_1_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); VIEW_2.setDatabase(DATABASE_1); VIEW_2.setColumns(new LinkedList<>(VIEW_2_COLUMNS)); - VIEW_2_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); VIEW_3.setDatabase(DATABASE_1); VIEW_3.setColumns(new LinkedList<>(VIEW_3_COLUMNS)); - VIEW_3_PRIVILEGED_DTO.setDatabase(DATABASE_1_PRIVILEGED_DTO); IDENTIFIER_1.setDatabase(DATABASE_1); IDENTIFIER_2.setDatabase(DATABASE_1); IDENTIFIER_3.setDatabase(DATABASE_1); @@ -98,21 +86,23 @@ public abstract class AbstractUnitTest extends BaseTest { /* DATABASE 2 */ DATABASE_2.setSubsets(new LinkedList<>()); DATABASE_2.setAccesses(new LinkedList<>(List.of(DATABASE_2_USER_2_WRITE_ALL_ACCESS, DATABASE_2_USER_3_READ_ACCESS))); - DATABASE_2_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_2_USER_2_WRITE_ALL_ACCESS_DTO, DATABASE_2_USER_3_READ_ACCESS_DTO))); - DATABASE_2_PRIVILEGED_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_2_USER_2_WRITE_ALL_ACCESS_DTO, DATABASE_2_USER_3_READ_ACCESS_DTO))); DATABASE_2.setTables(new LinkedList<>(List.of(TABLE_5, TABLE_6, TABLE_7))); VIEW_4.setColumns(new LinkedList<>(VIEW_4_COLUMNS)); DATABASE_2.setViews(new LinkedList<>(List.of(VIEW_4))); DATABASE_2.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_5))); + DATABASE_2_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_2_USER_2_WRITE_ALL_ACCESS_DTO, DATABASE_2_USER_3_READ_ACCESS_DTO))); DATABASE_2_DTO.setTables(new LinkedList<>(List.of(TABLE_5_DTO, TABLE_6_DTO, TABLE_7_DTO))); DATABASE_2_DTO.setViews(new LinkedList<>(List.of(VIEW_4_DTO))); DATABASE_2_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_5_DTO))); + DATABASE_2_PRIVILEGED_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_2_USER_2_WRITE_ALL_ACCESS_DTO, DATABASE_2_USER_3_READ_ACCESS_DTO))); + DATABASE_2_PRIVILEGED_DTO.setTables(new LinkedList<>(List.of(TABLE_5_DTO, TABLE_6_DTO, TABLE_7_DTO))); + DATABASE_2_PRIVILEGED_DTO.setViews(new LinkedList<>(List.of(VIEW_4_DTO))); + DATABASE_2_PRIVILEGED_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_5_DTO))); TABLE_5.setDatabase(DATABASE_2); TABLE_5.setColumns(new LinkedList<>(TABLE_5_COLUMNS)); TABLE_5.setConstraints(TABLE_5_CONSTRAINTS); TABLE_5_DTO.setColumns(new LinkedList<>(TABLE_5_COLUMNS_DTO)); TABLE_5_DTO.setConstraints(TABLE_5_CONSTRAINTS_DTO); - TABLE_5_PRIVILEGED_DTO.setDatabase(DATABASE_2_PRIVILEGED_DTO); TABLE_6.setDatabase(DATABASE_2); TABLE_6.setColumns(new LinkedList<>(TABLE_6_COLUMNS)); TABLE_6.setConstraints(TABLE_6_CONSTRAINTS); @@ -138,13 +128,14 @@ public abstract class AbstractUnitTest extends BaseTest { DATABASE_3_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_6_DTO))); DATABASE_3_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_3_USER_1_WRITE_ALL_ACCESS_DTO))); DATABASE_3_PRIVILEGED_DTO.setAccesses(new LinkedList<>(List.of(DATABASE_3_USER_1_WRITE_ALL_ACCESS_DTO))); + DATABASE_3_PRIVILEGED_DTO.setTables(new LinkedList<>(List.of(TABLE_8_DTO))); + DATABASE_3_PRIVILEGED_DTO.setViews(new LinkedList<>(List.of(VIEW_5_DTO))); + DATABASE_3_PRIVILEGED_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_6_DTO))); TABLE_8.setDatabase(DATABASE_3); TABLE_8.setColumns(new LinkedList<>(TABLE_8_COLUMNS)); TABLE_8.setConstraints(TABLE_8_CONSTRAINTS); TABLE_8_DTO.setColumns(new LinkedList<>(TABLE_8_COLUMNS_DTO)); TABLE_8_DTO.setConstraints(TABLE_8_CONSTRAINTS_DTO); - TABLE_8_PRIVILEGED_DTO.setColumns(new LinkedList<>(TABLE_8_COLUMNS_DTO)); - TABLE_8_PRIVILEGED_DTO.setDatabase(DATABASE_3_PRIVILEGED_DTO); VIEW_5.setDatabase(DATABASE_3); VIEW_5.setColumns(VIEW_5_COLUMNS); VIEW_5_DTO.setColumns(VIEW_5_COLUMNS_DTO); @@ -155,6 +146,8 @@ public abstract class AbstractUnitTest extends BaseTest { DATABASE_4.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_7))); DATABASE_4_DTO.setTables(new LinkedList<>(List.of(TABLE_9_DTO))); DATABASE_4_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_7_DTO))); + DATABASE_4_PRIVILEGED_DTO.setTables(new LinkedList<>(List.of(TABLE_9_DTO))); + DATABASE_4_PRIVILEGED_DTO.setIdentifiers(new LinkedList<>(List.of(IDENTIFIER_7_DTO))); TABLE_9.setDatabase(DATABASE_4); TABLE_9.setColumns(TABLE_9_COLUMNS); TABLE_9.setConstraints(TABLE_9_CONSTRAINTS); diff --git a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java index 7440de878ba3a1c6cceb74f1b36ef54c0f5b8e95..1f4cc4e6691c5108f2fb61e806dc9e488b926f68 100644 --- a/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java +++ b/dbrepo-metadata-service/test/src/main/java/at/tuwien/test/BaseTest.java @@ -6,14 +6,11 @@ import at.tuwien.api.amqp.ExchangeDto; import at.tuwien.api.amqp.GrantVirtualHostPermissionsDto; import at.tuwien.api.amqp.QueueDto; import at.tuwien.api.auth.CreateUserDto; -import at.tuwien.api.auth.LoginRequestDto; -import at.tuwien.api.auth.RefreshTokenRequestDto; import at.tuwien.api.container.ContainerBriefDto; import at.tuwien.api.container.ContainerDto; import at.tuwien.api.container.image.*; import at.tuwien.api.database.*; -import at.tuwien.api.database.query.QueryBriefDto; -import at.tuwien.api.database.query.QueryDto; +import at.tuwien.api.database.query.*; import at.tuwien.api.database.table.*; import at.tuwien.api.database.table.columns.*; import at.tuwien.api.database.table.columns.concepts.*; @@ -66,20 +63,15 @@ import at.tuwien.entities.maintenance.BannerMessageType; import at.tuwien.entities.semantics.Ontology; import at.tuwien.entities.user.User; import at.tuwien.test.utils.ArrayUtils; -import org.apache.commons.io.FileUtils; -import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.InputStreamResource; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; -import java.io.File; -import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; import java.math.BigInteger; -import java.nio.charset.Charset; import java.security.Principal; import java.time.Instant; import java.time.LocalDate; @@ -128,7 +120,7 @@ import static java.time.temporal.ChronoUnit.MINUTES; * <li>Identifier 6 (Title=en, Description=en, Query=3)</li> * </ul> * <p> - * Database 4 (Public Data, Public Schema, User 4) -> Container 2 + * Database 4 (Public Data, Public Schema, User 4) -> Container 4 * <li>Table 9</li> * <li>Identifier 7</li> * <li>Query 7</li> @@ -149,7 +141,7 @@ public abstract class BaseTest { public static final String RABBITMQ_IMAGE = "rabbitmq:3.13.7"; - public static final String KEYCLOAK_IMAGE = "quay.io/keycloak/keycloak:26.0"; + public static final String KEYCLOAK_IMAGE = "quay.io/keycloak/keycloak:26.0.4"; public static final String[] DEFAULT_SEMANTICS_HANDLING = new String[]{"default-semantics-handling", "create-semantic-unit", "execute-semantic-query", "table-semantic-analyse", "create-semantic-concept"}; @@ -279,11 +271,7 @@ public abstract class BaseTest { .scope(TOKEN_ACCESS_SCOPE) .build(); - public static final RefreshTokenRequestDto REFRESH_TOKEN_REQUEST_DTO = RefreshTokenRequestDto.builder() - .refreshToken("ey.yee.skrr") - .build(); - - public static final Long CONCEPT_1_ID = 1L; + public static final UUID CONCEPT_1_ID = UUID.fromString("8cabc011-4bdf-44d4-9d33-b2648e2ddbf1"); public static final String CONCEPT_1_NAME = "precipitation"; public static final String CONCEPT_1_URI = "http://www.wikidata.org/entity/Q25257"; public static final String CONCEPT_1_DESCRIPTION = null; @@ -323,7 +311,7 @@ public abstract class BaseTest { .label(CONCEPT_1_NAME) .build(); - public static final Long CONCEPT_2_ID = 2L; + public static final UUID CONCEPT_2_ID = UUID.fromString("c5cf9914-15c1-4813-af11-eb2a070d59a9"); public static final String CONCEPT_2_NAME = "FAIR data"; public static final String CONCEPT_2_URI = "http://www.wikidata.org/entity/Q29032648"; public static final String CONCEPT_2_DESCRIPTION = "data compliant with the terms of the FAIR Data Principles"; @@ -357,7 +345,7 @@ public abstract class BaseTest { .created(CONCEPT_2_CREATED) .build(); - public static final Long UNIT_1_ID = 1L; + public static final UUID UNIT_1_ID = UUID.fromString("1fee60e4-42f8-4883-85a8-e282fddf6a62"); public static final String UNIT_1_NAME = "millimetre"; public static final String UNIT_1_URI = "http://www.ontology-of-units-of-measure.org/resource/om-2/millimetre"; public static final String UNIT_1_DESCRIPTION = "The millimetre is a unit of length defined as 1.0e-3 metre."; @@ -397,7 +385,7 @@ public abstract class BaseTest { .label(UNIT_1_NAME) .build(); - public static final Long UNIT_2_ID = 2L; + public static final UUID UNIT_2_ID = UUID.fromString("d88591a9-5171-4b12-8381-bcff1cfe7442"); public static final String UNIT_2_NAME = "tonne"; public static final String UNIT_2_URI = "http://www.ontology-of-units-of-measure.org/resource/om-2/tonne"; public static final String UNIT_2_DESCRIPTION = "The tonne is a unit of mass defined as 1000 kilogram."; @@ -446,11 +434,6 @@ public abstract class BaseTest { @SuppressWarnings("java:S2068") public static final String USER_LOCAL_ADMIN_MARIADB_PASSWORD = "*440BA4FD1A87A0999647DB67C0EE258198B247BA"; - public static final LoginRequestDto USER_LOCAL_ADMIN_LOGIN_REQUEST_DTO = LoginRequestDto.builder() - .username(USER_LOCAL_ADMIN_USERNAME) - .password(USER_LOCAL_ADMIN_PASSWORD) - .build(); - public static final UserDetails USER_LOCAL_ADMIN_DETAILS = UserDetailsDto.builder() .id(USER_LOCAL_ADMIN_ID.toString()) .username(USER_LOCAL_ADMIN_USERNAME) @@ -598,11 +581,6 @@ public abstract class BaseTest { public static final Principal USER_1_PRINCIPAL = new UsernamePasswordAuthenticationToken(USER_1_DETAILS, USER_1_PASSWORD, USER_1_DETAILS.getAuthorities()); - public static final LoginRequestDto USER_1_LOGIN_REQUEST_DTO = LoginRequestDto.builder() - .username(USER_1_USERNAME) - .password(USER_1_PASSWORD) - .build(); - public static final UUID USER_2_ID = UUID.fromString("eeb9a51b-4cd8-4039-90bf-e24f17372f7c"); public static final UUID USER_2_KEYCLOAK_ID = UUID.fromString("eeb9a51b-4cd8-4039-90bf-e24f17372f7c"); public static final String USER_2_USERNAME = "junit2"; @@ -909,7 +887,7 @@ public abstract class BaseTest { public static final Principal USER_6_PRINCIPAL = new UsernamePasswordAuthenticationToken(USER_6_DETAILS, USER_6_PASSWORD, USER_6_DETAILS.getAuthorities()); - public static final Long IMAGE_1_ID = 1L; + public static final UUID IMAGE_1_ID = UUID.fromString("e5449ade-acc1-4ba4-8858-e3496cdecd9c"); public static final String IMAGE_1_REGISTRY = "docker.io"; public static final String IMAGE_1_NAME = "mariadb"; public static final String IMAGE_1_VERSION = "11.1.3"; @@ -952,15 +930,11 @@ public abstract class BaseTest { public static final ImageDto IMAGE_1_DTO = ImageDto.builder() .id(IMAGE_1_ID) - .registry(IMAGE_1_REGISTRY) .name(IMAGE_1_NAME) .version(IMAGE_1_VERSION) - .dialect(IMAGE_1_DIALECT) - .jdbcMethod(IMAGE_1_JDBC) - .driverClass(IMAGE_1_DRIVER) - .defaultPort(IMAGE_1_PORT) .isDefault(IMAGE_1_IS_DEFAULT) - .operators(null) + .jdbcMethod(IMAGE_1_JDBC) + .operators(null) /* IMAGE_1_OPERATORS_DTO */ .build(); public static final ImageBriefDto IMAGE_1_BRIEF_DTO = ImageBriefDto.builder() @@ -968,14 +942,18 @@ public abstract class BaseTest { .name(IMAGE_1_NAME) .version(IMAGE_1_VERSION) .isDefault(IMAGE_1_IS_DEFAULT) - .jdbcMethod(IMAGE_1_JDBC) .build(); - public static final Long IMAGE_1_OPERATORS_1_ID = 1L; + public static final UUID IMAGE_1_OPERATORS_1_ID = UUID.fromString("42a56348-38bd-4aba-b0f2-ac813d5d2da1"); public static final String IMAGE_1_OPERATORS_1_DISPLAY_NAME = "XOR"; public static final String IMAGE_1_OPERATORS_1_VALUE = "XOR"; public static final String IMAGE_1_OPERATORS_1_DOCUMENTATION = "https://mariadb.com/kb/en/xor/"; + public static final UUID IMAGE_1_OPERATORS_2_ID = UUID.fromString("42a56348-38bd-4aba-b0f2-ac813d5d2da2"); + public static final String IMAGE_1_OPERATORS_2_DISPLAY_NAME = "="; + public static final String IMAGE_1_OPERATORS_2_VALUE = "="; + public static final String IMAGE_1_OPERATORS_2_DOCUMENTATION = "https://mariadb.com/kb/en/equal/"; + public static final List<Operator> IMAGE_1_OPERATORS = new LinkedList<>(List.of( Operator.builder() .id(IMAGE_1_OPERATORS_1_ID) @@ -983,6 +961,13 @@ public abstract class BaseTest { .displayName(IMAGE_1_OPERATORS_1_DISPLAY_NAME) .value(IMAGE_1_OPERATORS_1_VALUE) .documentation(IMAGE_1_OPERATORS_1_DOCUMENTATION) + .build(), + Operator.builder() + .id(IMAGE_1_OPERATORS_2_ID) + .image(IMAGE_1) + .displayName(IMAGE_1_OPERATORS_2_DISPLAY_NAME) + .value(IMAGE_1_OPERATORS_2_VALUE) + .documentation(IMAGE_1_OPERATORS_2_DOCUMENTATION) .build())); public static final List<OperatorDto> IMAGE_1_OPERATORS_DTO = new LinkedList<>(List.of( @@ -991,9 +976,15 @@ public abstract class BaseTest { .displayName(IMAGE_1_OPERATORS_1_DISPLAY_NAME) .value(IMAGE_1_OPERATORS_1_VALUE) .documentation(IMAGE_1_OPERATORS_1_DOCUMENTATION) + .build(), + OperatorDto.builder() + .id(IMAGE_1_OPERATORS_2_ID) + .displayName(IMAGE_1_OPERATORS_2_DISPLAY_NAME) + .value(IMAGE_1_OPERATORS_2_VALUE) + .documentation(IMAGE_1_OPERATORS_2_DOCUMENTATION) .build())); - public static final Long CONTAINER_1_ID = 1L; + public static final UUID CONTAINER_1_ID = UUID.fromString("7ddb7e87-b965-43a2-9a24-4fa406d998f4"); public static final String CONTAINER_1_NAME = "u01"; public static final String CONTAINER_1_INTERNALNAME = "dbrepo-userdb-u01"; public static final String CONTAINER_1_UI_HOST = "localhost"; @@ -1022,6 +1013,7 @@ public abstract class BaseTest { .uiAdditionalFlags(CONTAINER_1_UI_ADDITIONAL_FLAGS) .privilegedUsername(CONTAINER_1_PRIVILEGED_USERNAME) .privilegedPassword(CONTAINER_1_PRIVILEGED_PASSWORD) + .databases(null) /* DATABASE_1, DATABASE_2, DATABASE_3 */ .build(); public static final ContainerDto CONTAINER_1_DTO = ContainerDto.builder() @@ -1054,7 +1046,7 @@ public abstract class BaseTest { .password(CONTAINER_1_PRIVILEGED_PASSWORD) .build(); - public static final Long CONTAINER_2_ID = 2L; + public static final UUID CONTAINER_2_ID = UUID.fromString("c2ec601e-2bfb-4be8-8891-0cb804a08d4a"); public static final ContainerImage CONTAINER_2_IMAGE = IMAGE_1; public static final ImageDto CONTAINER_2_IMAGE_DTO = IMAGE_1_DTO; public static final String CONTAINER_2_NAME = "u02"; @@ -1110,7 +1102,7 @@ public abstract class BaseTest { .password(CONTAINER_2_PRIVILEGED_PASSWORD) .build(); - public static final Long CONTAINER_3_ID = 3L; + public static final UUID CONTAINER_3_ID = UUID.fromString("1731c7d2-8bd1-4392-85bc-18a3be99e01d"); public static final ContainerImage CONTAINER_3_IMAGE = IMAGE_1; public static final String CONTAINER_3_NAME = "u03"; public static final String CONTAINER_3_INTERNALNAME = "dbrepo-userdb-u03"; @@ -1136,7 +1128,7 @@ public abstract class BaseTest { .privilegedPassword(CONTAINER_3_PRIVILEGED_PASSWORD) .build(); - public static final Long CONTAINER_4_ID = 4L; + public static final UUID CONTAINER_4_ID = UUID.fromString("67aee75c-791c-410b-abbb-175c11ddd252"); public static final ContainerImage CONTAINER_4_IMAGE = IMAGE_1; public static final String CONTAINER_4_NAME = "u04"; public static final String CONTAINER_4_INTERNALNAME = "dbrepo-userdb-u04"; @@ -1159,6 +1151,7 @@ public abstract class BaseTest { .quota(CONTAINER_4_QUOTA) .privilegedUsername(CONTAINER_4_PRIVILEGED_USERNAME) .privilegedPassword(CONTAINER_4_PRIVILEGED_PASSWORD) + .databases(null) /* DATABASE_4 */ .build(); public static final String EXCHANGE_DBREPO_NAME = "dbrepo"; @@ -1177,7 +1170,7 @@ public abstract class BaseTest { .internal(EXCHANGE_DBREPO_INTERNAL) .build(); - public static final Long DATABASE_1_ID = 1L; + public static final UUID DATABASE_1_ID = UUID.fromString("b3bcb5bf-4f88-40e2-9726-9b0d2ee2b425"); public static final String DATABASE_1_NAME = "Weather"; public static final String DATABASE_1_DESCRIPTION = "Weather in Australia"; public static final String DATABASE_1_INTERNALNAME = "weather"; @@ -1204,7 +1197,7 @@ public abstract class BaseTest { .privilegedPassword(CONTAINER_1_PRIVILEGED_PASSWORD) .build(); - public static final Long DATABASE_2_ID = 2L; + public static final UUID DATABASE_2_ID = UUID.fromString("dd9dfee2-9fbd-46b0-92d5-98f0f8866ffe"); public static final String DATABASE_2_NAME = "Zoo"; public static final String DATABASE_2_DESCRIPTION = "Zoo data"; public static final String DATABASE_2_INTERNALNAME = "zoo"; @@ -1222,7 +1215,7 @@ public abstract class BaseTest { .cid(CONTAINER_1_ID) .build(); - public static final Long DATABASE_3_ID = 3L; + public static final UUID DATABASE_3_ID = UUID.fromString("9d8cb9a9-9468-4801-a2e0-2dac8bc67c31"); public static final String DATABASE_3_NAME = "Musicology"; public static final String DATABASE_3_DESCRIPTION = "Musicology data"; public static final String DATABASE_3_INTERNALNAME = "musicology"; @@ -1262,6 +1255,16 @@ public abstract class BaseTest { .lastRetrieved(Instant.now()) .build(); + public static final DatabaseBriefDto DATABASE_3_PRIVILEGED_BRIEF_DTO = DatabaseBriefDto.builder() + .id(DATABASE_3_ID) + .isPublic(DATABASE_3_PUBLIC) + .isSchemaPublic(DATABASE_3_SCHEMA_PUBLIC) + .name(DATABASE_3_NAME) + .internalName(DATABASE_3_INTERNALNAME) + .ownerId(USER_3_ID) + .identifiers(new LinkedList<>()) /* IDENTIFIER_6_DTO */ + .build(); + public static final DatabaseBriefDto DATABASE_3_BRIEF_DTO = DatabaseBriefDto.builder() .id(DATABASE_3_ID) .isPublic(DATABASE_3_PUBLIC) @@ -1278,7 +1281,7 @@ public abstract class BaseTest { .cid(CONTAINER_1_ID) .build(); - public static final Long DATABASE_4_ID = 4L; + public static final UUID DATABASE_4_ID = UUID.fromString("c503d7f3-5952-4d97-b26a-da86bea4c20d"); public static final String DATABASE_4_NAME = "Weather AT"; public static final String DATABASE_4_DESCRIPTION = "Weather data"; public static final Boolean DATABASE_4_PUBLIC = true; @@ -1501,7 +1504,7 @@ public abstract class BaseTest { .build())) .build(); - public static final Long TABLE_1_ID = 1L; + public static final UUID TABLE_1_ID = UUID.fromString("666d0b6b-f017-4f7c-80d8-a47174d8b539"); public static final String TABLE_1_NAME = "Weather AUS"; public static final String TABLE_1_INTERNAL_NAME = "weather_aus"; public static final Boolean TABLE_1_VERSIONED = true; @@ -1510,8 +1513,7 @@ public abstract class BaseTest { public static final Boolean TABLE_1_PROCESSED_CONSTRAINTS = true; public static final String TABLE_1_DESCRIPTION = "Weather in Australia"; public static final String TABLE_1_QUEUE_NAME = TABLE_1_INTERNAL_NAME; - public static final String TABLE_1_ROUTING_KEY = "dbrepo\\." + DATABASE_1_ID + "\\." + TABLE_1_ID; - public static final Long TABLE_1_DATABASE_ID = DATABASE_1_ID; + public static final String TABLE_1_ROUTING_KEY = "dbrepo." + DATABASE_1_ID + "." + TABLE_1_ID; public static final Long TABLE_1_AVG_ROW_LENGTH = 3L; public static final Long TABLE_1_NUM_ROWS = 3L; public static final Long TABLE_1_DATA_LENGTH = 2000L; @@ -1519,29 +1521,6 @@ public abstract class BaseTest { public static final Instant TABLE_1_CREATED = Instant.ofEpochSecond(1677399975L) /* 2023-02-26 08:26:15 (UTC) */; public static final Instant TABLE_1_LAST_MODIFIED = Instant.ofEpochSecond(1677399975L) /* 2023-02-26 08:26:15 (UTC) */; - public static final TableDto TABLE_1_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_1_ID) - .tdbid(DATABASE_1_ID) - .internalName(TABLE_1_INTERNAL_NAME) - .isVersioned(TABLE_1_VERSIONED) - .isPublic(TABLE_1_SCHEMA_PUBLIC) - .description(TABLE_1_DESCRIPTION) - .name(TABLE_1_NAME) - .queueName(TABLE_1_QUEUE_NAME) - .routingKey(TABLE_1_ROUTING_KEY) - .identifiers(new LinkedList<>()) - .columns(new LinkedList<>() /* TABLE_1_COLUMNS_DTO */) - .constraints(null) /* TABLE_1_CONSTRAINTS_DTO */ - .owner(USER_1_BRIEF_DTO) - .isPublic(DATABASE_1_PUBLIC) - .avgRowLength(TABLE_1_AVG_ROW_LENGTH) - .numRows(TABLE_1_NUM_ROWS) - .dataLength(TABLE_1_DATA_LENGTH) - .maxDataLength(TABLE_1_MAX_DATA_LENGTH) - .lastRetrieved(Instant.now()) - .database(null) /* DATABASE_1_PRIVILEGED_DTO */ - .build(); - public static final Table TABLE_1 = Table.builder() .id(TABLE_1_ID) .tdbid(DATABASE_1_ID) @@ -1568,7 +1547,7 @@ public abstract class BaseTest { public static final TableDto TABLE_1_DTO = TableDto.builder() .id(TABLE_1_ID) - .tdbid(DATABASE_1_ID) + .databaseId(DATABASE_1_ID) .internalName(TABLE_1_INTERNAL_NAME) .isVersioned(TABLE_1_VERSIONED) .isPublic(TABLE_1_IS_PUBLIC) @@ -1587,8 +1566,18 @@ public abstract class BaseTest { .maxDataLength(TABLE_1_MAX_DATA_LENGTH) .build(); + public static final UUID COLUMN_1_1_ID = UUID.fromString("377c0a6e-938e-458c-ad2b-bbbd75d46412"); + + public static final UUID COLUMN_1_2_ID = UUID.fromString("dbca4821-3023-479b-a25a-c08eb0ec02ce"); + + public static final UUID COLUMN_1_3_ID = UUID.fromString("8ff0351e-4882-4948-94af-598e4b264b25"); + + public static final UUID COLUMN_1_4_ID = UUID.fromString("9ab256eb-3324-4e76-af3b-e3e2a58ce161"); + + public static final UUID COLUMN_1_5_ID = UUID.fromString("619e9355-51aa-438f-8579-80cec30f35cb"); + public static final List<ColumnDto> TABLE_1_COLUMNS_DTO = List.of(ColumnDto.builder() - .id(1L) + .id(COLUMN_1_1_ID) .tableId(TABLE_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(0) @@ -1600,7 +1589,7 @@ public abstract class BaseTest { .sets(null) .build(), ColumnDto.builder() - .id(2L) + .id(COLUMN_1_2_ID) .tableId(TABLE_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(1) @@ -1612,7 +1601,7 @@ public abstract class BaseTest { .sets(null) .build(), ColumnDto.builder() - .id(3L) + .id(COLUMN_1_3_ID) .tableId(TABLE_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(2) @@ -1625,7 +1614,7 @@ public abstract class BaseTest { .sets(null) .build(), ColumnDto.builder() - .id(4L) + .id(COLUMN_1_4_ID) .tableId(TABLE_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(3) @@ -1639,7 +1628,7 @@ public abstract class BaseTest { .sets(null) .build(), ColumnDto.builder() - .id(5L) + .id(COLUMN_1_5_ID) .tableId(TABLE_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(4) @@ -1693,7 +1682,7 @@ public abstract class BaseTest { }} )); - public static final Long TABLE_2_ID = 2L; + public static final UUID TABLE_2_ID = UUID.fromString("0cc067b6-4e81-4871-b47e-17a38228a574"); public static final String TABLE_2_NAME = "Weather Location"; public static final String TABLE_2_INTERNALNAME = "weather_location"; public static final Boolean TABLE_2_VERSIONED = true; @@ -1702,7 +1691,7 @@ public abstract class BaseTest { public static final Boolean TABLE_2_PROCESSED_CONSTRAINTS = true; public static final String TABLE_2_DESCRIPTION = "Weather location"; public static final String TABLE_2_QUEUE_NAME = TABLE_2_INTERNALNAME; - public static final String TABLE_2_ROUTING_KEY = "dbrepo\\." + DATABASE_1_ID + "\\." + TABLE_2_ID; + public static final String TABLE_2_ROUTING_KEY = "dbrepo." + DATABASE_1_ID + "." + TABLE_2_ID; public static final Instant TABLE_2_CREATED = Instant.ofEpochSecond(1677400007L) /* 2023-02-26 08:26:47 (UTC) */; public static final Instant TABLE_2_LAST_MODIFIED = Instant.ofEpochSecond(1677400007L) /* 2023-02-26 08:26:47 (UTC) */; public static final Long TABLE_2_AVG_ROW_LENGTH = 3L; @@ -1733,32 +1722,9 @@ public abstract class BaseTest { .maxDataLength(TABLE_2_MAX_DATA_LENGTH) .build(); - public static final TableDto TABLE_2_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_2_ID) - .tdbid(DATABASE_1_ID) - .internalName(TABLE_2_INTERNALNAME) - .isVersioned(TABLE_2_VERSIONED) - .isPublic(TABLE_2_IS_PUBLIC) - .isSchemaPublic(TABLE_2_SCHEMA_PUBLIC) - .description(TABLE_2_DESCRIPTION) - .name(TABLE_2_NAME) - .queueName(TABLE_2_QUEUE_NAME) - .routingKey(TABLE_2_ROUTING_KEY) - .identifiers(new LinkedList<>()) - .columns(new LinkedList<>() /* TABLE_2_COLUMNS_DTO */) - .constraints(null) /* TABLE_2_CONSTRAINTS_DTO */ - .owner(USER_2_BRIEF_DTO) - .avgRowLength(TABLE_2_AVG_ROW_LENGTH) - .numRows(TABLE_2_NUM_ROWS) - .dataLength(TABLE_2_DATA_LENGTH) - .maxDataLength(TABLE_2_MAX_DATA_LENGTH) - .lastRetrieved(Instant.now()) - .database(null) /* DATABASE_1_PRIVILEGED_DTO */ - .build(); - public static final TableDto TABLE_2_DTO = TableDto.builder() .id(TABLE_2_ID) - .tdbid(DATABASE_1_ID) + .databaseId(DATABASE_1_ID) .internalName(TABLE_2_INTERNALNAME) .isVersioned(TABLE_2_VERSIONED) .isPublic(TABLE_2_IS_PUBLIC) @@ -1788,7 +1754,7 @@ public abstract class BaseTest { .ownedBy(USER_2_ID) .build(); - public static final Long TABLE_3_ID = 3L; + public static final UUID TABLE_3_ID = UUID.fromString("a94ee518-c235-496b-8613-b0c643bc1b11"); public static final String TABLE_3_NAME = "Sensor"; public static final String TABLE_3_INTERNALNAME = "sensor"; public static final Boolean TABLE_3_VERSIONED = true; @@ -1797,7 +1763,7 @@ public abstract class BaseTest { public static final Boolean TABLE_3_PROCESSED_CONSTRAINTS = true; public static final String TABLE_3_DESCRIPTION = "Some sensor data"; public static final String TABLE_3_QUEUE_NAME = TABLE_3_INTERNALNAME; - public static final String TABLE_3_ROUTING_KEY = "dbrepo\\." + DATABASE_1_ID + "\\." + TABLE_3_ID; + public static final String TABLE_3_ROUTING_KEY = "dbrepo." + DATABASE_1_ID + "." + TABLE_3_ID; public static final Instant TABLE_3_CREATED = Instant.ofEpochSecond(1677400031L) /* 2023-02-26 08:27:11 (UTC) */; public static final Instant TABLE_3_LAST_MODIFIED = Instant.ofEpochSecond(1677400031L) /* 2023-02-26 08:27:11 (UTC) */; public static final Long TABLE_3_AVG_ROW_LENGTH = 6L; @@ -1830,7 +1796,7 @@ public abstract class BaseTest { public static final TableDto TABLE_3_DTO = TableDto.builder() .id(TABLE_3_ID) - .tdbid(DATABASE_1_ID) + .databaseId(DATABASE_1_ID) .internalName(TABLE_3_INTERNALNAME) .isVersioned(TABLE_3_VERSIONED) .isPublic(TABLE_3_IS_PUBLIC) @@ -1892,7 +1858,7 @@ public abstract class BaseTest { .constraints(TABLE_3_CONSTRAINTS_INVALID_CREATE_DTO) .build(); - public static final Long TABLE_5_ID = 5L; + public static final UUID TABLE_5_ID = UUID.fromString("91306cbd-c51f-47d3-8722-debfdbd8a77e"); public static final String TABLE_5_NAME = "zoo"; public static final String TABLE_5_INTERNALNAME = "zoo"; public static final Boolean TABLE_5_VERSIONED = true; @@ -1901,7 +1867,7 @@ public abstract class BaseTest { public static final Boolean TABLE_5_PROCESSED_CONSTRAINTS = true; public static final String TABLE_5_DESCRIPTION = "Some Kaggle dataset"; public static final String TABLE_5_QUEUE_NAME = TABLE_5_INTERNALNAME; - public static final String TABLE_5_ROUTING_KEY = "dbrepo\\." + DATABASE_2_ID + "\\." + TABLE_5_ID; + public static final String TABLE_5_ROUTING_KEY = "dbrepo." + DATABASE_2_ID + "." + TABLE_5_ID; public static final Instant TABLE_5_CREATED = Instant.ofEpochSecond(1677400067L) /* 2023-02-26 08:27:47 (UTC) */; public static final Instant TABLE_5_LAST_MODIFIED = Instant.ofEpochSecond(1677400067L) /* 2023-02-26 08:27:47 (UTC) */; public static final Long TABLE_5_AVG_ROW_LENGTH = 1080L; @@ -1929,7 +1895,7 @@ public abstract class BaseTest { public static final TableDto TABLE_5_DTO = TableDto.builder() .id(TABLE_5_ID) - .tdbid(DATABASE_2_ID) + .databaseId(DATABASE_2_ID) .internalName(TABLE_5_INTERNALNAME) .isVersioned(TABLE_5_VERSIONED) .isPublic(TABLE_5_IS_PUBLIC) @@ -1943,29 +1909,6 @@ public abstract class BaseTest { .owner(USER_1_BRIEF_DTO) .build(); - public static final TableDto TABLE_5_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_5_ID) - .tdbid(DATABASE_2_ID) - .internalName(TABLE_5_INTERNALNAME) - .isVersioned(TABLE_5_VERSIONED) - .isPublic(TABLE_5_IS_PUBLIC) - .isSchemaPublic(TABLE_5_SCHEMA_PUBLIC) - .description(TABLE_5_DESCRIPTION) - .name(TABLE_5_NAME) - .queueName(TABLE_5_QUEUE_NAME) - .routingKey(TABLE_5_ROUTING_KEY) - .identifiers(new LinkedList<>()) - .columns(new LinkedList<>() /* TABLE_5_COLUMNS_DTO */) - .constraints(null) /* TABLE_5_CONSTRAINTS_DTO */ - .owner(USER_5_BRIEF_DTO) - .isPublic(DATABASE_2_PUBLIC) - .avgRowLength(TABLE_5_AVG_ROW_LENGTH) - .numRows(TABLE_5_NUM_ROWS) - .dataLength(TABLE_5_DATA_LENGTH) - .maxDataLength(TABLE_5_MAX_DATA_LENGTH) - .lastRetrieved(Instant.now()) - .build(); - public static final TableBriefDto TABLE_5_BRIEF_DTO = TableBriefDto.builder() .id(TABLE_5_ID) .databaseId(DATABASE_2_ID) @@ -1978,7 +1921,7 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final Long TABLE_6_ID = 6L; + public static final UUID TABLE_6_ID = UUID.fromString("ae84d169-d36c-4f5a-a390-153d090f9574"); public static final String TABLE_6_NAME = "names"; public static final String TABLE_6_INTERNALNAME = "names"; public static final Boolean TABLE_6_VERSIONED = true; @@ -1987,7 +1930,7 @@ public abstract class BaseTest { public static final Boolean TABLE_6_PROCESSED_CONSTRAINTS = true; public static final String TABLE_6_DESCRIPTION = "Some names dataset"; public static final String TABLE_6_QUEUE_NAME = TABLE_6_INTERNALNAME; - public static final String TABLE_6_ROUTING_KEY = "dbrepo\\." + DATABASE_2_ID + "\\." + TABLE_6_ID; + public static final String TABLE_6_ROUTING_KEY = "dbrepo." + DATABASE_2_ID + "." + TABLE_6_ID; public static final Instant TABLE_6_CREATED = Instant.ofEpochSecond(1677400117L) /* 2023-02-26 08:28:37 (UTC) */; public static final Instant TABLE_6_LAST_MODIFIED = Instant.ofEpochSecond(1677400117L) /* 2023-02-26 08:28:37 (UTC) */; @@ -2012,7 +1955,7 @@ public abstract class BaseTest { public static final TableDto TABLE_6_DTO = TableDto.builder() .id(TABLE_6_ID) - .tdbid(DATABASE_2_ID) + .databaseId(DATABASE_2_ID) .internalName(TABLE_6_INTERNALNAME) .isVersioned(TABLE_6_VERSIONED) .isPublic(TABLE_6_IS_PUBLIC) @@ -2038,7 +1981,7 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final Long TABLE_7_ID = 7L; + public static final UUID TABLE_7_ID = UUID.fromString("e5d10200-3e4f-45f4-9f36-ff3ca39c6c29"); public static final String TABLE_7_NAME = "likes"; public static final String TABLE_7_INTERNAL_NAME = "likes"; public static final Boolean TABLE_7_VERSIONED = true; @@ -2047,7 +1990,7 @@ public abstract class BaseTest { public static final Boolean TABLE_7_PROCESSED_CONSTRAINTS = true; public static final String TABLE_7_DESCRIPTION = "Some likes dataset"; public static final String TABLE_7_QUEUE_NAME = TABLE_7_INTERNAL_NAME; - public static final String TABLE_7_ROUTING_KEY = "dbrepo\\." + DATABASE_2_ID + "\\." + TABLE_7_ID; + public static final String TABLE_7_ROUTING_KEY = "dbrepo." + DATABASE_2_ID + "." + TABLE_7_ID; public static final Instant TABLE_7_CREATED = Instant.ofEpochSecond(1677400147L) /* 2023-02-26 08:29:07 (UTC) */; public static final Instant TABLE_7_LAST_MODIFIED = Instant.ofEpochSecond(1677400147L) /* 2023-02-26 08:29:07 (UTC) */; @@ -2072,7 +2015,7 @@ public abstract class BaseTest { public static final TableDto TABLE_7_DTO = TableDto.builder() .id(TABLE_7_ID) - .tdbid(DATABASE_2_ID) + .databaseId(DATABASE_2_ID) .internalName(TABLE_7_INTERNAL_NAME) .isVersioned(TABLE_7_VERSIONED) .isPublic(TABLE_7_IS_PUBLIC) @@ -2098,7 +2041,7 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final Long TABLE_4_ID = 4L; + public static final UUID TABLE_4_ID = UUID.fromString("6c87cbcf-5043-404f-9bf1-b09ddbac25a2"); public static final String TABLE_4_NAME = "Sensor 2"; public static final String TABLE_4_INTERNALNAME = "sensor_2"; public static final Boolean TABLE_4_VERSIONED = true; @@ -2106,7 +2049,7 @@ public abstract class BaseTest { public static final Boolean TABLE_4_SCHEMA_PUBLIC = false; public static final String TABLE_4_DESCRIPTION = "Hello sensor"; public static final String TABLE_4_QUEUE_NAME = TABLE_4_INTERNALNAME; - public static final String TABLE_4_ROUTING_KEY = "dbrepo\\." + DATABASE_1_ID + "\\." + TABLE_4_ID; + public static final String TABLE_4_ROUTING_KEY = "dbrepo." + DATABASE_1_ID + "." + TABLE_4_ID; public static final Instant TABLE_4_CREATED = Instant.ofEpochSecond(1677400175L) /* 2023-02-26 08:29:35 (UTC) */; public static final Instant TABLE_4_LAST_MODIFIED = Instant.ofEpochSecond(1677400175L) /* 2023-02-26 08:29:35 (UTC) */; public static final Long TABLE_4_AVG_ROW_LENGTH = 0L; @@ -2139,33 +2082,12 @@ public abstract class BaseTest { public static final TableDto TABLE_4_DTO = TableDto.builder() .id(TABLE_4_ID) - .tdbid(DATABASE_1_ID) - .internalName(TABLE_4_INTERNALNAME) - .description(TABLE_4_DESCRIPTION) - .name(TABLE_4_NAME) - .queueName(TABLE_4_QUEUE_NAME) - .routingKey(TABLE_4_ROUTING_KEY) - .columns(new LinkedList<>()) /* TABLE_4_COLUMNS_DTO */ - .constraints(null) /* TABLE_4_CONSTRAINTS_DTO */ - .isVersioned(TABLE_4_VERSIONED) - .isPublic(TABLE_4_IS_PUBLIC) - .isSchemaPublic(TABLE_4_SCHEMA_PUBLIC) - .owner(USER_1_BRIEF_DTO) - .avgRowLength(TABLE_4_AVG_ROW_LENGTH) - .numRows(TABLE_4_NUM_ROWS) - .dataLength(TABLE_4_DATA_LENGTH) - .maxDataLength(TABLE_4_MAX_DATA_LENGTH) - .build(); - - public static final TableDto TABLE_4_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_4_ID) - .tdbid(DATABASE_1_ID) + .databaseId(DATABASE_1_ID) .internalName(TABLE_4_INTERNALNAME) .description(TABLE_4_DESCRIPTION) .name(TABLE_4_NAME) .queueName(TABLE_4_QUEUE_NAME) .routingKey(TABLE_4_ROUTING_KEY) - .database(null) /* DATABASE_1_DTO */ .columns(new LinkedList<>()) /* TABLE_4_COLUMNS_DTO */ .constraints(null) /* TABLE_4_CONSTRAINTS_DTO */ .isVersioned(TABLE_4_VERSIONED) @@ -2176,7 +2098,6 @@ public abstract class BaseTest { .numRows(TABLE_4_NUM_ROWS) .dataLength(TABLE_4_DATA_LENGTH) .maxDataLength(TABLE_4_MAX_DATA_LENGTH) - .lastRetrieved(Instant.now()) .build(); public static final TableBriefDto TABLE_4_BRIEF_DTO = TableBriefDto.builder() @@ -2192,15 +2113,15 @@ public abstract class BaseTest { .build(); public static final ColumnBriefDto TABLE_4_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() - .id(44L) + .id(UUID.fromString("360f02be-6dfb-48ea-9d1e-1da488b0e324")) .name("Timestamp") .internalName("timestamp") .columnType(ColumnTypeDto.TIMESTAMP) .build(); - public static final Long COLUMN_4_1_ID = 44L; + public static final UUID COLUMN_4_1_ID = UUID.fromString("c8ec8a56-dea1-4316-895f-56e6d289cbf7"); - public static final Long COLUMN_4_2_ID = 45L; + public static final UUID COLUMN_4_2_ID = UUID.fromString("d06956ae-aabd-474f-a47d-47af1ba043d1"); public static final List<TableColumn> TABLE_4_COLUMNS = List.of(TableColumn.builder() .id(COLUMN_4_1_ID) @@ -2274,8 +2195,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build()); - public static final Long TABLE_8_ID = 8L; - public static final Long TABLE_8_DATABASE_ID = DATABASE_3_ID; + public static final UUID TABLE_8_ID = UUID.fromString("2e039d0d-3257-4083-8b32-76d7cfa1f7fd"); public static final String TABLE_8_NAME = "location"; public static final String TABLE_8_INTERNAL_NAME = "mfcc"; public static final Boolean TABLE_8_VERSIONED = true; @@ -2283,13 +2203,13 @@ public abstract class BaseTest { public static final Boolean TABLE_8_SCHEMA_PUBLIC = false; public static final String TABLE_8_DESCRIPTION = "Hello mfcc"; public static final String TABLE_8_QUEUE_NAME = TABLE_8_INTERNAL_NAME; - public static final String TABLE_8_ROUTING_KEY = "dbrepo\\." + DATABASE_3_ID + "\\." + TABLE_8_ID; + public static final String TABLE_8_ROUTING_KEY = "dbrepo." + DATABASE_3_ID + "." + TABLE_8_ID; public static final Instant TABLE_8_CREATED = Instant.ofEpochSecond(1688400185L) /* 2023-02-26 08:29:35 (UTC) */; public static final Instant TABLE_8_LAST_MODIFIED = Instant.ofEpochSecond(1688400185L) /* 2023-02-26 08:29:35 (UTC) */; public static final Table TABLE_8 = Table.builder() .id(TABLE_8_ID) - .tdbid(TABLE_8_DATABASE_ID) + .tdbid(DATABASE_3_ID) .internalName(TABLE_8_INTERNAL_NAME) .description(TABLE_8_DESCRIPTION) .isVersioned(TABLE_8_VERSIONED) @@ -2308,7 +2228,7 @@ public abstract class BaseTest { public static final TableDto TABLE_8_DTO = TableDto.builder() .id(TABLE_8_ID) - .tdbid(TABLE_8_DATABASE_ID) + .databaseId(DATABASE_3_ID) .internalName(TABLE_8_INTERNAL_NAME) .description(TABLE_8_DESCRIPTION) .isVersioned(TABLE_8_VERSIONED) @@ -2322,7 +2242,7 @@ public abstract class BaseTest { .build(); public static final TableUpdateDto TABLE_8_UPDATE_DTO = TableUpdateDto.builder() - .description(TABLE_8_DESCRIPTION) + .description(null) .isPublic(true) .isSchemaPublic(true) .build(); @@ -2339,39 +2259,22 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final TableDto TABLE_8_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_8_ID) - .tdbid(TABLE_8_DATABASE_ID) - .internalName(TABLE_8_INTERNAL_NAME) - .description(TABLE_8_DESCRIPTION) - .isVersioned(TABLE_8_VERSIONED) - .isPublic(TABLE_8_IS_PUBLIC) - .isSchemaPublic(TABLE_8_SCHEMA_PUBLIC) - .name(TABLE_8_NAME) - .queueName(TABLE_8_QUEUE_NAME) - .columns(new LinkedList<>()) /* TABLE_8_COLUMNS_DTO */ - .owner(USER_1_BRIEF_DTO) - .isPublic(DATABASE_3_PUBLIC) - .lastRetrieved(Instant.now()) - .build(); - - public static final Long TABLE_9_ID = 9L; - public static final Long TABLE_9_DATABASE_ID = DATABASE_4_ID; - public static final String TABLE_9_NAME = "mfcc"; - public static final String TABLE_9_INTERNAL_NAME = "mfcc"; + public static final UUID TABLE_9_ID = UUID.fromString("9314294f-04fc-4354-8b1f-2a8aeb566453"); + public static final String TABLE_9_NAME = "Weather Location"; + public static final String TABLE_9_INTERNAL_NAME = "weather_location"; public static final Boolean TABLE_9_VERSIONED = true; public static final Boolean TABLE_9_IS_PUBLIC = false; public static final Boolean TABLE_9_SCHEMA_PUBLIC = true; public static final Boolean TABLE_9_PROCESSED_CONSTRAINTS = true; - public static final String TABLE_9_DESCRIPTION = "Hello mfcc"; + public static final String TABLE_9_DESCRIPTION = "Location"; public static final String TABLE_9_QUEUE_NAME = TABLE_9_INTERNAL_NAME; - public static final String TABLE_9_ROUTING_KEY = "dbrepo\\." + DATABASE_3_ID + "\\." + TABLE_9_ID; + public static final String TABLE_9_ROUTING_KEY = "dbrepo." + DATABASE_4_ID + "." + TABLE_9_ID; public static final Instant TABLE_9_CREATED = Instant.ofEpochSecond(1688400185L) /* 2023-02-26 08:29:35 (UTC) */; public static final Instant TABLE_9_LAST_MODIFIED = Instant.ofEpochSecond(1688400185L) /* 2023-02-26 08:29:35 (UTC) */; public static final Table TABLE_9 = Table.builder() .id(TABLE_9_ID) - .tdbid(TABLE_9_DATABASE_ID) + .tdbid(DATABASE_4_ID) .internalName(TABLE_9_INTERNAL_NAME) .description(TABLE_9_DESCRIPTION) .isVersioned(TABLE_9_VERSIONED) @@ -2390,7 +2293,7 @@ public abstract class BaseTest { public static final TableDto TABLE_9_DTO = TableDto.builder() .id(TABLE_9_ID) - .tdbid(TABLE_9_DATABASE_ID) + .databaseId(DATABASE_4_ID) .internalName(TABLE_9_INTERNAL_NAME) .description(TABLE_9_DESCRIPTION) .isVersioned(TABLE_9_VERSIONED) @@ -2415,23 +2318,7 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final TableDto TABLE_9_PRIVILEGED_DTO = TableDto.builder() - .id(TABLE_9_ID) - .tdbid(TABLE_9_DATABASE_ID) - .internalName(TABLE_9_INTERNAL_NAME) - .description(TABLE_9_DESCRIPTION) - .isVersioned(TABLE_9_VERSIONED) - .isPublic(TABLE_9_IS_PUBLIC) - .isSchemaPublic(TABLE_9_SCHEMA_PUBLIC) - .name(TABLE_9_NAME) - .queueName(TABLE_9_QUEUE_NAME) - .columns(new LinkedList<>()) /* TABLE_9_COLUMNS_DTO */ - .owner(USER_1_BRIEF_DTO) - .isPublic(DATABASE_3_PUBLIC) - .lastRetrieved(Instant.now()) - .build(); - - public static final Long COLUMN_9_1_ID = 78L; + public static final UUID COLUMN_9_1_ID = UUID.fromString("e03c7578-2d1a-4599-9b11-7174f40efc0a"); public static final String COLUMN_9_1_NAME = "location"; public static final String COLUMN_9_1_INTERNAL_NAME = "location"; @@ -2442,9 +2329,9 @@ public abstract class BaseTest { .columnType(ColumnTypeDto.BIGINT) .build(); - public static final Long COLUMN_9_2_ID = 79L; + public static final UUID COLUMN_9_2_ID = UUID.fromString("03c07223-17e1-4af5-b1ae-ef9ab434fe2d"); - public static final Long COLUMN_9_3_ID = 80L; + public static final UUID COLUMN_9_3_ID = UUID.fromString("ee6590db-923b-4234-beb8-3120da055cf6"); public static final List<TableColumn> TABLE_9_COLUMNS = List.of(TableColumn.builder() .id(COLUMN_9_1_ID) @@ -2528,7 +2415,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_9) .column(TABLE_9_COLUMNS.get(0)) - .id(9L) + .id(COLUMN_9_1_ID) .build()))) .build(); @@ -2539,10 +2426,58 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_9_BRIEF_DTO) .column(TABLE_9_COLUMNS_BRIEF_0_DTO) - .id(9L) + .id(COLUMN_9_1_ID) + .build()))) + .build(); + + public static final UUID QUERY_9_ID = UUID.fromString("df34f0b9-b64c-406c-9109-7a031f4a7f27"); + public static final String QUERY_9_STATEMENT = "SELECT `lat`, `lng` FROM `mfcc` WHERE `location` = 'Fuji'"; + public static final String QUERY_9_QUERY_HASH = "dfcdec827b2ea74d89415f8d1ce39354f59ef304444ba4e12e4f3d9d3f35abe3"; + public static final String QUERY_9_RESULT_HASH = "f0aba070a1fd29e96230d12d7c0b4d08b89820b3cc2dda0575680492010016e7"; + public static final Instant QUERY_9_CREATED = Instant.now().minus(5, MINUTES); + public static final Instant QUERY_9_EXECUTION = Instant.now().minus(1, MINUTES); + public static final Instant QUERY_9_LAST_MODIFIED = Instant.ofEpochSecond(1551588555L); + public static final Long QUERY_9_RESULT_NUMBER = 6L; + public static final Boolean QUERY_9_PERSISTED = true; + + public static final QueryDto QUERY_9_DTO = QueryDto.builder() + .id(QUERY_9_ID) + .databaseId(DATABASE_3_ID) + .query(QUERY_9_STATEMENT) + .queryNormalized(QUERY_9_STATEMENT) + .resultNumber(QUERY_9_RESULT_NUMBER) + .resultHash(QUERY_9_RESULT_HASH) + .queryHash(QUERY_9_QUERY_HASH) + .execution(QUERY_9_EXECUTION) + .isPersisted(QUERY_9_PERSISTED) + .owner(USER_1_BRIEF_DTO) + .build(); + + public static final SubsetDto QUERY_9_SUBSET_DTO = SubsetDto.builder() + .tableId(TABLE_9_ID) + .columns(new LinkedList<>(List.of(COLUMN_9_2_ID, COLUMN_9_3_ID))) + .filter(new LinkedList<>(List.of(FilterDto.builder() + .columnId(COLUMN_9_1_ID) + .operatorId(IMAGE_1_OPERATORS_2_ID) + .value("Fuji") + .type(FilterTypeDto.WHERE) .build()))) .build(); + public static final ViewDto QUERY_9_VIEW_DTO = ViewDto.builder() + .query(QUERY_9_STATEMENT) + .queryHash(QUERY_9_QUERY_HASH) + .owner(USER_1_BRIEF_DTO) + .columns(new LinkedList<>(List.of(ViewColumnDto.builder() + .name("lat") + .internalName("lat") + .build(), + ViewColumnDto.builder() + .name("lng") + .internalName("lng") + .build()))) + .build(); + public static final String QUEUE_NAME = "dbrepo"; public static final String QUEUE_VHOST = "dbrepo"; public static final Boolean QUEUE_AUTO_DELETE = false; @@ -2559,7 +2494,7 @@ public abstract class BaseTest { .type(QUEUE_TYPE) .build(); - public static final Long ONTOLOGY_1_ID = 1L; + public static final UUID ONTOLOGY_1_ID = UUID.fromString("dc195d01-0a45-4583-aa83-fd270b874353"); public static final String ONTOLOGY_1_PREFIX = "om2"; public static final String ONTOLOGY_1_NEW_PREFIX = "om-2"; public static final String ONTOLOGY_1_URI = "http://www.ontology-of-units-of-measure.org/resource/om-2/"; @@ -2611,7 +2546,7 @@ public abstract class BaseTest { .sparqlEndpoint(ONTOLOGY_1_SPARQL_ENDPOINT) .build(); - public static final Long ONTOLOGY_2_ID = 2L; + public static final UUID ONTOLOGY_2_ID = UUID.fromString("41d902a1-f9f8-4d51-ad64-618b72acf5ed"); public static final String ONTOLOGY_2_PREFIX = "wd"; public static final String ONTOLOGY_2_URI = "http://www.wikidata.org/"; public static final String ONTOLOGY_2_SPARQL_ENDPOINT = "https://query.wikidata.org/sparql"; @@ -2630,7 +2565,7 @@ public abstract class BaseTest { .sparqlEndpoint(ONTOLOGY_2_SPARQL_ENDPOINT) .build(); - public static final Long ONTOLOGY_3_ID = 3L; + public static final UUID ONTOLOGY_3_ID = UUID.fromString("5b41390b-d2d2-45c6-8038-1258c4b2725f"); public static final String ONTOLOGY_3_PREFIX = "rdfs"; public static final String ONTOLOGY_3_URI = "http://www.w3.org/2000/01/rdf-schema#"; public static final String ONTOLOGY_3_SPARQL_ENDPOINT = null; @@ -2649,7 +2584,7 @@ public abstract class BaseTest { .sparqlEndpoint(ONTOLOGY_3_SPARQL_ENDPOINT) .build(); - public static final Long ONTOLOGY_4_ID = 4L; + public static final UUID ONTOLOGY_4_ID = UUID.fromString("d6992475-9b71-4a4a-a6eb-bc1fe6a34443"); public static final String ONTOLOGY_4_PREFIX = "schema"; public static final String ONTOLOGY_4_URI = "http://schema.org/"; public static final String ONTOLOGY_4_SPARQL_ENDPOINT = null; @@ -2668,7 +2603,7 @@ public abstract class BaseTest { .sparqlEndpoint(ONTOLOGY_4_SPARQL_ENDPOINT) .build(); - public static final Long ONTOLOGY_5_ID = 5L; + public static final UUID ONTOLOGY_5_ID = UUID.fromString("f95d1330-762e-4f5a-875a-3c64da5808a1"); public static final String ONTOLOGY_5_PREFIX = "db"; public static final String ONTOLOGY_5_URI = "http://dbpedia.org"; public static final String ONTOLOGY_5_SPARQL_ENDPOINT = "http://dbpedia.org/sparql"; @@ -2687,7 +2622,7 @@ public abstract class BaseTest { .sparqlEndpoint(ONTOLOGY_5_SPARQL_ENDPOINT) .build(); - public static final Long COLUMN_8_1_ID = 75L; + public static final UUID COLUMN_8_1_ID = UUID.fromString("af362ac6-5dbb-4ede-83ea-5d94b39641c8"); public static final Integer COLUMN_8_1_ORDINALPOS = 0; public static final String COLUMN_8_1_NAME = "ID"; public static final String COLUMN_8_1_INTERNAL_NAME = "id"; @@ -2696,7 +2631,7 @@ public abstract class BaseTest { public static final Boolean COLUMN_8_1_NULL = false; public static final Boolean COLUMN_8_1_AUTO_GENERATED = true; - public static final Long COLUMN_8_2_ID = 76L; + public static final UUID COLUMN_8_2_ID = UUID.fromString("7ada597b-0766-4612-9ace-67eeee94e2da"); public static final Integer COLUMN_8_2_ORDINALPOS = 1; public static final String COLUMN_8_2_NAME = "Value"; public static final String COLUMN_8_2_INTERNAL_NAME = "value"; @@ -2707,7 +2642,7 @@ public abstract class BaseTest { public static final Boolean COLUMN_8_2_NULL = false; public static final Boolean COLUMN_8_2_AUTO_GENERATED = false; - public static final Long COLUMN_8_3_ID = 77L; + public static final UUID COLUMN_8_3_ID = UUID.fromString("8bcd9ef8-f7b8-4730-acc1-a3d43ba69a56"); public static final Integer COLUMN_8_3_ORDINALPOS = 2; public static final String COLUMN_8_3_NAME = "raw"; public static final String COLUMN_8_3_INTERNAL_NAME = "raw"; @@ -2826,11 +2761,9 @@ public abstract class BaseTest { }}) .build(); - public static final Long QUERY_1_ID = 1L; + public static final UUID QUERY_1_ID = UUID.fromString("60494137-f000-459e-acd3-4fcadbdf14ca"); public static final String QUERY_1_STATEMENT = "SELECT `id`, `date`, `location`, `mintemp`, `rainfall` FROM `weather_aus` ORDER BY id ASC"; public static final String QUERY_1_DOI = null; - public static final Long QUERY_1_CONTAINER_ID = CONTAINER_1_ID; - public static final Long QUERY_1_DATABASE_ID = DATABASE_1_ID; public static final Long QUERY_1_RESULT_NUMBER = 2L; public static final String QUERY_1_QUERY_HASH = "a3b8ac39e38167d14cf3a9c20a69e4b6954d049525390b973a2c23064953a992"; public static final String QUERY_1_RESULT_HASH = "8358c8ade4849d2094ab5bb29127afdae57e6bb5acb1db7af603813d406c467a"; @@ -2838,20 +2771,16 @@ public abstract class BaseTest { public static final Instant QUERY_1_EXECUTION = Instant.now(); public static final Boolean QUERY_1_PERSISTED = true; - public static final QueryDto QUERY_1_DTO = QueryDto.builder() - .id(QUERY_1_ID) - .databaseId(QUERY_1_DATABASE_ID) - .query(QUERY_1_STATEMENT) - .queryHash(QUERY_1_QUERY_HASH) - .resultHash(QUERY_1_RESULT_HASH) - .execution(QUERY_1_EXECUTION) - .owner(USER_1_BRIEF_DTO) - .isPersisted(QUERY_1_PERSISTED) - .resultNumber(3L) + public static final SubsetDto QUERY_1_SUBSET_DTO = SubsetDto.builder() + .tableId(TABLE_1_ID) + .columns(new LinkedList<UUID>(List.of(COLUMN_1_1_ID, COLUMN_1_2_ID, COLUMN_1_3_ID, COLUMN_1_4_ID, COLUMN_1_5_ID))) + .order(new LinkedList<OrderDto>(List.of(OrderDto.builder() + .columnId(COLUMN_1_1_ID) + .direction(OrderTypeDto.ASC) + .build()))) .build(); public static final ViewDto QUERY_1_VIEW_DTO = ViewDto.builder() - .vdbid(QUERY_1_DATABASE_ID) .query(QUERY_1_STATEMENT) .queryHash(QUERY_1_QUERY_HASH) .owner(USER_1_BRIEF_DTO) @@ -2879,7 +2808,7 @@ public abstract class BaseTest { public static final QueryBriefDto QUERY_1_BRIEF_DTO = QueryBriefDto.builder() .id(QUERY_1_ID) - .databaseId(QUERY_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .query(QUERY_1_STATEMENT) .queryHash(QUERY_1_QUERY_HASH) .resultHash(QUERY_1_RESULT_HASH) @@ -2889,7 +2818,7 @@ public abstract class BaseTest { .resultNumber(3L) .build(); - public static final Long QUERY_2_ID = 2L; + public static final UUID QUERY_2_ID = UUID.fromString("4e0ac92a-7cb3-4222-9b85-0498c73e0afd"); public static final String QUERY_2_STATEMENT = "SELECT `location` FROM `weather_aus`"; public static final String QUERY_2_QUERY_HASH = "a2d2dd94ebc7653bb5a3b55dd8ed5e91d3d13c225c6855a1eb4eb7ca14c36ced"; public static final Long QUERY_2_RESULT_NUMBER = 2L; @@ -2899,25 +2828,9 @@ public abstract class BaseTest { public static final Instant QUERY_2_LAST_MODIFIED = Instant.ofEpochSecond(1541588352L); public static final Boolean QUERY_2_PERSISTED = false; - public static final QueryDto QUERY_2_DTO = QueryDto.builder() - .id(QUERY_2_ID) - .databaseId(DATABASE_2_ID) - .query(QUERY_2_STATEMENT) - .queryNormalized(QUERY_2_STATEMENT) - .resultNumber(QUERY_2_RESULT_NUMBER) - .resultHash(QUERY_2_RESULT_HASH) - .owner(USER_1_BRIEF_DTO) - .queryHash(QUERY_2_QUERY_HASH) - .execution(QUERY_2_EXECUTION) - .isPersisted(QUERY_2_PERSISTED) - .resultNumber(3L) - .build(); - - public static final Long QUERY_3_ID = 3L; + public static final UUID QUERY_3_ID = UUID.fromString("a9849020-45a7-40a8-9a19-d4ae2b28dd46"); public static final String QUERY_3_STATEMENT = "SELECT `location`, `mintemp` FROM `weather_aus` WHERE `mintemp` > 10"; public static final String QUERY_3_QUERY_HASH = "a3d3dd94ebc7653bb5a3b55dd8ed5e91d3d13c335c6855a1eb4eb7ca14c36ced"; - public static final Long QUERY_3_CONTAINER_ID = CONTAINER_1_ID; - public static final Long QUERY_3_DATABASE_ID = DATABASE_1_ID; public static final String QUERY_3_RESULT_HASH = "ff3f7cbe1b96d396957f6e39e55b8b1b577fa3d305d4795af99594cfd30cb80d"; public static final Instant QUERY_3_CREATED = Instant.now().minus(3, MINUTES); public static final Instant QUERY_3_EXECUTION = Instant.now().minus(1, MINUTES); @@ -2925,21 +2838,7 @@ public abstract class BaseTest { public static final Long QUERY_3_RESULT_NUMBER = 2L; public static final Boolean QUERY_3_PERSISTED = true; - public static final QueryDto QUERY_3_DTO = QueryDto.builder() - .id(QUERY_3_ID) - .databaseId(QUERY_3_DATABASE_ID) - .query(QUERY_3_STATEMENT) - .queryNormalized(QUERY_3_STATEMENT) - .resultNumber(QUERY_3_RESULT_NUMBER) - .resultHash(QUERY_3_RESULT_HASH) - .owner(USER_1_BRIEF_DTO) - .queryHash(QUERY_3_QUERY_HASH) - .execution(QUERY_3_EXECUTION) - .isPersisted(QUERY_3_PERSISTED) - .resultNumber(2L) - .build(); - - public static final Long QUERY_7_ID = 7L; + public static final UUID QUERY_7_ID = UUID.fromString("fe73a325-30a0-444c-b74f-23ce1533e55f"); public static final String QUERY_7_STATEMENT = "SELECT id, date, a.location, lat, lng FROM weather_aus a JOIN weather_location l on a.location = l.location WHERE date = '2008-12-01'"; public static final String QUERY_7_QUERY_HASH = "df7da3801dfb5c191ff6711d79ce6455f3c09ec8323ce1ff7208ab85387263f5"; public static final String QUERY_7_RESULT_HASH = "ff4f7cbe1b96d496957f6e49e55b8b1b577fa4d405d4795af99594cfd40cb80d"; @@ -2950,25 +2849,9 @@ public abstract class BaseTest { public static final Long QUERY_7_RESULT_ID = 4L; public static final Boolean QUERY_7_PERSISTED = false; - public static final QueryDto QUERY_7_DTO = QueryDto.builder() - .id(QUERY_7_ID) - .databaseId(DATABASE_4_ID) - .query(QUERY_7_STATEMENT) - .queryNormalized(QUERY_7_STATEMENT) - .resultNumber(QUERY_7_RESULT_NUMBER) - .resultHash(QUERY_7_RESULT_HASH) - .owner(USER_1_BRIEF_DTO) - .queryHash(QUERY_7_QUERY_HASH) - .execution(QUERY_7_EXECUTION) - .isPersisted(QUERY_7_PERSISTED) - .resultNumber(2L) - .build(); - - public static final Long QUERY_4_ID = 4L; + public static final UUID QUERY_4_ID = UUID.fromString("18a98197-51ff-4011-9f40-914a11675a6d"); public static final String QUERY_4_STATEMENT = "SELECT `id`, `value` FROM `mfcc`"; public static final String QUERY_4_QUERY_HASH = "df7da3801dfb5c191ff6711d79ce6455f3c09ec8323ce1ff7208ab85387263f5"; - public static final Long QUERY_4_CONTAINER_ID = CONTAINER_3_ID; - public static final Long QUERY_4_DATABASE_ID = DATABASE_3_ID; public static final String QUERY_4_RESULT_HASH = "ff4f7cbe1b96d496957f6e49e55b8b1b577fa4d405d4795af99594cfd40cb80d"; public static final Instant QUERY_4_CREATED = Instant.now().minus(4, MINUTES); public static final Instant QUERY_4_EXECUTION = Instant.now().minus(1, MINUTES); @@ -2977,18 +2860,6 @@ public abstract class BaseTest { public static final Long QUERY_4_RESULT_ID = 4L; public static final Boolean QUERY_4_PERSISTED = false; - public static final QueryDto QUERY_4 = QueryDto.builder() - .id(QUERY_4_ID) - .query(QUERY_4_STATEMENT) - .queryHash(QUERY_4_QUERY_HASH) - .resultHash(QUERY_4_RESULT_HASH) - .execution(QUERY_4_EXECUTION) - .isPersisted(QUERY_4_PERSISTED) - .resultNumber(QUERY_4_RESULT_NUMBER) - .owner(USER_3_BRIEF_DTO) - .isPersisted(QUERY_4_PERSISTED) - .build(); - public static final List<Map<String, Object>> QUERY_4_RESULT_DTO = new LinkedList<>(List.of( new HashMap<>() {{ put("id", BigInteger.valueOf(1L)); @@ -3012,7 +2883,7 @@ public abstract class BaseTest { public static final QueryDto QUERY_4_DTO = QueryDto.builder() .id(QUERY_4_ID) - .databaseId(QUERY_4_DATABASE_ID) + .databaseId(DATABASE_3_ID) .query(QUERY_4_STATEMENT) .queryNormalized(QUERY_4_STATEMENT) .resultNumber(QUERY_4_RESULT_NUMBER) @@ -3023,11 +2894,9 @@ public abstract class BaseTest { .owner(USER_1_BRIEF_DTO) .build(); - public static final Long QUERY_5_ID = 5L; + public static final UUID QUERY_5_ID = UUID.fromString("1a39f775-e3d5-4865-b4f5-dbbb5693b637"); public static final String QUERY_5_STATEMENT = "SELECT `id`, `value` FROM `mfcc` WHERE `value` > 0"; public static final String QUERY_5_QUERY_HASH = "6d6dc48b12cdfd959d39a62887334a6bbd529b93eed4f211f3f671bd9e7d6225"; - public static final Long QUERY_5_CONTAINER_ID = CONTAINER_3_ID; - public static final Long QUERY_5_DATABASE_ID = DATABASE_3_ID; public static final String QUERY_5_RESULT_HASH = "ff5f7cbe1b96d596957f6e59e55b8b1b577fa5d505d5795af99595cfd50cb80d"; public static final Instant QUERY_5_CREATED = Instant.now().minus(5, MINUTES); public static final Instant QUERY_5_EXECUTION = Instant.now().minus(1, MINUTES); @@ -3037,7 +2906,7 @@ public abstract class BaseTest { public static final QueryDto QUERY_5_DTO = QueryDto.builder() .id(QUERY_5_ID) - .databaseId(QUERY_5_DATABASE_ID) + .databaseId(DATABASE_3_ID) .query(QUERY_5_STATEMENT) .queryNormalized(QUERY_5_STATEMENT) .resultNumber(QUERY_5_RESULT_NUMBER) @@ -3048,8 +2917,18 @@ public abstract class BaseTest { .owner(USER_1_BRIEF_DTO) .build(); + public static final SubsetDto QUERY_5_SUBSET_DTO = SubsetDto.builder() + .tableId(TABLE_8_ID) + .columns(new LinkedList<>(List.of(COLUMN_8_1_ID, COLUMN_8_2_ID))) + .filter(new LinkedList<>(List.of(FilterDto.builder() + .columnId(COLUMN_8_2_ID) + .operatorId(IMAGE_1_OPERATORS_2_ID) + .value("0") + .type(FilterTypeDto.WHERE) + .build()))) + .build(); + public static final ViewDto QUERY_5_VIEW_DTO = ViewDto.builder() - .vdbid(DATABASE_3_ID) .query(QUERY_5_STATEMENT) .queryHash(QUERY_5_QUERY_HASH) .owner(USER_1_BRIEF_DTO) @@ -3066,51 +2945,21 @@ public abstract class BaseTest { public static final List<Map<String, Object>> QUERY_5_RESULT_DTO = new LinkedList<>(List.of( Map.of("id", BigInteger.valueOf(1L), "value", 11.2), Map.of("id", BigInteger.valueOf(2L), "value", 11.3), - Map.of("id", BigInteger.valueOf(3L), "value", 11.4), - Map.of("id", BigInteger.valueOf(4L), "value", 11.9), - Map.of("id", BigInteger.valueOf(5L), "value", 12.3), - Map.of("id", BigInteger.valueOf(6L), "value", 23.1) - )); - - public static final Long QUERY_6_ID = 6L; - public static final String QUERY_6_STATEMENT = "SELECT `location` FROM `weather_aus` WHERE `id` = 1"; - public static final String QUERY_6_QUERY_HASH = "6d6dc48b12cdfd959d39a62887334a6bbd529b93eed4f211f3f671bd9e7d6225"; - public static final String QUERY_6_RESULT_HASH = "ff5f7cbe1b96d596957f6e59e55b8b1b577fa5d505d5795af99595cfd50cb80d"; - public static final Instant QUERY_6_CREATED = Instant.now().minus(5, MINUTES); - public static final Instant QUERY_6_EXECUTION = Instant.now().minus(1, MINUTES); - public static final Instant QUERY_6_LAST_MODIFIED = Instant.ofEpochSecond(1551588555L); - public static final Long QUERY_6_RESULT_NUMBER = 1L; - public static final Boolean QUERY_6_PERSISTED = true; - - public static final QueryDto QUERY_6_DTO = QueryDto.builder() - .id(QUERY_6_ID) - .databaseId(DATABASE_2_ID) - .query(QUERY_6_STATEMENT) - .queryNormalized(QUERY_6_STATEMENT) - .resultNumber(QUERY_6_RESULT_NUMBER) - .resultHash(QUERY_6_RESULT_HASH) - .owner(USER_1_BRIEF_DTO) - .queryHash(QUERY_6_QUERY_HASH) - .execution(QUERY_6_EXECUTION) - .isPersisted(QUERY_6_PERSISTED) - .build(); - - public static final ColumnBriefDto TABLE_1_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() - .id(1L) - .name("id") - .internalName("id") - .columnType(ColumnTypeDto.BIGINT) - .build(); - - public static final Long COLUMN_1_1_ID = 1L; - - public static final Long COLUMN_1_2_ID = 2L; - - public static final Long COLUMN_1_3_ID = 3L; - - public static final Long COLUMN_1_4_ID = 4L; + Map.of("id", BigInteger.valueOf(3L), "value", 11.4), + Map.of("id", BigInteger.valueOf(4L), "value", 11.9), + Map.of("id", BigInteger.valueOf(5L), "value", 12.3), + Map.of("id", BigInteger.valueOf(6L), "value", 23.1) + )); - public static final Long COLUMN_1_5_ID = 5L; + public static final UUID QUERY_6_ID = UUID.fromString("7463412a-20c4-4fc1-8a33-948aea026f49"); + public static final String QUERY_6_STATEMENT = "SELECT `location` FROM `weather_aus` WHERE `id` = 1"; + public static final String QUERY_6_QUERY_HASH = "6d6dc48b12cdfd959d39a62887334a6bbd529b93eed4f211f3f671bd9e7d6225"; + public static final String QUERY_6_RESULT_HASH = "ff5f7cbe1b96d596957f6e59e55b8b1b577fa5d505d5795af99595cfd50cb80d"; + public static final Instant QUERY_6_CREATED = Instant.now().minus(5, MINUTES); + public static final Instant QUERY_6_EXECUTION = Instant.now().minus(1, MINUTES); + public static final Instant QUERY_6_LAST_MODIFIED = Instant.ofEpochSecond(1551588555L); + public static final Long QUERY_6_RESULT_NUMBER = 1L; + public static final Boolean QUERY_6_PERSISTED = true; public static final List<TableColumn> TABLE_1_COLUMNS = List.of(TableColumn.builder() .id(COLUMN_1_1_ID) @@ -3165,6 +3014,13 @@ public abstract class BaseTest { .isNullAllowed(true) .build()); + public static final ColumnBriefDto TABLE_1_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() + .id(COLUMN_1_1_ID) + .name("id") + .internalName("id") + .columnType(ColumnTypeDto.BIGINT) + .build(); + public static final List<CreateTableColumnDto> TABLE_1_COLUMNS_CREATE_DTO = List.of(CreateTableColumnDto.builder() .name("id") .type(ColumnTypeDto.BIGINT) @@ -3235,11 +3091,11 @@ public abstract class BaseTest { .constraints(TABLE_1_CONSTRAINTS_CREATE_INVALID_DTO) .build(); - public static final Long COLUMN_2_1_ID = 6L; + public static final UUID COLUMN_2_1_ID = UUID.fromString("795faa78-7ebb-4dd5-9eb1-e54a9192d0b5"); - public static final Long COLUMN_2_2_ID = 7L; + public static final UUID COLUMN_2_2_ID = UUID.fromString("f316ced5-7774-4656-aa7f-a874622d99b3"); - public static final Long COLUMN_2_3_ID = 8L; + public static final UUID COLUMN_2_3_ID = UUID.fromString("11cb1aa2-8582-45ef-a3bb-7056aa94cdf1"); public static final List<TableColumn> TABLE_2_COLUMNS = List.of(TableColumn.builder() .id(COLUMN_2_1_ID) @@ -3359,75 +3215,75 @@ public abstract class BaseTest { .columnType(ColumnTypeDto.DOUBLE) .build()); - public static final Long COLUMN_3_1_ID = 9L; + public static final UUID COLUMN_3_1_ID = UUID.fromString("49cc2735-ba75-4e12-8ac7-8aec87ed7724"); - public static final Long COLUMN_3_2_ID = 10L; + public static final UUID COLUMN_3_2_ID = UUID.fromString("2c240d64-3052-4a74-b696-e7490fdff3ea"); - public static final Long COLUMN_3_3_ID = 11L; + public static final UUID COLUMN_3_3_ID = UUID.fromString("6fbb0a56-f23a-4aa4-b158-c614a0a30f86"); - public static final Long COLUMN_3_4_ID = 12L; + public static final UUID COLUMN_3_4_ID = UUID.fromString("9b01f925-93ee-4f28-bf31-9902900a7099"); - public static final Long COLUMN_3_5_ID = 13L; + public static final UUID COLUMN_3_5_ID = UUID.fromString("9bbd66f1-0d94-401c-b7f7-6e329bb9ee21"); - public static final Long COLUMN_3_6_ID = 14L; + public static final UUID COLUMN_3_6_ID = UUID.fromString("19ad93d7-b298-495b-9678-9aac80678ff9"); - public static final Long COLUMN_3_7_ID = 15L; + public static final UUID COLUMN_3_7_ID = UUID.fromString("4d27d9f4-645f-4222-b5a8-4a91fa6e4275"); - public static final Long COLUMN_3_8_ID = 16L; + public static final UUID COLUMN_3_8_ID = UUID.fromString("b4f8fcf8-5824-45ec-8c58-43f20e6dffc5"); - public static final Long COLUMN_3_9_ID = 17L; + public static final UUID COLUMN_3_9_ID = UUID.fromString("87247218-369e-484a-9a8f-d758478d8dfc"); - public static final Long COLUMN_3_10_ID = 18L; + public static final UUID COLUMN_3_10_ID = UUID.fromString("6e191b97-189a-4d88-901e-888ca889e280"); - public static final Long COLUMN_3_11_ID = 19L; + public static final UUID COLUMN_3_11_ID = UUID.fromString("6ac356ff-9be5-4259-9b62-83b6707be7fe"); - public static final Long COLUMN_3_12_ID = 20L; + public static final UUID COLUMN_3_12_ID = UUID.fromString("0665b384-c824-4358-b6c5-f17706d46ea4"); - public static final Long COLUMN_3_13_ID = 21L; + public static final UUID COLUMN_3_13_ID = UUID.fromString("22d3676e-d28e-4075-b223-91a7ac767bcf"); - public static final Long COLUMN_3_14_ID = 22L; + public static final UUID COLUMN_3_14_ID = UUID.fromString("673326e3-ee2b-4c2f-902f-982e2abce1c2"); - public static final Long COLUMN_3_15_ID = 23L; + public static final UUID COLUMN_3_15_ID = UUID.fromString("8dcacf4a-736b-4e67-9618-74998cba8940"); - public static final Long COLUMN_3_16_ID = 24L; + public static final UUID COLUMN_3_16_ID = UUID.fromString("2b2f5359-76d3-4763-a53f-d18ca6b793fb"); - public static final Long COLUMN_3_17_ID = 25L; + public static final UUID COLUMN_3_17_ID = UUID.fromString("674b6120-06cf-4624-b006-1ed48898bd69"); - public static final Long COLUMN_3_18_ID = 26L; + public static final UUID COLUMN_3_18_ID = UUID.fromString("13edd7c9-6c88-44d7-b206-34774e49c5af"); - public static final Long COLUMN_3_19_ID = 27L; + public static final UUID COLUMN_3_19_ID = UUID.fromString("6977bb3f-4ae2-43ea-bb82-c7f68454c538"); - public static final Long COLUMN_3_20_ID = 28L; + public static final UUID COLUMN_3_20_ID = UUID.fromString("c03d2429-53e1-42eb-a1f5-ce342fa23336"); - public static final Long COLUMN_3_21_ID = 29L; + public static final UUID COLUMN_3_21_ID = UUID.fromString("06edd332-750e-4aa1-b61b-e757fb2312c3"); - public static final Long COLUMN_3_22_ID = 30L; + public static final UUID COLUMN_3_22_ID = UUID.fromString("b6b8631d-f283-49da-8d5e-4bb24def2a40"); - public static final Long COLUMN_3_23_ID = 31L; + public static final UUID COLUMN_3_23_ID = UUID.fromString("0393ee00-31ba-44ab-9e82-1f5034a9f57b"); - public static final Long COLUMN_3_24_ID = 32L; + public static final UUID COLUMN_3_24_ID = UUID.fromString("a63784ea-f70d-4bda-ace6-1c6a88edf831"); - public static final Long COLUMN_3_25_ID = 33L; + public static final UUID COLUMN_3_25_ID = UUID.fromString("720fe829-802c-420b-8e41-bdbb636db43c"); - public static final Long COLUMN_3_26_ID = 34L; + public static final UUID COLUMN_3_26_ID = UUID.fromString("5bce38ef-7d49-43b5-9054-068750684b5f"); - public static final Long COLUMN_3_27_ID = 35L; + public static final UUID COLUMN_3_27_ID = UUID.fromString("92097c02-3dd3-40ea-bd03-a9135f45a557"); - public static final Long COLUMN_3_28_ID = 36L; + public static final UUID COLUMN_3_28_ID = UUID.fromString("7361a38a-828b-495e-8a57-b36cca17d7db"); - public static final Long COLUMN_3_29_ID = 37L; + public static final UUID COLUMN_3_29_ID = UUID.fromString("a06812db-03b7-484c-92a6-45d94eef3bb9"); - public static final Long COLUMN_3_30_ID = 38L; + public static final UUID COLUMN_3_30_ID = UUID.fromString("05614d89-9216-47ea-96f0-acffc4674acf"); - public static final Long COLUMN_3_31_ID = 39L; + public static final UUID COLUMN_3_31_ID = UUID.fromString("05ada13d-361a-48e7-9a0f-1191499509f1"); - public static final Long COLUMN_3_32_ID = 40L; + public static final UUID COLUMN_3_32_ID = UUID.fromString("b3f259f6-700a-4b60-8eac-dceaa0dcda9d"); - public static final Long COLUMN_3_33_ID = 41L; + public static final UUID COLUMN_3_33_ID = UUID.fromString("9160af06-e168-4b10-a7f9-520f41ae7955"); - public static final Long COLUMN_3_34_ID = 42L; + public static final UUID COLUMN_3_34_ID = UUID.fromString("fde20c99-ed9c-4a60-8c18-f46e8603ebb5"); - public static final Long COLUMN_3_35_ID = 43L; + public static final UUID COLUMN_3_35_ID = UUID.fromString("071c7f27-1cdd-4af9-b4d6-f932c27c7287"); public static final ColumnBriefDto TABLE_3_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() .id(COLUMN_3_1_ID) @@ -4208,47 +4064,47 @@ public abstract class BaseTest { .sets(new LinkedList<>()) .build()); - public static final Long COLUMN_5_1_ID = 46L; + public static final UUID COLUMN_5_1_ID = UUID.fromString("4efd4cbb-ca2e-48e2-8f40-37514956aa67"); - public static final Long COLUMN_5_2_ID = 47L; + public static final UUID COLUMN_5_2_ID = UUID.fromString("53061685-c1db-4df6-ad4e-8f384a200104"); - public static final Long COLUMN_5_3_ID = 48L; + public static final UUID COLUMN_5_3_ID = UUID.fromString("643f9cda-8db1-47a4-bb08-c10e78e54c10"); - public static final Long COLUMN_5_4_ID = 49L; + public static final UUID COLUMN_5_4_ID = UUID.fromString("efeacc15-3b31-4a9f-9dba-f07d62dcddd6"); - public static final Long COLUMN_5_5_ID = 50L; + public static final UUID COLUMN_5_5_ID = UUID.fromString("0319db31-473a-47bc-bb9d-fa1edf82fcd5"); - public static final Long COLUMN_5_6_ID = 51L; + public static final UUID COLUMN_5_6_ID = UUID.fromString("9ba789ca-59cf-4480-b9f6-3b957b1d7f5c"); - public static final Long COLUMN_5_7_ID = 52L; + public static final UUID COLUMN_5_7_ID = UUID.fromString("81c42954-fd1a-4fef-adb1-bc4945469e26"); - public static final Long COLUMN_5_8_ID = 53L; + public static final UUID COLUMN_5_8_ID = UUID.fromString("49a38905-52a2-4a9b-b7b9-5e1dcf799b2a"); - public static final Long COLUMN_5_9_ID = 54L; + public static final UUID COLUMN_5_9_ID = UUID.fromString("1e1a9b6b-5aee-4773-b52d-ea56a5d1e2c8"); - public static final Long COLUMN_5_10_ID = 55L; + public static final UUID COLUMN_5_10_ID = UUID.fromString("42ede62a-ae98-4a14-ba54-76b8ba1c580f"); - public static final Long COLUMN_5_11_ID = 56L; + public static final UUID COLUMN_5_11_ID = UUID.fromString("0af0f84a-5a58-418a-8bbc-bde29ed0cda0"); - public static final Long COLUMN_5_12_ID = 57L; + public static final UUID COLUMN_5_12_ID = UUID.fromString("d9cb30a2-1566-4bd1-899d-060a8ba47722"); - public static final Long COLUMN_5_13_ID = 58L; + public static final UUID COLUMN_5_13_ID = UUID.fromString("e69f7f75-3731-4706-8193-0393aa0c08a7"); - public static final Long COLUMN_5_14_ID = 59L; + public static final UUID COLUMN_5_14_ID = UUID.fromString("4441630e-7dfa-4046-8bc2-929860f1c66e"); - public static final Long COLUMN_5_15_ID = 60L; + public static final UUID COLUMN_5_15_ID = UUID.fromString("f0a12be0-0b26-4686-bf7e-539cdc7e71b4"); - public static final Long COLUMN_5_16_ID = 61L; + public static final UUID COLUMN_5_16_ID = UUID.fromString("b60abdcc-5786-40f8-a309-e4467f7d963c"); - public static final Long COLUMN_5_17_ID = 62L; + public static final UUID COLUMN_5_17_ID = UUID.fromString("6d5877e2-daef-43d6-a1b6-1aff3ab1a9a2"); - public static final Long COLUMN_5_18_ID = 63L; + public static final UUID COLUMN_5_18_ID = UUID.fromString("bb45455f-d449-496e-94f8-eac4d46ba9c0"); - public static final Long COLUMN_5_19_ID = 64L; + public static final UUID COLUMN_5_19_ID = UUID.fromString("44c5484b-b57d-48a4-8f24-d2074de98e1a"); - public static final Long COLUMN_5_20_ID = 65L; + public static final UUID COLUMN_5_20_ID = UUID.fromString("6475b937-71fc-4331-bc85-8ee71fa68d99"); - public static final Long COLUMN_5_21_ID = 66L; + public static final UUID COLUMN_5_21_ID = UUID.fromString("92ff472f-e203-4c8e-b243-81640229ca19"); public static final ColumnBriefDto TABLE_5_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() .id(COLUMN_5_1_ID) @@ -4774,8 +4630,48 @@ public abstract class BaseTest { .constraints(TABLE_5_CONSTRAINTS_INVALID_CREATE) .build(); + public static final UUID QUERY_8_ID = UUID.fromString("1c466eee-d551-4ef9-a7e0-b5a2d1b15473"); + public static final String QUERY_8_STATEMENT = "SELECT `id`, `animal_name` FROM `zoo` WHERE `hair` = TRUE AND `feathers` = FALSE;"; + public static final String QUERY_8_QUERY_HASH = "f0ee0d6dd45e092fca120c4f0eab089f91ed26ccf8dc34a03c6b9c6bb4141271"; + public static final Long QUERY_8_RESULT_NUMBER = 5L; + public static final String QUERY_8_RESULT_HASH = "b5f9cae916d32deff81c5f2e9f8ff43904034bc084b12320730953d120698bed"; + public static final Instant QUERY_8_EXECUTION = Instant.now().minus(1, MINUTES); + public static final Boolean QUERY_8_PERSISTED = true; + + public static final SubsetDto QUERY_8_SUBSET_DTO = SubsetDto.builder() + .tableId(TABLE_5_ID) + .columns(new LinkedList<>(List.of(COLUMN_5_1_ID, COLUMN_5_2_ID))) + .filter(new LinkedList<>(List.of(FilterDto.builder() + .type(FilterTypeDto.WHERE) + .columnId(COLUMN_5_3_ID) + .operatorId(IMAGE_1_OPERATORS_2_ID) + .value("true") + .build(), + FilterDto.builder() + .type(FilterTypeDto.AND) + .build(), + FilterDto.builder() + .type(FilterTypeDto.WHERE) + .columnId(COLUMN_5_4_ID) + .operatorId(IMAGE_1_OPERATORS_2_ID) + .value("false") + .build()))) + .build(); + + public static final UUID COLUMN_6_1_ID = UUID.fromString("27b04a64-2849-4fae-b295-858c3e50361f"); + + public static final UUID COLUMN_6_2_ID = UUID.fromString("1ea62e32-5719-4152-94da-45d37eb88b6f"); + + public static final UUID COLUMN_6_3_ID = UUID.fromString("f523f9f5-42f7-4695-841e-a5fd30fa6879"); + + public static final UUID COLUMN_6_4_ID = UUID.fromString("f57ea880-f917-4127-bcbb-202a34831383"); + + public static final UUID COLUMN_6_5_ID = UUID.fromString("38aaeb63-b94b-4d90-8eae-a626dfb1f092"); + + public static final UUID COLUMN_6_6_ID = UUID.fromString("f788cf6f-66ed-4f28-8b24-d9d173c4d340"); + public static final List<TableColumn> TABLE_6_COLUMNS = List.of(TableColumn.builder() - .id(67L) + .id(COLUMN_6_1_ID) .ordinalPosition(0) .table(TABLE_6) .name("id") @@ -4784,7 +4680,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), TableColumn.builder() - .id(68L) + .id(COLUMN_6_2_ID) .ordinalPosition(1) .table(TABLE_6) .name("firstname") @@ -4793,7 +4689,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), TableColumn.builder() - .id(69L) + .id(COLUMN_6_3_ID) .ordinalPosition(2) .table(TABLE_6) .name("lastname") @@ -4802,7 +4698,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), TableColumn.builder() - .id(70L) + .id(COLUMN_6_4_ID) .ordinalPosition(3) .table(TABLE_6) .name("birth") @@ -4811,7 +4707,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), TableColumn.builder() - .id(71L) + .id(COLUMN_6_5_ID) .ordinalPosition(4) .table(TABLE_6) .name("reminder") @@ -4820,7 +4716,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), TableColumn.builder() - .id(72L) + .id(COLUMN_6_6_ID) .ordinalPosition(5) .table(TABLE_6) .name("ref_id") @@ -4830,14 +4726,14 @@ public abstract class BaseTest { .build()); public static final ColumnBriefDto TABLE_6_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() - .id(67L) + .id(COLUMN_6_1_ID) .name("id") .internalName("id") .columnType(ColumnTypeDto.BIGINT) .build(); public static final List<ColumnDto> TABLE_6_COLUMNS_DTO = List.of(ColumnDto.builder() - .id(67L) + .id(COLUMN_6_1_ID) .ordinalPosition(0) .tableId(TABLE_6_ID) .name("id") @@ -4846,7 +4742,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ColumnDto.builder() - .id(68L) + .id(COLUMN_6_2_ID) .ordinalPosition(1) .tableId(TABLE_6_ID) .name("firstname") @@ -4855,7 +4751,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ColumnDto.builder() - .id(69L) + .id(COLUMN_6_3_ID) .ordinalPosition(2) .tableId(TABLE_6_ID) .name("lastname") @@ -4864,7 +4760,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ColumnDto.builder() - .id(70L) + .id(COLUMN_6_4_ID) .ordinalPosition(3) .tableId(TABLE_6_ID) .name("birth") @@ -4873,7 +4769,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ColumnDto.builder() - .id(71L) + .id(COLUMN_6_5_ID) .ordinalPosition(4) .tableId(TABLE_6_ID) .name("reminder") @@ -4882,7 +4778,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ColumnDto.builder() - .id(72L) + .id(COLUMN_6_6_ID) .ordinalPosition(5) .tableId(TABLE_6_ID) .name("ref_id") @@ -4929,9 +4825,9 @@ public abstract class BaseTest { .constraints(TABLE_6_CONSTRAINTS_CREATE) .build(); - public static final Long COLUMN_7_1_ID = 73L; + public static final UUID COLUMN_7_1_ID = UUID.fromString("395b44a4-0e31-41ea-94ad-c4f2d5e912c6"); - public static final Long COLUMN_7_2_ID = 74L; + public static final UUID COLUMN_7_2_ID = UUID.fromString("5713333b-872a-44c5-ab94-4d0ab62f5663"); public static final ColumnBriefDto TABLE_7_COLUMNS_BRIEF_0_DTO = ColumnBriefDto.builder() .id(COLUMN_7_1_ID) @@ -4985,20 +4881,29 @@ public abstract class BaseTest { .isNullAllowed(false) .build()); - public static final Long VIEW_1_ID = 1L; + public static final UUID VIEW_1_ID = UUID.fromString("7d712cf7-78c7-4a47-90b0-d6b9f7f19b70"); public static final Boolean VIEW_1_INITIAL_VIEW = false; public static final String VIEW_1_NAME = "JUnit"; public static final String VIEW_1_INTERNAL_NAME = "junit"; - public static final Long VIEW_1_CONTAINER_ID = CONTAINER_1_ID; - public static final Long VIEW_1_DATABASE_ID = DATABASE_1_ID; public static final Boolean VIEW_1_PUBLIC = false; public static final Boolean VIEW_1_SCHEMA_PUBLIC = false; - public static final String VIEW_1_QUERY = "select `location`, `lat`, `lng` from `weather_location`"; + public static final String VIEW_1_QUERY = "SELECT `location`, `lat`, `lng` FROM `weather_location`"; public static final String VIEW_1_QUERY_HASH = "dc81a6877c7c51a6a6f406e1fc2a255e44a0d49a20548596e0d583c3eb849c23"; + public static final UUID VIEW_COLUMN_1_1_ID = UUID.fromString("ebf2c5ce-4deb-4cc6-b6f6-61f5d3f6fc98"); + + public static final UUID VIEW_COLUMN_1_2_ID = UUID.fromString("d6ba3475-cefa-4771-aaa1-9274f16335ee"); + + public static final UUID VIEW_COLUMN_1_3_ID = UUID.fromString("4f189a5f-c9ca-4518-9758-1a0730f6276b"); + + public static final SubsetDto VIEW_1_SUBSET_DTO = SubsetDto.builder() + .tableId(TABLE_2_ID) + .columns(new LinkedList<>(List.of(COLUMN_2_1_ID, COLUMN_2_2_ID, COLUMN_2_3_ID))) + .build(); + public static final List<ViewColumnDto> VIEW_1_COLUMNS_DTO = List.of( ViewColumnDto.builder() - .id(1L) + .id(VIEW_COLUMN_1_1_ID) .ordinalPosition(0) .databaseId(DATABASE_1_ID) .name("location") @@ -5008,7 +4913,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ViewColumnDto.builder() - .id(2L) + .id(VIEW_COLUMN_1_2_ID) .ordinalPosition(1) .databaseId(DATABASE_1_ID) .name("lat") @@ -5019,7 +4924,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(3L) + .id(VIEW_COLUMN_1_3_ID) .ordinalPosition(2) .databaseId(DATABASE_1_ID) .name("lng") @@ -5036,7 +4941,6 @@ public abstract class BaseTest { .isInitialView(VIEW_1_INITIAL_VIEW) .name(VIEW_1_NAME) .internalName(VIEW_1_INTERNAL_NAME) - .vdbid(VIEW_1_DATABASE_ID) .isPublic(VIEW_1_PUBLIC) .isSchemaPublic(VIEW_1_SCHEMA_PUBLIC) .query(VIEW_1_QUERY) @@ -5045,6 +4949,7 @@ public abstract class BaseTest { .owner(USER_1) .identifiers(new LinkedList<>()) /* IDENTIFIER_3 */ .columns(null) /* VIEW_1_COLUMNS */ + .database(null) /* DATABASE_1 */ .build(); public static final Long VIEW_1_DATA_COUNT = 3L; @@ -5068,7 +4973,7 @@ public abstract class BaseTest { public static final List<ViewColumn> VIEW_1_COLUMNS = List.of( ViewColumn.builder() - .id(1L) + .id(VIEW_COLUMN_1_1_ID) .ordinalPosition(0) .name("location") .internalName("location") @@ -5078,7 +4983,7 @@ public abstract class BaseTest { .view(VIEW_1) .build(), ViewColumn.builder() - .id(2L) + .id(VIEW_COLUMN_1_2_ID) .ordinalPosition(1) .name("lat") .internalName("lat") @@ -5089,7 +4994,7 @@ public abstract class BaseTest { .view(VIEW_1) .build(), ViewColumn.builder() - .id(3L) + .id(VIEW_COLUMN_1_3_ID) .ordinalPosition(2) .name("lng") .internalName("lng") @@ -5103,10 +5008,10 @@ public abstract class BaseTest { public static final ViewDto VIEW_1_DTO = ViewDto.builder() .id(VIEW_1_ID) + .databaseId(DATABASE_1_ID) .isInitialView(VIEW_1_INITIAL_VIEW) .name(VIEW_1_NAME) .internalName(VIEW_1_INTERNAL_NAME) - .vdbid(VIEW_1_DATABASE_ID) .isPublic(VIEW_1_PUBLIC) .isSchemaPublic(VIEW_1_SCHEMA_PUBLIC) .identifiers(null /* VIEW_1_DTO_IDENTIFIERS */) @@ -5116,27 +5021,12 @@ public abstract class BaseTest { .columns(VIEW_1_COLUMNS_DTO) .build(); - public static final ViewDto VIEW_1_PRIVILEGED_DTO = ViewDto.builder() - .id(VIEW_1_ID) - .isInitialView(VIEW_1_INITIAL_VIEW) - .name(VIEW_1_NAME) - .internalName(VIEW_1_INTERNAL_NAME) - .vdbid(VIEW_1_DATABASE_ID) - .isPublic(VIEW_1_PUBLIC) - .owner(USER_1_BRIEF_DTO) - .query(VIEW_1_QUERY) - .queryHash(VIEW_1_QUERY_HASH) - .columns(VIEW_1_COLUMNS_DTO) - .lastRetrieved(Instant.now()) - .database(null) /* DATABASE_1_PRIVILEGED_DTO */ - .build(); - public static final ViewBriefDto VIEW_1_BRIEF_DTO = ViewBriefDto.builder() .id(VIEW_1_ID) .isInitialView(VIEW_1_INITIAL_VIEW) .name(VIEW_1_NAME) .internalName(VIEW_1_INTERNAL_NAME) - .vdbid(VIEW_1_DATABASE_ID) + .vdbid(DATABASE_1_ID) .isPublic(VIEW_1_PUBLIC) .isSchemaPublic(VIEW_1_SCHEMA_PUBLIC) .ownedBy(USER_1_ID) @@ -5147,23 +5037,29 @@ public abstract class BaseTest { public static final CreateViewDto VIEW_1_CREATE_DTO = CreateViewDto.builder() .isPublic(VIEW_1_PUBLIC) .name(VIEW_1_NAME) - .query(VIEW_1_QUERY) + .query(VIEW_1_SUBSET_DTO) .build(); - public static final Long VIEW_2_ID = 2L; + public static final UUID VIEW_2_ID = UUID.fromString("1921a0a0-e4b0-4d12-a05f-be920af9b5ce"); public static final Boolean VIEW_2_INITIAL_VIEW = false; public static final String VIEW_2_NAME = "JUnit2"; public static final String VIEW_2_INTERNAL_NAME = "junit2"; - public static final Long VIEW_2_CONTAINER_ID = CONTAINER_1_ID; - public static final Long VIEW_2_DATABASE_ID = DATABASE_1_ID; public static final Boolean VIEW_2_PUBLIC = true; public static final Boolean VIEW_2_SCHEMA_PUBLIC = true; public static final String VIEW_2_QUERY = "select `date`, `location` as loc, `mintemp`, `rainfall` from `weather_aus` where `location` = 'Albury'"; public static final String VIEW_2_QUERY_HASH = "987fc946772ffb6d85060262dcb5df419692a1f6772ea995e3dedb53c191e984"; + public static final UUID VIEW_COLUMN_2_1_ID = UUID.fromString("8fb30bce-04a8-4e9a-9c6b-0776eda3aab8"); + + public static final UUID VIEW_COLUMN_2_2_ID = UUID.fromString("d43f9940-ae27-4d81-b17b-ccbaf578186c"); + + public static final UUID VIEW_COLUMN_2_3_ID = UUID.fromString("b47733bb-aeea-414d-811e-405c64463730"); + + public static final UUID VIEW_COLUMN_2_4_ID = UUID.fromString("2b467e3a-acef-4944-be19-b4b0680874c2"); + public static final List<ViewColumnDto> VIEW_2_COLUMNS_DTO = List.of( ViewColumnDto.builder() - .id(4L) + .id(VIEW_COLUMN_2_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(0) .name("Date") @@ -5172,7 +5068,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(5L) + .id(VIEW_COLUMN_2_2_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(1) .name("loc") @@ -5182,7 +5078,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(6L) + .id(VIEW_COLUMN_2_3_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(2) .name("Rainfall") @@ -5193,7 +5089,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(7L) + .id(VIEW_COLUMN_2_4_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(3) .name("MinTemp") @@ -5210,7 +5106,6 @@ public abstract class BaseTest { .isInitialView(VIEW_2_INITIAL_VIEW) .name(VIEW_2_NAME) .internalName(VIEW_2_INTERNAL_NAME) - .vdbid(VIEW_2_DATABASE_ID) .isPublic(VIEW_2_PUBLIC) .isSchemaPublic(VIEW_2_SCHEMA_PUBLIC) .columns(null) /* VIEW_2_COLUMNS */ @@ -5218,11 +5113,12 @@ public abstract class BaseTest { .queryHash(VIEW_2_QUERY_HASH) .ownedBy(USER_1_ID) .owner(USER_1) + .database(null) /* DATABASE_1 */ .build(); public static final List<ViewColumn> VIEW_2_COLUMNS = List.of( ViewColumn.builder() - .id(4L) + .id(VIEW_COLUMN_2_1_ID) .ordinalPosition(0) .name("Date") .internalName("date") @@ -5231,7 +5127,7 @@ public abstract class BaseTest { .view(VIEW_2) .build(), ViewColumn.builder() - .id(5L) + .id(VIEW_COLUMN_2_2_ID) .ordinalPosition(1) .name("loc") .internalName("loc") @@ -5241,7 +5137,7 @@ public abstract class BaseTest { .view(VIEW_2) .build(), ViewColumn.builder() - .id(6L) + .id(VIEW_COLUMN_2_3_ID) .ordinalPosition(2) .name("Rainfall") .internalName("rainfall") @@ -5252,7 +5148,7 @@ public abstract class BaseTest { .view(VIEW_2) .build(), ViewColumn.builder() - .id(7L) + .id(VIEW_COLUMN_2_4_ID) .ordinalPosition(3) .name("MinTemp") .internalName("mintemp") @@ -5266,10 +5162,10 @@ public abstract class BaseTest { public static final ViewDto VIEW_2_DTO = ViewDto.builder() .id(VIEW_2_ID) + .databaseId(DATABASE_1_ID) .isInitialView(VIEW_2_INITIAL_VIEW) .name(VIEW_2_NAME) .internalName(VIEW_2_INTERNAL_NAME) - .vdbid(VIEW_2_DATABASE_ID) .isPublic(VIEW_2_PUBLIC) .isSchemaPublic(VIEW_2_SCHEMA_PUBLIC) .columns(VIEW_2_COLUMNS_DTO) @@ -5278,28 +5174,12 @@ public abstract class BaseTest { .owner(USER_1_BRIEF_DTO) .build(); - public static final ViewDto VIEW_2_PRIVILEGED_DTO = ViewDto.builder() - .id(VIEW_2_ID) - .isInitialView(VIEW_2_INITIAL_VIEW) - .name(VIEW_2_NAME) - .internalName(VIEW_2_INTERNAL_NAME) - .vdbid(VIEW_2_DATABASE_ID) - .isPublic(VIEW_2_PUBLIC) - .isSchemaPublic(VIEW_2_SCHEMA_PUBLIC) - .owner(USER_2_BRIEF_DTO) - .query(VIEW_2_QUERY) - .queryHash(VIEW_2_QUERY_HASH) - .columns(VIEW_2_COLUMNS_DTO) - .lastRetrieved(Instant.now()) - .database(null) /* DATABASE_1_PRIVILEGED_DTO */ - .build(); - public static final ViewBriefDto VIEW_2_BRIEF_DTO = ViewBriefDto.builder() .id(VIEW_2_ID) .isInitialView(VIEW_2_INITIAL_VIEW) .name(VIEW_2_NAME) .internalName(VIEW_2_INTERNAL_NAME) - .vdbid(VIEW_2_DATABASE_ID) + .vdbid(DATABASE_1_ID) .isPublic(VIEW_2_PUBLIC) .isSchemaPublic(VIEW_2_SCHEMA_PUBLIC) .query(VIEW_2_QUERY) @@ -5307,12 +5187,10 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final Long VIEW_3_ID = 3L; + public static final UUID VIEW_3_ID = UUID.fromString("88940939-d456-4aae-88a6-f2b6b343c614"); public static final Boolean VIEW_3_INITIAL_VIEW = false; public static final String VIEW_3_NAME = "JUnit3"; public static final String VIEW_3_INTERNAL_NAME = "junit3"; - public static final Long VIEW_3_CONTAINER_ID = CONTAINER_1_ID; - public static final Long VIEW_3_DATABASE_ID = DATABASE_1_ID; public static final Boolean VIEW_3_PUBLIC = true; public static final Boolean VIEW_3_SCHEMA_PUBLIC = false; public static final String VIEW_3_QUERY = "select w.`mintemp`, w.`rainfall`, w.`location`, m.`date` from `weather_aus` w join `junit2` m on m.`location` = w.`location` and m.`date` = w.`date`"; @@ -5320,9 +5198,17 @@ public abstract class BaseTest { public static final Long VIEW_3_DATA_COUNT = 3L; + public static final UUID VIEW_COLUMN_3_1_ID = UUID.fromString("129839cb-dbd7-492d-8fd0-ee44a8f51c4d"); + + public static final UUID VIEW_COLUMN_3_2_ID = UUID.fromString("e229d80a-c25c-4fbe-8f31-bbb2e1dff3d5"); + + public static final UUID VIEW_COLUMN_3_3_ID = UUID.fromString("12083a5d-fdd3-41db-9f92-d1298558e477"); + + public static final UUID VIEW_COLUMN_3_4_ID = UUID.fromString("668f8a87-1fa6-4be7-9761-1844aa8315a4"); + public static final List<ViewColumnDto> VIEW_3_COLUMNS_DTO = List.of( ViewColumnDto.builder() - .id(8L) + .id(VIEW_COLUMN_3_1_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(0) .name("MinTemp") @@ -5333,7 +5219,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(9L) + .id(VIEW_COLUMN_3_2_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(1) .name("Rainfall") @@ -5344,7 +5230,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(10L) + .id(VIEW_COLUMN_3_3_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(2) .name("Location") @@ -5354,7 +5240,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(11L) + .id(VIEW_COLUMN_3_4_ID) .databaseId(DATABASE_1_ID) .ordinalPosition(3) .name("Date") @@ -5369,7 +5255,6 @@ public abstract class BaseTest { .isInitialView(VIEW_3_INITIAL_VIEW) .name(VIEW_3_NAME) .internalName(VIEW_3_INTERNAL_NAME) - .vdbid(VIEW_3_DATABASE_ID) .isPublic(VIEW_3_PUBLIC) .isSchemaPublic(VIEW_3_SCHEMA_PUBLIC) .columns(null) /* VIEW_3_COLUMNS */ @@ -5377,27 +5262,12 @@ public abstract class BaseTest { .queryHash(VIEW_3_QUERY_HASH) .ownedBy(USER_1_ID) .owner(USER_1) - .build(); - - public static final ViewDto VIEW_3_PRIVILEGED_DTO = ViewDto.builder() - .id(VIEW_3_ID) - .isInitialView(VIEW_3_INITIAL_VIEW) - .name(VIEW_3_NAME) - .internalName(VIEW_3_INTERNAL_NAME) - .vdbid(VIEW_3_DATABASE_ID) - .isPublic(VIEW_3_PUBLIC) - .isSchemaPublic(VIEW_3_SCHEMA_PUBLIC) - .owner(USER_1_BRIEF_DTO) - .query(VIEW_3_QUERY) - .queryHash(VIEW_3_QUERY_HASH) - .columns(VIEW_3_COLUMNS_DTO) - .lastRetrieved(Instant.now()) - .database(null) /* DATABASE_1_PRIVILEGED_DTO */ + .database(null) /* DATABASE_1 */ .build(); public static final List<ViewColumn> VIEW_3_COLUMNS = List.of( ViewColumn.builder() - .id(8L) + .id(VIEW_COLUMN_3_1_ID) .ordinalPosition(0) .name("MinTemp") .internalName("mintemp") @@ -5408,7 +5278,7 @@ public abstract class BaseTest { .view(VIEW_3) .build(), ViewColumn.builder() - .id(9L) + .id(VIEW_COLUMN_3_2_ID) .ordinalPosition(1) .name("Rainfall") .internalName("rainfall") @@ -5419,7 +5289,7 @@ public abstract class BaseTest { .view(VIEW_3) .build(), ViewColumn.builder() - .id(10L) + .id(VIEW_COLUMN_3_3_ID) .ordinalPosition(2) .name("Location") .internalName("location") @@ -5429,7 +5299,7 @@ public abstract class BaseTest { .view(VIEW_3) .build(), ViewColumn.builder() - .id(11L) + .id(VIEW_COLUMN_3_4_ID) .ordinalPosition(3) .name("Date") .internalName("date") @@ -5441,10 +5311,10 @@ public abstract class BaseTest { public static final ViewDto VIEW_3_DTO = ViewDto.builder() .id(VIEW_3_ID) + .databaseId(DATABASE_1_ID) .isInitialView(VIEW_3_INITIAL_VIEW) .name(VIEW_3_NAME) .internalName(VIEW_3_INTERNAL_NAME) - .vdbid(VIEW_3_DATABASE_ID) .isPublic(VIEW_3_PUBLIC) .isSchemaPublic(VIEW_3_SCHEMA_PUBLIC) .columns(VIEW_3_COLUMNS_DTO) @@ -5458,7 +5328,7 @@ public abstract class BaseTest { .isInitialView(VIEW_3_INITIAL_VIEW) .name(VIEW_3_NAME) .internalName(VIEW_3_INTERNAL_NAME) - .vdbid(VIEW_3_DATABASE_ID) + .vdbid(DATABASE_1_ID) .isPublic(VIEW_3_PUBLIC) .isSchemaPublic(VIEW_3_SCHEMA_PUBLIC) .query(VIEW_3_QUERY) @@ -5466,13 +5336,10 @@ public abstract class BaseTest { .ownedBy(USER_1_ID) .build(); - public static final Long VIEW_4_ID = 4L; + public static final UUID VIEW_4_ID = UUID.fromString("13b36fa0-a65a-4ccf-80b1-5b3a2444a41a"); public static final Boolean VIEW_4_INITIAL_VIEW = false; public static final String VIEW_4_NAME = "Mock View"; public static final String VIEW_4_INTERNAL_NAME = "mock_view"; - public static final Long VIEW_4_CONTAINER_ID = CONTAINER_2_ID; - public static final Long VIEW_4_DATABASE_ID = DATABASE_2_ID; - public static final Long VIEW_4_TABLE_ID = TABLE_5_ID; public static final Table VIEW_4_TABLE = TABLE_5; public static final Boolean VIEW_4_PUBLIC = true; public static final Boolean VIEW_4_SCHEMA_PUBLIC = false; @@ -5481,7 +5348,7 @@ public abstract class BaseTest { public static final List<ViewColumnDto> VIEW_4_COLUMNS_DTO = List.of( ViewColumnDto.builder() - .id(12L) + .id(COLUMN_5_1_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(0) .name("Animal Name") @@ -5490,7 +5357,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(13L) + .id(COLUMN_5_2_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(1) .name("Hair") @@ -5499,7 +5366,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(14L) + .id(COLUMN_5_3_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(2) .name("Feathers") @@ -5508,7 +5375,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(15L) + .id(COLUMN_5_4_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(3) .name("Eggs") @@ -5517,7 +5384,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(16L) + .id(COLUMN_5_5_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(4) .name("Milk") @@ -5526,7 +5393,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(17L) + .id(COLUMN_5_6_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(5) .name("Airborne") @@ -5535,7 +5402,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(18L) + .id(COLUMN_5_7_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(6) .name("Aquantic") @@ -5544,7 +5411,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(19L) + .id(COLUMN_5_8_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(7) .name("Predator") @@ -5553,7 +5420,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(20L) + .id(COLUMN_5_9_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(8) .name("Backbone") @@ -5562,7 +5429,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(21L) + .id(COLUMN_5_10_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(9) .name("Breathes") @@ -5571,7 +5438,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(22L) + .id(COLUMN_5_11_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(10) .name("Venomous") @@ -5580,7 +5447,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(23L) + .id(COLUMN_5_12_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(11) .name("Fin") @@ -5589,7 +5456,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(24L) + .id(COLUMN_5_13_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(12) .name("Legs") @@ -5598,7 +5465,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(25L) + .id(COLUMN_5_14_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(13) .name("Tail") @@ -5607,7 +5474,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(26L) + .id(COLUMN_5_15_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(14) .name("Domestic") @@ -5616,7 +5483,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(27L) + .id(COLUMN_5_16_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(15) .name("Catsize") @@ -5625,7 +5492,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(28L) + .id(COLUMN_5_17_ID) .databaseId(DATABASE_2_ID) .ordinalPosition(16) .name("Class Type") @@ -5639,7 +5506,6 @@ public abstract class BaseTest { .isInitialView(VIEW_4_INITIAL_VIEW) .name(VIEW_4_NAME) .internalName(VIEW_4_INTERNAL_NAME) - .vdbid(VIEW_4_DATABASE_ID) .isPublic(VIEW_4_PUBLIC) .isSchemaPublic(VIEW_4_SCHEMA_PUBLIC) .query(VIEW_4_QUERY) @@ -5651,10 +5517,10 @@ public abstract class BaseTest { public static final ViewDto VIEW_4_DTO = ViewDto.builder() .id(VIEW_4_ID) + .databaseId(DATABASE_2_ID) .isInitialView(VIEW_4_INITIAL_VIEW) .name(VIEW_4_NAME) .internalName(VIEW_4_INTERNAL_NAME) - .vdbid(VIEW_4_DATABASE_ID) .isPublic(VIEW_4_PUBLIC) .isSchemaPublic(VIEW_4_SCHEMA_PUBLIC) .query(VIEW_4_QUERY) @@ -5668,7 +5534,7 @@ public abstract class BaseTest { .isInitialView(VIEW_4_INITIAL_VIEW) .name(VIEW_4_NAME) .internalName(VIEW_4_INTERNAL_NAME) - .vdbid(VIEW_4_DATABASE_ID) + .vdbid(DATABASE_2_ID) .isPublic(VIEW_4_PUBLIC) .isSchemaPublic(VIEW_4_SCHEMA_PUBLIC) .query(VIEW_4_QUERY) @@ -5678,7 +5544,7 @@ public abstract class BaseTest { public static final List<ViewColumn> VIEW_4_COLUMNS = List.of( ViewColumn.builder() - .id(12L) + .id(COLUMN_5_1_ID) .ordinalPosition(0) .name("Animal Name") .internalName("animal_name") @@ -5687,7 +5553,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(13L) + .id(COLUMN_5_2_ID) .ordinalPosition(1) .name("Hair") .internalName("hair") @@ -5696,7 +5562,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(14L) + .id(COLUMN_5_3_ID) .ordinalPosition(2) .name("Feathers") .internalName("feathers") @@ -5705,7 +5571,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(15L) + .id(COLUMN_5_4_ID) .ordinalPosition(3) .name("Eggs") .internalName("eggs") @@ -5714,7 +5580,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(16L) + .id(COLUMN_5_5_ID) .ordinalPosition(4) .name("Milk") .internalName("milk") @@ -5723,7 +5589,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(17L) + .id(COLUMN_5_6_ID) .ordinalPosition(5) .name("Airborne") .internalName("airborne") @@ -5732,7 +5598,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(18L) + .id(COLUMN_5_7_ID) .ordinalPosition(6) .name("Aquantic") .internalName("aquantic") @@ -5741,7 +5607,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(19L) + .id(COLUMN_5_8_ID) .ordinalPosition(7) .name("Predator") .internalName("predator") @@ -5750,7 +5616,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(20L) + .id(COLUMN_5_9_ID) .ordinalPosition(8) .name("Backbone") .internalName("backbone") @@ -5759,7 +5625,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(21L) + .id(COLUMN_5_10_ID) .ordinalPosition(9) .name("Breathes") .internalName("breathes") @@ -5768,7 +5634,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(22L) + .id(COLUMN_5_11_ID) .ordinalPosition(10) .name("Venomous") .internalName("venomous") @@ -5777,7 +5643,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(23L) + .id(COLUMN_5_12_ID) .ordinalPosition(11) .name("Fin") .internalName("fin") @@ -5786,7 +5652,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(24L) + .id(COLUMN_5_13_ID) .ordinalPosition(12) .name("Legs") .internalName("legs") @@ -5795,7 +5661,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(25L) + .id(COLUMN_5_14_ID) .ordinalPosition(13) .name("Tail") .internalName("tail") @@ -5804,7 +5670,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(26L) + .id(COLUMN_5_15_ID) .ordinalPosition(14) .name("Domestic") .internalName("domestic") @@ -5813,7 +5679,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(27L) + .id(COLUMN_5_16_ID) .ordinalPosition(15) .name("Catsize") .internalName("catsize") @@ -5822,7 +5688,7 @@ public abstract class BaseTest { .view(VIEW_4) .build(), ViewColumn.builder() - .id(28L) + .id(COLUMN_5_17_ID) .ordinalPosition(16) .name("Class Type") .internalName("class_type") @@ -5831,12 +5697,10 @@ public abstract class BaseTest { .view(VIEW_4) .build()); - public static final Long VIEW_5_ID = 5L; + public static final UUID VIEW_5_ID = UUID.fromString("bc6b8507-51f1-4d05-bb0c-1f619a991dec"); public static final Boolean VIEW_5_INITIAL_VIEW = false; public static final String VIEW_5_NAME = "Mock View"; public static final String VIEW_5_INTERNAL_NAME = "mock_view"; - public static final Long VIEW_5_CONTAINER_ID = CONTAINER_2_ID; - public static final Long VIEW_5_DATABASE_ID = DATABASE_3_ID; public static final Boolean VIEW_5_PUBLIC = true; public static final Boolean VIEW_5_SCHEMA_PUBLIC = true; public static final String VIEW_5_QUERY = "SELECT `location`, `lat`, `lng` FROM `weather_location` WHERE `location` = 'Albury'"; @@ -5847,7 +5711,6 @@ public abstract class BaseTest { .isInitialView(VIEW_5_INITIAL_VIEW) .name(VIEW_5_NAME) .internalName(VIEW_5_INTERNAL_NAME) - .vdbid(VIEW_5_DATABASE_ID) .isPublic(VIEW_5_PUBLIC) .isSchemaPublic(VIEW_5_SCHEMA_PUBLIC) .query(VIEW_5_QUERY) @@ -5859,10 +5722,10 @@ public abstract class BaseTest { public static final ViewDto VIEW_5_DTO = ViewDto.builder() .id(VIEW_5_ID) + .databaseId(DATABASE_3_ID) .isInitialView(VIEW_5_INITIAL_VIEW) .name(VIEW_5_NAME) .internalName(VIEW_5_INTERNAL_NAME) - .vdbid(VIEW_5_DATABASE_ID) .isPublic(VIEW_5_PUBLIC) .isSchemaPublic(VIEW_5_SCHEMA_PUBLIC) .query(VIEW_5_QUERY) @@ -5876,7 +5739,7 @@ public abstract class BaseTest { .isInitialView(VIEW_5_INITIAL_VIEW) .name(VIEW_5_NAME) .internalName(VIEW_5_INTERNAL_NAME) - .vdbid(VIEW_5_DATABASE_ID) + .vdbid(DATABASE_3_ID) .isPublic(VIEW_5_PUBLIC) .isSchemaPublic(VIEW_5_SCHEMA_PUBLIC) .query(VIEW_5_QUERY) @@ -5885,7 +5748,7 @@ public abstract class BaseTest { public static final List<ViewColumn> VIEW_5_COLUMNS = List.of( ViewColumn.builder() - .id(29L) + .id(COLUMN_2_1_ID) .ordinalPosition(0) .name("location") .internalName("location") @@ -5895,7 +5758,7 @@ public abstract class BaseTest { .view(VIEW_5) .build(), ViewColumn.builder() - .id(30L) + .id(COLUMN_2_2_ID) .ordinalPosition(1) .name("lat") .internalName("lat") @@ -5906,7 +5769,7 @@ public abstract class BaseTest { .view(VIEW_5) .build(), ViewColumn.builder() - .id(31L) + .id(COLUMN_2_3_ID) .ordinalPosition(2) .name("lng") .internalName("lng") @@ -5919,7 +5782,7 @@ public abstract class BaseTest { public static final List<ViewColumnDto> VIEW_5_COLUMNS_DTO = List.of( ViewColumnDto.builder() - .id(29L) + .id(COLUMN_2_1_ID) .databaseId(DATABASE_3_ID) .ordinalPosition(0) .name("location") @@ -5929,7 +5792,7 @@ public abstract class BaseTest { .isNullAllowed(false) .build(), ViewColumnDto.builder() - .id(30L) + .id(COLUMN_2_2_ID) .databaseId(DATABASE_3_ID) .ordinalPosition(1) .name("lat") @@ -5940,7 +5803,7 @@ public abstract class BaseTest { .isNullAllowed(true) .build(), ViewColumnDto.builder() - .id(31L) + .id(COLUMN_2_3_ID) .databaseId(DATABASE_3_ID) .ordinalPosition(2) .name("lng") @@ -5976,8 +5839,7 @@ public abstract class BaseTest { .uri(LICENSE_1_URI) .build(); - public static final Long CREATOR_1_ID = 1L; - public static final Long CREATOR_1_QUERY_ID = 1L; + public static final UUID CREATOR_1_ID = UUID.fromString("a0417f34-80ff-419f-821d-ce179021484a"); public static final String CREATOR_1_ORCID = "00000-00000-00000"; public static final String CREATOR_1_AFFIL = "TU Graz"; public static final String CREATOR_1_AFFIL_ROR = "https://ror.org/04wn28048"; @@ -6020,7 +5882,7 @@ public abstract class BaseTest { .build()) .build(); - public static final Long CREATOR_2_ID = 2L; + public static final UUID CREATOR_2_ID = UUID.fromString("56b70dae-17a7-4f76-9c1e-a493762ba760"); public static final Long CREATOR_2_QUERY_ID = 1L; public static final String CREATOR_2_ORCID = "00000-00000-00000"; public static final String CREATOR_2_AFFIL = "TU Wien"; @@ -6030,7 +5892,7 @@ public abstract class BaseTest { public static final Instant CREATOR_2_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant CREATOR_2_MODIFIED = Instant.ofEpochSecond(1541588352L); - public static final Long CREATOR_3_ID = 3L; + public static final UUID CREATOR_3_ID = UUID.fromString("a2dfea46-7d88-4069-9b93-2417e1fb578b"); public static final Long CREATOR_3_QUERY_ID = 1L; public static final String CREATOR_3_ORCID = "00000-00000-00000"; public static final String CREATOR_3_AFFIL = "TU Graz"; @@ -6044,7 +5906,7 @@ public abstract class BaseTest { public static final Instant CREATOR_3_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant CREATOR_3_MODIFIED = Instant.ofEpochSecond(1541588352L); - public static final Long CREATOR_4_ID = 4L; + public static final UUID CREATOR_4_ID = UUID.fromString("473489fa-ad02-4e48-856f-5a3f83ff541d"); public static final Long CREATOR_4_QUERY_ID = 1L; public static final String CREATOR_4_ORCID = "00000-00000-00000"; public static final String CREATOR_4_AFFIL = "TU Wien"; @@ -6058,10 +5920,7 @@ public abstract class BaseTest { public static final Instant CREATOR_4_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant CREATOR_4_MODIFIED = Instant.ofEpochSecond(1541588352L); - public static final Long IDENTIFIER_1_ID = 1L; - public static final Long IDENTIFIER_1_QUERY_ID = null; - public static final Long IDENTIFIER_1_CONTAINER_ID = CONTAINER_1_ID; - public static final Long IDENTIFIER_1_DATABASE_ID = DATABASE_1_ID; + public static final UUID IDENTIFIER_1_ID = UUID.fromString("679a83f2-ef23-4b4b-98f7-ad77b9d68733"); public static final String IDENTIFIER_1_DOI = "10.12345/183"; public static final Instant IDENTIFIER_1_CREATED = Instant.ofEpochSecond(1641588352L) /* 2022-01-07 20:45:52 */; public static final Instant IDENTIFIER_1_MODIFIED = Instant.ofEpochSecond(1541588352L) /* 2022-01-07 20:45:52 */; @@ -6069,19 +5928,13 @@ public abstract class BaseTest { public static final Integer IDENTIFIER_1_PUBLICATION_MONTH = 5; public static final Integer IDENTIFIER_1_PUBLICATION_YEAR = 2022; public static final Integer IDENTIFIER_1_PUBLICATION_DAY = null; - public static final String IDENTIFIER_1_QUERY_HASH = QUERY_1_QUERY_HASH; - public static final String IDENTIFIER_1_RESULT_HASH = QUERY_1_RESULT_HASH; - public static final String IDENTIFIER_1_QUERY = QUERY_1_STATEMENT; - public static final String IDENTIFIER_1_NORMALIZED = QUERY_1_STATEMENT; - public static final Long IDENTIFIER_1_RESULT_NUMBER = QUERY_1_RESULT_NUMBER; public static final String IDENTIFIER_1_PUBLISHER = "Austrian Government"; public static final IdentifierType IDENTIFIER_1_TYPE = IdentifierType.DATABASE; public static final IdentifierTypeDto IDENTIFIER_1_TYPE_DTO = IdentifierTypeDto.DATABASE; public static final IdentifierStatusType IDENTIFIER_1_STATUS_TYPE = IdentifierStatusType.PUBLISHED; public static final IdentifierStatusTypeDto IDENTIFIER_1_STATUS_TYPE_DTO = IdentifierStatusTypeDto.PUBLISHED; - public static final Long IDENTIFIER_1_TITLE_1_ID = 1L; - public static final Long IDENTIFIER_1_TITLE_1_IDENTIFIER_ID = IDENTIFIER_1_ID; + public static final UUID IDENTIFIER_1_TITLE_1_ID = UUID.fromString("3df6b286-9bd2-4ae3-b8f4-29c217544bef"); public static final String IDENTIFIER_1_TITLE_1_TITLE = "Austrian weather data"; public static final String IDENTIFIER_1_TITLE_1_TITLE_MODIFY = "Austrian weather some data"; public static final TitleType IDENTIFIER_1_TITLE_1_TYPE = null; @@ -6122,8 +5975,7 @@ public abstract class BaseTest { .language(IDENTIFIER_1_TITLE_1_LANG_DTO) .build(); - public static final Long IDENTIFIER_1_TITLE_2_ID = 2L; - public static final Long IDENTIFIER_1_TITLE_2_IDENTIFIER_ID = IDENTIFIER_1_ID; + public static final UUID IDENTIFIER_1_TITLE_2_ID = UUID.fromString("903a7e5b-8014-4b8a-b8fd-44f477880905"); public static final String IDENTIFIER_1_TITLE_2_TITLE = "Österreichische Wetterdaten"; public static final String IDENTIFIER_1_TITLE_2_TITLE_MODIFY = "Österreichische Wetterdaten übersetzt"; public static final TitleType IDENTIFIER_1_TITLE_2_TYPE = TitleType.TRANSLATED_TITLE; @@ -6164,8 +6016,7 @@ public abstract class BaseTest { .language(IDENTIFIER_1_TITLE_2_LANG_DTO) .build(); - public static final Long IDENTIFIER_1_DESCRIPTION_1_ID = 1L; - public static final Long IDENTIFIER_1_DESCRIPTION_1_IDENTIFIER_ID = IDENTIFIER_1_ID; + public static final UUID IDENTIFIER_1_DESCRIPTION_1_ID = UUID.fromString("1c438756-93f0-4797-983c-175a17e18c2c"); public static final String IDENTIFIER_1_DESCRIPTION_1_DESCRIPTION = "Selecting all from the weather Austrian table"; public static final String IDENTIFIER_1_DESCRIPTION_1_DESCRIPTION_MODIFY = "Selecting some from the weather Austrian table"; public static final DescriptionType IDENTIFIER_1_DESCRIPTION_1_TYPE = null; @@ -6201,7 +6052,7 @@ public abstract class BaseTest { .language(IDENTIFIER_1_DESCRIPTION_1_LANG_DTO) .build(); - public static final Long IDENTIFIER_1_CREATOR_1_ID = 1L; + public static final UUID IDENTIFIER_1_CREATOR_1_ID = UUID.fromString("667cd1d6-4f94-4808-b5cb-12e5ec0788d8"); public static final String IDENTIFIER_1_CREATOR_1_FIRSTNAME = CREATOR_1_FIRSTNAME; public static final String IDENTIFIER_1_CREATOR_1_LASTNAME = CREATOR_1_LASTNAME; public static final String IDENTIFIER_1_CREATOR_1_NAME = CREATOR_1_NAME; @@ -6255,7 +6106,7 @@ public abstract class BaseTest { .affiliationIdentifierScheme(IDENTIFIER_1_CREATOR_1_AFFILIATION_IDENTIFIER_SCHEME_DTO) .build(); - public static final Long FUNDER_1_ID = 1L; + public static final UUID FUNDER_1_ID = UUID.fromString("8deb273d-6dd6-407d-970a-01534035ac01"); public static final String FUNDER_1_NAME = "European Commission"; public static final String FUNDER_1_IDENTIFIER = "https://doi.org/10.13039/501100000780"; public static final String FUNDER_1_IDENTIFIER_ID_ONLY = "10.13039/501100000780"; @@ -6297,7 +6148,7 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_1 = Identifier.builder() .id(IDENTIFIER_1_ID) - .queryId(IDENTIFIER_1_QUERY_ID) + .queryId(QUERY_1_ID) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1, IDENTIFIER_1_TITLE_2))) .descriptions(new LinkedList<>(List.of(IDENTIFIER_1_DESCRIPTION_1))) .doi(IDENTIFIER_1_DOI) @@ -6307,11 +6158,11 @@ public abstract class BaseTest { .execution(IDENTIFIER_1_EXECUTION) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) .publicationMonth(IDENTIFIER_1_PUBLICATION_MONTH) - .queryHash(IDENTIFIER_1_QUERY_HASH) - .resultHash(IDENTIFIER_1_RESULT_HASH) - .query(IDENTIFIER_1_QUERY) - .queryNormalized(IDENTIFIER_1_NORMALIZED) - .resultNumber(IDENTIFIER_1_RESULT_NUMBER) + .queryHash(QUERY_1_QUERY_HASH) + .resultHash(QUERY_1_RESULT_HASH) + .query(QUERY_1_STATEMENT) + .queryNormalized(QUERY_1_STATEMENT) + .resultNumber(QUERY_1_RESULT_NUMBER) .publisher(IDENTIFIER_1_PUBLISHER) .type(IDENTIFIER_1_TYPE) .owner(USER_1) @@ -6324,7 +6175,6 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_1_WITH_DOI = Identifier.builder() .id(IDENTIFIER_1_ID) - .queryId(IDENTIFIER_1_QUERY_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_1_DESCRIPTION_1))) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1, IDENTIFIER_1_TITLE_2))) .doi(IDENTIFIER_1_DOI) @@ -6334,11 +6184,11 @@ public abstract class BaseTest { .execution(IDENTIFIER_1_EXECUTION) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) .publicationMonth(IDENTIFIER_1_PUBLICATION_MONTH) - .queryHash(IDENTIFIER_1_QUERY_HASH) - .resultHash(IDENTIFIER_1_RESULT_HASH) - .query(IDENTIFIER_1_QUERY) - .queryNormalized(IDENTIFIER_1_NORMALIZED) - .resultNumber(IDENTIFIER_1_RESULT_NUMBER) + .queryHash(QUERY_1_QUERY_HASH) + .resultHash(QUERY_1_RESULT_HASH) + .query(QUERY_1_STATEMENT) + .queryNormalized(QUERY_1_STATEMENT) + .resultNumber(QUERY_1_RESULT_NUMBER) .publisher(IDENTIFIER_1_PUBLISHER) .type(IDENTIFIER_1_TYPE) .owner(USER_1) @@ -6351,18 +6201,18 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_1_DTO = IdentifierDto.builder() .id(IDENTIFIER_1_ID) .databaseId(DATABASE_1_ID) - .queryId(IDENTIFIER_1_QUERY_ID) + .queryId(QUERY_1_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_1_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1_DTO, IDENTIFIER_1_TITLE_2_DTO))) .doi(IDENTIFIER_1_DOI) .execution(IDENTIFIER_1_EXECUTION) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) .publicationMonth(IDENTIFIER_1_PUBLICATION_MONTH) - .queryHash(IDENTIFIER_1_QUERY_HASH) - .resultHash(IDENTIFIER_1_RESULT_HASH) - .query(IDENTIFIER_1_QUERY) - .queryNormalized(IDENTIFIER_1_NORMALIZED) - .resultNumber(IDENTIFIER_1_RESULT_NUMBER) + .queryHash(QUERY_1_QUERY_HASH) + .resultHash(QUERY_1_RESULT_HASH) + .query(QUERY_1_STATEMENT) + .queryNormalized(QUERY_1_STATEMENT) + .resultNumber(QUERY_1_RESULT_NUMBER) .publisher(IDENTIFIER_1_PUBLISHER) .type(IDENTIFIER_1_TYPE_DTO) .owner(USER_1_BRIEF_DTO) @@ -6375,7 +6225,6 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_1_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_1_ID) .databaseId(DATABASE_1_ID) - .queryId(IDENTIFIER_1_QUERY_ID) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1_DTO, IDENTIFIER_1_TITLE_2_DTO))) .doi(IDENTIFIER_1_DOI) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) @@ -6385,7 +6234,7 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_1_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .type(IDENTIFIER_1_TYPE_DTO) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) .publisher(IDENTIFIER_1_PUBLISHER) @@ -6402,7 +6251,7 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_1_CREATE_WITH_DOI_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .type(IDENTIFIER_1_TYPE_DTO) .doi(IDENTIFIER_1_DOI) .publicationYear(IDENTIFIER_1_PUBLICATION_YEAR) @@ -6420,7 +6269,7 @@ public abstract class BaseTest { public static final IdentifierSaveDto IDENTIFIER_1_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_1_ID) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_1_DESCRIPTION_1_CREATE_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO, IDENTIFIER_1_TITLE_2_CREATE_DTO))) .relatedIdentifiers(new LinkedList<>()) @@ -6435,7 +6284,7 @@ public abstract class BaseTest { public static final IdentifierSaveDto IDENTIFIER_1_SAVE_MODIFY_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_1_ID) - .databaseId(IDENTIFIER_1_DATABASE_ID) + .databaseId(DATABASE_1_ID) .descriptions(new LinkedList<>(List.of())) // <<< .titles(new LinkedList<>(List.of(IDENTIFIER_1_TITLE_1_CREATE_DTO))) // <<< .relatedIdentifiers(new LinkedList<>()) @@ -6448,10 +6297,7 @@ public abstract class BaseTest { .licenses(new LinkedList<>(List.of())) // <<< .build(); - public static final Long IDENTIFIER_5_ID = 5L; - public static final Long IDENTIFIER_5_QUERY_ID = QUERY_2_ID; - public static final Long IDENTIFIER_5_CONTAINER_ID = CONTAINER_2_ID; - public static final Long IDENTIFIER_5_DATABASE_ID = DATABASE_2_ID; + public static final UUID IDENTIFIER_5_ID = UUID.fromString("e05bb4c9-ed26-48c9-bd91-5c48a93a04bd"); public static final String IDENTIFIER_5_DOI = "10.12345/13/50BBFCFE08A12"; public static final Instant IDENTIFIER_5_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant IDENTIFIER_5_MODIFIED = Instant.ofEpochSecond(1541588352L); @@ -6471,8 +6317,7 @@ public abstract class BaseTest { public static final IdentifierStatusTypeDto IDENTIFIER_5_STATUS_TYPE_DTO = IdentifierStatusTypeDto.DRAFT; public static final UUID IDENTIFIER_5_CREATED_BY = USER_2_ID; - public static final Long IDENTIFIER_5_TITLE_1_ID = 3L; - public static final Long IDENTIFIER_5_TITLE_1_IDENTIFIER_ID = IDENTIFIER_5_ID; + public static final UUID IDENTIFIER_5_TITLE_1_ID = UUID.fromString("1a0ae9c2-61c6-44f8-b886-26a4f4dabc52"); public static final String IDENTIFIER_5_TITLE_1_TITLE = "Australische Wetterdaten"; public static final LanguageType IDENTIFIER_5_TITLE_1_LANG = LanguageType.DE; public static final LanguageTypeDto IDENTIFIER_5_TITLE_1_LANG_DTO = LanguageTypeDto.DE; @@ -6499,8 +6344,7 @@ public abstract class BaseTest { .titleType(IDENTIFIER_5_TITLE_1_TYPE_DTO) .build(); - public static final Long IDENTIFIER_5_DESCRIPTION_1_ID = 2L; - public static final Long IDENTIFIER_5_DESCRIPTION_1_IDENTIFIER_ID = IDENTIFIER_5_ID; + public static final UUID IDENTIFIER_5_DESCRIPTION_1_ID = UUID.fromString("ab49bdca-f373-4823-9947-2a0cbfa88350"); public static final String IDENTIFIER_5_DESCRIPTION_1_DESCRIPTION = "Alle Wetterdaten in Australien"; public static final LanguageType IDENTIFIER_5_DESCRIPTION_1_LANG = LanguageType.DE; public static final LanguageTypeDto IDENTIFIER_5_DESCRIPTION_1_LANG_DTO = LanguageTypeDto.DE; @@ -6528,7 +6372,7 @@ public abstract class BaseTest { .descriptionType(IDENTIFIER_5_DESCRIPTION_1_TYPE_DTO) .build(); - public static final Long IDENTIFIER_5_CREATOR_1_ID = 2L; + public static final UUID IDENTIFIER_5_CREATOR_1_ID = UUID.fromString("6844b684-93e4-47d2-a615-5939127fdafe"); public static final Creator IDENTIFIER_5_CREATOR_1 = Creator.builder() .id(IDENTIFIER_5_CREATOR_1_ID) @@ -6574,7 +6418,7 @@ public abstract class BaseTest { .affiliation(CREATOR_1_AFFIL) .build(); - public static final Long IDENTIFIER_5_CREATOR_2_ID = 3L; + public static final UUID IDENTIFIER_5_CREATOR_2_ID = UUID.fromString("14943ad6-a935-49f5-b07e-f9eb789b8604"); public static final Creator IDENTIFIER_5_CREATOR_2 = Creator.builder() .id(IDENTIFIER_5_CREATOR_2_ID) @@ -6616,7 +6460,8 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_5 = Identifier.builder() .id(IDENTIFIER_5_ID) - .queryId(IDENTIFIER_5_QUERY_ID) + .queryId(QUERY_2_ID) + .database(null) /* DATABASE_2 */ .descriptions(new LinkedList<>(List.of(IDENTIFIER_5_DESCRIPTION_1))) .titles(new LinkedList<>(List.of(IDENTIFIER_5_TITLE_1))) .doi(IDENTIFIER_5_DOI) @@ -6642,7 +6487,7 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_5_DTO = IdentifierDto.builder() .id(IDENTIFIER_5_ID) .databaseId(DATABASE_2_ID) - .queryId(IDENTIFIER_5_QUERY_ID) + .queryId(QUERY_2_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_5_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_5_TITLE_1_DTO))) .doi(IDENTIFIER_5_DOI) @@ -6665,7 +6510,7 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_5_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_5_ID) .databaseId(DATABASE_2_ID) - .queryId(IDENTIFIER_5_QUERY_ID) + .queryId(QUERY_2_ID) .titles(new LinkedList<>(List.of(IDENTIFIER_5_TITLE_1_DTO))) .doi(IDENTIFIER_5_DOI) .publicationYear(IDENTIFIER_5_PUBLICATION_YEAR) @@ -6673,8 +6518,7 @@ public abstract class BaseTest { .type(IDENTIFIER_5_TYPE_DTO) .build(); - public static final Long RELATED_IDENTIFIER_5_ID = 1L; - public static final Long RELATED_IDENTIFIER_5_IDENTIFIER_ID = 2L; + public static final UUID RELATED_IDENTIFIER_5_ID = UUID.fromString("26545877-574d-44fa-819d-d9d9a9750b38"); public static final String RELATED_IDENTIFIER_5_VALUE = "10.5281/zenodo.6637333"; public static final RelatedType RELATED_IDENTIFIER_5_TYPE = RelatedType.DOI; public static final RelatedTypeDto RELATED_IDENTIFIER_5_TYPE_DTO = RelatedTypeDto.DOI; @@ -6696,15 +6540,15 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_5_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_5_DATABASE_ID) + .databaseId(DATABASE_2_ID) .publicationYear(IDENTIFIER_5_PUBLICATION_YEAR) .publisher(IDENTIFIER_5_PUBLISHER) .build(); public static final IdentifierSaveDto IDENTIFIER_5_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_5_ID) - .queryId(IDENTIFIER_5_QUERY_ID) - .databaseId(IDENTIFIER_5_DATABASE_ID) + .queryId(QUERY_2_ID) + .databaseId(DATABASE_2_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_5_DESCRIPTION_1_CREATE_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_5_TITLE_1_CREATE_DTO))) .relatedIdentifiers(new LinkedList<>(List.of(IDENTIFIER_1_RELATED_IDENTIFIER_5_CREATE_DTO))) @@ -6717,10 +6561,7 @@ public abstract class BaseTest { .type(IDENTIFIER_5_TYPE_DTO) .build(); - public static final Long IDENTIFIER_6_ID = 6L; - public static final Long IDENTIFIER_6_QUERY_ID = QUERY_3_ID; - public static final Long IDENTIFIER_6_CONTAINER_ID = CONTAINER_3_ID; - public static final Long IDENTIFIER_6_DATABASE_ID = DATABASE_3_ID; + public static final UUID IDENTIFIER_6_ID = UUID.fromString("a244204d-9671-42a0-be07-9b14402238fd"); public static final String IDENTIFIER_6_DOI = null; public static final Instant IDENTIFIER_6_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant IDENTIFIER_6_MODIFIED = Instant.ofEpochSecond(1541588352L); @@ -6739,8 +6580,7 @@ public abstract class BaseTest { public static final IdentifierStatusType IDENTIFIER_6_STATUS_TYPE = IdentifierStatusType.PUBLISHED; public static final IdentifierStatusTypeDto IDENTIFIER_6_STATUS_TYPE_DTO = IdentifierStatusTypeDto.PUBLISHED; - public static final Long IDENTIFIER_6_TITLE_1_ID = 4L; - public static final Long IDENTIFIER_6_TITLE_1_IDENTIFIER_ID = IDENTIFIER_6_ID; + public static final UUID IDENTIFIER_6_TITLE_1_ID = UUID.fromString("0449011c-1490-4c8e-b46c-c1f862126aea"); public static final String IDENTIFIER_6_TITLE_1_TITLE = "Norwegian weather data"; public static final String IDENTIFIER_6_TITLE_1_TITLE_MODIFY = "Norwegian weather some data"; public static final LanguageType IDENTIFIER_6_TITLE_1_LANG = LanguageType.EN; @@ -6769,8 +6609,7 @@ public abstract class BaseTest { .language(IDENTIFIER_6_TITLE_1_LANG_DTO) .build(); - public static final Long IDENTIFIER_6_DESCRIPTION_1_ID = 3L; - public static final Long IDENTIFIER_6_DESCRIPTION_1_IDENTIFIER_ID = IDENTIFIER_6_ID; + public static final UUID IDENTIFIER_6_DESCRIPTION_1_ID = UUID.fromString("aac03bbd-27e6-419d-8118-f996d594f00f"); public static final String IDENTIFIER_6_DESCRIPTION_1_DESCRIPTION = "Selecting all from the weather Norwegian table"; public static final String IDENTIFIER_6_DESCRIPTION_1_DESCRIPTION_MODIFY = "Selecting some from the weather Norwegian table"; public static final LanguageType IDENTIFIER_6_DESCRIPTION_1_LANG = LanguageType.EN; @@ -6800,7 +6639,7 @@ public abstract class BaseTest { .language(IDENTIFIER_6_DESCRIPTION_1_LANG_DTO) .build(); - private final static Long IDENTIFIER_6_CREATOR_1_ID = 4L; + private final static UUID IDENTIFIER_6_CREATOR_1_ID = UUID.fromString("f8a52dca-8aec-46c1-b0e1-603dbe6a1a65"); public static final Creator IDENTIFIER_6_CREATOR_1 = Creator.builder() .id(IDENTIFIER_6_CREATOR_1_ID) @@ -6850,7 +6689,7 @@ public abstract class BaseTest { .affiliationIdentifierScheme(CREATOR_1_AFFIL_TYPE_DTO) .build(); - private final static Long IDENTIFIER_6_CREATOR_2_ID = 5L; + private final static UUID IDENTIFIER_6_CREATOR_2_ID = UUID.fromString("eeae78cb-75a1-42e2-b608-7082e5fbecc6"); public static final Creator IDENTIFIER_6_CREATOR_2 = Creator.builder() .id(IDENTIFIER_6_CREATOR_2_ID) @@ -6872,7 +6711,7 @@ public abstract class BaseTest { .affiliation(CREATOR_2_AFFIL) .build(); - private final static Long IDENTIFIER_6_CREATOR_3_ID = 6L; + private final static UUID IDENTIFIER_6_CREATOR_3_ID = UUID.fromString("700058f1-6314-4cd1-9c0c-62e75c8f422b"); public static final Creator IDENTIFIER_6_CREATOR_3 = Creator.builder() .id(IDENTIFIER_6_CREATOR_3_ID) @@ -6902,7 +6741,7 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_6 = Identifier.builder() .id(IDENTIFIER_6_ID) - .queryId(IDENTIFIER_6_QUERY_ID) + .queryId(QUERY_3_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_6_DESCRIPTION_1))) .titles(new LinkedList<>(List.of(IDENTIFIER_6_TITLE_1))) .doi(IDENTIFIER_6_DOI) @@ -6929,7 +6768,7 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_6_DTO = IdentifierDto.builder() .id(IDENTIFIER_6_ID) .databaseId(DATABASE_3_ID) - .queryId(IDENTIFIER_6_QUERY_ID) + .queryId(QUERY_3_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_6_DESCRIPTION_1_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_6_TITLE_1_DTO))) .doi(IDENTIFIER_6_DOI) @@ -6954,7 +6793,7 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_6_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_6_ID) .databaseId(DATABASE_3_ID) - .queryId(IDENTIFIER_6_QUERY_ID) + .queryId(QUERY_3_ID) .titles(new LinkedList<>(List.of(IDENTIFIER_6_TITLE_1_DTO))) .doi(IDENTIFIER_6_DOI) .publicationYear(IDENTIFIER_6_PUBLICATION_YEAR) @@ -6964,15 +6803,15 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_6_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_6_DATABASE_ID) + .databaseId(DATABASE_3_ID) .publicationYear(IDENTIFIER_6_PUBLICATION_YEAR) .publisher(IDENTIFIER_6_PUBLISHER) .build(); public static final IdentifierSaveDto IDENTIFIER_6_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_6_ID) - .databaseId(IDENTIFIER_6_DATABASE_ID) - .queryId(IDENTIFIER_6_QUERY_ID) + .databaseId(DATABASE_3_ID) + .queryId(QUERY_3_ID) .descriptions(new LinkedList<>(List.of(IDENTIFIER_6_DESCRIPTION_1_CREATE_DTO))) .titles(new LinkedList<>(List.of(IDENTIFIER_6_TITLE_1_CREATE_DTO))) .relatedIdentifiers(new LinkedList<>()) @@ -6984,8 +6823,7 @@ public abstract class BaseTest { .licenses(new LinkedList<>(List.of(LICENSE_1_DTO))) .build(); - public static final Long IDENTIFIER_7_ID = 7L; - public static final Long IDENTIFIER_7_DATABASE_ID = DATABASE_4_ID; + public static final UUID IDENTIFIER_7_ID = UUID.fromString("b216ae00-a31d-4ecb-95fb-37eb4da3946f"); public static final String IDENTIFIER_7_DOI = null; public static final Instant IDENTIFIER_7_CREATED = Instant.ofEpochSecond(1641588352L); public static final Instant IDENTIFIER_7_MODIFIED = Instant.ofEpochSecond(1541588352L); @@ -7009,7 +6847,7 @@ public abstract class BaseTest { .build()) .build(); - private final static Long IDENTIFIER_7_CREATOR_1_ID = 6L; + private final static UUID IDENTIFIER_7_CREATOR_1_ID = UUID.fromString("b899c367-06c7-4f47-8aea-5f15061ee3ee"); public static final Creator IDENTIFIER_7_CREATOR_1 = Creator.builder() .id(IDENTIFIER_7_CREATOR_1_ID) @@ -7069,14 +6907,14 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_7_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_7_DATABASE_ID) + .databaseId(DATABASE_4_ID) .publicationYear(IDENTIFIER_7_PUBLICATION_YEAR) .publisher(IDENTIFIER_7_PUBLISHER) .build(); public static final IdentifierSaveDto IDENTIFIER_7_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_7_ID) - .databaseId(IDENTIFIER_7_DATABASE_ID) + .databaseId(DATABASE_4_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .relatedIdentifiers(new LinkedList<>()) @@ -7089,8 +6927,7 @@ public abstract class BaseTest { .type(IDENTIFIER_7_TYPE_DTO) .build(); - public static final Long IDENTIFIER_2_ID = 2L; - public static final Long IDENTIFIER_2_DATABASE_ID = DATABASE_1_ID; + public static final UUID IDENTIFIER_2_ID = UUID.fromString("fdb95f60-48e7-4e74-8122-d3c8d079c889"); public static final String IDENTIFIER_2_DOI = null; public static final Instant IDENTIFIER_2_CREATED = Instant.ofEpochSecond(1651588352L); public static final Instant IDENTIFIER_2_MODIFIED = Instant.ofEpochSecond(1551588352L); @@ -7101,7 +6938,6 @@ public abstract class BaseTest { public static final String IDENTIFIER_2_QUERY_HASH = QUERY_1_QUERY_HASH; public static final String IDENTIFIER_2_RESULT_HASH = QUERY_1_RESULT_HASH; public static final String IDENTIFIER_2_QUERY = QUERY_1_STATEMENT; - public static final Long IDENTIFIER_2_QUERY_ID = QUERY_1_ID; public static final String IDENTIFIER_2_NORMALIZED = QUERY_1_STATEMENT; public static final Long IDENTIFIER_2_RESULT_NUMBER = QUERY_1_RESULT_NUMBER; public static final String IDENTIFIER_2_PUBLISHER = "Swedish Government"; @@ -7112,8 +6948,8 @@ public abstract class BaseTest { public static final UUID IDENTIFIER_2_CREATED_BY = USER_1_ID; public static final CreateIdentifierDto IDENTIFIER_2_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_2_DATABASE_ID) - .queryId(IDENTIFIER_2_QUERY_ID) + .databaseId(DATABASE_1_ID) + .queryId(QUERY_1_ID) .type(IDENTIFIER_2_TYPE_DTO) .publicationYear(IDENTIFIER_2_PUBLICATION_YEAR) .publisher(IDENTIFIER_2_PUBLISHER) @@ -7121,7 +6957,7 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_2 = Identifier.builder() .id(IDENTIFIER_2_ID) - .queryId(IDENTIFIER_2_QUERY_ID) + .queryId(QUERY_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_2_DOI) @@ -7148,8 +6984,8 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_2_DTO = IdentifierDto.builder() .id(IDENTIFIER_2_ID) - .queryId(IDENTIFIER_2_QUERY_ID) - .databaseId(IDENTIFIER_2_DATABASE_ID) + .queryId(QUERY_1_ID) + .databaseId(DATABASE_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_2_DOI) @@ -7172,8 +7008,8 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_2_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_2_ID) - .queryId(IDENTIFIER_2_QUERY_ID) - .databaseId(IDENTIFIER_2_DATABASE_ID) + .queryId(QUERY_1_ID) + .databaseId(DATABASE_1_ID) .titles(new LinkedList<>()) .doi(IDENTIFIER_2_DOI) .publicationYear(IDENTIFIER_2_PUBLICATION_YEAR) @@ -7184,8 +7020,8 @@ public abstract class BaseTest { public static final IdentifierSaveDto IDENTIFIER_2_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_2_ID) - .databaseId(IDENTIFIER_2_DATABASE_ID) - .queryId(IDENTIFIER_2_QUERY_ID) + .databaseId(DATABASE_1_ID) + .queryId(QUERY_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .relatedIdentifiers(new LinkedList<>()) @@ -7198,9 +7034,7 @@ public abstract class BaseTest { .queryId(QUERY_1_ID) .build(); - public static final Long IDENTIFIER_3_ID = 3L; - public static final Long IDENTIFIER_3_DATABASE_ID = DATABASE_1_ID; - public static final Long IDENTIFIER_3_VIEW_ID = VIEW_1_ID; + public static final UUID IDENTIFIER_3_ID = UUID.fromString("e2d831c2-3694-4fdc-8c48-7a7e94b73c43"); public static final String IDENTIFIER_3_DOI = null; public static final Instant IDENTIFIER_3_CREATED = Instant.ofEpochSecond(1651588352L); public static final Instant IDENTIFIER_3_MODIFIED = Instant.ofEpochSecond(1551588352L); @@ -7222,7 +7056,7 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_3 = Identifier.builder() .id(IDENTIFIER_3_ID) - .viewId(IDENTIFIER_3_VIEW_ID) + .viewId(VIEW_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_3_DOI) @@ -7249,8 +7083,8 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_3_DTO = IdentifierDto.builder() .id(IDENTIFIER_3_ID) - .databaseId(IDENTIFIER_3_DATABASE_ID) - .viewId(IDENTIFIER_3_VIEW_ID) + .databaseId(DATABASE_1_ID) + .viewId(VIEW_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_3_DOI) @@ -7273,8 +7107,8 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_3_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_3_ID) - .databaseId(IDENTIFIER_3_DATABASE_ID) - .viewId(IDENTIFIER_3_VIEW_ID) + .databaseId(DATABASE_1_ID) + .viewId(VIEW_1_ID) .titles(new LinkedList<>()) .doi(IDENTIFIER_3_DOI) .publicationYear(IDENTIFIER_3_PUBLICATION_YEAR) @@ -7284,8 +7118,8 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_3_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_3_DATABASE_ID) - .viewId(IDENTIFIER_3_VIEW_ID) + .databaseId(DATABASE_1_ID) + .viewId(VIEW_1_ID) .type(IDENTIFIER_3_TYPE_DTO) .publicationYear(IDENTIFIER_3_PUBLICATION_YEAR) .publisher(IDENTIFIER_3_PUBLISHER) @@ -7293,8 +7127,8 @@ public abstract class BaseTest { public static final IdentifierSaveDto IDENTIFIER_3_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_3_ID) - .databaseId(IDENTIFIER_3_DATABASE_ID) - .viewId(IDENTIFIER_3_VIEW_ID) + .databaseId(DATABASE_1_ID) + .viewId(VIEW_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .relatedIdentifiers(new LinkedList<>()) @@ -7306,9 +7140,7 @@ public abstract class BaseTest { .licenses(new LinkedList<>(List.of(LICENSE_1_DTO))) .build(); - public static final Long IDENTIFIER_4_ID = 4L; - public static final Long IDENTIFIER_4_DATABASE_ID = DATABASE_1_ID; - public static final Long IDENTIFIER_4_TABLE_ID = TABLE_1_ID; + public static final UUID IDENTIFIER_4_ID = UUID.fromString("3bd69bb8-f7e3-48e4-9717-823787e7ba23"); public static final String IDENTIFIER_4_DOI = null; public static final Instant IDENTIFIER_4_CREATED = Instant.ofEpochSecond(1751588352L); public static final Instant IDENTIFIER_4_MODIFIED = Instant.ofEpochSecond(1551588352L); @@ -7327,7 +7159,7 @@ public abstract class BaseTest { public static final Identifier IDENTIFIER_4 = Identifier.builder() .id(IDENTIFIER_4_ID) - .tableId(IDENTIFIER_4_TABLE_ID) + .tableId(TABLE_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_4_DOI) @@ -7351,8 +7183,8 @@ public abstract class BaseTest { public static final IdentifierDto IDENTIFIER_4_DTO = IdentifierDto.builder() .id(IDENTIFIER_4_ID) - .databaseId(IDENTIFIER_4_DATABASE_ID) - .tableId(IDENTIFIER_4_TABLE_ID) + .databaseId(DATABASE_1_ID) + .tableId(TABLE_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .doi(IDENTIFIER_4_DOI) @@ -7372,8 +7204,8 @@ public abstract class BaseTest { public static final IdentifierBriefDto IDENTIFIER_4_BRIEF_DTO = IdentifierBriefDto.builder() .id(IDENTIFIER_4_ID) - .databaseId(IDENTIFIER_4_DATABASE_ID) - .tableId(IDENTIFIER_4_TABLE_ID) + .databaseId(DATABASE_1_ID) + .tableId(TABLE_1_ID) .titles(new LinkedList<>()) .doi(IDENTIFIER_4_DOI) .publicationYear(IDENTIFIER_4_PUBLICATION_YEAR) @@ -7383,15 +7215,15 @@ public abstract class BaseTest { .build(); public static final CreateIdentifierDto IDENTIFIER_4_CREATE_DTO = CreateIdentifierDto.builder() - .databaseId(IDENTIFIER_4_DATABASE_ID) + .databaseId(DATABASE_1_ID) .publicationYear(IDENTIFIER_4_PUBLICATION_YEAR) .publisher(IDENTIFIER_4_PUBLISHER) .build(); public static final IdentifierSaveDto IDENTIFIER_4_SAVE_DTO = IdentifierSaveDto.builder() .id(IDENTIFIER_4_ID) - .databaseId(IDENTIFIER_4_DATABASE_ID) - .tableId(IDENTIFIER_4_TABLE_ID) + .databaseId(DATABASE_1_ID) + .tableId(TABLE_1_ID) .descriptions(new LinkedList<>()) .titles(new LinkedList<>()) .relatedIdentifiers(new LinkedList<>()) @@ -7425,7 +7257,7 @@ public abstract class BaseTest { .configure(".*") .build(); - public static final Long BANNER_MESSAGE_1_ID = 1L; + public static final UUID BANNER_MESSAGE_1_ID = UUID.fromString("81cf09b7-0d86-44ad-be8e-a407e7d114e1"); public static final String BANNER_MESSAGE_1_MESSAGE = "Next maintenance in 7 days!"; public static final BannerMessageType BANNER_MESSAGE_1_TYPE = BannerMessageType.INFO; public static final BannerMessageTypeDto BANNER_MESSAGE_1_TYPE_DTO = BannerMessageTypeDto.INFO; @@ -7462,7 +7294,7 @@ public abstract class BaseTest { .displayEnd(BANNER_MESSAGE_1_END) .build(); - public static final Long BANNER_MESSAGE_2_ID = 2L; + public static final UUID BANNER_MESSAGE_2_ID = UUID.fromString("1e7e2c03-e2c6-46b8-9fdc-6668ef055d99"); public static final String BANNER_MESSAGE_2_MESSAGE = "No operation on Christmas 2022!"; public static final BannerMessageType BANNER_MESSAGE_2_TYPE = BannerMessageType.ERROR; public static final BannerMessageTypeDto BANNER_MESSAGE_2_TYPE_DTO = BannerMessageTypeDto.ERROR; @@ -7728,6 +7560,16 @@ public abstract class BaseTest { .lastRetrieved(Instant.now()) .build(); + public static final DatabaseBriefDto DATABASE_2_PRIVILEGED_BRIEF_DTO = DatabaseBriefDto.builder() + .id(DATABASE_2_ID) + .isPublic(DATABASE_2_PUBLIC) + .isSchemaPublic(DATABASE_2_SCHEMA_PUBLIC) + .name(DATABASE_2_NAME) + .internalName(DATABASE_2_INTERNALNAME) + .identifiers(new LinkedList<>(List.of(IDENTIFIER_5_BRIEF_DTO))) + .ownerId(USER_2_ID) + .build(); + public static final DatabaseBriefDto DATABASE_2_BRIEF_DTO = DatabaseBriefDto.builder() .id(DATABASE_2_ID) .isPublic(DATABASE_2_PUBLIC) @@ -8086,7 +7928,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_1) .column(TABLE_1_COLUMNS.get(0)) - .id(1L) + .id(COLUMN_1_1_ID) .build()))) .build(); @@ -8095,7 +7937,7 @@ public abstract class BaseTest { .foreignKeys(new LinkedList<>()) .uniques(new LinkedList<>()) .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() - .id(1L) + .id(UUID.fromString("b3f40a88-4f21-4de0-a595-3d15e63943aa")) .table(TABLE_1_BRIEF_DTO) .column(TABLE_1_COLUMNS_BRIEF_0_DTO) .build()))) @@ -8104,11 +7946,11 @@ public abstract class BaseTest { public static final Constraints TABLE_2_CONSTRAINTS = Constraints.builder() .checks(new LinkedHashSet<>(List.of("`mintemp` > 0"))) .foreignKeys(new LinkedList<>(List.of(ForeignKey.builder() - .id(1L) + .id(UUID.fromString("d79f0fb1-05d6-4f3e-a5e2-8559982b8516")) .name("fk_location") .onDelete(ReferenceType.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReference.builder() - .id(1L) + .id(UUID.fromString("a4da8f2f-2999-4621-8066-801a2fb73c8d")) .column(TABLE_2_COLUMNS.get(2)) .referencedColumn(TABLE_1_COLUMNS.get(0)) .foreignKey(null) // set later @@ -8118,7 +7960,7 @@ public abstract class BaseTest { .onUpdate(ReferenceType.NO_ACTION) .build()))) .uniques(new LinkedList<>(List.of(Unique.builder() - .id(1L) + .id(UUID.fromString("408e398f-d157-49a1-8b45-87a070f3b4de")) .table(TABLE_2) .name("uk_1") .columns(new LinkedList<>(List.of(TABLE_2_COLUMNS.get(1)))) @@ -8126,18 +7968,18 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_2) .column(TABLE_2_COLUMNS.get(0)) - .id(2L) + .id(COLUMN_2_1_ID) .build()))) .build(); public static final ConstraintsDto TABLE_2_CONSTRAINTS_DTO = ConstraintsDto.builder() .checks(new LinkedHashSet<>(List.of("`mintemp` > 0"))) .foreignKeys(new LinkedList<>(List.of(ForeignKeyDto.builder() - .id(1L) + .id(UUID.fromString("ca833111-1e9a-48a3-bb16-ad6f90196f96")) .name("fk_location") .onDelete(ReferenceTypeDto.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReferenceDto.builder() - .id(1L) + .id(UUID.fromString("8552f282-0403-424d-b2ba-4ed0f760197c")) .column(TABLE_2_COLUMNS_BRIEF_2_DTO) .referencedColumn(TABLE_1_COLUMNS_BRIEF_0_DTO) .foreignKey(null) // set later @@ -8147,7 +7989,7 @@ public abstract class BaseTest { .onUpdate(ReferenceTypeDto.NO_ACTION) .build()))) .uniques(new LinkedList<>(List.of(UniqueDto.builder() - .id(1L) + .id(UUID.fromString("b9aba807-dd9c-43a3-9614-2493cb4b26bd")) .table(TABLE_2_BRIEF_DTO) .name("uk_1") .columns(new LinkedList<>(List.of(TABLE_2_COLUMNS_BRIEF_DTO.get(1)))) @@ -8155,7 +7997,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_2_BRIEF_DTO) .column(TABLE_2_COLUMNS_BRIEF_0_DTO) - .id(2L) + .id(COLUMN_2_1_ID) .build()))) .build(); @@ -8166,7 +8008,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_3) .column(TABLE_3_COLUMNS.get(0)) - .id(3L) + .id(COLUMN_3_1_ID) .build()))) .build(); @@ -8177,7 +8019,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_3_BRIEF_DTO) .column(TABLE_3_COLUMNS_BRIEF_0_DTO) - .id(3L) + .id(COLUMN_3_1_ID) .build()))) .build(); @@ -8188,7 +8030,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_4) .column(TABLE_4_COLUMNS.get(0)) - .id(4L) + .id(COLUMN_4_1_ID) .build()))) .build(); @@ -8199,7 +8041,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_4_BRIEF_DTO) .column(TABLE_4_COLUMNS_BRIEF_0_DTO) - .id(4L) + .id(COLUMN_4_1_ID) .build()))) .build(); @@ -8210,7 +8052,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_5) .column(TABLE_5_COLUMNS.get(0)) - .id(5L) + .id(COLUMN_5_1_ID) .build()))) .build(); @@ -8221,7 +8063,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_5_BRIEF_DTO) .column(TABLE_5_COLUMNS_BRIEF_0_DTO) - .id(5L) + .id(COLUMN_5_1_ID) .build()))) .build(); @@ -8232,7 +8074,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_6) .column(TABLE_6_COLUMNS.get(0)) - .id(6L) + .id(COLUMN_6_1_ID) .build()))) .build(); @@ -8243,18 +8085,18 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_6_BRIEF_DTO) .column(TABLE_6_COLUMNS_BRIEF_0_DTO) - .id(6L) + .id(COLUMN_6_1_ID) .build()))) .build(); public static final Constraints TABLE_7_CONSTRAINTS = Constraints.builder() .checks(new LinkedHashSet<>()) .foreignKeys(new LinkedList<>(List.of(ForeignKey.builder() - .id(8L) + .id(UUID.fromString("421c3dd8-ae09-4c72-a6ca-09de009e755f")) .name("fk_name_id") .onDelete(ReferenceType.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReference.builder() - .id(2L) + .id(UUID.fromString("7c0e4a3c-88b8-4276-8924-403fd122fbf1")) .column(TABLE_6_COLUMNS.get(0)) .referencedColumn(TABLE_7_COLUMNS.get(0)) .foreignKey(null) // set later @@ -8264,11 +8106,11 @@ public abstract class BaseTest { .onUpdate(ReferenceType.NO_ACTION) .build(), ForeignKey.builder() - .id(9L) + .id(UUID.fromString("fce75207-6009-49ff-a646-d3e18aed787a")) .name("fk_zoo_id") .onDelete(ReferenceType.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReference.builder() - .id(3L) + .id(UUID.fromString("e6cb1daa-a210-41c4-bb79-2c98ef25a02c")) .column(TABLE_5_COLUMNS.get(0)) .referencedColumn(TABLE_7_COLUMNS.get(1)) .foreignKey(null) // set later @@ -8281,16 +8123,16 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_7) .column(TABLE_7_COLUMNS.get(0)) - .id(7L) + .id(COLUMN_7_1_ID) .build()))) .build(); public static final ForeignKeyDto TABLE_7_CONSTRAINTS_FOREIGN_KEY_0_DTO = ForeignKeyDto.builder() - .id(2L) + .id(UUID.fromString("561b4933-54e5-4dad-a536-39836da87fe3")) .name("fk_name_id") .onDelete(ReferenceTypeDto.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReferenceDto.builder() - .id(2L) + .id(UUID.fromString("0f4b00c0-f2a8-4929-8619-bdc941b5dc8c")) .column(TABLE_6_COLUMNS_BRIEF_0_DTO) .referencedColumn(TABLE_7_COLUMNS_BRIEF_0_DTO) .foreignKey(null) // set later @@ -8301,15 +8143,15 @@ public abstract class BaseTest { .build(); public static final ForeignKeyBriefDto TABLE_7_CONSTRAINTS_FOREIGN_KEY_BRIEF_0_DTO = ForeignKeyBriefDto.builder() - .id(2L) + .id(UUID.fromString("a92f09c5-9bce-4f77-8f7b-a9afc1d30ec2")) .build(); public static final ForeignKeyDto TABLE_7_CONSTRAINTS_FOREIGN_KEY_1_DTO = ForeignKeyDto.builder() - .id(3L) + .id(UUID.fromString("f2e82566-ddc3-4b76-8d27-adc3c51780a9")) .name("fk_zoo_id") .onDelete(ReferenceTypeDto.NO_ACTION) .references(new LinkedList<>(List.of(ForeignKeyReferenceDto.builder() - .id(3L) + .id(UUID.fromString("7a393166-25d2-4b8c-a5e7-7d1b3b33b823")) .column(TABLE_5_COLUMNS_BRIEF_0_DTO) .referencedColumn(TABLE_7_COLUMNS_BRIEF_1_DTO) .foreignKey(null) // set later @@ -8320,7 +8162,7 @@ public abstract class BaseTest { .build(); public static final ForeignKeyBriefDto TABLE_7_CONSTRAINTS_FOREIGN_KEY_BRIEF_1_DTO = ForeignKeyBriefDto.builder() - .id(3L) + .id(UUID.fromString("6ce1f707-0bdf-4930-be77-157801d2735a")) .build(); public static final ConstraintsDto TABLE_7_CONSTRAINTS_DTO = ConstraintsDto.builder() @@ -8331,7 +8173,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_7_BRIEF_DTO) .column(TABLE_7_COLUMNS_BRIEF_0_DTO) - .id(7L) + .id(UUID.fromString("9969e13f-2a2f-45c7-bccf-a7df0ac813a8")) .build()))) .build(); @@ -8342,7 +8184,7 @@ public abstract class BaseTest { .primaryKey(new LinkedList<>(List.of(PrimaryKey.builder() .table(TABLE_8) .column(TABLE_8_COLUMNS.get(0)) - .id(8L) + .id(UUID.fromString("cd23b601-966c-4aa7-9722-6bcb009200cc")) .build()))) .build(); @@ -8353,7 +8195,7 @@ public abstract class BaseTest { .primaryKey(new LinkedHashSet<>(Set.of(PrimaryKeyDto.builder() .table(TABLE_8_BRIEF_DTO) .column(TABLE_8_COLUMNS_BRIEF_0_DTO) - .id(8L) + .id(UUID.fromString("c61196d1-a902-405c-a825-0781c0c94df1")) .build()))) .build(); @@ -8362,25 +8204,85 @@ public abstract class BaseTest { .resource(new InputStreamResource(InputStream.nullInputStream())) .build(); - public static void saveObservedMetrics(Map<String, String> observedMetrics) throws IOException { - final int keySize = observedMetrics.keySet().stream().max(Comparator.comparingInt(String::length)).get().length(); - final int valueSize = observedMetrics.values().stream().max(Comparator.comparingInt(String::length)).get().length(); - final StringBuilder content = new StringBuilder("| ") - .append(StringUtils.rightPad("**Metric**", Integer.max(keySize + 2, 16))) - .append(" | ") - .append(StringUtils.rightPad("**Description**", Integer.max(valueSize, 19))) - .append(" |\n") - .append("|-") - .append(StringUtils.leftPad("", Integer.max(keySize + 2, 16), "-")) - .append("-|-") - .append(StringUtils.leftPad("", Integer.max(valueSize, 19), "-")) - .append("-|\n"); - observedMetrics.forEach((key, value) -> content.append("| ") - .append(StringUtils.rightPad("`" + key + "`", Integer.max(keySize + 2, 16))) - .append(" | ") - .append(StringUtils.rightPad(value, Integer.max(valueSize, 19))) - .append(" |\n")); - FileUtils.writeStringToFile(new File("../metrics.md"), content.toString(), Charset.defaultCharset()); - } + public static final QueryDto QUERY_1_DTO = QueryDto.builder() + .id(QUERY_1_ID) + .databaseId(DATABASE_1_ID) + .query(QUERY_1_STATEMENT) + .queryHash(QUERY_1_QUERY_HASH) + .resultHash(QUERY_1_RESULT_HASH) + .execution(QUERY_1_EXECUTION) + .owner(USER_1_BRIEF_DTO) + .isPersisted(QUERY_1_PERSISTED) + .resultNumber(3L) + .build(); + + public static final QueryDto QUERY_2_DTO = QueryDto.builder() + .id(QUERY_2_ID) + .databaseId(DATABASE_1_ID) + .query(QUERY_2_STATEMENT) + .queryNormalized(QUERY_2_STATEMENT) + .resultNumber(QUERY_2_RESULT_NUMBER) + .resultHash(QUERY_2_RESULT_HASH) + .owner(USER_1_BRIEF_DTO) + .queryHash(QUERY_2_QUERY_HASH) + .execution(QUERY_2_EXECUTION) + .isPersisted(QUERY_2_PERSISTED) + .resultNumber(3L) + .build(); + + public static final QueryDto QUERY_3_DTO = QueryDto.builder() + .id(QUERY_3_ID) + .databaseId(DATABASE_1_ID) + .query(QUERY_3_STATEMENT) + .queryNormalized(QUERY_3_STATEMENT) + .resultNumber(QUERY_3_RESULT_NUMBER) + .resultHash(QUERY_3_RESULT_HASH) + .owner(USER_1_BRIEF_DTO) + .queryHash(QUERY_3_QUERY_HASH) + .execution(QUERY_3_EXECUTION) + .isPersisted(QUERY_3_PERSISTED) + .resultNumber(2L) + .build(); + + public static final QueryDto QUERY_7_DTO = QueryDto.builder() + .id(QUERY_7_ID) + .databaseId(DATABASE_4_ID) + .query(QUERY_7_STATEMENT) + .queryNormalized(QUERY_7_STATEMENT) + .resultNumber(QUERY_7_RESULT_NUMBER) + .resultHash(QUERY_7_RESULT_HASH) + .owner(USER_1_BRIEF_DTO) + .queryHash(QUERY_7_QUERY_HASH) + .execution(QUERY_7_EXECUTION) + .isPersisted(QUERY_7_PERSISTED) + .resultNumber(2L) + .build(); + + public static final QueryDto QUERY_6_DTO = QueryDto.builder() + .id(QUERY_6_ID) + .databaseId(DATABASE_1_ID) + .query(QUERY_6_STATEMENT) + .queryNormalized(QUERY_6_STATEMENT) + .resultNumber(QUERY_6_RESULT_NUMBER) + .resultHash(QUERY_6_RESULT_HASH) + .owner(USER_1_BRIEF_DTO) + .queryHash(QUERY_6_QUERY_HASH) + .execution(QUERY_6_EXECUTION) + .isPersisted(QUERY_6_PERSISTED) + .build(); + + public static final QueryDto QUERY_8_DTO = QueryDto.builder() + .id(QUERY_8_ID) + .databaseId(DATABASE_2_ID) + .query(QUERY_8_STATEMENT) + .queryNormalized(QUERY_8_STATEMENT) + .resultNumber(QUERY_8_RESULT_NUMBER) + .resultHash(QUERY_8_RESULT_HASH) + .owner(USER_1_BRIEF_DTO) + .queryHash(QUERY_8_QUERY_HASH) + .execution(QUERY_8_EXECUTION) + .isPersisted(QUERY_8_PERSISTED) + .resultNumber(3L) + .build(); } diff --git a/dbrepo-search-service/.coveragerc b/dbrepo-search-service/.coveragerc index 4683a93d3748d16ab20a61f318e3016d3f4a8e09..a387be84259ecf1c8b1387a407e3cfc528960a30 100644 --- a/dbrepo-search-service/.coveragerc +++ b/dbrepo-search-service/.coveragerc @@ -1,5 +1,9 @@ [report] omit = - */test/* - */omlib/* - */init/* \ No newline at end of file + # omit tests + ./tests/* + # omit ext lib + ./omlib/* + +[html] +directory = htmlcov diff --git a/dbrepo-search-service/Pipfile b/dbrepo-search-service/Pipfile index 536a5f3a9172dfa50a38671ff50a7d06b9e4a8b2..6284708cc1d7f99f10843ad47c05b35a25916bf4 100644 --- a/dbrepo-search-service/Pipfile +++ b/dbrepo-search-service/Pipfile @@ -18,7 +18,7 @@ jwt = "~=1.3" testcontainers-opensearch = "*" pytest = "*" rdflib = "*" -dbrepo = {path = "./lib/dbrepo-1.6.5.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} gunicorn = "*" [dev-packages] diff --git a/dbrepo-search-service/Pipfile.lock b/dbrepo-search-service/Pipfile.lock index ee4559cd98d5de000c481dde00e5176390b61fc9..10925ebd2c296a21a9144c85d7dc5424e61c2296 100644 --- a/dbrepo-search-service/Pipfile.lock +++ b/dbrepo-search-service/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2f5a0ee9d98b5e49a8d4957fb07a5231178b3fe8cc2016850c9b42c67780004d" + "sha256": "30aa6fefdbdbb9f57d58ebc8660eee64445a831cea44c6ca1fa605f2a2e1adc3" }, "pipfile-spec": 6, "requires": { @@ -26,90 +26,90 @@ }, "aiohttp": { "hashes": [ - "sha256:0450ada317a65383b7cce9576096150fdb97396dcfe559109b403c7242faffef", - "sha256:0b5263dcede17b6b0c41ef0c3ccce847d82a7da98709e75cf7efde3e9e3b5cae", - "sha256:0d5176f310a7fe6f65608213cc74f4228e4f4ce9fd10bcb2bb6da8fc66991462", - "sha256:0ed49efcd0dc1611378beadbd97beb5d9ca8fe48579fc04a6ed0844072261b6a", - "sha256:145a73850926018ec1681e734cedcf2716d6a8697d90da11284043b745c286d5", - "sha256:1987770fb4887560363b0e1a9b75aa303e447433c41284d3af2840a2f226d6e0", - "sha256:246067ba0cf5560cf42e775069c5d80a8989d14a7ded21af529a4e10e3e0f0e6", - "sha256:2c311e2f63e42c1bf86361d11e2c4a59f25d9e7aabdbdf53dc38b885c5435cdb", - "sha256:2cee3b117a8d13ab98b38d5b6bdcd040cfb4181068d05ce0c474ec9db5f3c5bb", - "sha256:2de1378f72def7dfb5dbd73d86c19eda0ea7b0a6873910cc37d57e80f10d64e1", - "sha256:30f546358dfa0953db92ba620101fefc81574f87b2346556b90b5f3ef16e55ce", - "sha256:34245498eeb9ae54c687a07ad7f160053911b5745e186afe2d0c0f2898a1ab8a", - "sha256:392432a2dde22b86f70dd4a0e9671a349446c93965f261dbaecfaf28813e5c42", - "sha256:3c0600bcc1adfaaac321422d615939ef300df81e165f6522ad096b73439c0f58", - "sha256:4016e383f91f2814e48ed61e6bda7d24c4d7f2402c75dd28f7e1027ae44ea204", - "sha256:40cd36749a1035c34ba8d8aaf221b91ca3d111532e5ccb5fa8c3703ab1b967ed", - "sha256:413ad794dccb19453e2b97c2375f2ca3cdf34dc50d18cc2693bd5aed7d16f4b9", - "sha256:4a93d28ed4b4b39e6f46fd240896c29b686b75e39cc6992692e3922ff6982b4c", - "sha256:4ee84c2a22a809c4f868153b178fe59e71423e1f3d6a8cd416134bb231fbf6d3", - "sha256:50c5c7b8aa5443304c55c262c5693b108c35a3b61ef961f1e782dd52a2f559c7", - "sha256:525410e0790aab036492eeea913858989c4cb070ff373ec3bc322d700bdf47c1", - "sha256:526c900397f3bbc2db9cb360ce9c35134c908961cdd0ac25b1ae6ffcaa2507ff", - "sha256:54775858c7f2f214476773ce785a19ee81d1294a6bedc5cc17225355aab74802", - "sha256:584096938a001378484aa4ee54e05dc79c7b9dd933e271c744a97b3b6f644957", - "sha256:6130459189e61baac5a88c10019b21e1f0c6d00ebc770e9ce269475650ff7f73", - "sha256:67453e603cea8e85ed566b2700efa1f6916aefbc0c9fcb2e86aaffc08ec38e78", - "sha256:68d54234c8d76d8ef74744f9f9fc6324f1508129e23da8883771cdbb5818cbef", - "sha256:6dfe7f984f28a8ae94ff3a7953cd9678550dbd2a1f9bda5dd9c5ae627744c78e", - "sha256:74bd573dde27e58c760d9ca8615c41a57e719bff315c9adb6f2a4281a28e8798", - "sha256:7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0", - "sha256:76719dd521c20a58a6c256d058547b3a9595d1d885b830013366e27011ffe804", - "sha256:7c3623053b85b4296cd3925eeb725e386644fd5bc67250b3bb08b0f144803e7b", - "sha256:7e44eba534381dd2687be50cbd5f2daded21575242ecfdaf86bbeecbc38dae8e", - "sha256:7fe3d65279bfbee8de0fb4f8c17fc4e893eed2dba21b2f680e930cc2b09075c5", - "sha256:8340def6737118f5429a5df4e88f440746b791f8f1c4ce4ad8a595f42c980bd5", - "sha256:84ede78acde96ca57f6cf8ccb8a13fbaf569f6011b9a52f870c662d4dc8cd854", - "sha256:850ff6155371fd802a280f8d369d4e15d69434651b844bde566ce97ee2277420", - "sha256:87a2e00bf17da098d90d4145375f1d985a81605267e7f9377ff94e55c5d769eb", - "sha256:88d385b8e7f3a870146bf5ea31786ef7463e99eb59e31db56e2315535d811f55", - "sha256:8a2fb742ef378284a50766e985804bd6adb5adb5aa781100b09befdbfa757b65", - "sha256:8dc0fba9a74b471c45ca1a3cb6e6913ebfae416678d90529d188886278e7f3f6", - "sha256:8fa1510b96c08aaad49303ab11f8803787c99222288f310a62f493faf883ede1", - "sha256:8fd12d0f989c6099e7b0f30dc6e0d1e05499f3337461f0b2b0dadea6c64b89df", - "sha256:9060addfa4ff753b09392efe41e6af06ea5dd257829199747b9f15bfad819460", - "sha256:930ffa1925393381e1e0a9b82137fa7b34c92a019b521cf9f41263976666a0d6", - "sha256:936d8a4f0f7081327014742cd51d320296b56aa6d324461a13724ab05f4b2933", - "sha256:97fe431f2ed646a3b56142fc81d238abcbaff08548d6912acb0b19a0cadc146b", - "sha256:9bd8695be2c80b665ae3f05cb584093a1e59c35ecb7d794d1edd96e8cc9201d7", - "sha256:9dec0000d2d8621d8015c293e24589d46fa218637d820894cb7356c77eca3259", - "sha256:a478aa11b328983c4444dacb947d4513cb371cd323f3845e53caeda6be5589d5", - "sha256:a481a574af914b6e84624412666cbfbe531a05667ca197804ecc19c97b8ab1b0", - "sha256:a4ac6a0f0f6402854adca4e3259a623f5c82ec3f0c049374133bcb243132baf9", - "sha256:a5e69046f83c0d3cb8f0d5bd9b8838271b1bc898e01562a04398e160953e8eb9", - "sha256:a7442662afebbf7b4c6d28cb7aab9e9ce3a5df055fc4116cc7228192ad6cb484", - "sha256:aa8a8caca81c0a3e765f19c6953416c58e2f4cc1b84829af01dd1c771bb2f91f", - "sha256:ab3247d58b393bda5b1c8f31c9edece7162fc13265334217785518dd770792b8", - "sha256:b10a47e5390c4b30a0d58ee12581003be52eedd506862ab7f97da7a66805befb", - "sha256:b34508f1cd928ce915ed09682d11307ba4b37d0708d1f28e5774c07a7674cac9", - "sha256:b8d3bb96c147b39c02d3db086899679f31958c5d81c494ef0fc9ef5bb1359b3d", - "sha256:b9d45dbb3aaec05cf01525ee1a7ac72de46a8c425cb75c003acd29f76b1ffe94", - "sha256:bf4480a5438f80e0f1539e15a7eb8b5f97a26fe087e9828e2c0ec2be119a9f72", - "sha256:c160a04283c8c6f55b5bf6d4cad59bb9c5b9c9cd08903841b25f1f7109ef1259", - "sha256:c96a43822f1f9f69cc5c3706af33239489a6294be486a0447fb71380070d4d5f", - "sha256:c9fd9dcf9c91affe71654ef77426f5cf8489305e1c66ed4816f5a21874b094b9", - "sha256:cddb31f8474695cd61fc9455c644fc1606c164b93bff2490390d90464b4655df", - "sha256:ce1bb21fc7d753b5f8a5d5a4bae99566386b15e716ebdb410154c16c91494d7f", - "sha256:d1c031a7572f62f66f1257db37ddab4cb98bfaf9b9434a3b4840bf3560f5e788", - "sha256:d589264dbba3b16e8951b6f145d1e6b883094075283dafcab4cdd564a9e353a0", - "sha256:dc065a4285307607df3f3686363e7f8bdd0d8ab35f12226362a847731516e42c", - "sha256:e10c440d142fa8b32cfdb194caf60ceeceb3e49807072e0dc3a8887ea80e8c16", - "sha256:e3552fe98e90fdf5918c04769f338a87fa4f00f3b28830ea9b78b1bdc6140e0d", - "sha256:e392804a38353900c3fd8b7cacbea5132888f7129f8e241915e90b85f00e3250", - "sha256:e4cecdb52aaa9994fbed6b81d4568427b6002f0a91c322697a4bfcc2b2363f5a", - "sha256:e5148ca8955affdfeb864aca158ecae11030e952b25b3ae15d4e2b5ba299bad2", - "sha256:e6b2732ef3bafc759f653a98881b5b9cdef0716d98f013d376ee8dfd7285abf1", - "sha256:ea756b5a7bac046d202a9a3889b9a92219f885481d78cd318db85b15cc0b7bcf", - "sha256:edb69b9589324bdc40961cdf0657815df674f1743a8d5ad9ab56a99e4833cfdd", - "sha256:f0203433121484b32646a5f5ea93ae86f3d9559d7243f07e8c0eab5ff8e3f70e", - "sha256:f6a19bcab7fbd8f8649d6595624856635159a6527861b9cdc3447af288a00c00", - "sha256:f752e80606b132140883bb262a457c475d219d7163d996dc9072434ffb0784c4", - "sha256:f7914ab70d2ee8ab91c13e5402122edbc77821c66d2758abb53aabe87f013287" + "sha256:00c8ac69e259c60976aa2edae3f13d9991cf079aaa4d3cd5a49168ae3748dee3", + "sha256:01816f07c9cc9d80f858615b1365f8319d6a5fd079cd668cc58e15aafbc76a54", + "sha256:02876bf2f69b062584965507b07bc06903c2dc93c57a554b64e012d636952654", + "sha256:0e9eb7e5764abcb49f0e2bd8f5731849b8728efbf26d0cac8e81384c95acec3f", + "sha256:0f6b2c5b4a4d22b8fb2c92ac98e0747f5f195e8e9448bfb7404cd77e7bfa243f", + "sha256:1982c98ac62c132d2b773d50e2fcc941eb0b8bad3ec078ce7e7877c4d5a2dce7", + "sha256:1e83fb1991e9d8982b3b36aea1e7ad27ea0ce18c14d054c7a404d68b0319eebb", + "sha256:25de43bb3cf83ad83efc8295af7310219af6dbe4c543c2e74988d8e9c8a2a917", + "sha256:28a772757c9067e2aee8a6b2b425d0efaa628c264d6416d283694c3d86da7689", + "sha256:2a4a13dfbb23977a51853b419141cd0a9b9573ab8d3a1455c6e63561387b52ff", + "sha256:2a8a6bc19818ac3e5596310ace5aa50d918e1ebdcc204dc96e2f4d505d51740c", + "sha256:2eabb269dc3852537d57589b36d7f7362e57d1ece308842ef44d9830d2dc3c90", + "sha256:35cda4e07f5e058a723436c4d2b7ba2124ab4e0aa49e6325aed5896507a8a42e", + "sha256:42d689a5c0a0c357018993e471893e939f555e302313d5c61dfc566c2cad6185", + "sha256:4586a68730bd2f2b04a83e83f79d271d8ed13763f64b75920f18a3a677b9a7f0", + "sha256:47dc018b1b220c48089b5b9382fbab94db35bef2fa192995be22cbad3c5730c8", + "sha256:507ab05d90586dacb4f26a001c3abf912eb719d05635cbfad930bdbeb469b36c", + "sha256:5194143927e494616e335d074e77a5dac7cd353a04755330c9adc984ac5a628e", + "sha256:51c3ff9c7a25f3cad5c09d9aacbc5aefb9267167c4652c1eb737989b554fe278", + "sha256:55789e93c5ed71832e7fac868167276beadf9877b85697020c46e9a75471f55f", + "sha256:5724cc77f4e648362ebbb49bdecb9e2b86d9b172c68a295263fa072e679ee69d", + "sha256:5ad8f1c19fe277eeb8bc45741c6d60ddd11d705c12a4d8ee17546acff98e0802", + "sha256:5ceb81a4db2decdfa087381b5fc5847aa448244f973e5da232610304e199e7b2", + "sha256:64815c6f02e8506b10113ddbc6b196f58dbef135751cc7c32136df27b736db09", + "sha256:66047eacbc73e6fe2462b77ce39fc170ab51235caf331e735eae91c95e6a11e4", + "sha256:669dd33f028e54fe4c96576f406ebb242ba534dd3a981ce009961bf49960f117", + "sha256:684eea71ab6e8ade86b9021bb62af4bf0881f6be4e926b6b5455de74e420783a", + "sha256:6b35aab22419ba45f8fc290d0010898de7a6ad131e468ffa3922b1b0b24e9d2e", + "sha256:7104d5b3943c6351d1ad7027d90bdd0ea002903e9f610735ac99df3b81f102ee", + "sha256:718d5deb678bc4b9d575bfe83a59270861417da071ab44542d0fcb6faa686636", + "sha256:747ec46290107a490d21fe1ff4183bef8022b848cf9516970cb31de6d9460088", + "sha256:7836587eef675a17d835ec3d98a8c9acdbeb2c1d72b0556f0edf4e855a25e9c1", + "sha256:78e4dd9c34ec7b8b121854eb5342bac8b02aa03075ae8618b6210a06bbb8a115", + "sha256:7b77ee42addbb1c36d35aca55e8cc6d0958f8419e458bb70888d8c69a4ca833d", + "sha256:7c1b20a1ace54af7db1f95af85da530fe97407d9063b7aaf9ce6a32f44730778", + "sha256:7f27eec42f6c3c1df09cfc1f6786308f8b525b8efaaf6d6bd76c1f52c6511f6a", + "sha256:82c249f2bfa5ecbe4a1a7902c81c0fba52ed9ebd0176ab3047395d02ad96cfcb", + "sha256:85fa0b18558eb1427090912bd456a01f71edab0872f4e0f9e4285571941e4090", + "sha256:89ce611b1eac93ce2ade68f1470889e0173d606de20c85a012bfa24be96cf867", + "sha256:8ce789231404ca8fff7f693cdce398abf6d90fd5dae2b1847477196c243b1fbb", + "sha256:90d571c98d19a8b6e793b34aa4df4cee1e8fe2862d65cc49185a3a3d0a1a3996", + "sha256:9229d8613bd8401182868fe95688f7581673e1c18ff78855671a4b8284f47bcb", + "sha256:93a1f7d857c4fcf7cabb1178058182c789b30d85de379e04f64c15b7e88d66fb", + "sha256:967b93f21b426f23ca37329230d5bd122f25516ae2f24a9cea95a30023ff8283", + "sha256:9840be675de208d1f68f84d578eaa4d1a36eee70b16ae31ab933520c49ba1325", + "sha256:9862d077b9ffa015dbe3ce6c081bdf35135948cb89116e26667dd183550833d1", + "sha256:9b5b37c863ad5b0892cc7a4ceb1e435e5e6acd3f2f8d3e11fa56f08d3c67b820", + "sha256:9e64ca2dbea28807f8484c13f684a2f761e69ba2640ec49dacd342763cc265ef", + "sha256:9fe4eb0e7f50cdb99b26250d9328faef30b1175a5dbcfd6d0578d18456bac567", + "sha256:a01fe9f1e05025eacdd97590895e2737b9f851d0eb2e017ae9574d9a4f0b6252", + "sha256:a08ad95fcbd595803e0c4280671d808eb170a64ca3f2980dd38e7a72ed8d1fea", + "sha256:a4fe27dbbeec445e6e1291e61d61eb212ee9fed6e47998b27de71d70d3e8777d", + "sha256:a7d474c5c1f0b9405c1565fafdc4429fa7d986ccbec7ce55bc6a330f36409cad", + "sha256:a86dc177eb4c286c19d1823ac296299f59ed8106c9536d2b559f65836e0fb2c6", + "sha256:aa36c35e94ecdb478246dd60db12aba57cfcd0abcad43c927a8876f25734d496", + "sha256:ab915a57c65f7a29353c8014ac4be685c8e4a19e792a79fe133a8e101111438e", + "sha256:af55314407714fe77a68a9ccaab90fdb5deb57342585fd4a3a8102b6d4370080", + "sha256:afcb6b275c2d2ba5d8418bf30a9654fa978b4f819c2e8db6311b3525c86fe637", + "sha256:b27961d65639128336b7a7c3f0046dcc62a9443d5ef962e3c84170ac620cec47", + "sha256:b5b95787335c483cd5f29577f42bbe027a412c5431f2f80a749c80d040f7ca9f", + "sha256:b73a2b139782a07658fbf170fe4bcdf70fc597fae5ffe75e5b67674c27434a9f", + "sha256:b88aca5adbf4625e11118df45acac29616b425833c3be7a05ef63a6a4017bfdb", + "sha256:b992778d95b60a21c4d8d4a5f15aaab2bd3c3e16466a72d7f9bfd86e8cea0d4b", + "sha256:ba40b7ae0f81c7029583a338853f6607b6d83a341a3dcde8bed1ea58a3af1df9", + "sha256:baae005092e3f200de02699314ac8933ec20abf998ec0be39448f6605bce93df", + "sha256:c4bea08a6aad9195ac9b1be6b0c7e8a702a9cec57ce6b713698b4a5afa9c2e33", + "sha256:c6070bcf2173a7146bb9e4735b3c62b2accba459a6eae44deea0eb23e0035a23", + "sha256:c929f9a7249a11e4aa5c157091cfad7f49cc6b13f4eecf9b747104befd9f56f2", + "sha256:c97be90d70f7db3aa041d720bfb95f4869d6063fcdf2bb8333764d97e319b7d0", + "sha256:ce10ddfbe26ed5856d6902162f71b8fe08545380570a885b4ab56aecfdcb07f4", + "sha256:cf1f31f83d16ec344136359001c5e871915c6ab685a3d8dee38e2961b4c81730", + "sha256:d2b25b2eeb35707113b2d570cadc7c612a57f1c5d3e7bb2b13870fe284e08fc0", + "sha256:d33851d85537bbf0f6291ddc97926a754c8f041af759e0aa0230fe939168852b", + "sha256:e06cf4852ce8c4442a59bae5a3ea01162b8fcb49ab438d8548b8dc79375dad8a", + "sha256:e271beb2b1dabec5cd84eb488bdabf9758d22ad13471e9c356be07ad139b3012", + "sha256:f55d0f242c2d1fcdf802c8fabcff25a9d85550a4cf3a9cf5f2a6b5742c992839", + "sha256:f81cba651db8795f688c589dd11a4fbb834f2e59bbf9bb50908be36e416dc760", + "sha256:fa1fb1b61881c8405829c50e9cc5c875bfdbf685edf57a76817dfb50643e4a1a", + "sha256:fa48dac27f41b36735c807d1ab093a8386701bbf00eb6b89a0f69d9fa26b3671", + "sha256:fbfef0666ae9e07abfa2c54c212ac18a1f63e13e0760a769f70b5717742f3ece", + "sha256:fe7065e2215e4bba63dc00db9ae654c1ba3950a5fff691475a32f511142fcddb" ], "markers": "python_version >= '3.9'", - "version": "==3.11.12" + "version": "==3.11.13" }, "aiosignal": { "hashes": [ @@ -221,7 +221,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "platform_python_implementation != 'PyPy'", + "markers": "python_version >= '3.8'", "version": "==1.17.1" }, "charset-normalizer": { @@ -332,46 +332,50 @@ }, "cryptography": { "hashes": [ - "sha256:00918d859aa4e57db8299607086f793fa7813ae2ff5a4637e318a25ef82730f7", - "sha256:1e8d181e90a777b63f3f0caa836844a1182f1f265687fac2115fcf245f5fbec3", - "sha256:1f9a92144fa0c877117e9748c74501bea842f93d21ee00b0cf922846d9d0b183", - "sha256:21377472ca4ada2906bc313168c9dc7b1d7ca417b63c1c3011d0c74b7de9ae69", - "sha256:24979e9f2040c953a94bf3c6782e67795a4c260734e5264dceea65c8f4bae64a", - "sha256:2a46a89ad3e6176223b632056f321bc7de36b9f9b93b2cc1cccf935a3849dc62", - "sha256:322eb03ecc62784536bc173f1483e76747aafeb69c8728df48537eb431cd1911", - "sha256:436df4f203482f41aad60ed1813811ac4ab102765ecae7a2bbb1dbb66dcff5a7", - "sha256:4f422e8c6a28cf8b7f883eb790695d6d45b0c385a2583073f3cec434cc705e1a", - "sha256:53f23339864b617a3dfc2b0ac8d5c432625c80014c25caac9082314e9de56f41", - "sha256:5fed5cd6102bb4eb843e3315d2bf25fede494509bddadb81e03a859c1bc17b83", - "sha256:610a83540765a8d8ce0f351ce42e26e53e1f774a6efb71eb1b41eb01d01c3d12", - "sha256:6c8acf6f3d1f47acb2248ec3ea261171a671f3d9428e34ad0357148d492c7864", - "sha256:6f76fdd6fd048576a04c5210d53aa04ca34d2ed63336d4abd306d0cbe298fddf", - "sha256:72198e2b5925155497a5a3e8c216c7fb3e64c16ccee11f0e7da272fa93b35c4c", - "sha256:887143b9ff6bad2b7570da75a7fe8bbf5f65276365ac259a5d2d5147a73775f2", - "sha256:888fcc3fce0c888785a4876ca55f9f43787f4c5c1cc1e2e0da71ad481ff82c5b", - "sha256:8e6a85a93d0642bd774460a86513c5d9d80b5c002ca9693e63f6e540f1815ed0", - "sha256:94f99f2b943b354a5b6307d7e8d19f5c423a794462bde2bf310c770ba052b1c4", - "sha256:9b336599e2cb77b1008cb2ac264b290803ec5e8e89d618a5e978ff5eb6f715d9", - "sha256:a2d8a7045e1ab9b9f803f0d9531ead85f90c5f2859e653b61497228b18452008", - "sha256:b8272f257cf1cbd3f2e120f14c68bff2b6bdfcc157fafdee84a1b795efd72862", - "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009", - "sha256:d9c5b9f698a83c8bd71e0f4d3f9f839ef244798e5ffe96febfa9714717db7af7", - "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f", - "sha256:df978682c1504fc93b3209de21aeabf2375cb1571d4e61907b3e7a2540e83026", - "sha256:e403f7f766ded778ecdb790da786b418a9f2394f36e8cc8b796cc056ab05f44f", - "sha256:eb3889330f2a4a148abead555399ec9a32b13b7c8ba969b72d8e500eb7ef84cd", - "sha256:f4daefc971c2d1f82f03097dc6f216744a6cd2ac0f04c68fb935ea2ba2a0d420", - "sha256:f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14", - "sha256:fd0ee90072861e276b0ff08bd627abec29e32a53b2be44e41dbcdf87cbee2b00" + "sha256:04abd71114848aa25edb28e225ab5f268096f44cf0127f3d36975bdf1bdf3390", + "sha256:0529b1d5a0105dd3731fa65680b45ce49da4d8115ea76e9da77a875396727b41", + "sha256:1bc312dfb7a6e5d66082c87c34c8a62176e684b6fe3d90fcfe1568de675e6688", + "sha256:268e4e9b177c76d569e8a145a6939eca9a5fec658c932348598818acf31ae9a5", + "sha256:29ecec49f3ba3f3849362854b7253a9f59799e3763b0c9d0826259a88efa02f1", + "sha256:2bf7bf75f7df9715f810d1b038870309342bff3069c5bd8c6b96128cb158668d", + "sha256:3b721b8b4d948b218c88cb8c45a01793483821e709afe5f622861fc6182b20a7", + "sha256:3c00b6b757b32ce0f62c574b78b939afab9eecaf597c4d624caca4f9e71e7843", + "sha256:3dc62975e31617badc19a906481deacdeb80b4bb454394b4098e3f2525a488c5", + "sha256:4973da6ca3db4405c54cd0b26d328be54c7747e89e284fcff166132eb7bccc9c", + "sha256:4e389622b6927d8133f314949a9812972711a111d577a5d1f4bee5e58736b80a", + "sha256:51e4de3af4ec3899d6d178a8c005226491c27c4ba84101bfb59c901e10ca9f79", + "sha256:5f6f90b72d8ccadb9c6e311c775c8305381db88374c65fa1a68250aa8a9cb3a6", + "sha256:6210c05941994290f3f7f175a4a57dbbb2afd9273657614c506d5976db061181", + "sha256:6f101b1f780f7fc613d040ca4bdf835c6ef3b00e9bd7125a4255ec574c7916e4", + "sha256:7bdcd82189759aba3816d1f729ce42ffded1ac304c151d0a8e89b9996ab863d5", + "sha256:7ca25849404be2f8e4b3c59483d9d3c51298a22c1c61a0e84415104dacaf5562", + "sha256:81276f0ea79a208d961c433a947029e1a15948966658cf6710bbabb60fcc2639", + "sha256:8cadc6e3b5a1f144a039ea08a0bdb03a2a92e19c46be3285123d32029f40a922", + "sha256:8e0ddd63e6bf1161800592c71ac794d3fb8001f2caebe0966e77c5234fa9efc3", + "sha256:909c97ab43a9c0c0b0ada7a1281430e4e5ec0458e6d9244c0e821bbf152f061d", + "sha256:96e7a5e9d6e71f9f4fca8eebfd603f8e86c5225bb18eb621b2c1e50b290a9471", + "sha256:9a1e657c0f4ea2a23304ee3f964db058c9e9e635cc7019c4aa21c330755ef6fd", + "sha256:9eb9d22b0a5d8fd9925a7764a054dca914000607dff201a24c791ff5c799e1fa", + "sha256:af4ff3e388f2fa7bff9f7f2b31b87d5651c45731d3e8cfa0944be43dff5cfbdb", + "sha256:b042d2a275c8cee83a4b7ae30c45a15e6a4baa65a179a0ec2d78ebb90e4f6699", + "sha256:bc821e161ae88bfe8088d11bb39caf2916562e0a2dc7b6d56714a48b784ef0bb", + "sha256:c505d61b6176aaf982c5717ce04e87da5abc9a36a5b39ac03905c4aafe8de7aa", + "sha256:c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "sha256:c7362add18b416b69d58c910caa217f980c5ef39b23a38a0880dfd87bdf8cd23", + "sha256:d03806036b4f89e3b13b6218fefea8d5312e450935b1a2d55f0524e2ed7c59d9", + "sha256:d1b3031093a366ac767b3feb8bcddb596671b3aaff82d4050f984da0c248b615", + "sha256:d1c3572526997b36f245a96a2b1713bf79ce99b271bbcf084beb6b9b075f29ea", + "sha256:efcfe97d1b3c79e486554efddeb8f6f53a4cdd4cf6086642784fa31fc384e1d7", + "sha256:f514ef4cd14bb6fb484b4a60203e912cfcb64f2ab139e88c2274511514bf7308" ], "markers": "python_version >= '3.7' and python_full_version not in '3.9.0, 3.9.1'", - "version": "==44.0.1" + "version": "==44.0.2" }, "dbrepo": { "hashes": [ - "sha256:e2312f0d3cff34934578a16b01d646d8309e3a3d1bb4cbda9f984acf97824e00" + "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" ], - "path": "./lib/dbrepo-1.6.5.tar.gz" + "path": "./lib/dbrepo-1.7.0.tar.gz" }, "docker": { "hashes": [ @@ -611,7 +615,7 @@ "sha256:f406b22b7c9a9b4f8aa9d2ab13d6ae0ac3e85c9a809bd590ad53fed2bf70dc79", "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f" ], - "markers": "python_version < '3.14' and (platform_machine == 'aarch64' or (platform_machine == 'ppc64le' or (platform_machine == 'x86_64' or (platform_machine == 'amd64' or (platform_machine == 'AMD64' or (platform_machine == 'win32' or platform_machine == 'WIN32'))))))", + "markers": "python_version >= '3.7'", "version": "==3.1.1" }, "gunicorn": { @@ -748,11 +752,11 @@ }, "mistune": { "hashes": [ - "sha256:02106ac2aa4f66e769debbfa028509a275069dcffce0dfa578edd7b991ee700a", - "sha256:e0740d635f515119f7d1feb6f9b192ee60f0cc649f80a8f944f905706a21654c" + "sha256:4b47731332315cdca99e0ded46fc0004001c1299ff773dfb48fbe1fd226de319", + "sha256:733bf018ba007e8b5f2d3a9eb624034f6ee26c4ea769a98ec533ee111d504dff" ], "markers": "python_version >= '3.8'", - "version": "==3.1.1" + "version": "==3.1.2" }, "multidict": { "hashes": [ @@ -910,7 +914,7 @@ "sha256:f4ca91d61a4bf61b0f2228f24bbfa6a9facd5f8af03759fe2a655c50ae2c6610", "sha256:f6b3dfc7661f8842babd8ea07e9897fe3d9b69a1d7e5fbb743e4160f9387833b" ], - "markers": "python_version == '3.11'", + "markers": "python_version >= '3.10'", "version": "==2.2.3" }, "opensearch-py": { @@ -1012,91 +1016,107 @@ }, "propcache": { "hashes": [ - "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4", - "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4", - "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a", - "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f", - "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9", - "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d", - "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e", - "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6", - "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf", - "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034", - "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d", - "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16", - "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30", - "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba", - "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95", - "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d", - "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae", - "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348", - "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2", - "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64", - "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce", - "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54", - "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629", - "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54", - "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1", - "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b", - "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf", - "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b", - "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587", - "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097", - "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea", - "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24", - "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7", - "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541", - "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6", - "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634", - "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3", - "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d", - "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034", - "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465", - "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2", - "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf", - "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1", - "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04", - "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5", - "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583", - "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb", - "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b", - "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c", - "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958", - "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc", - "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4", - "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82", - "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e", - "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce", - "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9", - "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518", - "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536", - "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505", - "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052", - "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff", - "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1", - "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f", - "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681", - "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347", - "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af", - "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246", - "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787", - "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0", - "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f", - "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439", - "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3", - "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6", - "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca", - "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec", - "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d", - "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3", - "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16", - "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717", - "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6", - "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd", - "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212" + "sha256:02df07041e0820cacc8f739510078f2aadcfd3fc57eaeeb16d5ded85c872c89e", + "sha256:03acd9ff19021bd0567582ac88f821b66883e158274183b9e5586f678984f8fe", + "sha256:03c091bb752349402f23ee43bb2bff6bd80ccab7c9df6b88ad4322258d6960fc", + "sha256:07700939b2cbd67bfb3b76a12e1412405d71019df00ca5697ce75e5ef789d829", + "sha256:0c3e893c4464ebd751b44ae76c12c5f5c1e4f6cbd6fbf67e3783cd93ad221863", + "sha256:119e244ab40f70a98c91906d4c1f4c5f2e68bd0b14e7ab0a06922038fae8a20f", + "sha256:11ae6a8a01b8a4dc79093b5d3ca2c8a4436f5ee251a9840d7790dccbd96cb649", + "sha256:15010f29fbed80e711db272909a074dc79858c6d28e2915704cfc487a8ac89c6", + "sha256:19d36bb351ad5554ff20f2ae75f88ce205b0748c38b146c75628577020351e3c", + "sha256:1c8f7d896a16da9455f882870a507567d4f58c53504dc2d4b1e1d386dfe4588a", + "sha256:2383a17385d9800b6eb5855c2f05ee550f803878f344f58b6e194de08b96352c", + "sha256:24c04f8fbf60094c531667b8207acbae54146661657a1b1be6d3ca7773b7a545", + "sha256:2578541776769b500bada3f8a4eeaf944530516b6e90c089aa368266ed70c49e", + "sha256:26a67e5c04e3119594d8cfae517f4b9330c395df07ea65eab16f3d559b7068fe", + "sha256:2b975528998de037dfbc10144b8aed9b8dd5a99ec547f14d1cb7c5665a43f075", + "sha256:2d15bc27163cd4df433e75f546b9ac31c1ba7b0b128bfb1b90df19082466ff57", + "sha256:2d913d36bdaf368637b4f88d554fb9cb9d53d6920b9c5563846555938d5450bf", + "sha256:3302c5287e504d23bb0e64d2a921d1eb4a03fb93a0a0aa3b53de059f5a5d737d", + "sha256:36ca5e9a21822cc1746023e88f5c0af6fce3af3b85d4520efb1ce4221bed75cc", + "sha256:3b812b3cb6caacd072276ac0492d249f210006c57726b6484a1e1805b3cfeea0", + "sha256:3c6ec957025bf32b15cbc6b67afe233c65b30005e4c55fe5768e4bb518d712f1", + "sha256:41de3da5458edd5678b0f6ff66691507f9885f5fe6a0fb99a5d10d10c0fd2d64", + "sha256:42924dc0c9d73e49908e35bbdec87adedd651ea24c53c29cac103ede0ea1d340", + "sha256:4544699674faf66fb6b4473a1518ae4999c1b614f0b8297b1cef96bac25381db", + "sha256:46ed02532cb66612d42ae5c3929b5e98ae330ea0f3900bc66ec5f4862069519b", + "sha256:49ea05212a529c2caffe411e25a59308b07d6e10bf2505d77da72891f9a05641", + "sha256:4fa0e7c9c3cf7c276d4f6ab9af8adddc127d04e0fcabede315904d2ff76db626", + "sha256:507c5357a8d8b4593b97fb669c50598f4e6cccbbf77e22fa9598aba78292b4d7", + "sha256:549722908de62aa0b47a78b90531c022fa6e139f9166be634f667ff45632cc92", + "sha256:58e6d2a5a7cb3e5f166fd58e71e9a4ff504be9dc61b88167e75f835da5764d07", + "sha256:5a16167118677d94bb48bfcd91e420088854eb0737b76ec374b91498fb77a70e", + "sha256:5d62c4f6706bff5d8a52fd51fec6069bef69e7202ed481486c0bc3874912c787", + "sha256:5fa159dcee5dba00c1def3231c249cf261185189205073bde13797e57dd7540a", + "sha256:6032231d4a5abd67c7f71168fd64a47b6b451fbcb91c8397c2f7610e67683810", + "sha256:63f26258a163c34542c24808f03d734b338da66ba91f410a703e505c8485791d", + "sha256:65a37714b8ad9aba5780325228598a5b16c47ba0f8aeb3dc0514701e4413d7c0", + "sha256:67054e47c01b7b349b94ed0840ccae075449503cf1fdd0a1fdd98ab5ddc2667b", + "sha256:67dda3c7325691c2081510e92c561f465ba61b975f481735aefdfc845d2cd043", + "sha256:6985a593417cdbc94c7f9c3403747335e450c1599da1647a5af76539672464d3", + "sha256:6a1948df1bb1d56b5e7b0553c0fa04fd0e320997ae99689488201f19fa90d2e7", + "sha256:6b5b7fd6ee7b54e01759f2044f936dcf7dea6e7585f35490f7ca0420fe723c0d", + "sha256:6c929916cbdb540d3407c66f19f73387f43e7c12fa318a66f64ac99da601bcdf", + "sha256:6f4d7a7c0aff92e8354cceca6fe223973ddf08401047920df0fcb24be2bd5138", + "sha256:728af36011bb5d344c4fe4af79cfe186729efb649d2f8b395d1572fb088a996c", + "sha256:742840d1d0438eb7ea4280f3347598f507a199a35a08294afdcc560c3739989d", + "sha256:75e872573220d1ee2305b35c9813626e620768248425f58798413e9c39741f46", + "sha256:794c3dd744fad478b6232289c866c25406ecdfc47e294618bdf1697e69bd64a6", + "sha256:7c0fdbdf6983526e269e5a8d53b7ae3622dd6998468821d660d0daf72779aefa", + "sha256:7c5f5290799a3f6539cc5e6f474c3e5c5fbeba74a5e1e5be75587746a940d51e", + "sha256:7c6e7e4f9167fddc438cd653d826f2222222564daed4116a02a184b464d3ef05", + "sha256:7cedd25e5f678f7738da38037435b340694ab34d424938041aa630d8bac42663", + "sha256:7e2e068a83552ddf7a39a99488bcba05ac13454fb205c847674da0352602082f", + "sha256:8319293e85feadbbfe2150a5659dbc2ebc4afdeaf7d98936fb9a2f2ba0d4c35c", + "sha256:8526b0941ec5a40220fc4dfde76aed58808e2b309c03e9fa8e2260083ef7157f", + "sha256:8884ba1a0fe7210b775106b25850f5e5a9dc3c840d1ae9924ee6ea2eb3acbfe7", + "sha256:8cb625bcb5add899cb8ba7bf716ec1d3e8f7cdea9b0713fa99eadf73b6d4986f", + "sha256:8d663fd71491dde7dfdfc899d13a067a94198e90695b4321084c6e450743b8c7", + "sha256:8ee1983728964d6070ab443399c476de93d5d741f71e8f6e7880a065f878e0b9", + "sha256:997e7b8f173a391987df40f3b52c423e5850be6f6df0dcfb5376365440b56667", + "sha256:9be90eebc9842a93ef8335291f57b3b7488ac24f70df96a6034a13cb58e6ff86", + "sha256:9ddd49258610499aab83b4f5b61b32e11fce873586282a0e972e5ab3bcadee51", + "sha256:9ecde3671e62eeb99e977f5221abcf40c208f69b5eb986b061ccec317c82ebd0", + "sha256:9ff4e9ecb6e4b363430edf2c6e50173a63e0820e549918adef70515f87ced19a", + "sha256:a254537b9b696ede293bfdbc0a65200e8e4507bc9f37831e2a0318a9b333c85c", + "sha256:a2b9bf8c79b660d0ca1ad95e587818c30ccdb11f787657458d6f26a1ea18c568", + "sha256:a61a68d630e812b67b5bf097ab84e2cd79b48c792857dc10ba8a223f5b06a2af", + "sha256:a7080b0159ce05f179cfac592cda1a82898ca9cd097dacf8ea20ae33474fbb25", + "sha256:a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5", + "sha256:a94ffc66738da99232ddffcf7910e0f69e2bbe3a0802e54426dbf0714e1c2ffe", + "sha256:aa806bbc13eac1ab6291ed21ecd2dd426063ca5417dd507e6be58de20e58dfcf", + "sha256:b0c1a133d42c6fc1f5fbcf5c91331657a1ff822e87989bf4a6e2e39b818d0ee9", + "sha256:b58229a844931bca61b3a20efd2be2a2acb4ad1622fc026504309a6883686fbf", + "sha256:bb2f144c6d98bb5cbc94adeb0447cfd4c0f991341baa68eee3f3b0c9c0e83767", + "sha256:be90c94570840939fecedf99fa72839aed70b0ced449b415c85e01ae67422c90", + "sha256:bf0d9a171908f32d54f651648c7290397b8792f4303821c42a74e7805bfb813c", + "sha256:bf15fc0b45914d9d1b706f7c9c4f66f2b7b053e9517e40123e137e8ca8958b3d", + "sha256:bf4298f366ca7e1ad1d21bbb58300a6985015909964077afd37559084590c929", + "sha256:c441c841e82c5ba7a85ad25986014be8d7849c3cfbdb6004541873505929a74e", + "sha256:cacea77ef7a2195f04f9279297684955e3d1ae4241092ff0cfcef532bb7a1c32", + "sha256:cd54895e4ae7d32f1e3dd91261df46ee7483a735017dc6f987904f194aa5fd14", + "sha256:d1323cd04d6e92150bcc79d0174ce347ed4b349d748b9358fd2e497b121e03c8", + "sha256:d383bf5e045d7f9d239b38e6acadd7b7fdf6c0087259a84ae3475d18e9a2ae8b", + "sha256:d3e7420211f5a65a54675fd860ea04173cde60a7cc20ccfbafcccd155225f8bc", + "sha256:d8074c5dd61c8a3e915fa8fc04754fa55cfa5978200d2daa1e2d4294c1f136aa", + "sha256:df03cd88f95b1b99052b52b1bb92173229d7a674df0ab06d2b25765ee8404bce", + "sha256:e45377d5d6fefe1677da2a2c07b024a6dac782088e37c0b1efea4cfe2b1be19b", + "sha256:e53d19c2bf7d0d1e6998a7e693c7e87300dd971808e6618964621ccd0e01fe4e", + "sha256:e560fd75aaf3e5693b91bcaddd8b314f4d57e99aef8a6c6dc692f935cc1e6bbf", + "sha256:ec5060592d83454e8063e487696ac3783cc48c9a329498bafae0d972bc7816c9", + "sha256:ecc2920630283e0783c22e2ac94427f8cca29a04cfdf331467d4f661f4072dac", + "sha256:ed7161bccab7696a473fe7ddb619c1d75963732b37da4618ba12e60899fefe4f", + "sha256:ee0bd3a7b2e184e88d25c9baa6a9dc609ba25b76daae942edfb14499ac7ec374", + "sha256:ee25f1ac091def37c4b59d192bbe3a206298feeb89132a470325bf76ad122a1e", + "sha256:efa44f64c37cc30c9f05932c740a8b40ce359f51882c70883cc95feac842da4d", + "sha256:f47d52fd9b2ac418c4890aad2f6d21a6b96183c98021f0a48497a904199f006e", + "sha256:f857034dc68d5ceb30fb60afb6ff2103087aea10a01b613985610e007053a121", + "sha256:fb91d20fa2d3b13deea98a690534697742029f4fb83673a3501ae6e3746508b5", + "sha256:fddb8870bdb83456a489ab67c6b3040a8d5a55069aa6f72f9d872235fbc52f54" ], "markers": "python_version >= '3.9'", - "version": "==0.2.1" + "version": "==0.3.0" }, "pycparser": { "hashes": [ @@ -1238,12 +1258,12 @@ }, "pytest": { "hashes": [ - "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", - "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761" + "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", + "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==8.3.4" + "version": "==8.3.5" }, "python-dateutil": { "hashes": [ @@ -1355,112 +1375,112 @@ }, "rpds-py": { "hashes": [ - "sha256:009de23c9c9ee54bf11303a966edf4d9087cd43a6003672e6aa7def643d06518", - "sha256:02fbb9c288ae08bcb34fb41d516d5eeb0455ac35b5512d03181d755d80810059", - "sha256:0a0461200769ab3b9ab7e513f6013b7a97fdeee41c29b9db343f3c5a8e2b9e61", - "sha256:0b09865a9abc0ddff4e50b5ef65467cd94176bf1e0004184eb915cbc10fc05c5", - "sha256:0b8db6b5b2d4491ad5b6bdc2bc7c017eec108acbf4e6785f42a9eb0ba234f4c9", - "sha256:0c150c7a61ed4a4f4955a96626574e9baf1adf772c2fb61ef6a5027e52803543", - "sha256:0f3cec041684de9a4684b1572fe28c7267410e02450f4561700ca5a3bc6695a2", - "sha256:1352ae4f7c717ae8cba93421a63373e582d19d55d2ee2cbb184344c82d2ae55a", - "sha256:177c7c0fce2855833819c98e43c262007f42ce86651ffbb84f37883308cb0e7d", - "sha256:1978d0021e943aae58b9b0b196fb4895a25cc53d3956b8e35e0b7682eefb6d56", - "sha256:1a60bce91f81ddaac922a40bbb571a12c1070cb20ebd6d49c48e0b101d87300d", - "sha256:1aef18820ef3e4587ebe8b3bc9ba6e55892a6d7b93bac6d29d9f631a3b4befbd", - "sha256:1e9663daaf7a63ceccbbb8e3808fe90415b0757e2abddbfc2e06c857bf8c5e2b", - "sha256:20070c65396f7373f5df4005862fa162db5d25d56150bddd0b3e8214e8ef45b4", - "sha256:214b7a953d73b5e87f0ebece4a32a5bd83c60a3ecc9d4ec8f1dca968a2d91e99", - "sha256:22bebe05a9ffc70ebfa127efbc429bc26ec9e9b4ee4d15a740033efda515cf3d", - "sha256:24e8abb5878e250f2eb0d7859a8e561846f98910326d06c0d51381fed59357bd", - "sha256:26fd7cac7dd51011a245f29a2cc6489c4608b5a8ce8d75661bb4a1066c52dfbe", - "sha256:27b1d3b3915a99208fee9ab092b8184c420f2905b7d7feb4aeb5e4a9c509b8a1", - "sha256:27e98004595899949bd7a7b34e91fa7c44d7a97c40fcaf1d874168bb652ec67e", - "sha256:2b8f60e1b739a74bab7e01fcbe3dddd4657ec685caa04681df9d562ef15b625f", - "sha256:2de29005e11637e7a2361fa151f780ff8eb2543a0da1413bb951e9f14b699ef3", - "sha256:2e8b55d8517a2fda8d95cb45d62a5a8bbf9dd0ad39c5b25c8833efea07b880ca", - "sha256:2fa4331c200c2521512595253f5bb70858b90f750d39b8cbfd67465f8d1b596d", - "sha256:3445e07bf2e8ecfeef6ef67ac83de670358abf2996916039b16a218e3d95e97e", - "sha256:3453e8d41fe5f17d1f8e9c383a7473cd46a63661628ec58e07777c2fff7196dc", - "sha256:378753b4a4de2a7b34063d6f95ae81bfa7b15f2c1a04a9518e8644e81807ebea", - "sha256:3af6e48651c4e0d2d166dc1b033b7042ea3f871504b6805ba5f4fe31581d8d38", - "sha256:3dfcbc95bd7992b16f3f7ba05af8a64ca694331bd24f9157b49dadeeb287493b", - "sha256:3f21f0495edea7fdbaaa87e633a8689cd285f8f4af5c869f27bc8074638ad69c", - "sha256:4041711832360a9b75cfb11b25a6a97c8fb49c07b8bd43d0d02b45d0b499a4ff", - "sha256:44d61b4b7d0c2c9ac019c314e52d7cbda0ae31078aabd0f22e583af3e0d79723", - "sha256:4617e1915a539a0d9a9567795023de41a87106522ff83fbfaf1f6baf8e85437e", - "sha256:4b232061ca880db21fa14defe219840ad9b74b6158adb52ddf0e87bead9e8493", - "sha256:5246b14ca64a8675e0a7161f7af68fe3e910e6b90542b4bfb5439ba752191df6", - "sha256:5725dd9cc02068996d4438d397e255dcb1df776b7ceea3b9cb972bdb11260a83", - "sha256:583f6a1993ca3369e0f80ba99d796d8e6b1a3a2a442dd4e1a79e652116413091", - "sha256:59259dc58e57b10e7e18ce02c311804c10c5a793e6568f8af4dead03264584d1", - "sha256:593eba61ba0c3baae5bc9be2f5232430453fb4432048de28399ca7376de9c627", - "sha256:59f4a79c19232a5774aee369a0c296712ad0e77f24e62cad53160312b1c1eaa1", - "sha256:5f0e260eaf54380380ac3808aa4ebe2d8ca28b9087cf411649f96bad6900c728", - "sha256:62d9cfcf4948683a18a9aff0ab7e1474d407b7bab2ca03116109f8464698ab16", - "sha256:64607d4cbf1b7e3c3c8a14948b99345eda0e161b852e122c6bb71aab6d1d798c", - "sha256:655ca44a831ecb238d124e0402d98f6212ac527a0ba6c55ca26f616604e60a45", - "sha256:666ecce376999bf619756a24ce15bb14c5bfaf04bf00abc7e663ce17c3f34fe7", - "sha256:68049202f67380ff9aa52f12e92b1c30115f32e6895cd7198fa2a7961621fc5a", - "sha256:69803198097467ee7282750acb507fba35ca22cc3b85f16cf45fb01cb9097730", - "sha256:6c7b99ca52c2c1752b544e310101b98a659b720b21db00e65edca34483259967", - "sha256:6dd9412824c4ce1aca56c47b0991e65bebb7ac3f4edccfd3f156150c96a7bf25", - "sha256:70eb60b3ae9245ddea20f8a4190bd79c705a22f8028aaf8bbdebe4716c3fab24", - "sha256:70fb28128acbfd264eda9bf47015537ba3fe86e40d046eb2963d75024be4d055", - "sha256:7b2513ba235829860b13faa931f3b6846548021846ac808455301c23a101689d", - "sha256:7ef9d9da710be50ff6809fed8f1963fecdfecc8b86656cadfca3bc24289414b0", - "sha256:81e69b0a0e2537f26d73b4e43ad7bc8c8efb39621639b4434b76a3de50c6966e", - "sha256:8633e471c6207a039eff6aa116e35f69f3156b3989ea3e2d755f7bc41754a4a7", - "sha256:8bd7c8cfc0b8247c8799080fbff54e0b9619e17cdfeb0478ba7295d43f635d7c", - "sha256:9253fc214112405f0afa7db88739294295f0e08466987f1d70e29930262b4c8f", - "sha256:99b37292234e61325e7a5bb9689e55e48c3f5f603af88b1642666277a81f1fbd", - "sha256:9bd7228827ec7bb817089e2eb301d907c0d9827a9e558f22f762bb690b131652", - "sha256:9beeb01d8c190d7581a4d59522cd3d4b6887040dcfc744af99aa59fef3e041a8", - "sha256:a63cbdd98acef6570c62b92a1e43266f9e8b21e699c363c0fef13bd530799c11", - "sha256:a76e42402542b1fae59798fab64432b2d015ab9d0c8c47ba7addddbaf7952333", - "sha256:ac0a03221cdb5058ce0167ecc92a8c89e8d0decdc9e99a2ec23380793c4dcb96", - "sha256:b0b4136a252cadfa1adb705bb81524eee47d9f6aab4f2ee4fa1e9d3cd4581f64", - "sha256:b25bc607423935079e05619d7de556c91fb6adeae9d5f80868dde3468657994b", - "sha256:b3d504047aba448d70cf6fa22e06cb09f7cbd761939fdd47604f5e007675c24e", - "sha256:bb47271f60660803ad11f4c61b42242b8c1312a31c98c578f79ef9387bbde21c", - "sha256:bbb232860e3d03d544bc03ac57855cd82ddf19c7a07651a7c0fdb95e9efea8b9", - "sha256:bc27863442d388870c1809a87507727b799c8460573cfbb6dc0eeaef5a11b5ec", - "sha256:bc51abd01f08117283c5ebf64844a35144a0843ff7b2983e0648e4d3d9f10dbb", - "sha256:be2eb3f2495ba669d2a985f9b426c1797b7d48d6963899276d22f23e33d47e37", - "sha256:bf9db5488121b596dbfc6718c76092fda77b703c1f7533a226a5a9f65248f8ad", - "sha256:c58e2339def52ef6b71b8f36d13c3688ea23fa093353f3a4fee2556e62086ec9", - "sha256:cfbc454a2880389dbb9b5b398e50d439e2e58669160f27b60e5eca11f68ae17c", - "sha256:cff63a0272fcd259dcc3be1657b07c929c466b067ceb1c20060e8d10af56f5bf", - "sha256:d115bffdd417c6d806ea9069237a4ae02f513b778e3789a359bc5856e0404cc4", - "sha256:d20cfb4e099748ea39e6f7b16c91ab057989712d31761d3300d43134e26e165f", - "sha256:d48424e39c2611ee1b84ad0f44fb3b2b53d473e65de061e3f460fc0be5f1939d", - "sha256:e0fa2d4ec53dc51cf7d3bb22e0aa0143966119f42a0c3e4998293a3dd2856b09", - "sha256:e32fee8ab45d3c2db6da19a5323bc3362237c8b653c70194414b892fd06a080d", - "sha256:e35ba67d65d49080e8e5a1dd40101fccdd9798adb9b050ff670b7d74fa41c566", - "sha256:e3fb866d9932a3d7d0c82da76d816996d1667c44891bd861a0f97ba27e84fc74", - "sha256:e61b02c3f7a1e0b75e20c3978f7135fd13cb6cf551bf4a6d29b999a88830a338", - "sha256:e67ba3c290821343c192f7eae1d8fd5999ca2dc99994114643e2f2d3e6138b15", - "sha256:e79dd39f1e8c3504be0607e5fc6e86bb60fe3584bec8b782578c3b0fde8d932c", - "sha256:e89391e6d60251560f0a8f4bd32137b077a80d9b7dbe6d5cab1cd80d2746f648", - "sha256:ea7433ce7e4bfc3a85654aeb6747babe3f66eaf9a1d0c1e7a4435bbdf27fea84", - "sha256:eaf16ae9ae519a0e237a0f528fd9f0197b9bb70f40263ee57ae53c2b8d48aeb3", - "sha256:eb0c341fa71df5a4595f9501df4ac5abfb5a09580081dffbd1ddd4654e6e9123", - "sha256:f276b245347e6e36526cbd4a266a417796fc531ddf391e43574cf6466c492520", - "sha256:f47ad3d5f3258bd7058d2d506852217865afefe6153a36eb4b6928758041d831", - "sha256:f56a6b404f74ab372da986d240e2e002769a7d7102cc73eb238a4f72eec5284e", - "sha256:f5cf2a0c2bdadf3791b5c205d55a37a54025c6e18a71c71f82bb536cf9a454bf", - "sha256:f5d36399a1b96e1a5fdc91e0522544580dbebeb1f77f27b2b0ab25559e103b8b", - "sha256:f60bd8423be1d9d833f230fdbccf8f57af322d96bcad6599e5a771b151398eb2", - "sha256:f612463ac081803f243ff13cccc648578e2279295048f2a8d5eb430af2bae6e3", - "sha256:f73d3fef726b3243a811121de45193c0ca75f6407fe66f3f4e183c983573e130", - "sha256:f82a116a1d03628a8ace4859556fb39fd1424c933341a08ea3ed6de1edb0283b", - "sha256:fb0ba113b4983beac1a2eb16faffd76cb41e176bf58c4afe3e14b9c681f702de", - "sha256:fb4f868f712b2dd4bcc538b0a0c1f63a2b1d584c925e69a224d759e7070a12d5", - "sha256:fb6116dfb8d1925cbdb52595560584db42a7f664617a1f7d7f6e32f138cdf37d", - "sha256:fda7cb070f442bf80b642cd56483b5548e43d366fe3f39b98e67cce780cded00", - "sha256:feea821ee2a9273771bae61194004ee2fc33f8ec7db08117ef9147d4bbcbca8e" + "sha256:09cd7dbcb673eb60518231e02874df66ec1296c01a4fcd733875755c02014b19", + "sha256:0f3288930b947cbebe767f84cf618d2cbe0b13be476e749da0e6a009f986248c", + "sha256:0fced9fd4a07a1ded1bac7e961ddd9753dd5d8b755ba8e05acba54a21f5f1522", + "sha256:112b8774b0b4ee22368fec42749b94366bd9b536f8f74c3d4175d4395f5cbd31", + "sha256:11dd60b2ffddba85715d8a66bb39b95ddbe389ad2cfcf42c833f1bcde0878eaf", + "sha256:178f8a60fc24511c0eb756af741c476b87b610dba83270fce1e5a430204566a4", + "sha256:1b08027489ba8fedde72ddd233a5ea411b85a6ed78175f40285bd401bde7466d", + "sha256:1bf5be5ba34e19be579ae873da515a2836a2166d8d7ee43be6ff909eda42b72b", + "sha256:1ed7de3c86721b4e83ac440751329ec6a1102229aa18163f84c75b06b525ad7e", + "sha256:1eedaaccc9bb66581d4ae7c50e15856e335e57ef2734dbc5fd8ba3e2a4ab3cb6", + "sha256:243241c95174b5fb7204c04595852fe3943cc41f47aa14c3828bc18cd9d3b2d6", + "sha256:26bb3e8de93443d55e2e748e9fd87deb5f8075ca7bc0502cfc8be8687d69a2ec", + "sha256:271fa2184cf28bdded86bb6217c8e08d3a169fe0bbe9be5e8d96e8476b707122", + "sha256:28358c54fffadf0ae893f6c1050e8f8853e45df22483b7fff2f6ab6152f5d8bf", + "sha256:285019078537949cecd0190f3690a0b0125ff743d6a53dfeb7a4e6787af154f5", + "sha256:2893d778d4671ee627bac4037a075168b2673c57186fb1a57e993465dbd79a93", + "sha256:2a54027554ce9b129fc3d633c92fa33b30de9f08bc61b32c053dc9b537266fed", + "sha256:2c6ae11e6e93728d86aafc51ced98b1658a0080a7dd9417d24bfb955bb09c3c2", + "sha256:2cfa07c346a7ad07019c33fb9a63cf3acb1f5363c33bc73014e20d9fe8b01cdd", + "sha256:35d5631ce0af26318dba0ae0ac941c534453e42f569011585cb323b7774502a5", + "sha256:3614d280bf7aab0d3721b5ce0e73434acb90a2c993121b6e81a1c15c665298ac", + "sha256:3902df19540e9af4cc0c3ae75974c65d2c156b9257e91f5101a51f99136d834c", + "sha256:3aaf141d39f45322e44fc2c742e4b8b4098ead5317e5f884770c8df0c332da70", + "sha256:3d8abf7896a91fb97e7977d1aadfcc2c80415d6dc2f1d0fca5b8d0df247248f3", + "sha256:3e77febf227a1dc3220159355dba68faa13f8dca9335d97504abf428469fb18b", + "sha256:3e9212f52074fc9d72cf242a84063787ab8e21e0950d4d6709886fb62bcb91d5", + "sha256:3ee9d6f0b38efb22ad94c3b68ffebe4c47865cdf4b17f6806d6c674e1feb4246", + "sha256:4233df01a250b3984465faed12ad472f035b7cd5240ea3f7c76b7a7016084495", + "sha256:4263320ed887ed843f85beba67f8b2d1483b5947f2dc73a8b068924558bfeace", + "sha256:4ab923167cfd945abb9b51a407407cf19f5bee35001221f2911dc85ffd35ff4f", + "sha256:4caafd1a22e5eaa3732acb7672a497123354bef79a9d7ceed43387d25025e935", + "sha256:50fb62f8d8364978478b12d5f03bf028c6bc2af04082479299139dc26edf4c64", + "sha256:55ff4151cfd4bc635e51cfb1c59ac9f7196b256b12e3a57deb9e5742e65941ad", + "sha256:5b98b6c953e5c2bda51ab4d5b4f172617d462eebc7f4bfdc7c7e6b423f6da957", + "sha256:5c9ff044eb07c8468594d12602291c635da292308c8c619244e30698e7fc455a", + "sha256:5e9c206a1abc27e0588cf8b7c8246e51f1a16a103734f7750830a1ccb63f557a", + "sha256:5fb89edee2fa237584e532fbf78f0ddd1e49a47c7c8cfa153ab4849dc72a35e6", + "sha256:633462ef7e61d839171bf206551d5ab42b30b71cac8f10a64a662536e057fdef", + "sha256:66f8d2a17e5838dd6fb9be6baaba8e75ae2f5fa6b6b755d597184bfcd3cb0eba", + "sha256:6959bb9928c5c999aba4a3f5a6799d571ddc2c59ff49917ecf55be2bbb4e3722", + "sha256:698a79d295626ee292d1730bc2ef6e70a3ab135b1d79ada8fde3ed0047b65a10", + "sha256:721f9c4011b443b6e84505fc00cc7aadc9d1743f1c988e4c89353e19c4a968ee", + "sha256:72e680c1518733b73c994361e4b06441b92e973ef7d9449feec72e8ee4f713da", + "sha256:75307599f0d25bf6937248e5ac4e3bde5ea72ae6618623b86146ccc7845ed00b", + "sha256:754fba3084b70162a6b91efceee8a3f06b19e43dac3f71841662053c0584209a", + "sha256:759462b2d0aa5a04be5b3e37fb8183615f47014ae6b116e17036b131985cb731", + "sha256:7938c7b0599a05246d704b3f5e01be91a93b411d0d6cc62275f025293b8a11ce", + "sha256:7b77e07233925bd33fc0022b8537774423e4c6680b6436316c5075e79b6384f4", + "sha256:7e5413d2e2d86025e73f05510ad23dad5950ab8417b7fc6beaad99be8077138b", + "sha256:7f3240dcfa14d198dba24b8b9cb3b108c06b68d45b7babd9eefc1038fdf7e707", + "sha256:7f9682a8f71acdf59fd554b82b1c12f517118ee72c0f3944eda461606dfe7eb9", + "sha256:8d67beb6002441faef8251c45e24994de32c4c8686f7356a1f601ad7c466f7c3", + "sha256:9441af1d25aed96901f97ad83d5c3e35e6cd21a25ca5e4916c82d7dd0490a4fa", + "sha256:98b257ae1e83f81fb947a363a274c4eb66640212516becaff7bef09a5dceacaa", + "sha256:9e9f3a3ac919406bc0414bbbd76c6af99253c507150191ea79fab42fdb35982a", + "sha256:a1c66e71ecfd2a4acf0e4bd75e7a3605afa8f9b28a3b497e4ba962719df2be57", + "sha256:a1e17d8dc8e57d8e0fd21f8f0f0a5211b3fa258b2e444c2053471ef93fe25a00", + "sha256:a20cb698c4a59c534c6701b1c24a968ff2768b18ea2991f886bd8985ce17a89f", + "sha256:a970bfaf130c29a679b1d0a6e0f867483cea455ab1535fb427566a475078f27f", + "sha256:a98f510d86f689fcb486dc59e6e363af04151e5260ad1bdddb5625c10f1e95f8", + "sha256:a9d3b728f5a5873d84cba997b9d617c6090ca5721caaa691f3b1a78c60adc057", + "sha256:ad76f44f70aac3a54ceb1813ca630c53415da3a24fd93c570b2dfb4856591017", + "sha256:ae28144c1daa61366205d32abd8c90372790ff79fc60c1a8ad7fd3c8553a600e", + "sha256:b03a8d50b137ee758e4c73638b10747b7c39988eb8e6cd11abb7084266455165", + "sha256:b5a96fcac2f18e5a0a23a75cd27ce2656c66c11c127b0318e508aab436b77428", + "sha256:b5ef909a37e9738d146519657a1aab4584018746a18f71c692f2f22168ece40c", + "sha256:b79f5ced71efd70414a9a80bbbfaa7160da307723166f09b69773153bf17c590", + "sha256:b91cceb5add79ee563bd1f70b30896bd63bc5f78a11c1f00a1e931729ca4f1f4", + "sha256:b92f5654157de1379c509b15acec9d12ecf6e3bc1996571b6cb82a4302060447", + "sha256:c04ca91dda8a61584165825907f5c967ca09e9c65fe8966ee753a3f2b019fe1e", + "sha256:c1f8afa346ccd59e4e5630d5abb67aba6a9812fddf764fd7eb11f382a345f8cc", + "sha256:c5334a71f7dc1160382d45997e29f2637c02f8a26af41073189d79b95d3321f1", + "sha256:c617d7453a80e29d9973b926983b1e700a9377dbe021faa36041c78537d7b08c", + "sha256:c632419c3870507ca20a37c8f8f5352317aca097639e524ad129f58c125c61c6", + "sha256:c6760211eee3a76316cf328f5a8bd695b47b1626d21c8a27fb3b2473a884d597", + "sha256:c698d123ce5d8f2d0cd17f73336615f6a2e3bdcedac07a1291bb4d8e7d82a05a", + "sha256:c76b32eb2ab650a29e423525e84eb197c45504b1c1e6e17b6cc91fcfeb1a4b1d", + "sha256:c8f7e90b948dc9dcfff8003f1ea3af08b29c062f681c05fd798e36daa3f7e3e8", + "sha256:c9e799dac1ffbe7b10c1fd42fe4cd51371a549c6e108249bde9cd1200e8f59b4", + "sha256:cafa48f2133d4daa028473ede7d81cd1b9f9e6925e9e4003ebdf77010ee02f35", + "sha256:ce473a2351c018b06dd8d30d5da8ab5a0831056cc53b2006e2a8028172c37ce5", + "sha256:d31ed4987d72aabdf521eddfb6a72988703c091cfc0064330b9e5f8d6a042ff5", + "sha256:d550d7e9e7d8676b183b37d65b5cd8de13676a738973d330b59dc8312df9c5dc", + "sha256:d6adb81564af0cd428910f83fa7da46ce9ad47c56c0b22b50872bc4515d91966", + "sha256:d6f6512a90bd5cd9030a6237f5346f046c6f0e40af98657568fa45695d4de59d", + "sha256:d7031d493c4465dbc8d40bd6cafefef4bd472b17db0ab94c53e7909ee781b9ef", + "sha256:d9f75a06ecc68f159d5d7603b734e1ff6daa9497a929150f794013aa9f6e3f12", + "sha256:db7707dde9143a67b8812c7e66aeb2d843fe33cc8e374170f4d2c50bd8f2472d", + "sha256:e0397dd0b3955c61ef9b22838144aa4bef6f0796ba5cc8edfc64d468b93798b4", + "sha256:e0df046f2266e8586cf09d00588302a32923eb6386ced0ca5c9deade6af9a149", + "sha256:e14f86b871ea74c3fddc9a40e947d6a5d09def5adc2076ee61fb910a9014fb35", + "sha256:e5963ea87f88bddf7edd59644a35a0feecf75f8985430124c253612d4f7d27ae", + "sha256:e768267cbe051dd8d1c5305ba690bb153204a09bf2e3de3ae530de955f5b5580", + "sha256:e9cb79ecedfc156c0692257ac7ed415243b6c35dd969baa461a6888fc79f2f07", + "sha256:ed6f011bedca8585787e5082cce081bac3d30f54520097b2411351b3574e1219", + "sha256:f3429fb8e15b20961efca8c8b21432623d85db2228cc73fe22756c6637aa39e7", + "sha256:f35eff113ad430b5272bbfc18ba111c66ff525828f24898b4e146eb479a2cdda", + "sha256:f3a6cb95074777f1ecda2ca4fa7717caa9ee6e534f42b7575a8f0d4cb0c24013", + "sha256:f7356a6da0562190558c4fcc14f0281db191cdf4cb96e7604c06acfcee96df15", + "sha256:f88626e3f5e57432e6191cd0c5d6d6b319b635e70b40be2ffba713053e5147dd", + "sha256:fad784a31869747df4ac968a351e070c06ca377549e4ace94775aaa3ab33ee06", + "sha256:fc869af5cba24d45fb0399b0cfdbcefcf6910bf4dee5d74036a57cf5264b3ff4", + "sha256:fee513135b5a58f3bb6d89e48326cd5aa308e4bcdf2f7d59f67c861ada482bf8" ], "markers": "python_version >= '3.9'", - "version": "==0.22.3" + "version": "==0.23.1" }, "six": { "hashes": [ @@ -1594,7 +1614,7 @@ "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" ], - "markers": "python_version >= '3.10'", + "markers": "python_version >= '3.9'", "version": "==2.3.0" }, "werkzeug": { @@ -1990,12 +2010,12 @@ }, "pytest": { "hashes": [ - "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", - "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761" + "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", + "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==8.3.4" + "version": "==8.3.5" }, "requests": { "hashes": [ @@ -2019,7 +2039,7 @@ "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" ], - "markers": "python_version >= '3.10'", + "markers": "python_version >= '3.9'", "version": "==2.3.0" } } diff --git a/dbrepo-search-service/app.py b/dbrepo-search-service/app.py index 13a9be870405ad27463cb5e21681f76dd82947aa..8e265465326bea0a61a9772c93b22143243921a3 100644 --- a/dbrepo-search-service/app.py +++ b/dbrepo-search-service/app.py @@ -5,6 +5,8 @@ from json import dumps from typing import List, Any import requests +from clients.keycloak_client import User, KeycloakClient +from clients.opensearch_client import OpenSearchClient, flatten from dbrepo.api.dto import Database, ApiError from flasgger import LazyJSONEncoder, Swagger, swag_from from flask import Flask, request, Response @@ -16,9 +18,6 @@ from prometheus_flask_exporter import PrometheusMetrics from pydantic import ValidationError from pydantic.deprecated.json import pydantic_encoder -from clients.keycloak_client import User, KeycloakClient -from clients.opensearch_client import OpenSearchClient, flatten - logging.addLevelName(level=logging.NOTSET, levelName='TRACE') logging.basicConfig(level=logging.DEBUG) @@ -412,11 +411,11 @@ def post_general_search(field_type): return Response(dumps(response, default=pydantic_encoder)), 200, {'Content-Type': 'application/json'} -@app.route("/api/search/database/<int:database_id>", methods=["PUT"], endpoint="search_put_database") +@app.route("/api/search/database/<string:database_id>", methods=["PUT"], endpoint="search_put_database") @metrics.gauge(name='dbrepo_search_update_database', description='Time needed to update a database in the search database') @auth.login_required(role=['update-search-index']) -def update_database(database_id: int): +def update_database(database_id: str): logging.debug(f"updating database with id: {database_id}") try: payload: Database = Database.model_validate(request.json) @@ -429,11 +428,11 @@ def update_database(database_id: int): return database.model_dump(), 202 -@app.route("/api/search/database/<int:database_id>", methods=["DELETE"], endpoint="database_delete_database") +@app.route("/api/search/database/<string:database_id>", methods=["DELETE"], endpoint="database_delete_database") @metrics.gauge(name='dbrepo_search_delete_database', description='Time needed to delete a database in the search database') @auth.login_required(role=['admin']) -def delete_database(database_id: int): +def delete_database(database_id: str): try: OpenSearchClient().delete_database(database_id) return Response(dumps({})), 202 diff --git a/dbrepo-search-service/init/.coveragerc b/dbrepo-search-service/init/.coveragerc index b5a0e606be380a3149f066712428e43c82af2bd8..a387be84259ecf1c8b1387a407e3cfc528960a30 100644 --- a/dbrepo-search-service/init/.coveragerc +++ b/dbrepo-search-service/init/.coveragerc @@ -1,5 +1,9 @@ [report] - omit = # omit tests - ./test/* \ No newline at end of file + ./tests/* + # omit ext lib + ./omlib/* + +[html] +directory = htmlcov diff --git a/dbrepo-search-service/init/Pipfile b/dbrepo-search-service/init/Pipfile index b9a274061348045bc48b80501425bcef8c907721..fb1215f57667a4a54c344b54b047ebb4b00e8ad9 100644 --- a/dbrepo-search-service/init/Pipfile +++ b/dbrepo-search-service/init/Pipfile @@ -9,7 +9,7 @@ opensearch-py = "~=2.2" python-dotenv = "~=1.0" testcontainers-opensearch = "*" pytest = "*" -dbrepo = {path = "./lib/dbrepo-1.6.5.tar.gz"} +dbrepo = {path = "./lib/dbrepo-1.7.0.tar.gz"} rdflib = "*" [dev-packages] diff --git a/dbrepo-search-service/init/Pipfile.lock b/dbrepo-search-service/init/Pipfile.lock index 5fa254a95c9d93d6bece70f256d29c91983bd25e..dd9eaacb19ded48cc4d82a416b6b4c7d94ded1b9 100644 --- a/dbrepo-search-service/init/Pipfile.lock +++ b/dbrepo-search-service/init/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "ff7c99ed5a6bbe231e029a957724c779f019be7456f43ef9cc08df576991d7c3" + "sha256": "f2b08da6e7efe0ce8db0dd5a4a7d2ba9b2992b391f191cf60db744d0e353f614" }, "pipfile-spec": 6, "requires": { @@ -26,90 +26,90 @@ }, "aiohttp": { "hashes": [ - "sha256:0450ada317a65383b7cce9576096150fdb97396dcfe559109b403c7242faffef", - "sha256:0b5263dcede17b6b0c41ef0c3ccce847d82a7da98709e75cf7efde3e9e3b5cae", - "sha256:0d5176f310a7fe6f65608213cc74f4228e4f4ce9fd10bcb2bb6da8fc66991462", - "sha256:0ed49efcd0dc1611378beadbd97beb5d9ca8fe48579fc04a6ed0844072261b6a", - "sha256:145a73850926018ec1681e734cedcf2716d6a8697d90da11284043b745c286d5", - "sha256:1987770fb4887560363b0e1a9b75aa303e447433c41284d3af2840a2f226d6e0", - "sha256:246067ba0cf5560cf42e775069c5d80a8989d14a7ded21af529a4e10e3e0f0e6", - "sha256:2c311e2f63e42c1bf86361d11e2c4a59f25d9e7aabdbdf53dc38b885c5435cdb", - "sha256:2cee3b117a8d13ab98b38d5b6bdcd040cfb4181068d05ce0c474ec9db5f3c5bb", - "sha256:2de1378f72def7dfb5dbd73d86c19eda0ea7b0a6873910cc37d57e80f10d64e1", - "sha256:30f546358dfa0953db92ba620101fefc81574f87b2346556b90b5f3ef16e55ce", - "sha256:34245498eeb9ae54c687a07ad7f160053911b5745e186afe2d0c0f2898a1ab8a", - "sha256:392432a2dde22b86f70dd4a0e9671a349446c93965f261dbaecfaf28813e5c42", - "sha256:3c0600bcc1adfaaac321422d615939ef300df81e165f6522ad096b73439c0f58", - "sha256:4016e383f91f2814e48ed61e6bda7d24c4d7f2402c75dd28f7e1027ae44ea204", - "sha256:40cd36749a1035c34ba8d8aaf221b91ca3d111532e5ccb5fa8c3703ab1b967ed", - "sha256:413ad794dccb19453e2b97c2375f2ca3cdf34dc50d18cc2693bd5aed7d16f4b9", - "sha256:4a93d28ed4b4b39e6f46fd240896c29b686b75e39cc6992692e3922ff6982b4c", - "sha256:4ee84c2a22a809c4f868153b178fe59e71423e1f3d6a8cd416134bb231fbf6d3", - "sha256:50c5c7b8aa5443304c55c262c5693b108c35a3b61ef961f1e782dd52a2f559c7", - "sha256:525410e0790aab036492eeea913858989c4cb070ff373ec3bc322d700bdf47c1", - "sha256:526c900397f3bbc2db9cb360ce9c35134c908961cdd0ac25b1ae6ffcaa2507ff", - "sha256:54775858c7f2f214476773ce785a19ee81d1294a6bedc5cc17225355aab74802", - "sha256:584096938a001378484aa4ee54e05dc79c7b9dd933e271c744a97b3b6f644957", - "sha256:6130459189e61baac5a88c10019b21e1f0c6d00ebc770e9ce269475650ff7f73", - "sha256:67453e603cea8e85ed566b2700efa1f6916aefbc0c9fcb2e86aaffc08ec38e78", - "sha256:68d54234c8d76d8ef74744f9f9fc6324f1508129e23da8883771cdbb5818cbef", - "sha256:6dfe7f984f28a8ae94ff3a7953cd9678550dbd2a1f9bda5dd9c5ae627744c78e", - "sha256:74bd573dde27e58c760d9ca8615c41a57e719bff315c9adb6f2a4281a28e8798", - "sha256:7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0", - "sha256:76719dd521c20a58a6c256d058547b3a9595d1d885b830013366e27011ffe804", - "sha256:7c3623053b85b4296cd3925eeb725e386644fd5bc67250b3bb08b0f144803e7b", - "sha256:7e44eba534381dd2687be50cbd5f2daded21575242ecfdaf86bbeecbc38dae8e", - "sha256:7fe3d65279bfbee8de0fb4f8c17fc4e893eed2dba21b2f680e930cc2b09075c5", - "sha256:8340def6737118f5429a5df4e88f440746b791f8f1c4ce4ad8a595f42c980bd5", - "sha256:84ede78acde96ca57f6cf8ccb8a13fbaf569f6011b9a52f870c662d4dc8cd854", - "sha256:850ff6155371fd802a280f8d369d4e15d69434651b844bde566ce97ee2277420", - "sha256:87a2e00bf17da098d90d4145375f1d985a81605267e7f9377ff94e55c5d769eb", - "sha256:88d385b8e7f3a870146bf5ea31786ef7463e99eb59e31db56e2315535d811f55", - "sha256:8a2fb742ef378284a50766e985804bd6adb5adb5aa781100b09befdbfa757b65", - "sha256:8dc0fba9a74b471c45ca1a3cb6e6913ebfae416678d90529d188886278e7f3f6", - "sha256:8fa1510b96c08aaad49303ab11f8803787c99222288f310a62f493faf883ede1", - "sha256:8fd12d0f989c6099e7b0f30dc6e0d1e05499f3337461f0b2b0dadea6c64b89df", - "sha256:9060addfa4ff753b09392efe41e6af06ea5dd257829199747b9f15bfad819460", - "sha256:930ffa1925393381e1e0a9b82137fa7b34c92a019b521cf9f41263976666a0d6", - "sha256:936d8a4f0f7081327014742cd51d320296b56aa6d324461a13724ab05f4b2933", - "sha256:97fe431f2ed646a3b56142fc81d238abcbaff08548d6912acb0b19a0cadc146b", - "sha256:9bd8695be2c80b665ae3f05cb584093a1e59c35ecb7d794d1edd96e8cc9201d7", - "sha256:9dec0000d2d8621d8015c293e24589d46fa218637d820894cb7356c77eca3259", - "sha256:a478aa11b328983c4444dacb947d4513cb371cd323f3845e53caeda6be5589d5", - "sha256:a481a574af914b6e84624412666cbfbe531a05667ca197804ecc19c97b8ab1b0", - "sha256:a4ac6a0f0f6402854adca4e3259a623f5c82ec3f0c049374133bcb243132baf9", - "sha256:a5e69046f83c0d3cb8f0d5bd9b8838271b1bc898e01562a04398e160953e8eb9", - "sha256:a7442662afebbf7b4c6d28cb7aab9e9ce3a5df055fc4116cc7228192ad6cb484", - "sha256:aa8a8caca81c0a3e765f19c6953416c58e2f4cc1b84829af01dd1c771bb2f91f", - "sha256:ab3247d58b393bda5b1c8f31c9edece7162fc13265334217785518dd770792b8", - "sha256:b10a47e5390c4b30a0d58ee12581003be52eedd506862ab7f97da7a66805befb", - "sha256:b34508f1cd928ce915ed09682d11307ba4b37d0708d1f28e5774c07a7674cac9", - "sha256:b8d3bb96c147b39c02d3db086899679f31958c5d81c494ef0fc9ef5bb1359b3d", - "sha256:b9d45dbb3aaec05cf01525ee1a7ac72de46a8c425cb75c003acd29f76b1ffe94", - "sha256:bf4480a5438f80e0f1539e15a7eb8b5f97a26fe087e9828e2c0ec2be119a9f72", - "sha256:c160a04283c8c6f55b5bf6d4cad59bb9c5b9c9cd08903841b25f1f7109ef1259", - "sha256:c96a43822f1f9f69cc5c3706af33239489a6294be486a0447fb71380070d4d5f", - "sha256:c9fd9dcf9c91affe71654ef77426f5cf8489305e1c66ed4816f5a21874b094b9", - "sha256:cddb31f8474695cd61fc9455c644fc1606c164b93bff2490390d90464b4655df", - "sha256:ce1bb21fc7d753b5f8a5d5a4bae99566386b15e716ebdb410154c16c91494d7f", - "sha256:d1c031a7572f62f66f1257db37ddab4cb98bfaf9b9434a3b4840bf3560f5e788", - "sha256:d589264dbba3b16e8951b6f145d1e6b883094075283dafcab4cdd564a9e353a0", - "sha256:dc065a4285307607df3f3686363e7f8bdd0d8ab35f12226362a847731516e42c", - "sha256:e10c440d142fa8b32cfdb194caf60ceeceb3e49807072e0dc3a8887ea80e8c16", - "sha256:e3552fe98e90fdf5918c04769f338a87fa4f00f3b28830ea9b78b1bdc6140e0d", - "sha256:e392804a38353900c3fd8b7cacbea5132888f7129f8e241915e90b85f00e3250", - "sha256:e4cecdb52aaa9994fbed6b81d4568427b6002f0a91c322697a4bfcc2b2363f5a", - "sha256:e5148ca8955affdfeb864aca158ecae11030e952b25b3ae15d4e2b5ba299bad2", - "sha256:e6b2732ef3bafc759f653a98881b5b9cdef0716d98f013d376ee8dfd7285abf1", - "sha256:ea756b5a7bac046d202a9a3889b9a92219f885481d78cd318db85b15cc0b7bcf", - "sha256:edb69b9589324bdc40961cdf0657815df674f1743a8d5ad9ab56a99e4833cfdd", - "sha256:f0203433121484b32646a5f5ea93ae86f3d9559d7243f07e8c0eab5ff8e3f70e", - "sha256:f6a19bcab7fbd8f8649d6595624856635159a6527861b9cdc3447af288a00c00", - "sha256:f752e80606b132140883bb262a457c475d219d7163d996dc9072434ffb0784c4", - "sha256:f7914ab70d2ee8ab91c13e5402122edbc77821c66d2758abb53aabe87f013287" + "sha256:00c8ac69e259c60976aa2edae3f13d9991cf079aaa4d3cd5a49168ae3748dee3", + "sha256:01816f07c9cc9d80f858615b1365f8319d6a5fd079cd668cc58e15aafbc76a54", + "sha256:02876bf2f69b062584965507b07bc06903c2dc93c57a554b64e012d636952654", + "sha256:0e9eb7e5764abcb49f0e2bd8f5731849b8728efbf26d0cac8e81384c95acec3f", + "sha256:0f6b2c5b4a4d22b8fb2c92ac98e0747f5f195e8e9448bfb7404cd77e7bfa243f", + "sha256:1982c98ac62c132d2b773d50e2fcc941eb0b8bad3ec078ce7e7877c4d5a2dce7", + "sha256:1e83fb1991e9d8982b3b36aea1e7ad27ea0ce18c14d054c7a404d68b0319eebb", + "sha256:25de43bb3cf83ad83efc8295af7310219af6dbe4c543c2e74988d8e9c8a2a917", + "sha256:28a772757c9067e2aee8a6b2b425d0efaa628c264d6416d283694c3d86da7689", + "sha256:2a4a13dfbb23977a51853b419141cd0a9b9573ab8d3a1455c6e63561387b52ff", + "sha256:2a8a6bc19818ac3e5596310ace5aa50d918e1ebdcc204dc96e2f4d505d51740c", + "sha256:2eabb269dc3852537d57589b36d7f7362e57d1ece308842ef44d9830d2dc3c90", + "sha256:35cda4e07f5e058a723436c4d2b7ba2124ab4e0aa49e6325aed5896507a8a42e", + "sha256:42d689a5c0a0c357018993e471893e939f555e302313d5c61dfc566c2cad6185", + "sha256:4586a68730bd2f2b04a83e83f79d271d8ed13763f64b75920f18a3a677b9a7f0", + "sha256:47dc018b1b220c48089b5b9382fbab94db35bef2fa192995be22cbad3c5730c8", + "sha256:507ab05d90586dacb4f26a001c3abf912eb719d05635cbfad930bdbeb469b36c", + "sha256:5194143927e494616e335d074e77a5dac7cd353a04755330c9adc984ac5a628e", + "sha256:51c3ff9c7a25f3cad5c09d9aacbc5aefb9267167c4652c1eb737989b554fe278", + "sha256:55789e93c5ed71832e7fac868167276beadf9877b85697020c46e9a75471f55f", + "sha256:5724cc77f4e648362ebbb49bdecb9e2b86d9b172c68a295263fa072e679ee69d", + "sha256:5ad8f1c19fe277eeb8bc45741c6d60ddd11d705c12a4d8ee17546acff98e0802", + "sha256:5ceb81a4db2decdfa087381b5fc5847aa448244f973e5da232610304e199e7b2", + "sha256:64815c6f02e8506b10113ddbc6b196f58dbef135751cc7c32136df27b736db09", + "sha256:66047eacbc73e6fe2462b77ce39fc170ab51235caf331e735eae91c95e6a11e4", + "sha256:669dd33f028e54fe4c96576f406ebb242ba534dd3a981ce009961bf49960f117", + "sha256:684eea71ab6e8ade86b9021bb62af4bf0881f6be4e926b6b5455de74e420783a", + "sha256:6b35aab22419ba45f8fc290d0010898de7a6ad131e468ffa3922b1b0b24e9d2e", + "sha256:7104d5b3943c6351d1ad7027d90bdd0ea002903e9f610735ac99df3b81f102ee", + "sha256:718d5deb678bc4b9d575bfe83a59270861417da071ab44542d0fcb6faa686636", + "sha256:747ec46290107a490d21fe1ff4183bef8022b848cf9516970cb31de6d9460088", + "sha256:7836587eef675a17d835ec3d98a8c9acdbeb2c1d72b0556f0edf4e855a25e9c1", + "sha256:78e4dd9c34ec7b8b121854eb5342bac8b02aa03075ae8618b6210a06bbb8a115", + "sha256:7b77ee42addbb1c36d35aca55e8cc6d0958f8419e458bb70888d8c69a4ca833d", + "sha256:7c1b20a1ace54af7db1f95af85da530fe97407d9063b7aaf9ce6a32f44730778", + "sha256:7f27eec42f6c3c1df09cfc1f6786308f8b525b8efaaf6d6bd76c1f52c6511f6a", + "sha256:82c249f2bfa5ecbe4a1a7902c81c0fba52ed9ebd0176ab3047395d02ad96cfcb", + "sha256:85fa0b18558eb1427090912bd456a01f71edab0872f4e0f9e4285571941e4090", + "sha256:89ce611b1eac93ce2ade68f1470889e0173d606de20c85a012bfa24be96cf867", + "sha256:8ce789231404ca8fff7f693cdce398abf6d90fd5dae2b1847477196c243b1fbb", + "sha256:90d571c98d19a8b6e793b34aa4df4cee1e8fe2862d65cc49185a3a3d0a1a3996", + "sha256:9229d8613bd8401182868fe95688f7581673e1c18ff78855671a4b8284f47bcb", + "sha256:93a1f7d857c4fcf7cabb1178058182c789b30d85de379e04f64c15b7e88d66fb", + "sha256:967b93f21b426f23ca37329230d5bd122f25516ae2f24a9cea95a30023ff8283", + "sha256:9840be675de208d1f68f84d578eaa4d1a36eee70b16ae31ab933520c49ba1325", + "sha256:9862d077b9ffa015dbe3ce6c081bdf35135948cb89116e26667dd183550833d1", + "sha256:9b5b37c863ad5b0892cc7a4ceb1e435e5e6acd3f2f8d3e11fa56f08d3c67b820", + "sha256:9e64ca2dbea28807f8484c13f684a2f761e69ba2640ec49dacd342763cc265ef", + "sha256:9fe4eb0e7f50cdb99b26250d9328faef30b1175a5dbcfd6d0578d18456bac567", + "sha256:a01fe9f1e05025eacdd97590895e2737b9f851d0eb2e017ae9574d9a4f0b6252", + "sha256:a08ad95fcbd595803e0c4280671d808eb170a64ca3f2980dd38e7a72ed8d1fea", + "sha256:a4fe27dbbeec445e6e1291e61d61eb212ee9fed6e47998b27de71d70d3e8777d", + "sha256:a7d474c5c1f0b9405c1565fafdc4429fa7d986ccbec7ce55bc6a330f36409cad", + "sha256:a86dc177eb4c286c19d1823ac296299f59ed8106c9536d2b559f65836e0fb2c6", + "sha256:aa36c35e94ecdb478246dd60db12aba57cfcd0abcad43c927a8876f25734d496", + "sha256:ab915a57c65f7a29353c8014ac4be685c8e4a19e792a79fe133a8e101111438e", + "sha256:af55314407714fe77a68a9ccaab90fdb5deb57342585fd4a3a8102b6d4370080", + "sha256:afcb6b275c2d2ba5d8418bf30a9654fa978b4f819c2e8db6311b3525c86fe637", + "sha256:b27961d65639128336b7a7c3f0046dcc62a9443d5ef962e3c84170ac620cec47", + "sha256:b5b95787335c483cd5f29577f42bbe027a412c5431f2f80a749c80d040f7ca9f", + "sha256:b73a2b139782a07658fbf170fe4bcdf70fc597fae5ffe75e5b67674c27434a9f", + "sha256:b88aca5adbf4625e11118df45acac29616b425833c3be7a05ef63a6a4017bfdb", + "sha256:b992778d95b60a21c4d8d4a5f15aaab2bd3c3e16466a72d7f9bfd86e8cea0d4b", + "sha256:ba40b7ae0f81c7029583a338853f6607b6d83a341a3dcde8bed1ea58a3af1df9", + "sha256:baae005092e3f200de02699314ac8933ec20abf998ec0be39448f6605bce93df", + "sha256:c4bea08a6aad9195ac9b1be6b0c7e8a702a9cec57ce6b713698b4a5afa9c2e33", + "sha256:c6070bcf2173a7146bb9e4735b3c62b2accba459a6eae44deea0eb23e0035a23", + "sha256:c929f9a7249a11e4aa5c157091cfad7f49cc6b13f4eecf9b747104befd9f56f2", + "sha256:c97be90d70f7db3aa041d720bfb95f4869d6063fcdf2bb8333764d97e319b7d0", + "sha256:ce10ddfbe26ed5856d6902162f71b8fe08545380570a885b4ab56aecfdcb07f4", + "sha256:cf1f31f83d16ec344136359001c5e871915c6ab685a3d8dee38e2961b4c81730", + "sha256:d2b25b2eeb35707113b2d570cadc7c612a57f1c5d3e7bb2b13870fe284e08fc0", + "sha256:d33851d85537bbf0f6291ddc97926a754c8f041af759e0aa0230fe939168852b", + "sha256:e06cf4852ce8c4442a59bae5a3ea01162b8fcb49ab438d8548b8dc79375dad8a", + "sha256:e271beb2b1dabec5cd84eb488bdabf9758d22ad13471e9c356be07ad139b3012", + "sha256:f55d0f242c2d1fcdf802c8fabcff25a9d85550a4cf3a9cf5f2a6b5742c992839", + "sha256:f81cba651db8795f688c589dd11a4fbb834f2e59bbf9bb50908be36e416dc760", + "sha256:fa1fb1b61881c8405829c50e9cc5c875bfdbf685edf57a76817dfb50643e4a1a", + "sha256:fa48dac27f41b36735c807d1ab093a8386701bbf00eb6b89a0f69d9fa26b3671", + "sha256:fbfef0666ae9e07abfa2c54c212ac18a1f63e13e0760a769f70b5717742f3ece", + "sha256:fe7065e2215e4bba63dc00db9ae654c1ba3950a5fff691475a32f511142fcddb" ], "markers": "python_version >= '3.9'", - "version": "==3.11.12" + "version": "==3.11.13" }, "aiosignal": { "hashes": [ @@ -259,9 +259,9 @@ }, "dbrepo": { "hashes": [ - "sha256:e2312f0d3cff34934578a16b01d646d8309e3a3d1bb4cbda9f984acf97824e00" + "sha256:ec8454f24fbf720271305ad7ae88c5e8c2d4fe10600d027874df810f18b9e848" ], - "path": "./lib/dbrepo-1.6.5.tar.gz" + "path": "./lib/dbrepo-1.7.0.tar.gz" }, "docker": { "hashes": [ @@ -639,7 +639,7 @@ "sha256:f4ca91d61a4bf61b0f2228f24bbfa6a9facd5f8af03759fe2a655c50ae2c6610", "sha256:f6b3dfc7661f8842babd8ea07e9897fe3d9b69a1d7e5fbb743e4160f9387833b" ], - "markers": "python_version == '3.11'", + "markers": "python_version >= '3.10'", "version": "==2.2.3" }, "opensearch-py": { @@ -725,91 +725,107 @@ }, "propcache": { "hashes": [ - "sha256:03ff9d3f665769b2a85e6157ac8b439644f2d7fd17615a82fa55739bc97863f4", - "sha256:049324ee97bb67285b49632132db351b41e77833678432be52bdd0289c0e05e4", - "sha256:081a430aa8d5e8876c6909b67bd2d937bfd531b0382d3fdedb82612c618bc41a", - "sha256:0f022d381747f0dfe27e99d928e31bc51a18b65bb9e481ae0af1380a6725dd1f", - "sha256:12d1083f001ace206fe34b6bdc2cb94be66d57a850866f0b908972f90996b3e9", - "sha256:14d86fe14b7e04fa306e0c43cdbeebe6b2c2156a0c9ce56b815faacc193e320d", - "sha256:160291c60081f23ee43d44b08a7e5fb76681221a8e10b3139618c5a9a291b84e", - "sha256:1672137af7c46662a1c2be1e8dc78cb6d224319aaa40271c9257d886be4363a6", - "sha256:19a0f89a7bb9d8048d9c4370c9c543c396e894c76be5525f5e1ad287f1750ddf", - "sha256:1ac2f5fe02fa75f56e1ad473f1175e11f475606ec9bd0be2e78e4734ad575034", - "sha256:1cd9a1d071158de1cc1c71a26014dcdfa7dd3d5f4f88c298c7f90ad6f27bb46d", - "sha256:1ffc3cca89bb438fb9c95c13fc874012f7b9466b89328c3c8b1aa93cdcfadd16", - "sha256:297878dc9d0a334358f9b608b56d02e72899f3b8499fc6044133f0d319e2ec30", - "sha256:2d3af2e79991102678f53e0dbf4c35de99b6b8b58f29a27ca0325816364caaba", - "sha256:30b43e74f1359353341a7adb783c8f1b1c676367b011709f466f42fda2045e95", - "sha256:3156628250f46a0895f1f36e1d4fbe062a1af8718ec3ebeb746f1d23f0c5dc4d", - "sha256:31f5af773530fd3c658b32b6bdc2d0838543de70eb9a2156c03e410f7b0d3aae", - "sha256:3935bfa5fede35fb202c4b569bb9c042f337ca4ff7bd540a0aa5e37131659348", - "sha256:39d51fbe4285d5db5d92a929e3e21536ea3dd43732c5b177c7ef03f918dff9f2", - "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64", - "sha256:4160d9283bd382fa6c0c2b5e017acc95bc183570cd70968b9202ad6d8fc48dce", - "sha256:4a571d97dbe66ef38e472703067021b1467025ec85707d57e78711c085984e54", - "sha256:4e6281aedfca15301c41f74d7005e6e3f4ca143584ba696ac69df4f02f40d629", - "sha256:52277518d6aae65536e9cea52d4e7fd2f7a66f4aa2d30ed3f2fcea620ace3c54", - "sha256:556fc6c10989f19a179e4321e5d678db8eb2924131e64652a51fe83e4c3db0e1", - "sha256:574faa3b79e8ebac7cb1d7930f51184ba1ccf69adfdec53a12f319a06030a68b", - "sha256:58791550b27d5488b1bb52bc96328456095d96206a250d28d874fafe11b3dfaf", - "sha256:5b750a8e5a1262434fb1517ddf64b5de58327f1adc3524a5e44c2ca43305eb0b", - "sha256:5d97151bc92d2b2578ff7ce779cdb9174337390a535953cbb9452fb65164c587", - "sha256:5eee736daafa7af6d0a2dc15cc75e05c64f37fc37bafef2e00d77c14171c2097", - "sha256:6445804cf4ec763dc70de65a3b0d9954e868609e83850a47ca4f0cb64bd79fea", - "sha256:647894f5ae99c4cf6bb82a1bb3a796f6e06af3caa3d32e26d2350d0e3e3faf24", - "sha256:66d4cfda1d8ed687daa4bc0274fcfd5267873db9a5bc0418c2da19273040eeb7", - "sha256:6a9a8c34fb7bb609419a211e59da8887eeca40d300b5ea8e56af98f6fbbb1541", - "sha256:6b3f39a85d671436ee3d12c017f8fdea38509e4f25b28eb25877293c98c243f6", - "sha256:6b6fb63ae352e13748289f04f37868099e69dba4c2b3e271c46061e82c745634", - "sha256:70693319e0b8fd35dd863e3e29513875eb15c51945bf32519ef52927ca883bc3", - "sha256:781e65134efaf88feb447e8c97a51772aa75e48b794352f94cb7ea717dedda0d", - "sha256:819ce3b883b7576ca28da3861c7e1a88afd08cc8c96908e08a3f4dd64a228034", - "sha256:857112b22acd417c40fa4595db2fe28ab900c8c5fe4670c7989b1c0230955465", - "sha256:887d9b0a65404929641a9fabb6452b07fe4572b269d901d622d8a34a4e9043b2", - "sha256:8b3489ff1ed1e8315674d0775dc7d2195fb13ca17b3808721b54dbe9fd020faf", - "sha256:92fc4500fcb33899b05ba73276dfb684a20d31caa567b7cb5252d48f896a91b1", - "sha256:9403db39be1393618dd80c746cb22ccda168efce239c73af13c3763ef56ffc04", - "sha256:98110aa363f1bb4c073e8dcfaefd3a5cea0f0834c2aab23dda657e4dab2f53b5", - "sha256:999779addc413181912e984b942fbcc951be1f5b3663cd80b2687758f434c583", - "sha256:9caac6b54914bdf41bcc91e7eb9147d331d29235a7c967c150ef5df6464fd1bb", - "sha256:a7a078f5d37bee6690959c813977da5291b24286e7b962e62a94cec31aa5188b", - "sha256:a7e65eb5c003a303b94aa2c3852ef130230ec79e349632d030e9571b87c4698c", - "sha256:a96dc1fa45bd8c407a0af03b2d5218392729e1822b0c32e62c5bf7eeb5fb3958", - "sha256:aca405706e0b0a44cc6bfd41fbe89919a6a56999157f6de7e182a990c36e37bc", - "sha256:accb6150ce61c9c4b7738d45550806aa2b71c7668c6942f17b0ac182b6142fd4", - "sha256:ad1af54a62ffe39cf34db1aa6ed1a1873bd548f6401db39d8e7cd060b9211f82", - "sha256:ae1aa1cd222c6d205853b3013c69cd04515f9d6ab6de4b0603e2e1c33221303e", - "sha256:b2d0a12018b04f4cb820781ec0dffb5f7c7c1d2a5cd22bff7fb055a2cb19ebce", - "sha256:b480c6a4e1138e1aa137c0079b9b6305ec6dcc1098a8ca5196283e8a49df95a9", - "sha256:b74c261802d3d2b85c9df2dfb2fa81b6f90deeef63c2db9f0e029a3cac50b518", - "sha256:ba278acf14471d36316159c94a802933d10b6a1e117b8554fe0d0d9b75c9d536", - "sha256:bb6178c241278d5fe853b3de743087be7f5f4c6f7d6d22a3b524d323eecec505", - "sha256:bf72af5e0fb40e9babf594308911436c8efde3cb5e75b6f206c34ad18be5c052", - "sha256:bfd3223c15bebe26518d58ccf9a39b93948d3dcb3e57a20480dfdd315356baff", - "sha256:c214999039d4f2a5b2073ac506bba279945233da8c786e490d411dfc30f855c1", - "sha256:c2f992c07c0fca81655066705beae35fc95a2fa7366467366db627d9f2ee097f", - "sha256:cba4cfa1052819d16699e1d55d18c92b6e094d4517c41dd231a8b9f87b6fa681", - "sha256:cea7daf9fc7ae6687cf1e2c049752f19f146fdc37c2cc376e7d0032cf4f25347", - "sha256:cf6c4150f8c0e32d241436526f3c3f9cbd34429492abddbada2ffcff506c51af", - "sha256:d09c333d36c1409d56a9d29b3a1b800a42c76a57a5a8907eacdbce3f18768246", - "sha256:d27b84d5880f6d8aa9ae3edb253c59d9f6642ffbb2c889b78b60361eed449787", - "sha256:d2ccec9ac47cf4e04897619c0e0c1a48c54a71bdf045117d3a26f80d38ab1fb0", - "sha256:d71264a80f3fcf512eb4f18f59423fe82d6e346ee97b90625f283df56aee103f", - "sha256:d93f3307ad32a27bda2e88ec81134b823c240aa3abb55821a8da553eed8d9439", - "sha256:d9631c5e8b5b3a0fda99cb0d29c18133bca1e18aea9effe55adb3da1adef80d3", - "sha256:ddfab44e4489bd79bda09d84c430677fc7f0a4939a73d2bba3073036f487a0a6", - "sha256:e7048abd75fe40712005bcfc06bb44b9dfcd8e101dda2ecf2f5aa46115ad07ca", - "sha256:e73091191e4280403bde6c9a52a6999d69cdfde498f1fdf629105247599b57ec", - "sha256:e800776a79a5aabdb17dcc2346a7d66d0777e942e4cd251defeb084762ecd17d", - "sha256:edc9fc7051e3350643ad929df55c451899bb9ae6d24998a949d2e4c87fb596d3", - "sha256:f089118d584e859c62b3da0892b88a83d611c2033ac410e929cb6754eec0ed16", - "sha256:f174bbd484294ed9fdf09437f889f95807e5f229d5d93588d34e92106fbf6717", - "sha256:f508b0491767bb1f2b87fdfacaba5f7eddc2f867740ec69ece6d1946d29029a6", - "sha256:f7a31fc1e1bd362874863fdeed71aed92d348f5336fd84f2197ba40c59f061bd", - "sha256:f9479aa06a793c5aeba49ce5c5692ffb51fcd9a7016e017d555d5e2b0045d212" + "sha256:02df07041e0820cacc8f739510078f2aadcfd3fc57eaeeb16d5ded85c872c89e", + "sha256:03acd9ff19021bd0567582ac88f821b66883e158274183b9e5586f678984f8fe", + "sha256:03c091bb752349402f23ee43bb2bff6bd80ccab7c9df6b88ad4322258d6960fc", + "sha256:07700939b2cbd67bfb3b76a12e1412405d71019df00ca5697ce75e5ef789d829", + "sha256:0c3e893c4464ebd751b44ae76c12c5f5c1e4f6cbd6fbf67e3783cd93ad221863", + "sha256:119e244ab40f70a98c91906d4c1f4c5f2e68bd0b14e7ab0a06922038fae8a20f", + "sha256:11ae6a8a01b8a4dc79093b5d3ca2c8a4436f5ee251a9840d7790dccbd96cb649", + "sha256:15010f29fbed80e711db272909a074dc79858c6d28e2915704cfc487a8ac89c6", + "sha256:19d36bb351ad5554ff20f2ae75f88ce205b0748c38b146c75628577020351e3c", + "sha256:1c8f7d896a16da9455f882870a507567d4f58c53504dc2d4b1e1d386dfe4588a", + "sha256:2383a17385d9800b6eb5855c2f05ee550f803878f344f58b6e194de08b96352c", + "sha256:24c04f8fbf60094c531667b8207acbae54146661657a1b1be6d3ca7773b7a545", + "sha256:2578541776769b500bada3f8a4eeaf944530516b6e90c089aa368266ed70c49e", + "sha256:26a67e5c04e3119594d8cfae517f4b9330c395df07ea65eab16f3d559b7068fe", + "sha256:2b975528998de037dfbc10144b8aed9b8dd5a99ec547f14d1cb7c5665a43f075", + "sha256:2d15bc27163cd4df433e75f546b9ac31c1ba7b0b128bfb1b90df19082466ff57", + "sha256:2d913d36bdaf368637b4f88d554fb9cb9d53d6920b9c5563846555938d5450bf", + "sha256:3302c5287e504d23bb0e64d2a921d1eb4a03fb93a0a0aa3b53de059f5a5d737d", + "sha256:36ca5e9a21822cc1746023e88f5c0af6fce3af3b85d4520efb1ce4221bed75cc", + "sha256:3b812b3cb6caacd072276ac0492d249f210006c57726b6484a1e1805b3cfeea0", + "sha256:3c6ec957025bf32b15cbc6b67afe233c65b30005e4c55fe5768e4bb518d712f1", + "sha256:41de3da5458edd5678b0f6ff66691507f9885f5fe6a0fb99a5d10d10c0fd2d64", + "sha256:42924dc0c9d73e49908e35bbdec87adedd651ea24c53c29cac103ede0ea1d340", + "sha256:4544699674faf66fb6b4473a1518ae4999c1b614f0b8297b1cef96bac25381db", + "sha256:46ed02532cb66612d42ae5c3929b5e98ae330ea0f3900bc66ec5f4862069519b", + "sha256:49ea05212a529c2caffe411e25a59308b07d6e10bf2505d77da72891f9a05641", + "sha256:4fa0e7c9c3cf7c276d4f6ab9af8adddc127d04e0fcabede315904d2ff76db626", + "sha256:507c5357a8d8b4593b97fb669c50598f4e6cccbbf77e22fa9598aba78292b4d7", + "sha256:549722908de62aa0b47a78b90531c022fa6e139f9166be634f667ff45632cc92", + "sha256:58e6d2a5a7cb3e5f166fd58e71e9a4ff504be9dc61b88167e75f835da5764d07", + "sha256:5a16167118677d94bb48bfcd91e420088854eb0737b76ec374b91498fb77a70e", + "sha256:5d62c4f6706bff5d8a52fd51fec6069bef69e7202ed481486c0bc3874912c787", + "sha256:5fa159dcee5dba00c1def3231c249cf261185189205073bde13797e57dd7540a", + "sha256:6032231d4a5abd67c7f71168fd64a47b6b451fbcb91c8397c2f7610e67683810", + "sha256:63f26258a163c34542c24808f03d734b338da66ba91f410a703e505c8485791d", + "sha256:65a37714b8ad9aba5780325228598a5b16c47ba0f8aeb3dc0514701e4413d7c0", + "sha256:67054e47c01b7b349b94ed0840ccae075449503cf1fdd0a1fdd98ab5ddc2667b", + "sha256:67dda3c7325691c2081510e92c561f465ba61b975f481735aefdfc845d2cd043", + "sha256:6985a593417cdbc94c7f9c3403747335e450c1599da1647a5af76539672464d3", + "sha256:6a1948df1bb1d56b5e7b0553c0fa04fd0e320997ae99689488201f19fa90d2e7", + "sha256:6b5b7fd6ee7b54e01759f2044f936dcf7dea6e7585f35490f7ca0420fe723c0d", + "sha256:6c929916cbdb540d3407c66f19f73387f43e7c12fa318a66f64ac99da601bcdf", + "sha256:6f4d7a7c0aff92e8354cceca6fe223973ddf08401047920df0fcb24be2bd5138", + "sha256:728af36011bb5d344c4fe4af79cfe186729efb649d2f8b395d1572fb088a996c", + "sha256:742840d1d0438eb7ea4280f3347598f507a199a35a08294afdcc560c3739989d", + "sha256:75e872573220d1ee2305b35c9813626e620768248425f58798413e9c39741f46", + "sha256:794c3dd744fad478b6232289c866c25406ecdfc47e294618bdf1697e69bd64a6", + "sha256:7c0fdbdf6983526e269e5a8d53b7ae3622dd6998468821d660d0daf72779aefa", + "sha256:7c5f5290799a3f6539cc5e6f474c3e5c5fbeba74a5e1e5be75587746a940d51e", + "sha256:7c6e7e4f9167fddc438cd653d826f2222222564daed4116a02a184b464d3ef05", + "sha256:7cedd25e5f678f7738da38037435b340694ab34d424938041aa630d8bac42663", + "sha256:7e2e068a83552ddf7a39a99488bcba05ac13454fb205c847674da0352602082f", + "sha256:8319293e85feadbbfe2150a5659dbc2ebc4afdeaf7d98936fb9a2f2ba0d4c35c", + "sha256:8526b0941ec5a40220fc4dfde76aed58808e2b309c03e9fa8e2260083ef7157f", + "sha256:8884ba1a0fe7210b775106b25850f5e5a9dc3c840d1ae9924ee6ea2eb3acbfe7", + "sha256:8cb625bcb5add899cb8ba7bf716ec1d3e8f7cdea9b0713fa99eadf73b6d4986f", + "sha256:8d663fd71491dde7dfdfc899d13a067a94198e90695b4321084c6e450743b8c7", + "sha256:8ee1983728964d6070ab443399c476de93d5d741f71e8f6e7880a065f878e0b9", + "sha256:997e7b8f173a391987df40f3b52c423e5850be6f6df0dcfb5376365440b56667", + "sha256:9be90eebc9842a93ef8335291f57b3b7488ac24f70df96a6034a13cb58e6ff86", + "sha256:9ddd49258610499aab83b4f5b61b32e11fce873586282a0e972e5ab3bcadee51", + "sha256:9ecde3671e62eeb99e977f5221abcf40c208f69b5eb986b061ccec317c82ebd0", + "sha256:9ff4e9ecb6e4b363430edf2c6e50173a63e0820e549918adef70515f87ced19a", + "sha256:a254537b9b696ede293bfdbc0a65200e8e4507bc9f37831e2a0318a9b333c85c", + "sha256:a2b9bf8c79b660d0ca1ad95e587818c30ccdb11f787657458d6f26a1ea18c568", + "sha256:a61a68d630e812b67b5bf097ab84e2cd79b48c792857dc10ba8a223f5b06a2af", + "sha256:a7080b0159ce05f179cfac592cda1a82898ca9cd097dacf8ea20ae33474fbb25", + "sha256:a8fd93de4e1d278046345f49e2238cdb298589325849b2645d4a94c53faeffc5", + "sha256:a94ffc66738da99232ddffcf7910e0f69e2bbe3a0802e54426dbf0714e1c2ffe", + "sha256:aa806bbc13eac1ab6291ed21ecd2dd426063ca5417dd507e6be58de20e58dfcf", + "sha256:b0c1a133d42c6fc1f5fbcf5c91331657a1ff822e87989bf4a6e2e39b818d0ee9", + "sha256:b58229a844931bca61b3a20efd2be2a2acb4ad1622fc026504309a6883686fbf", + "sha256:bb2f144c6d98bb5cbc94adeb0447cfd4c0f991341baa68eee3f3b0c9c0e83767", + "sha256:be90c94570840939fecedf99fa72839aed70b0ced449b415c85e01ae67422c90", + "sha256:bf0d9a171908f32d54f651648c7290397b8792f4303821c42a74e7805bfb813c", + "sha256:bf15fc0b45914d9d1b706f7c9c4f66f2b7b053e9517e40123e137e8ca8958b3d", + "sha256:bf4298f366ca7e1ad1d21bbb58300a6985015909964077afd37559084590c929", + "sha256:c441c841e82c5ba7a85ad25986014be8d7849c3cfbdb6004541873505929a74e", + "sha256:cacea77ef7a2195f04f9279297684955e3d1ae4241092ff0cfcef532bb7a1c32", + "sha256:cd54895e4ae7d32f1e3dd91261df46ee7483a735017dc6f987904f194aa5fd14", + "sha256:d1323cd04d6e92150bcc79d0174ce347ed4b349d748b9358fd2e497b121e03c8", + "sha256:d383bf5e045d7f9d239b38e6acadd7b7fdf6c0087259a84ae3475d18e9a2ae8b", + "sha256:d3e7420211f5a65a54675fd860ea04173cde60a7cc20ccfbafcccd155225f8bc", + "sha256:d8074c5dd61c8a3e915fa8fc04754fa55cfa5978200d2daa1e2d4294c1f136aa", + "sha256:df03cd88f95b1b99052b52b1bb92173229d7a674df0ab06d2b25765ee8404bce", + "sha256:e45377d5d6fefe1677da2a2c07b024a6dac782088e37c0b1efea4cfe2b1be19b", + "sha256:e53d19c2bf7d0d1e6998a7e693c7e87300dd971808e6618964621ccd0e01fe4e", + "sha256:e560fd75aaf3e5693b91bcaddd8b314f4d57e99aef8a6c6dc692f935cc1e6bbf", + "sha256:ec5060592d83454e8063e487696ac3783cc48c9a329498bafae0d972bc7816c9", + "sha256:ecc2920630283e0783c22e2ac94427f8cca29a04cfdf331467d4f661f4072dac", + "sha256:ed7161bccab7696a473fe7ddb619c1d75963732b37da4618ba12e60899fefe4f", + "sha256:ee0bd3a7b2e184e88d25c9baa6a9dc609ba25b76daae942edfb14499ac7ec374", + "sha256:ee25f1ac091def37c4b59d192bbe3a206298feeb89132a470325bf76ad122a1e", + "sha256:efa44f64c37cc30c9f05932c740a8b40ce359f51882c70883cc95feac842da4d", + "sha256:f47d52fd9b2ac418c4890aad2f6d21a6b96183c98021f0a48497a904199f006e", + "sha256:f857034dc68d5ceb30fb60afb6ff2103087aea10a01b613985610e007053a121", + "sha256:fb91d20fa2d3b13deea98a690534697742029f4fb83673a3501ae6e3746508b5", + "sha256:fddb8870bdb83456a489ab67c6b3040a8d5a55069aa6f72f9d872235fbc52f54" ], "markers": "python_version >= '3.9'", - "version": "==0.2.1" + "version": "==0.3.0" }, "pydantic": { "hashes": [ @@ -935,12 +951,12 @@ }, "pytest": { "hashes": [ - "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", - "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761" + "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", + "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==8.3.4" + "version": "==8.3.5" }, "python-dateutil": { "hashes": [ @@ -1043,7 +1059,7 @@ "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" ], - "markers": "python_version >= '3.10'", + "markers": "python_version >= '3.9'", "version": "==2.3.0" }, "werkzeug": { @@ -1307,7 +1323,7 @@ "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87", "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b" ], - "markers": "platform_python_implementation != 'PyPy'", + "markers": "python_version >= '3.8'", "version": "==1.17.1" }, "charset-normalizer": { @@ -1480,40 +1496,44 @@ }, "cryptography": { "hashes": [ - "sha256:00918d859aa4e57db8299607086f793fa7813ae2ff5a4637e318a25ef82730f7", - "sha256:1e8d181e90a777b63f3f0caa836844a1182f1f265687fac2115fcf245f5fbec3", - "sha256:1f9a92144fa0c877117e9748c74501bea842f93d21ee00b0cf922846d9d0b183", - "sha256:21377472ca4ada2906bc313168c9dc7b1d7ca417b63c1c3011d0c74b7de9ae69", - "sha256:24979e9f2040c953a94bf3c6782e67795a4c260734e5264dceea65c8f4bae64a", - "sha256:2a46a89ad3e6176223b632056f321bc7de36b9f9b93b2cc1cccf935a3849dc62", - "sha256:322eb03ecc62784536bc173f1483e76747aafeb69c8728df48537eb431cd1911", - "sha256:436df4f203482f41aad60ed1813811ac4ab102765ecae7a2bbb1dbb66dcff5a7", - "sha256:4f422e8c6a28cf8b7f883eb790695d6d45b0c385a2583073f3cec434cc705e1a", - "sha256:53f23339864b617a3dfc2b0ac8d5c432625c80014c25caac9082314e9de56f41", - "sha256:5fed5cd6102bb4eb843e3315d2bf25fede494509bddadb81e03a859c1bc17b83", - "sha256:610a83540765a8d8ce0f351ce42e26e53e1f774a6efb71eb1b41eb01d01c3d12", - "sha256:6c8acf6f3d1f47acb2248ec3ea261171a671f3d9428e34ad0357148d492c7864", - "sha256:6f76fdd6fd048576a04c5210d53aa04ca34d2ed63336d4abd306d0cbe298fddf", - "sha256:72198e2b5925155497a5a3e8c216c7fb3e64c16ccee11f0e7da272fa93b35c4c", - "sha256:887143b9ff6bad2b7570da75a7fe8bbf5f65276365ac259a5d2d5147a73775f2", - "sha256:888fcc3fce0c888785a4876ca55f9f43787f4c5c1cc1e2e0da71ad481ff82c5b", - "sha256:8e6a85a93d0642bd774460a86513c5d9d80b5c002ca9693e63f6e540f1815ed0", - "sha256:94f99f2b943b354a5b6307d7e8d19f5c423a794462bde2bf310c770ba052b1c4", - "sha256:9b336599e2cb77b1008cb2ac264b290803ec5e8e89d618a5e978ff5eb6f715d9", - "sha256:a2d8a7045e1ab9b9f803f0d9531ead85f90c5f2859e653b61497228b18452008", - "sha256:b8272f257cf1cbd3f2e120f14c68bff2b6bdfcc157fafdee84a1b795efd72862", - "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009", - "sha256:d9c5b9f698a83c8bd71e0f4d3f9f839ef244798e5ffe96febfa9714717db7af7", - "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f", - "sha256:df978682c1504fc93b3209de21aeabf2375cb1571d4e61907b3e7a2540e83026", - "sha256:e403f7f766ded778ecdb790da786b418a9f2394f36e8cc8b796cc056ab05f44f", - "sha256:eb3889330f2a4a148abead555399ec9a32b13b7c8ba969b72d8e500eb7ef84cd", - "sha256:f4daefc971c2d1f82f03097dc6f216744a6cd2ac0f04c68fb935ea2ba2a0d420", - "sha256:f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14", - "sha256:fd0ee90072861e276b0ff08bd627abec29e32a53b2be44e41dbcdf87cbee2b00" + "sha256:04abd71114848aa25edb28e225ab5f268096f44cf0127f3d36975bdf1bdf3390", + "sha256:0529b1d5a0105dd3731fa65680b45ce49da4d8115ea76e9da77a875396727b41", + "sha256:1bc312dfb7a6e5d66082c87c34c8a62176e684b6fe3d90fcfe1568de675e6688", + "sha256:268e4e9b177c76d569e8a145a6939eca9a5fec658c932348598818acf31ae9a5", + "sha256:29ecec49f3ba3f3849362854b7253a9f59799e3763b0c9d0826259a88efa02f1", + "sha256:2bf7bf75f7df9715f810d1b038870309342bff3069c5bd8c6b96128cb158668d", + "sha256:3b721b8b4d948b218c88cb8c45a01793483821e709afe5f622861fc6182b20a7", + "sha256:3c00b6b757b32ce0f62c574b78b939afab9eecaf597c4d624caca4f9e71e7843", + "sha256:3dc62975e31617badc19a906481deacdeb80b4bb454394b4098e3f2525a488c5", + "sha256:4973da6ca3db4405c54cd0b26d328be54c7747e89e284fcff166132eb7bccc9c", + "sha256:4e389622b6927d8133f314949a9812972711a111d577a5d1f4bee5e58736b80a", + "sha256:51e4de3af4ec3899d6d178a8c005226491c27c4ba84101bfb59c901e10ca9f79", + "sha256:5f6f90b72d8ccadb9c6e311c775c8305381db88374c65fa1a68250aa8a9cb3a6", + "sha256:6210c05941994290f3f7f175a4a57dbbb2afd9273657614c506d5976db061181", + "sha256:6f101b1f780f7fc613d040ca4bdf835c6ef3b00e9bd7125a4255ec574c7916e4", + "sha256:7bdcd82189759aba3816d1f729ce42ffded1ac304c151d0a8e89b9996ab863d5", + "sha256:7ca25849404be2f8e4b3c59483d9d3c51298a22c1c61a0e84415104dacaf5562", + "sha256:81276f0ea79a208d961c433a947029e1a15948966658cf6710bbabb60fcc2639", + "sha256:8cadc6e3b5a1f144a039ea08a0bdb03a2a92e19c46be3285123d32029f40a922", + "sha256:8e0ddd63e6bf1161800592c71ac794d3fb8001f2caebe0966e77c5234fa9efc3", + "sha256:909c97ab43a9c0c0b0ada7a1281430e4e5ec0458e6d9244c0e821bbf152f061d", + "sha256:96e7a5e9d6e71f9f4fca8eebfd603f8e86c5225bb18eb621b2c1e50b290a9471", + "sha256:9a1e657c0f4ea2a23304ee3f964db058c9e9e635cc7019c4aa21c330755ef6fd", + "sha256:9eb9d22b0a5d8fd9925a7764a054dca914000607dff201a24c791ff5c799e1fa", + "sha256:af4ff3e388f2fa7bff9f7f2b31b87d5651c45731d3e8cfa0944be43dff5cfbdb", + "sha256:b042d2a275c8cee83a4b7ae30c45a15e6a4baa65a179a0ec2d78ebb90e4f6699", + "sha256:bc821e161ae88bfe8088d11bb39caf2916562e0a2dc7b6d56714a48b784ef0bb", + "sha256:c505d61b6176aaf982c5717ce04e87da5abc9a36a5b39ac03905c4aafe8de7aa", + "sha256:c63454aa261a0cf0c5b4718349629793e9e634993538db841165b3df74f37ec0", + "sha256:c7362add18b416b69d58c910caa217f980c5ef39b23a38a0880dfd87bdf8cd23", + "sha256:d03806036b4f89e3b13b6218fefea8d5312e450935b1a2d55f0524e2ed7c59d9", + "sha256:d1b3031093a366ac767b3feb8bcddb596671b3aaff82d4050f984da0c248b615", + "sha256:d1c3572526997b36f245a96a2b1713bf79ce99b271bbcf084beb6b9b075f29ea", + "sha256:efcfe97d1b3c79e486554efddeb8f6f53a4cdd4cf6086642784fa31fc384e1d7", + "sha256:f514ef4cd14bb6fb484b4a60203e912cfcb64f2ab139e88c2274511514bf7308" ], "markers": "python_version >= '3.7' and python_full_version not in '3.9.0, 3.9.1'", - "version": "==44.0.1" + "version": "==44.0.2" }, "idna": { "hashes": [ @@ -1565,12 +1585,12 @@ }, "pytest": { "hashes": [ - "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", - "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761" + "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", + "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845" ], "index": "pypi", "markers": "python_version >= '3.8'", - "version": "==8.3.4" + "version": "==8.3.5" }, "requests": { "hashes": [ @@ -1594,7 +1614,7 @@ "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d" ], - "markers": "python_version >= '3.10'", + "markers": "python_version >= '3.9'", "version": "==2.3.0" } } diff --git a/dbrepo-search-service/init/clients/opensearch_client.py b/dbrepo-search-service/init/clients/opensearch_client.py index 35c26f03f5f684adc2652c199db7f99afd6cfc13..deca261ce273563bb84aa19e7525440f4d64bdeb 100644 --- a/dbrepo-search-service/init/clients/opensearch_client.py +++ b/dbrepo-search-service/init/clients/opensearch_client.py @@ -51,7 +51,7 @@ class OpenSearchClient: http_auth=(self.username, self.password)) return self.instance - def update_database(self, database_id: int, data: Database) -> Database: + def update_database(self, database_id: str, data: Database) -> Database: """ Updates the database data with given id. @@ -66,7 +66,7 @@ class OpenSearchClient: response: dict = self._instance().get(index="database", id=database_id) return Database.model_validate(response["_source"]) - def delete_database(self, database_id: int) -> None: + def delete_database(self, database_id: str) -> None: """ Deletes the database data with given id. diff --git a/dbrepo-search-service/init/database.json b/dbrepo-search-service/init/database.json index 59cbd78438a5fff391d1237c70a0384d7b397a83..175a50dd9b829d0ce855a5c9eceae694937009cc 100644 --- a/dbrepo-search-service/init/database.json +++ b/dbrepo-search-service/init/database.json @@ -131,7 +131,13 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "image": { "properties": { @@ -154,9 +160,6 @@ } }, "id": { - "type": "long" - }, - "jdbc_method": { "type": "text", "fields": { "keyword": { @@ -215,18 +218,6 @@ "port": { "type": "long" }, - "sidecar_host": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "sidecar_port": { - "type": "long" - }, "ui_host": { "type": "text", "fields": { @@ -303,7 +294,13 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "identifiers": { "properties": { @@ -371,7 +368,13 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "name_identifier": { "type": "text", @@ -412,7 +415,13 @@ } }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "descriptions": { "properties": { @@ -426,12 +435,24 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "licenses": { "properties": { @@ -512,7 +533,13 @@ "titles": { "properties": { "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "title": { "type": "text", @@ -535,7 +562,13 @@ } }, "view_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, @@ -592,10 +625,22 @@ "type": "long" }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "internal_name": { "type": "text", @@ -634,7 +679,13 @@ "type": "float" }, "table_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, @@ -645,26 +696,62 @@ "column": { "properties": { "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "table_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "table": { "properties": { "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } } @@ -675,26 +762,62 @@ "columns": { "properties": { "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "table_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "table": { "properties": { "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } } @@ -758,7 +881,13 @@ "type": "long" }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "description": { "type": "text", @@ -770,7 +899,13 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "internal_name": { "type": "text", @@ -839,10 +974,22 @@ } }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "internal_name": { "type": "text", @@ -926,10 +1073,22 @@ } }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "identifiers": { "properties": { @@ -997,7 +1156,13 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "name_identifier": { "type": "text", @@ -1038,7 +1203,13 @@ } }, "database_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "descriptions": { "properties": { @@ -1052,12 +1223,24 @@ } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "licenses": { "properties": { @@ -1138,7 +1321,13 @@ "titles": { "properties": { "id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } }, "title": { "type": "text", @@ -1161,7 +1350,13 @@ } }, "view_id": { - "type": "long" + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, diff --git a/dbrepo-search-service/init/lib/dbrepo-1.6.5-py3-none-any.whl b/dbrepo-search-service/init/lib/dbrepo-1.6.5-py3-none-any.whl deleted file mode 100644 index 2a5cda78c55f725af708e7ff1d7f4b281586613d..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.6.5-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.6.5.tar.gz b/dbrepo-search-service/init/lib/dbrepo-1.6.5.tar.gz deleted file mode 100644 index 5117abc68daa9a4e776392855c6022c8d20d5d31..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.6.5.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0-py3-none-any.whl b/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0-py3-none-any.whl deleted file mode 100644 index b4ceb85027aa4164b602f876080c0f8979534b0e..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0.tar.gz b/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0.tar.gz deleted file mode 100644 index e8de842c2945231eb547737851eb6269ee5ba84e..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/init/lib/dbrepo-1.6.5rc0.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..b58eb4bc6134164a5c99959cc35adc1160bdeff4 Binary files /dev/null and b/dbrepo-search-service/init/lib/dbrepo-1.7.0-py3-none-any.whl differ diff --git a/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz b/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..56e2f0cd8d4a18039de95dbecfeafe997baab3ce Binary files /dev/null and b/dbrepo-search-service/init/lib/dbrepo-1.7.0.tar.gz differ diff --git a/dbrepo-search-service/init/tests/test_opensearch_client.py b/dbrepo-search-service/init/tests/test_opensearch_client.py index 70328df6387dd9d6743804bb3c240637a35d6f40..54ef2340ab0cf7763122cbf300deb5f8d44d6fa1 100644 --- a/dbrepo-search-service/init/tests/test_opensearch_client.py +++ b/dbrepo-search-service/init/tests/test_opensearch_client.py @@ -1,14 +1,14 @@ +import os import unittest import opensearchpy -import os from dbrepo.api.dto import Database, Table, Column, ColumnType, Constraints, PrimaryKey, \ ConceptBrief, UnitBrief, UserBrief, ContainerBrief, ImageBrief, TableBrief, ColumnBrief from opensearchpy import NotFoundError from clients.opensearch_client import OpenSearchClient -req = Database(id=1, +req = Database(id="209acf92-5c9b-4633-ad99-113c86f6e948", name="Test", internal_name="test_tuw1", owner=UserBrief(id="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", username="foo"), @@ -16,16 +16,15 @@ req = Database(id=1, exchange_name="dbrepo", is_public=True, is_schema_public=True, - container=ContainerBrief(id=1, + container=ContainerBrief(id="7efe8b27-6cdc-4387-80e3-92ee28f4a7c5", name="MariaDB", internal_name="mariadb", - host="data-db", - image=ImageBrief(id=1, + image=ImageBrief(id="f97791b4-baf4-4b18-8f7d-3084818e6549", name="mariadb", version="11.1.3", - jdbc_method="mariadb")), - tables=[Table(id=1, - database_id=1, + default=True)), + tables=[Table(id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", + database_id="209acf92-5c9b-4633-ad99-113c86f6e948", name="Data", internal_name="data", owner=UserBrief(id="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", username="foo"), @@ -35,9 +34,9 @@ req = Database(id=1, routing_key="dbrepo.1.1", is_public=True, is_schema_public=True, - columns=[Column(id=1, - database_id=1, - table_id=1, + columns=[Column(id="7bef7e68-88f1-438e-9b94-0a77afd21471", + database_id="209acf92-5c9b-4633-ad99-113c86f6e948", + table_id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", name="ID", ord=0, internal_name="id", @@ -45,8 +44,9 @@ req = Database(id=1, is_null_allowed=False, size=20, d=0, - concept=ConceptBrief(id=1, uri="http://www.wikidata.org/entity/Q2221906"), - unit=UnitBrief(id=1, + concept=ConceptBrief(id="fb32ecf6-1f68-49b4-85ee-04e76263cbef", + uri="http://www.wikidata.org/entity/Q2221906"), + unit=UnitBrief(id="a67d735e-32ef-4917-b412-fe099c6757a1", uri="http://www.ontology-of-units-of-measure.org/resource/om-2/degreeCelsius"), val_min=0, val_max=10)] @@ -56,7 +56,7 @@ req = Database(id=1, class OpenSearchClientTest(unittest.TestCase): def test_update_database_succeeds(self): - req.tables = [Table(id=1, + req.tables = [Table(id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", name="Test Table", internal_name="test_table", queue_name="dbrepo", @@ -64,27 +64,31 @@ class OpenSearchClientTest(unittest.TestCase): is_public=True, is_schema_public=True, database_id=req.id, - constraints=Constraints(uniques=[], foreign_keys=[], checks=[], - primary_key=[PrimaryKey(id=1, - table=TableBrief(id=1, - database_id=req.id, - name="Test Table", - internal_name="test_table", - is_public=True, - is_schema_public=True, - is_versioned=True, - owned_by="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502"), - column=ColumnBrief(id=1, - name="ID", - database_id=req.id, - table_id=1, - internal_name="id", - type=ColumnType.BIGINT))]), + constraints=Constraints(uniques=[], + foreign_keys=[], + checks=[], + primary_key=[PrimaryKey(id="f0d4dfdf-d987-4c73-aa40-1038db79bb31", + table=TableBrief( + id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", + database_id=req.id, + name="Test Table", + internal_name="test_table", + is_public=True, + is_schema_public=True, + is_versioned=True, + owned_by="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502"), + column=ColumnBrief( + id="90d81c6a-e69a-4413-97b8-fd2266a6e641", + name="ID", + database_id=req.id, + table_id="90d81c6a-e69a-4413-97b8-fd2266a6e641", + internal_name="id", + type=ColumnType.BIGINT))]), is_versioned=True, owner=UserBrief(id="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", username="foo"), - columns=[Column(id=1, + columns=[Column(id="c63bde4a-61e4-42f1-ab64-350579c0691f", database_id=req.id, - table_id=1, + table_id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", ord=0, name="ID", internal_name="id", @@ -95,7 +99,7 @@ class OpenSearchClientTest(unittest.TestCase): # test database = OpenSearchClient().update_database(database_id=req.id, data=req) - self.assertEqual(1, database.id) + self.assertEqual("209acf92-5c9b-4633-ad99-113c86f6e948", database.id) self.assertEqual("Test", database.name) self.assertEqual("test_tuw1", database.internal_name) self.assertEqual("c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", database.owner.id) @@ -104,34 +108,34 @@ class OpenSearchClientTest(unittest.TestCase): self.assertEqual("foo", database.contact.username) self.assertEqual("dbrepo", database.exchange_name) self.assertEqual(True, database.is_public) - self.assertEqual(1, database.container.id) + self.assertEqual("7efe8b27-6cdc-4387-80e3-92ee28f4a7c5", database.container.id) # ... - self.assertEqual(1, database.container.image.id) + self.assertEqual("f97791b4-baf4-4b18-8f7d-3084818e6549", database.container.image.id) # ... self.assertEqual(1, len(database.tables)) - self.assertEqual(1, database.tables[0].id) + self.assertEqual("f94a6164-cad4-4873-a9fd-3fe5313b2e95", database.tables[0].id) self.assertEqual("Test Table", database.tables[0].name) self.assertEqual("test_table", database.tables[0].internal_name) self.assertEqual("dbrepo", database.tables[0].queue_name) self.assertEqual("dbrepo.test_tuw1.test_table", database.tables[0].routing_key) self.assertEqual(True, database.tables[0].is_public) - self.assertEqual(1, database.tables[0].database_id) + self.assertEqual("209acf92-5c9b-4633-ad99-113c86f6e948", database.tables[0].database_id) self.assertEqual(True, database.tables[0].is_versioned) self.assertEqual("c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", database.tables[0].owner.id) self.assertEqual("foo", database.tables[0].owner.username) self.assertEqual(1, len(database.tables[0].columns)) - self.assertEqual(1, database.tables[0].columns[0].id) + self.assertEqual("c63bde4a-61e4-42f1-ab64-350579c0691f", database.tables[0].columns[0].id) self.assertEqual("ID", database.tables[0].columns[0].name) self.assertEqual("id", database.tables[0].columns[0].internal_name) self.assertEqual(ColumnType.BIGINT, database.tables[0].columns[0].type) - self.assertEqual(1, database.tables[0].columns[0].database_id) - self.assertEqual(1, database.tables[0].columns[0].table_id) + self.assertEqual("209acf92-5c9b-4633-ad99-113c86f6e948", database.tables[0].columns[0].database_id) + self.assertEqual("f94a6164-cad4-4873-a9fd-3fe5313b2e95", database.tables[0].columns[0].table_id) self.assertEqual(False, database.tables[0].columns[0].is_null_allowed) def test_update_database_create_succeeds(self): # test database = OpenSearchClient().update_database(database_id=req.id, data=req) - self.assertEqual(1, database.id) + self.assertEqual("209acf92-5c9b-4633-ad99-113c86f6e948", database.id) self.assertEqual("Test", database.name) self.assertEqual("test_tuw1", database.internal_name) self.assertEqual("c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", database.owner.id) @@ -140,9 +144,9 @@ class OpenSearchClientTest(unittest.TestCase): self.assertEqual("foo", database.contact.username) self.assertEqual("dbrepo", database.exchange_name) self.assertEqual(True, database.is_public) - self.assertEqual(1, database.container.id) + self.assertEqual("7efe8b27-6cdc-4387-80e3-92ee28f4a7c5", database.container.id) # ... - self.assertEqual(1, database.container.image.id) + self.assertEqual("f97791b4-baf4-4b18-8f7d-3084818e6549", database.container.image.id) # ... self.assertEqual(1, len(database.tables)) @@ -159,7 +163,7 @@ class OpenSearchClientTest(unittest.TestCase): # test try: - OpenSearchClient().delete_database(database_id=9999) + OpenSearchClient().delete_database(database_id="deadbeef-a5aa-49bb-87e7-6c6271731a1a") except opensearchpy.exceptions.NotFoundError: pass diff --git a/dbrepo-search-service/lib/dbrepo-1.6.5-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.6.5-py3-none-any.whl deleted file mode 100644 index 2a5cda78c55f725af708e7ff1d7f4b281586613d..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.6.5-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.6.5.tar.gz b/dbrepo-search-service/lib/dbrepo-1.6.5.tar.gz deleted file mode 100644 index 5117abc68daa9a4e776392855c6022c8d20d5d31..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.6.5.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl deleted file mode 100644 index b4ceb85027aa4164b602f876080c0f8979534b0e..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.6.5rc0-py3-none-any.whl and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.6.5rc0.tar.gz b/dbrepo-search-service/lib/dbrepo-1.6.5rc0.tar.gz deleted file mode 100644 index e8de842c2945231eb547737851eb6269ee5ba84e..0000000000000000000000000000000000000000 Binary files a/dbrepo-search-service/lib/dbrepo-1.6.5rc0.tar.gz and /dev/null differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl b/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..b58eb4bc6134164a5c99959cc35adc1160bdeff4 Binary files /dev/null and b/dbrepo-search-service/lib/dbrepo-1.7.0-py3-none-any.whl differ diff --git a/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz b/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..56e2f0cd8d4a18039de95dbecfeafe997baab3ce Binary files /dev/null and b/dbrepo-search-service/lib/dbrepo-1.7.0.tar.gz differ diff --git a/dbrepo-search-service/tests/conftest.py b/dbrepo-search-service/tests/conftest.py index 1d603685d63e464a4ffe2f4aac005c2af319fc5a..93af4d45873c99d9cf83438a2f35d2763044b283 100644 --- a/dbrepo-search-service/tests/conftest.py +++ b/dbrepo-search-service/tests/conftest.py @@ -15,7 +15,7 @@ def session(request): :return: The OpenSearch container """ logging.debug("[fixture] creating opensearch container") - container = OpenSearchContainer() + container = OpenSearchContainer(image="opensearchproject/opensearch:2.10.0") logging.debug("[fixture] starting opensearch container") container.start() diff --git a/dbrepo-search-service/tests/test_app.py b/dbrepo-search-service/tests/test_app.py index 2b765b77544239bc0f6f3352ced6b07625ab291b..d2c8f2bd6049220b83a867562f0459b58b8f344d 100644 --- a/dbrepo-search-service/tests/test_app.py +++ b/dbrepo-search-service/tests/test_app.py @@ -8,7 +8,7 @@ from dbrepo.api.dto import Database, Table, Constraints, Column, ColumnType, Con from app import app -req = Database(id=1, +req = Database(id="209acf92-5c9b-4633-ad99-113c86f6e948", name="Test", internal_name="test_tuw1", owner=UserBrief(id="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", username="foo"), @@ -16,15 +16,17 @@ req = Database(id=1, exchange_name="dbrepo", is_public=True, is_schema_public=True, - container=ContainerBrief(id=1, + container=ContainerBrief(id="7efe8b27-6cdc-4387-80e3-92ee28f4a7c5", name="MariaDB", internal_name="mariadb", - host="data-db", - image=ImageBrief(id=1, + image=ImageBrief(id="f97791b4-baf4-4b18-8f7d-3084818e6549", name="mariadb", version="11.1.3", - jdbc_method="mariadb")), - tables=[Table(id=1, database_id=1, name="Data", internal_name="data", + default=True)), + tables=[Table(id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", + database_id="209acf92-5c9b-4633-ad99-113c86f6e948", + name="Data", + internal_name="data", owner=UserBrief(id="c6b71ef5-2d2f-48b2-9d79-b8f23a3a0502", username="foo"), constraints=Constraints(uniques=[], foreign_keys=[], checks=[], primary_key=[]), is_versioned=False, @@ -32,20 +34,19 @@ req = Database(id=1, routing_key="dbrepo.1.1", is_public=True, is_schema_public=True, - columns=[Column(id=1, - database_id=1, - table_id=1, - ord=0, + columns=[Column(id="7bef7e68-88f1-438e-9b94-0a77afd21471", + database_id="209acf92-5c9b-4633-ad99-113c86f6e948", + table_id="f94a6164-cad4-4873-a9fd-3fe5313b2e95", name="ID", + ord=0, internal_name="id", type=ColumnType.BIGINT, - is_public=True, is_null_allowed=False, size=20, d=0, - concept=ConceptBrief(id=1, + concept=ConceptBrief(id="fb32ecf6-1f68-49b4-85ee-04e76263cbef", uri="http://www.wikidata.org/entity/Q2221906"), - unit=UnitBrief(id=1, + unit=UnitBrief(id="a67d735e-32ef-4917-b412-fe099c6757a1", uri="http://www.ontology-of-units-of-measure.org/resource/om-2/degreeCelsius"), val_min=0, val_max=10)] diff --git a/dbrepo-ui/assets/globals.css b/dbrepo-ui/assets/globals.css index 52da2e48c8c2e7589ddcbce27fe67520acd74763..90dc2854d0e2f73570e127ab550571c9de20cdf9 100644 --- a/dbrepo-ui/assets/globals.css +++ b/dbrepo-ui/assets/globals.css @@ -10,4 +10,7 @@ select.native { border-style: solid; width: 100%; } +.line-break { + white-space: pre-wrap; } + /*# sourceMappingURL=globals.css.map */ diff --git a/dbrepo-ui/assets/globals.css.map b/dbrepo-ui/assets/globals.css.map index 6f271c8f99f4295e8438524dea16b6a48b253635..13ee94918abe425675c52bd70da749839a0957fb 100644 --- a/dbrepo-ui/assets/globals.css.map +++ b/dbrepo-ui/assets/globals.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AAAA,CAAE;EACA,KAAK,EAAE,sBAAsB;;AAG/B;aACc;EACZ,OAAO,EAAE,KAAK;;AAGhB,aAAc;EACZ,kBAAkB,EAAE,OAAO;EAC3B,YAAY,EAAE,KAAK;EACnB,KAAK,EAAE,IAAI", +"mappings": "AAAA,CAAE;EACA,KAAK,EAAE,sBAAsB;;AAG/B;aACc;EACZ,OAAO,EAAE,KAAK;;AAGhB,aAAc;EACZ,kBAAkB,EAAE,OAAO;EAC3B,YAAY,EAAE,KAAK;EACnB,KAAK,EAAE,IAAI;;AAGb,WAAY;EACV,WAAW,EAAE,QAAQ", "sources": ["globals.scss"], "names": [], "file": "globals.css" diff --git a/dbrepo-ui/assets/globals.scss b/dbrepo-ui/assets/globals.scss index 5d4d4e06a7cdcde8e801cccd14c0eb2f07c0824d..5e0dce3a0fff1005acb8eb9094b8a8bacbc78501 100644 --- a/dbrepo-ui/assets/globals.scss +++ b/dbrepo-ui/assets/globals.scss @@ -12,3 +12,7 @@ select.native { border-style: solid; width: 100%; } + +.line-break { + white-space: pre-wrap; +} diff --git a/dbrepo-ui/bun.lockb b/dbrepo-ui/bun.lockb index 7ee1d3897245ee94212d8bfb6a6b97556b64f1d2..a4bc73dcd16c8e4a59a34fd431a7acf3a20627fa 100755 Binary files a/dbrepo-ui/bun.lockb and b/dbrepo-ui/bun.lockb differ diff --git a/dbrepo-ui/components/container/ContainerCard.vue b/dbrepo-ui/components/container/ContainerCard.vue index ed1479f64d3ad8043968e03edbfcd940190e3fb6..841333c44d913fe63150de59d83d89831a6077a2 100644 --- a/dbrepo-ui/components/container/ContainerCard.vue +++ b/dbrepo-ui/components/container/ContainerCard.vue @@ -17,7 +17,7 @@ height="20" class="font-small"> <template v-slot:default> - {{ container.count }} / {{ container.quota }} + {{ container.count }} / {{ quota }} </template> </v-progress-linear> </v-card-text> @@ -39,7 +39,16 @@ export default { } }, computed: { + quota () { + if (!this.container || !this.container.quota) { + return '∞' + } + return this.container.quota + }, utilization () { + if (!this.container || !this.container.quota) { + return 0 + } return this.container.count * 100.0 / this.container.quota }, colorVariant () { diff --git a/dbrepo-ui/components/database/DatabaseCreate.vue b/dbrepo-ui/components/database/DatabaseCreate.vue index 07fd9d34ea218a91bb6ffb634d210bd5493ad830..177e640aa966f74060a8645297194c6d48d7dd7a 100644 --- a/dbrepo-ui/components/database/DatabaseCreate.vue +++ b/dbrepo-ui/components/database/DatabaseCreate.vue @@ -46,7 +46,7 @@ return-object required> <template - v-if="engine" + v-if="engine && engine.quota" v-slot:details> {{ $t('pages.database.subpages.create.utilization.label') }} {{ engine.count }}/{{ engine.quota }} </template> @@ -139,7 +139,7 @@ export default { this.loadingContainers = true containerService.findAll() .then((containers) => { - const freeContainers = containers.filter(c => c.count < c.quota) + const freeContainers = containers.filter(c => c.quota === null || c.count < c.quota) const defaultContainers = freeContainers.filter(c => c.image.default) defaultContainers.sort(this.compareContainerUtilization) this.engines = defaultContainers diff --git a/dbrepo-ui/components/dialogs/EditMaintenanceMessage.vue b/dbrepo-ui/components/dialogs/EditMaintenanceMessage.vue index 4940e75d66b28254449ce3ddf834dfa9fce83c7f..d391ac153a290256db7f287d75d71c346379ce68 100644 --- a/dbrepo-ui/components/dialogs/EditMaintenanceMessage.vue +++ b/dbrepo-ui/components/dialogs/EditMaintenanceMessage.vue @@ -89,7 +89,7 @@ import { useCacheStore } from '@/stores/cache.js' export default { props: { id: { - type: Number, + type: String, default () { return null } diff --git a/dbrepo-ui/components/dialogs/Semantics.vue b/dbrepo-ui/components/dialogs/Semantics.vue index e68a4fa55d245cbcb6ad052a8952ad96a9de5e53..5c028cbcb68c6390234127e568096bf3ab1d70b6 100644 --- a/dbrepo-ui/components/dialogs/Semantics.vue +++ b/dbrepo-ui/components/dialogs/Semantics.vue @@ -55,6 +55,7 @@ v-if="recommendations.length === 0"> <v-col> <v-btn + v-if="finishedRecommendations" color="secondary" variant="flat" size="small" @@ -147,8 +148,8 @@ export default { default: () => null }, tableId: { - type: Number, - default: () => -1 + type: String, + default: () => null }, mode: { type: String, @@ -165,6 +166,7 @@ export default { uri: null, valid: false, loading: false, + finishedRecommendations: false, loadingOntologies: false, loadingSemantics: false, cacheStore: useCacheStore() @@ -172,7 +174,7 @@ export default { }, computed: { title () { - return this.$t('pages.table.subpages.semantics.title') + ' ' + this.column.internal_name + return this.$t('pages.table.subpages.semantics.title', { type: this.mode }) + ' ' + this.column.internal_name }, ontologies () { return this.cacheStore.getOntologies.filter(o => o.sparql || o.rdf) @@ -243,6 +245,13 @@ export default { action: 'assign' }) }) + .catch(({code, message}) => { + const toast = useToastInstance() + if (typeof code !== 'string') { + return + } + toast.error(message) + }) .finally(() => { this.recommendation = null this.$refs.form.reset() @@ -255,10 +264,14 @@ export default { tableService.suggest(this.database.id, this.tableId, this.column.id) .then((recommendations) => { this.recommendations = recommendations + this.finishedRecommendations = true }) - .catch((error) => { + .catch(({code, message}) => { const toast = useToastInstance() - toast.error(this.$t('error.semantics.timeout')) + if (typeof code !== 'string') { + return + } + toast.error(message) }) .finally(() => { this.loadingSemantics = false diff --git a/dbrepo-ui/components/dialogs/ViewVisibility.vue b/dbrepo-ui/components/dialogs/ViewVisibility.vue index 6a37bf415348ac9b2fe1c705bd40e762596db26c..7ccdb12df6658de6e6216d632b7fc15619a4a2c6 100644 --- a/dbrepo-ui/components/dialogs/ViewVisibility.vue +++ b/dbrepo-ui/components/dialogs/ViewVisibility.vue @@ -11,7 +11,7 @@ <v-row dense> <v-col - md="6"> + lg="6"> <v-select v-model="modify.is_public" :items="dataOptions" @@ -25,7 +25,7 @@ :hint="$t('pages.database.resource.data.hint', { resource: 'view' })" /> </v-col> <v-col - md="6"> + lg="6"> <v-select v-model="modify.is_schema_public" :items="schemaOptions" diff --git a/dbrepo-ui/components/identifier/Citation.vue b/dbrepo-ui/components/identifier/Citation.vue index 9ee434c943da8c011e0bfece1c88c06b525845a9..a52cd87159b23f4cad7d64ae5dd4fe177a489b65 100644 --- a/dbrepo-ui/components/identifier/Citation.vue +++ b/dbrepo-ui/components/identifier/Citation.vue @@ -3,12 +3,12 @@ no-gutters> <v-col v-if="!loading" - md="10"> + lg="10"> {{ citation }} </v-col> <v-col v-if="!$vuetify.display.mdAndDown" - md="2" + lg="2" class="cite-style"> <v-select v-model="style" diff --git a/dbrepo-ui/components/identifier/DownloadButton.vue b/dbrepo-ui/components/identifier/DownloadButton.vue index 85b58dc818b49d2dfb43fe15bd229084122990dd..3f9fdd10d90ae2663fcbced834b82d2a0d471bd6 100644 --- a/dbrepo-ui/components/identifier/DownloadButton.vue +++ b/dbrepo-ui/components/identifier/DownloadButton.vue @@ -11,7 +11,7 @@ export default { props: { pid: { - type: Number, + type: String, default () { return null } diff --git a/dbrepo-ui/components/identifier/Persist.vue b/dbrepo-ui/components/identifier/Persist.vue index f37c5c6d7d9893562d94393fe6aa19ab3b448d79..004a037c4667fac81bb65d9376d94cfb6a8b80a8 100644 --- a/dbrepo-ui/components/identifier/Persist.vue +++ b/dbrepo-ui/components/identifier/Persist.vue @@ -34,7 +34,7 @@ <v-btn v-if="canPublish" class="mr-2" - :prepend-icon="$vuetify.display.lgAndUp ? 'mdi-content-save-outline' : null" + :prepend-icon="$vuetify.display.lgAndUp ? 'mdi-identifier' : null" color="primary" variant="flat" :loading="loadingPublish" @@ -867,10 +867,10 @@ export default { error: false, // XXX: `error` is never changed licenses: [], identifier: { - database_id: parseInt(this.$route.params.database_id), - query_id: parseInt(this.$route.params.subset_id), - view_id: parseInt(this.$route.params.view_id), - table_id: parseInt(this.$route.params.table_id), + database_id: this.$route.params.database_id, + query_id: this.$route.params.subset_id, + view_id: this.$route.params.view_id, + table_id: this.$route.params.table_id, titles: [], descriptions: [], publisher: this.$config.public.pid.default.publisher, @@ -1391,9 +1391,10 @@ export default { this.loadingPublish = true const identifierService = useIdentifierService() identifierService.publish(this.identifier.id) - .then(() => { + .then((identifier) => { const toast = useToastInstance() toast.success(this.$t('success.pid.published')) + this.identifier = identifier this.cacheStore.reloadDatabase() this.loadingPublish = false }) diff --git a/dbrepo-ui/components/identifier/Summary.vue b/dbrepo-ui/components/identifier/Summary.vue index 6ef120599b515fece88870ad832ed23a508e4ebe..dcbe2f063db7ccbeb601a70a2d1bc85e3f9a5c85 100644 --- a/dbrepo-ui/components/identifier/Summary.vue +++ b/dbrepo-ui/components/identifier/Summary.vue @@ -26,7 +26,7 @@ <v-list-item :title="$t('pages.identifier.descriptions.title')" density="compact"> - <p + <div v-for="(description, i) in identifier.descriptions" :key="`d-${i}`"> <div @@ -36,7 +36,7 @@ <span> {{ description.description }} </span> - </p> + </div> </v-list-item> <v-list-item :title="$t('pages.identifier.publisher.title')" diff --git a/dbrepo-ui/components/subset/Builder.vue b/dbrepo-ui/components/subset/Builder.vue index f670700f2f23aa2a08a6ecf8004fecfb899c6c00..52fff4c4df37a474b3686c0c6d5cffda85cae7af 100644 --- a/dbrepo-ui/components/subset/Builder.vue +++ b/dbrepo-ui/components/subset/Builder.vue @@ -19,30 +19,19 @@ :text="$t('navigation.create')" @click="execute" /> </v-toolbar> - <v-toolbar flat> - <v-tabs - v-model="tabs" - color="primary"> - <v-tab - value="0" - :text="$t('pages.subset.subpages.create.simple.text')" /> - <v-tab - value="1" - :text="$t('pages.subset.subpages.create.expert.text')" /> - </v-tabs> - </v-toolbar> <v-card rounded="0" variant="flat"> <v-card-text> <v-form ref="form" - @submit.prevent> + @submit.prevent="$refs.form.validate()"> <v-row v-if="isView" class="mt-1" dense> - <v-col lg="8"> + <v-col + lg="8"> <v-text-field v-model="view.name" :disabled="isExecuted" @@ -63,7 +52,7 @@ v-if="isView" dense> <v-col - md="4"> + lg="4"> <v-select v-model="view.is_public" :items="dataOptions" @@ -78,7 +67,7 @@ :hint="$t('pages.database.resource.data.hint')" /> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="view.is_schema_public" :items="schemaOptions" @@ -99,7 +88,8 @@ <v-window-item value="0"> <v-row dense> - <v-col lg="4"> + <v-col + lg="4"> <v-select v-model="table" :disabled="isExecuted" @@ -113,22 +103,23 @@ :hint="$t('pages.view.subpages.create.table.hint')" :rules="[v => !!v || $t('validation.required')]" /> </v-col> - <v-col lg="4"> + <v-col + lg="4"> <v-select v-model="select" item-title="internal_name" :disabled="!table || isExecuted" :items="columns" + :rules="[v => !!v || $t('validation.required')]" + required persistent-hint clearable :variant="inputVariant" :label="$t('pages.view.subpages.create.columns.label')" :hint="$t('pages.view.subpages.create.columns.hint')" - :rules="[v => !!v || $t('validation.required')]" :loading="loadingColumns" return-object - multiple - @update:model-value="buildQuery"> + multiple> <template v-slot:prepend-item> <v-list-item @@ -147,20 +138,33 @@ </v-select> </v-col> </v-row> - <v-row v-if="select.length > 0"> - <v-col lg="8"> + <v-row + v-if="select.length > 0"> + <v-col + lg="8"> <v-btn v-if="clauses.length === 0" size="small" - color="secondary" + color="tertiary" variant="flat" :text="$t('pages.subset.subpages.create.filter.text')" :disabled="clausesDisabled" - @click="addFirst" /> + @click="addFirstFilter" /> + <v-btn + v-if="clauses.length === 0 && sorts.length === 0" + class="ml-2" + size="small" + color="tertiary" + variant="flat" + :text="$t('pages.subset.subpages.create.order.text')" + :disabled="clausesDisabled" + @click="addFirstSort" /> </v-col> </v-row> - <div class="mb-5"> - <v-row v-if="clauses.length > 0"> + <div + class="mb-5"> + <v-row + v-if="clauses.length > 0"> <v-col lg="8" class="text-center"> @@ -170,27 +174,35 @@ <div v-for="(clause, idx) in clauses" :key="idx"> <v-row v-if="clause.type === 'where'"> - <v-col lg="3"> + <v-col + lg="3"> <v-select v-model="clause.params[0]" :disabled="clausesDisabled" item-title="internal_name" item-value="internal_name" variant="underlined" + :rules="[v => !!v || $t('validation.required')]" + required + clearable persistent-hint :label="$t('pages.subset.subpages.create.filter.column.label')" :hint="$t('pages.subset.subpages.create.filter.column.hint')" :items="select" /> </v-col> - <v-col lg="2"> + <v-col + lg="2"> <v-select v-model="clause.params[1]" :disabled="clausesDisabled" item-title="value" item-value="value" + :rules="[v => !!v || $t('validation.required')]" + required + clearable persistent-hint - :label="operatorHint(clause.params[1])" - :hint="$t('pages.subset.subpages.create.filter.operator.label')" + :label="$t('pages.subset.subpages.create.filter.operator.label')" + :hint="operatorHint(clause.params[1])" :items="operators"> <template v-slot:append> @@ -211,15 +223,20 @@ </template> </v-select> </v-col> - <v-col lg="3"> + <v-col + lg="3"> <v-text-field v-model="clause.params[2]" :disabled="clausesDisabled" + :rules="[v => !!v || $t('validation.required')]" + required + clearable persistent-hint :label="$t('pages.subset.subpages.create.filter.value.label')" :hint="$t('pages.subset.subpages.create.filter.value.hint')" /> </v-col> - <v-col lg="1"> + <v-col + lg="1"> <v-btn :disabled="clausesDisabled" class="mt-4" @@ -227,7 +244,7 @@ color="error" variant="flat" :text="$t('pages.subset.subpages.create.filter.remove.text')" - @click="remove(idx)" /> + @click="removeFilter(idx)" /> </v-col> </v-row> <v-row @@ -247,7 +264,7 @@ :disabled="!canAdd(idx) || clausesDisabled" class="mt-2 mr-1" variant="flat" - color="secondary" + color="tertiary" size="small" :text="$t('pages.subset.subpages.create.filter.and.text')" @click="addAnd" /> @@ -255,7 +272,7 @@ :disabled="!canAdd(idx) || clausesDisabled" class="mt-2" variant="flat" - color="secondary" + color="tertiary" size="small" :text="$t('pages.subset.subpages.create.filter.or.text')" @click="addOr" /> @@ -264,33 +281,70 @@ </div> </div> </div> - </v-window-item> - <v-window-item - value="1"> + <div class="mb-5"> + <v-row + v-if="sorts.length > 0"> + <v-col + lg="8" + class="text-center"> + <pre>SORT BY</pre> + </v-col> + </v-row> + <v-row + v-for="(sort, idx) in sorts" + key="idx"> + <v-col + lg="4"> + <v-select + v-model="sort.column_id" + :disabled="clausesDisabled" + item-title="internal_name" + item-value="id" + :rules="[v => !!v || $t('validation.required')]" + required + clearable + variant="underlined" + persistent-hint + :label="$t('pages.subset.subpages.create.filter.column.label')" + :hint="$t('pages.subset.subpages.create.filter.column.hint')" + :items="columns" /> + </v-col> + <v-col + lg="4"> + <v-select + v-model="sort.direction" + :disabled="clausesDisabled" + item-title="title" + item-value="value" + clearable + persistent-hint + :label="$t('pages.subset.subpages.create.order.direction.label')" + :items="sortings" /> + </v-col> + <v-col + lg="1"> + <v-btn + :disabled="clausesDisabled" + class="mt-4" + size="small" + color="error" + variant="flat" + :text="$t('pages.subset.subpages.create.order.remove.text')" + @click="removeSort(idx)" /> + </v-col> + </v-row> + </div> <v-row - v-if="hasUnsupported" - dense> - <v-col> - <v-alert - border="start" - color="warning"> - <span> - {{ $t('pages.subset.subpages.create.expert.warn') }} - </span> - <pre style="white-space:inherit;">{{ unsupported.join(', ') }}</pre> - </v-alert> - </v-col> - </v-row> - <v-row dense> - <v-col> - {{ $t('pages.subset.subpages.create.subtitle') }} - </v-col> - </v-row> - <v-row dense> - <v-col> - <Raw - class="mt-2" - @sql="updateSql" /> + v-if="(sorts.length > 0 || clauses.length > 0) && select.length > 0"> + <v-col + lg="8"> + <v-btn + size="small" + color="tertiary" + variant="flat" + :text="$t('pages.subset.subpages.create.order.text')" + :disabled="clausesDisabled" + @click="addFirstSort" /> </v-col> </v-row> </v-window-item> @@ -305,7 +359,6 @@ import Raw from '@/components/subset/Raw.vue' import Results from '@/components/subset/Results.vue' import { useCacheStore } from '@/stores/cache.js' -import { format } from 'sql-formatter' export default { components: { @@ -325,6 +378,7 @@ export default { table: null, views: [], columns: [], + sorts: [], timestamp: null, executeDifferentTimestamp: false, dataOptions: [ @@ -337,21 +391,24 @@ export default { ], tableDetails: null, resultId: null, - valid: false, errorKeyword: null, query: { - raw: null, - formatted: null + table_id: null, + columns: [], + filter: null }, view: { is_public: true, is_schema_public: true, - name: null, - query: null + name: null }, select: [], clauses: [], tabs: 0, + sortings: [ + { title: 'Ascending ↓', value: 'asc' }, + { title: 'Descening ↑', value: 'desc' }, + ], loadingQuery: false, loadingColumns: false, cacheStore: useCacheStore() @@ -388,14 +445,6 @@ export default { } return this.database.views.map(v => v.internal_name) }, - sql () { - if (!this.query.raw) { - return '' - } - return this.query.raw.replaceAll('\n', ' ') /* remove newline */ - .replaceAll(/\s+/g, ' ') /* remove whitespace */ - .trim() - }, clausesDisabled () { return this.isExecuted }, @@ -411,36 +460,49 @@ export default { isExecuted () { return this.resultId !== null }, - valid () { - if (this.isView) { - return this.valid && !this.hasUnsupported - } - return this.sql.length > 0 && !this.hasUnsupported - }, unsupported () { if (!this.$config.public.database.unsupported) { return [] } return this.$config.public.database.unsupported.split(',') }, - hasUnsupported () { - if (!this.sql) { - return false + subset () { + if (!this.table || !this.select) { + return null } - const unsupported = this.unsupported.map(k => k.toLowerCase()) - for (let i = 0; i < unsupported.length; i++) { - if (this.sql.toLowerCase().includes(unsupported[i])) { - console.warn('query contains unsupported keyword', unsupported[i]) - return true - } + return { + table_id: this.table.id, + columns: this.select.map(column => column.id), + filter: this.clauses ? this.clauses.map(clause => { + if (clause.type === 'or' || clause.type === 'and') { + return { + type: clause.type + } + } + const filtered_column = this.table.columns.filter(column => column.internal_name === clause.params[0]) + const filtered_operator = this.database.container.image.operators.filter(operator => operator.value === clause.params[1]) + if (!filtered_column || filtered_column.length === 0 || !filtered_operator || filtered_operator.length === 0) { + return null + } + const json = { + type: clause.type, + column_id: filtered_column[0].id, + operator_id: filtered_operator[0].id, + value: clause.params[2] + } + return json + }) : null, + order: this.sorts } - return this.sql.includes(';') }, canExecute () { - if (this.isView) { - return this.view.name !== null && this.view.is_public !== null && this.view.query !== null + if (this.subset === null || !this.subset.columns || this.subset.columns.length === 0 || !this.$refs.form.isValid) { + return false } - return this.sql !== null && this.sql !== '' && !this.sql.includes(';') + if (!this.isView) { + return true + } + return this.view.name !== null && this.view.is_public !== null }, inputVariant () { const runtimeConfig = useRuntimeConfig() @@ -452,13 +514,6 @@ export default { } }, watch: { - clauses: { - deep: true, - immediate: true, - handler () { - this.buildQuery() - } - }, table () { this.select = [] if (!this.table) { @@ -469,6 +524,7 @@ export default { }, mounted () { this.selectTable() + this.initViewVisibility() }, methods: { fetchTableColumns (tableId) { @@ -488,6 +544,13 @@ export default { toast.error(this.$t(code)) }) }, + initViewVisibility () { + if (!this.database) { + return + } + this.view.is_public = this.database.is_public + this.view.is_schema_public = this.database.is_schema_public + }, validViewName (name) { if (!name) { return false @@ -499,7 +562,7 @@ export default { if (this.$route.query.tid === undefined) { return } - const tid = parseInt(this.$route.query.tid) + const tid = this.$route.query.tid const selection = this.tables.filter(t => t.id === tid) if (selection.length > 0) { this.table = selection[0] @@ -509,9 +572,9 @@ export default { console.warn('Failed to find table with id', tid) } }, - async execute () { + execute () { if (this.isView) { - await this.createView() + this.createView() return } if (this.timestamp === '') { @@ -520,7 +583,7 @@ export default { /* pre-check */ this.loadingQuery = true const queryService = useQueryService() - queryService.execute(this.$route.params.database_id, { statement: this.sql }, this.timestamp, 0, 1) + queryService.execute(this.$route.params.database_id, this.subset, this.timestamp, 0, 1) .then(async (subset) => { const toast = useToastInstance() toast.success(this.$t('success.subset.create')) @@ -531,6 +594,7 @@ export default { this.loadingQuery = false const toast = useToastInstance() if (typeof code !== 'string') { + toast.error(this.$t('error.query.invalid')) return } toast.error(`${this.$t(code)}: ${message}`) @@ -538,7 +602,7 @@ export default { }, createView () { this.loadingQuery = true - this.view.query = this.sql + this.view.query = this.subset const viewService = useViewService() viewService.create(this.$route.params.database_id, this.view) .then((simpleView) => { @@ -569,39 +633,32 @@ export default { toast.error(this.$t(code)) }) }, - buildQuery () { - if (!this.table) { - return - } - const queryService = useQueryService() - const { error, reason, column, raw, formatted } = queryService.build(this.table.internal_name, this.select, this.columnTypes, this.clauses) - if (error) { - const toast = useToastInstance() - toast.error(this.$t('error.query.' + reason) + ' ' + column) - return - } - this.query.raw = raw - if (this.isView) { - this.view.query = raw - } - this.query.formatted = formatted - }, canAdd (idx) { return idx === this.clauses.length - 1 }, - addFirst () { + addFirstFilter () { const column = (this.columnNames && this.columnNames.length) ? this.columnNames[0] : '' this.clauses.push({ type: 'where', params: [column, '=', ''] }) + this.$refs.form.validate() + }, + addFirstSort () { + if (this.sorts.length === 0) { + this.columns.filter(c => this.table.constraints.primary_key.map(pk => + pk.column.id).includes(c.id)).forEach(pk => this.sorts.push({ column_id: pk.id, direction: 'asc' })) + } else { + this.sorts.push({ column_id: null, direction: null}) + } + this.$refs.form.validate() }, addAnd () { this.clauses.push({ type: 'and' }) - this.addFirst() + this.addFirstFilter() }, addOr () { this.clauses.push({ type: 'or' }) - this.addFirst() + this.addFirstFilter() }, - remove (idx) { + removeFilter (idx) { if (idx === 0) { if (this.clauses.length === 1) { this.clauses.splice(idx, 1) @@ -613,23 +670,17 @@ export default { this.clauses.splice(idx - 1, 2) } }, - updateSql (event) { - const { raw } = event - if (raw) { - this.query.raw = raw - if (this.isView) { - this.view.query = raw - } - this.query.formatted = format(raw, { - language: 'mysql', - keywordCase: 'upper' - }) + removeSort (idx) { + if (idx === 0) { + this.sorts.splice(idx, 1) + } else { + // remove current and previous + this.sorts.splice(idx - 1, 1) } }, toggleColumns () { if (this.select.length !== this.columns.length) { this.select = this.columns - this.buildQuery() } else { this.select = [] } @@ -643,7 +694,7 @@ export default { }, operatorHint (value) { const filter = this.operators.filter(o => o.value === value) - if (filter.length !== 1) { + if (filter.length !== 1 || filter[0].display_name === filter[0].value) { return null } return filter[0].display_name diff --git a/dbrepo-ui/components/subset/Results.vue b/dbrepo-ui/components/subset/Results.vue index 661c7d1a3d6e7502cf349a63cc695cf7d593f427..a4a2565d7004a92fa9b3b6c0eab2907c8a220306 100644 --- a/dbrepo-ui/components/subset/Results.vue +++ b/dbrepo-ui/components/subset/Results.vue @@ -80,7 +80,7 @@ export default { } }, methods: { - reExecute (id) { + reExecute (id, timestamp) { if (id === null) { return } @@ -110,7 +110,7 @@ export default { }) } else if (this.type === 'table') { const tableService = useTableService() - tableService.getData(this.$route.params.database_id, id, (this.options.page - 1), this.options.itemsPerPage, this.timestamp) + tableService.getData(this.$route.params.database_id, id, (this.options.page - 1), this.options.itemsPerPage, timestamp ? timestamp : this.timestamp) .then((result) => { this.mapResults(result) this.id = id @@ -156,7 +156,7 @@ export default { }) } }, - reExecuteCount (id) { + reExecuteCount (id, timestamp) { if (id === null) { return } @@ -181,7 +181,7 @@ export default { }) } else if (this.type === 'table') { const tableService = useTableService() - tableService.getCount(this.$route.params.database_id, id, this.timestamp) + tableService.getCount(this.$route.params.database_id, id, timestamp ? timestamp : this.timestamp) .then((count) => { this.total = count this.loadingCount = false diff --git a/dbrepo-ui/components/subset/SubsetToolbar.vue b/dbrepo-ui/components/subset/SubsetToolbar.vue index e6026090978a3745af50b7e9a3e7a559ae5363a5..070cdb4a3bb66678f81dd8b42b0d5e69ddf25ab6 100644 --- a/dbrepo-ui/components/subset/SubsetToolbar.vue +++ b/dbrepo-ui/components/subset/SubsetToolbar.vue @@ -34,7 +34,7 @@ color="primary" variant="flat" class="mr-2" - :prepend-icon="$vuetify.display.lgAndUp ? 'mdi-content-save-outline' : null" + :prepend-icon="$vuetify.display.lgAndUp ? 'mdi-identifier' : null" :to="`/database/${$route.params.database_id}/subset/${$route.params.subset_id}/persist`"> {{ ($vuetify.display.lgAndUp ? $t('toolbars.subset.pid.xl') + ' ' : '') + $t('toolbars.subset.pid.permanent') }} </v-btn> @@ -110,7 +110,7 @@ export default { identifier () { /* mount pid */ if (this.pid) { - const filter = this.identifiers.filter(i => i.id === Number(this.pid)) + const filter = this.identifiers.filter(i => i.id === this.pid) if (filter.length > 0) { return filter[0] } diff --git a/dbrepo-ui/components/table/BlobUpload.vue b/dbrepo-ui/components/table/BlobUpload.vue index 4973c6b76eabdf4535426a54c35b766aa632a1f7..8ec851d9bf4978d5f5362cbb534695842aee821c 100644 --- a/dbrepo-ui/components/table/BlobUpload.vue +++ b/dbrepo-ui/components/table/BlobUpload.vue @@ -24,8 +24,6 @@ export default { filename: null } }, - computed: { - }, methods: { upload () { if (!this.file || this.file.length === 0) { @@ -34,11 +32,10 @@ export default { console.debug('upload file', this.file) const uploadService = useUploadService() uploadService.create(this.file) - .then((filename) => { - console.debug('uploaded file', filename) - this.filename = filename - this.value = filename - this.$emit('blob', { column: this.column, s3key: filename }) + .then(({s3_key}) => { + this.filename = s3_key + this.value = s3_key + this.$emit('blob', { column: this.column, s3key: s3_key }) }) .catch((error) => { console.error('Failed to upload dataset', error) diff --git a/dbrepo-ui/components/table/TableHistory.vue b/dbrepo-ui/components/table/TableHistory.vue index ccc270c46c22de4933c76a448a9e7db95a2f6a10..c0e2bd7c7aa133fbf4afa64a5d46195f93a8e4fa 100644 --- a/dbrepo-ui/components/table/TableHistory.vue +++ b/dbrepo-ui/components/table/TableHistory.vue @@ -167,8 +167,8 @@ export default { // labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss.SSS')) : [], labels: history ? history.map(d => format(new UTCDate(d.timestamp), 'yyyy-MM-dd HH:mm:ss')) : [], datasets: [ - { backgroundColor: this.$vuetify.theme.current.colors.success, data: this.filterHistoryEventType(history, 'INSERT') }, - { backgroundColor: this.$vuetify.theme.current.colors.error, data: this.filterHistoryEventType(history, 'DELETE') } + { backgroundColor: this.$vuetify.theme.current.colors.success, data: this.filterHistoryEventType(history, 'insert') }, + { backgroundColor: this.$vuetify.theme.current.colors.error, data: this.filterHistoryEventType(history, 'delete') } ] } }) diff --git a/dbrepo-ui/components/table/TableImport.vue b/dbrepo-ui/components/table/TableImport.vue index a4eb63733bb534e83166f76fbf006cf354828291..6bcd1c843a11b1668c1c7d8578a68755222714bf 100644 --- a/dbrepo-ui/components/table/TableImport.vue +++ b/dbrepo-ui/components/table/TableImport.vue @@ -14,8 +14,10 @@ :disabled="disabled" @submit.prevent="submit"> <v-container> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-select v-model="tableImport.separator" :items="separators" @@ -30,8 +32,10 @@ :label="$t('pages.table.subpages.import.separator.label')"/> </v-col> </v-row> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-select v-model="tableImport.header" :items="headers" @@ -45,8 +49,10 @@ :label="$t('pages.table.subpages.import.skip.label')" /> </v-col> </v-row> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-select v-model="tableImport.quote" :items="quotes" @@ -59,8 +65,10 @@ :label="$t('pages.table.subpages.import.quote.label')"/> </v-col> </v-row> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-select v-model="tableImport.line_termination" :items="lineTerminationItems" @@ -117,7 +125,7 @@ v-if="step > 1 && suggestedAnalyseSeparator && providedSeparator !== analysedSeparator" dense> <v-col - md="8"> + lg="8"> <v-alert border="start" color="warning"> @@ -137,7 +145,7 @@ v-if="step > 1 && suggestedAnalyseLineTerminator && providedTerminator !== analysedTerminator" dense> <v-col - md="8"> + lg="8"> <v-alert border="start" color="warning"> @@ -153,7 +161,7 @@ v-if="!hasCompatibleSchema" dense> <v-col - md="8"> + lg="8"> <v-alert border="start" color="warning" @@ -236,7 +244,7 @@ <v-row dense> <v-col - md="8"> + lg="8"> <v-alert border="start" color="success"> @@ -464,11 +472,11 @@ export default { const uploadService = useUploadService() return new Promise((resolve, reject) => { return uploadService.create(this.file) - .then((s3key) => { + .then(({s3_key}) => { const toast = useToastInstance() toast.success(this.$t('success.upload.dataset')) this.loading = false - resolve(s3key) + resolve(s3_key) }) .catch((error) => { console.error('Failed to upload dataset', error) diff --git a/dbrepo-ui/components/table/TableSchema.vue b/dbrepo-ui/components/table/TableSchema.vue index baf04272b40573eb7c9fd8ab96a0f8b2947c82e5..62d88647e4c1ee39a51be16ef2e6f50a6c739e86 100644 --- a/dbrepo-ui/components/table/TableSchema.vue +++ b/dbrepo-ui/components/table/TableSchema.vue @@ -6,7 +6,8 @@ :disabled="disabled"> <v-row v-if="showPrimaryKeyWarning"> - <v-col md="8"> + <v-col + lg="8"> <v-alert border="start" color="warning"> @@ -41,6 +42,7 @@ item-title="display_name" item-value="value" required + :disabled="loadingColumnTypes" :rules="[v => !!v || $t('validation.required')]" persistent-hint :variant="inputVariant" @@ -263,12 +265,12 @@ export default { }, methods: { fetchColumnTypes () { - if (!this.database) { + if (!this.database || this.columnTypes.length > 0) { return } this.loadingColumnTypes = true const imageService = useImageService() - imageService.findById(this.database.container.id) + imageService.findById(this.database.container.image.id) .then((image) => { const types = image.data_types if (this.columns.filter(c => c.type === 'serial').length > 0) { @@ -286,6 +288,9 @@ export default { } toast.error(this.$t(code)) }) + .finally(() => { + this.loadingColumnTypes = false + }) }, shift (column) { if (!this.columns || this.columns.length === 0) { diff --git a/dbrepo-ui/components/table/TableToolbar.vue b/dbrepo-ui/components/table/TableToolbar.vue index e09cd67cba31e8d3aaec7e9055078fa354bd4ded..7311e0afd5775a620f6cddbd2fef005d192fc782 100644 --- a/dbrepo-ui/components/table/TableToolbar.vue +++ b/dbrepo-ui/components/table/TableToolbar.vue @@ -48,7 +48,7 @@ :to="`/database/${$route.params.database_id}/view/create?tid=${$route.params.table_id}`" /> <v-btn v-if="canGetPid" - :prepend-icon="$vuetify.display.mdAndUp ? 'mdi-content-save-outline' : null" + :prepend-icon="$vuetify.display.mdAndUp ? 'mdi-identifier' : null" color="primary" variant="flat" :text="($vuetify.display.mdAndUp ? 'Get ' : '') + 'PID'" diff --git a/dbrepo-ui/components/view/ViewToolbar.vue b/dbrepo-ui/components/view/ViewToolbar.vue index d9e0bfb6bf6740c19aac53f6b3ac8cc374be7011..b5dc0caac551fc7017d2bdca301ac7aad6021ab8 100644 --- a/dbrepo-ui/components/view/ViewToolbar.vue +++ b/dbrepo-ui/components/view/ViewToolbar.vue @@ -19,7 +19,7 @@ <v-btn v-if="canCreatePid" class="mr-2" - :prepend-icon="$vuetify.display.mdAndUp ? 'mdi-content-save-outline' : null" + :prepend-icon="$vuetify.display.mdAndUp ? 'mdi-identifier' : null" variant="flat" color="primary" :text="($vuetify.display.mdAndUp ? $t('toolbars.view.pid.xl') + ' ' : '') + $t('toolbars.view.pid.permanent')" @@ -145,12 +145,12 @@ export default { if (!this.view) { return [] } - return this.view.identifiers.filter(s => s.view_id === Number(this.$route.params.view_id)) + return this.view.identifiers.filter(s => s.view_id === this.$route.params.view_id) }, identifier () { /* mount pid */ if (this.pid) { - const filter = this.identifiers.filter(i => i.id === Number(this.pid)) + const filter = this.identifiers.filter(i => i.id === this.pid) if (filter.length > 0) { const identifier = filter[0] console.debug('identifier set according to route pid', identifier) diff --git a/dbrepo-ui/composables/access-service.ts b/dbrepo-ui/composables/access-service.ts index 056efec1171933d7dcf0921c7eff34717d574333..169d5126b73de093e2f0f8824a397cab3ee09019 100644 --- a/dbrepo-ui/composables/access-service.ts +++ b/dbrepo-ui/composables/access-service.ts @@ -1,7 +1,7 @@ import {axiosErrorToApiError} from '@/utils' export const useAccessService = (): any => { - async function findOne(databaseId: number, userId: string): Promise<DatabaseAccessDto> { + async function findOne(databaseId: string, userId: string): Promise<DatabaseAccessDto> { const axios = useAxiosInstance() console.debug('find access of database with id', databaseId) return new Promise<DatabaseAccessDto>((resolve, reject) => { @@ -17,7 +17,7 @@ export const useAccessService = (): any => { }) } - async function create(databaseId: number, userId: number, payload: DatabaseGiveAccessDto): Promise<DatabaseAccessDto> { + async function create(databaseId: string, userId: string, payload: DatabaseGiveAccessDto): Promise<DatabaseAccessDto> { const axios = useAxiosInstance() console.debug('create access for user with id', userId, 'of database with id', databaseId) return new Promise<DatabaseAccessDto>((resolve, reject) => { @@ -33,7 +33,7 @@ export const useAccessService = (): any => { }) } - async function update(databaseId: number, userId: number, payload: DatabaseModifyAccessDto): Promise<DatabaseAccessDto> { + async function update(databaseId: string, userId: string, payload: DatabaseModifyAccessDto): Promise<DatabaseAccessDto> { const axios = useAxiosInstance() console.debug('update access for user with id', userId, 'of database with id', databaseId) return new Promise<DatabaseAccessDto>((resolve, reject) => { @@ -49,7 +49,7 @@ export const useAccessService = (): any => { }) } - async function remove(databaseId: number, userId: number): Promise<DatabaseAccessDto> { + async function remove(databaseId: string, userId: string): Promise<DatabaseAccessDto> { const axios = useAxiosInstance() console.debug('remove access for user with id', userId, 'of database with id', databaseId) return new Promise<DatabaseAccessDto>((resolve, reject) => { diff --git a/dbrepo-ui/composables/container-service.ts b/dbrepo-ui/composables/container-service.ts index f1280517566165b8f190b9bd05eea3b1d4ac98f1..e21622eab14d884840ff872ca4dd1ecab50aa30e 100644 --- a/dbrepo-ui/composables/container-service.ts +++ b/dbrepo-ui/composables/container-service.ts @@ -17,7 +17,7 @@ export const useContainerService = (): any => { }) } - async function findOne(containerId: number): Promise<ContainerDto> { + async function findOne(containerId: string): Promise<ContainerDto> { const axios = useAxiosInstance(); console.debug('find containers'); return new Promise<ContainerDto>((resolve, reject) => { diff --git a/dbrepo-ui/composables/database-service.ts b/dbrepo-ui/composables/database-service.ts index f318e073054d6a4283b654bbae985b4f903aec00..0609373923d3fd75d06cfb341cc350d99ad50b3f 100644 --- a/dbrepo-ui/composables/database-service.ts +++ b/dbrepo-ui/composables/database-service.ts @@ -17,7 +17,7 @@ export const useDatabaseService = (): any => { }); } - async function refreshTablesMetadata(databaseId: number): Promise<DatabaseDto> { + async function refreshTablesMetadata(databaseId: string): Promise<DatabaseDto> { const axios = useAxiosInstance(); console.debug('refresh database tables metadata'); return new Promise<DatabaseDto>((resolve, reject) => { @@ -33,7 +33,7 @@ export const useDatabaseService = (): any => { }); } - async function refreshViewsMetadata(databaseId: number): Promise<DatabaseDto> { + async function refreshViewsMetadata(databaseId: string): Promise<DatabaseDto> { const axios = useAxiosInstance(); console.debug('refresh database views metadata'); return new Promise<DatabaseDto>((resolve, reject) => { @@ -66,7 +66,7 @@ export const useDatabaseService = (): any => { }); } - async function findOne(id: number, rawError: boolean = false): Promise<DatabaseDto | null> { + async function findOne(id: string, rawError: boolean = false): Promise<DatabaseDto | null> { const axios = useAxiosInstance(); console.debug('find database with id', id); return new Promise((resolve, reject) => { @@ -85,7 +85,7 @@ export const useDatabaseService = (): any => { }); } - async function findPreviewImage(id: number): Promise<string> { + async function findPreviewImage(id: string): Promise<string> { const axios = useAxiosInstance(); console.debug('find database preview image with id', id); return new Promise((resolve, reject) => { @@ -101,7 +101,7 @@ export const useDatabaseService = (): any => { }); } - async function updateVisibility(id: number, payload: DatabaseModifyVisibilityDto): Promise<DatabaseDto | null> { + async function updateVisibility(id: string, payload: DatabaseModifyVisibilityDto): Promise<DatabaseDto | null> { const axios = useAxiosInstance() console.debug('update database visibility for database with id', id); return new Promise((resolve, reject) => { @@ -117,7 +117,7 @@ export const useDatabaseService = (): any => { }); } - async function updateImage(id: number, payload: DatabaseModifyImageDto): Promise<DatabaseDto | null> { + async function updateImage(id: string, payload: DatabaseModifyImageDto): Promise<DatabaseDto | null> { const axios = useAxiosInstance() console.debug('update database image for database with id', id); return new Promise((resolve, reject) => { @@ -133,7 +133,7 @@ export const useDatabaseService = (): any => { }); } - async function updateOwner(id: number, payload: DatabaseTransferDto): Promise<DatabaseDto | null> { + async function updateOwner(id: string, payload: DatabaseTransferDto): Promise<DatabaseDto | null> { const axios = useAxiosInstance() console.debug('update database owner for database with id', id); return new Promise((resolve, reject) => { diff --git a/dbrepo-ui/composables/identifier-service.ts b/dbrepo-ui/composables/identifier-service.ts index 6875a7cb7b2c168ecfb7357cc314219792930bf8..585356994be12526b4e7c83519a3f36db00b388a 100644 --- a/dbrepo-ui/composables/identifier-service.ts +++ b/dbrepo-ui/composables/identifier-service.ts @@ -2,7 +2,7 @@ import type {AxiosError, AxiosRequestConfig} from 'axios' import {axiosErrorToApiError} from '@/utils' export const useIdentifierService = (): any => { - async function findOne(id: number, accept: string): Promise<IdentifierDto> { + async function findOne(id: string, accept: string): Promise<IdentifierDto> { const axios = useAxiosInstance() console.debug('find identifier with id', id) const config: AxiosRequestConfig = { @@ -55,7 +55,7 @@ export const useIdentifierService = (): any => { }) } - async function remove(id: number): Promise<void> { + async function remove(id: string): Promise<void> { const axios = useAxiosInstance() console.debug('delete identifier', id) return new Promise<void>((resolve, reject) => { @@ -71,7 +71,7 @@ export const useIdentifierService = (): any => { }) } - async function publish(id: number): Promise<IdentifierDto> { + async function publish(id: string): Promise<IdentifierDto> { const axios = useAxiosInstance() console.debug('publish identifier', id) return new Promise<IdentifierDto>((resolve, reject) => { diff --git a/dbrepo-ui/composables/image-service.ts b/dbrepo-ui/composables/image-service.ts index 9af0304a1620bfda6aa801da61a7de9cb3cb647d..bcddbc5d7d04009850543d2b21dc843afe406cd8 100644 --- a/dbrepo-ui/composables/image-service.ts +++ b/dbrepo-ui/composables/image-service.ts @@ -1,7 +1,7 @@ import {axiosErrorToApiError} from '@/utils' export const useImageService = (): any => { - async function findById(id: number): Promise<ImageDto> { + async function findById(id: string): Promise<ImageDto> { const axios = useAxiosInstance(); console.debug('find image by id', id); return new Promise<ImageDto>((resolve, reject) => { diff --git a/dbrepo-ui/composables/message-service.ts b/dbrepo-ui/composables/message-service.ts index a170b3ba034e743c43ffea58e4731532ffcebb30..648cb6d388c5a1bfd2192dbedfe7fab14f55cd47 100644 --- a/dbrepo-ui/composables/message-service.ts +++ b/dbrepo-ui/composables/message-service.ts @@ -17,7 +17,7 @@ export const useMessageService = (): any => { }) } - async function findOne(id: number): Promise<BannerMessageDto> { + async function findOne(id: string): Promise<BannerMessageDto> { const axios = useAxiosInstance() console.debug('find message with id', id) return new Promise<BannerMessageDto>((resolve, reject) => { @@ -49,7 +49,7 @@ export const useMessageService = (): any => { }) } - async function update(id: number, data: BannerMessageUpdateDto): Promise<BannerMessageDto> { + async function update(id: string, data: BannerMessageUpdateDto): Promise<BannerMessageDto> { const axios = useAxiosInstance() console.debug('update message with id', id) return new Promise<BannerMessageDto>((resolve, reject) => { @@ -65,7 +65,7 @@ export const useMessageService = (): any => { }) } - async function remove(id: number): Promise<void> { + async function remove(id: string): Promise<void> { const axios = useAxiosInstance() console.debug('delete message with id', id) return new Promise<void>((resolve, reject) => { diff --git a/dbrepo-ui/composables/ontology-service.ts b/dbrepo-ui/composables/ontology-service.ts index da207d6c56d29722b33b67ee802fca55aa1ba6c0..67c6beaf256c7196e6bf6469f849d550c02c9fb4 100644 --- a/dbrepo-ui/composables/ontology-service.ts +++ b/dbrepo-ui/composables/ontology-service.ts @@ -17,7 +17,7 @@ export const useOntologyService = (): any => { }) } - async function findOne(id: number): Promise<OntologyDto> { + async function findOne(id: string): Promise<OntologyDto> { const axios = useAxiosInstance() console.debug('find ontology for id', id) return new Promise<OntologyDto>((resolve, reject) => { @@ -49,7 +49,7 @@ export const useOntologyService = (): any => { }) } - async function update(id: number, data: OntologyModifyDto): Promise<OntologyDto> { + async function update(id: string, data: OntologyModifyDto): Promise<OntologyDto> { const axios = useAxiosInstance() console.debug('update ontology with id', id) return new Promise<OntologyDto>((resolve, reject) => { @@ -65,7 +65,7 @@ export const useOntologyService = (): any => { }) } - async function remove(id: number): Promise<void> { + async function remove(id: string): Promise<void> { const axios = useAxiosInstance() console.debug('delete ontology with id', id) return new Promise<void>((resolve, reject) => { diff --git a/dbrepo-ui/composables/query-service.ts b/dbrepo-ui/composables/query-service.ts index e314993ecd233c486198f7995dff4da5389eb06f..5a86c09d1b1b7017e362a62c0cc5df33c545fd6c 100644 --- a/dbrepo-ui/composables/query-service.ts +++ b/dbrepo-ui/composables/query-service.ts @@ -1,9 +1,8 @@ -import {format} from 'sql-formatter' import type {AxiosRequestConfig} from 'axios' import {axiosErrorToApiError} from '@/utils' export const useQueryService = (): any => { - async function findAll(databaseId: number, persisted: boolean): Promise<QueryDto[]> { + async function findAll(databaseId: string, persisted: boolean): Promise<QueryDto[]> { const axios = useAxiosInstance() console.debug('find queries') return new Promise<QueryDto[]>((resolve, reject) => { @@ -23,7 +22,7 @@ export const useQueryService = (): any => { }) } - async function findOne(databaseId: number, queryId: number): Promise<QueryDto> { + async function findOne(databaseId: string, queryId: string): Promise<QueryDto> { const axios = useAxiosInstance() console.debug('find query with id', queryId, 'in database with id', databaseId) return new Promise<QueryDto>((resolve, reject) => { @@ -39,7 +38,7 @@ export const useQueryService = (): any => { }) } - async function update(databaseId: number, queryId: number, data: QueryPersistDto): Promise<QueryDto> { + async function update(databaseId: string, queryId: string, data: QueryPersistDto): Promise<QueryDto> { const axios = useAxiosInstance() console.debug('update query with id', queryId, 'in database with id', databaseId) return new Promise<QueryDto>((resolve, reject) => { @@ -55,7 +54,7 @@ export const useQueryService = (): any => { }) } - async function exportCsv(databaseId: number, queryId: number): Promise<any> { + async function exportCsv(databaseId: string, queryId: string): Promise<any> { const axios = useAxiosInstance() const config: AxiosRequestConfig = { responseType: 'blob', @@ -77,15 +76,15 @@ export const useQueryService = (): any => { }) } - async function execute(databaseId: number, data: ExecuteStatementDto, timestamp: Date | null, page: number, size: number): Promise<QueryResultDto> { + async function execute(databaseId: string, subset: SubsetDto, timestamp: Date | null, page: number, size: number): Promise<QueryResultDto> { const axios = useAxiosInstance() console.debug('execute query in database with id', databaseId) return new Promise<QueryResultDto>((resolve, reject) => { - axios.post<QueryResultDto>(`/api/database/${databaseId}/subset`, data, {params: mapFilter(timestamp, page, size), timeout: 600_000}) + axios.post<QueryResultDto>(`/api/database/${databaseId}/subset`, subset, {params: mapFilter(timestamp, page, size), timeout: 600_000}) .then((response) => { console.info('Executed query with id', response.data.id, ' in database with id', databaseId) const result: QueryResultDto = { - id: 1, + id: response.headers['x-id'], headers: [], result: response.data } @@ -98,7 +97,7 @@ export const useQueryService = (): any => { }) } - async function reExecuteData(databaseId: number, queryId: number, page: number, size: number): Promise<QueryResultDto> { + async function reExecuteData(databaseId: string, queryId: string, page: number, size: number): Promise<QueryResultDto> { const axios = useAxiosInstance() console.debug('re-execute query in database with id', databaseId) return new Promise<QueryResultDto>((resolve, reject) => { @@ -106,7 +105,7 @@ export const useQueryService = (): any => { .then((response) => { console.info('Re-executed query in database with id', databaseId) const result: QueryResultDto = { - id: Number(response.headers['x-id']), + id: response.headers['x-id'], headers: response.headers['x-headers'] ? response.headers['x-headers'].split(',') : [], result: response.data } @@ -119,7 +118,7 @@ export const useQueryService = (): any => { }) } - async function reExecuteCount(databaseId: number, queryId: number): Promise<number> { + async function reExecuteCount(databaseId: string, queryId: string): Promise<number> { const axios = useAxiosInstance() console.debug('re-execute query in database with id', databaseId) return new Promise<number>((resolve, reject) => { @@ -136,69 +135,6 @@ export const useQueryService = (): any => { }) } - function build(table: TableDto, columns: ColumnDto[], types: DataTypeDto[], clauses: any[]): QueryBuildResultDto { - var sql = 'SELECT' - for (let i = 0; i < columns.length; i++) { - sql += `${i > 0 ? ',' : ''} \`${columns[i].internal_name}\`` - } - sql += ` FROM \`${table}\`` - if (clauses.length > 0) { - sql += ' WHERE' - for (let i = 0; i < clauses.length; i++) { - const clause = clauses[i] - if (clause.type === 'and' || clause.type === 'or') { - sql += ` ${clause.type.toUpperCase()} ` - continue - } - const filteredColumn = columns.filter(c => c.internal_name === clause.params[0]) - if (filteredColumn.length === 0) { - return { - error: true, - reason: 'column.exists', - column: clause.params[0], - raw: null, - formatted: null - } - } - sql += ` \`${clause.params[0]}\` ${clause.params[1]} ` - const filteredType = types.filter(t => t.value === filteredColumn[0].type) - if (filteredType.length === 0) { - return { - error: true, - reason: 'exists', - column: filteredColumn[0].type, - raw: null, - formatted: null - } - } - if (!filteredType[0].is_buildable) { - return { - error: true, - reason: 'build', - column: filteredColumn[0].type, - raw: null, - formatted: null - } - } - if (filteredType[0].is_quoted) { - sql += `'${clause.params[2]}'` - } else { - sql += `${clause.params[2]}` - } - } - } - return { - error: false, - reason: null, - column: null, - raw: sql, - formatted: format(sql, { - language: 'mysql', - keywordCase: 'upper' - }) - } - } - function mapFilter(timestamp: Date | null, page: number, size: number) { if (!timestamp) { return {page, size} @@ -206,5 +142,5 @@ export const useQueryService = (): any => { return {timestamp, page, size} } - return {findAll, findOne, update, exportCsv, execute, reExecuteData, reExecuteCount, build} + return {findAll, findOne, update, exportCsv, execute, reExecuteData, reExecuteCount} } diff --git a/dbrepo-ui/composables/table-service.ts b/dbrepo-ui/composables/table-service.ts index 5f290745245b46a8ce395a489f62aa9171800d5a..45ee0a7b934cb92c2d275b3cb1a23738d4fc0809 100644 --- a/dbrepo-ui/composables/table-service.ts +++ b/dbrepo-ui/composables/table-service.ts @@ -3,7 +3,7 @@ import {axiosErrorToApiError} from '@/utils' export const useTableService = (): any => { - function findAll(databaseId: number): Promise<TableBriefDto> { + function findAll(databaseId: string): Promise<TableBriefDto> { const axios = useAxiosInstance() console.debug('find tables') return new Promise<TableBriefDto>((resolve, reject) => { @@ -19,7 +19,7 @@ export const useTableService = (): any => { }) } - async function findOne(databaseId: number, tableId: number): Promise<TableDto> { + async function findOne(databaseId: string, tableId: string): Promise<TableDto> { const axios = useAxiosInstance() console.debug('find table with id', tableId, 'in database with id', databaseId); return new Promise<TableDto>((resolve, reject) => { @@ -35,7 +35,7 @@ export const useTableService = (): any => { }) } - async function updateSemantics(databaseId: number, tableId: number, columnId: number, data: ColumnSemanticsUpdateDto): Promise<ColumnDto> { + async function updateSemantics(databaseId: string, tableId: string, columnId: string, data: ColumnSemanticsUpdateDto): Promise<ColumnDto> { const axios = useAxiosInstance() console.debug('update column with id', columnId, 'table with id', tableId, 'in database with id', databaseId); return new Promise<ColumnDto>((resolve, reject) => { @@ -51,7 +51,7 @@ export const useTableService = (): any => { }) } - async function update(databaseId: number, tableId: number, data: TableUpdateDto): Promise<TableDto> { + async function update(databaseId: string, tableId: string, data: TableUpdateDto): Promise<TableDto> { const axios = useAxiosInstance() console.debug('update table with id', tableId, 'in database with id', databaseId); return new Promise<TableDto>((resolve, reject) => { @@ -67,7 +67,7 @@ export const useTableService = (): any => { }) } - async function importCsv(databaseId: number, tableId: number, data: ImportCsv): Promise<ImportDto> { + async function importCsv(databaseId: string, tableId: string, data: ImportCsv): Promise<ImportDto> { const axios = useAxiosInstance() console.debug('import csv to table with id', tableId, 'in database with id', databaseId); return new Promise<ImportDto>((resolve, reject) => { @@ -83,7 +83,7 @@ export const useTableService = (): any => { }) } - async function getData(databaseId: number, tableId: number, page: number, size: number, timestamp: Date): Promise<QueryResultDto> { + async function getData(databaseId: string, tableId: string, page: number, size: number, timestamp: Date): Promise<QueryResultDto> { const axios = useAxiosInstance() console.debug('get data for table with id', tableId, 'in database with id', databaseId); return new Promise<QueryResultDto>((resolve, reject) => { @@ -104,7 +104,7 @@ export const useTableService = (): any => { }) } - async function getCount(databaseId: number, tableId: number, timestamp: Date): Promise<number> { + async function getCount(databaseId: string, tableId: string, timestamp: Date): Promise<number> { const axios = useAxiosInstance() console.debug('get data count for table with id', tableId, 'in database with id', databaseId); return new Promise<number>((resolve, reject) => { @@ -121,7 +121,7 @@ export const useTableService = (): any => { }) } - async function exportData(databaseId: number, tableId: number, timestamp: Date): Promise<QueryResultDto> { + async function exportData(databaseId: string, tableId: string, timestamp: Date): Promise<QueryResultDto> { const axios = useAxiosInstance() const config: AxiosRequestConfig = { params: (timestamp && {timestamp}), @@ -144,7 +144,7 @@ export const useTableService = (): any => { }) } - async function create(databaseId: number, data: TableCreateDto): Promise<TableDto> { + async function create(databaseId: string, data: TableCreateDto): Promise<TableDto> { const axios = useAxiosInstance() console.debug('create table in database with id', databaseId, data) return new Promise<TableDto>((resolve, reject) => { @@ -160,7 +160,7 @@ export const useTableService = (): any => { }); } - async function remove(databaseId: number, tableId: number): Promise<void> { + async function remove(databaseId: string, tableId: string): Promise<void> { const axios = useAxiosInstance() console.debug('delete table with id', tableId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { @@ -176,7 +176,7 @@ export const useTableService = (): any => { }); } - async function removeTuple(databaseId: number, tableId: number, data: TableCsvDeleteDto): Promise<void> { + async function removeTuple(databaseId: string, tableId: string, data: TableCsvDeleteDto): Promise<void> { const axios = useAxiosInstance() console.debug('delete tuple(s) in table with id', tableId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { @@ -192,7 +192,7 @@ export const useTableService = (): any => { }); } - async function history(databaseId: number, tableId: number): Promise<TableHistoryDto[]> { + async function history(databaseId: string, tableId: string): Promise<TableHistoryDto[]> { const axios = useAxiosInstance() console.debug('Load history of table with id', tableId, 'in database with id', databaseId) return new Promise<TableHistoryDto[]>((resolve, reject) => { @@ -208,7 +208,7 @@ export const useTableService = (): any => { }); } - async function suggest(databaseId: number, tableId: number, columnId: number): Promise<TableColumnEntityDto[]> { + async function suggest(databaseId: string, tableId: string, columnId: string): Promise<TableColumnEntityDto[]> { const axios = useAxiosInstance() console.debug('suggest semantic entities for table column with id', columnId, 'of table with id', tableId, 'of database with id', databaseId) return new Promise<TableColumnEntityDto[]>((resolve, reject) => { diff --git a/dbrepo-ui/composables/tuple-service.ts b/dbrepo-ui/composables/tuple-service.ts index e54cbe6a0dc71407dc5339de79eace1eee762560..aa8407a2581a9b263cdd052fd30a5eb44f131446 100644 --- a/dbrepo-ui/composables/tuple-service.ts +++ b/dbrepo-ui/composables/tuple-service.ts @@ -1,7 +1,7 @@ import {axiosErrorToApiError} from '@/utils' export const useTupleService = (): any => { - async function create(databaseId: number, tableId: number, data: TableCsvDto): Promise<void> { + async function create(databaseId: string, tableId: string, data: TableCsvDto): Promise<void> { const axios = useAxiosInstance() console.debug('create tuple(s) in table with id', tableId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { @@ -17,7 +17,7 @@ export const useTupleService = (): any => { }) } - async function update(databaseId: number, tableId: number, data: TableCsvDto): Promise<void> { + async function update(databaseId: string, tableId: string, data: TableCsvDto): Promise<void> { const axios = useAxiosInstance() console.debug('update tuple(s) in table with id', tableId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { @@ -33,7 +33,7 @@ export const useTupleService = (): any => { }) } - async function remove(databaseId: number, tableId: number, data: TableCsvDeleteDto): Promise<void> { + async function remove(databaseId: string, tableId: string, data: TableCsvDeleteDto): Promise<void> { const axios = useAxiosInstance() console.debug('delete tuple(s) in table with id', tableId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { diff --git a/dbrepo-ui/composables/upload-service.ts b/dbrepo-ui/composables/upload-service.ts index ee0bdd5dc029a061ee102a9e526933ef7ca26413..689f9dcdbce4b5e7254cfdabe600e701b0ea7f54 100644 --- a/dbrepo-ui/composables/upload-service.ts +++ b/dbrepo-ui/composables/upload-service.ts @@ -1,64 +1,26 @@ -import * as tus from 'tus-js-client' -import {useCacheStore} from '@/stores/cache' +import {axiosErrorToApiError} from '@/utils' export const useUploadService = (): any => { - function create (data: File) { - const config = useRuntimeConfig() - const endpoint = config.public.upload.client - return new Promise<string>((resolve, reject) => { - if (!tus.isSupported) { - console.error('Your browser does not support uploads!') - return - } - const { loggedIn, user, login, logout } = useOidcAuth() - if (!loggedIn || !user.value?.accessToken) { - console.error('Please login to use the upload!') - return - } - const { accessToken } = user.value - const uploadClient: tus.Upload = new tus.Upload(data, { - endpoint, + const axios = useAxiosInstance(); + console.debug('upload file'); + return new Promise<UploadResponseDto>((resolve, reject) => { + const form = new FormData(); + form.append('file', data); + axios.post<UploadResponseDto>('/api/upload', form, { headers: { - 'Authorization': `Bearer ${accessToken}` - }, - retryDelays: [0, 3000, 5000, 10000, 20000], - onError (error) { - console.error('Failed to upload:', error) - reject(error) - }, - onProgress (bytesUploaded, bytesTotal) { - const percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2) - console.debug(bytesUploaded, bytesTotal, percentage + '%') - const cacheStore = useCacheStore() - cacheStore.setUploadProgress(percentage) - }, - onSuccess () { - if (uploadClient.file) { - const file: File = uploadClient.file as File - console.info('Download %s from %s', file.name, uploadClient.url) - } - if (uploadClient.url) { - const matches = uploadClient.url.match(/files\/([a-z0-9]+)/gi) - if (!matches || matches.length !== 1) { - console.error('Failed to match file name', matches) - reject(new Error('Failed to match file name')) - } else { - const filename = matches[0].replace('files/', '') - console.debug('Filename cropped as', filename) - resolve(filename) - } - } - } - }) - uploadClient.findPreviousUploads().then(function (previousUploads) { - /* Found previous uploads so we select the first one */ - if (previousUploads.length) { - uploadClient.resumeFromPreviousUpload(previousUploads[0]) + 'content-type': 'multipart/form-data' } - uploadClient.start() }) - }) + .then((response) => { + console.info(`Uploaded file: ${response.data.s3_key}`); + resolve(response.data); + }) + .catch((error) => { + console.error('Failed to upload file', error); + reject(axiosErrorToApiError(error)); + }); + }); } return { create } diff --git a/dbrepo-ui/composables/view-service.ts b/dbrepo-ui/composables/view-service.ts index 417f5a645e978cc8f93e7fc524df22756c5b093e..9029a553ac782248d33707380f2ed72efcfc8032 100644 --- a/dbrepo-ui/composables/view-service.ts +++ b/dbrepo-ui/composables/view-service.ts @@ -2,7 +2,7 @@ import {axiosErrorToApiError} from '@/utils' import type {AxiosRequestConfig} from "axios"; export const useViewService = (): any => { - async function remove(databaseId: number, viewId: number): Promise<void> { + async function remove(databaseId: string, viewId: string): Promise<void> { const axios = useAxiosInstance() console.debug('delete view with id', viewId, 'in database with id', databaseId) return new Promise<void>((resolve, reject) => { @@ -18,7 +18,7 @@ export const useViewService = (): any => { }) } - async function findOne(databaseId: number, viewId: number): Promise<ViewDto> { + async function findOne(databaseId: string, viewId: string): Promise<ViewDto> { const axios = useAxiosInstance() console.debug('get view with id', viewId, 'in database with id', databaseId) return new Promise<ViewDto>((resolve, reject) => { @@ -34,7 +34,7 @@ export const useViewService = (): any => { }) } - async function create(databaseId: number, payload: ViewCreateDto): Promise<ViewDto> { + async function create(databaseId: string, payload: ViewCreateDto): Promise<ViewDto> { const axios = useAxiosInstance() console.debug('create view in database with id', databaseId) return new Promise<ViewDto>((resolve, reject) => { @@ -50,7 +50,7 @@ export const useViewService = (): any => { }) } - async function update(databaseId: number, viewId: number, payload: ViewUpdateDto): Promise<ViewDto> { + async function update(databaseId: string, viewId: string, payload: ViewUpdateDto): Promise<ViewDto> { const axios = useAxiosInstance() console.debug('update view with id', viewId) return new Promise<ViewDto>((resolve, reject) => { @@ -66,7 +66,7 @@ export const useViewService = (): any => { }) } - async function reExecuteData(databaseId: number, viewId: number, page: number | null, size: number | null): Promise<QueryResultDto> { + async function reExecuteData(databaseId: string, viewId: string, page: number | null, size: number | null): Promise<QueryResultDto> { const axios = useAxiosInstance() console.debug('re-execute view with id', viewId, 'in database with id', databaseId) return new Promise<QueryResultDto>((resolve, reject) => { @@ -87,7 +87,7 @@ export const useViewService = (): any => { }) } - async function reExecuteCount(databaseId: number, viewId: number): Promise<number> { + async function reExecuteCount(databaseId: string, viewId: string): Promise<number> { const axios = useAxiosInstance() console.debug('re-execute view with id', viewId, 'in database with id', databaseId) return new Promise<number>((resolve, reject) => { @@ -104,7 +104,7 @@ export const useViewService = (): any => { }) } - async function exportData(databaseId: number, viewId: number): Promise<QueryResultDto> { + async function exportData(databaseId: string, viewId: string): Promise<QueryResultDto> { const axios = useAxiosInstance() const config: AxiosRequestConfig = { responseType: 'blob', diff --git a/dbrepo-ui/dto/index.ts b/dbrepo-ui/dto/index.ts index 605a7c0db9984525632570c70e76dd542845f225..43c3ca2d19d53997864ffeddb53afe5b2ecb2529 100644 --- a/dbrepo-ui/dto/index.ts +++ b/dbrepo-ui/dto/index.ts @@ -1,5 +1,5 @@ interface DatabaseDto { - id: number; + id: string; name: string; creator: UserDto; owner: UserDto; @@ -20,9 +20,13 @@ interface DatabaseDto { exchange_type: string | null; } +interface UploadResponseDto { + s3_key: string; +} + interface DatabaseCreateDto { name: string; - container_id: number; + container_id: string; is_public: boolean; } @@ -69,7 +73,7 @@ interface ContainerBriefDto { } interface ImageDto { - id: number; + id: string; registry: string; name: string; version: string; @@ -82,15 +86,15 @@ interface ImageDto { } interface OperatorDto { - id: number; - image_id: number; + id: string; + image_id: string; display_name: string; documentation: string; value: string; } interface TableBriefDto { - id: number; + id: string; name: string; description: string; internal_name: string; @@ -107,18 +111,18 @@ interface TableUpdateDto { } interface ColumnBriefDto { - id: number; + id: string; name: string; alias: string; - database_id: number; - table_id: number; + database_id: string; + table_id: string; internal_name: string; column_type: string; } interface TableDto { - id: number; - database_id: number; + id: string; + database_id: string; name: string; identifiers: IdentifierDto[]; creator: UserDto; @@ -170,18 +174,18 @@ interface DataTypesDto { } interface UniqueDto { - uid: number; + uid: string; table: TableBriefDto; columns: ColumnDto[]; } interface IdentifierCreateDto { - database_id: number; + database_id: string; doi: string | null; } interface IdentifierSaveDto { - id: number; + id: string; type: string; doi: string | null; titles: IdentifierSaveTitleDto[] | []; @@ -191,10 +195,10 @@ interface IdentifierSaveDto { publisher: string | null; language: string | null; creators: CreatorSaveDto[] | []; - database_id: number | null; - query_id: number | null; - view_id: number | null; - table_id: number | null; + database_id: string | null; + query_id: string | null; + view_id: string | null; + table_id: string | null; publication_day: number | null; publication_month: number | null; publication_year: number | null; @@ -223,11 +227,11 @@ interface IdentifierFunderSaveDto { } interface IdentifierDto { - id: number; - database_id: number | null; - query_id: number | null; - table_id: number | null; - view_id: number | null; + id: string; + database_id: string; + query_id: string | null; + table_id: string | null; + view_id: string | null; type: IdentifierTypeDto; titles: IdentifierTitleDto[] | []; descriptions: IdentifierDescriptionDto[] | []; @@ -263,11 +267,11 @@ enum IdentifierStatusTypeDto { } interface IdentifierBriefDto { - id: number; - database_id: number | null; - query_id: number | null; - table_id: number | null; - view_id: number | null; + id: string; + database_id: string | null; + query_id: string | null; + table_id: string | null; + view_id: string | null; type: IdentifierTypeDto; creators: CreatorBriefDto[] | []; titles: IdentifierTitleDto[] | []; @@ -280,21 +284,21 @@ interface IdentifierBriefDto { } interface IdentifierTitleDto { - id: number; + id: string; title: string; language: string; type: string; } interface IdentifierDescriptionDto { - id: number; + id: string; description: string; language: string; type: string; } interface IdentifierFunderDto { - id: number; + id: string; funder_name: string; funder_identifier: string; funder_identifier_type: string; @@ -309,7 +313,7 @@ enum NameTypeDto { } interface CreatorDto { - id: number; + id: string; firstname: string; lastname: string; affiliation: string; @@ -324,7 +328,7 @@ interface CreatorDto { } interface CreatorBriefDto { - id: number; + id: string; affiliation: string; creator_name: string; name_type: NameTypeDto | null; @@ -335,7 +339,7 @@ interface CreatorBriefDto { } interface RelatedIdentifierDto { - id: number; + id: string; value: string; type: string; relation: string; @@ -362,7 +366,7 @@ interface RelatedIdentifierSaveDto { } interface ColumnDto { - id: number; + id: string; name: string; alias: string; size: number; @@ -379,8 +383,8 @@ interface ColumnDto { unit: UnitDto; enums: string[]; sets: string[]; - database_id: number; - table_id: number; + database_id: string; + table_id: string; internal_name: string; is_primary_key: boolean; index_length: number; @@ -391,7 +395,7 @@ interface ColumnDto { } interface ConceptDto { - id: number; + id: string; uri: string; name: string; description: string; @@ -400,7 +404,7 @@ interface ConceptDto { } interface UnitDto { - id: number; + id: string; uri: string; name: string; description: string; @@ -437,8 +441,9 @@ interface DatabaseModifyImageDto { interface ViewCreateDto { name: string; - query: string; + query: SubsetDto; is_public: boolean; + is_schema_public: boolean; } interface ViewUpdateDto { @@ -446,14 +451,14 @@ interface ViewUpdateDto { } interface QueryDto { - id: number; + id: string; creator: UserDto; execution: Date; query: string; type: string | null; identifiers: IdentifierDto[]; created: Date; - database_id: number; + database_id: string; query_normalized: string | null; query_hash: string; is_persisted: boolean; @@ -477,10 +482,6 @@ interface TableCsvDeleteDto { keys: Map<string, string>; } -interface ExecuteStatementDto { - statement: string; -} - interface ApiErrorDto { status: string; message: string; @@ -515,8 +516,8 @@ interface KeycloakErrorDto { } interface ViewBriefDto { - id: number; - database_id: number; + id: string; + database_id: string; name: string; identifier: any[]; query: string; @@ -530,8 +531,8 @@ interface ViewBriefDto { } interface ViewDto { - id: number; - database_id: number; + id: string; + database_id: string; name: string; identifiers: IdentifierDto[]; query: string; @@ -545,14 +546,14 @@ interface ViewDto { } interface ImageBriefDto { - id: number; + id: string; name: string; version: string; jdbc_method: string; } interface ImageDto { - id: number; + id: string; registry: string; name: string; version: string; @@ -599,8 +600,27 @@ interface ImportCsv { line_termination: string; } +interface FilterDto { + type: string; + value: string; + column_id: string; + operator_id: string; +} + +interface OrderDto { + column_id: string; + direction: string; +} + +interface SubsetDto { + table_id: string; + columns: string[]; + filter: FilterDto[] | null; + order: OrderDto[] | null; +} + interface QueryResultDto { - id: number | null; + id: string | null; result: any; headers: string[]; } @@ -660,7 +680,7 @@ interface ForeignKeyCreateDto { } interface OntologyDto { - id: number; + id: string; uri: string; prefix: string; sparql: boolean; @@ -686,7 +706,7 @@ interface OntologyCreateDto { } interface UnitDto { - id: number; + id: string; uri: string; name: string; description: string; @@ -695,7 +715,7 @@ interface UnitDto { } interface ConceptDto { - id: number; + id: string; uri: string; name: string; description: string; @@ -704,9 +724,9 @@ interface ConceptDto { } interface TableColumnEntityDto { - database_id: number; - table_id: number; - column_id: number; + database_id: string; + table_id: string; + column_id: string; uri: string; label: string; description: string; @@ -739,7 +759,7 @@ interface BannerMessageUpdateDto { } interface BannerMessageDto { - id: number; + id: string; type: string; message: string; link: string; diff --git a/dbrepo-ui/dto/jwt.ts b/dbrepo-ui/dto/jwt.ts deleted file mode 100644 index a47085114e3c80c229e80b43fb27adc94fd9d3d3..0000000000000000000000000000000000000000 --- a/dbrepo-ui/dto/jwt.ts +++ /dev/null @@ -1,20 +0,0 @@ -interface Token { - exp: number; - iat: number; - jti: string; - iss: string; - aud: string; - sub: string; - typ: string; - azp: string; - session_state: string; - realm_access: RealmAccess; - scope: string; - sid: string; - uid: string; - preferred_username: string; -} - -interface RealmAccess { - roles: string[]; -} diff --git a/dbrepo-ui/layouts/default.vue b/dbrepo-ui/layouts/default.vue index 85be5cd6b0bee36a78e451a33abace288bef7219..7267242288c5eadaf184fdb1afe4e485a03f78dc 100644 --- a/dbrepo-ui/layouts/default.vue +++ b/dbrepo-ui/layouts/default.vue @@ -313,14 +313,14 @@ export default { return } if (this.identifier) { - if (newObj.query_id && this.identifier.query_id !== Number(newObj.query_id)) { + if (newObj.query_id && this.identifier.query_id !== newObj.query_id) { this.cacheStore.setIdentifier(null) - } else if (newObj.table_id && this.identifier.table_id !== Number(newObj.table_id)) { + } else if (newObj.table_id && this.identifier.table_id !== newObj.table_id) { this.cacheStore.setIdentifier(null) - } else if (newObj.view_id && this.identifier.view_id !== Number(newObj.view_id)) { + } else if (newObj.view_id && this.identifier.view_id !== newObj.view_id) { this.cacheStore.setIdentifier(null) } - if (this.$route.query.pid && this.identifier.id !== Number(this.$route.query.pid)) { + if (this.$route.query.pid && this.identifier.id !== this.$route.query.pid) { this.cacheStore.setIdentifier(null) } } diff --git a/dbrepo-ui/locales/en-US.json b/dbrepo-ui/locales/en-US.json index d17da2341db70b270a9cf780773ea7900afa4c03..55a9692c2d4650d2fb3970322aafe026e2da8d10 100644 --- a/dbrepo-ui/locales/en-US.json +++ b/dbrepo-ui/locales/en-US.json @@ -541,7 +541,7 @@ } }, "semantics": { - "title": "Assign semantic instance for table column", + "title": "Assign semantic {type} for table column", "subtitle": "Semantic instances help machines to get the proper context of your dataset", "recommended": "Recommended semantic instances", "bullet": "●", @@ -1015,6 +1015,15 @@ "or": { "text": "Add \"OR\" Filter" } + }, + "order": { + "text": "Add Sorting", + "direction": { + "label": "Direction" + }, + "remove": { + "text": "Remove" + } } } } @@ -1270,7 +1279,8 @@ "view": { "create": "Failed to create view", "missing": "Failed to find view in metadata database", - "invalid": "Failed to map view query to columns in data service" + "invalid": "Failed to map view query to columns in data service", + "exists": "View with this name exists already" }, "broker": { "connection": "Failed to contact broker service", @@ -1305,8 +1315,9 @@ "revoked": "Revoked {access} access successfully" }, "data": { - "add": "Successfully added data entry", - "update": "Successfully updated data entry" + "add": "Successfully added data tuple", + "update": "Successfully updated data tuple", + "deleted": "Successfully deleted {total} data tuple(s)" }, "table": { "created": "Created table {table} successfully", diff --git a/dbrepo-ui/nuxt.config.ts b/dbrepo-ui/nuxt.config.ts index b3da7bd98c657513e85c64cd51fac4c118d433b7..4d9b769904dec4c1291df21d7c2eb3235218407d 100644 --- a/dbrepo-ui/nuxt.config.ts +++ b/dbrepo-ui/nuxt.config.ts @@ -85,12 +85,7 @@ export default defineNuxtConfig({ client: 'http://localhost', server: 'http://gateway-service', }, - upload: { - client: 'http://localhost/api/upload/files', - prefix: '/' - }, database: { - unsupported: 'AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--', image: { width: 200, height: 200 diff --git a/dbrepo-ui/package-lock.json b/dbrepo-ui/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..52dbae9ae9248f8c70c251817a101b95ecf42ed9 --- /dev/null +++ b/dbrepo-ui/package-lock.json @@ -0,0 +1,12446 @@ +{ + "name": "dbrepo-ui", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dbrepo-ui", + "hasInstallScript": true, + "dependencies": { + "@artmizu/nuxt-prometheus": "^2.4.0", + "@date-fns/utc": "^2.1.0", + "@fontsource/open-sans": "^5.0.24", + "@mdi/font": "^7.4.47", + "@nuxtjs/robots": "^3.0.0", + "@nuxtjs/sitemap": "^5.2.0", + "@pinia/nuxt": "^0.5.1", + "ace-builds": "^1.32.6", + "axios": "^1.6.7", + "buffer": "^6.0.3", + "chart.js": "^4.4.1", + "date-fns": "^3.3.1", + "http-status-codes": "^2.3.0", + "jwt-decode": "^4.0.0", + "merkle-json": "^2.6.0", + "moment": "^2.30.1", + "nuxt": "^3.10.3", + "nuxt-oidc-auth": "^1.0.0-beta.5", + "parse-md": "^3.0.3", + "pinia": "^2.1.7", + "qs": "^6.11.2", + "sql-formatter": "^15.2.0", + "tus-js-client": "^4.0.1", + "vue": "^3.4.21", + "vue-axios": "^3.5.2", + "vue-chartjs": "^5.3.0", + "vue-meta": "^2.4.0", + "vue-toast-notification": "^3.1.2", + "vue3-ace-editor": "^2.2.4", + "vuetify": "^3.7.2" + }, + "devDependencies": { + "@nuxtjs/i18n": "^8.1.1", + "@pinia-plugin-persistedstate/nuxt": "^1.2.0", + "@types/qs": "^6.9.12", + "sass": "^1.71.0", + "vite-plugin-vuetify": "^2.0.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@antfu/install-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.0.0.tgz", + "integrity": "sha512-xvX6P/lo1B3ej0OsaErAjqgFYzYVcJpamjLAFLYh9vRJngBrMoUG7aVnrGTeqM7yxbyTD5p3F2+0/QUEh8Vzhw==", + "dependencies": { + "package-manager-detector": "^0.2.8", + "tinyexec": "^0.3.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@antfu/utils": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.10.tgz", + "integrity": "sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@artmizu/nuxt-prometheus": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@artmizu/nuxt-prometheus/-/nuxt-prometheus-2.4.0.tgz", + "integrity": "sha512-scLoSmOXN2SAGOkO/eFFN1MvfLUcj/FLN7cXCda5xQnHfHTKL3ac2BHgeyv4ylleirnOwYfWzco/KQXx2WixHQ==", + "dependencies": { + "@mswjs/interceptors": "^0.28.4", + "@nuxt/kit": "^3.11.2", + "consola": "^3.2.3", + "defu": "^6.1.2", + "h3": "^1.7.1", + "prom-client": "^14.2.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", + "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.9", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.9", + "@babel/parser": "^7.26.9", + "@babel/template": "^7.26.9", + "@babel/traverse": "^7.26.9", + "@babel/types": "^7.26.9", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", + "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", + "dependencies": { + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "dependencies": { + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.26.9.tgz", + "integrity": "sha512-ubbUqCofvxPRurw5L8WTsCLSkQiVpov4Qx0WMA+jUN+nXBK8ADPlJO1grkFw5CWKC5+sZSOfuGMdX1aI1iT9Sg==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.26.9", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.26.5.tgz", + "integrity": "sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", + "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", + "dependencies": { + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", + "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "dependencies": { + "@babel/types": "^7.26.9" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-proposal-decorators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.25.9.tgz", + "integrity": "sha512-smkNLL/O1ezy9Nhy4CNosc4Va+1wo5w4gzSZeLe6y6dM4mmHfYOCPolXQPHQxonZCF+ZyebxN9vqOolkYrSn5g==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-syntax-decorators": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-decorators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.25.9.tgz", + "integrity": "sha512-ryzI0McXUPJnRCvMo4lumIKZUzhYUO/ScI+Mz4YVaTLt04DHNSjEUjKVvbzQjZFLuod/cYEc07mJWhzl6v4DPg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.26.8.tgz", + "integrity": "sha512-bME5J9AC8ChwA7aEPJ6zym3w7aObZULHhbNLU0bKUhKsAkylkzUdq+0kdymh9rzi8nlNFl2bmldFBCKNJBUpuw==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-syntax-typescript": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/standalone": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.26.9.tgz", + "integrity": "sha512-UTeQKy0kzJwWRe55kT1uK4G9H6D0lS6G4207hCU/bDaOhA5t2aC0qHN6GmID0Axv3OFLNXm27NdqcWp+BXcGtA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", + "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.9", + "@babel/parser": "^7.26.9", + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.9", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", + "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.4.tgz", + "integrity": "sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==", + "dependencies": { + "mime": "^3.0.0" + }, + "engines": { + "node": ">=16.13" + } + }, + "node_modules/@cloudflare/kv-asset-handler/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@date-fns/utc": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@date-fns/utc/-/utc-2.1.0.tgz", + "integrity": "sha512-176grgAgU2U303rD2/vcOmNg0kGPbhzckuH1TEP2al7n0AQipZIy9P15usd2TKQCG1g+E1jX/ZVQSzs4sUDwgA==" + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", + "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", + "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", + "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", + "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", + "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", + "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", + "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", + "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", + "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", + "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", + "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", + "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", + "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", + "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", + "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", + "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", + "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", + "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", + "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", + "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", + "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", + "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", + "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", + "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", + "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@fontsource/open-sans": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.1.1.tgz", + "integrity": "sha512-Wfio5om0XH24ZUu6FfW4r50e4xLdoLzvd8midtqUFT2unniyWQj6GJ05RW1YQsHp4Sug3i+agFBIxEmYQzUHSg==" + }, + "node_modules/@iconify-json/carbon": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@iconify-json/carbon/-/carbon-1.2.7.tgz", + "integrity": "sha512-nqEjicnNdb3CnY21MsTr9DfU8JBkP9C8hup1bCe4zvpLKjcU9YRmYChUbqZYBP4P+BL5NdrprTSN+B7qJg3H3Q==", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify-json/logos": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@iconify-json/logos/-/logos-1.2.4.tgz", + "integrity": "sha512-XC4If5D/hbaZvUkTV8iaZuGlQCyG6CNOlaAaJaGa13V5QMYwYjgtKk3vPP8wz3wtTVNVEVk3LRx1fOJz+YnSMw==", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify-json/ri": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@iconify-json/ri/-/ri-1.2.5.tgz", + "integrity": "sha512-kWGimOXMZrlYusjBKKXYOWcKhbOHusFsmrmRGmjS7rH0BpML5A9/fy8KHZqFOwZfC4M6amObQYbh8BqO5cMC3w==", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify-json/tabler": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@iconify-json/tabler/-/tabler-1.2.16.tgz", + "integrity": "sha512-gjvKz38+aOxfZtRvycYrASYipCsHRbCZ/Df49T0tfPntT0ur+qsgJ7PxCM4JF/Xs6+n3JkaFdiUz/N4ZZxDKdQ==", + "dependencies": { + "@iconify/types": "*" + } + }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==" + }, + "node_modules/@iconify/utils": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.3.0.tgz", + "integrity": "sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==", + "dependencies": { + "@antfu/install-pkg": "^1.0.0", + "@antfu/utils": "^8.1.0", + "@iconify/types": "^2.0.0", + "debug": "^4.4.0", + "globals": "^15.14.0", + "kolorist": "^1.8.0", + "local-pkg": "^1.0.0", + "mlly": "^1.7.4" + } + }, + "node_modules/@iconify/utils/node_modules/@antfu/utils": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-8.1.1.tgz", + "integrity": "sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@iconify/utils/node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@iconify/utils/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@intlify/bundle-utils": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-7.5.1.tgz", + "integrity": "sha512-UovJl10oBIlmYEcWw+VIHdKY5Uv5sdPG0b/b6bOYxGLln3UwB75+2dlc0F3Fsa0RhoznQ5Rp589/BZpABpE4Xw==", + "dev": true, + "dependencies": { + "@intlify/message-compiler": "^9.4.0", + "@intlify/shared": "^9.4.0", + "acorn": "^8.8.2", + "escodegen": "^2.1.0", + "estree-walker": "^2.0.2", + "jsonc-eslint-parser": "^2.3.0", + "magic-string": "^0.30.0", + "mlly": "^1.2.0", + "source-map-js": "^1.0.1", + "yaml-eslint-parser": "^1.2.2" + }, + "engines": { + "node": ">= 14.16" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + } + } + }, + "node_modules/@intlify/bundle-utils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/@intlify/core": { + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/@intlify/core/-/core-9.14.2.tgz", + "integrity": "sha512-/YsYOtRdKn2RbIz9FjYdb4ZntcB7hJmlfHjMRrRXOH2rJE9T5kdYCTS+LS75xQkRCeHFdAmjGMADuoy4HYpHfA==", + "dev": true, + "dependencies": { + "@intlify/core-base": "9.14.2", + "@intlify/shared": "9.14.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/core-base": { + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.14.2.tgz", + "integrity": "sha512-DZyQ4Hk22sC81MP4qiCDuU+LdaYW91A6lCjq8AWPvY3+mGMzhGDfOCzvyR6YBQxtlPjFqMoFk9ylnNYRAQwXtQ==", + "dev": true, + "dependencies": { + "@intlify/message-compiler": "9.14.2", + "@intlify/shared": "9.14.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/h3": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@intlify/h3/-/h3-0.5.0.tgz", + "integrity": "sha512-cgfrtD3qu3BPJ47gfZ35J2LJpI64Riic0K8NGgid5ilyPXRQTNY7mXlT/B+HZYQg1hmBxKa5G5HJXyAZ4R2H5A==", + "dev": true, + "dependencies": { + "@intlify/core": "^9.8.0", + "@intlify/utils": "^0.12.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.14.2.tgz", + "integrity": "sha512-YsKKuV4Qv4wrLNsvgWbTf0E40uRv+Qiw1BeLQ0LAxifQuhiMe+hfTIzOMdWj/ZpnTDj4RSZtkXjJM7JDiiB5LQ==", + "dev": true, + "dependencies": { + "@intlify/shared": "9.14.2", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.14.2.tgz", + "integrity": "sha512-uRAHAxYPeF+G5DBIboKpPgC/Waecd4Jz8ihtkpJQD5ycb5PwXp0k/+hBGl5dAjwF7w+l74kz/PKA8r8OK//RUw==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/unplugin-vue-i18n": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@intlify/unplugin-vue-i18n/-/unplugin-vue-i18n-3.0.1.tgz", + "integrity": "sha512-q1zJhA/WpoLBzAAuKA5/AEp0e+bMOM10ll/HxT4g1VAw/9JhC4TTobP9KobKH90JMZ4U2daLFlYQfKNd29lpqw==", + "dev": true, + "dependencies": { + "@intlify/bundle-utils": "^7.4.0", + "@intlify/shared": "^9.4.0", + "@rollup/pluginutils": "^5.1.0", + "@vue/compiler-sfc": "^3.2.47", + "debug": "^4.3.3", + "fast-glob": "^3.2.12", + "js-yaml": "^4.1.0", + "json5": "^2.2.3", + "pathe": "^1.0.0", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2", + "unplugin": "^1.1.0" + }, + "engines": { + "node": ">= 14.16" + }, + "peerDependencies": { + "petite-vue-i18n": "*", + "vue-i18n": "*", + "vue-i18n-bridge": "*" + }, + "peerDependenciesMeta": { + "petite-vue-i18n": { + "optional": true + }, + "vue-i18n": { + "optional": true + }, + "vue-i18n-bridge": { + "optional": true + } + } + }, + "node_modules/@intlify/unplugin-vue-i18n/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/@intlify/utils": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@intlify/utils/-/utils-0.12.0.tgz", + "integrity": "sha512-yCBNcuZQ49iInqmWC2xfW0rgEQyNtCM8C8KcWKTXxyscgUE1+48gjLgZZqP75MjhlApxwph7ZMWLqyABkSgxQA==", + "dev": true, + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@ioredis/commands": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", + "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@isaacs/fs-minipass/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@kurkle/color": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==" + }, + "node_modules/@kwsites/file-exists": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "dependencies": { + "debug": "^4.1.1" + } + }, + "node_modules/@kwsites/promise-deferred": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", + "integrity": "sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==", + "dependencies": { + "consola": "^3.2.3", + "detect-libc": "^2.0.0", + "https-proxy-agent": "^7.0.5", + "node-fetch": "^2.6.7", + "nopt": "^8.0.0", + "semver": "^7.5.3", + "tar": "^7.4.0" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/minizlib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz", + "integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "engines": { + "node": ">=18" + } + }, + "node_modules/@mdi/font": { + "version": "7.4.47", + "resolved": "https://registry.npmjs.org/@mdi/font/-/font-7.4.47.tgz", + "integrity": "sha512-43MtGpd585SNzHZPcYowu/84Vz2a2g31TvPMTm9uTiCSWzaheQySUcSyUH/46fPnuPQWof2yd0pGBtzee/IQWw==" + }, + "node_modules/@miyaneee/rollup-plugin-json5": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@miyaneee/rollup-plugin-json5/-/rollup-plugin-json5-1.2.0.tgz", + "integrity": "sha512-JjTIaXZp9WzhUHpElrqPnl1AzBi/rvRs065F71+aTmlqvTMVkdbjZ8vfFl4nRlgJy+TPBw69ZK4pwFdmOAt4aA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.1.0", + "json5": "^2.2.3" + }, + "peerDependencies": { + "rollup": "^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" + } + }, + "node_modules/@mswjs/interceptors": { + "version": "0.28.4", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.28.4.tgz", + "integrity": "sha512-xQpXZswUUG+V+7bD/L2hZUC5mvxW1BPba2yI5yhRq+IpEXFPEGYzUuJUuvJBELyG7RLCxgrOjmqzeE5hgqa0aQ==", + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.2.1", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@netlify/functions": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/@netlify/functions/-/functions-2.8.2.tgz", + "integrity": "sha512-DeoAQh8LuNPvBE4qsKlezjKj0PyXDryOFJfJKo3Z1qZLKzQ21sT314KQKPVjfvw6knqijj+IO+0kHXy/TJiqNA==", + "dependencies": { + "@netlify/serverless-functions-api": "1.26.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@netlify/node-cookies": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@netlify/node-cookies/-/node-cookies-0.1.0.tgz", + "integrity": "sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==", + "engines": { + "node": "^14.16.0 || >=16.0.0" + } + }, + "node_modules/@netlify/serverless-functions-api": { + "version": "1.26.1", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.26.1.tgz", + "integrity": "sha512-q3L9i3HoNfz0SGpTIS4zTcKBbRkxzCRpd169eyiTuk3IwcPC3/85mzLHranlKo2b+HYT0gu37YxGB45aD8A3Tw==", + "dependencies": { + "@netlify/node-cookies": "^0.1.0", + "urlpattern-polyfill": "8.0.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nuxt/cli": { + "version": "3.22.2", + "resolved": "https://registry.npmjs.org/@nuxt/cli/-/cli-3.22.2.tgz", + "integrity": "sha512-Xtu3Loe3fVLvOE1/NC/SrE6Buu7Aj6qrnu3hewAfamUyZ7mVUBOsJ5ScUhofSK2L6muGPvS3R1PisuJMFbdexg==", + "dependencies": { + "c12": "^2.0.2", + "chokidar": "^4.0.3", + "citty": "^0.1.6", + "clipboardy": "^4.0.0", + "consola": "^3.4.0", + "defu": "^6.1.4", + "fuse.js": "^7.1.0", + "giget": "^1.2.4", + "h3": "^1.15.0", + "httpxy": "^0.1.7", + "jiti": "^2.4.2", + "listhen": "^1.9.0", + "nypm": "^0.5.2", + "ofetch": "^1.4.1", + "ohash": "^2.0.2", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.3.1", + "scule": "^1.3.0", + "semver": "^7.7.1", + "std-env": "^3.8.0", + "tinyexec": "^0.3.2", + "ufo": "^1.5.4" + }, + "bin": { + "nuxi": "bin/nuxi.mjs", + "nuxi-ng": "bin/nuxi.mjs", + "nuxt": "bin/nuxi.mjs", + "nuxt-cli": "bin/nuxi.mjs" + }, + "engines": { + "node": "^16.10.0 || >=18.0.0" + } + }, + "node_modules/@nuxt/cli/node_modules/ohash": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.4.tgz", + "integrity": "sha512-ac+SFwzhdHb0hp48/dbR7Jta39qfbuj7t3hApd9uyHS8bisHTfVzSEvjOVgV0L3zG7VR2/7JjkSGimP75D+hOQ==" + }, + "node_modules/@nuxt/devalue": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nuxt/devalue/-/devalue-2.0.2.tgz", + "integrity": "sha512-GBzP8zOc7CGWyFQS6dv1lQz8VVpz5C2yRszbXufwG/9zhStTIH50EtD87NmWbTMwXDvZLNg8GIpb1UFdH93JCA==" + }, + "node_modules/@nuxt/devtools": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nuxt/devtools/-/devtools-1.7.0.tgz", + "integrity": "sha512-uvnjt5Zowkz7tZmnks2cGreg1XZIiSyVzQ2MYiRXACodlXcwJ0dpUS3WTxu8BR562K+772oRdvKie9AQlyZUgg==", + "dependencies": { + "@antfu/utils": "^0.7.10", + "@nuxt/devtools-kit": "1.7.0", + "@nuxt/devtools-wizard": "1.7.0", + "@nuxt/kit": "^3.15.0", + "@vue/devtools-core": "7.6.8", + "@vue/devtools-kit": "7.6.8", + "birpc": "^0.2.19", + "consola": "^3.3.1", + "cronstrue": "^2.52.0", + "destr": "^2.0.3", + "error-stack-parser-es": "^0.1.5", + "execa": "^7.2.0", + "fast-npm-meta": "^0.2.2", + "flatted": "^3.3.2", + "get-port-please": "^3.1.2", + "hookable": "^5.5.3", + "image-meta": "^0.2.1", + "is-installed-globally": "^1.0.0", + "launch-editor": "^2.9.1", + "local-pkg": "^0.5.1", + "magicast": "^0.3.5", + "nypm": "^0.4.1", + "ohash": "^1.1.4", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.2.1", + "rc9": "^2.1.2", + "scule": "^1.3.0", + "semver": "^7.6.3", + "simple-git": "^3.27.0", + "sirv": "^3.0.0", + "tinyglobby": "^0.2.10", + "unimport": "^3.14.5", + "vite-plugin-inspect": "~0.8.9", + "vite-plugin-vue-inspector": "^5.3.1", + "which": "^3.0.1", + "ws": "^8.18.0" + }, + "bin": { + "devtools": "cli.mjs" + }, + "peerDependencies": { + "vite": "*" + } + }, + "node_modules/@nuxt/devtools-kit": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nuxt/devtools-kit/-/devtools-kit-1.7.0.tgz", + "integrity": "sha512-+NgZ2uP5BuneqvQbe7EdOEaFEDy8762c99pLABtn7/Ur0ExEsQJMP7pYjjoTfKubhBqecr5Vo9yHkPBj1eHulQ==", + "dependencies": { + "@nuxt/kit": "^3.15.0", + "@nuxt/schema": "^3.15.0", + "execa": "^7.2.0" + }, + "peerDependencies": { + "vite": "*" + } + }, + "node_modules/@nuxt/devtools-ui-kit": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nuxt/devtools-ui-kit/-/devtools-ui-kit-1.7.0.tgz", + "integrity": "sha512-pYjwCP3FHz/rrEoJpb8plMinnPHRh+fFc90O+MncMC0aIGydtu4SGwAE3fZsg//JXqkvlY+JyozxqtF9IRA7rA==", + "dependencies": { + "@iconify-json/carbon": "^1.2.5", + "@iconify-json/logos": "^1.2.4", + "@iconify-json/ri": "^1.2.5", + "@iconify-json/tabler": "^1.2.13", + "@nuxt/devtools-kit": "1.7.0", + "@nuxt/kit": "^3.15.0", + "@unocss/core": "^0.65.3", + "@unocss/nuxt": "^0.65.3", + "@unocss/preset-attributify": "^0.65.3", + "@unocss/preset-icons": "^0.65.3", + "@unocss/preset-mini": "^0.65.3", + "@unocss/reset": "^0.65.3", + "@vueuse/core": "^12.2.0", + "@vueuse/integrations": "^12.2.0", + "@vueuse/nuxt": "^12.2.0", + "defu": "^6.1.4", + "focus-trap": "^7.6.2", + "splitpanes": "^3.1.5", + "unocss": "^0.65.3", + "v-lazy-show": "^0.3.0" + }, + "peerDependencies": { + "@nuxt/devtools": "1.7.0" + } + }, + "node_modules/@nuxt/devtools-wizard": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@nuxt/devtools-wizard/-/devtools-wizard-1.7.0.tgz", + "integrity": "sha512-86Gd92uEw0Dh2ErIYT9TMIrMOISE96fCRN4rxeryTvyiowQOsyrbkCeMNYrEehoRL+lohoyK6iDmFajadPNwWQ==", + "dependencies": { + "consola": "^3.3.1", + "diff": "^7.0.0", + "execa": "^7.2.0", + "global-directory": "^4.0.1", + "magicast": "^0.3.5", + "pathe": "^1.1.2", + "pkg-types": "^1.2.1", + "prompts": "^2.4.2", + "rc9": "^2.1.2", + "semver": "^7.6.3" + }, + "bin": { + "devtools-wizard": "cli.mjs" + } + }, + "node_modules/@nuxt/devtools-wizard/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/@nuxt/devtools/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==" + }, + "node_modules/@nuxt/devtools/node_modules/nypm": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.4.1.tgz", + "integrity": "sha512-1b9mihliBh8UCcKtcGRu//G50iHpjxIQVUqkdhPT/SDVE7KdJKoHXLS0heuYTQCx95dFqiyUbXZB9r8ikn+93g==", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "pathe": "^1.1.2", + "pkg-types": "^1.2.1", + "tinyexec": "^0.3.1", + "ufo": "^1.5.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/@nuxt/devtools/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/@nuxt/devtools/node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@nuxt/devtools/node_modules/strip-literal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz", + "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@nuxt/devtools/node_modules/unimport": { + "version": "3.14.6", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.14.6.tgz", + "integrity": "sha512-CYvbDaTT04Rh8bmD8jz3WPmHYZRG/NnvYVzwD6V1YAlvvKROlAeNDUBhkBGzNav2RKaeuXvlWYaa1V4Lfi/O0g==", + "dependencies": { + "@rollup/pluginutils": "^5.1.4", + "acorn": "^8.14.0", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "fast-glob": "^3.3.3", + "local-pkg": "^1.0.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "pathe": "^2.0.1", + "picomatch": "^4.0.2", + "pkg-types": "^1.3.0", + "scule": "^1.3.0", + "strip-literal": "^2.1.1", + "unplugin": "^1.16.1" + } + }, + "node_modules/@nuxt/devtools/node_modules/unimport/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@nuxt/devtools/node_modules/unimport/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" + }, + "node_modules/@nuxt/devtools/node_modules/which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@nuxt/kit": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/@nuxt/kit/-/kit-3.15.4.tgz", + "integrity": "sha512-dr7I7eZOoRLl4uxdxeL2dQsH0OrbEiVPIyBHnBpA4co24CBnoJoF+JINuP9l3PAM3IhUzc5JIVq3/YY3lEc3Hw==", + "dependencies": { + "c12": "^2.0.1", + "consola": "^3.4.0", + "defu": "^6.1.4", + "destr": "^2.0.3", + "globby": "^14.0.2", + "ignore": "^7.0.3", + "jiti": "^2.4.2", + "klona": "^2.0.6", + "knitwork": "^1.2.0", + "mlly": "^1.7.4", + "ohash": "^1.1.4", + "pathe": "^2.0.2", + "pkg-types": "^1.3.1", + "scule": "^1.3.0", + "semver": "^7.6.3", + "std-env": "^3.8.0", + "ufo": "^1.5.4", + "unctx": "^2.4.1", + "unimport": "^4.0.0", + "untyped": "^1.5.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxt/schema": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/@nuxt/schema/-/schema-3.15.4.tgz", + "integrity": "sha512-pAYZb/3ocSC/db1EFd5y+otmgHqUkvfxfhd9EknDB5DygnJuOIQNuGJ7LMJM6S2c0DYgBIHOdEelLxKHOjwbgQ==", + "dependencies": { + "consola": "^3.4.0", + "defu": "^6.1.4", + "pathe": "^2.0.2", + "std-env": "^3.8.0" + }, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/@nuxt/telemetry": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@nuxt/telemetry/-/telemetry-2.6.5.tgz", + "integrity": "sha512-lwMp9OHML/m0mjh7P5iz9PxINnk5smGkGebh88Wh8PjvnRooY1TBsbyq7mlSrNibpwD1BkwqhV5IAZOXWHLxMQ==", + "dependencies": { + "@nuxt/kit": "^3.15.4", + "citty": "^0.1.6", + "consola": "^3.4.0", + "destr": "^2.0.3", + "dotenv": "^16.4.7", + "git-url-parse": "^16.0.0", + "is-docker": "^3.0.0", + "ofetch": "^1.4.1", + "package-manager-detector": "^0.2.9", + "parse-git-config": "^3.0.0", + "pathe": "^2.0.2", + "rc9": "^2.1.2", + "std-env": "^3.8.0" + }, + "bin": { + "nuxt-telemetry": "bin/nuxt-telemetry.mjs" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxt/vite-builder": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/@nuxt/vite-builder/-/vite-builder-3.15.4.tgz", + "integrity": "sha512-yBK6tWT973+ExKC3ciTWymZpjJ+enToOtYz574kXCyGO0PbSnuXdoJKTvrwXw1lK97PajCKxExlmwI/3oLOmMQ==", + "dependencies": { + "@nuxt/kit": "3.15.4", + "@rollup/plugin-replace": "^6.0.2", + "@vitejs/plugin-vue": "^5.2.1", + "@vitejs/plugin-vue-jsx": "^4.1.1", + "autoprefixer": "^10.4.20", + "consola": "^3.4.0", + "cssnano": "^7.0.6", + "defu": "^6.1.4", + "esbuild": "^0.24.2", + "escape-string-regexp": "^5.0.0", + "externality": "^1.0.2", + "get-port-please": "^3.1.2", + "h3": "^1.14.0", + "jiti": "^2.4.2", + "knitwork": "^1.2.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "ohash": "^1.1.4", + "pathe": "^2.0.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.3.1", + "postcss": "^8.5.1", + "rollup-plugin-visualizer": "^5.13.1", + "std-env": "^3.8.0", + "ufo": "^1.5.4", + "unenv": "^1.10.0", + "unplugin": "^2.1.2", + "vite": "^6.0.11", + "vite-node": "^3.0.4", + "vite-plugin-checker": "^0.8.0", + "vue-bundle-renderer": "^2.1.1" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0.0" + }, + "peerDependencies": { + "vue": "^3.3.4" + } + }, + "node_modules/@nuxt/vite-builder/node_modules/unplugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.2.0.tgz", + "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@nuxtjs/i18n": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/@nuxtjs/i18n/-/i18n-8.5.6.tgz", + "integrity": "sha512-L+g+LygKNoaS/AXExk7tzS9wSNn9QdP1T9VdTjjEGYftpeFgv2U8AQsY0dQAhgPIbXXhIAkNYxTk4YcINj9CfA==", + "dev": true, + "dependencies": { + "@intlify/h3": "^0.5.0", + "@intlify/shared": "^9.14.1", + "@intlify/unplugin-vue-i18n": "^3.0.1", + "@intlify/utils": "^0.12.0", + "@miyaneee/rollup-plugin-json5": "^1.2.0", + "@nuxt/kit": "^3.13.1", + "@rollup/plugin-yaml": "^4.1.2", + "@vue/compiler-sfc": "^3.5.4", + "debug": "^4.3.5", + "defu": "^6.1.2", + "estree-walker": "^3.0.3", + "is-https": "^4.0.0", + "knitwork": "^1.1.0", + "magic-string": "^0.30.10", + "mlly": "^1.7.1", + "pathe": "^1.1.1", + "scule": "^1.1.1", + "sucrase": "^3.35.0", + "ufo": "^1.3.1", + "unplugin": "^1.10.1", + "vue-i18n": "^9.14.1", + "vue-router": "^4.4.4" + }, + "engines": { + "node": "^14.16.0 || >=16.11.0" + } + }, + "node_modules/@nuxtjs/i18n/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true + }, + "node_modules/@nuxtjs/robots": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nuxtjs/robots/-/robots-3.0.0.tgz", + "integrity": "sha512-qsHGW1KXBvV5Kq7u3huPnFCUTbHS4Fk8Za2mNPgmUXcwLgp3exvhPtdZfIdjrCF/aZk3A8OZONNmGghs6CecBA==", + "dependencies": { + "@nuxt/kit": "^3.0.0", + "h3": "^1.0.1" + } + }, + "node_modules/@nuxtjs/sitemap": { + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/@nuxtjs/sitemap/-/sitemap-5.3.5.tgz", + "integrity": "sha512-TfhEImgVHEZaI/vphZdoCaWM2TRBJqprHZPhIQwWYJz+dpQWkfY6z8UpjhmUh6npvbj5kNY9ncLenkw0cDJp9g==", + "dependencies": { + "@nuxt/devtools-kit": "^1.3.9", + "@nuxt/kit": "^3.12.3", + "chalk": "^5.3.0", + "defu": "^6.1.4", + "h3-compression": "^0.3.2", + "nuxt-site-config": "^2.2.15", + "nuxt-site-config-kit": "^2.2.15", + "ofetch": "^1.3.4", + "pathe": "^1.1.2", + "pkg-types": "^1.1.3", + "radix3": "^1.1.2", + "semver": "^7.6.2", + "sirv": "^2.0.4", + "site-config-stack": "^2.2.15", + "ufo": "^1.5.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@nuxtjs/sitemap/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==" + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==" + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-wasm": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-wasm/-/watcher-wasm-2.5.1.tgz", + "integrity": "sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw==", + "bundleDependencies": [ + "napi-wasm" + ], + "dependencies": { + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "napi-wasm": "^1.1.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": { + "version": "1.1.0", + "inBundle": true, + "license": "MIT" + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pinia-plugin-persistedstate/nuxt": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@pinia-plugin-persistedstate/nuxt/-/nuxt-1.2.1.tgz", + "integrity": "sha512-q8s+4aQW/AjBMyeqLL48/qzBR5lcgnvvf1525ovNuKf6Wl9CsoLjPKh/5X8vNoKGwSow4gP7lVmdYPQRypgjgg==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "dependencies": { + "@nuxt/kit": "^3.12.2", + "defu": "^6.1.4", + "pinia-plugin-persistedstate": ">=3.2.1" + }, + "peerDependencies": { + "@pinia/nuxt": "^0.5.0" + } + }, + "node_modules/@pinia/nuxt": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@pinia/nuxt/-/nuxt-0.5.5.tgz", + "integrity": "sha512-wjxS7YqIesh4OLK+qE3ZjhdOJ5pYZQ+VlEmZNtTwzQn1Kavei/khovx7mzXVXNA/mvSPXVhb9xBzhyS3XMURtw==", + "dependencies": { + "@nuxt/kit": "^3.9.0", + "pinia": "^2.2.3" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==" + }, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@redocly/config": { + "version": "0.20.3", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.20.3.tgz", + "integrity": "sha512-Nyyv1Bj7GgYwj/l46O0nkH1GTKWbO3Ixe7KFcn021aZipkZd+z8Vlu1BwkhqtVgivcKaClaExtWU/lDHkjBzag==" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.30.0.tgz", + "integrity": "sha512-ZZc+FXKoQXJ9cOR7qRKHxOfKOsGCj2wSodklKdtM2FofzyjzvIwn1rksD5+9iJxvHuORPOPv3ppAHcM+iMr/Ag==", + "dependencies": { + "@redocly/ajv": "^8.11.2", + "@redocly/config": "^0.20.1", + "colorette": "^1.2.0", + "https-proxy-agent": "^7.0.5", + "js-levenshtein": "^1.1.6", + "js-yaml": "^4.1.0", + "minimatch": "^5.0.1", + "pluralize": "^8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==" + }, + "node_modules/@redocly/openapi-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@rollup/plugin-alias": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz", + "integrity": "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==", + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "28.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.2.tgz", + "integrity": "sha512-BEFI2EDqzl+vA1rl97IDRZ61AIwGH093d9nz8+dThxJNH8oSoB7MjWvPCX3dkaK1/RCJ/1v/R1XB15FuSs0fQw==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@rollup/plugin-inject": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.5.tgz", + "integrity": "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-inject/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@rollup/plugin-json": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", + "dependencies": { + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", + "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-replace": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-6.0.2.tgz", + "integrity": "sha512-7QaYCf8bqF04dOy7w/eHmJeNExxTYwvKAmlSAH/EaWWUzbT0h5sbF6bktFoX/0F/0qwng5/dWFMyf3gzaM8DsQ==", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "magic-string": "^0.30.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-yaml": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-yaml/-/plugin-yaml-4.1.2.tgz", + "integrity": "sha512-RpupciIeZMUqhgFE97ba0s98mOFS7CWzN3EJNhJkqSv9XLlWYtwVdtE6cDw6ASOF/sZVFS7kRJXftaqM2Vakdw==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "js-yaml": "^4.1.0", + "tosource": "^2.0.0-alpha.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", + "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz", + "integrity": "sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.8.tgz", + "integrity": "sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.8.tgz", + "integrity": "sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.8.tgz", + "integrity": "sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.8.tgz", + "integrity": "sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.8.tgz", + "integrity": "sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.8.tgz", + "integrity": "sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.8.tgz", + "integrity": "sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.8.tgz", + "integrity": "sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.8.tgz", + "integrity": "sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.8.tgz", + "integrity": "sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.8.tgz", + "integrity": "sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.8.tgz", + "integrity": "sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.8.tgz", + "integrity": "sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.8.tgz", + "integrity": "sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.8.tgz", + "integrity": "sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.8.tgz", + "integrity": "sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.8.tgz", + "integrity": "sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.8.tgz", + "integrity": "sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "peer": true + }, + "node_modules/@types/node": { + "version": "22.13.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", + "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/parse-path": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/parse-path/-/parse-path-7.0.3.tgz", + "integrity": "sha512-LriObC2+KYZD3FzCrgWGv/qufdUy4eXrxcLgQMfYXgPbLIecKIsVBaQgUPmxSSLcjmYbDTQbMgr6qr6l/eb7Bg==" + }, + "node_modules/@types/qs": { + "version": "6.9.18", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", + "integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" + }, + "node_modules/@unhead/dom": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/@unhead/dom/-/dom-1.11.19.tgz", + "integrity": "sha512-udkgITdIblEWH3hsoFQMKW+6QXNO2qFZlZ2FI37bVAplQSnK/PytTPt/5oA1GWkoVwT0DsQNGHbU6kOg/3SlNg==", + "dependencies": { + "@unhead/schema": "1.11.19", + "@unhead/shared": "1.11.19" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/schema": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/@unhead/schema/-/schema-1.11.19.tgz", + "integrity": "sha512-7VhYHWK7xHgljdv+C01MepCSYZO2v6OhgsfKWPxRQBDDGfUKCUaChox0XMq3tFvXP6u4zSp6yzcDw2yxCfVMwg==", + "dependencies": { + "hookable": "^5.5.3", + "zhead": "^2.2.4" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/shared": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/@unhead/shared/-/shared-1.11.19.tgz", + "integrity": "sha512-UYE9EIeQLJOhx8vC71bWGkAGY4Zzq/H8qYlihowUg4NiFOfL+KKMnj96datb74PRxSDvHac9V3OLktNcsX2NuA==", + "dependencies": { + "@unhead/schema": "1.11.19", + "packrup": "^0.1.2" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/ssr": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/@unhead/ssr/-/ssr-1.11.19.tgz", + "integrity": "sha512-OH+rj6xBTdYyLsSntk4lEQyR+z57aEUZIiR2UpPl1zWGtBZPIr5zs3GY5+EyJ8t8e0zLemPR/Pu7VembTJ8o1w==", + "dependencies": { + "@unhead/schema": "1.11.19", + "@unhead/shared": "1.11.19" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/@unhead/vue": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/@unhead/vue/-/vue-1.11.19.tgz", + "integrity": "sha512-/XATTP8wVLs3+2Pkj2crvr/Z55nybVQyOwISh+sAlr/48/9n3jGNiCZHKpHgL4MpOnGT4krwzWzbfhBO/G2BSQ==", + "dependencies": { + "@unhead/schema": "1.11.19", + "@unhead/shared": "1.11.19", + "hookable": "^5.5.3", + "unhead": "1.11.19" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vue": ">=2.7 || >=3" + } + }, + "node_modules/@unocss/astro": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/astro/-/astro-0.65.4.tgz", + "integrity": "sha512-ex1CJOQ6yeftBEPcbA9/W47/YoV+mhQnrAoc8MA1VVrvvFKDitICFU62+nSt3NWRe53XL/fXnQbcbCb8AAgKlA==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/reset": "0.65.4", + "@unocss/vite": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/@unocss/cli": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/cli/-/cli-0.65.4.tgz", + "integrity": "sha512-D/4hY5Hezh3QETscl4i+ojb+q8YU9Cl9AYJ8v3gsjc/GjTmEuIOD5V4x+/aN25vY5wjqgoApOgaIDGCV3b+2Ig==", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@rollup/pluginutils": "^5.1.4", + "@unocss/config": "0.65.4", + "@unocss/core": "0.65.4", + "@unocss/preset-uno": "0.65.4", + "cac": "^6.7.14", + "chokidar": "^3.6.0", + "colorette": "^2.0.20", + "consola": "^3.3.1", + "magic-string": "^0.30.17", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "tinyglobby": "^0.2.10" + }, + "bin": { + "unocss": "bin/unocss.mjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/cli/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@unocss/cli/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/@unocss/cli/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@unocss/cli/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@unocss/config": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/config/-/config-0.65.4.tgz", + "integrity": "sha512-/vCt4AXnJ4p4Ow6xqsYwdrelF9533yhZjzkg3SQmL3rKeSkicPayKpeq8nkYECdhDI03VTCVD+6oh5Y/26Hg7A==", + "dependencies": { + "@unocss/core": "0.65.4", + "unconfig": "~0.6.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/core": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/core/-/core-0.65.4.tgz", + "integrity": "sha512-a2JOoFutrhqd5RgPhIR5FIXrDoHDU3gwCbPrpT6KYTjsqlSc/fv02yZ+JGOZFN3MCFhCmaPTs+idDFtwb3xU8g==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/extractor-arbitrary-variants": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.65.4.tgz", + "integrity": "sha512-GbvTgsDaHplfWfsQtOY8RrvEZvptmvR9k9NwQ5NsZBNIG1JepYVel93CVQvsxT5KioKcoWngXxTYLNOGyxLs0g==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/inspector": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/inspector/-/inspector-0.65.4.tgz", + "integrity": "sha512-byg9x549Ul17U4Ety7ufDwC0UOygypoq4QnLEPzhlZ0KJG1f7WmXKYanOhupeg3h4qCj6Nc/xdZYMGbHl9QRIg==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/rule-utils": "0.65.4", + "colorette": "^2.0.20", + "gzip-size": "^6.0.0", + "sirv": "^3.0.0", + "vue-flow-layout": "^0.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/inspector/node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@unocss/inspector/node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@unocss/nuxt": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/nuxt/-/nuxt-0.65.4.tgz", + "integrity": "sha512-dEJdqgvrukgZJk1szxRW6MiIozUZDLeFyyxmnO+iW3loPlji9hu95j2KBVHaQWIzi39XqVSORi4lH5flvAz3Pg==", + "dependencies": { + "@nuxt/kit": "^3.15.0", + "@unocss/config": "0.65.4", + "@unocss/core": "0.65.4", + "@unocss/preset-attributify": "0.65.4", + "@unocss/preset-icons": "0.65.4", + "@unocss/preset-tagify": "0.65.4", + "@unocss/preset-typography": "0.65.4", + "@unocss/preset-uno": "0.65.4", + "@unocss/preset-web-fonts": "0.65.4", + "@unocss/preset-wind": "0.65.4", + "@unocss/reset": "0.65.4", + "@unocss/vite": "0.65.4", + "@unocss/webpack": "0.65.4", + "unocss": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/postcss": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/postcss/-/postcss-0.65.4.tgz", + "integrity": "sha512-8peDRo0+rNQsnKh/H2uZEVy67sV2cC16rAeSLpgbVJUMNfZlmF0rC2DNGsOV17uconUXSwz7+mGcHKNiv+8YlQ==", + "dependencies": { + "@unocss/config": "0.65.4", + "@unocss/core": "0.65.4", + "@unocss/rule-utils": "0.65.4", + "css-tree": "^3.1.0", + "postcss": "^8.4.49", + "tinyglobby": "^0.2.10" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/@unocss/postcss/node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/@unocss/postcss/node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==" + }, + "node_modules/@unocss/preset-attributify": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-attributify/-/preset-attributify-0.65.4.tgz", + "integrity": "sha512-zxE9hJJ5b37phjdzDdZsxX559ZlmH9rFlY5LVEcQySTnsfY0znviHxPbD2iRpCBCRd+YC5HfFd2jb3XlnTKMJQ==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-icons": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-icons/-/preset-icons-0.65.4.tgz", + "integrity": "sha512-5sSzTN72X2Ag3VH48xY1pYudeWnql9jqdMiwgZuLJcmvETBNGelXy2wGxm7tsUUEx/l40Yr04Ck8XRPGT9jLBw==", + "dependencies": { + "@iconify/utils": "^2.2.1", + "@unocss/core": "0.65.4", + "ofetch": "^1.4.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-mini": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-mini/-/preset-mini-0.65.4.tgz", + "integrity": "sha512-dcO2PzSl87qN1KdQWcfZDIKEhpdFeImWbYfiXtE7k6pi1393FJkdHEopgI/1ZciIQN1CkTvQJ5c7EpEVWftYRA==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/extractor-arbitrary-variants": "0.65.4", + "@unocss/rule-utils": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-tagify": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-tagify/-/preset-tagify-0.65.4.tgz", + "integrity": "sha512-qll6koqdFEkvmz594vKnxj9+3nfM3ugkJxYHrTkqtwx7DAnTgtM8fInFFGZelvjwUzR3o3+Zw6uMhFkLTVTfvg==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-typography": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-typography/-/preset-typography-0.65.4.tgz", + "integrity": "sha512-Dl940ATrviWD9Vh+4fcN0QZXb6wA7al+c7QkdVAzW7I+NtdN2ELvLcN0cY22KnLRpwztzmg52Qp2J/1QnqrLTw==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/preset-mini": "0.65.4" + } + }, + "node_modules/@unocss/preset-uno": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-uno/-/preset-uno-0.65.4.tgz", + "integrity": "sha512-56bdBtf476i+soQCQmT36uGzcF2z+7DGCnG1hwWiw6XAbL6gmRMQsubwi1c8z8TcTQNBsOFUnOziFil0gbWufw==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/preset-mini": "0.65.4", + "@unocss/preset-wind": "0.65.4", + "@unocss/rule-utils": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-web-fonts": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-web-fonts/-/preset-web-fonts-0.65.4.tgz", + "integrity": "sha512-UB/MvXHUTqMNVH1bbiKZ/ZtZUI5tsYlTYAvBrnXPO1Cztuwr8hJKSi4RCfI9g+YYtKHX4uYuxUbW5bcN85gmBQ==", + "dependencies": { + "@unocss/core": "0.65.4", + "ofetch": "^1.4.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/preset-wind": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/preset-wind/-/preset-wind-0.65.4.tgz", + "integrity": "sha512-0rbNbw5E8Lvh2yf4R1Mq+lxI/wL5Tm6+r+crE0uAAhCPe9kxPHW4k+x1cWKDIwq6Vudlm3cNX85N49wN5tYgdA==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/preset-mini": "0.65.4", + "@unocss/rule-utils": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/reset": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/reset/-/reset-0.65.4.tgz", + "integrity": "sha512-m685H0KFvVMz6R2i5GDIFv4RS9Z7y2G8hJK7xg2OWli+7w8l2ZMihYvXKofPsst4q/ms8EgKXpWc/qqUOTucvA==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/rule-utils": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/rule-utils/-/rule-utils-0.65.4.tgz", + "integrity": "sha512-+EzdJEWcqGcO6HwbBTe7vEdBRpuKkBiz4MycQeLD6GEio04T45y6VHHO7/WTqxltbO4YwwW9/s2TKRMxKtoG8g==", + "dependencies": { + "@unocss/core": "^0.65.4", + "magic-string": "^0.30.17" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/transformer-attributify-jsx": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-0.65.4.tgz", + "integrity": "sha512-n438EzWdTKlLCOlAUSpFjmH6FflctqzIReMzMZSJDkmkorymc+C5GpjN3Nty2cKRJXIl6Vwq0oxPuB59RT+FIw==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/transformer-compile-class": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/transformer-compile-class/-/transformer-compile-class-0.65.4.tgz", + "integrity": "sha512-n1yHDC/iIbcj/9fBUTXkSoASKfLBuRoCN7P1a0ecPc8Gu+uOGfoxafOhrlqC+tpD3hlQGoL+0h74BHSKh+L23Q==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/transformer-directives": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/transformer-directives/-/transformer-directives-0.65.4.tgz", + "integrity": "sha512-zkoDEwzPkgXi6ohW7P11gbArwfTRMZ9knYSUYoPEltQz+UZYzeRQ85exiAmdz5MsbCAuhQEr577Kd/CWfhjEuA==", + "dependencies": { + "@unocss/core": "0.65.4", + "@unocss/rule-utils": "0.65.4", + "css-tree": "^3.1.0" + } + }, + "node_modules/@unocss/transformer-directives/node_modules/css-tree": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz", + "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==", + "dependencies": { + "mdn-data": "2.12.2", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/@unocss/transformer-directives/node_modules/mdn-data": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz", + "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==" + }, + "node_modules/@unocss/transformer-variant-group": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/transformer-variant-group/-/transformer-variant-group-0.65.4.tgz", + "integrity": "sha512-ggO6xMGeOeoD5GHS2xXBJrYFuzqyiZ25tM0zHAMJn9QU9GIu1NwWvcXluvLCF/MRIygBJGPpAE98aEICI6ifEA==", + "dependencies": { + "@unocss/core": "0.65.4" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@unocss/vite": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/vite/-/vite-0.65.4.tgz", + "integrity": "sha512-02pRcVLfb5UUxMJwudnjS/0ZQdSlskjuXVHdpZpLBZCA8hhoru2uEOsPbUOBRNNMjDj6ld00pmgk/+im07M35Q==", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@rollup/pluginutils": "^5.1.4", + "@unocss/config": "0.65.4", + "@unocss/core": "0.65.4", + "@unocss/inspector": "0.65.4", + "chokidar": "^3.6.0", + "magic-string": "^0.30.17", + "tinyglobby": "^0.2.10" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0" + } + }, + "node_modules/@unocss/vite/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@unocss/vite/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@unocss/vite/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@unocss/webpack": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/@unocss/webpack/-/webpack-0.65.4.tgz", + "integrity": "sha512-cnd0qnJdSxYlQ+zuF0Qad3xZk2X0/p70XLzlA4TaBZuKa2OPJOyulfJwJSqcrSc4PXYOd9B/B8nXJk8WQ1yBHQ==", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "@rollup/pluginutils": "^5.1.4", + "@unocss/config": "0.65.4", + "@unocss/core": "0.65.4", + "chokidar": "^3.6.0", + "magic-string": "^0.30.17", + "tinyglobby": "^0.2.10", + "unplugin": "^2.1.0", + "webpack-sources": "^3.2.3" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "webpack": "^4 || ^5" + } + }, + "node_modules/@unocss/webpack/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@unocss/webpack/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@unocss/webpack/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@unocss/webpack/node_modules/unplugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.2.0.tgz", + "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/@vercel/nft": { + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.27.10.tgz", + "integrity": "sha512-zbaF9Wp/NsZtKLE4uVmL3FyfFwlpDyuymQM1kPbeT0mVOHKDQQNjnnfslB3REg3oZprmNFJuh3pkHBk2qAaizg==", + "dependencies": { + "@mapbox/node-pre-gyp": "^2.0.0-rc.0", + "@rollup/pluginutils": "^5.1.3", + "acorn": "^8.6.0", + "acorn-import-attributes": "^1.9.5", + "async-sema": "^3.1.1", + "bindings": "^1.4.0", + "estree-walker": "2.0.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "node-gyp-build": "^4.2.2", + "picomatch": "^4.0.2", + "resolve-from": "^5.0.0" + }, + "bin": { + "nft": "out/cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@vercel/nft/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.1.tgz", + "integrity": "sha512-cxh314tzaWwOLqVes2gnnCtvBDcM1UMdn+iFR+UjAn411dPT3tOmqrJjbMd7koZpMAmBM/GqeV4n9ge7JSiJJQ==", + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vitejs/plugin-vue-jsx": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-4.1.1.tgz", + "integrity": "sha512-uMJqv/7u1zz/9NbWAD3XdjaY20tKTf17XVfQ9zq4wY1BjsB/PjpJPMe2xiG39QpP4ZdhYNhm4Hvo66uJrykNLA==", + "dependencies": { + "@babel/core": "^7.26.0", + "@babel/plugin-transform-typescript": "^7.25.9", + "@vue/babel-plugin-jsx": "^1.2.5" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0 || ^6.0.0", + "vue": "^3.0.0" + } + }, + "node_modules/@vue-macros/common": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/@vue-macros/common/-/common-1.16.1.tgz", + "integrity": "sha512-Pn/AWMTjoMYuquepLZP813BIcq8DTZiNCoaceuNlvaYuOTd8DqBZWc5u0uOMQZMInwME1mdSmmBAcTluiV9Jtg==", + "dependencies": { + "@vue/compiler-sfc": "^3.5.13", + "ast-kit": "^1.4.0", + "local-pkg": "^1.0.0", + "magic-string-ast": "^0.7.0", + "pathe": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.14.0" + }, + "peerDependencies": { + "vue": "^2.7.0 || ^3.2.25" + }, + "peerDependenciesMeta": { + "vue": { + "optional": true + } + } + }, + "node_modules/@vue-macros/common/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vue/babel-helper-vue-transform-on": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-transform-on/-/babel-helper-vue-transform-on-1.2.5.tgz", + "integrity": "sha512-lOz4t39ZdmU4DJAa2hwPYmKc8EsuGa2U0L9KaZaOJUt0UwQNjNA3AZTq6uEivhOKhhG1Wvy96SvYBoFmCg3uuw==" + }, + "node_modules/@vue/babel-plugin-jsx": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.2.5.tgz", + "integrity": "sha512-zTrNmOd4939H9KsRIGmmzn3q2zvv1mjxkYZHgqHZgDrXz5B1Q3WyGEjO2f+JrmKghvl1JIRcvo63LgM1kH5zFg==", + "dependencies": { + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/plugin-syntax-jsx": "^7.24.7", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.6", + "@babel/types": "^7.25.6", + "@vue/babel-helper-vue-transform-on": "1.2.5", + "@vue/babel-plugin-resolve-type": "1.2.5", + "html-tags": "^3.3.1", + "svg-tags": "^1.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + } + } + }, + "node_modules/@vue/babel-plugin-resolve-type": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@vue/babel-plugin-resolve-type/-/babel-plugin-resolve-type-1.2.5.tgz", + "integrity": "sha512-U/ibkQrf5sx0XXRnUZD1mo5F7PkpKyTbfXM3a3rC4YnUz6crHEz9Jg09jzzL6QYlXNto/9CePdOg/c87O4Nlfg==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.8", + "@babel/parser": "^7.25.6", + "@vue/compiler-sfc": "^3.5.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz", + "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.13", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-core/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", + "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", + "dependencies": { + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz", + "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==", + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.48", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-sfc/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz", + "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==", + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.6.4.tgz", + "integrity": "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==" + }, + "node_modules/@vue/devtools-core": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@vue/devtools-core/-/devtools-core-7.6.8.tgz", + "integrity": "sha512-8X4roysTwzQ94o7IobjVcOd1aZF5iunikrMrHPI2uUdigZCi2kFTQc7ffYiFiTNaLElCpjOhCnM7bo7aK1yU7A==", + "dependencies": { + "@vue/devtools-kit": "^7.6.8", + "@vue/devtools-shared": "^7.6.8", + "mitt": "^3.0.1", + "nanoid": "^5.0.9", + "pathe": "^1.1.2", + "vite-hot-client": "^0.2.4" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/@vue/devtools-core/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/@vue/devtools-kit": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.6.8.tgz", + "integrity": "sha512-JhJ8M3sPU+v0P2iZBF2DkdmR9L0dnT5RXJabJqX6o8KtFs3tebdvfoXV2Dm3BFuqeECuMJIfF1aCzSt+WQ4wrw==", + "dependencies": { + "@vue/devtools-shared": "^7.6.8", + "birpc": "^0.2.19", + "hookable": "^5.5.3", + "mitt": "^3.0.1", + "perfect-debounce": "^1.0.0", + "speakingurl": "^14.0.1", + "superjson": "^2.2.1" + } + }, + "node_modules/@vue/devtools-shared": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.7.2.tgz", + "integrity": "sha512-uBFxnp8gwW2vD6FrJB8JZLUzVb6PNRG0B0jBnHsOH8uKyva2qINY8PTF5Te4QlTbMDqU5K6qtJDr6cNsKWhbOA==", + "dependencies": { + "rfdc": "^1.4.1" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.13.tgz", + "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==", + "dependencies": { + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.13.tgz", + "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==", + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz", + "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==", + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/runtime-core": "3.5.13", + "@vue/shared": "3.5.13", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.13.tgz", + "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==", + "dependencies": { + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "vue": "3.5.13" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz", + "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==" + }, + "node_modules/@vuetify/loader-shared": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@vuetify/loader-shared/-/loader-shared-2.1.0.tgz", + "integrity": "sha512-dNE6Ceym9ijFsmJKB7YGW0cxs7xbYV8+1LjU6jd4P14xOt/ji4Igtgzt0rJFbxu+ZhAzqz853lhB0z8V9Dy9cQ==", + "devOptional": true, + "dependencies": { + "upath": "^2.0.1" + }, + "peerDependencies": { + "vue": "^3.0.0", + "vuetify": "^3.0.0" + } + }, + "node_modules/@vueuse/core": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-12.7.0.tgz", + "integrity": "sha512-jtK5B7YjZXmkGNHjviyGO4s3ZtEhbzSgrbX+s5o+Lr8i2nYqNyHuPVOeTdM1/hZ5Tkxg/KktAuAVDDiHMraMVA==", + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "12.7.0", + "@vueuse/shared": "12.7.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/integrations": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-12.7.0.tgz", + "integrity": "sha512-IEq7K4bCl7mn3uKJaWtNXnd1CAPaHLUMuyj5K1/k/pVcItt0VONZW8xiGxdIovJcQjkzOHjImhX5t6gija+0/g==", + "dependencies": { + "@vueuse/core": "12.7.0", + "@vueuse/shared": "12.7.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "^4", + "axios": "^1", + "change-case": "^5", + "drauu": "^0.4", + "focus-trap": "^7", + "fuse.js": "^7", + "idb-keyval": "^6", + "jwt-decode": "^4", + "nprogress": "^0.2", + "qrcode": "^1.5", + "sortablejs": "^1", + "universal-cookie": "^7" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.7.0.tgz", + "integrity": "sha512-4VvTH9mrjXqFN5LYa5YfqHVRI6j7R00Vy4995Rw7PQxyCL3z0Lli86iN4UemWqixxEvYfRjG+hF9wL8oLOn+3g==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/nuxt": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/@vueuse/nuxt/-/nuxt-12.7.0.tgz", + "integrity": "sha512-JG1yjJifcIZkFr+X1VmfNsdNZyHia/wXcpUHqVI2gwax5+bgmUlybqh9nStNGbX9NLUuPvPNNq043es5DlSJKg==", + "dependencies": { + "@nuxt/kit": "^3.15.4", + "@vueuse/core": "12.7.0", + "@vueuse/metadata": "12.7.0", + "local-pkg": "^1.0.0", + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "nuxt": "^3.0.0" + } + }, + "node_modules/@vueuse/nuxt/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "12.7.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-12.7.0.tgz", + "integrity": "sha512-coLlUw2HHKsm7rPN6WqHJQr18WymN4wkA/3ThFaJ4v4gWGWAQQGK+MJxLuJTBs4mojQiazlVWAKNJNpUWGRkNw==", + "dependencies": { + "vue": "^3.5.13" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "peer": true + }, + "node_modules/abbrev": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.0.tgz", + "integrity": "sha512-+/kfrslGQ7TNV2ecmQwMJj/B65g5KVq1/L3SGVZ3tCYGqlzFuFCGBZJtMP99wH3NpEUyAjn0zPdPUg0D+DwrOA==", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/ace-builds": { + "version": "1.39.0", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.39.0.tgz", + "integrity": "sha512-MqoZojv4gpc5QyTMor/dS6kmruDV9db9LVZbCiT4qYz6WsDiv4qyG5f7ZPc+wjUl6oLMqgCAsBjo1whdSVyMlQ==" + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "peer": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/archiver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-7.0.1.tgz", + "integrity": "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==", + "dependencies": { + "archiver-utils": "^5.0.2", + "async": "^3.2.4", + "buffer-crc32": "^1.0.0", + "readable-stream": "^4.0.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^3.0.0", + "zip-stream": "^6.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/archiver-utils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-5.0.2.tgz", + "integrity": "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==", + "dependencies": { + "glob": "^10.0.0", + "graceful-fs": "^4.2.0", + "is-stream": "^2.0.1", + "lazystream": "^1.0.0", + "lodash": "^4.17.15", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/archiver-utils/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/archiver-utils/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/archiver-utils/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/archiver-utils/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/archiver-utils/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/ast-kit": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-1.4.0.tgz", + "integrity": "sha512-BlGeOw73FDsX7z0eZE/wuuafxYoek2yzNJ6l6A1nsb4+z/p87TOPbHaWuN53kFKNuUXiCQa2M+xLF71IqQmRSw==", + "dependencies": { + "@babel/parser": "^7.26.5", + "pathe": "^2.0.2" + }, + "engines": { + "node": ">=16.14.0" + } + }, + "node_modules/ast-walker-scope": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/ast-walker-scope/-/ast-walker-scope-0.6.2.tgz", + "integrity": "sha512-1UWOyC50xI3QZkRuDj6PqDtpm1oHWtYs+NQGwqL/2R11eN3Q81PHAHPM0SWW3BNQm53UDwS//Jv8L4CCVLM1bQ==", + "dependencies": { + "@babel/parser": "^7.25.3", + "ast-kit": "^1.0.1" + }, + "engines": { + "node": ">=16.14.0" + } + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + }, + "node_modules/async-sema": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz", + "integrity": "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/axios": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/b4a": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/bare-events": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", + "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", + "optional": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bintrees": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.2.tgz", + "integrity": "sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==" + }, + "node_modules/birpc": { + "version": "0.2.19", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.19.tgz", + "integrity": "sha512-5WeXXAvTmitV1RqJFppT5QtUiz2p1mRSYU000Jkft5ZUCLJIk4uQriYNO50HknxKwM6jd8utNc66K1qGIwwWBQ==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-1.0.0.tgz", + "integrity": "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/c12": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/c12/-/c12-2.0.4.tgz", + "integrity": "sha512-3DbbhnFt0fKJHxU4tEUPmD1ahWE4PWPMomqfYsTJdrhpmEnRKJi3qSC4rO5U6E6zN1+pjBY7+z8fUmNRMaVKLw==", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.1.8", + "defu": "^6.1.4", + "dotenv": "^16.4.7", + "giget": "^1.2.4", + "jiti": "^2.4.2", + "mlly": "^1.7.4", + "ohash": "^2.0.4", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.3.1", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/c12/node_modules/ohash": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.4.tgz", + "integrity": "sha512-ac+SFwzhdHb0hp48/dbR7Jta39qfbuj7t3hApd9uyHS8bisHTfVzSEvjOVgV0L3zG7VR2/7JjkSGimP75D+hOQ==" + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001700", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", + "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==" + }, + "node_modules/chart.js": { + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.8.tgz", + "integrity": "sha512-IkGZlVpXP+83QpMm4uxEiGqSI7jFizwVtF3+n5Pc3k7sMO+tkd0qxh2OzLhenM0K80xtmAONWGBn082EiBQSDA==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "peer": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/clipboardy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz", + "integrity": "sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==", + "dependencies": { + "execa": "^8.0.1", + "is-wsl": "^3.1.0", + "is64bit": "^2.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/clipboardy/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/clipboardy/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/clipboardy/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==" + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" + }, + "node_modules/combine-errors": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/combine-errors/-/combine-errors-3.0.3.tgz", + "integrity": "sha512-C8ikRNRMygCwaTx+Ek3Yr+OuZzgZjduCOfSQBjbM8V3MfgcjSTeto/GXP6PAwKvJz/v15b7GHZvx5rOlczFw/Q==", + "dependencies": { + "custom-error-instance": "2.1.1", + "lodash.uniqby": "4.5.0" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + }, + "node_modules/compatx": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/compatx/-/compatx-0.1.8.tgz", + "integrity": "sha512-jcbsEAR81Bt5s1qOFymBufmCbXCXbk0Ql+K5ouj6gCyx2yHlu6AgmGIi9HxfKixpUDO5bCFJUHQ5uM6ecbTebw==" + }, + "node_modules/compress-commons": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-6.0.2.tgz", + "integrity": "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==", + "dependencies": { + "crc-32": "^1.2.0", + "crc32-stream": "^6.0.0", + "is-stream": "^2.0.1", + "normalize-path": "^3.0.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/compress-commons/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==" + }, + "node_modules/consola": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.0.tgz", + "integrity": "sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" + }, + "node_modules/cookie-es": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.2.tgz", + "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==" + }, + "node_modules/copy-anything": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", + "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==", + "dependencies": { + "is-what": "^4.1.8" + }, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-6.0.0.tgz", + "integrity": "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/croner": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/croner/-/croner-9.0.0.tgz", + "integrity": "sha512-onMB0OkDjkXunhdW9htFjEhqrD54+M94i6ackoUkjHKbRnXdyEyKRelp4nJ1kAz32+s27jP1FsebpJCVl0BsvA==", + "engines": { + "node": ">=18.0" + } + }, + "node_modules/cronstrue": { + "version": "2.55.0", + "resolved": "https://registry.npmjs.org/cronstrue/-/cronstrue-2.55.0.tgz", + "integrity": "sha512-ZsBZNtQWb0Rk6CNGJlzpPBYqNE7t93Aez5ZCExLihGwmIpE5qThSTDQzDV8Z1Nw6ksmLkwI98nPKyciZ5sH7dw==", + "bin": { + "cronstrue": "bin/cli.js" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crossws": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.4.tgz", + "integrity": "sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==", + "dependencies": { + "uncrypto": "^0.1.3" + } + }, + "node_modules/css-declaration-sorter": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", + "engines": { + "node": "^14 || ^16 || >=18" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.0.6.tgz", + "integrity": "sha512-54woqx8SCbp8HwvNZYn68ZFAepuouZW4lTwiMVnBErM3VkO7/Sd4oTOt3Zz3bPx3kxQ36aISppyXj2Md4lg8bw==", + "dependencies": { + "cssnano-preset-default": "^7.0.6", + "lilconfig": "^3.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano-preset-default": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.6.tgz", + "integrity": "sha512-ZzrgYupYxEvdGGuqL+JKOY70s7+saoNlHSCK/OGn1vB2pQK8KSET8jvenzItcY+kA7NoWvfbb/YhlzuzNKjOhQ==", + "dependencies": { + "browserslist": "^4.23.3", + "css-declaration-sorter": "^7.2.0", + "cssnano-utils": "^5.0.0", + "postcss-calc": "^10.0.2", + "postcss-colormin": "^7.0.2", + "postcss-convert-values": "^7.0.4", + "postcss-discard-comments": "^7.0.3", + "postcss-discard-duplicates": "^7.0.1", + "postcss-discard-empty": "^7.0.0", + "postcss-discard-overridden": "^7.0.0", + "postcss-merge-longhand": "^7.0.4", + "postcss-merge-rules": "^7.0.4", + "postcss-minify-font-values": "^7.0.0", + "postcss-minify-gradients": "^7.0.0", + "postcss-minify-params": "^7.0.2", + "postcss-minify-selectors": "^7.0.4", + "postcss-normalize-charset": "^7.0.0", + "postcss-normalize-display-values": "^7.0.0", + "postcss-normalize-positions": "^7.0.0", + "postcss-normalize-repeat-style": "^7.0.0", + "postcss-normalize-string": "^7.0.0", + "postcss-normalize-timing-functions": "^7.0.0", + "postcss-normalize-unicode": "^7.0.2", + "postcss-normalize-url": "^7.0.0", + "postcss-normalize-whitespace": "^7.0.0", + "postcss-ordered-values": "^7.0.1", + "postcss-reduce-initial": "^7.0.2", + "postcss-reduce-transforms": "^7.0.0", + "postcss-svgo": "^7.0.1", + "postcss-unique-selectors": "^7.0.3" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/cssnano-utils": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-5.0.0.tgz", + "integrity": "sha512-Uij0Xdxc24L6SirFr25MlwC2rCFX6scyUmuKpzI+JQ7cyqDEwD42fJ0xfB3yLfOnRDU5LKGgjQ9FA6LYh76GWQ==", + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/csso": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", + "dependencies": { + "css-tree": "~2.2.0" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", + "dependencies": { + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==" + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/custom-error-instance": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/custom-error-instance/-/custom-error-instance-2.1.1.tgz", + "integrity": "sha512-p6JFxJc3M4OTD2li2qaHkDCw9SfMw82Ldr6OC9Je1aXiGfhx2W8p3GaoeaGrPJTUN9NirTM/KTxHWMUdR1rsUg==" + }, + "node_modules/date-fns": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/db0": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/db0/-/db0-0.2.4.tgz", + "integrity": "sha512-hIzftLH1nMsF95zSLjDLYLbE9huOXnLYUTAQ5yKF5amp0FpeD+B15XJa8BvGYSOeSCH4gl2WahB/y1FcUByQSg==", + "peerDependencies": { + "@electric-sql/pglite": "*", + "@libsql/client": "*", + "better-sqlite3": "*", + "drizzle-orm": "*", + "mysql2": "*", + "sqlite3": "*" + }, + "peerDependenciesMeta": { + "@electric-sql/pglite": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "drizzle-orm": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "sqlite3": { + "optional": true + } + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-pick-omit": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/deep-pick-omit/-/deep-pick-omit-1.2.1.tgz", + "integrity": "sha512-2J6Kc/m3irCeqVG42T+SaUMesaK7oGWaedGnQQK/+O0gYc+2SP5bKh/KKTE7d7SJ+GCA9UUE1GRzh6oDe0EnGw==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==" + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/devalue": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", + "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==" + }, + "node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==" + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-prop": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-9.0.0.tgz", + "integrity": "sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==", + "dependencies": { + "type-fest": "^4.18.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.103", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.103.tgz", + "integrity": "sha512-P6+XzIkfndgsrjROJWfSvVEgNHtPgbhVyTkwLjUM2HU/h7pZRORgaTlHqfAikqxKmdJMLW8fftrdGWbd/Ds0FA==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-stack-parser-es": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-0.1.5.tgz", + "integrity": "sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/errx": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/errx/-/errx-0.1.0.tgz", + "integrity": "sha512-fZmsRiDNv07K6s2KkKFTiD2aIvECa7++PKyD5NC32tpRw46qZA3sOz+aM+/V9V0GDHxVTKLziveV4JhzBHDp9Q==" + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.24.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", + "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.2", + "@esbuild/android-arm": "0.24.2", + "@esbuild/android-arm64": "0.24.2", + "@esbuild/android-x64": "0.24.2", + "@esbuild/darwin-arm64": "0.24.2", + "@esbuild/darwin-x64": "0.24.2", + "@esbuild/freebsd-arm64": "0.24.2", + "@esbuild/freebsd-x64": "0.24.2", + "@esbuild/linux-arm": "0.24.2", + "@esbuild/linux-arm64": "0.24.2", + "@esbuild/linux-ia32": "0.24.2", + "@esbuild/linux-loong64": "0.24.2", + "@esbuild/linux-mips64el": "0.24.2", + "@esbuild/linux-ppc64": "0.24.2", + "@esbuild/linux-riscv64": "0.24.2", + "@esbuild/linux-s390x": "0.24.2", + "@esbuild/linux-x64": "0.24.2", + "@esbuild/netbsd-arm64": "0.24.2", + "@esbuild/netbsd-x64": "0.24.2", + "@esbuild/openbsd-arm64": "0.24.2", + "@esbuild/openbsd-x64": "0.24.2", + "@esbuild/sunos-x64": "0.24.2", + "@esbuild/win32-arm64": "0.24.2", + "@esbuild/win32-ia32": "0.24.2", + "@esbuild/win32-x64": "0.24.2" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/externality": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/externality/-/externality-1.0.2.tgz", + "integrity": "sha512-LyExtJWKxtgVzmgtEHyQtLFpw1KFhQphF9nTG8TpAIVkiI/xQ3FJh75tRFLYl4hkn7BNIIdLJInuDAavX35pMw==", + "dependencies": { + "enhanced-resolve": "^5.14.1", + "mlly": "^1.3.0", + "pathe": "^1.1.1", + "ufo": "^1.1.2" + } + }, + "node_modules/externality/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-npm-meta": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/fast-npm-meta/-/fast-npm-meta-0.2.2.tgz", + "integrity": "sha512-E+fdxeaOQGo/CMWc9f4uHFfgUPJRAu7N3uB8GBvB3SDPAIWJK4GKyYhkAGFq+GYrcbKNfQIz5VVQyJnDuPPCrg==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "peer": true + }, + "node_modules/fastq": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fdir": { + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz", + "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==" + }, + "node_modules/focus-trap": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.4.tgz", + "integrity": "sha512-xx560wGBk7seZ6y933idtjJQc1l+ck+pI3sKvhKozdBV1dRZoKhkW5xoCaFv9tQiX5RH1xfSxjuNu6g+lmN/gw==", + "dependencies": { + "tabbable": "^6.2.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", + "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/fuse.js": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-7.1.0.tgz", + "integrity": "sha512-trLf4SzuuUxfusZADLINj+dE8clK1frKdmqiJNb1Es75fmI5oY6X2mxLVUciLLjxqw/xr72Dhy+lER6dGd02FQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port-please": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.1.2.tgz", + "integrity": "sha512-Gxc29eLs1fbn6LQ4jSU4vXjlwyZhF5HsGuMAa7gqBP4Rw4yxxltyDUuF5MBclFzDTXO+ACchGQoeela4DSfzdQ==" + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/giget": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.5.tgz", + "integrity": "sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.5.4", + "pathe": "^2.0.3", + "tar": "^6.2.1" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/git-config-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-2.0.0.tgz", + "integrity": "sha512-qc8h1KIQbJpp+241id3GuAtkdyJ+IK+LIVtkiFTRKRrmddDzs3SI9CvP1QYmWBFvm1I/PWRwj//of8bgAc0ltA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/git-up": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-8.0.1.tgz", + "integrity": "sha512-2XFu1uNZMSjkyetaF+8rqn6P0XqpMq/C+2ycjI6YwrIKcszZ5/WR4UubxjN0lILOKqLkLaHDaCr2B6fP1cke6g==", + "dependencies": { + "is-ssh": "^1.4.0", + "parse-url": "^9.2.0" + } + }, + "node_modules/git-url-parse": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-16.0.1.tgz", + "integrity": "sha512-mcD36GrhAzX5JVOsIO52qNpgRyFzYWRbU1VSRFCvJt1IJvqfvH427wWw/CFqkWvjVPtdG5VTx4MKUeC5GeFPDQ==", + "dependencies": { + "git-up": "^8.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "peer": true + }, + "node_modules/global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "dependencies": { + "ini": "4.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/gzip-size": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-7.0.0.tgz", + "integrity": "sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/h3": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.1.tgz", + "integrity": "sha512-+ORaOBttdUm1E2Uu/obAyCguiI7MbBvsLTndc3gyK3zU+SYLoZXlyCP9Xgy0gikkGufFLTZXCXD6+4BsufnmHA==", + "dependencies": { + "cookie-es": "^1.2.2", + "crossws": "^0.3.3", + "defu": "^6.1.4", + "destr": "^2.0.3", + "iron-webcrypto": "^1.2.1", + "node-mock-http": "^1.0.0", + "radix3": "^1.1.2", + "ufo": "^1.5.4", + "uncrypto": "^0.1.3" + } + }, + "node_modules/h3-compression": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/h3-compression/-/h3-compression-0.3.2.tgz", + "integrity": "sha512-B+yCKyDRnO0BXSfjAP4tCXJgJwmnKp3GyH5Yh66mY9KuOCrrGQSPk/gBFG2TgH7OyB/6mvqNZ1X0XNVuy0qRsw==", + "funding": { + "url": "https://github.com/sponsors/codedredd" + }, + "peerDependencies": { + "h3": "^1.6.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==" + }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-shutdown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/http-shutdown/-/http-shutdown-1.2.2.tgz", + "integrity": "sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/http-status-codes": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/httpxy": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/httpxy/-/httpxy-0.1.7.tgz", + "integrity": "sha512-pXNx8gnANKAndgga5ahefxc++tJvNL87CXoRwxn1cJE2ZkWEojF3tNfQIEhZX/vfpt+wzeAzpUI4qkediX1MLQ==" + }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", + "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/image-meta": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/image-meta/-/image-meta-0.2.1.tgz", + "integrity": "sha512-K6acvFaelNxx8wc2VjbIzXKDVB0Khs0QT35U6NkGfTdCmjLNcO2945m7RFNR9/RPVFm48hq7QPzK8uGH18HCGw==" + }, + "node_modules/immutable": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", + "devOptional": true + }, + "node_modules/importx": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/importx/-/importx-0.5.2.tgz", + "integrity": "sha512-YEwlK86Ml5WiTxN/ECUYC5U7jd1CisAVw7ya4i9ZppBoHfFkT2+hChhr3PE2fYxUKLkNyivxEQpa5Ruil1LJBQ==", + "dependencies": { + "bundle-require": "^5.1.0", + "debug": "^4.4.0", + "esbuild": "^0.20.2 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0", + "jiti": "^2.4.2", + "pathe": "^2.0.3", + "tsx": "^4.19.2" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/impound": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/impound/-/impound-0.2.0.tgz", + "integrity": "sha512-gXgeSyp9Hf7qG2/PLKmywHXyQf2xFrw+mJGpoj9DsAB9L7/MIKn+DeEx98UryWXdmbv8wUUPdcQof6qXnZoCGg==", + "dependencies": { + "@rollup/pluginutils": "^5.1.2", + "mlly": "^1.7.2", + "pathe": "^1.1.2", + "unenv": "^1.10.0", + "unplugin": "^1.14.1" + } + }, + "node_modules/impound/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/index-to-position": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-0.1.2.tgz", + "integrity": "sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ioredis": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.5.0.tgz", + "integrity": "sha512-7CutT89g23FfSa8MDoIFs2GYYa0PaNiW/OrT+nRyjRXHDZd17HmIgy+reOQ/yhh72NznNjGuS8kbCAcA4Ro4mw==", + "dependencies": { + "@ioredis/commands": "^1.1.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, + "node_modules/iron-webcrypto": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", + "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==", + "funding": { + "url": "https://github.com/sponsors/brc-dd" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-https": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-https/-/is-https-4.0.0.tgz", + "integrity": "sha512-FeMLiqf8E5g6SdiVJsPcNZX8k4h2fBs1wp5Bb6uaNxn58ufK1axBqQZdmAQsqh0t9BuwFObybrdVJh6MKyPlyg==", + "dev": true + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-installed-globally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-1.0.0.tgz", + "integrity": "sha512-K55T22lfpQ63N4KEN57jZUAaAYqYHEe8veb/TycJRk9DdSCLLcovXz/mL6mOnhQaZsQGwPhuFopdQIlqGSEjiQ==", + "dependencies": { + "global-directory": "^4.0.1", + "is-path-inside": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" + }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==" + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/is-ssh": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.1.tgz", + "integrity": "sha512-JNeu1wQsHjyHgn9NcWTaXq6zWSR6hqE0++zhfZlkFBbScNkyvxCdeV8sRkSBaeLKxmbpR21brail63ACNxJ0Tg==", + "dependencies": { + "protocols": "^2.0.1" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", + "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is64bit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is64bit/-/is64bit-2.0.0.tgz", + "integrity": "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==", + "dependencies": { + "system-architecture": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jiti": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", + "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/jose": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", + "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/js-base64": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", + "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" + }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-eslint-parser": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.0.tgz", + "integrity": "sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==", + "dev": true, + "dependencies": { + "acorn": "^8.5.0", + "eslint-visitor-keys": "^3.0.0", + "espree": "^9.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jwt-decode": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", + "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", + "engines": { + "node": ">=18" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, + "node_modules/klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/knitwork": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/knitwork/-/knitwork-1.2.0.tgz", + "integrity": "sha512-xYSH7AvuQ6nXkq42x0v5S8/Iry+cfulBz/DJQzhIyESdLD7425jXsPy4vn5cCXU+HhRN2kVw51Vd1K6/By4BQg==" + }, + "node_modules/kolorist": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", + "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==" + }, + "node_modules/launch-editor": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", + "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lazystream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/lazystream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/lazystream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/listhen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/listhen/-/listhen-1.9.0.tgz", + "integrity": "sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==", + "dependencies": { + "@parcel/watcher": "^2.4.1", + "@parcel/watcher-wasm": "^2.4.1", + "citty": "^0.1.6", + "clipboardy": "^4.0.0", + "consola": "^3.2.3", + "crossws": ">=0.2.0 <0.4.0", + "defu": "^6.1.4", + "get-port-please": "^3.1.2", + "h3": "^1.12.0", + "http-shutdown": "^1.2.2", + "jiti": "^2.1.2", + "mlly": "^1.7.1", + "node-forge": "^1.3.1", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "ufo": "^1.5.4", + "untun": "^0.1.3", + "uqr": "^0.1.2" + }, + "bin": { + "listen": "bin/listhen.mjs", + "listhen": "bin/listhen.mjs" + } + }, + "node_modules/listhen/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/local-pkg": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", + "integrity": "sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.2.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash._baseiteratee": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash._baseiteratee/-/lodash._baseiteratee-4.7.0.tgz", + "integrity": "sha512-nqB9M+wITz0BX/Q2xg6fQ8mLkyfF7MU7eE+MNBNjTHFKeKaZAPEzEg+E8LWxKWf1DQVflNEn9N49yAuqKh2mWQ==", + "dependencies": { + "lodash._stringtopath": "~4.8.0" + } + }, + "node_modules/lodash._basetostring": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-4.12.0.tgz", + "integrity": "sha512-SwcRIbyxnN6CFEEK4K1y+zuApvWdpQdBHM/swxP962s8HIxPO3alBH5t3m/dl+f4CMUug6sJb7Pww8d13/9WSw==" + }, + "node_modules/lodash._baseuniq": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz", + "integrity": "sha512-Ja1YevpHZctlI5beLA7oc5KNDhGcPixFhcqSiORHNsp/1QTv7amAXzw+gu4YOvErqVlMVyIJGgtzeepCnnur0A==", + "dependencies": { + "lodash._createset": "~4.0.0", + "lodash._root": "~3.0.0" + } + }, + "node_modules/lodash._createset": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz", + "integrity": "sha512-GTkC6YMprrJZCYU3zcqZj+jkXkrXzq3IPBcF/fIPpNEAB4hZEtXU8zp/RwKOvZl43NUmwDbyRk3+ZTbeRdEBXA==" + }, + "node_modules/lodash._root": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", + "integrity": "sha512-O0pWuFSK6x4EXhM1dhZ8gchNtG7JMqBtrHdoUFUWXD7dJnNSUze1GuyQr5sOs0aCvgGeI3o/OJW8f4ca7FDxmQ==" + }, + "node_modules/lodash._stringtopath": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/lodash._stringtopath/-/lodash._stringtopath-4.8.0.tgz", + "integrity": "sha512-SXL66C731p0xPDC5LZg4wI5H+dJo/EO4KTqOMwLYCH3+FmmfAKJEZCm6ohGpI+T1xwsDsJCfL4OnhorllvlTPQ==", + "dependencies": { + "lodash._basetostring": "~4.12.0" + } + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", + "integrity": "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg==" + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==" + }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==" + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" + }, + "node_modules/lodash.uniqby": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.5.0.tgz", + "integrity": "sha512-IRt7cfTtHy6f1aRVA5n7kT8rgN3N1nH6MOWLcHfpWG2SH19E3JksLK38MktLxZDhlAjCP9jpIXkOnRXlu6oByQ==", + "dependencies": { + "lodash._baseiteratee": "~4.7.0", + "lodash._baseuniq": "~4.6.0" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/magic-string-ast": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/magic-string-ast/-/magic-string-ast-0.7.0.tgz", + "integrity": "sha512-686fgAHaJY7wLTFEq7nnKqeQrhqmXB19d1HnqT35Ci7BN6hbAYLZUezTQ062uUHM7ggZEQlqJ94Ftls+KDXU8Q==", + "dependencies": { + "magic-string": "^0.30.17" + }, + "engines": { + "node": ">=16.14.0" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==" + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/merkle-json": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/merkle-json/-/merkle-json-2.7.0.tgz", + "integrity": "sha512-yzOZPrvIydATWQMk0lLxKjudKQV7Deu4hh/EJT7+q6c4aYs7J02WVGG5Mv6B5QbLJGy78h+u2nE5f8eUpDFGEg==", + "dependencies": { + "merkle-json": "^2.1.0" + }, + "engines": { + "node": ">=6.11.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.6.tgz", + "integrity": "sha512-4rGt7rvQHBbaSOF9POGkk1ocRP16Md1x36Xma8sz8h8/vfCUI2OtEIeCqe4Ofes853x4xDoPiFLIT47J5fI/7A==", + "funding": [ + "https://github.com/sponsors/broofa" + ], + "bin": { + "mime": "bin/cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mlly": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", + "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^2.0.1", + "pkg-types": "^1.3.0", + "ufo": "^1.5.4" + } + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==" + }, + "node_modules/mrmime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.2.tgz", + "integrity": "sha512-b+CiXQCNMUGe0Ri64S9SXFcP9hogjAJ2Rd6GdVxhPLRm7mhGaM7VgOvCAJ1ZshfHbqVDI3uqTI5C8/GaKuLI7g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, + "node_modules/nanotar": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/nanotar/-/nanotar-0.2.0.tgz", + "integrity": "sha512-9ca1h0Xjvo9bEkE4UOxgAzLV0jHKe6LMaxo37ND2DAhhAtd0j8pR1Wxz+/goMrZO8AEZTWCmyaOsFI/W5AdpCQ==" + }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "peer": true + }, + "node_modules/nitropack": { + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/nitropack/-/nitropack-2.10.4.tgz", + "integrity": "sha512-sJiG/MIQlZCVSw2cQrFG1H6mLeSqHlYfFerRjLKz69vUfdu0EL2l0WdOxlQbzJr3mMv/l4cOlCCLzVRzjzzF/g==", + "dependencies": { + "@cloudflare/kv-asset-handler": "^0.3.4", + "@netlify/functions": "^2.8.2", + "@rollup/plugin-alias": "^5.1.1", + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-inject": "^5.0.5", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-replace": "^6.0.1", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/pluginutils": "^5.1.3", + "@types/http-proxy": "^1.17.15", + "@vercel/nft": "^0.27.5", + "archiver": "^7.0.1", + "c12": "2.0.1", + "chokidar": "^3.6.0", + "citty": "^0.1.6", + "compatx": "^0.1.8", + "confbox": "^0.1.8", + "consola": "^3.2.3", + "cookie-es": "^1.2.2", + "croner": "^9.0.0", + "crossws": "^0.3.1", + "db0": "^0.2.1", + "defu": "^6.1.4", + "destr": "^2.0.3", + "dot-prop": "^9.0.0", + "esbuild": "^0.24.0", + "escape-string-regexp": "^5.0.0", + "etag": "^1.8.1", + "fs-extra": "^11.2.0", + "globby": "^14.0.2", + "gzip-size": "^7.0.0", + "h3": "^1.13.0", + "hookable": "^5.5.3", + "httpxy": "^0.1.5", + "ioredis": "^5.4.1", + "jiti": "^2.4.0", + "klona": "^2.0.6", + "knitwork": "^1.1.0", + "listhen": "^1.9.0", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "mime": "^4.0.4", + "mlly": "^1.7.2", + "node-fetch-native": "^1.6.4", + "ofetch": "^1.4.1", + "ohash": "^1.1.4", + "openapi-typescript": "^7.4.2", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.2.1", + "pretty-bytes": "^6.1.1", + "radix3": "^1.1.2", + "rollup": "^4.24.3", + "rollup-plugin-visualizer": "^5.12.0", + "scule": "^1.3.0", + "semver": "^7.6.3", + "serve-placeholder": "^2.0.2", + "serve-static": "^1.16.2", + "std-env": "^3.7.0", + "ufo": "^1.5.4", + "uncrypto": "^0.1.3", + "unctx": "^2.3.1", + "unenv": "^1.10.0", + "unimport": "^3.13.1", + "unstorage": "^1.13.1", + "untyped": "^1.5.1", + "unwasm": "^0.3.9" + }, + "bin": { + "nitro": "dist/cli/index.mjs", + "nitropack": "dist/cli/index.mjs" + }, + "engines": { + "node": "^16.11.0 || >=17.0.0" + }, + "peerDependencies": { + "xml2js": "^0.6.2" + }, + "peerDependenciesMeta": { + "xml2js": { + "optional": true + } + } + }, + "node_modules/nitropack/node_modules/c12": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/c12/-/c12-2.0.1.tgz", + "integrity": "sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==", + "dependencies": { + "chokidar": "^4.0.1", + "confbox": "^0.1.7", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.3", + "jiti": "^2.3.0", + "mlly": "^1.7.1", + "ohash": "^1.1.4", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/nitropack/node_modules/c12/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/nitropack/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/nitropack/node_modules/chokidar/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/nitropack/node_modules/chokidar/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/nitropack/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==" + }, + "node_modules/nitropack/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/nitropack/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/nitropack/node_modules/strip-literal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz", + "integrity": "sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/nitropack/node_modules/unimport": { + "version": "3.14.6", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-3.14.6.tgz", + "integrity": "sha512-CYvbDaTT04Rh8bmD8jz3WPmHYZRG/NnvYVzwD6V1YAlvvKROlAeNDUBhkBGzNav2RKaeuXvlWYaa1V4Lfi/O0g==", + "dependencies": { + "@rollup/pluginutils": "^5.1.4", + "acorn": "^8.14.0", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "fast-glob": "^3.3.3", + "local-pkg": "^1.0.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "pathe": "^2.0.1", + "picomatch": "^4.0.2", + "pkg-types": "^1.3.0", + "scule": "^1.3.0", + "strip-literal": "^2.1.1", + "unplugin": "^1.16.1" + } + }, + "node_modules/nitropack/node_modules/unimport/node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==" + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch-native": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz", + "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==" + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-mock-http": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.0.tgz", + "integrity": "sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==" + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==" + }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/nuxt": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/nuxt/-/nuxt-3.15.4.tgz", + "integrity": "sha512-hSbZO4mR0uAMJtZPNTnCfiAtgleoOu28gvJcBNU7KQHgWnNXPjlWgwMczko2O4Tmnv9zIe/CQged+2HsPwl2ZA==", + "dependencies": { + "@nuxt/cli": "^3.21.1", + "@nuxt/devalue": "^2.0.2", + "@nuxt/devtools": "^1.7.0", + "@nuxt/kit": "3.15.4", + "@nuxt/schema": "3.15.4", + "@nuxt/telemetry": "^2.6.4", + "@nuxt/vite-builder": "3.15.4", + "@unhead/dom": "^1.11.18", + "@unhead/shared": "^1.11.18", + "@unhead/ssr": "^1.11.18", + "@unhead/vue": "^1.11.18", + "@vue/shared": "^3.5.13", + "acorn": "8.14.0", + "c12": "^2.0.1", + "chokidar": "^4.0.3", + "compatx": "^0.1.8", + "consola": "^3.4.0", + "cookie-es": "^1.2.2", + "defu": "^6.1.4", + "destr": "^2.0.3", + "devalue": "^5.1.1", + "errx": "^0.1.0", + "esbuild": "^0.24.2", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "globby": "^14.0.2", + "h3": "^1.14.0", + "hookable": "^5.5.3", + "ignore": "^7.0.3", + "impound": "^0.2.0", + "jiti": "^2.4.2", + "klona": "^2.0.6", + "knitwork": "^1.2.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "nanotar": "^0.2.0", + "nitropack": "^2.10.4", + "nypm": "^0.5.2", + "ofetch": "^1.4.1", + "ohash": "^1.1.4", + "pathe": "^2.0.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.3.1", + "radix3": "^1.1.2", + "scule": "^1.3.0", + "semver": "^7.6.3", + "std-env": "^3.8.0", + "strip-literal": "^3.0.0", + "tinyglobby": "0.2.10", + "ufo": "^1.5.4", + "ultrahtml": "^1.5.3", + "uncrypto": "^0.1.3", + "unctx": "^2.4.1", + "unenv": "^1.10.0", + "unhead": "^1.11.18", + "unimport": "^4.0.0", + "unplugin": "^2.1.2", + "unplugin-vue-router": "^0.11.2", + "unstorage": "^1.14.4", + "untyped": "^1.5.2", + "vue": "^3.5.13", + "vue-bundle-renderer": "^2.1.1", + "vue-devtools-stub": "^0.1.0", + "vue-router": "^4.5.0" + }, + "bin": { + "nuxi": "bin/nuxt.mjs", + "nuxt": "bin/nuxt.mjs" + }, + "engines": { + "node": "^18.20.5 || ^20.9.0 || >=22.0.0" + }, + "peerDependencies": { + "@parcel/watcher": "^2.1.0", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "peerDependenciesMeta": { + "@parcel/watcher": { + "optional": true + }, + "@types/node": { + "optional": true + } + } + }, + "node_modules/nuxt-oidc-auth": { + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/nuxt-oidc-auth/-/nuxt-oidc-auth-1.0.0-beta.5.tgz", + "integrity": "sha512-/bZ3yBfKmT40Kk66RZ9757SGMvqcZqLYRX6HK3l2o4N1dPvz1gW50t6cZ6UFJ63G7FWdHUuoRyo2INEpvbXe4g==", + "dependencies": { + "@nuxt/devtools-kit": "^1.7.0", + "@nuxt/devtools-ui-kit": "^1.7.0", + "consola": "^3.4.0", + "defu": "^6.1.4", + "h3": "^1.13.1", + "jose": "^5.9.6", + "ofetch": "^1.4.1", + "scule": "^1.3.0", + "sirv": "^3.0.0", + "ufo": "^1.5.4", + "uncrypto": "^0.1.3", + "undici": "^7.2.3", + "undio": "^0.2.0" + }, + "peerDependencies": { + "undici": "^7.2.1" + }, + "peerDependenciesMeta": { + "undici": { + "optional": true + } + } + }, + "node_modules/nuxt-oidc-auth/node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/nuxt-site-config": { + "version": "2.2.21", + "resolved": "https://registry.npmjs.org/nuxt-site-config/-/nuxt-site-config-2.2.21.tgz", + "integrity": "sha512-VsHpR4socGrlRPjyg2F8JqbirBqH4yCkTQa60fj7saqKMPW1VcRROn21OJzfTHDpjeD+KayRdR3FB0Jxk9WFNA==", + "dependencies": { + "@nuxt/devtools-kit": "^1.6.0", + "@nuxt/kit": "^3.13.2", + "@nuxt/schema": "^3.13.2", + "nuxt-site-config-kit": "2.2.21", + "pathe": "^1.1.2", + "pkg-types": "^1.2.1", + "sirv": "^3.0.0", + "site-config-stack": "2.2.21", + "ufo": "^1.5.4" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/nuxt-site-config-kit": { + "version": "2.2.21", + "resolved": "https://registry.npmjs.org/nuxt-site-config-kit/-/nuxt-site-config-kit-2.2.21.tgz", + "integrity": "sha512-xO41Zf6bXlA9Zvj+fX7ftD+ITee4LfrkzHj85Gt4FpgwonFxzGO5pMBtAqIxXKJwuyT1z2wVAixHI+ov66wV0w==", + "dependencies": { + "@nuxt/kit": "^3.13.2", + "@nuxt/schema": "^3.13.2", + "pkg-types": "^1.2.1", + "site-config-stack": "2.2.21", + "std-env": "^3.7.0", + "ufo": "^1.5.4" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/nuxt-site-config/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/nuxt-site-config/node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/nuxt/node_modules/unplugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.2.0.tgz", + "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/nypm": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.5.4.tgz", + "integrity": "sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "tinyexec": "^0.3.2", + "ufo": "^1.5.4" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ofetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.4.1.tgz", + "integrity": "sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==", + "dependencies": { + "destr": "^2.0.3", + "node-fetch-native": "^1.6.4", + "ufo": "^1.5.4" + } + }, + "node_modules/ohash": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.4.tgz", + "integrity": "sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g==" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", + "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open/node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/openapi-typescript": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.6.1.tgz", + "integrity": "sha512-F7RXEeo/heF3O9lOXo2bNjCOtfp7u+D6W3a3VNEH2xE6v+fxLtn5nq0uvUcA1F5aT+CMhNeC5Uqtg5tlXFX/ag==", + "dependencies": { + "@redocly/openapi-core": "^1.28.0", + "ansi-colors": "^4.1.3", + "change-case": "^5.4.4", + "parse-json": "^8.1.0", + "supports-color": "^9.4.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==" + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==" + }, + "node_modules/package-manager-detector": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.9.tgz", + "integrity": "sha512-+vYvA/Y31l8Zk8dwxHhL3JfTuHPm6tlxM2A3GeQyl7ovYnSp1+mzAxClxaOr0qO1TtPxbQxetI7v5XqKLJZk7Q==" + }, + "node_modules/packrup": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/packrup/-/packrup-0.1.2.tgz", + "integrity": "sha512-ZcKU7zrr5GlonoS9cxxrb5HVswGnyj6jQvwFBa6p5VFw7G71VAHcUKL5wyZSU/ECtPM/9gacWxy2KFQKt1gMNA==", + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/parse-git-config": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-3.0.0.tgz", + "integrity": "sha512-wXoQGL1D+2COYWCD35/xbiKma1Z15xvZL8cI25wvxzled58V51SJM04Urt/uznS900iQor7QO04SgdfT/XlbuA==", + "dependencies": { + "git-config-path": "^2.0.0", + "ini": "^1.3.5" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parse-git-config/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "node_modules/parse-json": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.1.0.tgz", + "integrity": "sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "index-to-position": "^0.1.2", + "type-fest": "^4.7.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-md": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/parse-md/-/parse-md-3.0.3.tgz", + "integrity": "sha512-2kpNrrW1GBgli5VT9X9/Y6n4PVsIFVdG49tguq1PHwzsRSK0Cu0yJPTUFOwWouFT85atYNWQ1T/rmqfj7kLd8g==", + "dependencies": { + "js-yaml": "^4.1.0" + } + }, + "node_modules/parse-path": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.1.tgz", + "integrity": "sha512-6ReLMptznuuOEzLoGEa+I1oWRSj2Zna5jLWC+l6zlfAI4dbbSaIES29ThzuPkbhNahT65dWzfoZEO6cfJw2Ksg==", + "dependencies": { + "protocols": "^2.0.0" + } + }, + "node_modules/parse-url": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-9.2.0.tgz", + "integrity": "sha512-bCgsFI+GeGWPAvAiUv63ZorMeif3/U0zaXABGJbOWt5OH2KCaPHF6S+0ok4aqM9RuIPGyZdx9tR9l13PsW4AYQ==", + "dependencies": { + "@types/parse-path": "^7.0.0", + "parse-path": "^7.0.0" + }, + "engines": { + "node": ">=14.13.0" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/path-type": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" + }, + "node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pinia": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.3.1.tgz", + "integrity": "sha512-khUlZSwt9xXCaTbbxFYBKDc/bWAGWJjOgvxETwkTN7KRm66EeT1ZdZj6i2ceh9sP2Pzqsbc704r2yngBrxBVug==", + "dependencies": { + "@vue/devtools-api": "^6.6.3", + "vue-demi": "^0.14.10" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "typescript": ">=4.4.4", + "vue": "^2.7.0 || ^3.5.11" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/pinia-plugin-persistedstate": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pinia-plugin-persistedstate/-/pinia-plugin-persistedstate-4.2.0.tgz", + "integrity": "sha512-3buhA7ac+ssbOIx3VRCC8oHkoFwhDM9oHRCjo7nj+O8WUqnW+jRqh7eYT5eS/DNa3H28zp3dYf/nd/Vc8zj8eQ==", + "dev": true, + "dependencies": { + "@nuxt/kit": "^3.14.1592", + "deep-pick-omit": "^1.2.1", + "defu": "^6.1.4", + "destr": "^2.0.3" + }, + "peerDependencies": { + "@pinia/nuxt": ">=0.9.0", + "pinia": ">=2.3.0" + }, + "peerDependenciesMeta": { + "@pinia/nuxt": { + "optional": true + }, + "pinia": { + "optional": true + } + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-calc": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-10.1.1.tgz", + "integrity": "sha512-NYEsLHh8DgG/PRH2+G9BTuUdtf9ViS+vdoQ0YA5OQdGsfN4ztiwtDWNtBl9EKeqNMFnIu8IKZ0cLxEQ5r5KVMw==", + "dependencies": { + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12 || ^20.9 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.38" + } + }, + "node_modules/postcss-colormin": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-7.0.2.tgz", + "integrity": "sha512-YntRXNngcvEvDbEjTdRWGU606eZvB5prmHG4BF0yLmVpamXbpsRJzevyy6MZVyuecgzI2AWAlvFi8DAeCqwpvA==", + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0", + "colord": "^2.9.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-convert-values": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.4.tgz", + "integrity": "sha512-e2LSXPqEHVW6aoGbjV9RsSSNDO3A0rZLCBxN24zvxF25WknMPpX8Dm9UxxThyEbaytzggRuZxaGXqaOhxQ514Q==", + "dependencies": { + "browserslist": "^4.23.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-comments": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-7.0.3.tgz", + "integrity": "sha512-q6fjd4WU4afNhWOA2WltHgCbkRhZPgQe7cXF74fuVB/ge4QbM9HEaOIzGSiMvM+g/cOsNAUGdf2JDzqA2F8iLA==", + "dependencies": { + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-comments/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-7.0.1.tgz", + "integrity": "sha512-oZA+v8Jkpu1ct/xbbrntHRsfLGuzoP+cpt0nJe5ED2FQF8n8bJtn7Bo28jSmBYwqgqnqkuSXJfSUEE7if4nClQ==", + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-empty": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-7.0.0.tgz", + "integrity": "sha512-e+QzoReTZ8IAwhnSdp/++7gBZ/F+nBq9y6PomfwORfP7q9nBpK5AMP64kOt0bA+lShBFbBDcgpJ3X4etHg4lzA==", + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-7.0.0.tgz", + "integrity": "sha512-GmNAzx88u3k2+sBTZrJSDauR0ccpE24omTQCVmaTTZFz1du6AasspjaUPMJ2ud4RslZpoFKyf+6MSPETLojc6w==", + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-merge-longhand": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-7.0.4.tgz", + "integrity": "sha512-zer1KoZA54Q8RVHKOY5vMke0cCdNxMP3KBfDerjH/BYHh4nCIh+1Yy0t1pAEQF18ac/4z3OFclO+ZVH8azjR4A==", + "dependencies": { + "postcss-value-parser": "^4.2.0", + "stylehacks": "^7.0.4" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-merge-rules": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-7.0.4.tgz", + "integrity": "sha512-ZsaamiMVu7uBYsIdGtKJ64PkcQt6Pcpep/uO90EpLS3dxJi6OXamIobTYcImyXGoW0Wpugh7DSD3XzxZS9JCPg==", + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^5.0.0", + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-merge-rules/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-7.0.0.tgz", + "integrity": "sha512-2ckkZtgT0zG8SMc5aoNwtm5234eUx1GGFJKf2b1bSp8UflqaeFzR50lid4PfqVI9NtGqJ2J4Y7fwvnP/u1cQog==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-7.0.0.tgz", + "integrity": "sha512-pdUIIdj/C93ryCHew0UgBnL2DtUS3hfFa5XtERrs4x+hmpMYGhbzo6l/Ir5de41O0GaKVpK1ZbDNXSY6GkXvtg==", + "dependencies": { + "colord": "^2.9.3", + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-params": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-7.0.2.tgz", + "integrity": "sha512-nyqVLu4MFl9df32zTsdcLqCFfE/z2+f8GE1KHPxWOAmegSo6lpV2GNy5XQvrzwbLmiU7d+fYay4cwto1oNdAaQ==", + "dependencies": { + "browserslist": "^4.23.3", + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-7.0.4.tgz", + "integrity": "sha512-JG55VADcNb4xFCf75hXkzc1rNeURhlo7ugf6JjiiKRfMsKlDzN9CXHZDyiG6x/zGchpjQS+UAgb1d4nqXqOpmA==", + "dependencies": { + "cssesc": "^3.0.0", + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-minify-selectors/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-7.0.0.tgz", + "integrity": "sha512-ABisNUXMeZeDNzCQxPxBCkXexvBrUHV+p7/BXOY+ulxkcjUZO0cp8ekGBwvIh2LbCwnWbyMPNJVtBSdyhM2zYQ==", + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-7.0.0.tgz", + "integrity": "sha512-lnFZzNPeDf5uGMPYgGOw7v0BfB45+irSRz9gHQStdkkhiM0gTfvWkWB5BMxpn0OqgOQuZG/mRlZyJxp0EImr2Q==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-7.0.0.tgz", + "integrity": "sha512-I0yt8wX529UKIGs2y/9Ybs2CelSvItfmvg/DBIjTnoUSrPxSV7Z0yZ8ShSVtKNaV/wAY+m7bgtyVQLhB00A1NQ==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-7.0.0.tgz", + "integrity": "sha512-o3uSGYH+2q30ieM3ppu9GTjSXIzOrRdCUn8UOMGNw7Af61bmurHTWI87hRybrP6xDHvOe5WlAj3XzN6vEO8jLw==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-string": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-7.0.0.tgz", + "integrity": "sha512-w/qzL212DFVOpMy3UGyxrND+Kb0fvCiBBujiaONIihq7VvtC7bswjWgKQU/w4VcRyDD8gpfqUiBQ4DUOwEJ6Qg==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-7.0.0.tgz", + "integrity": "sha512-tNgw3YV0LYoRwg43N3lTe3AEWZ66W7Dh7lVEpJbHoKOuHc1sLrzMLMFjP8SNULHaykzsonUEDbKedv8C+7ej6g==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-7.0.2.tgz", + "integrity": "sha512-ztisabK5C/+ZWBdYC+Y9JCkp3M9qBv/XFvDtSw0d/XwfT3UaKeW/YTm/MD/QrPNxuecia46vkfEhewjwcYFjkg==", + "dependencies": { + "browserslist": "^4.23.3", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-7.0.0.tgz", + "integrity": "sha512-+d7+PpE+jyPX1hDQZYG+NaFD+Nd2ris6r8fPTBAjE8z/U41n/bib3vze8x7rKs5H1uEw5ppe9IojewouHk0klQ==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-7.0.0.tgz", + "integrity": "sha512-37/toN4wwZErqohedXYqWgvcHUGlT8O/m2jVkAfAe9Bd4MzRqlBmXrJRePH0e9Wgnz2X7KymTgTOaaFizQe3AQ==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-ordered-values": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-7.0.1.tgz", + "integrity": "sha512-irWScWRL6nRzYmBOXReIKch75RRhNS86UPUAxXdmW/l0FcAsg0lvAXQCby/1lymxn/o0gVa6Rv/0f03eJOwHxw==", + "dependencies": { + "cssnano-utils": "^5.0.0", + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-7.0.2.tgz", + "integrity": "sha512-pOnu9zqQww7dEKf62Nuju6JgsW2V0KRNBHxeKohU+JkHd/GAH5uvoObqFLqkeB2n20mr6yrlWDvo5UBU5GnkfA==", + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-7.0.0.tgz", + "integrity": "sha512-pnt1HKKZ07/idH8cpATX/ujMbtOGhUfE+m8gbqwJE05aTaNw8gbo34a2e3if0xc0dlu75sUOiqvwCGY3fzOHew==", + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-7.0.1.tgz", + "integrity": "sha512-0WBUlSL4lhD9rA5k1e5D8EN5wCEyZD6HJk0jIvRxl+FDVOMlJ7DePHYWGGVc5QRqrJ3/06FTXM0bxjmJpmTPSA==", + "dependencies": { + "postcss-value-parser": "^4.2.0", + "svgo": "^3.3.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >= 18" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-7.0.3.tgz", + "integrity": "sha512-J+58u5Ic5T1QjP/LDV9g3Cx4CNOgB5vz+kM6+OxHHhFACdcDeKhBXjQmB7fnIZM12YSTvsL0Opwco83DmacW2g==", + "dependencies": { + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-unique-selectors/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==" + }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/pretty-bytes": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz", + "integrity": "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==", + "engines": { + "node": "^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/prom-client": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/prom-client/-/prom-client-14.2.0.tgz", + "integrity": "sha512-sF308EhTenb/pDRPakm+WgiN+VdM/T1RaHj1x+MvAuT8UiQP8JmOEbxVqtkbfR4LrvOg5n7ic01kRBDGXjYikA==", + "dependencies": { + "tdigest": "^0.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/protocols": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.2.tgz", + "integrity": "sha512-hHVTzba3wboROl0/aWRRG9dMytgH6ow//STBZh43l/wQgmMhYhOFi0EHWAPtoCz9IAUymsyP0TSBHkhgMEGNnQ==" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/radix3": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz", + "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==" + }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==" + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" + }, + "node_modules/resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==" + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/rollup": { + "version": "4.34.8", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.8.tgz", + "integrity": "sha512-489gTVMzAYdiZHFVA/ig/iYFllCcWFHMvUHI1rpFmkoUtRlQxqh6/yiNqnYibjMZ2b/+FUQwldG+aLsEt6bglQ==", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.34.8", + "@rollup/rollup-android-arm64": "4.34.8", + "@rollup/rollup-darwin-arm64": "4.34.8", + "@rollup/rollup-darwin-x64": "4.34.8", + "@rollup/rollup-freebsd-arm64": "4.34.8", + "@rollup/rollup-freebsd-x64": "4.34.8", + "@rollup/rollup-linux-arm-gnueabihf": "4.34.8", + "@rollup/rollup-linux-arm-musleabihf": "4.34.8", + "@rollup/rollup-linux-arm64-gnu": "4.34.8", + "@rollup/rollup-linux-arm64-musl": "4.34.8", + "@rollup/rollup-linux-loongarch64-gnu": "4.34.8", + "@rollup/rollup-linux-powerpc64le-gnu": "4.34.8", + "@rollup/rollup-linux-riscv64-gnu": "4.34.8", + "@rollup/rollup-linux-s390x-gnu": "4.34.8", + "@rollup/rollup-linux-x64-gnu": "4.34.8", + "@rollup/rollup-linux-x64-musl": "4.34.8", + "@rollup/rollup-win32-arm64-msvc": "4.34.8", + "@rollup/rollup-win32-ia32-msvc": "4.34.8", + "@rollup/rollup-win32-x64-msvc": "4.34.8", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-visualizer": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.14.0.tgz", + "integrity": "sha512-VlDXneTDaKsHIw8yzJAFWtrzguoJ/LnQ+lMpoVfYJ3jJF4Ihe5oYLAqLklIK/35lgUY+1yEzCkHyZ1j4A5w5fA==", + "dependencies": { + "open": "^8.4.0", + "picomatch": "^4.0.2", + "source-map": "^0.7.4", + "yargs": "^17.5.1" + }, + "bin": { + "rollup-plugin-visualizer": "dist/bin/cli.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "rolldown": "1.x", + "rollup": "2.x || 3.x || 4.x" + }, + "peerDependenciesMeta": { + "rolldown": { + "optional": true + }, + "rollup": { + "optional": true + } + } + }, + "node_modules/rollup-plugin-visualizer/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/sass": { + "version": "1.85.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.0.tgz", + "integrity": "sha512-3ToiC1xZ1Y8aU7+CkgCI/tqyuPXEmYGJXO7H4uqp0xkLXUqp88rQQ4j1HmP37xSJLbCJPaIiv+cT1y+grssrww==", + "devOptional": true, + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/schema-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", + "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==" + }, + "node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-placeholder": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/serve-placeholder/-/serve-placeholder-2.0.2.tgz", + "integrity": "sha512-/TMG8SboeiQbZJWRlfTCqMs2DD3SZgWp0kDQePz9yUuCnDfDh/92gf7/PxGhzXTKBIPASIHxFcZndoNbp6QOLQ==", + "dependencies": { + "defu": "^6.1.4" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz", + "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/simple-git": { + "version": "3.27.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.27.0.tgz", + "integrity": "sha512-ivHoFS9Yi9GY49ogc6/YAi3Fl9ROnF4VyubNylgCkA+RVqLaKWnDSzXOVzya8csELIaWaYNutsEuAhZrtOjozA==", + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", + "debug": "^4.3.5" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/git-js?sponsor=1" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" + }, + "node_modules/site-config-stack": { + "version": "2.2.21", + "resolved": "https://registry.npmjs.org/site-config-stack/-/site-config-stack-2.2.21.tgz", + "integrity": "sha512-HRIgIgZAEK8XFYYepL/KtygJgmcUPdgxBJl0ueSrA12lNo2tk5aMkSuA2Oz/k6chnTbEwd6ESMYCs6opgYKNHw==", + "dependencies": { + "ufo": "^1.5.4" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + }, + "peerDependencies": { + "vue": "^3" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/smob": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/speakingurl": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", + "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/splitpanes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/splitpanes/-/splitpanes-3.1.8.tgz", + "integrity": "sha512-iYir0doakV9gYBfCuflGCxCD5Yhh09OGgT+epjfc6LZfTvGDdMXuD0Q4w6jI3hlkdRR1Ta3DlARcV3MOkybymg==", + "funding": { + "url": "https://github.com/sponsors/antoniandre" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/sql-formatter": { + "version": "15.4.11", + "resolved": "https://registry.npmjs.org/sql-formatter/-/sql-formatter-15.4.11.tgz", + "integrity": "sha512-AfIjH0mYxv0NVzs4mbcGIAcos2Si20LeF9GMk0VmVA4A3gs1PFIixVu3rtcz34ls7ghPAjrDb+XbRly/aF6HAg==", + "dependencies": { + "argparse": "^2.0.1", + "get-stdin": "=8.0.0", + "nearley": "^2.20.1" + }, + "bin": { + "sql-formatter": "bin/sql-formatter-cli.cjs" + } + }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz", + "integrity": "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==" + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/std-env": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==" + }, + "node_modules/streamx": { + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz", + "integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==", + "dependencies": { + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.0.0.tgz", + "integrity": "sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/strip-literal/node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==" + }, + "node_modules/stylehacks": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-7.0.4.tgz", + "integrity": "sha512-i4zfNrGMt9SB4xRK9L83rlsFCgdGANfeDAYacO1pkqcE7cRHPdWHwnKZVz7WY17Veq/FvyYsRAU++Ga+qDFIww==", + "dependencies": { + "browserslist": "^4.23.3", + "postcss-selector-parser": "^6.1.2" + }, + "engines": { + "node": "^18.12.0 || ^20.9.0 || >=22.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/stylehacks/node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sucrase/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sucrase/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/superjson": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.2.tgz", + "integrity": "sha512-5JRxVqC8I8NuOUjzBbvVJAKNM8qoVuH0O77h4WInc/qC2q5IreqKxYwgkga3PfA22OayK2ikceb/B26dztPl+Q==", + "dependencies": { + "copy-anything": "^3.0.2" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==" + }, + "node_modules/svgo": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", + "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^5.1.0", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", + "picocolors": "^1.0.0" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/svgo" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/system-architecture": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz", + "integrity": "sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/tdigest": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.2.tgz", + "integrity": "sha512-+G0LLgjjo9BZX2MfdvPfH+MKLCrxlXSYec5DaPYP1fe6Iyhf0/fSmJ0bFiZ1F8BT6cGXl2LpltQptzjXKWEkKA==", + "dependencies": { + "bintrees": "1.0.2" + } + }, + "node_modules/terser": { + "version": "5.39.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", + "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.11", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz", + "integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "dependencies": { + "b4a": "^1.6.4" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tiny-invariant": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz", + "integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==" + }, + "node_modules/tinyglobby": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz", + "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==", + "dependencies": { + "fdir": "^6.4.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tosource": { + "version": "2.0.0-alpha.3", + "resolved": "https://registry.npmjs.org/tosource/-/tosource-2.0.0-alpha.3.tgz", + "integrity": "sha512-KAB2lrSS48y91MzFPFuDg4hLbvDiyTjOVgaK7Erw+5AmZXNq4sFRVn8r6yxSLuNs15PaokrDRpS61ERY9uZOug==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, + "node_modules/tsx": { + "version": "4.19.3", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz", + "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz", + "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz", + "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz", + "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz", + "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz", + "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz", + "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz", + "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz", + "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz", + "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz", + "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz", + "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz", + "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz", + "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz", + "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz", + "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz", + "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz", + "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz", + "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz", + "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz", + "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz", + "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz", + "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz", + "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz", + "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz", + "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz", + "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.0", + "@esbuild/android-arm": "0.25.0", + "@esbuild/android-arm64": "0.25.0", + "@esbuild/android-x64": "0.25.0", + "@esbuild/darwin-arm64": "0.25.0", + "@esbuild/darwin-x64": "0.25.0", + "@esbuild/freebsd-arm64": "0.25.0", + "@esbuild/freebsd-x64": "0.25.0", + "@esbuild/linux-arm": "0.25.0", + "@esbuild/linux-arm64": "0.25.0", + "@esbuild/linux-ia32": "0.25.0", + "@esbuild/linux-loong64": "0.25.0", + "@esbuild/linux-mips64el": "0.25.0", + "@esbuild/linux-ppc64": "0.25.0", + "@esbuild/linux-riscv64": "0.25.0", + "@esbuild/linux-s390x": "0.25.0", + "@esbuild/linux-x64": "0.25.0", + "@esbuild/netbsd-arm64": "0.25.0", + "@esbuild/netbsd-x64": "0.25.0", + "@esbuild/openbsd-arm64": "0.25.0", + "@esbuild/openbsd-x64": "0.25.0", + "@esbuild/sunos-x64": "0.25.0", + "@esbuild/win32-arm64": "0.25.0", + "@esbuild/win32-ia32": "0.25.0", + "@esbuild/win32-x64": "0.25.0" + } + }, + "node_modules/tus-js-client": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/tus-js-client/-/tus-js-client-4.3.1.tgz", + "integrity": "sha512-ZLeYmjrkaU1fUsKbIi8JML52uAocjEZtBx4DKjRrqzrZa0O4MYwT6db+oqePlspV+FxXJAyFBc/L5gwUi2OFsg==", + "dependencies": { + "buffer-from": "^1.1.2", + "combine-errors": "^3.0.3", + "is-stream": "^2.0.0", + "js-base64": "^3.7.2", + "lodash.throttle": "^4.1.1", + "proper-lockfile": "^4.1.2", + "url-parse": "^1.5.7" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/tus-js-client/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-fest": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.35.0.tgz", + "integrity": "sha512-2/AwEFQDFEy30iOLjrvHDIH7e4HEWH+f1Yl1bI5XMqzuoCUqwYCdxachgsgv0og/JdVZUhbfjcJAoHj5L1753A==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" + }, + "node_modules/ultrahtml": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ultrahtml/-/ultrahtml-1.5.3.tgz", + "integrity": "sha512-GykOvZwgDWZlTQMtp5jrD4BVL+gNn2NVlVafjcFUJ7taY20tqYdwdoWBFy6GBJsNTZe1GkGPkSl5knQAjtgceg==" + }, + "node_modules/unconfig": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/unconfig/-/unconfig-0.6.1.tgz", + "integrity": "sha512-cVU+/sPloZqOyJEAfNwnQSFCzFrZm85vcVkryH7lnlB/PiTycUkAjt5Ds79cfIshGOZ+M5v3PBDnKgpmlE5DtA==", + "dependencies": { + "@antfu/utils": "^8.1.0", + "defu": "^6.1.4", + "importx": "^0.5.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/unconfig/node_modules/@antfu/utils": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@antfu/utils/-/utils-8.1.1.tgz", + "integrity": "sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ==", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/uncrypto": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz", + "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==" + }, + "node_modules/unctx": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/unctx/-/unctx-2.4.1.tgz", + "integrity": "sha512-AbaYw0Nm4mK4qjhns67C+kgxR2YWiwlDBPzxrN8h8C6VtAdCgditAY5Dezu3IJy4XVqAnbrXt9oQJvsn3fyozg==", + "dependencies": { + "acorn": "^8.14.0", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17", + "unplugin": "^2.1.0" + } + }, + "node_modules/unctx/node_modules/unplugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.2.0.tgz", + "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/undici": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.3.0.tgz", + "integrity": "sha512-Qy96NND4Dou5jKoSJ2gm8ax8AJM/Ey9o9mz7KN1bb9GP+G0l20Zw8afxTnY2f4b7hmhn/z8aC2kfArVQlAhFBw==", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" + }, + "node_modules/undio": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/undio/-/undio-0.2.0.tgz", + "integrity": "sha512-1LH824ipsUNqX1qsO6qpcusv0oGPlfFWVykwWq5jJB0Mq6x4kEHO/izSq2KLjGZvOosEd91+HXoxYUSoVI0zPg==" + }, + "node_modules/unenv": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.10.0.tgz", + "integrity": "sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==", + "dependencies": { + "consola": "^3.2.3", + "defu": "^6.1.4", + "mime": "^3.0.0", + "node-fetch-native": "^1.6.4", + "pathe": "^1.1.2" + } + }, + "node_modules/unenv/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/unenv/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/unhead": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/unhead/-/unhead-1.11.19.tgz", + "integrity": "sha512-O5AYb3+xUOzBlwDmPfC/DgGp9rDMoGkB4gFkhoaz8IonQqP8W8qqetxYf5ZyEdntvXnFsMWS8lZF//5176xo6Q==", + "dependencies": { + "@unhead/dom": "1.11.19", + "@unhead/schema": "1.11.19", + "@unhead/shared": "1.11.19", + "hookable": "^5.5.3" + }, + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unimport": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/unimport/-/unimport-4.1.2.tgz", + "integrity": "sha512-oVUL7PSlyVV3QRhsdcyYEMaDX8HJyS/CnUonEJTYA3//bWO+o/4gG8F7auGWWWkrrxBQBYOO8DKe+C53ktpRXw==", + "dependencies": { + "acorn": "^8.14.0", + "escape-string-regexp": "^5.0.0", + "estree-walker": "^3.0.3", + "local-pkg": "^1.0.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "pkg-types": "^1.3.1", + "scule": "^1.3.0", + "strip-literal": "^3.0.0", + "tinyglobby": "^0.2.11", + "unplugin": "^2.2.0", + "unplugin-utils": "^0.2.4" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/unimport/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/unimport/node_modules/tinyglobby": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", + "integrity": "sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==", + "dependencies": { + "fdir": "^6.4.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/unimport/node_modules/unplugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.2.0.tgz", + "integrity": "sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unocss": { + "version": "0.65.4", + "resolved": "https://registry.npmjs.org/unocss/-/unocss-0.65.4.tgz", + "integrity": "sha512-KUCW5OzI20Ik6j1zXkkrpWhxZ59TwSKl6+DvmYHEzMfaEcrHlBZaFSApAoSt2CYSvo6SluGiKyr+Im1UTkd4KA==", + "dependencies": { + "@unocss/astro": "0.65.4", + "@unocss/cli": "0.65.4", + "@unocss/core": "0.65.4", + "@unocss/postcss": "0.65.4", + "@unocss/preset-attributify": "0.65.4", + "@unocss/preset-icons": "0.65.4", + "@unocss/preset-mini": "0.65.4", + "@unocss/preset-tagify": "0.65.4", + "@unocss/preset-typography": "0.65.4", + "@unocss/preset-uno": "0.65.4", + "@unocss/preset-web-fonts": "0.65.4", + "@unocss/preset-wind": "0.65.4", + "@unocss/transformer-attributify-jsx": "0.65.4", + "@unocss/transformer-compile-class": "0.65.4", + "@unocss/transformer-directives": "0.65.4", + "@unocss/transformer-variant-group": "0.65.4", + "@unocss/vite": "0.65.4" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@unocss/webpack": "0.65.4", + "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0" + }, + "peerDependenciesMeta": { + "@unocss/webpack": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/unplugin": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.16.1.tgz", + "integrity": "sha512-4/u/j4FrCKdi17jaxuJA0jClGxB1AvU2hw/IuayPc4ay1XGaJs/rbb4v5WKwAjNifjmXK9PIFyuPiaK8azyR9w==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/unplugin-utils": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/unplugin-utils/-/unplugin-utils-0.2.4.tgz", + "integrity": "sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==", + "dependencies": { + "pathe": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, + "node_modules/unplugin-vue-router": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/unplugin-vue-router/-/unplugin-vue-router-0.11.2.tgz", + "integrity": "sha512-X8BbQ3BNnMqaCYeMj80jtz5jC4AB0jcpdmECIYey9qKm6jy/upaPZ/WzfuT+iTGRiQAY4WemHueXxuzH127oOg==", + "dependencies": { + "@babel/types": "^7.26.5", + "@rollup/pluginutils": "^5.1.4", + "@vue-macros/common": "^1.16.1", + "ast-walker-scope": "^0.6.2", + "chokidar": "^3.6.0", + "fast-glob": "^3.3.3", + "json5": "^2.2.3", + "local-pkg": "^1.0.0", + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "pathe": "^2.0.2", + "scule": "^1.3.0", + "unplugin": "2.1.2", + "yaml": "^2.7.0" + }, + "peerDependencies": { + "vue-router": "^4.4.0" + }, + "peerDependenciesMeta": { + "vue-router": { + "optional": true + } + } + }, + "node_modules/unplugin-vue-router/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/unplugin-vue-router/node_modules/local-pkg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.0.0.tgz", + "integrity": "sha512-bbgPw/wmroJsil/GgL4qjDzs5YLTBMQ99weRsok1XCDccQeehbHA/I1oRvk2NPtr7KGZgT/Y5tPRnAtMqeG2Kg==", + "dependencies": { + "mlly": "^1.7.3", + "pkg-types": "^1.3.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/unplugin-vue-router/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/unplugin-vue-router/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/unplugin-vue-router/node_modules/unplugin": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.1.2.tgz", + "integrity": "sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==", + "dependencies": { + "acorn": "^8.14.0", + "webpack-virtual-modules": "^0.6.2" + }, + "engines": { + "node": ">=18.12.0" + } + }, + "node_modules/unstorage": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.15.0.tgz", + "integrity": "sha512-m40eHdGY/gA6xAPqo8eaxqXgBuzQTlAKfmB1iF7oCKXE1HfwHwzDJBywK+qQGn52dta+bPlZluPF7++yR3p/bg==", + "dependencies": { + "anymatch": "^3.1.3", + "chokidar": "^4.0.3", + "destr": "^2.0.3", + "h3": "^1.15.0", + "lru-cache": "^10.4.3", + "node-fetch-native": "^1.6.6", + "ofetch": "^1.4.1", + "ufo": "^1.5.4" + }, + "peerDependencies": { + "@azure/app-configuration": "^1.8.0", + "@azure/cosmos": "^4.2.0", + "@azure/data-tables": "^13.3.0", + "@azure/identity": "^4.6.0", + "@azure/keyvault-secrets": "^4.9.0", + "@azure/storage-blob": "^12.26.0", + "@capacitor/preferences": "^6.0.3", + "@deno/kv": ">=0.9.0", + "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0", + "@planetscale/database": "^1.19.0", + "@upstash/redis": "^1.34.3", + "@vercel/blob": ">=0.27.1", + "@vercel/kv": "^1.0.1", + "aws4fetch": "^1.0.20", + "db0": ">=0.2.1", + "idb-keyval": "^6.2.1", + "ioredis": "^5.4.2", + "uploadthing": "^7.4.4" + }, + "peerDependenciesMeta": { + "@azure/app-configuration": { + "optional": true + }, + "@azure/cosmos": { + "optional": true + }, + "@azure/data-tables": { + "optional": true + }, + "@azure/identity": { + "optional": true + }, + "@azure/keyvault-secrets": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@capacitor/preferences": { + "optional": true + }, + "@deno/kv": { + "optional": true + }, + "@netlify/blobs": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@vercel/blob": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "aws4fetch": { + "optional": true + }, + "db0": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "uploadthing": { + "optional": true + } + } + }, + "node_modules/unstorage/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + }, + "node_modules/untun": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/untun/-/untun-0.1.3.tgz", + "integrity": "sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ==", + "dependencies": { + "citty": "^0.1.5", + "consola": "^3.2.3", + "pathe": "^1.1.1" + }, + "bin": { + "untun": "bin/untun.mjs" + } + }, + "node_modules/untun/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/untyped": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/untyped/-/untyped-1.5.2.tgz", + "integrity": "sha512-eL/8PlhLcMmlMDtNPKhyyz9kEBDS3Uk4yMu/ewlkT2WFbtzScjHWPJLdQLmaGPUKjXzwe9MumOtOgc4Fro96Kg==", + "dependencies": { + "@babel/core": "^7.26.0", + "@babel/standalone": "^7.26.4", + "@babel/types": "^7.26.3", + "citty": "^0.1.6", + "defu": "^6.1.4", + "jiti": "^2.4.1", + "knitwork": "^1.2.0", + "scule": "^1.3.0" + }, + "bin": { + "untyped": "dist/cli.mjs" + } + }, + "node_modules/unwasm": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/unwasm/-/unwasm-0.3.9.tgz", + "integrity": "sha512-LDxTx/2DkFURUd+BU1vUsF/moj0JsoTvl+2tcg2AUOiEzVturhGGx17/IMgGvKUYdZwr33EJHtChCJuhu9Ouvg==", + "dependencies": { + "knitwork": "^1.0.0", + "magic-string": "^0.30.8", + "mlly": "^1.6.1", + "pathe": "^1.1.2", + "pkg-types": "^1.0.3", + "unplugin": "^1.10.0" + } + }, + "node_modules/unwasm/node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==" + }, + "node_modules/upath": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-2.0.1.tgz", + "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", + "devOptional": true, + "engines": { + "node": ">=4", + "yarn": "*" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uqr": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz", + "integrity": "sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==" + }, + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==" + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, + "node_modules/urlpattern-polyfill": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/v-lazy-show": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/v-lazy-show/-/v-lazy-show-0.3.0.tgz", + "integrity": "sha512-xpVALnvzB+RoDkI/5gqzVC2bL/Mh0Mw5/cPpSWJTTS6K4yDwFE2hZr5OsgFS74c6IHV6/k0jzSkAFXJttnhufg==", + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/compiler-core": "^3.5" + } + }, + "node_modules/vite": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.1.1.tgz", + "integrity": "sha512-4GgM54XrwRfrOp297aIYspIti66k56v16ZnqHvrIM7mG+HjDlAwS7p+Srr7J6fGvEdOJ5JcQ/D9T7HhtdXDTzA==", + "dependencies": { + "esbuild": "^0.24.2", + "postcss": "^8.5.2", + "rollup": "^4.30.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-hot-client": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vite-hot-client/-/vite-hot-client-0.2.4.tgz", + "integrity": "sha512-a1nzURqO7DDmnXqabFOliz908FRmIppkBKsJthS8rbe8hBEXwEwe4C3Pp33Z1JoFCYfVL4kTOMLKk0ZZxREIeA==", + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vite": "^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0" + } + }, + "node_modules/vite-node": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.0.7.tgz", + "integrity": "sha512-2fX0QwX4GkkkpULXdT1Pf4q0tC1i1lFOyseKoonavXUNlQ77KpW2XqBGGNIm/J4Ows4KxgGJzDguYVPKwG/n5A==", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.0", + "es-module-lexer": "^1.6.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-plugin-checker": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/vite-plugin-checker/-/vite-plugin-checker-0.8.0.tgz", + "integrity": "sha512-UA5uzOGm97UvZRTdZHiQVYFnd86AVn8EVaD4L3PoVzxH+IZSfaAw14WGFwX9QS23UW3lV/5bVKZn6l0w+q9P0g==", + "dependencies": { + "@babel/code-frame": "^7.12.13", + "ansi-escapes": "^4.3.0", + "chalk": "^4.1.1", + "chokidar": "^3.5.1", + "commander": "^8.0.0", + "fast-glob": "^3.2.7", + "fs-extra": "^11.1.0", + "npm-run-path": "^4.0.1", + "strip-ansi": "^6.0.0", + "tiny-invariant": "^1.1.0", + "vscode-languageclient": "^7.0.0", + "vscode-languageserver": "^7.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-uri": "^3.0.2" + }, + "engines": { + "node": ">=14.16" + }, + "peerDependencies": { + "@biomejs/biome": ">=1.7", + "eslint": ">=7", + "meow": "^9.0.0", + "optionator": "^0.9.1", + "stylelint": ">=13", + "typescript": "*", + "vite": ">=2.0.0", + "vls": "*", + "vti": "*", + "vue-tsc": "~2.1.6" + }, + "peerDependenciesMeta": { + "@biomejs/biome": { + "optional": true + }, + "eslint": { + "optional": true + }, + "meow": { + "optional": true + }, + "optionator": { + "optional": true + }, + "stylelint": { + "optional": true + }, + "typescript": { + "optional": true + }, + "vls": { + "optional": true + }, + "vti": { + "optional": true + }, + "vue-tsc": { + "optional": true + } + } + }, + "node_modules/vite-plugin-checker/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/vite-plugin-checker/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/vite-plugin-checker/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/vite-plugin-checker/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/vite-plugin-checker/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/vite-plugin-checker/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/vite-plugin-checker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/vite-plugin-inspect": { + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/vite-plugin-inspect/-/vite-plugin-inspect-0.8.9.tgz", + "integrity": "sha512-22/8qn+LYonzibb1VeFZmISdVao5kC22jmEKm24vfFE8siEn47EpVcCLYMv6iKOYMJfjSvSJfueOwcFCkUnV3A==", + "dependencies": { + "@antfu/utils": "^0.7.10", + "@rollup/pluginutils": "^5.1.3", + "debug": "^4.3.7", + "error-stack-parser-es": "^0.1.5", + "fs-extra": "^11.2.0", + "open": "^10.1.0", + "perfect-debounce": "^1.0.0", + "picocolors": "^1.1.1", + "sirv": "^3.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "vite": "^3.1.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.1" + }, + "peerDependenciesMeta": { + "@nuxt/kit": { + "optional": true + } + } + }, + "node_modules/vite-plugin-inspect/node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vite-plugin-inspect/node_modules/open": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/vite-plugin-inspect/node_modules/sirv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.1.tgz", + "integrity": "sha512-FoqMu0NCGBLCcAkS1qA+XJIQTR6/JHfQXl+uGteNCQ76T91DMUjPa9xfmeqMY3z80nLSg9yQmNjK0Px6RWsH/A==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/vite-plugin-vue-inspector": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite-plugin-vue-inspector/-/vite-plugin-vue-inspector-5.3.1.tgz", + "integrity": "sha512-cBk172kZKTdvGpJuzCCLg8lJ909wopwsu3Ve9FsL1XsnLBiRT9U3MePcqrgGHgCX2ZgkqZmAGR8taxw+TV6s7A==", + "dependencies": { + "@babel/core": "^7.23.0", + "@babel/plugin-proposal-decorators": "^7.23.0", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.22.15", + "@vue/babel-plugin-jsx": "^1.1.5", + "@vue/compiler-dom": "^3.3.4", + "kolorist": "^1.8.0", + "magic-string": "^0.30.4" + }, + "peerDependencies": { + "vite": "^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.0-0" + } + }, + "node_modules/vite-plugin-vuetify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/vite-plugin-vuetify/-/vite-plugin-vuetify-2.1.0.tgz", + "integrity": "sha512-4wEAQtZaigPpwbFcZbrKpYwutOsWwWdeXn22B9XHzDPQNxVsKT+K9lKcXZnI5JESO1Iaql48S9rOk8RZZEt+Mw==", + "devOptional": true, + "dependencies": { + "@vuetify/loader-shared": "^2.1.0", + "debug": "^4.3.3", + "upath": "^2.0.1" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": ">=5", + "vue": "^3.0.0", + "vuetify": "^3.0.0" + } + }, + "node_modules/vscode-jsonrpc": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", + "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", + "engines": { + "node": ">=8.0.0 || >=10.0.0" + } + }, + "node_modules/vscode-languageclient": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-7.0.0.tgz", + "integrity": "sha512-P9AXdAPlsCgslpP9pRxYPqkNYV7Xq8300/aZDpO35j1fJm/ncize8iGswzYlcvFw5DQUx4eVk+KvfXdL0rehNg==", + "dependencies": { + "minimatch": "^3.0.4", + "semver": "^7.3.4", + "vscode-languageserver-protocol": "3.16.0" + }, + "engines": { + "vscode": "^1.52.0" + } + }, + "node_modules/vscode-languageserver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", + "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", + "dependencies": { + "vscode-languageserver-protocol": "3.16.0" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", + "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", + "dependencies": { + "vscode-jsonrpc": "6.0.0", + "vscode-languageserver-types": "3.16.0" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", + "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==" + }, + "node_modules/vscode-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", + "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==" + }, + "node_modules/vue": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", + "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-sfc": "3.5.13", + "@vue/runtime-dom": "3.5.13", + "@vue/server-renderer": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-axios": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/vue-axios/-/vue-axios-3.5.2.tgz", + "integrity": "sha512-GP+dct7UlAWkl1qoP3ppw0z6jcSua5/IrMpjB5O8bh089iIiJ+hdxPYH2NPEpajlYgkW5EVMP95ttXWdas1O0g==", + "peerDependencies": { + "axios": "*", + "vue": "^3.0.0 || ^2.0.0" + } + }, + "node_modules/vue-bundle-renderer": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/vue-bundle-renderer/-/vue-bundle-renderer-2.1.1.tgz", + "integrity": "sha512-+qALLI5cQncuetYOXp4yScwYvqh8c6SMXee3B+M7oTZxOgtESP0l4j/fXdEJoZ+EdMxkGWIj+aSEyjXkOdmd7g==", + "dependencies": { + "ufo": "^1.5.4" + } + }, + "node_modules/vue-chartjs": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.3.2.tgz", + "integrity": "sha512-NrkbRRoYshbXbWqJkTN6InoDVwVb90C0R7eAVgMWcB9dPikbruaOoTFjFYHE/+tNPdIe6qdLCDjfjPHQ0fw4jw==", + "peerDependencies": { + "chart.js": "^4.1.1", + "vue": "^3.0.0-0 || ^2.7.0" + } + }, + "node_modules/vue-demi": { + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/vue-devtools-stub": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vue-devtools-stub/-/vue-devtools-stub-0.1.0.tgz", + "integrity": "sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==" + }, + "node_modules/vue-flow-layout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/vue-flow-layout/-/vue-flow-layout-0.1.1.tgz", + "integrity": "sha512-JdgRRUVrN0Y2GosA0M68DEbKlXMqJ7FQgsK8CjQD2vxvNSqAU6PZEpi4cfcTVtfM2GVOMjHo7GKKLbXxOBqDqA==", + "peerDependencies": { + "vue": "^3.4.37" + } + }, + "node_modules/vue-i18n": { + "version": "9.14.2", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.2.tgz", + "integrity": "sha512-JK9Pm80OqssGJU2Y6F7DcM8RFHqVG4WkuCqOZTVsXkEzZME7ABejAUqUdA931zEBedc4thBgSUWxeQh4uocJAQ==", + "dev": true, + "dependencies": { + "@intlify/core-base": "9.14.2", + "@intlify/shared": "9.14.2", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/vue-meta": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/vue-meta/-/vue-meta-2.4.0.tgz", + "integrity": "sha512-XEeZUmlVeODclAjCNpWDnjgw+t3WA6gdzs6ENoIAgwO1J1d5p1tezDhtteLUFwcaQaTtayRrsx7GL6oXp/m2Jw==", + "dependencies": { + "deepmerge": "^4.2.2" + } + }, + "node_modules/vue-router": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.5.0.tgz", + "integrity": "sha512-HDuk+PuH5monfNuY+ct49mNmkCRK4xJAV9Ts4z9UFc4rzdDnxQLyCMGGc8pKhZhHTVzfanpNwB/lwqevcBwI4w==", + "dependencies": { + "@vue/devtools-api": "^6.6.4" + }, + "funding": { + "url": "https://github.com/sponsors/posva" + }, + "peerDependencies": { + "vue": "^3.2.0" + } + }, + "node_modules/vue-toast-notification": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/vue-toast-notification/-/vue-toast-notification-3.1.3.tgz", + "integrity": "sha512-XNyWqwLIGBFfX5G9sK+clq3N3IPlhDjzNdbZaXkEElcotPlWs0wWZailk1vqhdtLYT/93Y4FHAVuzyatLmPZRA==", + "engines": { + "node": ">=12.15.0" + }, + "peerDependencies": { + "vue": "^3.0" + } + }, + "node_modules/vue3-ace-editor": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/vue3-ace-editor/-/vue3-ace-editor-2.2.4.tgz", + "integrity": "sha512-FZkEyfpbH068BwjhMyNROxfEI8135Sc+x8ouxkMdCNkuj/Tuw83VP/gStFQqZHqljyX9/VfMTCdTqtOnJZGN8g==", + "dependencies": { + "resize-observer-polyfill": "^1.5.1" + }, + "peerDependencies": { + "ace-builds": "*", + "vue": "^3" + } + }, + "node_modules/vuetify": { + "version": "3.7.13", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.7.13.tgz", + "integrity": "sha512-4+RuQU+zLtXhlN2eZUpKXums9ftzUzhMeiNEJvvJY4XdOzVwUCth2dTnEZkSF6EKdLHk3WhtRk0cIWXZxpBvcw==", + "engines": { + "node": "^12.20 || >=14.13" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/johnleider" + }, + "peerDependencies": { + "typescript": ">=4.7", + "vite-plugin-vuetify": ">=1.0.0", + "vue": "^3.3.0", + "webpack-plugin-vuetify": ">=2.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "vite-plugin-vuetify": { + "optional": true + }, + "webpack-plugin-vuetify": { + "optional": true + } + } + }, + "node_modules/watchpack": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/webpack": { + "version": "5.98.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.98.0.tgz", + "integrity": "sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA==", + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^4.3.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.11", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-virtual-modules": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", + "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + }, + "node_modules/yaml": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yaml-ast-parser": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==" + }, + "node_modules/yaml-eslint-parser": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-1.2.3.tgz", + "integrity": "sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.0.0", + "lodash": "^4.17.21", + "yaml": "^2.0.0" + }, + "engines": { + "node": "^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/zhead": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/zhead/-/zhead-2.2.4.tgz", + "integrity": "sha512-8F0OI5dpWIA5IGG5NHUg9staDwz/ZPxZtvGVf01j7vHqSyZ0raHY+78atOVxRqb73AotX22uV1pXt3gYSstGag==", + "funding": { + "url": "https://github.com/sponsors/harlan-zw" + } + }, + "node_modules/zip-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-6.0.1.tgz", + "integrity": "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==", + "dependencies": { + "archiver-utils": "^5.0.0", + "compress-commons": "^6.0.2", + "readable-stream": "^4.0.0" + }, + "engines": { + "node": ">= 14" + } + } + } +} diff --git a/dbrepo-ui/package.json b/dbrepo-ui/package.json index d7d4917e9f45f113156951746486755d91ae7bed..77edd08c86fa398d83389a474e8ed458b6913651 100644 --- a/dbrepo-ui/package.json +++ b/dbrepo-ui/package.json @@ -32,7 +32,6 @@ "parse-md": "^3.0.3", "pinia": "^2.1.7", "qs": "^6.11.2", - "sql-formatter": "^15.2.0", "tus-js-client": "^4.0.1", "vue": "^3.4.21", "vue-axios": "^3.5.2", diff --git a/dbrepo-ui/pages/database/[database_id]/info.vue b/dbrepo-ui/pages/database/[database_id]/info.vue index 025cc9c4c438523c876c346f6ccb219933a5362c..9f2d42655304118c5b585d8618f157fbc86d9627 100644 --- a/dbrepo-ui/pages/database/[database_id]/info.vue +++ b/dbrepo-ui/pages/database/[database_id]/info.vue @@ -177,7 +177,7 @@ if (data.value && data.value.length > 0) { useServerHead(identifierService.identifiersToServerHead(data.value)) useServerSeoMeta(identifierService.identifiersToServerSeoMeta(data.value)) } -const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === Number(pid)).length > 0 ? data.value.filter(i => i.id === Number(pid))[0] : data.value[0]) : null) +const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === pid).length > 0 ? data.value.filter(i => i.id === pid)[0] : data.value[0]) : null) const cacheStore = useCacheStore() cacheStore.setIdentifier(identifier) @@ -253,7 +253,7 @@ export default { if (!this.database || !this.database.identifiers) { return [] } - return this.database.identifiers.filter(i => i.query_id === Number(this.$route.params.subset_id)) + return this.database.identifiers.filter(i => i.query_id === this.$route.params.subset_id) }, pid () { return this.$route.query.pid diff --git a/dbrepo-ui/pages/database/[database_id]/persist/[identifier_id]/index.vue b/dbrepo-ui/pages/database/[database_id]/persist/[identifier_id]/index.vue index 505a7651232b071a03dd2b7ea481ff306e8dc3b4..1adbe4bf9bdb5cb31a633cd4b05bd8b28006e40b 100644 --- a/dbrepo-ui/pages/database/[database_id]/persist/[identifier_id]/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/persist/[identifier_id]/index.vue @@ -58,7 +58,7 @@ export default { if (!this.database) { return false } - const filter = this.database.identifiers.filter(i => i.id === Number(this.$route.params.identifier_id)) + const filter = this.database.identifiers.filter(i => i.id === this.$route.params.identifier_id) return filter.length === 1 ? filter[0] : null }, canPersistIdentifier () { diff --git a/dbrepo-ui/pages/database/[database_id]/settings.vue b/dbrepo-ui/pages/database/[database_id]/settings.vue index 8905ede1d2f88c8b2411f65655c4443827c23315..f20ce2be68298a33f5c3312f93c2f5397e076017 100644 --- a/dbrepo-ui/pages/database/[database_id]/settings.vue +++ b/dbrepo-ui/pages/database/[database_id]/settings.vue @@ -20,7 +20,8 @@ <v-row v-if="previewImage" dense> - <v-col md="8"> + <v-col + lg="8"> <v-alert v-if="file" border="start" @@ -45,8 +46,10 @@ @click="removeDatabaseImage" /> </v-col> </v-row> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-file-input v-model="file" accept="image/*" @@ -134,7 +137,7 @@ <v-row dense> <v-col - md="4"> + lg="4"> <v-select v-model="modifyVisibility.is_public" :items="dataOptions" @@ -148,7 +151,7 @@ :hint="$t('pages.database.resource.data.hint', { resource: 'database' })" /> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="modifyVisibility.is_schema_public" :items="schemaOptions" @@ -184,7 +187,8 @@ rounded="0"> <v-card-text> <v-row> - <v-col md="8"> + <v-col + lg="8"> <v-select v-model="modifyOwner.id" :items="users" @@ -480,13 +484,13 @@ export default { this.loadingUpload = true const uploadService = useUploadService() uploadService.create(this.file) - .then((s3key) => { - console.debug('uploaded image', s3key) + .then(({s3_key}) => { + console.debug('uploaded image', s3_key) const cacheStore = useCacheStore() cacheStore.setUploadProgress(null) const toast = useToastInstance() toast.success(this.$t('success.database.upload')) - this.modifyImage.key = s3key + this.modifyImage.key = s3_key this.loadingUpload = false }) .catch((error) => { diff --git a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/data.vue b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/data.vue index 682fc59b98fa61b0b3fb15af227960050e5d94cb..778de1dd9641ff85a98352dfa2073a1217679f52 100644 --- a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/data.vue +++ b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/data.vue @@ -36,7 +36,8 @@ </v-toolbar> <v-card v-if="subset" - tile> + rounded="0" + variant="flat"> <QueryResults id="query-results" ref="queryResults" diff --git a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue index db5d45b4610de195f2a16d213eea60674c8dcf86..d0140a6fa1295d0abda828a491f3765d668548a7 100644 --- a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue +++ b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/info.vue @@ -40,17 +40,18 @@ :resource="identifier" /> </v-list-item> <v-list-item - v-if="subset.creator" + v-if="subset.owner" :title="$t('pages.subset.creator.title')" density="compact"> <UserBadge - :user="subset.creator" + :user="subset.owner" :other-user="cacheUser" /> </v-list-item> <v-list-item :title="$t('pages.subset.query.title')" density="compact"> - <pre>{{ subset.query }}</pre> + <pre + class="line-break">{{ subset.query }}</pre> </v-list-item> <v-list-item :title="`${$t('pages.subset.query.title')} ${$t('pages.subset.hash.title')}`" @@ -94,7 +95,7 @@ if (data.value && data.value.length > 0) { useServerHead(identifierService.identifiersToServerHead(data.value)) useServerSeoMeta(identifierService.identifiersToServerSeoMeta(data.value)) } -const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === Number(pid)).length > 0 ? data.value.filter(i => i.id === Number(pid))[0] : data.value[0]) : null) +const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === pid).length > 0 ? data.value.filter(i => i.id === pid)[0] : data.value[0]) : null) const cacheStore = useCacheStore() cacheStore.setIdentifier(identifier) @@ -162,11 +163,14 @@ export default { subset () { return this.cacheStore.getSubset }, + access () { + return this.cacheStore.getAccess + }, identifiers () { if (!this.database || !this.database.subsets) { return [] } - return this.database.subsets.filter(i => i.query_id === Number(this.$route.params.subset_id)) + return this.database.subsets.filter(i => i.query_id === this.$route.params.subset_id) }, canViewInfo () { if (!this.database) { diff --git a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/persist/[identifier_id]/index.vue b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/persist/[identifier_id]/index.vue index 78878a0015f61ea3dadf38258b747b20fa8e94d9..e97ac3eb885973c0f69addc0a98aaf03c604855e 100644 --- a/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/persist/[identifier_id]/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/subset/[subset_id]/persist/[identifier_id]/index.vue @@ -69,7 +69,7 @@ export default { if (!this.subset) { return false } - const filter = this.subset.identifiers.filter(i => i.id === Number(this.$route.params.identifier_id)) + const filter = this.subset.identifiers.filter(i => i.id === this.$route.params.identifier_id) return filter.length === 1 ? filter[0] : null }, canPersistIdentifier () { diff --git a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/data.vue b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/data.vue index 13ee3951c80fae3bb0a3f8391133b53aec57bf79..d02449472ec17dd91d07163d81e35cfb697e3fa8 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/data.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/data.vue @@ -45,7 +45,7 @@ class="ml-2" :disabled="loadingData" :loading="loadingData" - @click="reload" /> + @click="reload()" /> <v-btn :prepend-icon="$vuetify.display.mdAndUp ? 'mdi-update' : null" variant="flat" @@ -61,14 +61,15 @@ </v-card-text> </v-card> <v-card - tile> + rounded="0" + variant="flat"> <QueryResults id="query-results" ref="queryResults" class="mt-0 mb-0" type="table" :select="canSelectTuples" - :timestamp="versionISO || lastReload.toISOString()" + :timestamp="lastReload.toISOString()" @selection="updateSelect" /> </v-card> <v-dialog @@ -310,7 +311,7 @@ export default { } const tupleService = useTupleService() wait.push(tupleService.remove(this.$route.params.database_id, this.$route.params.table_id, { keys: constraints }) - .catch(({code, message}) => { + .catch(({ code }) => { const toast = useToastInstance() if (typeof code !== 'string') { return @@ -321,7 +322,7 @@ export default { Promise.all(wait) .then(() => { const toast = useToastInstance() - toast.success(`Deleted ${this.selection.length} row(s)`) + toast.success(this.$t('success.data.deleted', { total: this.selection.length })) this.$emit('modified', { success: true, action: 'delete' }) this.selection = [] this.$refs.queryResults.resetSelection() @@ -400,8 +401,8 @@ export default { if (!this.canViewTableData) { return } - this.$refs.queryResults.reExecute(Number(this.$route.params.table_id)) - this.$refs.queryResults.reExecuteCount(Number(this.$route.params.table_id)) + this.$refs.queryResults.reExecute(this.$route.params.table_id, this.lastReload) + this.$refs.queryResults.reExecuteCount(this.$route.params.table_id, this.lastReload) }, isFileField (column) { return ['blob', 'longblob', 'mediumblob', 'tinyblob'].includes(column.type) diff --git a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/info.vue b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/info.vue index 687358f0290177012dc89f36e23666d6dd6d48d0..18662f55ddf87daafb6d055a17d67f93fb2be737 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/info.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/info.vue @@ -131,7 +131,7 @@ if (data.value && data.value.length > 0) { useServerHead(identifierService.identifiersToServerHead(data.value)) useServerSeoMeta(identifierService.identifiersToServerSeoMeta(data.value)) } -const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === Number(pid)).length > 0 ? data.value.filter(i => i.id === Number(pid))[0] : data.value[0]) : null) +const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === pid).length > 0 ? data.value.filter(i => i.id === pid)[0] : data.value[0]) : null) const cacheStore = useCacheStore() cacheStore.setIdentifier(identifier) @@ -244,7 +244,7 @@ export default { if (!this.table || !this.table.identifiers) { return [] } - return this.table.identifiers.filter(i => i.query_id === Number(this.$route.params.subset_id)) + return this.table.identifiers.filter(i => i.query_id === this.$route.params.subset_id) }, brokerExtraInfo () { return this.$config.public.broker.extra diff --git a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/persist/[identifier_id]/index.vue b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/persist/[identifier_id]/index.vue index e2d16e8db44efb0f558fa2c42e1225fc9e6b8355..2d7b94744c57a933ca6b139803091f5989eb29fd 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/persist/[identifier_id]/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/persist/[identifier_id]/index.vue @@ -67,7 +67,7 @@ export default { if (!this.table) { return false } - const filter = this.table.identifiers.filter(i => i.id === Number(this.$route.params.identifier_id)) + const filter = this.table.identifiers.filter(i => i.id === this.$route.params.identifier_id) return filter.length === 1 ? filter[0] : null }, canPersistIdentifier () { diff --git a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/settings.vue b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/settings.vue index 0f0a8feab62a7fb065c3ecb6af6b63b83a9884be..4667a7f30c7f1d3add1bfb608ef2c472b9daa681 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/[table_id]/settings.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/[table_id]/settings.vue @@ -18,7 +18,7 @@ <v-card-text> <v-row> <v-col - md="8"> + lg="8"> <v-textarea v-model="modify.description" rows="2" @@ -34,7 +34,7 @@ <v-row dense> <v-col - md="4"> + lg="4"> <v-select v-model="modify.is_public" :items="dataOptions" @@ -48,7 +48,7 @@ :hint="$t('pages.database.resource.data.hint', { resource: 'table' })" /> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="modify.is_schema_public" :items="schemaOptions" @@ -90,7 +90,7 @@ <v-card-text> <v-row> <v-col - md="8"> + lg="8"> <v-btn size="small" variant="flat" diff --git a/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue b/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue index 24aed7f2ffc6b77edfae4a90e1c4dc7607f97955..56db5fdc374cdfd683eb00328f86534cd9fd81bf 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/create/dataset.vue @@ -21,7 +21,7 @@ <v-card-text> <v-row> <v-col - md="8"> + lg="8"> <v-alert border="start" color="info"> @@ -54,7 +54,8 @@ <v-container> <v-row dense> - <v-col md="4"> + <v-col + lg="4"> <v-text-field v-model="tableCreate.name" :rules="[ @@ -69,7 +70,8 @@ :hint="$t('pages.table.subpages.import.name.hint')" :label="$t('pages.table.subpages.import.name.label')"/> </v-col> - <v-col md="4"> + <v-col + lg="4"> <v-text-field v-model="generatedTableName" :rules="[ @@ -88,7 +90,8 @@ </v-row> <v-row dense> - <v-col md="8"> + <v-col + lg="8"> <v-textarea v-model="tableCreate.description" rows="2" @@ -104,7 +107,7 @@ <v-row dense> <v-col - md="4"> + lg="4"> <v-select v-model="tableCreate.is_public" name="public" @@ -120,7 +123,7 @@ </v-select> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="tableCreate.is_schema_public" name="schema-public" @@ -175,7 +178,7 @@ <v-container> <v-row dense> <v-col - md="8"> + lg="8"> <v-alert border="start" color="success"> @@ -309,6 +312,8 @@ export default { } this.tableCreate.is_public = this.database.is_public this.tableCreate.is_schema_public = this.database.is_schema_public + /* fetch types in advance */ + this.$refs.schema.fetchColumnTypes() }, computed: { database() { diff --git a/dbrepo-ui/pages/database/[database_id]/table/create/schema.vue b/dbrepo-ui/pages/database/[database_id]/table/create/schema.vue index 804ae03c15072719f7612fd46eeca80d45b1a2b8..b05e8c0b98e5f5baa3f931cbb46e5f5e3fc69c11 100644 --- a/dbrepo-ui/pages/database/[database_id]/table/create/schema.vue +++ b/dbrepo-ui/pages/database/[database_id]/table/create/schema.vue @@ -32,8 +32,10 @@ :disabled="table" @submit.prevent="submit"> <v-container> - <v-row dense> - <v-col md="4"> + <v-row + dense> + <v-col + lg="4"> <v-text-field v-model="tableCreate.name" :rules="[ @@ -48,7 +50,8 @@ :hint="$t('pages.table.subpages.import.name.hint')" :label="$t('pages.table.subpages.import.name.label')" /> </v-col> - <v-col md="4"> + <v-col + lg="4"> <v-text-field v-model="generatedTableName" :rules="[ @@ -65,8 +68,10 @@ :label="$t('pages.table.subpages.import.generated.label')" /> </v-col> </v-row> - <v-row dense> - <v-col md="8"> + <v-row + dense> + <v-col + lg="8"> <v-textarea v-model="tableCreate.description" rows="2" @@ -82,7 +87,7 @@ <v-row dense> <v-col - md="4"> + lg="4"> <v-select v-model="tableCreate.is_public" name="public" @@ -98,7 +103,7 @@ </v-select> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="tableCreate.is_schema_public" name="schema-public" @@ -127,6 +132,7 @@ direction="vertical"> <v-container> <TableSchema + ref="schema" submit-text="Create" :disabled="!valid || table" :columns="tableCreate.columns" @@ -146,7 +152,8 @@ <v-container> <v-row dense> - <v-col md="8"> + <v-col + lg="8"> <v-alert border="start" color="success"> @@ -296,6 +303,8 @@ export default { } this.tableCreate.is_public = this.database.is_public this.tableCreate.is_schema_public = this.database.is_schema_public + /* fetch types in advance */ + this.$refs.schema.fetchColumnTypes() }, methods: { notEmpty, diff --git a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/data.vue b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/data.vue index f732661f369710b4637f01952f5fab930e9e4812..68013c5b95617fa94b4e434479bf2949168f20d8 100644 --- a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/data.vue +++ b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/data.vue @@ -22,7 +22,9 @@ :loading="loadingData" @click="reload" /> </v-toolbar> - <v-card tile> + <v-card + rounded="0" + variant="flat"> <QueryResults id="query-results" ref="queryResults" @@ -104,8 +106,8 @@ export default { }, methods: { reload () { - this.$refs.queryResults.reExecute(Number(this.$route.params.view_id)) - this.$refs.queryResults.reExecuteCount(Number(this.$route.params.view_id)) + this.$refs.queryResults.reExecute(this.$route.params.view_id) + this.$refs.queryResults.reExecuteCount(this.$route.params.view_id) }, download () { this.downloadLoading = true diff --git a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/info.vue b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/info.vue index 3c0c40e33ce7546e351ea3252a051a0ebb56049e..b5266b79f20ac518984a716e1c130580f7dd1f56 100644 --- a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/info.vue +++ b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/info.vue @@ -32,7 +32,8 @@ </v-list-item> <v-list-item :title="$t('pages.view.query.title')"> - <pre>{{ view.query }}</pre> + <pre + class="line-break">{{ view.query }}</pre> </v-list-item> <v-list-item :title="$t('pages.view.owner.title')"> @@ -72,7 +73,7 @@ if (data.value && data.value.length > 0) { useServerHead(identifierService.identifiersToServerHead(data.value)) useServerSeoMeta(identifierService.identifiersToServerSeoMeta(data.value)) } -const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === Number(pid)).length > 0 ? data.value.filter(i => i.id === Number(pid))[0] : data.value[0]) : null) +const identifier = ref(data.value && data.value.length > 0 ? (pid && data.value.filter(i => i.id === pid).length > 0 ? data.value.filter(i => i.id === pid)[0] : data.value[0]) : null) const cacheStore = useCacheStore() cacheStore.setIdentifier(identifier) @@ -143,7 +144,7 @@ export default { if (!this.view || !this.view.identifiers) { return [] } - return this.view.identifiers.filter(i => i.query_id === Number(this.$route.params.subset_id)) + return this.view.identifiers.filter(i => i.query_id === this.$route.params.subset_id) }, views () { if (!this.database) { diff --git a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/persist/[identifier_id]/index.vue b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/persist/[identifier_id]/index.vue index 540bbbdb5e454c725c6d5b9dc6a1da6498e5f8bc..5a1faeb431bf92be87a3b8bab8dc50c952f737e8 100644 --- a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/persist/[identifier_id]/index.vue +++ b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/persist/[identifier_id]/index.vue @@ -69,7 +69,7 @@ export default { if (!this.view) { return false } - const filter = this.view.identifiers.filter(i => i.id === Number(this.$route.params.identifier_id)) + const filter = this.view.identifiers.filter(i => i.id === this.$route.params.identifier_id) return filter.length === 1 ? filter[0] : null }, canPersistIdentifier () { diff --git a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/settings.vue b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/settings.vue index d027a4347b5300025f83d23adba52d78278a443f..41285c4d3be02f005736e61c44c534dce0a041e0 100644 --- a/dbrepo-ui/pages/database/[database_id]/view/[view_id]/settings.vue +++ b/dbrepo-ui/pages/database/[database_id]/view/[view_id]/settings.vue @@ -17,7 +17,7 @@ <v-row dense> <v-col - md="4"> + lg="4"> <v-select v-model="modify.is_public" :items="dataOptions" @@ -31,7 +31,7 @@ :hint="$t('pages.database.resource.data.hint', { resource: 'view' })" /> </v-col> <v-col - md="4"> + lg="4"> <v-select v-model="modify.is_schema_public" :items="schemaOptions" @@ -72,7 +72,7 @@ <v-card-text> <v-row> <v-col - md="8"> + lg="8"> <v-btn size="small" variant="flat" diff --git a/dbrepo-ui/pages/user/info.vue b/dbrepo-ui/pages/user/info.vue index 9c8dbf873d5b7ec4c13a4cde7a42a61790fdc4a3..0f52ca7fcc97e5336e713695feef1dc636b9fb3d 100644 --- a/dbrepo-ui/pages/user/info.vue +++ b/dbrepo-ui/pages/user/info.vue @@ -14,7 +14,8 @@ variant="flat"> <v-card-text> <v-row dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="model.id" disabled @@ -25,7 +26,8 @@ <v-row v-if="cacheUser" dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="cacheUser.preferred_username" disabled @@ -56,7 +58,8 @@ </v-col> </v-row> <v-row dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="model.orcid" :disabled="!canModifyInformation" @@ -71,7 +74,8 @@ </v-col> </v-row> <v-row dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="model.firstname" :disabled="!canModifyInformation || identityProvider" @@ -83,7 +87,8 @@ </v-col> </v-row> <v-row dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="model.lastname" :disabled="!canModifyInformation || identityProvider" @@ -95,7 +100,8 @@ </v-col> </v-row> <v-row dense> - <v-col md="6"> + <v-col + lg="6"> <v-text-field v-model="model.affiliation" :disabled="!canModifyInformation" diff --git a/dbrepo-upload-service/.gitignore b/dbrepo-upload-service/.gitignore deleted file mode 100644 index a5aee567d469985ea55322421c496814c680017f..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# environment -venv/ \ No newline at end of file diff --git a/dbrepo-upload-service/mvnw b/dbrepo-upload-service/mvnw deleted file mode 100755 index a16b5431b4c3cab50323a3f558003fd0abd87dad..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/mvnw +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/dbrepo-upload-service/mvnw.cmd b/dbrepo-upload-service/mvnw.cmd deleted file mode 100644 index c8d43372c986d97911cdc21bd87e0cbe3d83bdda..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/dbrepo-upload-service/pom.xml b/dbrepo-upload-service/pom.xml deleted file mode 100644 index 44b77d7bf59f95af8cabcee93d055e25216db130..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/pom.xml +++ /dev/null @@ -1,168 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>3.3.5</version> - </parent> - - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-upload-service</artifactId> - <name>dbrepo-upload-service</name> - <version>1.6.5</version> - - <url>https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/</url> - <developers> - <developer> - <name>Martin Weise</name> - <email>martin.weise@tuwien.ac.at</email> - <organization>TU Wien</organization> - </developer> - </developers> - - <properties> - <java.version>17</java.version> - <spring-cloud.version>4.1.4</spring-cloud.version> - <mapstruct.version>1.5.5.Final</mapstruct.version> - <rabbitmq.version>5.20.0</rabbitmq.version> - <jackson-datatype.version>2.15.0</jackson-datatype.version> - <commons-io.version>2.17.0</commons-io.version> - <commons-validator.version>1.8.0</commons-validator.version> - <guava.version>33.0.0-jre</guava.version> - <jacoco.version>0.8.12</jacoco.version> - <jwt.version>4.3.0</jwt.version> - <c3p0.version>0.9.5.5</c3p0.version> - <c3p0-hibernate.version>6.2.2.Final</c3p0-hibernate.version> - <apache-jena.version>4.10.0</apache-jena.version> - <opencsv.version>5.7.1</opencsv.version> - <super-csv.version>2.4.0</super-csv.version> - <keycloak.version>21.0.2</keycloak.version> - <springdoc-openapi.version>2.3.0</springdoc-openapi.version> - <testcontainers.version>1.19.1</testcontainers.version> - <keycloak-testcontainer.version>3.2.0</keycloak-testcontainer.version> - <aws-s3.version>2.25.23</aws-s3.version> - <jackson.version>2.15.2</jackson.version> - <minio.version>8.5.7</minio.version> - </properties> - - <dependencies> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-api</artifactId> - <version>${version}</version> - </dependency> - <dependency> - <groupId>at.tuwien</groupId> - <artifactId>dbrepo-metadata-service-repositories</artifactId> - <version>${version}</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-validation</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-security</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-test</artifactId> - <scope>test</scope> - </dependency> - <!-- IDE --> - <dependency> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - <scope>compile</scope> - </dependency> - <!-- Mapping --> - <dependency> - <groupId>org.mapstruct</groupId> - <artifactId>mapstruct-processor</artifactId> - <version>${mapstruct.version}</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.mapstruct</groupId> - <artifactId>mapstruct</artifactId> - <version>${mapstruct.version}</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.datatype</groupId> - <artifactId>jackson-datatype-jsr310</artifactId> - <version>${jackson-datatype.version}</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>${commons-io.version}</version> - </dependency> - <dependency> - <groupId>commons-validator</groupId> - <artifactId>commons-validator</artifactId> - <version>${commons-validator.version}</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.datatype</groupId> - <artifactId>jackson-datatype-hibernate6</artifactId> - <version>${jackson-datatype.version}</version> - </dependency> - <!-- Authentication --> - <dependency> - <groupId>org.keycloak</groupId> - <artifactId>keycloak-common</artifactId> - <version>${keycloak.version}</version> - </dependency> - <!-- Testing --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> - <dependency> - <groupId>org.testcontainers</groupId> - <artifactId>junit-jupiter</artifactId> - <version>${testcontainers.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.testcontainers</groupId> - <artifactId>minio</artifactId> - <version>${testcontainers.version}</version> - </dependency> - <dependency> - <groupId>com.github.dasniko</groupId> - <artifactId>testcontainers-keycloak</artifactId> - <version>${keycloak-testcontainer.version}</version> - <scope>test</scope> - </dependency> - </dependencies> - - <build> - <resources> - <resource> - <directory>${basedir}/src/main/resources</directory> - <filtering>true</filtering> - <includes> - <include>**/application*.yml</include> - <include>**/init/dbrepo-realm.json</include> - </includes> - </resource> - </resources> - </build> - -</project> diff --git a/dbrepo-upload-service/pre-create.sh b/dbrepo-upload-service/pre-create.sh deleted file mode 100755 index 2d6eb4f861297db095e9dcf5268ed858fde7cd6d..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/pre-create.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -REQUEST_RAW=$(cat /dev/stdin) -METADATA_SERVICE_ENDPOINT="${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080}" - -echo "[DEBUG] [pre-create hook] request started" >&2 -if [ "$(echo "$REQUEST_RAW" | jq '.Event.HTTPRequest.Header | has("Authorization")')" == "false" ]; then - echo "[ERROR] [pre-create hook] Missing header 'Authorization'" >&2 - echo "[DEBUG] [pre-create hook] raw request: ${REQUEST_RAW}" >&2 - cat <<END - { - "RejectUpload": true, - "HTTPResponse": { - "StatusCode": 400, - "Header": { - "Content-Type": "application/json" - }, - "Body": "{\"code\":\"error.upload.malformed\",\"message\":\"Missing header 'Authorization'\",\"status\":\"BAD_REQUEST\"}" - } - } -END - exit 0 -fi - -echo "[DEBUG] [pre-create hook] request has 'Authorization' header p resent" >&2 - -BEARER="$(echo "$REQUEST_RAW" | jq -r '.Event.HTTPRequest.Header.Authorization[0]')" - -if [ ! "$(wget -O- --quiet --header='Authorization: ${BEARER}' ${METADATA_SERVICE_ENDPOINT}/api/license)" ]; then - echo "[ERROR] [pre-create hook] Unauthorized" >&2 - cat <<END - { - "RejectUpload": true, - "HTTPResponse": { - "StatusCode": 401, - "Header": { - "Content-Type": "application/json" - }, - "Body": "{\"code\":\"error.upload.unauthorized\",\"message\":\"Authentication required\",\"status\":\"UNAUTHORIZED\"}" - } - } -END - exit 0 -fi - -echo "[INFO] [pre-create hook] Authorized" >&2 \ No newline at end of file diff --git a/dbrepo-upload-service/src/main/java/at/tuwien/Application.java b/dbrepo-upload-service/src/main/java/at/tuwien/Application.java deleted file mode 100644 index 08ff7e84e75f88d825b7110ec463c8197a014a11..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/main/java/at/tuwien/Application.java +++ /dev/null @@ -1,13 +0,0 @@ -package at.tuwien; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - -} diff --git a/dbrepo-upload-service/src/main/resources/application-local.yml b/dbrepo-upload-service/src/main/resources/application-local.yml deleted file mode 100644 index 34573c21f4c034389fa9d1d010ea9027ecdb912d..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/main/resources/application-local.yml +++ /dev/null @@ -1,82 +0,0 @@ -spring: - datasource: - url: jdbc:h2:mem:fda;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS FDA;NON_KEYWORDS=value - driver-class-name: org.h2.Driver - username: sa - password: password - jpa: - show-sql: false - open-in-view: false - properties: - hibernate: - default_schema: dbrepo - jdbc: - time_zone: UTC - format_sql: false - application: - name: metadata-service - rabbitmq: - host: localhost - virtual-host: dbrepo - username: admin - password: admin - port: 5672 -management: - endpoints: - web: - exposure: - include: health,info,prometheus - endpoint: - health: - probes: - enabled: true - health: - readinessState: - enabled: true - livenessState: - enabled: true -server: - port: 19099 -logging: - pattern.console: "%d %highlight(%-5level) %msg%n" - level: - root: warn - at.tuwien.: trace - org.springframework.security.web.FilterChainProxy: debug -# org.hibernate.resource.jdbc: trace - org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver: debug -dbrepo: - repository-name: Database Repository - base-url: http://localhost - admin-email: noreply@example.com - deleted-record: persistent - granularity: YYYY-MM-DDThh:mm:ssZ - exchangeName: dbrepo - queueName: dbrepo - connectionTimeout: 10000 - s3: - accessKeyId: seaweedfsadmin - secretAccessKey: seaweedfsadmin - bucket: dbrepo - system: - username: admin - password: admin - endpoints: - searchService: http://localhost - analyseService: http://localhost - dataService: http://localhost:9093 - brokerService: http://localhost:15672 - authService: http://localhost/api/auth - storageService: http://localhost/api/storage - rorService: https://api.ror.org - crossRefService: http://data.crossref.org - pid: - base: http://localhost/pid/ - jwt: - public_key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQAB - keycloak: - username: admin - password: admin - client: dbrepo-client - clientSecret: MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG - website: http://localhost diff --git a/dbrepo-upload-service/src/main/resources/application.yml b/dbrepo-upload-service/src/main/resources/application.yml deleted file mode 100644 index e0285aa736a747004d99d90da05a0259ba0500a4..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/main/resources/application.yml +++ /dev/null @@ -1,38 +0,0 @@ -application: - title: DBRepo - version: '@project.version@' -spring: - jpa: - show-sql: false - open-in-view: false - properties: - hibernate: - default_schema: "${METADATA_DB:dbrepo}" - jdbc: - time_zone: UTC - application: - name: upload-service - main: - banner-mode: off -management: - endpoints: - web: - exposure: - include: health,info,prometheus - endpoint: - health: - probes: - enabled: true - health: - readinessState: - enabled: true - livenessState: - enabled: true -server: - port: 8080 -logging: - pattern.console: "%d %highlight(%-5level) %msg%n" - level: - root: warn - at.tuwien.: "${LOG_LEVEL:info}" - org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver: debug diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/config/GatewayConfig.java b/dbrepo-upload-service/src/test/java/at/tuwien/config/GatewayConfig.java deleted file mode 100644 index 601229b5e5ae64da214820b2f91396a926d77884..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/config/GatewayConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package at.tuwien.config; - -import lombok.Getter; -import lombok.extern.log4j.Log4j2; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.client.RestTemplate; - -@Log4j2 -@Getter -@Configuration -public class GatewayConfig { - - @Value("${dbrepo.endpoints.keycloak}") - private String keycloakEndpoint; - - @Value("${dbrepo.keycloak.username}") - private String keycloakUsername; - - @Value("${dbrepo.keycloak.password}") - private String keycloakPassword; - - @Bean - public RestTemplate restTemplate() { - return new RestTemplate(); - } - -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/config/KeycloakConfig.java b/dbrepo-upload-service/src/test/java/at/tuwien/config/KeycloakConfig.java deleted file mode 100644 index 6243cb3ab5ecffc614cf71391886cae1852d30a2..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/config/KeycloakConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -package at.tuwien.config; - -import lombok.Getter; -import lombok.extern.log4j.Log4j2; -import org.keycloak.admin.client.Keycloak; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Log4j2 -@Getter -@Configuration -public class KeycloakConfig { - - @Value("${dbrepo.endpoints.keycloak}") - private String keycloakEndpoint; - - @Bean - public Keycloak keycloak() { - return Keycloak.getInstance(keycloakEndpoint, "master", "admin", "admin", "admin-cli"); - } - -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdConfig.java b/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdConfig.java deleted file mode 100644 index af678238de1fdc25211ddcd3fd1d1cf5647ff92a..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package at.tuwien.config; - -import lombok.Getter; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.client.RestTemplate; - -@Getter -@Configuration -public class TusdConfig { - - @Value("${dbrepo.endpoints.tusd}") - private String tusdEndpoint; - -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdContainerConfig.java b/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdContainerConfig.java deleted file mode 100644 index e08cea4a668198ecd608146cecc81a9c64711d0a..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/config/TusdContainerConfig.java +++ /dev/null @@ -1,70 +0,0 @@ -package at.tuwien.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.testcontainers.containers.BindMode; -import org.testcontainers.containers.GenericContainer; -import org.testcontainers.images.PullPolicy; - -import java.io.File; - -@Configuration -public class TusdContainerConfig { - - public static TusdContainer getContainer() { - return TusdContainer.getInstance(); - } - - @Bean - public TusdContainer tusdContainer() { - return getContainer(); - } - - /** - * This class represents the customized MariaDB container. It is a singleton to avoid the recreation of containers - * which can be very time-consuming. - */ - public static class TusdContainer extends GenericContainer<TusdContainer> { - - private static TusdContainer instance; - - private boolean started = false; - - public static synchronized TusdContainer getInstance() { - final File filePath = new File("pre-create.sh"); - if (instance == null) { - instance = new TusdContainer("tusproject/tusd:v2.4.0"); - instance.withFileSystemBind(filePath.getAbsolutePath(), "/srv/tusd-hooks/pre-create", BindMode.READ_ONLY); - instance.withExposedPorts(8080); - instance.withCommand("-max-size=2000000000", - "-base-path=/api/upload/files/", - "-hooks-dir=/srv/tusd-hooks/"); - instance.withImagePullPolicy(PullPolicy.alwaysPull()); - } - return instance; - } - - private TusdContainer(String dockerImageName) { - super(dockerImageName); - } - - @Override - protected void configure() { - super.configure(); - } - - @Override - public synchronized void start() { - if (!started) { - super.stop(); - super.start(); - started = true; - } - } - - @Override - public void stop() { - // do nothing, JVM handles shut down - } - } -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/interceptor/KeycloakInterceptor.java b/dbrepo-upload-service/src/test/java/at/tuwien/interceptor/KeycloakInterceptor.java deleted file mode 100644 index 569653a1048946d9f0b9c85edf1bbd6199fcadc6..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/interceptor/KeycloakInterceptor.java +++ /dev/null @@ -1,61 +0,0 @@ -package at.tuwien.interceptor; - -import at.tuwien.api.keycloak.TokenDto; -import lombok.extern.log4j.Log4j2; -import org.springframework.http.*; -import org.springframework.http.client.ClientHttpRequestExecution; -import org.springframework.http.client.ClientHttpRequestInterceptor; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.HttpServerErrorException; -import org.springframework.web.client.ResourceAccessException; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.DefaultUriBuilderFactory; - -import java.io.IOException; - -@Log4j2 -public class KeycloakInterceptor implements ClientHttpRequestInterceptor { - - private final String adminUsername; - private final String adminPassword; - private final String keycloakEndpoint; - private final RestTemplate restTemplate; - - public KeycloakInterceptor(RestTemplate restTemplate, String adminUsername, String adminPassword, - String keycloakEndpoint) { - this.adminUsername = adminUsername; - this.adminPassword = adminPassword; - this.keycloakEndpoint = keycloakEndpoint; - this.restTemplate = restTemplate; - } - - @Override - public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) - throws IOException { - restTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(keycloakEndpoint)); - final HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - final MultiValueMap<String, String> payload = new LinkedMultiValueMap<>(); - payload.add("username", adminUsername); - payload.add("password", adminPassword); - payload.add("grant_type", "password"); - payload.add("client_id", "admin-cli"); - final String path = "/realms/master/protocol/openid-connect/token"; - log.trace("obtain admin token at endpoint {} with path {}", keycloakEndpoint, path); - final ResponseEntity<TokenDto> response; - try { - response = restTemplate.exchange(path, HttpMethod.POST, new HttpEntity<>(payload, headers), TokenDto.class); - } catch (ResourceAccessException | HttpServerErrorException.ServiceUnavailable e) { - log.error("Failed to obtain admin token: {}", e.getMessage()); - return execution.execute(request, body); - } - if (response.getBody() == null) { - return execution.execute(request, body); - } - request.getHeaders().set("Authorization", "Bearer " + response.getBody().getAccessToken()); - log.trace("set header: Authorization {} (shortened)", response.getBody().getAccessToken().substring(0, 5)); - return execution.execute(request, body); - } -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/mapper/MetadataMapper.java b/dbrepo-upload-service/src/test/java/at/tuwien/mapper/MetadataMapper.java deleted file mode 100644 index c6b5d429e7b87b1a3a4759167f794ad183311883..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/mapper/MetadataMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package at.tuwien.mapper; - - -import at.tuwien.api.keycloak.UserCreateDto; -import at.tuwien.api.user.external.ExternalResultType; -import org.keycloak.representations.idm.UserRepresentation; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; - -import java.util.LinkedList; - -@Mapper(componentModel = "spring", imports = {LinkedList.class, ExternalResultType.class}) -public interface MetadataMapper { - - org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(MetadataMapper.class); - - @Mappings({ - @Mapping(target = "attributes", ignore = true) - }) - UserRepresentation userCreateDtoToUserRepresentation(UserCreateDto data); -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/service/UploadServiceIntegrationTest.java b/dbrepo-upload-service/src/test/java/at/tuwien/service/UploadServiceIntegrationTest.java deleted file mode 100644 index 052d028d39478f3f8a61b2639bf8bfe8487af9ba..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/service/UploadServiceIntegrationTest.java +++ /dev/null @@ -1,140 +0,0 @@ -package at.tuwien.service; - -import at.tuwien.api.error.ApiErrorDto; -import at.tuwien.api.keycloak.CredentialDto; -import at.tuwien.api.keycloak.CredentialTypeDto; -import at.tuwien.api.keycloak.UserCreateDto; -import at.tuwien.config.KeycloakConfig; -import at.tuwien.config.TusdConfig; -import at.tuwien.config.TusdContainerConfig; -import at.tuwien.exception.AuthServiceException; -import at.tuwien.interceptor.KeycloakInterceptor; -import at.tuwien.util.KeycloakUtil; -import com.github.dockerjava.api.model.ExposedPort; -import dasniko.testcontainers.keycloak.KeycloakContainer; -import lombok.extern.log4j.Log4j2; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.DynamicPropertyRegistry; -import org.springframework.test.context.DynamicPropertySource; -import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.DefaultUriBuilderFactory; -import org.testcontainers.images.PullPolicy; -import org.testcontainers.junit.jupiter.Container; -import org.testcontainers.junit.jupiter.Testcontainers; - -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertThrows; - -@Log4j2 -@Testcontainers -@SpringBootTest -@ExtendWith(SpringExtension.class) -public class UploadServiceIntegrationTest { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private TusdConfig tusdConfig; - - @Autowired - private KeycloakUtil keycloakUtil; - - @Autowired - private KeycloakConfig keycloakConfig; - - @Container - private static TusdContainerConfig.TusdContainer tusdContainer = TusdContainerConfig.TusdContainer.getInstance(); - - @Container - private static KeycloakContainer keycloakContainer = new KeycloakContainer("quay.io/keycloak/keycloak:26.0") - .withImagePullPolicy(PullPolicy.alwaysPull()) - .withRealmImportFile("init/dbrepo-realm.json") - .withEnv("KC_HOSTNAME_STRICT_HTTPS", "false") - .withCreateContainerCmdModifier(it -> it.withName("auth-service") - .withExposedPorts(ExposedPort.tcp(8080))); - - @DynamicPropertySource - static void dynamicProperties(DynamicPropertyRegistry registry) { - registry.add("dbrepo.endpoints.tusd", () -> "http://localhost:" + tusdContainer.getMappedPort(8080) + "/api/upload/files"); - registry.add("dbrepo.endpoints.keycloak", () -> keycloakContainer.getAuthServerUrl()); - } - - @BeforeEach - public void beforeEach() throws AuthServiceException { - if (keycloakUtil.existsByUsername(keycloakContainer.getAdminUsername())) { - return; - } - final UserCreateDto payload = UserCreateDto.builder() - .username(keycloakContainer.getAdminUsername()) - .credentials(List.of(CredentialDto.builder() - .temporary(false) - .type(CredentialTypeDto.PASSWORD) - .value(keycloakContainer.getAdminPassword()) - .build())) - .build(); - keycloakUtil.createUser(payload); - } - - @Test - public void upload_missingAuthentication_fails() { - final HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Tus-Resumable", "1.0.0"); - requestHeaders.set("Upload-Length", "100"); - requestHeaders.set("Content-Type", "application/offset+octet-stream"); - - /* test */ - assertThrows(HttpClientErrorException.BadRequest.class, () -> { - restTemplate.exchange(tusdConfig.getTusdEndpoint(), HttpMethod.POST, new HttpEntity<>("Hello this is a test aaa", requestHeaders), ApiErrorDto.class); - }); - } - - @Test - public void upload_invalidAuthentication_fails() { - final HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Tus-Resumable", "1.0.0"); - requestHeaders.set("Upload-Length", "100"); - requestHeaders.set("Content-Type", "application/offset+octet-stream"); - requestHeaders.set("Authorization", "ey12345"); - - /* test */ - assertThrows(HttpClientErrorException.Unauthorized.class, () -> { - restTemplate.exchange(tusdConfig.getTusdEndpoint(), HttpMethod.POST, new HttpEntity<>("Hello this is a test aaa", requestHeaders), ApiErrorDto.class); - }); - } - - @Test - public void upload_succeeds() { - final RestTemplate uploadRestTemplate = new RestTemplate(); - uploadRestTemplate.setUriTemplateHandler(new DefaultUriBuilderFactory(tusdConfig.getTusdEndpoint())); - uploadRestTemplate.getInterceptors() - .add(new KeycloakInterceptor(restTemplate, keycloakContainer.getAdminUsername(), - keycloakContainer.getAdminPassword(), keycloakConfig.getKeycloakEndpoint())); - - /* test */ - final HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Tus-Resumable", "1.0.0"); - requestHeaders.set("Upload-Length", "100"); - requestHeaders.set("Content-Type", "application/offset+octet-stream"); - try { - final ResponseEntity<Void> response = uploadRestTemplate.exchange("", HttpMethod.POST, new HttpEntity<>( - "Hello this is a test aaa", requestHeaders), Void.class); - } catch (Exception e) { - /* ignore */ - } - System.out.println(""); -// assertEquals(HttpStatus.OK, response.getStatusCode()); - } - -} diff --git a/dbrepo-upload-service/src/test/java/at/tuwien/util/KeycloakUtil.java b/dbrepo-upload-service/src/test/java/at/tuwien/util/KeycloakUtil.java deleted file mode 100644 index b7c24cab9d5221f893e2e1fceb3f378b59e6d684..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/java/at/tuwien/util/KeycloakUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package at.tuwien.util; - -import at.tuwien.api.keycloak.UserCreateDto; -import at.tuwien.exception.AuthServiceException; -import at.tuwien.mapper.MetadataMapper; -import jakarta.ws.rs.core.Response; -import lombok.extern.log4j.Log4j2; -import org.keycloak.admin.client.Keycloak; -import org.keycloak.representations.idm.UserRepresentation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -@Component -@Log4j2 -public class KeycloakUtil { - - - private final MetadataMapper metadataMapper; - private final Keycloak keycloak; - - @Autowired - public KeycloakUtil(MetadataMapper metadataMapper, Keycloak keycloak) { - this.metadataMapper = metadataMapper; - this.keycloak = keycloak; - } - - public void createUser(UserCreateDto data) throws AuthServiceException { - final UserRepresentation user = metadataMapper.userCreateDtoToUserRepresentation(data); - try (Response response = keycloak.realm("dbrepo") - .users() - .create(user)) { - if (response.getStatus() != 200) { - log.error("Failed to delete user: unexpected response status: {}", response.getStatus()); - throw new AuthServiceException("Unexpected response status: " + response.getStatus()); - } - } - log.info("Created user at auth service"); - } - - public boolean existsByUsername(String username) { - return keycloak.realm("dbrepo") - .users() - .search(username) - .isEmpty(); - } -} diff --git a/dbrepo-upload-service/src/test/resources/application.properties b/dbrepo-upload-service/src/test/resources/application.properties deleted file mode 100644 index cb41084578e2b476f1d550d6f890234cbea64180..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/resources/application.properties +++ /dev/null @@ -1,16 +0,0 @@ -# enable local spring profile -spring.profiles.active=local,junit - -# disable discovery -spring.cloud.discovery.enabled=false - -# disable datasource -spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - -# logging -logging.level.root=error -logging.level.at.tuwien.=trace -logging.level.org.testcontainers.=info -logging.level.tc.=info -logging.level.com.github.dockerjava.=warn -logging.level.com.github.dockerjava.zerodep.shaded.org.apache.hc.client5.http.wire.=off diff --git a/dbrepo-upload-service/src/test/resources/init/dbrepo-realm.json b/dbrepo-upload-service/src/test/resources/init/dbrepo-realm.json deleted file mode 100644 index 588053e15fa6d5872c4cb83da42d71859b5f7a64..0000000000000000000000000000000000000000 --- a/dbrepo-upload-service/src/test/resources/init/dbrepo-realm.json +++ /dev/null @@ -1,2822 +0,0 @@ -{ - "id" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "realm" : "dbrepo", - "notBefore" : 0, - "defaultSignatureAlgorithm" : "RS256", - "revokeRefreshToken" : false, - "refreshTokenMaxReuse" : 1, - "accessTokenLifespan" : 900, - "accessTokenLifespanForImplicitFlow" : 900, - "ssoSessionIdleTimeout" : 864000, - "ssoSessionMaxLifespan" : 2592000, - "ssoSessionIdleTimeoutRememberMe" : 0, - "ssoSessionMaxLifespanRememberMe" : 0, - "offlineSessionIdleTimeout" : 2592000, - "offlineSessionMaxLifespanEnabled" : false, - "offlineSessionMaxLifespan" : 5184000, - "clientSessionIdleTimeout" : 0, - "clientSessionMaxLifespan" : 0, - "clientOfflineSessionIdleTimeout" : 0, - "clientOfflineSessionMaxLifespan" : 0, - "accessCodeLifespan" : 60, - "accessCodeLifespanUserAction" : 300, - "accessCodeLifespanLogin" : 1800, - "actionTokenGeneratedByAdminLifespan" : 43200, - "actionTokenGeneratedByUserLifespan" : 1800, - "oauth2DeviceCodeLifespan" : 600, - "oauth2DevicePollingInterval" : 5, - "enabled" : true, - "sslRequired" : "none", - "registrationAllowed" : false, - "registrationEmailAsUsername" : false, - "rememberMe" : false, - "verifyEmail" : true, - "loginWithEmailAllowed" : false, - "duplicateEmailsAllowed" : false, - "resetPasswordAllowed" : false, - "editUsernameAllowed" : false, - "bruteForceProtected" : false, - "permanentLockout" : false, - "maxFailureWaitSeconds" : 900, - "minimumQuickLoginWaitSeconds" : 60, - "waitIncrementSeconds" : 60, - "quickLoginCheckMilliSeconds" : 1000, - "maxDeltaTimeSeconds" : 43200, - "failureFactor" : 30, - "roles" : { - "realm" : [ { - "id" : "48f38342-1e3f-427a-995d-c436eaee65cb", - "name" : "default-user-handling", - "description" : "${default-user-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-user-theme", "modify-user-information" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "9bb4a8dc-28e0-4645-b62f-cc94425f0cb0", - "name" : "default-maintenance-handling", - "description" : "${default-maintenance-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-maintenance-message", "find-maintenance-message", "update-maintenance-message", "delete-maintenance-message", "list-maintenance-messages" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7ee1c424-11b0-46a9-b0ed-725e9b7fc40c", - "name" : "default-system-roles", - "description" : "${default-system-roles}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "update-semantic-unit", "export-query-data", "default-data-steward-roles", "execute-query", "default-user-handling", "delete-table-data", "find-query", "list-database-views", "persist-query", "update-search-index", "delete-database-access", "view-table-history", "create-ontology", "update-ontology", "modify-user-theme", "default-system-roles", "create-semantic-concept", "default-container-handling", "create-container", "create-table", "default-broker-handling", "default-maintenance-handling", "execute-semantic-query", "uma_authorization", "table-semantic-analyse", "list-containers", "check-database-access", "escalated-query-handling", "delete-identifier", "modify-database-owner", "list-tables", "export-table-data", "create-database-access", "delete-container", "re-execute-query", "create-semantic-unit", "escalated-identifier-handling", "system", "update-table-statistic", "escalated-semantics-handling", "default-database-handling", "delete-ontology", "find-database", "find-database-view", "update-semantic-concept", "find-user", "import-database-data", "publish-identifier", "default-roles-dbrepo", "find-foreign-user", "create-database", "create-maintenance-message", "find-maintenance-message", "escalated-container-handling", "default-researcher-roles", "default-identifier-handling", "escalated-user-handling", "modify-user-information", "create-database-view", "update-maintenance-message", "delete-foreign-table", "offline_access", "modify-foreign-table-column-semantics", "delete-maintenance-message", "find-container", "insert-table-data", "modify-identifier-metadata", "modify-database-image", "escalated-broker-handling", "modify-table-column-semantics", "escalated-database-handling", "default-semantics-handling", "update-database-access", "default-query-handling", "find-table", "list-queries", "default-developer-roles", "create-identifier", "escalated-table-handling", "find-identifier", "view-database-view-data", "view-table-data", "list-licenses", "default-table-handling", "list-identifiers", "create-foreign-identifier", "list-databases", "list-ontologies", "modify-database-visibility", "list-maintenance-messages", "delete-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "143ba359-5fa2-451e-8296-43ecf20bb251", - "name" : "update-semantic-concept", - "description" : "${update-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "5136d7a3-e3f0-4585-bacd-15cb8a56095c", - "name" : "escalated-container-handling", - "description" : "${escalated-container-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-container", "delete-container" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b0bc8649-7d84-4dd3-84f0-7f174425babe", - "name" : "list-tables", - "description" : "${list-tables}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "bfd85d9c-2772-4660-a8f0-cdc0cd8252b3", - "name" : "default-database-handling", - "description" : "${default-database-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-database-image", "modify-database-owner", "update-database-access", "create-database", "list-databases", "create-database-access", "find-database", "modify-database-visibility", "import-database-data", "delete-database-access", "check-database-access" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "74648f9a-777e-4ef9-b97b-4c5d749d862f", - "name" : "update-search-index", - "description" : "${update-search-index}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "22492b64-c633-48a0-9678-b28669f2885b", - "name" : "execute-semantic-query", - "description" : "${execute-semantic-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "4ed919fa-edc5-44e5-9411-607786e4a86d", - "name" : "view-table-history", - "description" : "${view-table-history}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d89a2881-b642-4abb-b990-196e71372f6b", - "name" : "default-table-handling", - "description" : "${default-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "modify-table-column-semantics", "list-tables", "update-table-statistic", "find-table", "create-table", "delete-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b0d66d3d-59b4-4aae-aa66-e3d5a49f28e3", - "name" : "view-database-view-data", - "description" : "${view-database-view-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f5ea431a-9b2c-4195-bcb4-9511f38e4b44", - "name" : "create-database-view", - "description" : "${create-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a5ffc20e-8b11-498c-9f3b-b5740aec24c7", - "name" : "default-semantics-handling", - "description" : "${default-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-semantic-unit", "create-semantic-concept", "execute-semantic-query", "table-semantic-analyse" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe4a01f3-6590-4df6-9ade-5a9c1fae4736", - "name" : "create-semantic-unit", - "description" : "${create-semantic-unit}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "0e12eedf-545d-4d32-ac4d-2821dcb118b8", - "name" : "update-table-statistic", - "description" : "${update-table-statistic}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e63e61a2-d852-4ad3-bfb5-92d9ceafef6a", - "name" : "escalated-user-handling", - "description" : "${escalated-user-handling}", - "composite" : true, - "composites" : { - "realm" : [ "find-user" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be4e1aba-e276-4241-b6ea-01dce6c52f8b", - "name" : "find-container", - "description" : "${find-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3a801b48-f3c2-4bc6-aa25-c7a91d5b32a7", - "name" : "default-researcher-roles", - "description" : "${default-researcher-roles}", - "composite" : true, - "composites" : { - "realm" : [ "default-table-handling", "default-semantics-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-broker-handling", "default-identifier-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3d8104fb-8307-40f0-b4b2-c3e518957110", - "name" : "view-table-data", - "description" : "${view-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe71b907-7020-44ab-9964-da2b87264582", - "name" : "create-database", - "description" : "${create-database}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e51b63c2-48dd-4bd6-95fb-d257d21b26ba", - "name" : "import-database-data", - "description" : "${import-database-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "1f0a9b13-c2b8-474c-bc08-59dbd71835a6", - "name" : "modify-database-image", - "description" : "${modify-database-image}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a7ad038c-5c06-42fc-951c-15ac09d4df66", - "name" : "modify-database-owner", - "description" : "${modify-database-owner}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c12c1f4e-186f-4153-a795-26e79fb623d6", - "name" : "create-ontology", - "description" : "${create-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b60a5694-4099-4f7d-a7e9-4c433e0eb9c9", - "name" : "update-semantic-unit", - "description" : "${update-semantic-unit}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e9854bbb-4580-4757-b1ae-305934173249", - "name" : "create-database-access", - "description" : "${create-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "50c604c1-7c6e-43f3-9c43-2398f5eff66e", - "name" : "list-databases", - "description" : "${list-databases}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "535f1484-4514-4d24-8d97-e3f6c11a426b", - "name" : "create-container", - "description" : "${create-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f4116230-8642-4bb7-bbc8-db9c5c07b558", - "name" : "create-maintenance-message", - "description" : "${create-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "973f0999-cc70-4b28-9f43-979c470bea8e", - "name" : "default-data-steward-roles", - "description" : "${default-data-steward-roles}", - "composite" : true, - "composites" : { - "realm" : [ "escalated-identifier-handling", "default-semantics-handling", "escalated-semantics-handling", "default-user-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e1383fb7-d54c-4732-9146-93030eb2ca50", - "name" : "escalated-query-handling", - "description" : "${escalated-query-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "993b5c69-9eb2-42af-ac28-b4a46c6b61f2", - "name" : "find-user", - "description" : "${find-user}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e4cfdc4d-2373-477b-a8df-161db99aba00", - "name" : "create-foreign-identifier", - "description" : "${create-foreign-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6a5872a5-2b51-415d-ae2d-25a6db4a35df", - "name" : "escalated-semantics-handling", - "description" : "${escalated-semantics-handling}", - "composite" : true, - "composites" : { - "realm" : [ "update-semantic-unit", "create-ontology", "update-ontology", "list-ontologies", "delete-ontology", "modify-foreign-table-column-semantics", "update-semantic-concept" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "09147c48-273b-450b-8b11-7ef9b9245244", - "name" : "export-table-data", - "description" : "${export-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d14af590-60a8-4d75-b864-40ee0165bd7f", - "name" : "delete-database-access", - "description" : "${delete-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be051d45-cd74-4b13-8a45-f2d3351bd995", - "name" : "table-semantic-analyse", - "description" : "${table-semantic-analyse}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "272a79a7-e282-4261-8f7d-5d5d1364243a", - "name" : "update-maintenance-message", - "description" : "${update-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "64c16bfb-2015-48ad-a23f-637ff24419cb", - "name" : "default-query-handling", - "description" : "${default-query-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-database-view", "export-query-data", "execute-query", "delete-table-data", "export-table-data", "list-queries", "find-query", "list-database-views", "persist-query", "view-database-view-data", "view-table-data", "re-execute-query", "view-table-history", "create-database-view", "find-database-view", "insert-table-data" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c047d521-cec3-4444-86c4-aef098489b7b", - "name" : "delete-maintenance-message", - "description" : "${delete-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "88f82262-be80-4d18-9fb4-5529da031f33", - "name" : "system", - "description" : "${system}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e14ab76b-1c24-484d-ae2d-478b8457edea", - "name" : "list-licenses", - "description" : "${list-licenses}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d4f29937-3ca0-41e9-9786-2b7b921b6cdd", - "name" : "modify-foreign-table-column-semantics", - "description" : "${modify-foreign-table-column-semantics}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "8eda9f5c-938c-4915-bed5-6a81a1de15a8", - "name" : "list-database-views", - "description" : "${list-database-views}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "b372f8f7-d203-4293-b991-ad93fb505917", - "name" : "escalated-database-handling", - "description" : "${escalated-database-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", - "name" : "default-roles-dbrepo", - "description" : "${role_default-roles}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "3293799a-82b9-4f47-8f25-1aad2e0222fd", - "name" : "find-identifier", - "description" : "${find-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "aaa3f804-38a0-4474-b8e9-f1020c4b3f62", - "name" : "list-queries", - "description" : "${list-queries}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "76e38f7b-99bf-4d12-8d74-1c7d8812f443", - "name" : "update-ontology", - "description" : "${update-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "11f7973e-d1eb-42cb-a35d-c59dfc122775", - "name" : "modify-user-theme", - "description" : "${modify-user-theme}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f392bfcb-0be5-4fad-9ce4-8ac6396f176d", - "name" : "export-query-data", - "description" : "${export-query-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "da493b7e-fb9b-43ca-82a5-e274ad2e6b39", - "name" : "find-query", - "description" : "${find-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a4d4a788-ebcf-4d32-baed-4a85616ca037", - "name" : "escalated-identifier-handling", - "description" : "${escalated-identifier-handling}", - "composite" : true, - "composites" : { - "realm" : [ "create-foreign-identifier", "modify-identifier-metadata" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "ea38d69d-17b8-4c65-95e8-1c3501b83618", - "name" : "default-container-handling", - "description" : "${default-container-handling}", - "composite" : true, - "composites" : { - "realm" : [ "find-container", "list-containers" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "8b8813e0-af07-4d04-a8c1-e3f37192bace", - "name" : "publish-identifier", - "description" : "${publish-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "47f5eee7-9821-4bf8-b434-0da1f81c3e5a", - "name" : "default-broker-handling", - "description" : "${default-broker-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "71874bde-64a5-4a69-8685-d8998303a80c", - "name" : "delete-table-data", - "description" : "${delete-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7c0306fc-3b03-4c64-87d1-9a34f2073977", - "name" : "modify-table-column-semantics", - "description" : "${modify-table-column-semantics}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "cd0ee04c-4a5e-4035-a11b-f6a1165f7829", - "name" : "delete-container", - "description" : "${delete-container}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "67ee39c0-d601-4a67-a0fe-c4f0021d557e", - "name" : "list-containers", - "description" : "${list-containers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "795c7bb8-3502-414a-a97b-2ba1cfd6a79c", - "name" : "persist-query", - "description" : "${persist-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d05e7698-ddf5-4f20-9027-771afb2cc3c7", - "name" : "list-identifiers", - "description" : "${list-identifiers}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e4bfaf36-9a5d-43e0-9fa3-0f4ea7bad8d0", - "name" : "default-developer-roles", - "description" : "${default-developer-roles}", - "composite" : true, - "composites" : { - "realm" : [ "escalated-query-handling", "escalated-broker-handling", "default-table-handling", "escalated-database-handling", "default-container-handling", "default-query-handling", "default-user-handling", "default-database-handling", "default-maintenance-handling", "escalated-container-handling", "escalated-table-handling", "default-identifier-handling" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "e2cb054e-ea41-4ab0-881b-e6f576f7424e", - "name" : "create-semantic-concept", - "description" : "${create-semantic-concept}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "feb612cc-96a6-4ed2-aaa5-01f39b25beb5", - "name" : "insert-table-data", - "description" : "${insert-table-data}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a0942e33-441b-4343-9f02-4353d03f7bbb", - "name" : "find-database", - "description" : "${find-database}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6a0bb740-4448-49be-aee8-6dd183325be5", - "name" : "delete-foreign-table", - "description" : "${delete-foreign-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "7f3652c7-3073-4566-ab63-25385495ebc3", - "name" : "modify-database-visibility", - "description" : "${modify-database-visibility}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "4a5df51d-f14d-41a2-ad70-6521df5a5b4f", - "name" : "offline_access", - "description" : "${role_offline-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fd41c4c3-d2f8-4f49-84c7-dba84e9a5575", - "name" : "execute-query", - "description" : "${execute-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "2963c2bb-b129-4224-b98f-c8eeab8e72d1", - "name" : "create-table", - "description" : "${create-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "0c487c93-448f-4a82-8b9f-ebd8a0904bf8", - "name" : "find-foreign-user", - "description" : "${find-foreign-user}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "cf9735a9-fb70-4cc5-b5f4-75afc4e5654b", - "name" : "modify-identifier-metadata", - "description" : "${modify-identifier-metadata}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "64c2b8f2-1527-4928-81ea-b2651512d028", - "name" : "delete-ontology", - "description" : "${delete-ontology}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d6e38368-b40f-423b-82e4-e8aa595237c9", - "name" : "find-maintenance-message", - "description" : "${find-maintenance-message}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fd1cc463-3e67-49d9-81b8-2cd90c1daa9c", - "name" : "check-database-access", - "description" : "${check-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "74013867-e426-46cc-ab98-2f4a9225ad1e", - "name" : "find-table", - "description" : "${find-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a2cc60df-d280-46c5-a539-92e2aa249b4a", - "name" : "modify-user-information", - "description" : "${modify-user-information}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "c367241f-b5b5-491f-84d5-07fe1bef3877", - "name" : "default-identifier-handling", - "description" : "${default-identifier-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-identifier", "list-identifiers", "create-identifier", "find-identifier", "publish-identifier" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "ba1ad8f2-39aa-487d-987f-645e8a459559", - "name" : "delete-table", - "description" : "${delete-table}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "09f7bdb0-296f-46c8-a3a3-8f9254fb17e4", - "name" : "list-maintenance-messages", - "description" : "${list-maintenance-messages}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "fe3bc45c-61c2-4ece-bcaf-d410dc7de501", - "name" : "update-database-access", - "description" : "${update-database-access}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "f43e86ed-76de-4ca8-9b5e-c292c9359bfe", - "name" : "escalated-broker-handling", - "description" : "${escalated-broker-handling}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "916b1e65-f60c-42cd-96e4-5c98ffc1ba3c", - "name" : "uma_authorization", - "description" : "${role_uma_authorization}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "d1afa3ed-bf4f-469a-a061-ad7325fb8d9e", - "name" : "delete-database-view", - "description" : "${delete-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "6f044bad-6651-4408-bffa-20c2d8f92eee", - "name" : "create-identifier", - "description" : "${create-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "be91195a-e30a-4d15-a8da-0aca0a68782f", - "name" : "escalated-table-handling", - "description" : "${escalated-table-handling}", - "composite" : true, - "composites" : { - "realm" : [ "delete-foreign-table" ] - }, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "98bee7d6-d78c-4e7f-b6a3-3705968b248c", - "name" : "list-ontologies", - "description" : "${list-ontologies}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "15720c6b-027d-4d53-a0ff-0124bfab7c4c", - "name" : "re-execute-query", - "description" : "${re-execute-query}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "a9b5181a-8135-41d3-9862-ef80af42211d", - "name" : "delete-identifier", - "description" : "${delete-identifier}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - }, { - "id" : "469c2e63-cda6-48d4-ab8f-eb59a2c69798", - "name" : "find-database-view", - "description" : "${find-database-view}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0", - "attributes" : { } - } ], - "client" : { - "realm-management" : [ { - "id" : "4628f654-f8f3-483b-8f92-2a7fc5930b14", - "name" : "query-realms", - "description" : "${role_query-realms}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "95c2cc47-12f5-4d73-8b74-67e270c45ade", - "name" : "manage-authorization", - "description" : "${role_manage-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "824791f3-c345-42f8-b103-b7e6d7e40114", - "name" : "manage-identity-providers", - "description" : "${role_manage-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "1f840202-b7e2-4195-bac9-64e64dad2037", - "name" : "view-identity-providers", - "description" : "${role_view-identity-providers}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "3c32c096-bb13-44c9-a080-d756a48a9ea3", - "name" : "query-clients", - "description" : "${role_query-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "e4b85a68-7f31-4fcf-89a2-f10d7df358e9", - "name" : "view-authorization", - "description" : "${role_view-authorization}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7d317752-ae56-46f2-a2ce-67c64d1b35f6", - "name" : "view-users", - "description" : "${role_view-users}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-users", "query-groups" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "28824208-976e-4622-b4d7-3d18efbb46fa", - "name" : "realm-admin", - "description" : "${role_realm-admin}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-realms", "view-identity-providers", "manage-identity-providers", "manage-authorization", "query-clients", "view-authorization", "view-users", "manage-users", "view-realm", "query-users", "view-clients", "query-groups", "create-client", "manage-clients", "manage-events", "impersonation", "view-events", "manage-realm" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "57e846a2-930d-4621-819d-c35086507146", - "name" : "manage-users", - "description" : "${role_manage-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7fad9cde-bf96-475a-9174-14a87da51f95", - "name" : "view-realm", - "description" : "${role_view-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "bbcac294-d78a-4ea1-a4bf-0384266d2fe1", - "name" : "query-users", - "description" : "${role_query-users}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "480e1437-ab9e-47de-b47a-edc6b6e285de", - "name" : "view-clients", - "description" : "${role_view-clients}", - "composite" : true, - "composites" : { - "client" : { - "realm-management" : [ "query-clients" ] - } - }, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "b9a9a8f5-f91e-4e73-9e88-1cdf42bd49f9", - "name" : "create-client", - "description" : "${role_create-client}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "4d1397fb-247c-436f-b26f-124cd89afb08", - "name" : "query-groups", - "description" : "${role_query-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "e31f522b-b283-4ae1-b875-52afcd98b1d2", - "name" : "impersonation", - "description" : "${role_impersonation}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "51822d02-fa28-4a49-89da-bc534719d8a8", - "name" : "manage-clients", - "description" : "${role_manage-clients}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "b2743ce5-0ce8-4157-ae00-f693560f0b39", - "name" : "manage-events", - "description" : "${role_manage-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "7ea3d7e0-9bf4-438a-b773-243daf622aaa", - "name" : "view-events", - "description" : "${role_view-events}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - }, { - "id" : "fb73f6f5-0ed5-41d0-852c-0eb3b195b15a", - "name" : "manage-realm", - "description" : "${role_manage-realm}", - "composite" : false, - "clientRole" : true, - "containerId" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "attributes" : { } - } ], - "security-admin-console" : [ ], - "dbrepo-client" : [ ], - "admin-cli" : [ ], - "rabbitmq-client" : [ ], - "account-console" : [ ], - "broker" : [ { - "id" : "de0cfd5e-c2fe-4082-ac39-e3b092139a0f", - "name" : "read-token", - "description" : "${role_read-token}", - "composite" : false, - "clientRole" : true, - "containerId" : "88694c91-753d-4c44-9740-ec9ac06bba45", - "attributes" : { } - } ], - "account" : [ { - "id" : "acd78c04-eefc-4344-a5b4-3fc83d848936", - "name" : "delete-account", - "description" : "${role_delete-account}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "939be844-8c49-45b3-9ca1-4b10a454b346", - "name" : "view-profile", - "description" : "${role_view-profile}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "e52fdf00-3e73-4c17-bc1c-643493710a6b", - "name" : "view-applications", - "description" : "${role_view-applications}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "b02a822e-a708-420a-bddc-1a315033fd7c", - "name" : "view-consent", - "description" : "${role_view-consent}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "c590e5f5-2cbf-4151-b1dc-96c454f1f654", - "name" : "view-groups", - "description" : "${role_view-groups}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "15974151-6c13-426b-8cc3-7683dd1311e1", - "name" : "manage-account-links", - "description" : "${role_manage-account-links}", - "composite" : false, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "c12d8d94-c2df-498e-bbe4-2f934a83ae92", - "name" : "manage-consent", - "description" : "${role_manage-consent}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "view-consent" ] - } - }, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - }, { - "id" : "55f85811-bded-4d6b-8f7b-45844b963875", - "name" : "manage-account", - "description" : "${role_manage-account}", - "composite" : true, - "composites" : { - "client" : { - "account" : [ "manage-account-links" ] - } - }, - "clientRole" : true, - "containerId" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "attributes" : { } - } ] - } - }, - "groups" : [ { - "id" : "f2ce17fe-7b15-47a4-bbf8-86f415298fa9", - "name" : "data-stewards", - "path" : "/data-stewards", - "attributes" : { }, - "realmRoles" : [ "default-data-steward-roles" ], - "clientRoles" : { }, - "subGroups" : [ ] - }, { - "id" : "124d9888-0b6e-46aa-8225-077dcedaf16e", - "name" : "developers", - "path" : "/developers", - "attributes" : { }, - "realmRoles" : [ "default-developer-roles" ], - "clientRoles" : { }, - "subGroups" : [ ] - }, { - "id" : "f467c38e-9041-4faa-ae0b-39cec65ff4db", - "name" : "researchers", - "path" : "/researchers", - "attributes" : { }, - "realmRoles" : [ "default-researcher-roles" ], - "clientRoles" : { }, - "subGroups" : [ ] - }, { - "id" : "2b9f94b4-d434-4a98-8eab-25678cfee983", - "name" : "system", - "path" : "/system", - "attributes" : { }, - "realmRoles" : [ "default-system-roles" ], - "clientRoles" : { }, - "subGroups" : [ ] - } ], - "defaultRole" : { - "id" : "abd2d9ee-ebc4-4d0a-839e-6b588a6d442a", - "name" : "default-roles-dbrepo", - "description" : "${role_default-roles}", - "composite" : false, - "clientRole" : false, - "containerId" : "82c39861-d877-4667-a0f3-4daa2ee230e0" - }, - "defaultGroups" : [ "/researchers" ], - "requiredCredentials" : [ "password" ], - "otpPolicyType" : "totp", - "otpPolicyAlgorithm" : "HmacSHA1", - "otpPolicyInitialCounter" : 0, - "otpPolicyDigits" : 6, - "otpPolicyLookAheadWindow" : 1, - "otpPolicyPeriod" : 30, - "otpPolicyCodeReusable" : false, - "otpSupportedApplications" : [ "totpAppGoogleName", "totpAppFreeOTPName", "totpAppMicrosoftAuthenticatorName" ], - "webAuthnPolicyRpEntityName" : "keycloak", - "webAuthnPolicySignatureAlgorithms" : [ "ES256" ], - "webAuthnPolicyRpId" : "", - "webAuthnPolicyAttestationConveyancePreference" : "not specified", - "webAuthnPolicyAuthenticatorAttachment" : "not specified", - "webAuthnPolicyRequireResidentKey" : "not specified", - "webAuthnPolicyUserVerificationRequirement" : "not specified", - "webAuthnPolicyCreateTimeout" : 0, - "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyAcceptableAaguids" : [ ], - "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", - "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ], - "webAuthnPolicyPasswordlessRpId" : "", - "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", - "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", - "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", - "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", - "webAuthnPolicyPasswordlessCreateTimeout" : 0, - "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, - "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], - "scopeMappings" : [ { - "clientScope" : "rabbitmq.tag:administrator", - "roles" : [ "escalated-broker-handling" ] - }, { - "clientScope" : "rabbitmq.tag:management", - "roles" : [ "default-broker-handling" ] - } ], - "clientScopeMappings" : { - "account" : [ { - "client" : "account-console", - "roles" : [ "manage-account", "view-groups" ] - } ] - }, - "clients" : [ { - "id" : "e767a4a6-79e9-4e08-82b7-1076e1a09142", - "clientId" : "account", - "name" : "${client_account}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/dbrepo/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/dbrepo/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "d3c4a04e-39ce-4549-a34a-11e25774cd96", - "clientId" : "account-console", - "name" : "${client_account-console}", - "rootUrl" : "${authBaseUrl}", - "baseUrl" : "/realms/dbrepo/account/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/realms/dbrepo/account/*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "22d90d9c-9881-474c-8dfd-a62c808a9f1c", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "81ef0f59-a5ca-4be4-a1d1-0c32edf1cfd6", - "clientId" : "admin-cli", - "name" : "${client_admin-cli}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : false, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "88694c91-753d-4c44-9740-ec9ac06bba45", - "clientId" : "broker", - "name" : "${client_broker}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "6b7ef364-4132-4831-b4e2-b6e9e9dc63ee", - "clientId" : "dbrepo-client", - "name" : "${dbrepo-client}", - "description" : "", - "rootUrl" : "", - "adminUrl" : "", - "baseUrl" : "", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : true, - "clientAuthenticatorType" : "client-secret", - "secret" : "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG", - "redirectUris" : [ "*" ], - "webOrigins" : [ "*" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : true, - "protocol" : "openid-connect", - "attributes" : { - "oidc.ciba.grant.enabled" : "false", - "client.secret.creation.time" : "1680085365", - "backchannel.logout.session.required" : "true", - "post.logout.redirect.uris" : "*", - "oauth2.device.authorization.grant.enabled" : "false", - "backchannel.logout.revoke.offline.tokens" : "false" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : true, - "nodeReRegistrationTimeout" : -1, - "protocolMappers" : [ { - "id" : "da0b27c1-ae2e-4baa-bf78-db233e15c78d", - "name" : "preferred_username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "userinfo.token.claim" : "true" - } - }, { - "id" : "7c94de93-f60f-487b-b4b7-1891c67f74cc", - "name" : "aud", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-hardcoded-claim-mapper", - "consentRequired" : false, - "config" : { - "claim.value" : "dbrepo", - "userinfo.token.claim" : "true", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "aud", - "access.tokenResponse.claim" : "false" - } - }, { - "id" : "030a1cd9-53d1-4a62-a375-94d50a2dc6fc", - "name" : "uid", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "aggregate.attrs" : "false", - "multivalued" : "false", - "userinfo.token.claim" : "true", - "user.attribute" : "LDAP_ID", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "uid" - } - } ], - "defaultClientScopes" : [ "roles", "attributes" ], - "optionalClientScopes" : [ "rabbitmq.read:*/*", "web-origins", "acr", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] - }, { - "id" : "25741f6b-4867-4138-8238-6345c6ba8702", - "clientId" : "rabbitmq-client", - "name" : "${rabbitmq-client}", - "description" : "", - "rootUrl" : "", - "adminUrl" : "", - "baseUrl" : "", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "secret" : "JEC2FexxrX4N65fLeDGukAl6R3Lc9y0u", - "redirectUris" : [ "*" ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : true, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : true, - "protocol" : "openid-connect", - "attributes" : { - "oidc.ciba.grant.enabled" : "false", - "client.secret.creation.time" : "1680000860", - "backchannel.logout.session.required" : "true", - "post.logout.redirect.uris" : "*", - "oauth2.device.authorization.grant.enabled" : "false", - "backchannel.logout.revoke.offline.tokens" : "false" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : -1, - "protocolMappers" : [ { - "id" : "01a937ed-f0e8-4137-80f3-3be3c447f7fb", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "false", - "user.attribute" : "username", - "id.token.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "client_id", - "jsonType.label" : "String" - } - }, { - "id" : "f1afc22d-f595-403b-ba2e-6ab19d98205e", - "name" : "Audience", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-hardcoded-claim-mapper", - "consentRequired" : false, - "config" : { - "claim.value" : "rabbitmq", - "userinfo.token.claim" : "false", - "id.token.claim" : "false", - "access.token.claim" : "true", - "claim.name" : "aud", - "access.tokenResponse.claim" : "false" - } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "rabbitmq.tag:management" ], - "optionalClientScopes" : [ "rabbitmq.read:*/*", "rabbitmq.write:*/*", "address", "phone", "offline_access", "profile", "roles", "microprofile-jwt", "email", "rabbitmq.configure:*/*" ] - }, { - "id" : "cfffd5d0-aa19-4057-8ca0-f2c51ca0e930", - "clientId" : "realm-management", - "name" : "${client_realm-management}", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ ], - "webOrigins" : [ ], - "notBefore" : 0, - "bearerOnly" : true, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : false, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - }, { - "id" : "f205c451-9524-4380-acc3-947f7ecb6b7c", - "clientId" : "security-admin-console", - "name" : "${client_security-admin-console}", - "rootUrl" : "${authAdminUrl}", - "baseUrl" : "/admin/dbrepo/console/", - "surrogateAuthRequired" : false, - "enabled" : true, - "alwaysDisplayInConsole" : false, - "clientAuthenticatorType" : "client-secret", - "redirectUris" : [ "/admin/dbrepo/console/*" ], - "webOrigins" : [ "+" ], - "notBefore" : 0, - "bearerOnly" : false, - "consentRequired" : false, - "standardFlowEnabled" : true, - "implicitFlowEnabled" : false, - "directAccessGrantsEnabled" : false, - "serviceAccountsEnabled" : false, - "publicClient" : true, - "frontchannelLogout" : false, - "protocol" : "openid-connect", - "attributes" : { - "post.logout.redirect.uris" : "+", - "pkce.code.challenge.method" : "S256" - }, - "authenticationFlowBindingOverrides" : { }, - "fullScopeAllowed" : false, - "nodeReRegistrationTimeout" : 0, - "protocolMappers" : [ { - "id" : "c4d54410-3f22-4259-9571-94da2c43b752", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String" - } - } ], - "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], - "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] - } ], - "clientScopes" : [ { - "id" : "69f4ecf0-4165-49ab-bf0d-38409b15b706", - "name" : "rabbitmq.tag:administrator", - "description" : "administrator", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "7f6e9b44-e2eb-417d-b0fe-db820c9a6564", - "name" : "email", - "description" : "OpenID Connect built-in scope: email", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "consent.screen.text" : "${emailScopeConsentText}" - }, - "protocolMappers" : [ { - "id" : "782819fe-ba5d-4ddb-9f95-cabb69d79c8d", - "name" : "email verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "emailVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email_verified", - "jsonType.label" : "boolean" - } - }, { - "id" : "ca613fc8-bbf2-4240-8b33-a1874f1559f3", - "name" : "email", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "email", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "email", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "b9da268f-6745-49dc-a764-3c54e385accc", - "name" : "profile", - "description" : "OpenID Connect built-in scope: profile", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "consent.screen.text" : "${profileScopeConsentText}" - }, - "protocolMappers" : [ { - "id" : "84f0487a-1d7d-470c-9b8e-5835294ae235", - "name" : "username", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "preferred_username", - "jsonType.label" : "String" - } - }, { - "id" : "bbdcdb36-3ec0-443d-b1af-9993d40f0567", - "name" : "gender", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "gender", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "gender", - "jsonType.label" : "String" - } - }, { - "id" : "9faa870b-5491-4ce9-b27d-c9ce07d6a95e", - "name" : "birthdate", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "birthdate", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "birthdate", - "jsonType.label" : "String" - } - }, { - "id" : "f0e3c012-9523-4076-83ae-e466e2d08220", - "name" : "full name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-full-name-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - }, { - "id" : "f757d8ec-e181-429c-9287-9ad0600b061f", - "name" : "profile", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "profile", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "profile", - "jsonType.label" : "String" - } - }, { - "id" : "18cfbf4b-0a8e-45c7-a832-c0f72c92f3f3", - "name" : "updated at", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "updatedAt", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "updated_at", - "jsonType.label" : "long" - } - }, { - "id" : "841ea785-26ab-429a-a420-09ce3948924d", - "name" : "family name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "lastName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "family_name", - "jsonType.label" : "String" - } - }, { - "id" : "bfba13ff-f952-4e89-bbb1-a693fdebfae8", - "name" : "website", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "website", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "website", - "jsonType.label" : "String" - } - }, { - "id" : "475f071d-5149-4379-b928-76482f5f519c", - "name" : "zoneinfo", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "zoneinfo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "zoneinfo", - "jsonType.label" : "String" - } - }, { - "id" : "b8bebfed-b5e9-4604-a0ee-9817f7d439ac", - "name" : "middle name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "middleName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "middle_name", - "jsonType.label" : "String" - } - }, { - "id" : "445232c8-6830-476c-a6f1-8bbef167595a", - "name" : "picture", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "picture", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "picture", - "jsonType.label" : "String" - } - }, { - "id" : "65f2e474-6ede-4872-86e4-e49504dd0f2a", - "name" : "locale", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "locale", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "locale", - "jsonType.label" : "String" - } - }, { - "id" : "16cd5a27-ccf3-453c-ae1e-8621813ab73c", - "name" : "given name", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "firstName", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "given_name", - "jsonType.label" : "String" - } - }, { - "id" : "f9efedfc-3388-457c-b10a-1dff4525ff9b", - "name" : "nickname", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "nickname", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "nickname", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "627fa054-08eb-4206-af71-9e838e984b8b", - "name" : "microprofile-jwt", - "description" : "Microprofile - JWT built-in scope", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "e6cc53e5-5d7e-468e-88c8-0737dd3dc759", - "name" : "groups", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "multivalued" : "true", - "userinfo.token.claim" : "true", - "user.attribute" : "foo", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "groups", - "jsonType.label" : "String" - } - }, { - "id" : "83b4444c-10fc-44e8-a0c0-0c1da1f9bba3", - "name" : "upn", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-property-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "username", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "upn", - "jsonType.label" : "String" - } - } ] - }, { - "id" : "4122ff9e-ad3c-4142-afc6-9aefdecfc86d", - "name" : "role_list", - "description" : "SAML role list", - "protocol" : "saml", - "attributes" : { - "consent.screen.text" : "${samlRoleListScopeConsentText}", - "display.on.consent.screen" : "true" - }, - "protocolMappers" : [ { - "id" : "bb0747fa-c008-4af3-93be-e7739650ebd5", - "name" : "role list", - "protocol" : "saml", - "protocolMapper" : "saml-role-list-mapper", - "consentRequired" : false, - "config" : { - "single" : "false", - "attribute.nameformat" : "Basic", - "attribute.name" : "Role" - } - } ] - }, { - "id" : "2e76447d-fbe7-4fa7-a16c-54a381b960ae", - "name" : "rabbitmq.configure:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "52aad832-c6c4-49df-8a04-6ad4a406fdfa", - "name" : "phone", - "description" : "OpenID Connect built-in scope: phone", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "consent.screen.text" : "${phoneScopeConsentText}" - }, - "protocolMappers" : [ { - "id" : "dae802fb-9138-408a-b80e-a40eb0f56814", - "name" : "phone number", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "phoneNumber", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number", - "jsonType.label" : "String" - } - }, { - "id" : "feb06a8d-b0eb-4911-8464-368d93f566fa", - "name" : "phone number verified", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "userinfo.token.claim" : "true", - "user.attribute" : "phoneNumberVerified", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "phone_number_verified", - "jsonType.label" : "boolean" - } - } ] - }, { - "id" : "f64d64e8-57ce-4eb2-b99e-9f02fdbd99f9", - "name" : "web-origins", - "description" : "OpenID Connect scope for add allowed web origins to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false", - "consent.screen.text" : "" - }, - "protocolMappers" : [ { - "id" : "c6411e3b-6478-453d-b530-5fe175a4d786", - "name" : "allowed web origins", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-allowed-origins-mapper", - "consentRequired" : false, - "config" : { } - } ] - }, { - "id" : "55341d34-0086-4173-ae61-d9b175b179d8", - "name" : "acr", - "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false" - }, - "protocolMappers" : [ { - "id" : "58ea3217-0fff-4207-9d08-919f5493b629", - "name" : "acr loa level", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-acr-mapper", - "consentRequired" : false, - "config" : { - "id.token.claim" : "true", - "access.token.claim" : "true", - "userinfo.token.claim" : "true" - } - } ] - }, { - "id" : "a02c2c38-923c-46ec-9899-321412b388e5", - "name" : "attributes", - "description" : "User Attributes", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - }, - "protocolMappers" : [ { - "id" : "78c461c1-f3f9-4d10-8835-097f13bdcd60", - "name" : "Theme", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-attribute-mapper", - "consentRequired" : false, - "config" : { - "aggregate.attrs" : "false", - "multivalued" : "false", - "userinfo.token.claim" : "true", - "user.attribute" : "theme_dark", - "id.token.claim" : "true", - "access.token.claim" : "true", - "claim.name" : "attributes.theme_dark" - } - } ] - }, { - "id" : "06062e22-89c0-4e1d-a25b-2483903b02d5", - "name" : "rabbitmq.write:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "db63e03b-7918-492f-997b-f2dda98f3b39", - "name" : "rabbitmq.tag:management", - "description" : "management", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "210cc792-6c07-45a6-a77e-827cdf3b41ba", - "name" : "offline_access", - "description" : "OpenID Connect built-in scope: offline_access", - "protocol" : "openid-connect", - "attributes" : { - "consent.screen.text" : "${offlineAccessScopeConsentText}", - "display.on.consent.screen" : "true" - } - }, { - "id" : "425abf4a-2ee2-431d-aa92-e373a36fe556", - "name" : "address", - "description" : "OpenID Connect built-in scope: address", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "true", - "consent.screen.text" : "${addressScopeConsentText}" - }, - "protocolMappers" : [ { - "id" : "8d4ffe4d-1d01-4ca1-8ff4-44eacca61b30", - "name" : "address", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-address-mapper", - "consentRequired" : false, - "config" : { - "user.attribute.formatted" : "formatted", - "user.attribute.country" : "country", - "user.attribute.postal_code" : "postal_code", - "userinfo.token.claim" : "true", - "user.attribute.street" : "street", - "id.token.claim" : "true", - "user.attribute.region" : "region", - "access.token.claim" : "true", - "user.attribute.locality" : "locality" - } - } ] - }, { - "id" : "c96f0b73-ea79-4b46-93ef-d1092297f855", - "name" : "rabbitmq.read:*/*", - "description" : "", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "true", - "display.on.consent.screen" : "false", - "gui.order" : "", - "consent.screen.text" : "" - } - }, { - "id" : "37f61543-dad7-4a82-8e10-77acdd1eefdc", - "name" : "roles", - "description" : "OpenID Connect scope for add user roles to the access token", - "protocol" : "openid-connect", - "attributes" : { - "include.in.token.scope" : "false", - "display.on.consent.screen" : "true", - "consent.screen.text" : "${rolesScopeConsentText}" - }, - "protocolMappers" : [ { - "id" : "3b6b6914-8ad1-4a71-88ec-444f754aaacb", - "name" : "audience resolve", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-audience-resolve-mapper", - "consentRequired" : false, - "config" : { } - }, { - "id" : "2defedf5-9af3-4531-822c-a879dedcd29d", - "name" : "realm roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-realm-role-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "foo", - "access.token.claim" : "true", - "claim.name" : "realm_access.roles", - "jsonType.label" : "String", - "multivalued" : "true" - } - }, { - "id" : "a7bd6723-e58e-47f7-95c0-2925ce99283d", - "name" : "client roles", - "protocol" : "openid-connect", - "protocolMapper" : "oidc-usermodel-client-role-mapper", - "consentRequired" : false, - "config" : { - "user.attribute" : "foo", - "access.token.claim" : "true", - "claim.name" : "resource_access.${client_id}.roles", - "jsonType.label" : "String", - "multivalued" : "true" - } - } ] - } ], - "defaultDefaultClientScopes" : [ "rabbitmq.tag:administrator", "rabbitmq.tag:management" ], - "defaultOptionalClientScopes" : [ "rabbitmq.write:*/*", "offline_access", "rabbitmq.configure:*/*", "roles", "role_list", "address", "phone", "acr", "microprofile-jwt", "email", "attributes", "profile", "rabbitmq.read:*/*", "web-origins" ], - "browserSecurityHeaders" : { - "contentSecurityPolicyReportOnly" : "", - "xContentTypeOptions" : "nosniff", - "xRobotsTag" : "none", - "xFrameOptions" : "SAMEORIGIN", - "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "xXSSProtection" : "1; mode=block", - "strictTransportSecurity" : "max-age=31536000; includeSubDomains" - }, - "smtpServer" : { }, - "eventsEnabled" : false, - "eventsListeners" : [ "jboss-logging" ], - "enabledEventTypes" : [ "SEND_RESET_PASSWORD", "UPDATE_CONSENT_ERROR", "GRANT_CONSENT", "VERIFY_PROFILE_ERROR", "REMOVE_TOTP", "REVOKE_GRANT", "UPDATE_TOTP", "LOGIN_ERROR", "CLIENT_LOGIN", "RESET_PASSWORD_ERROR", "IMPERSONATE_ERROR", "CODE_TO_TOKEN_ERROR", "CUSTOM_REQUIRED_ACTION", "OAUTH2_DEVICE_CODE_TO_TOKEN_ERROR", "RESTART_AUTHENTICATION", "IMPERSONATE", "UPDATE_PROFILE_ERROR", "LOGIN", "OAUTH2_DEVICE_VERIFY_USER_CODE", "UPDATE_PASSWORD_ERROR", "CLIENT_INITIATED_ACCOUNT_LINKING", "TOKEN_EXCHANGE", "AUTHREQID_TO_TOKEN", "LOGOUT", "REGISTER", "DELETE_ACCOUNT_ERROR", "CLIENT_REGISTER", "IDENTITY_PROVIDER_LINK_ACCOUNT", "DELETE_ACCOUNT", "UPDATE_PASSWORD", "CLIENT_DELETE", "FEDERATED_IDENTITY_LINK_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN", "CLIENT_DELETE_ERROR", "VERIFY_EMAIL", "CLIENT_LOGIN_ERROR", "RESTART_AUTHENTICATION_ERROR", "EXECUTE_ACTIONS", "REMOVE_FEDERATED_IDENTITY_ERROR", "TOKEN_EXCHANGE_ERROR", "PERMISSION_TOKEN", "SEND_IDENTITY_PROVIDER_LINK_ERROR", "EXECUTE_ACTION_TOKEN_ERROR", "SEND_VERIFY_EMAIL", "OAUTH2_DEVICE_AUTH", "EXECUTE_ACTIONS_ERROR", "REMOVE_FEDERATED_IDENTITY", "OAUTH2_DEVICE_CODE_TO_TOKEN", "IDENTITY_PROVIDER_POST_LOGIN", "IDENTITY_PROVIDER_LINK_ACCOUNT_ERROR", "OAUTH2_DEVICE_VERIFY_USER_CODE_ERROR", "UPDATE_EMAIL", "REGISTER_ERROR", "REVOKE_GRANT_ERROR", "EXECUTE_ACTION_TOKEN", "LOGOUT_ERROR", "UPDATE_EMAIL_ERROR", "CLIENT_UPDATE_ERROR", "AUTHREQID_TO_TOKEN_ERROR", "UPDATE_PROFILE", "CLIENT_REGISTER_ERROR", "FEDERATED_IDENTITY_LINK", "SEND_IDENTITY_PROVIDER_LINK", "SEND_VERIFY_EMAIL_ERROR", "RESET_PASSWORD", "CLIENT_INITIATED_ACCOUNT_LINKING_ERROR", "OAUTH2_DEVICE_AUTH_ERROR", "UPDATE_CONSENT", "REMOVE_TOTP_ERROR", "VERIFY_EMAIL_ERROR", "SEND_RESET_PASSWORD_ERROR", "CLIENT_UPDATE", "CUSTOM_REQUIRED_ACTION_ERROR", "IDENTITY_PROVIDER_POST_LOGIN_ERROR", "UPDATE_TOTP_ERROR", "CODE_TO_TOKEN", "VERIFY_PROFILE", "GRANT_CONSENT_ERROR", "IDENTITY_PROVIDER_FIRST_LOGIN_ERROR" ], - "adminEventsEnabled" : false, - "adminEventsDetailsEnabled" : false, - "identityProviders" : [ ], - "identityProviderMappers" : [ ], - "components" : { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { - "id" : "4d3f9f14-f5d2-4b0c-8ea7-e6d078aa2191", - "name" : "Max Clients Limit", - "providerId" : "max-clients", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "max-clients" : [ "200" ] - } - }, { - "id" : "f35bce67-1e75-408b-b065-52183368d4fd", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - }, { - "id" : "1849e52a-b8c9-44a8-af3d-ee19376a1ed1", - "name" : "Trusted Hosts", - "providerId" : "trusted-hosts", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "host-sending-registration-request-must-match" : [ "true" ], - "client-uris-must-match" : [ "true" ] - } - }, { - "id" : "f565cb47-3bcf-4078-8f94-eb4179c375b8", - "name" : "Full Scope Disabled", - "providerId" : "scope", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "0efa669d-1017-4b4a-82e1-c2eaf72de2c9", - "name" : "Allowed Client Scopes", - "providerId" : "allowed-client-templates", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allow-default-scopes" : [ "true" ] - } - }, { - "id" : "528fb423-d66e-472e-9120-1f03ba9e0f18", - "name" : "Consent Required", - "providerId" : "consent-required", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { } - }, { - "id" : "104ec5a9-025b-4c44-8ac0-82d22887ca3e", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "authenticated", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-address-mapper", "saml-user-property-mapper", "saml-role-list-mapper", "oidc-usermodel-property-mapper", "oidc-usermodel-attribute-mapper", "saml-user-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-full-name-mapper" ] - } - }, { - "id" : "3ab11d74-5e76-408a-b85a-26bf8950f979", - "name" : "Allowed Protocol Mapper Types", - "providerId" : "allowed-protocol-mappers", - "subType" : "anonymous", - "subComponents" : { }, - "config" : { - "allowed-protocol-mapper-types" : [ "oidc-full-name-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-usermodel-attribute-mapper", "saml-role-list-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "saml-user-property-mapper", "saml-user-attribute-mapper" ] - } - } ], - "org.keycloak.keys.KeyProvider" : [ { - "id" : "28ca0b6d-b2e2-4785-b04b-2391e6344e30", - "name" : "aes-generated", - "providerId" : "aes-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "6dc4834f-a1de-4cfe-a29d-e84ac8e9b1a8" ], - "secret" : [ "HpuzG_jWYKwypLeoPEMC4A" ], - "priority" : [ "100" ] - } - }, { - "id" : "bd7945cf-6d35-4e03-9c3a-197f2dc76973", - "name" : "hmac-generated", - "providerId" : "hmac-generated", - "subComponents" : { }, - "config" : { - "kid" : [ "c8500166-5cc4-4085-ad0f-853c3b0b0233" ], - "secret" : [ "TI3xg__G2Qy8C47DracpYir2X4ItQZSrhgr5KSlwRNISDbBqZ-ky3OcAyokSXMcpweSOaCPvbivpvzJNklUBvw" ], - "priority" : [ "100" ], - "algorithm" : [ "HS256" ] - } - }, { - "id" : "2f53ccf3-37b0-4d34-83e7-ed497499ee51", - "name" : "rsa-enc-generated", - "providerId" : "rsa-enc-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEowIBAAKCAQEA3b1tNLfcjFLUw9UShVDNf+ZD8sQqb4YBaIXcSJTX/zDQUPiCp176BBGI3s4VplDArnOW+LumozmKogeoHEnGEIDW8ovgK5uMU9tSA2p0qqGBUMOdR8YATTIfCJe7qGiiuGa3WZy3sQLM70SuRzx02YU8gvUcvl2Js4KyqAziOUX/w3Wa59H9jjGNUXYyqaPWJp73eHzbVYWySzyLG22mVlcUtBx5siL5T2/Xu0p9z4l7/bapwwmOVi1ZrcHjbEAwdGEiSMGI/uWqAF+r1BRpmJLR7HNXcL3eK4/56VYLaiwSejfyYeRFMITEn/UxGYhcXZ5xMUUCG0TxjBhLYpTBuwIDAQABAoIBAA4dwebcxkrH99Poa8+WkiE7JgaS9sahx9OBI2xwJANoIU2TpzGuNLQZ76uLgB+rPWZTD9Xm5a1iJjwOyQ9/937TzPCk91D0tpgcusRikb8jx/6TGB9acL4kBjYUVCCHr3BA2G75MKKGtJ2OMvAbCQSosZj+r2VDwYFEPUkV2jheE5JHSBkwyIRrus3JCwu8gu5fyCg9z8ljcxJxI5HIsi4v8Z21aCw/cLj7h5cMt44wCjQz4rOfYNBEFeHDtlfR1QtWKgjm4ZHHJbKrzf9b2kQXclziceEbSM0tYbROEXKi+s0Zc+z3HEG89vv0vfN400clmzzIAijKY6gg3pPRWdECgYEA+lnWYbSlXDMNYx6RBXm1RnlMUYIm4oy4/9ljgnoGJ6WCn3SjFkgaDtiKfGIG1BSB85r04pAPANgcWHf5tWDnq0ARvBVG0BX2bKd++7B3D4d3CRYKCwm88SslJXv9dfHVhq4+zViFPiUWwT20A72jCuUCvL88y5fh/YBecfdh+jECgYEA4r5RD0NB9dMaeg5/jk/GEHIo4Z9KLc6FrSoOFo2xFkPOy1sgDpDOiNtypuWvniO7k7Ose3DS3hlfTMsKzIW/CgQJ20+Y4cvBWDaOsRxfjj7w3d+jH5OSJdKKSzTrgLKc9ZhlRzVXy0J0hipIA6HG5kdVdLXmh85ITmf1CbJhE6sCgYBjPVeBNbXTHZ2x6/z62aslO5IoQVqetb/kE82hfDOSZcao5Ph9Lam+ttH2ynkAevykj4mBgi+gWwqpey2uW7KaLPSaxShj9kDQA3mP1fzsV/u0y1rB02Nlin/YIxVvOqU1FT9p8SwoXVVu1sHUNck62VtDbN9xqUx5S/ikXrclEQKBgQCoTssOwEcK+Vty9KYcdfy4onTUHZBLdjxl8Iyqkxy7QTQUYRznkvesQPDXEDGO+kk3dyx2KKZt9Hl4IFNww2quPZcvcuMx4DQxjbXXpA8OIIxcta95NepLJwA+mRai3nKCH1A2TlNP7pFeMa5o+8IPly3Ix2lKr4Wepa4PN5i1pwKBgCZ1QP6XAOERl9NznNmU0rXVcvYNP4PIIfQWfvGsldZ4QKkmjjAGiS0/oYqdWs+UDRZyCRChaVjDXO9fk0PEG5OGKAj9nyiYCT/M8xtJ3UeP5ffZZvJ/vnye3QdDIo1e38ZzsWwJHmLYw7fRqY9W5Vxo0Vsy22U3CJY70KTxVdTy" ], - "keyUse" : [ "ENC" ], - "certificate" : [ "MIICmzCCAYMCBgGG3GWycDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDdvW00t9yMUtTD1RKFUM1/5kPyxCpvhgFohdxIlNf/MNBQ+IKnXvoEEYjezhWmUMCuc5b4u6ajOYqiB6gcScYQgNbyi+Arm4xT21IDanSqoYFQw51HxgBNMh8Il7uoaKK4ZrdZnLexAszvRK5HPHTZhTyC9Ry+XYmzgrKoDOI5Rf/DdZrn0f2OMY1RdjKpo9Ymnvd4fNtVhbJLPIsbbaZWVxS0HHmyIvlPb9e7Sn3PiXv9tqnDCY5WLVmtweNsQDB0YSJIwYj+5aoAX6vUFGmYktHsc1dwvd4rj/npVgtqLBJ6N/Jh5EUwhMSf9TEZiFxdnnExRQIbRPGMGEtilMG7AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAK3kQ1VkQrzvSWvmXmazmNoA1ZiPzRDs1XhGUWxgsxzgPylr3dGBuqQbKvgnLUBQLSqlJHpI4fZflHswu1qrvVZYtekPcGef4WhcKAu2i1RwxrKa6RJQ1tRbrLuVYCzPv5p/DWgltWVn88aoLnqQn0SK/0PB/o4a4Cm7Kq2ZzCr1dACBr06LvOHsc7249OySmbG4HH+pLK6jVURhZ9VaObqAHe2FJBVVoIzURbdiRRURqumrIvbnpeaU1aFyg6ED5wTnXvmMPmVPt9F79mcB33bASO5wyu00X8t1hyN2Show2l2vxLACGUzVkTQt15s7uDLKE7qLmKSR3EuSGXWv3wA=" ], - "priority" : [ "100" ], - "algorithm" : [ "RSA-OAEP" ] - } - }, { - "id" : "2293ff99-3c6d-46d1-8635-5e679d5b134a", - "name" : "rsa-generated", - "providerId" : "rsa-generated", - "subComponents" : { }, - "config" : { - "privateKey" : [ "MIIEpAIBAAKCAQEAqqnHQ2BWWW9vDNLRCcxD++xZg/16oqMo/c1l+lcFEjjAIJjJp/HqrPYU/U9GvquGE6PbVFtTzW1KcKawOW+FJNOA3CGo8Q1TFEfz43B8rZpKsFbJKvQGVv1Z4HaKPvLUm7iMm8Hv91cLduuoWx6Q3DPe2vg13GKKEZe7UFghF+0T9u8EKzA/XqQ0OiICmsmYPbwvf9N3bCKsB/Y10EYmZRb8IhCoV9mmO5TxgWgiuNeCTtNCv2ePYqL/U0WvyGFW0reasIK8eg3KrAUj8DpyOgPOVBn3lBGf+3KFSYi+0bwZbJZWqbC/Xlk20Go1YfeJPRIt7ImxD27R/lNjgDO/MwIDAQABAoIBADNcMt6hAHub4JTAYS6Mra0EPRBO2XhWmACBrv3+8ETClXd5475KPLDewgRVtlmtbwU8G8awUXESQgPS9lfiqvQhPreA3cHlm6oP2WMKOEtakr2s8I+frsTBLCo0Ini9RaSzjoVVgS0zofyhASKi+T970MafSj5P3XNb8YBFdXgoYDiA7FXLH6a/+m7LScL+wGcFMAAeYESxZbMQLfH3v8L+4EcTraiwjLG17ZdlF3dpybMyUSse6ZQ/PdlyvBuzzLXhN6Ce2gd9ATfS+YWTzo7Yf+GU+ex5bIpVOfHqtuM/hyq7YGKENClsXwNZIAoFnvGCbvECAfgyapVrD30IfykCgYEA0rgsSZ82pxT40NxwgBD1g9lbNVBKXphRB/3S078qusUzJjT7AldEj4imGPhAbI7bI8gAeWJsp1XJWkjM8ktaVrh+NQl7p8e9OPh0pQF/5Bdg8ajbjXESpjnaU66pVYRQy/d+jNli/YRAHX5RUfsBl+6W4+WSVMGmKBiqJsur+ecCgYEAz1YVXClcmUnyZem5B+2E9noIzjF6ROE+jIb6rawM85P3Xd0lXtECQavtxw+Qk7I32qOwrxl1UpK2foVel3pazi+4OpMfmqtYGenRP1Zk1cZwrDo0cIemTDGjj3kJ8tYn12CGolFQpJZgK6OHzvG0tOxI5VZgjIViWNPe1PGWXtUCgYEAxXGNDe8BZs1f11S2lUlOw5yGug3hoYFXbAWJ5p7Ziuf8ZXB/QlJDC7se54a11wKEk6Jzz0lKRgE8CjzszJuOqnN0zn10QGIIC7nCklo1W6QMUmPGVWH994N976tZP6gbjQL6sT+AYcvpx7j0ubxYYeRNvnz+ACzzY964kGGHY0ECgYEAumlwPPNnMN7+VEjGNm2D7UMdJZ3wi3tkjF5ThdA5uMohTsAk+FG80KSu3RmOaGyEsUwY7+VYyYvlDm4E9PZqLBVVczyR3rMNPAcwPd0EPfvzk7WlLkOX7ct3fehaXH3VRlyfz9KCSeh1wOZ/lT1VtpD2nVOC7PSDzs92+kfXZZ0CgYAnrD1y4skgXkdwolZ3unn3EFyGm2d+X5aMTHwQPdWxqoNIAl/9wdghlzihwnPhhsxq1WzlxuC3V2IMrNPtRx70Mi+FbSmR5m4Xx5RptgMtMlwno+L40PzNJgMjHGjt0wcx3Vel8wuohDtnqMyS7P5nG1/TQx0Cyzwn7QOXlNpgbQ==" ], - "keyUse" : [ "SIG" ], - "certificate" : [ "MIICmzCCAYMCBgGG3GWyBTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZkYnJlcG8wHhcNMjMwMzEzMTkxMzE3WhcNMzMwMzEzMTkxNDU3WjARMQ8wDQYDVQQDDAZkYnJlcG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqqcdDYFZZb28M0tEJzEP77FmD/Xqioyj9zWX6VwUSOMAgmMmn8eqs9hT9T0a+q4YTo9tUW1PNbUpwprA5b4Uk04DcIajxDVMUR/PjcHytmkqwVskq9AZW/Vngdoo+8tSbuIybwe/3Vwt266hbHpDcM97a+DXcYooRl7tQWCEX7RP27wQrMD9epDQ6IgKayZg9vC9/03dsIqwH9jXQRiZlFvwiEKhX2aY7lPGBaCK414JO00K/Z49iov9TRa/IYVbSt5qwgrx6DcqsBSPwOnI6A85UGfeUEZ/7coVJiL7RvBlsllapsL9eWTbQajVh94k9Ei3sibEPbtH+U2OAM78zAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAASnN1Cuif1sdfEK2kWAURSXGJCohCROLWdKFjaeHPRaEfpbFJsgxW0Yj3nwX5O3bUlOWoTyENwnXSsXMQsqnNi+At32CKaKO8+AkhAbgQL9F0B+KeJwmYv3cUj5N/LYkJjBvZBzUZ4Ugu5dcxH0k7AktLAIwimkyEnxTNolOA3UyrGGpREr8MCKWVr10RFuOpF/0CsJNNwbHXzalO9D756EUcRWZ9VSg6QVNso0YYRKTnILWDn9hcTRnqGy3SHo3anFTqQZ+BB57YbgFWy6udC0LYRB3zdp6zNti87eu/VEymiDY/mmo1AB8Tm0b6vxFz4AKcL3ax5qS6YnZ9efSzk=" ], - "priority" : [ "100" ] - } - } ] - }, - "internationalizationEnabled" : false, - "supportedLocales" : [ ], - "authenticationFlows" : [ { - "id" : "88e5d526-2298-413c-a904-133ad839d47f", - "alias" : "Account verification options", - "description" : "Method with which to verity the existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-email-verification", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Verify Existing Account by Re-authentication", - "userSetupAllowed" : false - } ] - }, { - "id" : "bc0b483f-4a3f-4c15-bf65-b26f5320e6c9", - "alias" : "Authentication Options", - "description" : "Authentication options.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "basic-auth", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "basic-auth-otp", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-spnego", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "a690c715-fbae-4c20-b680-bd4010718761", - "alias" : "Browser - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "ad6d407e-c73e-4439-baf3-d7c99c6cb6ad", - "alias" : "Direct Grant - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "e5d03405-e10a-408a-adb2-41dbb4f24515", - "alias" : "First broker login - Conditional OTP", - "description" : "Flow to determine if the OTP is required for the authentication", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-otp-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "96b93843-62d0-44f1-84dd-21cc5f95f523", - "alias" : "Handle Existing Account", - "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-confirm-link", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Account verification options", - "userSetupAllowed" : false - } ] - }, { - "id" : "088f4051-36ab-4952-a4f2-4ba53c408083", - "alias" : "Reset - Conditional OTP", - "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "conditional-user-configured", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-otp", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "05f37bb2-779d-4e3f-ad1b-f6eb33bb3de4", - "alias" : "User creation or linking", - "description" : "Flow for the existing/non-existing user alternatives", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "create unique user config", - "authenticator" : "idp-create-user-if-unique", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Handle Existing Account", - "userSetupAllowed" : false - } ] - }, { - "id" : "300a5647-7d2c-4348-9f1f-51504bfda1c4", - "alias" : "Verify Existing Account by Re-authentication", - "description" : "Reauthentication of existing account", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "idp-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "First broker login - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "26afc672-314b-4ad9-9711-7aaeafd7c00c", - "alias" : "browser", - "description" : "browser based authentication", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-cookie", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "auth-spnego", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "identity-provider-redirector", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 25, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "forms", - "userSetupAllowed" : false - } ] - }, { - "id" : "9b301f6c-eda7-4da0-ba09-1a6454ff910d", - "alias" : "clients", - "description" : "Base authentication for clients", - "providerId" : "client-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "client-secret", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-secret-jwt", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "client-x509", - "authenticatorFlow" : false, - "requirement" : "ALTERNATIVE", - "priority" : 40, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "6e54f1be-dbad-4b6d-8eee-8e048d413c63", - "alias" : "direct grant", - "description" : "OpenID Connect Resource Owner Grant", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "direct-grant-validate-username", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "direct-grant-validate-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 30, - "autheticatorFlow" : true, - "flowAlias" : "Direct Grant - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "31da4b94-03c4-4d79-9ac3-5df1445c0781", - "alias" : "docker auth", - "description" : "Used by Docker clients to authenticate against the IDP", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "docker-http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "2e16651d-681f-4d9b-9dd4-9acdb465cd43", - "alias" : "first broker login", - "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticatorConfig" : "review profile config", - "authenticator" : "idp-review-profile", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "User creation or linking", - "userSetupAllowed" : false - } ] - }, { - "id" : "da109a26-fefa-48a4-ae8e-1d49627c2db8", - "alias" : "forms", - "description" : "Username, password, otp and other auth forms.", - "providerId" : "basic-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "auth-username-password-form", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Browser - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "b8f1f963-6813-4875-bae8-ce48a813763b", - "alias" : "http challenge", - "description" : "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "no-cookie-redirect", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : true, - "flowAlias" : "Authentication Options", - "userSetupAllowed" : false - } ] - }, { - "id" : "4c983c77-241f-41c5-8b8a-e2cd6fc08914", - "alias" : "registration", - "description" : "registration flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-page-form", - "authenticatorFlow" : true, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : true, - "flowAlias" : "registration form", - "userSetupAllowed" : false - } ] - }, { - "id" : "d62c8dd6-633c-408a-aa99-43071510efb4", - "alias" : "registration form", - "description" : "registration form", - "providerId" : "form-flow", - "topLevel" : false, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "registration-user-creation", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-profile-action", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 40, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-password-action", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 50, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "registration-recaptcha-action", - "authenticatorFlow" : false, - "requirement" : "DISABLED", - "priority" : 60, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - }, { - "id" : "c8ca5be7-e76d-4e16-b5ca-3ced99d92dbb", - "alias" : "reset credentials", - "description" : "Reset credentials for a user if they forgot their password or something", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "reset-credentials-choose-user", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-credential-email", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 20, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticator" : "reset-password", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 30, - "autheticatorFlow" : false, - "userSetupAllowed" : false - }, { - "authenticatorFlow" : true, - "requirement" : "CONDITIONAL", - "priority" : 40, - "autheticatorFlow" : true, - "flowAlias" : "Reset - Conditional OTP", - "userSetupAllowed" : false - } ] - }, { - "id" : "389c1c37-e8af-4610-a507-e1257f55b954", - "alias" : "saml ecp", - "description" : "SAML ECP Profile Authentication Flow", - "providerId" : "basic-flow", - "topLevel" : true, - "builtIn" : true, - "authenticationExecutions" : [ { - "authenticator" : "http-basic-authenticator", - "authenticatorFlow" : false, - "requirement" : "REQUIRED", - "priority" : 10, - "autheticatorFlow" : false, - "userSetupAllowed" : false - } ] - } ], - "authenticatorConfig" : [ { - "id" : "d66ca9d0-1645-4c84-abfe-c0a696f17de4", - "alias" : "create unique user config", - "config" : { - "require.password.update.after.registration" : "false" - } - }, { - "id" : "061cc6b8-90be-4423-9bf9-974ead709b5d", - "alias" : "review profile config", - "config" : { - "update.profile.on.first.login" : "missing" - } - } ], - "requiredActions" : [ { - "alias" : "CONFIGURE_TOTP", - "name" : "Configure OTP", - "providerId" : "CONFIGURE_TOTP", - "enabled" : true, - "defaultAction" : false, - "priority" : 10, - "config" : { } - }, { - "alias" : "TERMS_AND_CONDITIONS", - "name" : "Terms and Conditions", - "providerId" : "TERMS_AND_CONDITIONS", - "enabled" : false, - "defaultAction" : false, - "priority" : 20, - "config" : { } - }, { - "alias" : "UPDATE_PASSWORD", - "name" : "Update Password", - "providerId" : "UPDATE_PASSWORD", - "enabled" : false, - "defaultAction" : false, - "priority" : 30, - "config" : { } - }, { - "alias" : "UPDATE_PROFILE", - "name" : "Update Profile", - "providerId" : "UPDATE_PROFILE", - "enabled" : true, - "defaultAction" : false, - "priority" : 40, - "config" : { } - }, { - "alias" : "VERIFY_EMAIL", - "name" : "Verify Email", - "providerId" : "VERIFY_EMAIL", - "enabled" : false, - "defaultAction" : false, - "priority" : 50, - "config" : { } - }, { - "alias" : "delete_account", - "name" : "Delete Account", - "providerId" : "delete_account", - "enabled" : false, - "defaultAction" : false, - "priority" : 60, - "config" : { } - }, { - "alias" : "webauthn-register", - "name" : "Webauthn Register", - "providerId" : "webauthn-register", - "enabled" : true, - "defaultAction" : false, - "priority" : 70, - "config" : { } - }, { - "alias" : "webauthn-register-passwordless", - "name" : "Webauthn Register Passwordless", - "providerId" : "webauthn-register-passwordless", - "enabled" : true, - "defaultAction" : false, - "priority" : 80, - "config" : { } - }, { - "alias" : "update_user_locale", - "name" : "Update User Locale", - "providerId" : "update_user_locale", - "enabled" : true, - "defaultAction" : false, - "priority" : 1000, - "config" : { } - } ], - "browserFlow" : "browser", - "registrationFlow" : "registration", - "directGrantFlow" : "direct grant", - "resetCredentialsFlow" : "reset credentials", - "clientAuthenticationFlow" : "clients", - "dockerAuthenticationFlow" : "docker auth", - "attributes" : { - "cibaBackchannelTokenDeliveryMode" : "poll", - "cibaAuthRequestedUserHint" : "login_hint", - "clientOfflineSessionMaxLifespan" : "0", - "oauth2DevicePollingInterval" : "5", - "clientSessionIdleTimeout" : "0", - "actionTokenGeneratedByUserLifespan-execute-actions" : "", - "actionTokenGeneratedByUserLifespan-verify-email" : "", - "clientOfflineSessionIdleTimeout" : "0", - "actionTokenGeneratedByUserLifespan-reset-credentials" : "", - "cibaInterval" : "5", - "realmReusableOtpCode" : "false", - "cibaExpiresIn" : "120", - "oauth2DeviceCodeLifespan" : "600", - "actionTokenGeneratedByUserLifespan-idp-verify-account-via-email" : "", - "parRequestUriLifespan" : "60", - "clientSessionMaxLifespan" : "0", - "shortVerificationUri" : "" - }, - "keycloakVersion" : "21.0.2", - "userManagedAccessAllowed" : false, - "clientProfiles" : { - "profiles" : [ ] - }, - "clientPolicies" : { - "policies" : [ ] - } -} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 94b5fc30a61c1081e194fd4eb98c45d7af9b261c..8f0d77334e466a512a7bd66d438a61f1149c5ddc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,6 @@ volumes: data-db-data: auth-db-data: broker-service-data: - upload-service-data: search-db-data: identity-service-data: metric-db-data: @@ -22,6 +21,7 @@ services: ports: - "3306:3306" environment: + BITNAMI_DEBUG: true MARIADB_DATABASE: "${METADATA_DB:-dbrepo}" MARIADB_ROOT_PASSWORD: "${METADATA_DB_PASSWORD:-dbrepo}" MARIADB_GALERA_MARIABACKUP_PASSWORD: "${METADATA_DB_BACKUP_PASSWORD:-dbrepobackup}" @@ -335,7 +335,6 @@ services: environment: NUXT_PUBLIC_API_CLIENT: "${BASE_URL:-http://localhost}" NUXT_PUBLIC_API_SERVER: "${BASE_URL:-http://localhost}" - NUXT_PUBLIC_UPLOAD_CLIENT: "${BASE_URL:-http://localhost}/api/upload/files" NUXT_OIDC_PROVIDERS_KEYCLOAK_AUTHORIZATION_URL: "${BASE_URL:-http://localhost}/realms/dbrepo/protocol/openid-connect/auth" NUXT_OIDC_PROVIDERS_KEYCLOAK_CLIENT_ID: "${AUTH_SERVICE_CLIENT:-dbrepo-client}" NUXT_OIDC_PROVIDERS_KEYCLOAK_CLIENT_SECRET: "${AUTH_SERVICE_CLIENT:-MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG}" @@ -347,8 +346,6 @@ services: depends_on: dbrepo-search-service: condition: service_healthy - dbrepo-upload-service: - condition: service_healthy healthcheck: test: curl -fsSL http://127.0.0.1:3000 && curl -fsSL http://127.0.0.1:3000/health interval: 10s @@ -484,6 +481,7 @@ services: volumes: - dashboard-service-data:/opt/bitnami/grafana/data environment: + BITNAMI_DEBUG: true GF_SERVER_DOMAIN: "dashboard-service" GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION: "true" LDAP_ADMIN_USERNAME: "${IDENTITY_SERVICE_ADMIN_USERNAME:-admin}" @@ -520,36 +518,6 @@ services: logging: driver: json-file - dbrepo-upload-service: - restart: "no" - container_name: dbrepo-upload-service - hostname: upload-service - image: docker.io/tusproject/tusd:v2.4.0 - volumes: - - "./dbrepo-upload-service/pre-create.sh:/srv/tusd-hooks/pre-create:ro" - command: - - "-behind-proxy" - - "-max-size=2000000000" - - "-base-path=/api/upload/files/" - - "-hooks-dir=/srv/tusd-hooks/" - - "-s3-endpoint=${STORAGE_ENDPOINT:-http://storage-service:9000}" - - "-s3-bucket=dbrepo" - environment: - AWS_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID:-seaweedfsadmin}" - AWS_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY:-seaweedfsadmin}" - AWS_REGION: "${STORAGE_REGION_NAME:-default}" - METADATA_SERVICE_ENDPOINT: "${METADATA_SERVICE_ENDPOINT:-http://metadata-service:8080}" - depends_on: - dbrepo-storage-service: - condition: service_healthy - healthcheck: - test: wget -qO- localhost:8080/metrics | grep "tusd" || exit 1 - interval: 10s - timeout: 5s - retries: 12 - logging: - driver: json-file - dbrepo-data-service: restart: "no" container_name: dbrepo-data-service diff --git a/helm/dbrepo/Chart.yaml b/helm/dbrepo/Chart.yaml index 63f5f997ffc71fbe57e0d42d10d8694a315761c7..6af1965b3f2f93250717913ce464ca975decc341 100644 --- a/helm/dbrepo/Chart.yaml +++ b/helm/dbrepo/Chart.yaml @@ -7,8 +7,8 @@ description: Helm Chart for installing DBRepo sources: - https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services type: application -version: "1.6.5" -appVersion: "1.6.5" +version: "1.7.0" +appVersion: "1.7.0" keywords: - dbrepo maintainers: diff --git a/helm/dbrepo/README.md b/helm/dbrepo/README.md index c2803738dd5ed945c86333ab8c59b8f169c25bd0..c827d39943f2ce3b2cb262abee51842f4a572d74 100644 --- a/helm/dbrepo/README.md +++ b/helm/dbrepo/README.md @@ -11,7 +11,7 @@ sample [ for your deployment and update the variables, especially `hostname`. ```bash -helm install my-release "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" --values ./values.yaml --version "1.6.5" +helm install my-release "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" --values ./values.yaml --version "1.7.0" ``` ## Prerequisites @@ -23,12 +23,18 @@ helm install my-release "oci://registry.datalab.tuwien.ac.at/dbrepo/helm/dbrepo" * Optional certificate provisioner support in the underlying infrastructure: e.g. [cert-manager](https://cert-manager.io/) (for production use). +## Database Configuration + +Note that the default configuration uses a lower memory bound (2GB) than the default MariaDB memory bound (4GB). We +consequently decreased the `innodb_buffer_pool_size` to 1430MB (70% of the available memory). You need to increase this +variable when you increase the available Pod memory for performance. + ## Installing the Chart To install the chart with the release name `my-release`: ```bash -helm install my-release "oci://oci://registry.datalab.tuwien.ac.at/dbrepo/helm" --values ./values.yaml --version "1.6.5" +helm install my-release "oci://oci://registry.datalab.tuwien.ac.at/dbrepo/helm" --values ./values.yaml --version "1.7.0" ``` The command deploys DBRepo on the Kubernetes cluster in the default configuration. The Parameters section lists the @@ -75,8 +81,10 @@ The command removes all the Kubernetes components associated with the chart and | `metadatadb.galera.mariabackup.user` | The database backup username. | `backup` | | `metadatadb.galera.mariabackup.password` | The database backup user password | `backup` | | `metadatadb.jdbcExtraArgs` | The extra arguments for JDBC connections in the microservices. | `""` | +| `metadatadb.configurationConfigMap` | The database configuration files. | `metadata-db-config` | | `metadatadb.extraInitDbScripts` | Additional init.db scripts that are executed on the first start. | `{}` | | `metadatadb.replicaCount` | The number of cluster nodes, should be uneven i.e. 2n+1 | `3` | +| `metadatadb.resourcesPreset` | The container resource preset | `nano-hm` | | `metadatadb.persistence.enabled` | Enable persistent storage. | `true` | ### Auth Service @@ -109,6 +117,7 @@ The command removes all the Kubernetes components associated with the chart and | `datadb.galera.mariabackup.password` | The database backup user password | `backup` | | `datadb.jdbcExtraArgs` | The extra arguments for JDBC connections in the microservices. | `""` | | `datadb.replicaCount` | The number of cluster nodes, should be uneven i.e. 2n+1 | `3` | +| `datadb.resourcesPreset` | The container resource preset | `nano-hm` | | `datadb.persistence.enabled` | Enable persistent storage. | `true` | ### Search Database @@ -119,9 +128,13 @@ The command removes all the Kubernetes components associated with the chart and | `searchdb.host` | The hostname for the microservices. | `search-db` | | `searchdb.port` | The port for the microservices. | `9200` | | `searchdb.coordinating.resourcesPreset` | The container resource preset | `small` | +| `searchdb.coordinating.replicaCount` | The number of pod replicas. | `1` | | `searchdb.ingest.resourcesPreset` | The container resource preset | `micro` | +| `searchdb.ingest.replicaCount` | The number of pod replicas. | `1` | | `searchdb.master.resourcesPreset` | The container resource preset | `small` | +| `searchdb.master.replicaCount` | The number of pod replicas. | `1` | | `searchdb.data.resourcesPreset` | The container resource preset | `medium` | +| `searchdb.data.replicaCount` | The number of pod replicas. | `1` | | `searchdb.clusterName` | The cluster name. | `search-db` | ### Upload Service diff --git a/helm/dbrepo/artifacthub-repo.yml b/helm/dbrepo/artifacthub-repo.yml index 1e94306eeb88aa7e2c63ba8762f9261c335005b7..87a5bb40c6a3e0f14201232c21911bbbbf2e6c81 100644 --- a/helm/dbrepo/artifacthub-repo.yml +++ b/helm/dbrepo/artifacthub-repo.yml @@ -1,6 +1,4 @@ -repositoryID: c3dd3e89-e742-4a55-99e3-9681a521fb3e +repositoryID: 93318017-51ca-4d1e-9c36-1df2f6e09416 owners: - - name: dbrepo - email: martinweiseat@gmail.com - - name: mweise + - name: Martin Weise email: martin.weise@tuwien.ac.at diff --git a/helm/dbrepo/charts/seaweedfs-4.2.1.tgz b/helm/dbrepo/charts/seaweedfs-4.2.1.tgz index a463170406b9c62f8f33ba315ac440fe435ad93c..e978b16ed1a15b9e052e68c9306005164219b311 100644 Binary files a/helm/dbrepo/charts/seaweedfs-4.2.1.tgz and b/helm/dbrepo/charts/seaweedfs-4.2.1.tgz differ diff --git a/helm/dbrepo/files/01-setup-schema.sql b/helm/dbrepo/files/01-setup-schema.sql index e2bde25ed6d64f69c4f8d6e897a49a672e3f9a71..7e7978cad83580c330a28ef03ce3fd84623ee01e 100644 --- a/helm/dbrepo/files/01-setup-schema.sql +++ b/helm/dbrepo/files/01-setup-schema.sql @@ -2,390 +2,344 @@ BEGIN; CREATE TABLE IF NOT EXISTS `mdb_users` ( - id character varying(36) NOT NULL, - keycloak_id character varying(36) NOT NULL, - username character varying(255) NOT NULL, - firstname character varying(255), - lastname character varying(255), - orcid character varying(255), - affiliation character varying(255), - is_internal BOOLEAN NOT NULL DEFAULT FALSE, - mariadb_password character varying(255) NOT NULL, - theme character varying(255) NOT NULL default ('light'), - language character varying(3) NOT NULL default ('en'), - PRIMARY KEY (id), - UNIQUE (keycloak_id), - UNIQUE (username) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + keycloak_id VARCHAR(36) NOT NULL, + username VARCHAR(255) NOT NULL, + firstname VARCHAR(255), + lastname VARCHAR(255), + orcid VARCHAR(255), + affiliation VARCHAR(255), + is_internal BOOLEAN NOT NULL DEFAULT FALSE, + mariadb_password VARCHAR(255) NOT NULL, + theme VARCHAR(255) NOT NULL DEFAULT ('light'), + language VARCHAR(3) NOT NULL DEFAULT ('en'), + PRIMARY KEY (`id`), + UNIQUE (`keycloak_id`), + UNIQUE (`username`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_images` ( - id SERIAL, - registry character varying(255) NOT NULL DEFAULT 'docker.io', - name character varying(255) NOT NULL, - version character varying(255) NOT NULL, - default_port integer NOT NULL, - dialect character varying(255) NOT NULL, - driver_class character varying(255) NOT NULL, - jdbc_method character varying(255) NOT NULL, - is_default BOOLEAN NOT NULL DEFAULT FALSE, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - PRIMARY KEY (id), - UNIQUE (name, version), - UNIQUE (is_default) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + registry VARCHAR(255) NOT NULL DEFAULT 'docker.io', + name VARCHAR(255) NOT NULL, + version VARCHAR(255) NOT NULL, + DEFAULT_port INT NOT NULL, + dialect VARCHAR(255) NOT NULL, + driver_class VARCHAR(255) NOT NULL, + jdbc_method VARCHAR(255) NOT NULL, + is_DEFAULT BOOLEAN NOT NULL DEFAULT FALSE, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE (`name`, `version`), + UNIQUE (`is_DEFAULT`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_containers` ( - id SERIAL, - internal_name character varying(255) NOT NULL, - name character varying(255) NOT NULL, - host character varying(255) NOT NULL, - port integer NOT NULL default 3306, - ui_host character varying(255) NOT NULL default host, - ui_port integer NOT NULL default port, - ui_additional_flags text, - sidecar_host character varying(255), - sidecar_port integer, - image_id bigint NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - privileged_username character varying(255) NOT NULL, - privileged_password character varying(255) NOT NULL, - quota integer NOT NULL DEFAULT 50, - PRIMARY KEY (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_data` -( - ID SERIAL, - PROVENANCE text, - FileEncoding text, - FileType character varying(100), - Version text, - Seperator text, - PRIMARY KEY (ID) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + internal_name VARCHAR(255) NOT NULL, + name VARCHAR(255) NOT NULL, + host VARCHAR(255) NOT NULL, + port INT NOT NULL DEFAULT 3306, + ui_host VARCHAR(255) NOT NULL DEFAULT host, + ui_port INT NOT NULL DEFAULT port, + ui_additional_flags TEXT, + image_id VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + privileged_username VARCHAR(255) NOT NULL, + privileged_password VARCHAR(255) NOT NULL, + quota INT, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES mdb_images (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_licenses` ( - identifier character varying(255) NOT NULL, - uri text NOT NULL, - description text NOT NULL, - PRIMARY KEY (identifier), + identifier VARCHAR(255) NOT NULL, + uri TEXT NOT NULL, + description TEXT NOT NULL, + PRIMARY KEY (`identifier`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_databases` ( - id SERIAL, - cid BIGINT UNSIGNED NOT NULL, - name character varying(255) NOT NULL, - internal_name character varying(255) NOT NULL, - exchange_name character varying(255) NOT NULL, - description text, - engine character varying(20), - is_public boolean NOT NULL DEFAULT TRUE, - is_schema_public boolean NOT NULL DEFAULT TRUE, - image longblob, - owned_by character varying(36), - contact_person character varying(36), - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - PRIMARY KEY (id), - FOREIGN KEY (cid) REFERENCES mdb_containers (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id), - FOREIGN KEY (contact_person) REFERENCES mdb_users (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_databases_subjects` -( - dbid BIGINT NOT NULL, - subjects character varying(255) NOT NULL, - PRIMARY KEY (dbid, subjects) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cid VARCHAR(36) NOT NULL, + name VARCHAR(255) NOT NULL, + internal_name VARCHAR(255) NOT NULL, + exchange_name VARCHAR(255) NOT NULL, + description TEXT, + engine VARCHAR(20), + is_public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + image LONGBLOB, + owned_by VARCHAR(36) NOT NULL, + contact_person VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + PRIMARY KEY (`id`), + FOREIGN KEY (`cid`) REFERENCES mdb_containers (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`), + FOREIGN KEY (`contact_person`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_tables` ( - ID SERIAL, - tDBID BIGINT UNSIGNED NOT NULL, - tName VARCHAR(64) NOT NULL, - internal_name VARCHAR(64) NOT NULL, - queue_name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tDBID VARCHAR(36) NOT NULL, + tName VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, + queue_name VARCHAR(255) NOT NULL, routing_key VARCHAR(255), tDescription VARCHAR(2048), num_rows BIGINT, data_length BIGINT, max_data_length BIGINT, avg_row_length BIGINT, - `separator` CHAR(1), - quote CHAR(1), - element_null VARCHAR(50), - skip_lines BIGINT, - element_true VARCHAR(50), - element_false VARCHAR(50), - Version TEXT, - created timestamp NOT NULL DEFAULT NOW(), - versioned boolean not null default true, - is_public boolean not null default true, - is_schema_public boolean not null default true, - owned_by character varying(36) NOT NULL, - last_modified timestamp, - PRIMARY KEY (ID), - UNIQUE (tDBID, internal_name), - FOREIGN KEY (tDBID) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) + created TIMESTAMP NOT NULL DEFAULT NOW(), + versioned BOOLEAN NOT NULL DEFAULT TRUE, + is_public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + owned_by VARCHAR(36) NOT NULL DEFAULT UUID(), + last_modified TIMESTAMP, + PRIMARY KEY (`ID`), + UNIQUE (`tDBID`, `internal_name`), + FOREIGN KEY (`tDBID`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns` ( - ID SERIAL, - tID BIGINT UNSIGNED NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tID VARCHAR(36) NOT NULL, cName VARCHAR(64), internal_name VARCHAR(64) NOT NULL, Datatype ENUM ('CHAR','VARCHAR','BINARY','VARBINARY','TINYBLOB','TINYTEXT','TEXT','BLOB','MEDIUMTEXT','MEDIUMBLOB','LONGTEXT','LONGBLOB','ENUM','SET','SERIAL','BIT','TINYINT','BOOL','SMALLINT','MEDIUMINT','INT','BIGINT','FLOAT','DOUBLE','DECIMAL','DATE','DATETIME','TIMESTAMP','TIME','YEAR'), length BIGINT UNSIGNED NULL, - ordinal_position INTEGER NOT NULL, + ordinal_position INT NOT NULL, index_length BIGINT UNSIGNED NULL, description VARCHAR(2048), size BIGINT UNSIGNED, d BIGINT UNSIGNED, - is_null_allowed BOOLEAN NOT NULL DEFAULT true, + is_null_allowed BOOLEAN NOT NULL DEFAULT TRUE, val_min NUMERIC NULL, val_max NUMERIC NULL, mean NUMERIC NULL, median NUMERIC NULL, std_dev Numeric NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - FOREIGN KEY (tID) REFERENCES mdb_tables (ID) ON DELETE CASCADE, - PRIMARY KEY (ID), - UNIQUE (tID, internal_name) + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + FOREIGN KEY (`tID`) REFERENCES mdb_tables (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`ID`), + UNIQUE (`tID`, `internal_name`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_enums` ( - id SERIAL, - column_id BIGINT UNSIGNED NOT NULL, - value CHARACTER VARYING(255) NOT NULL, - FOREIGN KEY (column_id) REFERENCES mdb_columns (ID) ON DELETE CASCADE, - PRIMARY KEY (id) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + column_id VARCHAR(36) NOT NULL, + value VARCHAR(255) NOT NULL, + FOREIGN KEY (`column_id`) REFERENCES mdb_columns (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_sets` ( - id SERIAL, - column_id BIGINT UNSIGNED NOT NULL, - value CHARACTER VARYING(255) NOT NULL, - FOREIGN KEY (column_id) REFERENCES mdb_columns (ID) ON DELETE CASCADE, - PRIMARY KEY (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_columns_nom` -( - cID BIGINT UNSIGNED, - tID BIGINT UNSIGNED, - maxlength INTEGER, - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_columns_cat` -( - cID BIGINT UNSIGNED, - tID BIGINT UNSIGNED, - num_cat INTEGER, - -- cat_array TEXT[], - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + column_id VARCHAR(36) NOT NULL, + value VARCHAR(255) NOT NULL, + FOREIGN KEY (`column_id`) REFERENCES mdb_columns (`ID`) ON DELETE CASCADE, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key` ( - fkid SERIAL, - tid BIGINT UNSIGNED NOT NULL, - rtid BIGINT UNSIGNED NOT NULL, - name VARCHAR(255) NOT NULL, - on_update VARCHAR(50) NULL, - on_delete VARCHAR(50) NULL, - position INT NULL, - PRIMARY KEY (fkid), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE, - FOREIGN KEY (rtid) REFERENCES mdb_tables (id) + fkid VARCHAR(36) NOT NULL DEFAULT UUID(), + tid VARCHAR(36) NOT NULL, + rtid VARCHAR(36) NOT NULL, + name VARCHAR(255) NOT NULL, + on_update VARCHAR(50) NULL, + on_delete VARCHAR(50) NULL, + position INT NULL, + PRIMARY KEY (`fkid`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE, + FOREIGN KEY (`rtid`) REFERENCES mdb_tables (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_primary_key` ( - pkid SERIAL, - tID BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (pkid), - FOREIGN KEY (tID) REFERENCES mdb_tables (id) ON DELETE CASCADE, - FOREIGN KEY (cid) REFERENCES mdb_columns (id) ON DELETE CASCADE + pkid VARCHAR(36) NOT NULL DEFAULT UUID(), + tID VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + PRIMARY KEY (`pkid`), + FOREIGN KEY (`tID`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE, + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_foreign_key_reference` ( - id SERIAL, - fkid BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - rcid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (id), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + fkid VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + rcid VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), UNIQUE (fkid, cid, rcid), - FOREIGN KEY (fkid) REFERENCES mdb_constraints_foreign_key (fkid) ON UPDATE CASCADE, - FOREIGN KEY (cid) REFERENCES mdb_columns (id), - FOREIGN KEY (rcid) REFERENCES mdb_columns (id) + FOREIGN KEY (`fkid`) REFERENCES mdb_constraints_foreign_key (`fkid`) ON UPDATE CASCADE, + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`), + FOREIGN KEY (`rcid`) REFERENCES mdb_columns (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_unique` ( - uid SERIAL, - name VARCHAR(255) NOT NULL, - tid BIGINT UNSIGNED NOT NULL, - position INT NULL, - PRIMARY KEY (uid), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE + uid VARCHAR(36) NOT NULL DEFAULT UUID(), + name VARCHAR(255) NOT NULL, + tid VARCHAR(36) NOT NULL, + position INT NULL, + PRIMARY KEY (`uid`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE ); CREATE TABLE IF NOT EXISTS `mdb_constraints_unique_columns` ( - id SERIAL, - uid BIGINT UNSIGNED NOT NULL, - cid BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (uid) REFERENCES mdb_constraints_unique (uid), - FOREIGN KEY (cid) REFERENCES mdb_columns (id) ON DELETE CASCADE + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uid VARCHAR(36) NOT NULL, + cid VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`uid`) REFERENCES mdb_constraints_unique (`uid`), + FOREIGN KEY (`cid`) REFERENCES mdb_columns (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_constraints_checks` ( - id SERIAL, - tid BIGINT UNSIGNED NOT NULL, - checks VARCHAR(255) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (tid) REFERENCES mdb_tables (id) ON DELETE CASCADE + id VARCHAR(36) NOT NULL DEFAULT UUID(), + tid VARCHAR(36) NOT NULL, + checks VARCHAR(255) NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`) ON DELETE CASCADE ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_concepts` ( - id SERIAL, - uri text not null, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uri TEXT NOT NULL, name VARCHAR(255) null, description TEXT null, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (id), + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (`id`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_units` ( - id SERIAL, - uri text not null, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + uri TEXT NOT NULL, name VARCHAR(255) null, description TEXT null, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (id), + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (`id`), UNIQUE (uri(200)) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_concepts` ( - id BIGINT UNSIGNED NOT NULL, - cID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cID VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (id, cid), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + FOREIGN KEY (`id`) REFERENCES mdb_concepts (`id`), + FOREIGN KEY (`cID`) REFERENCES mdb_columns (`ID`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_columns_units` ( - id BIGINT UNSIGNED NOT NULL, - cID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + id VARCHAR(36) NOT NULL DEFAULT UUID(), + cID VARCHAR(36) NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (id, cID), - FOREIGN KEY (cID) REFERENCES mdb_columns (ID) + FOREIGN KEY (id) REFERENCES mdb_units (id), + FOREIGN KEY (`cID`) REFERENCES mdb_columns (`ID`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_view` ( - id SERIAL, - vdbid BIGINT UNSIGNED NOT NULL, - vName VARCHAR(64) NOT NULL, - internal_name VARCHAR(64) NOT NULL, - Query TEXT NOT NULL, - query_hash VARCHAR(255) NOT NULL, - Public BOOLEAN NOT NULL DEFAULT TRUE, - is_schema_public boolean NOT NULL DEFAULT TRUE, - InitialView BOOLEAN NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - last_modified timestamp, - owned_by character varying(36) NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (vdbid) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_banner_messages` -( - id SERIAL, - type ENUM ('ERROR', 'WARNING', 'INFO') NOT NULL default 'INFO', + id VARCHAR(36) NOT NULL DEFAULT UUID(), + vdbid VARCHAR(36) NOT NULL, + vName VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, + Query TEXT NOT NULL, + query_hash VARCHAR(255) NOT NULL, + Public BOOLEAN NOT NULL DEFAULT TRUE, + is_schema_public BOOLEAN NOT NULL DEFAULT TRUE, + InitialView BOOLEAN NOT NULL, + created TIMESTAMP NOT NULL DEFAULT NOW(), + last_modified TIMESTAMP, + owned_by VARCHAR(36) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE (`vdbid`, `internal_name`), + FOREIGN KEY (`vdbid`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`) +) WITH SYSTEM VERSIONING; + +CREATE TABLE IF NOT EXISTS `mdb_messages` +( + id VARCHAR(36) NOT NULL DEFAULT UUID(), + type ENUM ('ERROR', 'WARNING', 'INFO') NOT NULL DEFAULT 'INFO', message TEXT NOT NULL, link TEXT NULL, - link_text VARCHAR(255) NULL, - display_start timestamp NULL, - display_end timestamp NULL, - PRIMARY KEY (id) + link_TEXT VARCHAR(255) NULL, + display_start TIMESTAMP NULL, + display_end TIMESTAMP NULL, + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_ontologies` ( - id SERIAL, - prefix VARCHAR(8) NOT NULL, - uri TEXT NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + prefix VARCHAR(8) NOT NULL, + uri TEXT NOT NULL, uri_pattern TEXT, - sparql_endpoint TEXT NULL, - rdf_path TEXT NULL, - last_modified timestamp, - created timestamp NOT NULL DEFAULT NOW(), - UNIQUE (prefix), + sparql_endpoint TEXT NULL, + rdf_path TEXT NULL, + last_modified TIMESTAMP, + created TIMESTAMP NOT NULL DEFAULT NOW(), + UNIQUE (`prefix`), UNIQUE (uri(200)), - PRIMARY KEY (id) + PRIMARY KEY (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_view_columns` ( - id SERIAL, - view_id BIGINT UNSIGNED NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + view_id VARCHAR(36) NOT NULL, name VARCHAR(64), - internal_name VARCHAR(64) NOT NULL, + internal_name VARCHAR(64) NOT NULL, column_type ENUM ('CHAR','VARCHAR','BINARY','VARBINARY','TINYBLOB','TINYTEXT','TEXT','BLOB','MEDIUMTEXT','MEDIUMBLOB','LONGTEXT','LONGBLOB','ENUM','SET','BIT','TINYINT','BOOL','SMALLINT','MEDIUMINT','INT','BIGINT','FLOAT','DOUBLE','DECIMAL','DATE','DATETIME','TIMESTAMP','TIME','YEAR'), - ordinal_position INTEGER NOT NULL, + ordinal_position INT NOT NULL, size BIGINT UNSIGNED, d BIGINT UNSIGNED, - is_null_allowed BOOLEAN NOT NULL DEFAULT true, - PRIMARY KEY (id), - FOREIGN KEY (view_id) REFERENCES mdb_view (id) ON DELETE CASCADE, + is_null_allowed BOOLEAN NOT NULL DEFAULT TRUE, + PRIMARY KEY (`id`), + FOREIGN KEY (`view_id`) REFERENCES mdb_view (`id`) ON DELETE CASCADE, UNIQUE (view_id, internal_name) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifiers` ( - id SERIAL, - dbid BIGINT UNSIGNED NOT NULL, - qid BIGINT UNSIGNED, - vid BIGINT UNSIGNED, - tid BIGINT UNSIGNED, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + dbid VARCHAR(36) NOT NULL, + qid VARCHAR(36), + vid VARCHAR(36), + tid VARCHAR(36), publisher VARCHAR(255) NOT NULL, language VARCHAR(2), - publication_year INTEGER NOT NULL, - publication_month INTEGER, - publication_day INTEGER, + publication_year INT NOT NULL, + publication_month INT, + publication_day INT, identifier_type ENUM ('DATABASE', 'SUBSET', 'VIEW', 'TABLE') NOT NULL, status ENUM ('DRAFT', 'PUBLISHED') NOT NULL DEFAULT ('PUBLISHED'), query TEXT, @@ -398,154 +352,150 @@ CREATE TABLE IF NOT EXISTS `mdb_identifiers` created TIMESTAMP NOT NULL DEFAULT NOW(), owned_by VARCHAR(36) NOT NULL, last_modified TIMESTAMP, - PRIMARY KEY (id), /* must be a single id from persistent identifier concept */ - FOREIGN KEY (dbid) REFERENCES mdb_databases (id), - FOREIGN KEY (owned_by) REFERENCES mdb_users (id) + PRIMARY KEY (`id`), /* must be a single id from persistent identifier concept */ + FOREIGN KEY (`dbid`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`owned_by`) REFERENCES mdb_users (`id`), + FOREIGN KEY (`tid`) REFERENCES mdb_tables (`id`), + FOREIGN KEY (`vid`) REFERENCES mdb_view (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_licenses` ( - pid BIGINT UNSIGNED NOT NULL, - license_id VARCHAR(255) NOT NULL, + pid VARCHAR(36) NOT NULL DEFAULT UUID(), + license_id VARCHAR(255) NOT NULL, PRIMARY KEY (pid, license_id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id), - FOREIGN KEY (license_id) REFERENCES mdb_licenses (identifier) + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`), + FOREIGN KEY (`license_id`) REFERENCES mdb_licenses (`identifier`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_titles` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - title text NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + title TEXT NOT NULL, title_type ENUM ('ALTERNATIVE_TITLE', 'SUBTITLE', 'TRANSLATED_TITLE', 'OTHER'), language VARCHAR(2), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_funders` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - funder_name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + funder_name VARCHAR(255) NOT NULL, funder_identifier TEXT, funder_identifier_type ENUM ('CROSSREF_FUNDER_ID', 'GRID', 'ISNI', 'ROR', 'OTHER'), - scheme_uri text, + scheme_uri TEXT, award_number VARCHAR(255), - award_title text, + award_title TEXT, language VARCHAR(255), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_descriptions` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - description text NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + description TEXT NOT NULL, description_type ENUM ('ABSTRACT', 'METHODS', 'SERIES_INFORMATION', 'TABLE_OF_CONTENTS', 'TECHNICAL_INFO', 'OTHER'), language VARCHAR(2), - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; -CREATE TABLE IF NOT EXISTS `mdb_related_identifiers` +CREATE TABLE IF NOT EXISTS `mdb_identifier_related` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - value varchar(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL DEFAULT UUID(), + value VARCHAR(255) NOT NULL, type ENUM ('DOI','URL','URN','ARK','ARXIV','BIBCODE','EAN13','EISSN','HANDLE','IGSN','ISBN','ISTC','LISSN','LSID','PMID','PURL','UPC','W3ID') NOT NULL, relation ENUM ('IS_CITED_BY','CITES','IS_SUPPLEMENT_TO','IS_SUPPLEMENTED_BY','IS_CONTINUED_BY','CONTINUES','IS_DESCRIBED_BY','DESCRIBES','HAS_METADATA','IS_METADATA_FOR','HAS_VERSION','IS_VERSION_OF','IS_NEW_VERSION_OF','IS_PREVIOUS_VERSION_OF','IS_PART_OF','HAS_PART','IS_PUBLISHED_IN','IS_REFERENCED_BY','REFERENCES','IS_DOCUMENTED_BY','DOCUMENTS','IS_COMPILED_BY','COMPILES','IS_VARIANT_FORM_OF','IS_ORIGINAL_FORM_OF','IS_IDENTICAL_TO','IS_REVIEWED_BY','REVIEWS','IS_DERIVED_FROM','IS_SOURCE_OF','IS_REQUIRED_BY','REQUIRES','IS_OBSOLETED_BY','OBSOLETES') NOT NULL, - PRIMARY KEY (id), /* must be a single id from persistent identifier concept */ - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id), + PRIMARY KEY (`id`), /* must be a single id from persistent identifier concept */ + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`), UNIQUE (pid, value) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_identifier_creators` ( - id SERIAL, - pid BIGINT UNSIGNED NOT NULL, - given_names text, - family_name text, - creator_name VARCHAR(255) NOT NULL, - name_type ENUM ('PERSONAL', 'ORGANIZATIONAL') default 'PERSONAL', - name_identifier text, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + pid VARCHAR(36) NOT NULL, + given_names TEXT, + family_name TEXT, + creator_name VARCHAR(255) NOT NULL, + name_type ENUM ('PERSONAL', 'ORGANIZATIONAL') DEFAULT 'PERSONAL', + name_identifier TEXT, name_identifier_scheme ENUM ('ROR', 'GRID', 'ISNI', 'ORCID'), - name_identifier_scheme_uri text, + name_identifier_scheme_uri TEXT, affiliation VARCHAR(255), - affiliation_identifier text, + affiliation_identifier TEXT, affiliation_identifier_scheme ENUM ('ROR', 'GRID', 'ISNI'), - affiliation_identifier_scheme_uri text, - PRIMARY KEY (id), - FOREIGN KEY (pid) REFERENCES mdb_identifiers (id) -) WITH SYSTEM VERSIONING; - -CREATE TABLE IF NOT EXISTS `mdb_update` -( - uUserID character varying(255) NOT NULL, - uDBID BIGINT UNSIGNED NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (uUserID, uDBID), - FOREIGN KEY (uDBID) REFERENCES mdb_databases (id) + affiliation_identifier_scheme_uri TEXT, + PRIMARY KEY (`id`), + FOREIGN KEY (`pid`) REFERENCES mdb_identifiers (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_access` ( - aUserID character varying(255) NOT NULL, - aDBID BIGINT UNSIGNED REFERENCES mdb_databases (id), + aUserID VARCHAR(255) NOT NULL, + aDBID VARCHAR(36) NOT NULL, attime TIMESTAMP, download BOOLEAN, - created timestamp NOT NULL DEFAULT NOW(), - PRIMARY KEY (aUserID, aDBID) + created TIMESTAMP NOT NULL DEFAULT NOW(), + PRIMARY KEY (aUserID, aDBID), + FOREIGN KEY (`aDBID`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`aUserID`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_have_access` ( - user_id character varying(36) NOT NULL, - database_id BIGINT UNSIGNED REFERENCES mdb_databases (id), + user_id VARCHAR(36) NOT NULL, + database_id VARCHAR(36) NOT NULL, access_type ENUM ('READ', 'WRITE_OWN', 'WRITE_ALL') NOT NULL, - created timestamp NOT NULL DEFAULT NOW(), + created TIMESTAMP NOT NULL DEFAULT NOW(), PRIMARY KEY (user_id, database_id), - FOREIGN KEY (user_id) REFERENCES mdb_users (id) + FOREIGN KEY (`database_id`) REFERENCES mdb_databases (`id`), + FOREIGN KEY (`user_id`) REFERENCES mdb_users (`id`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_image_types` ( - id SERIAL, - image_id BIGINT UNSIGNED NOT NULL, - display_name varchar(255) NOT NULL, - value varchar(255) NOT NULL, + id VARCHAR(36) NOT NULL DEFAULT UUID(), + image_id VARCHAR(36) NOT NULL, + display_name VARCHAR(255) NOT NULL, + value VARCHAR(255) NOT NULL, size_min INT UNSIGNED, size_max INT UNSIGNED, - size_default INT UNSIGNED, - size_required BOOLEAN COMMENT 'When setting NULL, the service assumes the data type has no size', + size_DEFAULT INT UNSIGNED, + size_required BOOLEAN comment 'When setting NULL, the service assumes the data type has no size', size_step INT UNSIGNED, d_min INT UNSIGNED, d_max INT UNSIGNED, - d_default INT UNSIGNED, - d_required BOOLEAN COMMENT 'When setting NULL, the service assumes the data type has no d', + d_DEFAULT INT UNSIGNED, + d_required BOOLEAN comment 'When setting NULL, the service assumes the data type has no d', d_step INT UNSIGNED, type_hint TEXT, data_hint TEXT, - documentation TEXT NOT NULL, - is_generated BOOLEAN NOT NULL, - is_quoted BOOLEAN NOT NULL, - is_buildable BOOLEAN NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (image_id) REFERENCES `mdb_images` (`id`), - UNIQUE (value) + documentation TEXT NOT NULL, + is_generated BOOLEAN NOT NULL, + is_quoted BOOLEAN NOT NULL, + is_buildable BOOLEAN NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES `mdb_images` (`id`), + UNIQUE (`value`) ) WITH SYSTEM VERSIONING; CREATE TABLE IF NOT EXISTS `mdb_image_operators` ( - id SERIAL, - image_id BIGINT UNSIGNED NOT NULL, - display_name varchar(255) NOT NULL, - value varchar(255) NOT NULL, - documentation TEXT NOT NULL, - PRIMARY KEY (id), - FOREIGN KEY (image_id) REFERENCES `mdb_images` (`id`), - UNIQUE (value) + id VARCHAR(36) NOT NULL DEFAULT UUID(), + image_id VARCHAR(36) NOT NULL, + display_name VARCHAR(255) NOT NULL, + value VARCHAR(255) NOT NULL, + documentation TEXT NOT NULL, + PRIMARY KEY (`id`), + FOREIGN KEY (`image_id`) REFERENCES `mdb_images` (`id`), + UNIQUE (image_id, value) ) WITH SYSTEM VERSIONING; COMMIT; @@ -558,110 +508,103 @@ VALUES ('CC0-1.0', 'https://creativecommons.org/publicdomain/zero/1.0/legalcode' ('CC-BY-4.0', 'https://creativecommons.org/licenses/by/4.0/legalcode', 'The Creative Commons Attribution license allows re-distribution and re-use of a licensed work on the condition that the creator is appropriately credited.'); -INSERT INTO `mdb_images` (name, registry, version, default_port, dialect, driver_class, jdbc_method) -VALUES ('mariadb', 'docker.io', '11.1.3', 3306, 'org.hibernate.dialect.MariaDBDialect', 'org.mariadb.jdbc.Driver', - 'mariadb'); +INSERT INTO `mdb_images` (id, name, registry, version, DEFAULT_port, dialect, driver_class, jdbc_method) +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'mariadb', 'docker.io', '11.1.3', 3306, + 'org.hibernate.dialect.MariaDBDialect', 'org.mariadb.jdbc.Driver', 'mariadb'); -INSERT INTO `mdb_image_types` (image_id, display_name, value, size_min, size_max, size_default, size_required, - size_step, d_min, d_max, d_default, d_required, d_step, type_hint, data_hint, +INSERT INTO `mdb_image_types` (image_id, display_name, value, size_min, size_max, size_DEFAULT, size_required, + size_step, d_min, d_max, d_DEFAULT, d_required, d_step, type_hint, data_hint, documentation, is_quoted, is_buildable, is_generated) -VALUES (1, 'BIGINT(size)', 'bigint', 0, null, null, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bigint/', false, true, false), - (1, 'BINARY(size)', 'binary', 0, 255, 255, true, 1, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/binary/', false, true, false), - (1, 'BIT(size)', 'bit', 0, 64, null, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bit/', false, true, false), - (1, 'BLOB(size)', 'blob', 0, 65535, null, false, 1, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/blob/', false, false, false), - (1, 'BOOL', 'bool', null, null, null, null, null, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/bool/', false, true, false), - (1, 'CHAR(size)', 'char', 0, 255, 255, false, 1, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/char/', false, true, false), - (1, 'DATE', 'date', null, null, null, null, null, null, null, null, null, null, - 'min. 1000-01-01, max. 9999-12-31', 'e.g. YYYY-MM-DD, YY-MM-DD, YYMMDD, YYYY/MM/DD', - 'https://mariadb.com/kb/en/date/', true, true, false), - (1, 'DATETIME(fsp)', 'datetime', 0, 6, null, null, 1, null, null, null, null, null, - 'fsp=microsecond precision, min. 1000-01-01 00:00:00.0, max. 9999-12-31 23:59:59.9', +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BIGINT(size)', 'bigint', 0, null, null, FALSE, 1, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/bigint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BINARY(size)', 'binary', 0, 255, 255, TRUE, 1, null, null, null, null, + null, 'size in Bytes', null, 'https://mariadb.com/kb/en/binary/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BIT(size)', 'bit', 0, 64, null, FALSE, 1, null, null, null, null, null, + null, null, 'https://mariadb.com/kb/en/bit/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BLOB(size)', 'blob', 0, 65535, null, FALSE, 1, null, null, null, null, + null, 'size in Bytes', null, 'https://mariadb.com/kb/en/blob/', FALSE, FALSE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'BOOL', 'bool', null, null, null, null, null, null, null, null, null, + null, null, null, 'https://mariadb.com/kb/en/bool/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'CHAR(size)', 'char', 0, 255, 255, FALSE, 1, null, null, null, null, + null, null, null, 'https://mariadb.com/kb/en/char/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DATE', 'date', null, null, null, null, null, null, null, null, null, + null, 'min. 1000-01-01, max. 9999-12-31', 'e.g. YYYY-MM-DD, YY-MM-DD, YYMMDD, YYYY/MM/DD', + 'https://mariadb.com/kb/en/date/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DATETIME(fsp)', 'datetime', 0, 6, null, null, 1, null, null, null, + null, null, 'fsp=microsecond precision, min. 1000-01-01 00:00:00.0, max. 9999-12-31 23:59:59.9', 'e.g. YYYY-MM-DD HH:MM:SS, YY-MM-DD HH:MM:SS, YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, YYMMDD', - 'https://mariadb.com/kb/en/datetime/', true, true, false), - (1, 'DECIMAL(size, d)', 'decimal', 0, 65, null, false, 1, 0, 38, null, false, null, null, null, - 'https://mariadb.com/kb/en/decimal/', false, true, false), - (1, 'DOUBLE(size, d)', 'double', null, null, null, false, null, null, null, null, false, null, null, null, - 'https://mariadb.com/kb/en/double/', false, true, false), - (1, 'ENUM(v1,v2,...)', 'enum', null, null, null, null, null, null, null, null, null, null, null, - 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/enum/', true, true, false), - (1, 'FLOAT(size)', 'float', null, null, null, false, null, null, null, null, null, null, null, null, - 'https://mariadb.com/kb/en/float/', false, true, false), - (1, 'INT(size)', 'int', null, null, null, false, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/int/', false, true, false), - (1, 'LONGBLOB', 'longblob', null, null, null, null, null, null, null, null, null, null, 'max. 3.999 GiB', null, - 'https://mariadb.com/kb/en/longblob/', false, true, false), - (1, 'LONGTEXT', 'longtext', null, null, null, null, null, null, null, null, null, null, 'max. 3.999 GiB', null, - 'https://mariadb.com/kb/en/longtext/', true, true, false), - (1, 'MEDIUMBLOB', 'mediumblob', null, null, null, null, null, null, null, null, null, null, 'max. 15.999 MiB', - null, 'https://mariadb.com/kb/en/mediumblob/', false, true, false), - (1, 'MEDIUMINT', 'mediumint', null, null, null, null, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/mediumint/', false, true, false), - (1, 'MEDIUMTEXT', 'mediumtext', null, null, null, null, null, null, null, null, null, null, 'size in Bytes', - null, 'https://mariadb.com/kb/en/mediumtext/', true, true, false), - (1, 'SERIAL', 'serial', null, null, null, null, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/bigint/', true, true, true), - (1, 'SET(v1,v2,...)', 'set', null, null, null, null, null, null, null, null, null, null, null, - 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/set/', true, true, false), - (1, 'SMALLINT(size)', 'smallint', 0, null, null, false, null, null, null, null, null, null, 'size in Bytes', - null, 'https://mariadb.com/kb/en/smallint/', false, true, false), - (1, 'TEXT(size)', 'text', 0, null, null, false, null, null, null, null, null, null, 'size in Bytes', null, - 'https://mariadb.com/kb/en/text/', true, true, false), - (1, 'TIME(fsp)', 'time', 0, 6, 0, false, null, null, null, null, null, null, + 'https://mariadb.com/kb/en/datetime/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DECIMAL(size, d)', 'decimal', 0, 65, null, FALSE, 1, 0, 38, null, + FALSE, null, null, null, 'https://mariadb.com/kb/en/decimal/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'DOUBLE(size, d)', 'double', null, null, null, FALSE, null, null, null, + null, FALSE, null, null, null, 'https://mariadb.com/kb/en/double/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'ENUM(v1,v2,...)', 'enum', null, null, null, null, null, null, null, + null, null, null, null, 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/enum/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'FLOAT(size)', 'float', null, null, null, FALSE, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/float/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'INT(size)', 'int', null, null, null, FALSE, null, null, null, null, + null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/int/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LONGBLOB', 'longblob', null, null, null, null, null, null, null, null, + null, null, 'max. 3.999 GiB', null, 'https://mariadb.com/kb/en/longblob/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LONGTEXT', 'longtext', null, null, null, null, null, null, null, null, + null, null, 'max. 3.999 GiB', null, 'https://mariadb.com/kb/en/longtext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMBLOB', 'mediumblob', null, null, null, null, null, null, null, + null, null, null, 'max. 15.999 MiB', null, 'https://mariadb.com/kb/en/mediumblob/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMINT', 'mediumint', null, null, null, null, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/mediumint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'MEDIUMTEXT', 'mediumtext', null, null, null, null, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/mediumtext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SERIAL', 'serial', null, null, null, null, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/bigint/', TRUE, TRUE, TRUE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SET(v1,v2,...)', 'set', null, null, null, null, null, null, null, null, + null, null, null, 'e.g. value1, value2, ...', 'https://mariadb.com/kb/en/set/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'SMALLINT(size)', 'smallint', 0, null, null, FALSE, null, null, null, + null, null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/smallint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TEXT(size)', 'text', 0, null, null, FALSE, null, null, null, null, + null, null, 'size in Bytes', null, 'https://mariadb.com/kb/en/text/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TIME(fsp)', 'time', 0, 6, 0, FALSE, null, null, null, null, null, null, 'fsp=microsecond precision, min. 0, max. 6', 'e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S', - 'https://mariadb.com/kb/en/time/', true, true, false), - (1, 'TIMESTAMP(fsp)', 'timestamp', 0, 6, 0, false, null, null, null, null, null, null, - 'fsp=microsecond precision, min. 0, max. 6', + 'https://mariadb.com/kb/en/time/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TIMESTAMP(fsp)', 'timestamp', 0, 6, 0, FALSE, null, null, null, null, + null, null, 'fsp=microsecond precision, min. 0, max. 6', 'e.g. YYYY-MM-DD HH:MM:SS, YY-MM-DD HH:MM:SS, YYYYMMDDHHMMSS, YYMMDDHHMMSS, YYYYMMDD, YYMMDD', - 'https://mariadb.com/kb/en/timestamp/', true, true, false), - (1, 'TINYBLOB', 'tinyblob', null, null, null, null, null, null, null, null, null, null, null, - 'fsp=microsecond precision, min. 0, max. 6', 'https://mariadb.com/kb/en/timestamp/', false, true, false), - (1, 'TINYINT(size)', 'tinyint', 0, null, null, false, null, null, null, null, null, null, null, - 'size in Bytes', 'https://mariadb.com/kb/en/tinyint/', false, true, false), - (1, 'TINYTEXT', 'tinytext', null, null, null, null, null, null, null, null, null, null, null, - 'max. 255 characters', 'https://mariadb.com/kb/en/tinytext/', true, true, false), - (1, 'YEAR', 'year', 2, 4, null, false, 2, null, null, null, null, null, 'min. 1901, max. 2155', 'e.g. YYYY, YY', - 'https://mariadb.com/kb/en/year/', false, true, false), - (1, 'VARBINARY(size)', 'varbinary', 0, null, null, true, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/varbinary/', false, true, false), - (1, 'VARCHAR(size)', 'varchar', 0, 65532, 255, true, null, null, null, null, null, null, null, - null, 'https://mariadb.com/kb/en/varchar/', false, true, false); + 'https://mariadb.com/kb/en/timestamp/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYBLOB', 'tinyblob', null, null, null, null, null, null, null, null, + null, null, null, 'fsp=microsecond precision, min. 0, max. 6', 'https://mariadb.com/kb/en/timestamp/', FALSE, + TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYINT(size)', 'tinyint', 0, null, null, FALSE, null, null, null, + null, null, null, null, 'size in Bytes', 'https://mariadb.com/kb/en/tinyint/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'TINYTEXT', 'tinytext', null, null, null, null, null, null, null, null, + null, null, null, 'max. 255 characters', 'https://mariadb.com/kb/en/tinytext/', TRUE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'YEAR', 'year', 2, 4, null, FALSE, 2, null, null, null, null, null, + 'min. 1901, max. 2155', 'e.g. YYYY, YY', 'https://mariadb.com/kb/en/year/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'VARBINARY(size)', 'varbinary', 0, null, null, TRUE, null, null, null, + null, null, null, null, null, 'https://mariadb.com/kb/en/varbinary/', FALSE, TRUE, FALSE), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'VARCHAR(size)', 'varchar', 0, 65532, 255, TRUE, null, null, null, null, + null, null, null, null, 'https://mariadb.com/kb/en/varchar/', FALSE, TRUE, FALSE); + INSERT INTO `mdb_image_operators` (image_id, display_name, value, documentation) -VALUES (1, 'Equal operator', '=', 'https://mariadb.com/kb/en/assignment-operators-assignment-operator/'), - (1, 'NULL-safe equal operator', '<=>', 'https://mariadb.com/kb/en/null-safe-equal/'), - (1, 'Less-than operator', '<', 'https://mariadb.com/kb/en/less-than/'), - (1, 'Less than or equal operator', '<=', 'https://mariadb.com/kb/en/less-than-or-equal/'), - (1, 'Greater-than operator', '>', 'https://mariadb.com/kb/en/greater-than/'), - (1, 'Greater than or equal operator', '>=', 'https://mariadb.com/kb/en/greater-than-or-equal/'), - (1, 'Not equal operator', '!=', 'https://mariadb.com/kb/en/not-equal/'), - (1, 'Addition operator', '+', 'https://mariadb.com/kb/en/addition-operator/'), - (1, 'Division operator', '/', 'https://mariadb.com/kb/en/division-operator/'), - (1, 'Modulo operator', '%', 'https://mariadb.com/kb/en/modulo-operator/'), - (1, 'Multiplication operator', '*', 'https://mariadb.com/kb/en/multiplication-operator/'), - (1, 'Subtraction operator', '-', 'https://mariadb.com/kb/en/subtraction-operator-/'), - (1, 'LIKE', 'LIKE', 'https://mariadb.com/kb/en/like/'), - (1, 'NOT LIKE', 'NOT LIKE', 'https://mariadb.com/kb/en/not-like/'), - (1, 'IN', 'IN', 'https://mariadb.com/kb/en/in/'), - (1, 'NOT IN', 'NOT IN', 'https://mariadb.com/kb/en/not-in/'), - (1, 'IS', 'IS', 'https://mariadb.com/kb/en/is/'), - (1, 'IS NOT', 'IS NOT', 'https://mariadb.com/kb/en/is-not/'), - (1, 'IS NOT NULL', 'IS NOT NULL', 'https://mariadb.com/kb/en/is-not-null/'), - (1, 'IS NULL', 'IS NULL', 'https://mariadb.com/kb/en/is-null/'), - (1, 'ISNULL', 'ISNULL', 'https://mariadb.com/kb/en/isnull/'), - (1, 'REGEXP', 'REGEXP', 'https://mariadb.com/kb/en/regexp/'), - (1, 'NOT REGEXP', 'NOT REGEXP', 'https://mariadb.com/kb/en/not-regexp/'), - (1, 'Bitwise AND', '&', 'https://mariadb.com/kb/en/bitwise_and/'), - (1, 'Bitwise OR', '|', 'https://mariadb.com/kb/en/bitwise-or/'), - (1, 'Bitwise XOR', '^', 'https://mariadb.com/kb/en/bitwise-xor/'), - (1, 'Bitwise NOT', '~', 'https://mariadb.com/kb/en/bitwise-not/'), - (1, 'Left shift', '<<', 'https://mariadb.com/kb/en/shift-left/'), - (1, 'Right shift', '>>', 'https://mariadb.com/kb/en/shift-right/'); +VALUES ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Equal operator', '=', + 'https://mariadb.com/kb/en/assignment-operators-assignment-operator/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NULL-safe equal operator', '<=>', + 'https://mariadb.com/kb/en/null-safe-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Less-than operator', '<', 'https://mariadb.com/kb/en/less-than/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Less than or equal operator', '<=', + 'https://mariadb.com/kb/en/less-than-or-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Greater-than operator', '>', + 'https://mariadb.com/kb/en/greater-than/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Greater than or equal operator', '>=', + 'https://mariadb.com/kb/en/greater-than-or-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'Not equal operator', '!=', 'https://mariadb.com/kb/en/not-equal/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'LIKE', 'LIKE', 'https://mariadb.com/kb/en/like/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT LIKE', 'NOT LIKE', 'https://mariadb.com/kb/en/not-like/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IN', 'IN', 'https://mariadb.com/kb/en/in/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT IN', 'NOT IN', 'https://mariadb.com/kb/en/not-in/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IS NOT NULL', 'IS NOT NULL', 'https://mariadb.com/kb/en/is-not-null/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'IS NULL', 'IS NULL', 'https://mariadb.com/kb/en/is-null/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'REGEXP', 'REGEXP', 'https://mariadb.com/kb/en/regexp/'), + ('d79cb089-363c-488b-9717-649e44d8fcc5', 'NOT REGEXP', 'NOT REGEXP', 'https://mariadb.com/kb/en/not-regexp/'); INSERT INTO `mdb_ontologies` (prefix, uri, uri_pattern, sparql_endpoint, rdf_path) diff --git a/helm/dbrepo/files/create-event-listener.jar b/helm/dbrepo/files/create-event-listener.jar index f370c8825750a431296ef68c3d482a2e4eee9389..e95a1e41f167192c570fe210667a3fe5dac77305 100644 Binary files a/helm/dbrepo/files/create-event-listener.jar and b/helm/dbrepo/files/create-event-listener.jar differ diff --git a/helm/dbrepo/files/my.cnf b/helm/dbrepo/files/my.cnf new file mode 100644 index 0000000000000000000000000000000000000000..2798f37644d8b2b2691335277c50e41dcd295def --- /dev/null +++ b/helm/dbrepo/files/my.cnf @@ -0,0 +1,125 @@ +[client] +port=3306 +socket=/opt/bitnami/mariadb/tmp/mysql.sock +plugin_dir=/opt/bitnami/mariadb/plugin + +[mysqld] +explicit_defaults_for_timestamp +default_storage_engine=InnoDB +basedir=/opt/bitnami/mariadb +datadir=/bitnami/mariadb/data +plugin_dir=/opt/bitnami/mariadb/plugin +tmpdir=/opt/bitnami/mariadb/tmp +socket=/opt/bitnami/mariadb/tmp/mysql.sock +pid_file=/opt/bitnami/mariadb/tmp/mysqld.pid +bind_address=0.0.0.0 + +## Character set +## +collation_server=utf8_unicode_ci +init_connect='SET NAMES utf8' +character_set_server=utf8 + +## MyISAM +## +key_buffer_size=32M +myisam_recover_options=FORCE,BACKUP + +## Safety +## +skip_host_cache +skip_name_resolve +max_allowed_packet=16M +max_connect_errors=1000000 +sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY +sysdate_is_now=1 + +## Binary Logging +## +log_bin=mysql-bin +expire_logs_days=14 +# Disabling for performance per http://severalnines.com/blog/9-tips-going-production-galera-cluster-mysql +sync_binlog=0 +# Required for Galera +binlog_format=row + +## Caches and Limits +## +tmp_table_size=32M +max_heap_table_size=32M +# Re-enabling as now works with Maria 10.1.2 +query_cache_type=1 +query_cache_limit=4M +query_cache_size=256M +max_connections=500 +thread_cache_size=50 +open_files_limit=65535 +table_definition_cache=4096 +table_open_cache=4096 + +## InnoDB +## +innodb=FORCE +innodb_strict_mode=1 +# Mandatory per https://github.com/codership/documentation/issues/25 +innodb_autoinc_lock_mode=2 +# Per https://www.percona.com/blog/2006/08/04/innodb-double-write/ +innodb_doublewrite=1 +innodb_flush_method=O_DIRECT +innodb_log_files_in_group=2 +innodb_log_file_size=128M +innodb_flush_log_at_trx_commit=1 +innodb_file_per_table=1 +# 80% Memory is default reco. +# Need to re-evaluate when DB size grows +innodb_buffer_pool_size=1430M +innodb_file_format=Barracuda + +## Logging +## +log_error=/opt/bitnami/mariadb/logs/mysqld.log +slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log +log_queries_not_using_indexes=1 +slow_query_log=1 + +## SSL +## Use extraVolumes and extraVolumeMounts to mount /certs filesystem +# ssl_ca=/certs/ca.pem +# ssl_cert=/certs/server-cert.pem +# ssl_key=/certs/server-key.pem + +[galera] +wsrep_on=ON +wsrep_provider=/opt/bitnami/mariadb/lib/libgalera_smm.so +wsrep_sst_method=mariabackup +wsrep_slave_threads=4 +wsrep_cluster_address=gcomm:// +wsrep_cluster_name=galera +wsrep_sst_auth="root:" +# Enabled for performance per https://mariadb.com/kb/en/innodb-system-variables/#innodb_flush_log_at_trx_commit +innodb_flush_log_at_trx_commit=2 +# MYISAM REPLICATION SUPPORT # +wsrep_mode=REPLICATE_MYISAM + +[mariadb] +plugin_load_add=auth_pam + +## Data-at-Rest Encryption +## Use extraVolumes and extraVolumeMounts to mount /encryption filesystem +# plugin_load_add=file_key_management +# file_key_management_filename=/encryption/keyfile.enc +# file_key_management_filekey=FILE:/encryption/keyfile.key +# file_key_management_encryption_algorithm=AES_CTR +# encrypt_binlog=ON +# encrypt_tmp_files=ON + +## InnoDB/XtraDB Encryption +# innodb_encrypt_tables=ON +# innodb_encrypt_temporary_tables=ON +# innodb_encrypt_log=ON +# innodb_encryption_threads=4 +# innodb_encryption_rotate_key_age=1 + +## Aria Encryption +# aria_encrypt_tables=ON +# encrypt_tmp_disk_tables=ON \ No newline at end of file diff --git a/helm/dbrepo/templates/_resources.tpl b/helm/dbrepo/templates/_resources.tpl index b29d741143ebd938d3af14fbd84bc43c241a2456..e53a2effa29068f5ca6b0ee5293115427d2e3d3e 100644 --- a/helm/dbrepo/templates/_resources.tpl +++ b/helm/dbrepo/templates/_resources.tpl @@ -17,6 +17,10 @@ These presets are for basic testing and not meant to be used in production "requests" (dict "cpu" "100m" "memory" "128Mi" "ephemeral-storage" "50Mi") "limits" (dict "cpu" "150m" "memory" "192Mi" "ephemeral-storage" "2Gi") ) + "nano-hm" (dict + "requests" (dict "cpu" "100m" "memory" "1024Mi" "ephemeral-storage" "50Mi") + "limits" (dict "cpu" "500m" "memory" "2048Mi" "ephemeral-storage" "2Gi") + ) "micro" (dict "requests" (dict "cpu" "250m" "memory" "256Mi" "ephemeral-storage" "50Mi") "limits" (dict "cpu" "375m" "memory" "384Mi" "ephemeral-storage" "2Gi") diff --git a/helm/dbrepo/templates/auth-configmap.yaml b/helm/dbrepo/templates/auth-configmap.yaml index 28ad32d66494ba0a284b73354af7e240bff48dd4..01f83a092cb7c326d4719135ef0c34db80556216 100644 --- a/helm/dbrepo/templates/auth-configmap.yaml +++ b/helm/dbrepo/templates/auth-configmap.yaml @@ -46,7 +46,7 @@ data: "duplicateEmailsAllowed" : false, "resetPasswordAllowed" : false, "editUsernameAllowed" : false, - "bruteForceProtected" : false, + "bruteForceProtected" : true, "permanentLockout" : false, "maxTemporaryLockouts" : 0, "bruteForceStrategy" : "MULTIPLE", @@ -54,8 +54,8 @@ data: "minimumQuickLoginWaitSeconds" : 60, "waitIncrementSeconds" : 60, "quickLoginCheckMilliSeconds" : 1000, - "maxDeltaTimeSeconds" : 43200, - "failureFactor" : 30, + "maxDeltaTimeSeconds" : 1036800, + "failureFactor" : 10, "roles" : { "realm" : [ { "id" : "48f38342-1e3f-427a-995d-c436eaee65cb", @@ -3714,6 +3714,7 @@ data: "containerId" : "afe47bd0-61f8-40c3-95cb-04930407ebdd" }, "requiredCredentials" : [ "password" ], + "passwordPolicy" : "length(8) and maxLength(64) and specialChars(1) and lowerCase(1) and upperCase(1) and digits(1)", "otpPolicyType" : "totp", "otpPolicyAlgorithm" : "HmacSHA1", "otpPolicyInitialCounter" : 0, diff --git a/helm/dbrepo/templates/metadata-configmap.yaml b/helm/dbrepo/templates/metadata-configmap.yaml index feba6b312f9529ea9c1563066b053168fc41e7e3..059f2bd40d2418672f8f6a4a3f1c64f05156cac2 100644 --- a/helm/dbrepo/templates/metadata-configmap.yaml +++ b/helm/dbrepo/templates/metadata-configmap.yaml @@ -3,16 +3,8 @@ apiVersion: v1 kind: ConfigMap metadata: - name: metadata-db-setup + name: metadata-db-config namespace: {{ include "common.names.namespace" . | quote }} data: - {{- with .Values.metadatadb.extraInitDbScripts }} - {{ toYaml . | nindent 2 }} - {{- end }} - 02-setup-data.sql: | - BEGIN; - INSERT INTO `mdb_containers` (name, internal_name, image_id, host, port, privileged_username, privileged_password) - VALUES ('mariadb-galera:11.3.2-debian-12-r9', 'mariadb-galera:11.3.2-debian-12-r9', 1, 'data-db', 3306, '{{ .Values.datadb.rootUser.user }}', '{{ .Values.datadb.rootUser.password }}'); - COMMIT; - {{ (.Files.Glob "files/01-setup-schema.sql").AsConfig | nindent 2 }} + {{ (.Files.Glob "files/my.cnf").AsConfig | nindent 2 }} {{- end }} diff --git a/helm/dbrepo/templates/metadata-setup-configmap.yaml b/helm/dbrepo/templates/metadata-setup-configmap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..608f1d13e162665464faeaf3eaa789834f6a8429 --- /dev/null +++ b/helm/dbrepo/templates/metadata-setup-configmap.yaml @@ -0,0 +1,19 @@ +{{- if .Values.metadatadb.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: metadata-db-setup + namespace: {{ include "common.names.namespace" . | quote }} +data: + {{- with .Values.metadatadb.extraInitDbScripts }} + {{ toYaml . | nindent 2 }} + {{- end }} + {{ (.Files.Glob "files/01-setup-schema.sql").AsConfig | nindent 2 }} + 02-setup-data.sql: | + BEGIN; + INSERT INTO `mdb_containers` (name, internal_name, image_id, host, port, privileged_username, privileged_password) + VALUES ('mariadb-galera:11.3.2-debian-12-r9', 'mariadb-galera:11.3.2-debian-12-r9', 1, 'data-db', 3306, '{{ .Values.datadb.rootUser.user }}', '{{ .Values.datadb.rootUser.password }}'); + COMMIT; + {{ (.Files.Glob "files/my.cnf").AsConfig | nindent 2 }} +{{- end }} diff --git a/helm/dbrepo/values.schema.json b/helm/dbrepo/values.schema.json index 641287b434aff0bf533a2416081a9d6c0e447742..bf0c7d216df1894d4231ea092074a05967033aef 100644 --- a/helm/dbrepo/values.schema.json +++ b/helm/dbrepo/values.schema.json @@ -620,6 +620,9 @@ "replicaCount": { "type": "integer" }, + "resourcesPreset": { + "type": "string" + }, "rootUser": { "properties": { "password": { @@ -1015,6 +1018,9 @@ }, "metadatadb": { "properties": { + "configurationConfigMap": { + "type": "string" + }, "db": { "properties": { "name": { @@ -1080,6 +1086,9 @@ "replicaCount": { "type": "integer" }, + "resourcesPreset": { + "type": "string" + }, "rootUser": { "properties": { "password": { @@ -1363,6 +1372,9 @@ }, "coordinating": { "properties": { + "replicaCount": { + "type": "integer" + }, "resourcesPreset": { "type": "string" } @@ -1371,6 +1383,9 @@ }, "data": { "properties": { + "replicaCount": { + "type": "integer" + }, "resourcesPreset": { "type": "string" } @@ -1391,6 +1406,9 @@ "enabled": { "type": "boolean" }, + "replicaCount": { + "type": "integer" + }, "resourcesPreset": { "type": "string" } @@ -1399,6 +1417,9 @@ }, "master": { "properties": { + "replicaCount": { + "type": "integer" + }, "resourcesPreset": { "type": "string" } diff --git a/helm/dbrepo/values.yaml b/helm/dbrepo/values.yaml index 504c87f10a1f6cae29b6ea35475304321ffd77a6..ff5562eebc310b204b49694fd0c53134a0cbbbf1 100644 --- a/helm/dbrepo/values.yaml +++ b/helm/dbrepo/values.yaml @@ -56,6 +56,8 @@ metadatadb: enabled: true ## @skip metadatadb.initdbScriptsConfigMap The initial database scripts. initdbScriptsConfigMap: metadata-db-setup + ## @param metadatadb.configurationConfigMap The database configuration files. + configurationConfigMap: metadata-db-config ## @param metadatadb.extraInitDbScripts Additional init.db scripts that are executed on the first start. extraInitDbScripts: { } # 03-additional-data.sql: | @@ -65,6 +67,8 @@ metadatadb: # COMMIT; ## @param metadatadb.replicaCount The number of cluster nodes, should be uneven i.e. 2n+1 replicaCount: 3 + ## @param metadatadb.resourcesPreset The container resource preset + resourcesPreset: "nano-hm" persistence: ## @param metadatadb.persistence.enabled Enable persistent storage. enabled: true @@ -118,7 +122,7 @@ authservice: setupJob: image: ## @skip authservice.setupJob.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/auth-service-init:1.7.0 ## @param authservice.setupJob.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param authservice.setupJob.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -185,6 +189,8 @@ datadb: enabled: true ## @param datadb.replicaCount The number of cluster nodes, should be uneven i.e. 2n+1 replicaCount: 3 + ## @param datadb.resourcesPreset The container resource preset + resourcesPreset: "nano-hm" persistence: ## @param datadb.persistence.enabled Enable persistent storage. enabled: true @@ -205,17 +211,25 @@ searchdb: coordinating: ## @param searchdb.coordinating.resourcesPreset The container resource preset resourcesPreset: "small" + ## @param searchdb.coordinating.replicaCount The number of pod replicas. + replicaCount: 1 ingest: ## @skip searchdb.ingest.enabled The limited default payload does not require this node type. enabled: false ## @param searchdb.ingest.resourcesPreset The container resource preset resourcesPreset: "micro" + ## @param searchdb.ingest.replicaCount The number of pod replicas. + replicaCount: 1 master: ## @param searchdb.master.resourcesPreset The container resource preset resourcesPreset: "small" + ## @param searchdb.master.replicaCount The number of pod replicas. + replicaCount: 1 data: ## @param searchdb.data.resourcesPreset The container resource preset resourcesPreset: "medium" + ## @param searchdb.data.replicaCount The number of pod replicas. + replicaCount: 1 security: ## @skip searchdb.security.enabled enabled: false @@ -401,7 +415,7 @@ analyseservice: enabled: true image: ## @skip analyseservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/analyse-service:1.7.0 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param analyseservice.podSecurityContext.enabled Enable pods' Security Context @@ -462,7 +476,7 @@ metadataservice: enabled: true image: ## @skip metadataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/metadata-service:1.7.0 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param metadataservice.podSecurityContext.enabled Enable pods' Security Context @@ -559,7 +573,7 @@ dataservice: endpoint: http://data-service image: ## @skip dataservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/data-service:1.7.0 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param dataservice.podSecurityContext.enabled Enable pods' Security Context @@ -645,7 +659,7 @@ searchservice: endpoint: http://search-service image: ## @skip searchservice.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service:1.7.0 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param searchservice.podSecurityContext.enabled Enable pods' Security Context @@ -692,7 +706,7 @@ searchservice: init: image: ## @skip searchservice.init.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/search-service-init:1.7.0 ## @param searchservice.init.resourcesPreset The container resource preset resourcesPreset: "nano" ## @param searchservice.init.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads) @@ -753,7 +767,7 @@ storageservice: init: image: ## @skip storageservice.init.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/storage-service-init:1.7.0 s3: ## @param storageservice.init.s3.endpoint The S3-capable endpoint the microservice connects to. endpoint: http://storage-service-s3:8333 @@ -862,7 +876,7 @@ ui: enabled: true image: ## @skip ui.image.name - name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.6.5 + name: registry.datalab.tuwien.ac.at/dbrepo/ui:1.7.0 ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod podSecurityContext: ## @param ui.podSecurityContext.enabled Enable pods' Security Context diff --git a/helm/seaweedfs/Chart.lock b/helm/seaweedfs/Chart.lock index 96e5c8dce913d2f7a73bf8adc5d7f121fb2a3b70..863acf55617dc87a2f5de5ba765d7ce5bcac8066 100644 --- a/helm/seaweedfs/Chart.lock +++ b/helm/seaweedfs/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts - version: 20.2.2 + version: 20.2.4 - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 16.4.6 + version: 16.4.9 - name: common repository: oci://registry-1.docker.io/bitnamicharts version: 2.29.1 -digest: sha256:bc14ae7bbe7be291adc4a6329ae64835c367b09277a2678c4e10cc74b19ee491 -generated: "2025-02-04T22:22:11.88596441+01:00" +digest: sha256:dbba12b36ab3b4370112da3089066f57bcef2be1651134787fd158491a2a766c +generated: "2025-02-18T09:32:41.716703325+01:00" diff --git a/helm/seaweedfs/charts/mariadb-20.2.2.tgz b/helm/seaweedfs/charts/mariadb-20.2.2.tgz deleted file mode 100644 index a983469f30dfce693288215705891f387c517319..0000000000000000000000000000000000000000 Binary files a/helm/seaweedfs/charts/mariadb-20.2.2.tgz and /dev/null differ diff --git a/helm/seaweedfs/charts/mariadb-20.2.4.tgz b/helm/seaweedfs/charts/mariadb-20.2.4.tgz new file mode 100644 index 0000000000000000000000000000000000000000..eb0f7bcfab6286495ed5338abdb8221b1f89805c Binary files /dev/null and b/helm/seaweedfs/charts/mariadb-20.2.4.tgz differ diff --git a/helm/seaweedfs/charts/postgresql-16.4.6.tgz b/helm/seaweedfs/charts/postgresql-16.4.6.tgz deleted file mode 100644 index 9016ba352dfd2b553e3cac4a8a80fb7c8c539d65..0000000000000000000000000000000000000000 Binary files a/helm/seaweedfs/charts/postgresql-16.4.6.tgz and /dev/null differ diff --git a/helm/seaweedfs/charts/postgresql-16.4.9.tgz b/helm/seaweedfs/charts/postgresql-16.4.9.tgz new file mode 100644 index 0000000000000000000000000000000000000000..4bb0578224f0d8817e757a759547b171798bd407 Binary files /dev/null and b/helm/seaweedfs/charts/postgresql-16.4.9.tgz differ diff --git a/install.sh b/install.sh index 004a29ff1f5ff20445ba5f49f9ed8520eb228429..6de016007f4e4eab84cd331a0a1a7aafca046b38 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # preset -VERSION="1.6.5" +VERSION="1.7.0" MIN_CPU=8 MIN_RAM=4 MIN_MAP_COUNT=262144 diff --git a/lib/python/.coveragerc b/lib/python/.coveragerc new file mode 100644 index 0000000000000000000000000000000000000000..a387be84259ecf1c8b1387a407e3cfc528960a30 --- /dev/null +++ b/lib/python/.coveragerc @@ -0,0 +1,9 @@ +[report] +omit = + # omit tests + ./tests/* + # omit ext lib + ./omlib/* + +[html] +directory = htmlcov diff --git a/lib/python/.gitignore b/lib/python/.gitignore index c954a774008e444617bea9ec16df30b7dda3183b..1f4bb524a1c7dfe8ec62be60b755993e13f7dedc 100644 --- a/lib/python/.gitignore +++ b/lib/python/.gitignore @@ -6,6 +6,7 @@ dist/ dbrepo.egg-info/ build/ htmlcov/ +tmp-* # debug debug.py diff --git a/lib/python/Pipfile b/lib/python/Pipfile index 62a93cc02a1d043464485a4506adcf65ca2160a2..b7ebe44f3ab7d19fdec0ee847e82f95f7ab5d7a6 100644 --- a/lib/python/Pipfile +++ b/lib/python/Pipfile @@ -21,6 +21,7 @@ pytest = "*" requests-mock = "*" furo = "*" pytest-ordering = "*" +httpx = "*" [requires] python_version = "3.11" diff --git a/lib/python/Pipfile.lock b/lib/python/Pipfile.lock index 52b7202c3e6e17d9651d8851a66dc925f010a4df..d4c90209c06fd3690890b9a76944cb25817ff139 100644 --- a/lib/python/Pipfile.lock +++ b/lib/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "01e7f752292f6f3d558a9418f7172696f9bd200d00c7eed2745b74d08ef27eb4" + "sha256": "049bd8a6ac52e886dce11e7d7de630464e073e360471f35125a2eccf7c30a7a7" }, "pipfile-spec": 6, "requires": { @@ -18,93 +18,98 @@ "default": { "aiohappyeyeballs": { "hashes": [ - "sha256:5fdd7d87889c63183afc18ce9271f9b0a7d32c2303e394468dd45d514a757745", - "sha256:a980909d50efcd44795c4afeca523296716d50cd756ddca6af8c65b996e27de8" + "sha256:147ec992cf873d74f5062644332c539fcd42956dc69453fe5204195e560517e1", + "sha256:9b05052f9042985d32ecbe4b59a77ae19c006a78f1344d7fdad69d28ded3d0b0" ], - "markers": "python_version >= '3.8'", - "version": "==2.4.4" + "markers": "python_version >= '3.9'", + "version": "==2.4.6" }, "aiohttp": { "hashes": [ - "sha256:0882c2820fd0132240edbb4a51eb8ceb6eef8181db9ad5291ab3332e0d71df5f", - "sha256:0a6d3fbf2232e3a08c41eca81ae4f1dff3d8f1a30bae415ebe0af2d2458b8a33", - "sha256:0b7fb429ab1aafa1f48578eb315ca45bd46e9c37de11fe45c7f5f4138091e2f1", - "sha256:0eb98d90b6690827dcc84c246811feeb4e1eea683c0eac6caed7549be9c84665", - "sha256:0fd82b8e9c383af11d2b26f27a478640b6b83d669440c0a71481f7c865a51da9", - "sha256:10b4ff0ad793d98605958089fabfa350e8e62bd5d40aa65cdc69d6785859f94e", - "sha256:1642eceeaa5ab6c9b6dfeaaa626ae314d808188ab23ae196a34c9d97efb68350", - "sha256:1dac54e8ce2ed83b1f6b1a54005c87dfed139cf3f777fdc8afc76e7841101226", - "sha256:1e69966ea6ef0c14ee53ef7a3d68b564cc408121ea56c0caa2dc918c1b2f553d", - "sha256:1f21bb8d0235fc10c09ce1d11ffbd40fc50d3f08a89e4cf3a0c503dc2562247a", - "sha256:2170816e34e10f2fd120f603e951630f8a112e1be3b60963a1f159f5699059a6", - "sha256:21fef42317cf02e05d3b09c028712e1d73a9606f02467fd803f7c1f39cc59add", - "sha256:249cc6912405917344192b9f9ea5cd5b139d49e0d2f5c7f70bdfaf6b4dbf3a2e", - "sha256:3499c7ffbfd9c6a3d8d6a2b01c26639da7e43d47c7b4f788016226b1e711caa8", - "sha256:3af41686ccec6a0f2bdc66686dc0f403c41ac2089f80e2214a0f82d001052c03", - "sha256:3e23419d832d969f659c208557de4a123e30a10d26e1e14b73431d3c13444c2e", - "sha256:3ea1b59dc06396b0b424740a10a0a63974c725b1c64736ff788a3689d36c02d2", - "sha256:44167fc6a763d534a6908bdb2592269b4bf30a03239bcb1654781adf5e49caf1", - "sha256:479b8c6ebd12aedfe64563b85920525d05d394b85f166b7873c8bde6da612f9c", - "sha256:4af57160800b7a815f3fe0eba9b46bf28aafc195555f1824555fa2cfab6c1538", - "sha256:4b4fa1cb5f270fb3eab079536b764ad740bb749ce69a94d4ec30ceee1b5940d5", - "sha256:4eed954b161e6b9b65f6be446ed448ed3921763cc432053ceb606f89d793927e", - "sha256:541d823548ab69d13d23730a06f97460f4238ad2e5ed966aaf850d7c369782d9", - "sha256:568c1236b2fde93b7720f95a890741854c1200fba4a3471ff48b2934d2d93fd3", - "sha256:5854be2f3e5a729800bac57a8d76af464e160f19676ab6aea74bde18ad19d438", - "sha256:620598717fce1b3bd14dd09947ea53e1ad510317c85dda2c9c65b622edc96b12", - "sha256:6526e5fb4e14f4bbf30411216780c9967c20c5a55f2f51d3abd6de68320cc2f3", - "sha256:6fba278063559acc730abf49845d0e9a9e1ba74f85f0ee6efd5803f08b285853", - "sha256:70d1f9dde0e5dd9e292a6d4d00058737052b01f3532f69c0c65818dac26dc287", - "sha256:731468f555656767cda219ab42e033355fe48c85fbe3ba83a349631541715ba2", - "sha256:81b8fe282183e4a3c7a1b72f5ade1094ed1c6345a8f153506d114af5bf8accd9", - "sha256:84a585799c58b795573c7fa9b84c455adf3e1d72f19a2bf498b54a95ae0d194c", - "sha256:85992ee30a31835fc482468637b3e5bd085fa8fe9392ba0bdcbdc1ef5e9e3c55", - "sha256:8811f3f098a78ffa16e0ea36dffd577eb031aea797cbdba81be039a4169e242c", - "sha256:88a12ad8ccf325a8a5ed80e6d7c3bdc247d66175afedbe104ee2aaca72960d8e", - "sha256:8be8508d110d93061197fd2d6a74f7401f73b6d12f8822bbcd6d74f2b55d71b1", - "sha256:8e2bf8029dbf0810c7bfbc3e594b51c4cc9101fbffb583a3923aea184724203c", - "sha256:929f3ed33743a49ab127c58c3e0a827de0664bfcda566108989a14068f820194", - "sha256:92cde43018a2e17d48bb09c79e4d4cb0e236de5063ce897a5e40ac7cb4878773", - "sha256:92fc484e34b733704ad77210c7957679c5c3877bd1e6b6d74b185e9320cc716e", - "sha256:943a8b052e54dfd6439fd7989f67fc6a7f2138d0a2cf0a7de5f18aa4fe7eb3b1", - "sha256:9d73ee3725b7a737ad86c2eac5c57a4a97793d9f442599bea5ec67ac9f4bdc3d", - "sha256:9f5b3c1ed63c8fa937a920b6c1bec78b74ee09593b3f5b979ab2ae5ef60d7600", - "sha256:9fd46ce0845cfe28f108888b3ab17abff84ff695e01e73657eec3f96d72eef34", - "sha256:a344d5dc18074e3872777b62f5f7d584ae4344cd6006c17ba12103759d407af3", - "sha256:a60804bff28662cbcf340a4d61598891f12eea3a66af48ecfdc975ceec21e3c8", - "sha256:a8f5f7515f3552d899c61202d99dcb17d6e3b0de777900405611cd747cecd1b8", - "sha256:a9b7371665d4f00deb8f32208c7c5e652059b0fda41cf6dbcac6114a041f1cc2", - "sha256:aa54f8ef31d23c506910c21163f22b124facb573bff73930735cf9fe38bf7dff", - "sha256:aba807f9569455cba566882c8938f1a549f205ee43c27b126e5450dc9f83cc62", - "sha256:ae545f31489548c87b0cced5755cfe5a5308d00407000e72c4fa30b19c3220ac", - "sha256:af01e42ad87ae24932138f154105e88da13ce7d202a6de93fafdafb2883a00ef", - "sha256:b540bd67cfb54e6f0865ceccd9979687210d7ed1a1cc8c01f8e67e2f1e883d28", - "sha256:b6212a60e5c482ef90f2d788835387070a88d52cf6241d3916733c9176d39eab", - "sha256:b63de12e44935d5aca7ed7ed98a255a11e5cb47f83a9fded7a5e41c40277d104", - "sha256:ba74ec819177af1ef7f59063c6d35a214a8fde6f987f7661f4f0eecc468a8f76", - "sha256:bb49c7f1e6ebf3821a42d81d494f538107610c3a705987f53068546b0e90303e", - "sha256:bd176afcf8f5d2aed50c3647d4925d0db0579d96f75a31e77cbaf67d8a87742d", - "sha256:bd7227b87a355ce1f4bf83bfae4399b1f5bb42e0259cb9405824bd03d2f4336a", - "sha256:bf8d9bfee991d8acc72d060d53860f356e07a50f0e0d09a8dfedea1c554dd0d5", - "sha256:bfde76a8f430cf5c5584553adf9926534352251d379dcb266ad2b93c54a29745", - "sha256:c341c7d868750e31961d6d8e60ff040fb9d3d3a46d77fd85e1ab8e76c3e9a5c4", - "sha256:c7a06301c2fb096bdb0bd25fe2011531c1453b9f2c163c8031600ec73af1cc99", - "sha256:cb23d8bb86282b342481cad4370ea0853a39e4a32a0042bb52ca6bdde132df43", - "sha256:d119fafe7b634dbfa25a8c597718e69a930e4847f0b88e172744be24515140da", - "sha256:d40f9da8cabbf295d3a9dae1295c69975b86d941bc20f0a087f0477fa0a66231", - "sha256:d6c9af134da4bc9b3bd3e6a70072509f295d10ee60c697826225b60b9959acdd", - "sha256:dd7659baae9ccf94ae5fe8bfaa2c7bc2e94d24611528395ce88d009107e00c6d", - "sha256:de8d38f1c2810fa2a4f1d995a2e9c70bb8737b18da04ac2afbf3971f65781d87", - "sha256:e595c591a48bbc295ebf47cb91aebf9bd32f3ff76749ecf282ea7f9f6bb73886", - "sha256:ec2aa89305006fba9ffb98970db6c8221541be7bee4c1d027421d6f6df7d1ce2", - "sha256:ec82bf1fda6cecce7f7b915f9196601a1bd1a3079796b76d16ae4cce6d0ef89b", - "sha256:ed9ee95614a71e87f1a70bc81603f6c6760128b140bc4030abe6abaa988f1c3d", - "sha256:f047569d655f81cb70ea5be942ee5d4421b6219c3f05d131f64088c73bb0917f", - "sha256:ffa336210cf9cd8ed117011085817d00abe4c08f99968deef0013ea283547204", - "sha256:ffb3dc385f6bb1568aa974fe65da84723210e5d9707e360e9ecb51f59406cd2e" + "sha256:0450ada317a65383b7cce9576096150fdb97396dcfe559109b403c7242faffef", + "sha256:0b5263dcede17b6b0c41ef0c3ccce847d82a7da98709e75cf7efde3e9e3b5cae", + "sha256:0d5176f310a7fe6f65608213cc74f4228e4f4ce9fd10bcb2bb6da8fc66991462", + "sha256:0ed49efcd0dc1611378beadbd97beb5d9ca8fe48579fc04a6ed0844072261b6a", + "sha256:145a73850926018ec1681e734cedcf2716d6a8697d90da11284043b745c286d5", + "sha256:1987770fb4887560363b0e1a9b75aa303e447433c41284d3af2840a2f226d6e0", + "sha256:246067ba0cf5560cf42e775069c5d80a8989d14a7ded21af529a4e10e3e0f0e6", + "sha256:2c311e2f63e42c1bf86361d11e2c4a59f25d9e7aabdbdf53dc38b885c5435cdb", + "sha256:2cee3b117a8d13ab98b38d5b6bdcd040cfb4181068d05ce0c474ec9db5f3c5bb", + "sha256:2de1378f72def7dfb5dbd73d86c19eda0ea7b0a6873910cc37d57e80f10d64e1", + "sha256:30f546358dfa0953db92ba620101fefc81574f87b2346556b90b5f3ef16e55ce", + "sha256:34245498eeb9ae54c687a07ad7f160053911b5745e186afe2d0c0f2898a1ab8a", + "sha256:392432a2dde22b86f70dd4a0e9671a349446c93965f261dbaecfaf28813e5c42", + "sha256:3c0600bcc1adfaaac321422d615939ef300df81e165f6522ad096b73439c0f58", + "sha256:4016e383f91f2814e48ed61e6bda7d24c4d7f2402c75dd28f7e1027ae44ea204", + "sha256:40cd36749a1035c34ba8d8aaf221b91ca3d111532e5ccb5fa8c3703ab1b967ed", + "sha256:413ad794dccb19453e2b97c2375f2ca3cdf34dc50d18cc2693bd5aed7d16f4b9", + "sha256:4a93d28ed4b4b39e6f46fd240896c29b686b75e39cc6992692e3922ff6982b4c", + "sha256:4ee84c2a22a809c4f868153b178fe59e71423e1f3d6a8cd416134bb231fbf6d3", + "sha256:50c5c7b8aa5443304c55c262c5693b108c35a3b61ef961f1e782dd52a2f559c7", + "sha256:525410e0790aab036492eeea913858989c4cb070ff373ec3bc322d700bdf47c1", + "sha256:526c900397f3bbc2db9cb360ce9c35134c908961cdd0ac25b1ae6ffcaa2507ff", + "sha256:54775858c7f2f214476773ce785a19ee81d1294a6bedc5cc17225355aab74802", + "sha256:584096938a001378484aa4ee54e05dc79c7b9dd933e271c744a97b3b6f644957", + "sha256:6130459189e61baac5a88c10019b21e1f0c6d00ebc770e9ce269475650ff7f73", + "sha256:67453e603cea8e85ed566b2700efa1f6916aefbc0c9fcb2e86aaffc08ec38e78", + "sha256:68d54234c8d76d8ef74744f9f9fc6324f1508129e23da8883771cdbb5818cbef", + "sha256:6dfe7f984f28a8ae94ff3a7953cd9678550dbd2a1f9bda5dd9c5ae627744c78e", + "sha256:74bd573dde27e58c760d9ca8615c41a57e719bff315c9adb6f2a4281a28e8798", + "sha256:7603ca26d75b1b86160ce1bbe2787a0b706e592af5b2504e12caa88a217767b0", + "sha256:76719dd521c20a58a6c256d058547b3a9595d1d885b830013366e27011ffe804", + "sha256:7c3623053b85b4296cd3925eeb725e386644fd5bc67250b3bb08b0f144803e7b", + "sha256:7e44eba534381dd2687be50cbd5f2daded21575242ecfdaf86bbeecbc38dae8e", + "sha256:7fe3d65279bfbee8de0fb4f8c17fc4e893eed2dba21b2f680e930cc2b09075c5", + "sha256:8340def6737118f5429a5df4e88f440746b791f8f1c4ce4ad8a595f42c980bd5", + "sha256:84ede78acde96ca57f6cf8ccb8a13fbaf569f6011b9a52f870c662d4dc8cd854", + "sha256:850ff6155371fd802a280f8d369d4e15d69434651b844bde566ce97ee2277420", + "sha256:87a2e00bf17da098d90d4145375f1d985a81605267e7f9377ff94e55c5d769eb", + "sha256:88d385b8e7f3a870146bf5ea31786ef7463e99eb59e31db56e2315535d811f55", + "sha256:8a2fb742ef378284a50766e985804bd6adb5adb5aa781100b09befdbfa757b65", + "sha256:8dc0fba9a74b471c45ca1a3cb6e6913ebfae416678d90529d188886278e7f3f6", + "sha256:8fa1510b96c08aaad49303ab11f8803787c99222288f310a62f493faf883ede1", + "sha256:8fd12d0f989c6099e7b0f30dc6e0d1e05499f3337461f0b2b0dadea6c64b89df", + "sha256:9060addfa4ff753b09392efe41e6af06ea5dd257829199747b9f15bfad819460", + "sha256:930ffa1925393381e1e0a9b82137fa7b34c92a019b521cf9f41263976666a0d6", + "sha256:936d8a4f0f7081327014742cd51d320296b56aa6d324461a13724ab05f4b2933", + "sha256:97fe431f2ed646a3b56142fc81d238abcbaff08548d6912acb0b19a0cadc146b", + "sha256:9bd8695be2c80b665ae3f05cb584093a1e59c35ecb7d794d1edd96e8cc9201d7", + "sha256:9dec0000d2d8621d8015c293e24589d46fa218637d820894cb7356c77eca3259", + "sha256:a478aa11b328983c4444dacb947d4513cb371cd323f3845e53caeda6be5589d5", + "sha256:a481a574af914b6e84624412666cbfbe531a05667ca197804ecc19c97b8ab1b0", + "sha256:a4ac6a0f0f6402854adca4e3259a623f5c82ec3f0c049374133bcb243132baf9", + "sha256:a5e69046f83c0d3cb8f0d5bd9b8838271b1bc898e01562a04398e160953e8eb9", + "sha256:a7442662afebbf7b4c6d28cb7aab9e9ce3a5df055fc4116cc7228192ad6cb484", + "sha256:aa8a8caca81c0a3e765f19c6953416c58e2f4cc1b84829af01dd1c771bb2f91f", + "sha256:ab3247d58b393bda5b1c8f31c9edece7162fc13265334217785518dd770792b8", + "sha256:b10a47e5390c4b30a0d58ee12581003be52eedd506862ab7f97da7a66805befb", + "sha256:b34508f1cd928ce915ed09682d11307ba4b37d0708d1f28e5774c07a7674cac9", + "sha256:b8d3bb96c147b39c02d3db086899679f31958c5d81c494ef0fc9ef5bb1359b3d", + "sha256:b9d45dbb3aaec05cf01525ee1a7ac72de46a8c425cb75c003acd29f76b1ffe94", + "sha256:bf4480a5438f80e0f1539e15a7eb8b5f97a26fe087e9828e2c0ec2be119a9f72", + "sha256:c160a04283c8c6f55b5bf6d4cad59bb9c5b9c9cd08903841b25f1f7109ef1259", + "sha256:c96a43822f1f9f69cc5c3706af33239489a6294be486a0447fb71380070d4d5f", + "sha256:c9fd9dcf9c91affe71654ef77426f5cf8489305e1c66ed4816f5a21874b094b9", + "sha256:cddb31f8474695cd61fc9455c644fc1606c164b93bff2490390d90464b4655df", + "sha256:ce1bb21fc7d753b5f8a5d5a4bae99566386b15e716ebdb410154c16c91494d7f", + "sha256:d1c031a7572f62f66f1257db37ddab4cb98bfaf9b9434a3b4840bf3560f5e788", + "sha256:d589264dbba3b16e8951b6f145d1e6b883094075283dafcab4cdd564a9e353a0", + "sha256:dc065a4285307607df3f3686363e7f8bdd0d8ab35f12226362a847731516e42c", + "sha256:e10c440d142fa8b32cfdb194caf60ceeceb3e49807072e0dc3a8887ea80e8c16", + "sha256:e3552fe98e90fdf5918c04769f338a87fa4f00f3b28830ea9b78b1bdc6140e0d", + "sha256:e392804a38353900c3fd8b7cacbea5132888f7129f8e241915e90b85f00e3250", + "sha256:e4cecdb52aaa9994fbed6b81d4568427b6002f0a91c322697a4bfcc2b2363f5a", + "sha256:e5148ca8955affdfeb864aca158ecae11030e952b25b3ae15d4e2b5ba299bad2", + "sha256:e6b2732ef3bafc759f653a98881b5b9cdef0716d98f013d376ee8dfd7285abf1", + "sha256:ea756b5a7bac046d202a9a3889b9a92219f885481d78cd318db85b15cc0b7bcf", + "sha256:edb69b9589324bdc40961cdf0657815df674f1743a8d5ad9ab56a99e4833cfdd", + "sha256:f0203433121484b32646a5f5ea93ae86f3d9559d7243f07e8c0eab5ff8e3f70e", + "sha256:f6a19bcab7fbd8f8649d6595624856635159a6527861b9cdc3447af288a00c00", + "sha256:f752e80606b132140883bb262a457c475d219d7163d996dc9072434ffb0784c4", + "sha256:f7914ab70d2ee8ab91c13e5402122edbc77821c66d2758abb53aabe87f013287" ], "markers": "python_version >= '3.9'", - "version": "==3.11.11" + "version": "==3.11.12" }, "aiosignal": { "hashes": [ @@ -124,19 +129,19 @@ }, "attrs": { "hashes": [ - "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff", - "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308" + "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e", + "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a" ], "markers": "python_version >= '3.8'", - "version": "==24.3.0" + "version": "==25.1.0" }, "certifi": { "hashes": [ - "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56", - "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db" + "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", + "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe" ], "markers": "python_version >= '3.6'", - "version": "==2024.12.14" + "version": "==2025.1.31" }, "charset-normalizer": { "hashes": [ @@ -442,64 +447,64 @@ }, "numpy": { "hashes": [ - "sha256:02935e2c3c0c6cbe9c7955a8efa8908dd4221d7755644c59d1bba28b94fd334f", - "sha256:0349b025e15ea9d05c3d63f9657707a4e1d471128a3b1d876c095f328f8ff7f0", - "sha256:09d6a2032faf25e8d0cadde7fd6145118ac55d2740132c1d845f98721b5ebcfd", - "sha256:0bc61b307655d1a7f9f4b043628b9f2b721e80839914ede634e3d485913e1fb2", - "sha256:0eec19f8af947a61e968d5429f0bd92fec46d92b0008d0a6685b40d6adf8a4f4", - "sha256:106397dbbb1896f99e044efc90360d098b3335060375c26aa89c0d8a97c5f648", - "sha256:128c41c085cab8a85dc29e66ed88c05613dccf6bc28b3866cd16050a2f5448be", - "sha256:149d1113ac15005652e8d0d3f6fd599360e1a708a4f98e43c9c77834a28238cb", - "sha256:159ff6ee4c4a36a23fe01b7c3d07bd8c14cc433d9720f977fcd52c13c0098160", - "sha256:22ea3bb552ade325530e72a0c557cdf2dea8914d3a5e1fecf58fa5dbcc6f43cd", - "sha256:23ae9f0c2d889b7b2d88a3791f6c09e2ef827c2446f1c4a3e3e76328ee4afd9a", - "sha256:250c16b277e3b809ac20d1f590716597481061b514223c7badb7a0f9993c7f84", - "sha256:2ec6c689c61df613b783aeb21f945c4cbe6c51c28cb70aae8430577ab39f163e", - "sha256:2ffbb1acd69fdf8e89dd60ef6182ca90a743620957afb7066385a7bbe88dc748", - "sha256:3074634ea4d6df66be04f6728ee1d173cfded75d002c75fac79503a880bf3825", - "sha256:356ca982c188acbfa6af0d694284d8cf20e95b1c3d0aefa8929376fea9146f60", - "sha256:3fbe72d347fbc59f94124125e73fc4976a06927ebc503ec5afbfb35f193cd957", - "sha256:40c7ff5da22cd391944a28c6a9c638a5eef77fcf71d6e3a79e1d9d9e82752715", - "sha256:41184c416143defa34cc8eb9d070b0a5ba4f13a0fa96a709e20584638254b317", - "sha256:451e854cfae0febe723077bd0cf0a4302a5d84ff25f0bfece8f29206c7bed02e", - "sha256:4525b88c11906d5ab1b0ec1f290996c0020dd318af8b49acaa46f198b1ffc283", - "sha256:463247edcee4a5537841d5350bc87fe8e92d7dd0e8c71c995d2c6eecb8208278", - "sha256:4dbd80e453bd34bd003b16bd802fac70ad76bd463f81f0c518d1245b1c55e3d9", - "sha256:57b4012e04cc12b78590a334907e01b3a85efb2107df2b8733ff1ed05fce71de", - "sha256:5a8c863ceacae696aff37d1fd636121f1a512117652e5dfb86031c8d84836369", - "sha256:5acea83b801e98541619af398cc0109ff48016955cc0818f478ee9ef1c5c3dcb", - "sha256:642199e98af1bd2b6aeb8ecf726972d238c9877b0f6e8221ee5ab945ec8a2189", - "sha256:64bd6e1762cd7f0986a740fee4dff927b9ec2c5e4d9a28d056eb17d332158014", - "sha256:6d9fc9d812c81e6168b6d405bf00b8d6739a7f72ef22a9214c4241e0dc70b323", - "sha256:7079129b64cb78bdc8d611d1fd7e8002c0a2565da6a47c4df8062349fee90e3e", - "sha256:7dca87ca328f5ea7dafc907c5ec100d187911f94825f8700caac0b3f4c384b49", - "sha256:860fd59990c37c3ef913c3ae390b3929d005243acca1a86facb0773e2d8d9e50", - "sha256:8e6da5cffbbe571f93588f562ed130ea63ee206d12851b60819512dd3e1ba50d", - "sha256:8ec0636d3f7d68520afc6ac2dc4b8341ddb725039de042faf0e311599f54eb37", - "sha256:9491100aba630910489c1d0158034e1c9a6546f0b1340f716d522dc103788e39", - "sha256:97b974d3ba0fb4612b77ed35d7627490e8e3dff56ab41454d9e8b23448940576", - "sha256:995f9e8181723852ca458e22de5d9b7d3ba4da3f11cc1cb113f093b271d7965a", - "sha256:9dd47ff0cb2a656ad69c38da850df3454da88ee9a6fde0ba79acceee0e79daba", - "sha256:9fad446ad0bc886855ddf5909cbf8cb5d0faa637aaa6277fb4b19ade134ab3c7", - "sha256:a972cec723e0563aa0823ee2ab1df0cb196ed0778f173b381c871a03719d4826", - "sha256:ac9bea18d6d58a995fac1b2cb4488e17eceeac413af014b1dd26170b766d8467", - "sha256:b0531f0b0e07643eb089df4c509d30d72c9ef40defa53e41363eca8a8cc61495", - "sha256:b208cfd4f5fe34e1535c08983a1a6803fdbc7a1e86cf13dd0c61de0b51a0aadc", - "sha256:b3482cb7b3325faa5f6bc179649406058253d91ceda359c104dac0ad320e1391", - "sha256:b6fb9c32a91ec32a689ec6410def76443e3c750e7cfc3fb2206b985ffb2b85f0", - "sha256:b78ea78450fd96a498f50ee096f69c75379af5138f7881a51355ab0e11286c97", - "sha256:bd249bc894af67cbd8bad2c22e7cbcd46cf87ddfca1f1289d1e7e54868cc785c", - "sha256:c7d1fd447e33ee20c1f33f2c8e6634211124a9aabde3c617687d8b739aa69eac", - "sha256:d0bbe7dd86dca64854f4b6ce2ea5c60b51e36dfd597300057cf473d3615f2369", - "sha256:d6d6a0910c3b4368d89dde073e630882cdb266755565155bc33520283b2d9df8", - "sha256:da1eeb460ecce8d5b8608826595c777728cdf28ce7b5a5a8c8ac8d949beadcf2", - "sha256:e0c8854b09bc4de7b041148d8550d3bd712b5c21ff6a8ed308085f190235d7ff", - "sha256:e0d4142eb40ca6f94539e4db929410f2a46052a0fe7a2c1c59f6179c39938d2a", - "sha256:e9e82dcb3f2ebbc8cb5ce1102d5f1c5ed236bf8a11730fb45ba82e2841ec21df", - "sha256:ed6906f61834d687738d25988ae117683705636936cc605be0bb208b23df4d8f" + "sha256:0391ea3622f5c51a2e29708877d56e3d276827ac5447d7f45e9bc4ade8923c52", + "sha256:12c045f43b1d2915eca6b880a7f4a256f59d62df4f044788c8ba67709412128d", + "sha256:136553f123ee2951bfcfbc264acd34a2fc2f29d7cdf610ce7daf672b6fbaa693", + "sha256:1402da8e0f435991983d0a9708b779f95a8c98c6b18a171b9f1be09005e64d9d", + "sha256:16372619ee728ed67a2a606a614f56d3eabc5b86f8b615c79d01957062826ca8", + "sha256:1ad78ce7f18ce4e7df1b2ea4019b5817a2f6a8a16e34ff2775f646adce0a5027", + "sha256:1b416af7d0ed3271cad0f0a0d0bee0911ed7eba23e66f8424d9f3dfcdcae1304", + "sha256:1f45315b2dc58d8a3e7754fe4e38b6fce132dab284a92851e41b2b344f6441c5", + "sha256:2376e317111daa0a6739e50f7ee2a6353f768489102308b0d98fcf4a04f7f3b5", + "sha256:23c9f4edbf4c065fddb10a4f6e8b6a244342d95966a48820c614891e5059bb50", + "sha256:246535e2f7496b7ac85deffe932896a3577be7af8fb7eebe7146444680297e9a", + "sha256:2e8da03bd561504d9b20e7a12340870dfc206c64ea59b4cfee9fceb95070ee94", + "sha256:34c1b7e83f94f3b564b35f480f5652a47007dd91f7c839f404d03279cc8dd021", + "sha256:39261798d208c3095ae4f7bc8eaeb3481ea8c6e03dc48028057d3cbdbdb8937e", + "sha256:3b787adbf04b0db1967798dba8da1af07e387908ed1553a0d6e74c084d1ceafe", + "sha256:3c2ec8a0f51d60f1e9c0c5ab116b7fc104b165ada3f6c58abf881cb2eb16044d", + "sha256:435e7a933b9fda8126130b046975a968cc2d833b505475e588339e09f7672890", + "sha256:4d8335b5f1b6e2bce120d55fb17064b0262ff29b459e8493d1785c18ae2553b8", + "sha256:4d9828d25fb246bedd31e04c9e75714a4087211ac348cb39c8c5f99dbb6683fe", + "sha256:52659ad2534427dffcc36aac76bebdd02b67e3b7a619ac67543bc9bfe6b7cdb1", + "sha256:5266de33d4c3420973cf9ae3b98b54a2a6d53a559310e3236c4b2b06b9c07d4e", + "sha256:5521a06a3148686d9269c53b09f7d399a5725c47bbb5b35747e1cb76326b714b", + "sha256:596140185c7fa113563c67c2e894eabe0daea18cf8e33851738c19f70ce86aeb", + "sha256:5b732c8beef1d7bc2d9e476dbba20aaff6167bf205ad9aa8d30913859e82884b", + "sha256:5ebeb7ef54a7be11044c33a17b2624abe4307a75893c001a4800857956b41094", + "sha256:712a64103d97c404e87d4d7c47fb0c7ff9acccc625ca2002848e0d53288b90ea", + "sha256:7678556eeb0152cbd1522b684dcd215250885993dd00adb93679ec3c0e6e091c", + "sha256:77974aba6c1bc26e3c205c2214f0d5b4305bdc719268b93e768ddb17e3fdd636", + "sha256:783145835458e60fa97afac25d511d00a1eca94d4a8f3ace9fe2043003c678e4", + "sha256:7bfdb06b395385ea9b91bf55c1adf1b297c9fdb531552845ff1d3ea6e40d5aba", + "sha256:7c8dde0ca2f77828815fd1aedfdf52e59071a5bae30dac3b4da2a335c672149a", + "sha256:83807d445817326b4bcdaaaf8e8e9f1753da04341eceec705c001ff342002e5d", + "sha256:87eed225fd415bbae787f93a457af7f5990b92a334e346f72070bf569b9c9c95", + "sha256:8fb62fe3d206d72fe1cfe31c4a1106ad2b136fcc1606093aeab314f02930fdf2", + "sha256:95172a21038c9b423e68be78fd0be6e1b97674cde269b76fe269a5dfa6fadf0b", + "sha256:9f48ba6f6c13e5e49f3d3efb1b51c8193215c42ac82610a04624906a9270be6f", + "sha256:a0c03b6be48aaf92525cccf393265e02773be8fd9551a2f9adbe7db1fa2b60f1", + "sha256:a5ae282abe60a2db0fd407072aff4599c279bcd6e9a2475500fc35b00a57c532", + "sha256:aee2512827ceb6d7f517c8b85aa5d3923afe8fc7a57d028cffcd522f1c6fd082", + "sha256:c8b0451d2ec95010d1db8ca733afc41f659f425b7f608af569711097fd6014e2", + "sha256:c9aa4496fd0e17e3843399f533d62857cef5900facf93e735ef65aa4bbc90ef0", + "sha256:cbc6472e01952d3d1b2772b720428f8b90e2deea8344e854df22b0618e9cce71", + "sha256:cdfe0c22692a30cd830c0755746473ae66c4a8f2e7bd508b35fb3b6a0813d787", + "sha256:cf802eef1f0134afb81fef94020351be4fe1d6681aadf9c5e862af6602af64ef", + "sha256:d42f9c36d06440e34226e8bd65ff065ca0963aeecada587b937011efa02cdc9d", + "sha256:d5b47c440210c5d1d67e1cf434124e0b5c395eee1f5806fdd89b553ed1acd0a3", + "sha256:d9b4a8148c57ecac25a16b0e11798cbe88edf5237b0df99973687dd866f05e1b", + "sha256:daf43a3d1ea699402c5a850e5313680ac355b4adc9770cd5cfc2940e7861f1bf", + "sha256:dbdc15f0c81611925f382dfa97b3bd0bc2c1ce19d4fe50482cb0ddc12ba30020", + "sha256:deaa09cd492e24fd9b15296844c0ad1b3c976da7907e1c1ed3a0ad21dded6f76", + "sha256:e37242f5324ffd9f7ba5acf96d774f9276aa62a966c0bad8dae692deebec7716", + "sha256:ed2cf9ed4e8ebc3b754d398cba12f24359f018b416c380f577bbae112ca52fc9", + "sha256:f2712c5179f40af9ddc8f6727f2bd910ea0eb50206daea75f58ddd9fa3f715bb", + "sha256:f4ca91d61a4bf61b0f2228f24bbfa6a9facd5f8af03759fe2a655c50ae2c6610", + "sha256:f6b3dfc7661f8842babd8ea07e9897fe3d9b69a1d7e5fbb743e4160f9387833b" ], "markers": "python_version == '3.11'", - "version": "==2.2.2" + "version": "==2.2.3" }, "paho-mqtt": { "hashes": [ @@ -655,11 +660,11 @@ }, "pydantic": { "hashes": [ - "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff", - "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53" + "sha256:427d664bf0b8a2b34ff5dd0f5a18df00591adcee7198fbd71981054cef37b584", + "sha256:ca5daa827cce33de7a42be142548b0096bf05a7e7b365aebfa5f8eeec7128236" ], "index": "pypi", - "version": "==2.10.5" + "version": "==2.10.6" }, "pydantic-core": { "hashes": [ @@ -777,10 +782,10 @@ }, "pytz": { "hashes": [ - "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a", - "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725" + "sha256:89dd22dca55b46eac6eda23b2d72721bf1bdfef212645d81513ef5d03038de57", + "sha256:c2db42be2a2518b28e65f9207c4d05e6ff547d1efa4086469ef855e4ab70178e" ], - "version": "==2024.2" + "version": "==2025.1" }, "requests": { "hashes": [ @@ -936,13 +941,21 @@ "markers": "python_version >= '3.10'", "version": "==1.0.0" }, + "anyio": { + "hashes": [ + "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a", + "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a" + ], + "markers": "python_version >= '3.9'", + "version": "==4.8.0" + }, "babel": { "hashes": [ - "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", - "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316" + "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", + "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2" ], "markers": "python_version >= '3.8'", - "version": "==2.16.0" + "version": "==2.17.0" }, "backports.tarfile": { "hashes": [ @@ -954,11 +967,11 @@ }, "beautifulsoup4": { "hashes": [ - "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051", - "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed" + "sha256:1bd32405dacc920b42b83ba01644747ed77456a65760e285fbc47633ceddaf8b", + "sha256:99045d7d3f08f91f0d656bc9b7efbae189426cd913d830294a15eefa0ea4df16" ], - "markers": "python_full_version >= '3.6.0'", - "version": "==4.12.3" + "markers": "python_full_version >= '3.7.0'", + "version": "==4.13.3" }, "build": { "hashes": [ @@ -970,11 +983,11 @@ }, "certifi": { "hashes": [ - "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56", - "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db" + "sha256:3d5da6925056f6f18f119200434a4780a94263f10d1c21d032a6f6b2baa20651", + "sha256:ca78db4565a652026a4db2bcdf68f2fb589ea80d0be70e03929ed730746b84fe" ], "markers": "python_version >= '3.6'", - "version": "==2024.12.14" + "version": "==2025.1.31" }, "cffi": { "hashes": [ @@ -1149,106 +1162,109 @@ }, "coverage": { "hashes": [ - "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9", - "sha256:0aa9692b4fdd83a4647eeb7db46410ea1322b5ed94cd1715ef09d1d5922ba87f", - "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273", - "sha256:0d7a2bf79378d8fb8afaa994f91bfd8215134f8631d27eba3e0e2c13546ce994", - "sha256:0f460286cb94036455e703c66988851d970fdfd8acc2a1122ab7f4f904e4029e", - "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50", - "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e", - "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e", - "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c", - "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853", - "sha256:299e91b274c5c9cdb64cbdf1b3e4a8fe538a7a86acdd08fae52301b28ba297f8", - "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8", - "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe", - "sha256:32ee6d8491fcfc82652a37109f69dee9a830e9379166cb73c16d8dc5c2915165", - "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb", - "sha256:457574f4599d2b00f7f637a0700a6422243b3565509457b2dbd3f50703e11f59", - "sha256:489a01f94aa581dbd961f306e37d75d4ba16104bbfa2b0edb21d29b73be83609", - "sha256:4bcc276261505d82f0ad426870c3b12cb177752834a633e737ec5ee79bbdff18", - "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098", - "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd", - "sha256:4eea95ef275de7abaef630c9b2c002ffbc01918b726a39f5a4353916ec72d2f3", - "sha256:507a20fc863cae1d5720797761b42d2d87a04b3e5aeb682ef3b7332e90598f43", - "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d", - "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359", - "sha256:59af35558ba08b758aec4d56182b222976330ef8d2feacbb93964f576a7e7a90", - "sha256:5c912978f7fbf47ef99cec50c4401340436d200d41d714c7a4766f377c5b7b78", - "sha256:656c82b8a0ead8bba147de9a89bda95064874c91a3ed43a00e687f23cc19d53a", - "sha256:6713ba4b4ebc330f3def51df1d5d38fad60b66720948112f114968feb52d3f99", - "sha256:675cefc4c06e3b4c876b85bfb7c59c5e2218167bbd4da5075cbe3b5790a28988", - "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2", - "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0", - "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694", - "sha256:7bbd8c8f1b115b892e34ba66a097b915d3871db7ce0e6b9901f462ff3a975377", - "sha256:7ed2f37cfce1ce101e6dffdfd1c99e729dd2ffc291d02d3e2d0af8b53d13840d", - "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23", - "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312", - "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf", - "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6", - "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b", - "sha256:a01ec4af7dfeb96ff0078ad9a48810bb0cc8abcb0115180c6013a6b26237626c", - "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690", - "sha256:a3b204c11e2b2d883946fe1d97f89403aa1811df28ce0447439178cc7463448a", - "sha256:a534738b47b0de1995f85f582d983d94031dffb48ab86c95bdf88dc62212142f", - "sha256:a5e37dc41d57ceba70956fa2fc5b63c26dba863c946ace9705f8eca99daecdc4", - "sha256:aa744da1820678b475e4ba3dfd994c321c5b13381d1041fe9c608620e6676e25", - "sha256:ab32947f481f7e8c763fa2c92fd9f44eeb143e7610c4ca9ecd6a36adab4081bd", - "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852", - "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0", - "sha256:bc67deb76bc3717f22e765ab3e07ee9c7a5e26b9019ca19a3b063d9f4b874244", - "sha256:c0b1818063dc9e9d838c09e3a473c1422f517889436dd980f5d721899e66f315", - "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078", - "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0", - "sha256:ccc2b70a7ed475c68ceb548bf69cec1e27305c1c2606a5eb7c3afff56a1b3b27", - "sha256:d37a84878285b903c0fe21ac8794c6dab58150e9359f1aaebbeddd6412d53132", - "sha256:e2f0280519e42b0a17550072861e0bc8a80a0870de260f9796157d3fca2733c5", - "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247", - "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022", - "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b", - "sha256:ea3c8f04b3e4af80e17bab607c386a830ffc2fb88a5484e1df756478cf70d1d3", - "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18", - "sha256:f4f620668dbc6f5e909a0946a877310fb3d57aea8198bde792aae369ee1c23b5", - "sha256:fd34e7b3405f0cc7ab03d54a334c17a9e802897580d964bd8c2001f4b9fd488f" + "sha256:00b2086892cf06c7c2d74983c9595dc511acca00665480b3ddff749ec4fb2a95", + "sha256:0533adc29adf6a69c1baa88c3d7dbcaadcffa21afbed3ca7a225a440e4744bf9", + "sha256:06097c7abfa611c91edb9e6920264e5be1d6ceb374efb4986f38b09eed4cb2fe", + "sha256:07e92ae5a289a4bc4c0aae710c0948d3c7892e20fd3588224ebe242039573bf0", + "sha256:0a9d8be07fb0832636a0f72b80d2a652fe665e80e720301fb22b191c3434d924", + "sha256:0e549f54ac5f301e8e04c569dfdb907f7be71b06b88b5063ce9d6953d2d58574", + "sha256:0ef01d70198431719af0b1f5dcbefc557d44a190e749004042927b2a3fed0702", + "sha256:0f16f44025c06792e0fb09571ae454bcc7a3ec75eeb3c36b025eccf501b1a4c3", + "sha256:14d47376a4f445e9743f6c83291e60adb1b127607a3618e3185bbc8091f0467b", + "sha256:1a936309a65cc5ca80fa9f20a442ff9e2d06927ec9a4f54bcba9c14c066323f2", + "sha256:1ceeb90c3eda1f2d8c4c578c14167dbd8c674ecd7d38e45647543f19839dd6ea", + "sha256:1f7ffa05da41754e20512202c866d0ebfc440bba3b0ed15133070e20bf5aeb5f", + "sha256:200e10beb6ddd7c3ded322a4186313d5ca9e63e33d8fab4faa67ef46d3460af3", + "sha256:220fa6c0ad7d9caef57f2c8771918324563ef0d8272c94974717c3909664e674", + "sha256:2251fabcfee0a55a8578a9d29cecfee5f2de02f11530e7d5c5a05859aa85aee9", + "sha256:2458f275944db8129f95d91aee32c828a408481ecde3b30af31d552c2ce284a0", + "sha256:299cf973a7abff87a30609879c10df0b3bfc33d021e1adabc29138a48888841e", + "sha256:2b996819ced9f7dbb812c701485d58f261bef08f9b85304d41219b1496b591ef", + "sha256:3688b99604a24492bcfe1c106278c45586eb819bf66a654d8a9a1433022fb2eb", + "sha256:3a1e465f398c713f1b212400b4e79a09829cd42aebd360362cd89c5bdc44eb87", + "sha256:488c27b3db0ebee97a830e6b5a3ea930c4a6e2c07f27a5e67e1b3532e76b9ef1", + "sha256:48cfc4641d95d34766ad41d9573cc0f22a48aa88d22657a1fe01dca0dbae4de2", + "sha256:4b467a8c56974bf06e543e69ad803c6865249d7a5ccf6980457ed2bc50312703", + "sha256:53c56358d470fa507a2b6e67a68fd002364d23c83741dbc4c2e0680d80ca227e", + "sha256:5d1095bbee1851269f79fd8e0c9b5544e4c00c0c24965e66d8cba2eb5bb535fd", + "sha256:641dfe0ab73deb7069fb972d4d9725bf11c239c309ce694dd50b1473c0f641c3", + "sha256:64cbb1a3027c79ca6310bf101014614f6e6e18c226474606cf725238cf5bc2d4", + "sha256:66fe626fd7aa5982cdebad23e49e78ef7dbb3e3c2a5960a2b53632f1f703ea45", + "sha256:676f92141e3c5492d2a1596d52287d0d963df21bf5e55c8b03075a60e1ddf8aa", + "sha256:69e62c5034291c845fc4df7f8155e8544178b6c774f97a99e2734b05eb5bed31", + "sha256:704c8c8c6ce6569286ae9622e534b4f5b9759b6f2cd643f1c1a61f666d534fe8", + "sha256:78f5243bb6b1060aed6213d5107744c19f9571ec76d54c99cc15938eb69e0e86", + "sha256:79cac3390bfa9836bb795be377395f28410811c9066bc4eefd8015258a7578c6", + "sha256:7ae6eabf519bc7871ce117fb18bf14e0e343eeb96c377667e3e5dd12095e0288", + "sha256:7e39e845c4d764208e7b8f6a21c541ade741e2c41afabdfa1caa28687a3c98cf", + "sha256:8161d9fbc7e9fe2326de89cd0abb9f3599bccc1287db0aba285cb68d204ce929", + "sha256:8bec2ac5da793c2685ce5319ca9bcf4eee683b8a1679051f8e6ec04c4f2fd7dc", + "sha256:959244a17184515f8c52dcb65fb662808767c0bd233c1d8a166e7cf74c9ea985", + "sha256:9b148068e881faa26d878ff63e79650e208e95cf1c22bd3f77c3ca7b1d9821a3", + "sha256:aa6f302a3a0b5f240ee201297fff0bbfe2fa0d415a94aeb257d8b461032389bd", + "sha256:ace9048de91293e467b44bce0f0381345078389814ff6e18dbac8fdbf896360e", + "sha256:ad7525bf0241e5502168ae9c643a2f6c219fa0a283001cee4cf23a9b7da75879", + "sha256:b01a840ecc25dce235ae4c1b6a0daefb2a203dba0e6e980637ee9c2f6ee0df57", + "sha256:b076e625396e787448d27a411aefff867db2bffac8ed04e8f7056b07024eed5a", + "sha256:b172f8e030e8ef247b3104902cc671e20df80163b60a203653150d2fc204d1ad", + "sha256:b1f097878d74fe51e1ddd1be62d8e3682748875b461232cf4b52ddc6e6db0bba", + "sha256:b95574d06aa9d2bd6e5cc35a5bbe35696342c96760b69dc4287dbd5abd4ad51d", + "sha256:bda1c5f347550c359f841d6614fb8ca42ae5cb0b74d39f8a1e204815ebe25750", + "sha256:cec6b9ce3bd2b7853d4a4563801292bfee40b030c05a3d29555fd2a8ee9bd68c", + "sha256:d1a987778b9c71da2fc8948e6f2656da6ef68f59298b7e9786849634c35d2c3c", + "sha256:d74c08e9aaef995f8c4ef6d202dbd219c318450fe2a76da624f2ebb9c8ec5d9f", + "sha256:e18aafdfb3e9ec0d261c942d35bd7c28d031c5855dadb491d2723ba54f4c3015", + "sha256:e216c5c45f89ef8971373fd1c5d8d1164b81f7f5f06bbf23c37e7908d19e8558", + "sha256:e695df2c58ce526eeab11a2e915448d3eb76f75dffe338ea613c1201b33bab2f", + "sha256:e7575ab65ca8399c8c4f9a7d61bbd2d204c8b8e447aab9d355682205c9dd948d", + "sha256:e995b3b76ccedc27fe4f477b349b7d64597e53a43fc2961db9d3fbace085d69d", + "sha256:ea31689f05043d520113e0552f039603c4dd71fa4c287b64cb3606140c66f425", + "sha256:eb5507795caabd9b2ae3f1adc95f67b1104971c22c624bb354232d65c4fc90b3", + "sha256:eb8668cfbc279a536c633137deeb9435d2962caec279c3f8cf8b91fff6ff8953", + "sha256:ecea0c38c9079570163d663c0433a9af4094a60aafdca491c6a3d248c7432827", + "sha256:f25d8b92a4e31ff1bd873654ec367ae811b3a943583e05432ea29264782dc32c", + "sha256:f60a297c3987c6c02ffb29effc70eadcbb412fe76947d394a1091a3615948e2f", + "sha256:f973643ef532d4f9be71dd88cf7588936685fdb576d93a79fe9f65bc337d9d73" ], "index": "pypi", - "version": "==7.6.10" + "version": "==7.6.12" }, "cryptography": { "hashes": [ - "sha256:1923cb251c04be85eec9fda837661c67c1049063305d6be5721643c22dd4e2b7", - "sha256:37d76e6863da3774cd9db5b409a9ecfd2c71c981c38788d3fcfaf177f447b731", - "sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b", - "sha256:404fdc66ee5f83a1388be54300ae978b2efd538018de18556dde92575e05defc", - "sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543", - "sha256:60eb32934076fa07e4316b7b2742fa52cbb190b42c2df2863dbc4230a0a9b385", - "sha256:62901fb618f74d7d81bf408c8719e9ec14d863086efe4185afd07c352aee1d2c", - "sha256:660cb7312a08bc38be15b696462fa7cc7cd85c3ed9c576e81f4dc4d8b2b31591", - "sha256:708ee5f1bafe76d041b53a4f95eb28cdeb8d18da17e597d46d7833ee59b97ede", - "sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb", - "sha256:831c3c4d0774e488fdc83a1923b49b9957d33287de923d58ebd3cec47a0ae43f", - "sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123", - "sha256:8b3e6eae66cf54701ee7d9c83c30ac0a1e3fa17be486033000f2a73a12ab507c", - "sha256:9abcc2e083cbe8dde89124a47e5e53ec38751f0d7dfd36801008f316a127d7ba", - "sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c", - "sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285", - "sha256:abc998e0c0eee3c8a1904221d3f67dcfa76422b23620173e28c11d3e626c21bd", - "sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092", - "sha256:be4ce505894d15d5c5037167ffb7f0ae90b7be6f2a98f9a5c3442395501c32fa", - "sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289", - "sha256:cd4e834f340b4293430701e772ec543b0fbe6c2dea510a5286fe0acabe153a02", - "sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64", - "sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053", - "sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417", - "sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e", - "sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e", - "sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7", - "sha256:f5e7cb1e5e56ca0933b4873c0220a78b773b24d40d186b6738080b73d3d0a756", - "sha256:f677e1268c4e23420c3acade68fac427fffcb8d19d7df95ed7ad17cdef8404f4" + "sha256:00918d859aa4e57db8299607086f793fa7813ae2ff5a4637e318a25ef82730f7", + "sha256:1e8d181e90a777b63f3f0caa836844a1182f1f265687fac2115fcf245f5fbec3", + "sha256:1f9a92144fa0c877117e9748c74501bea842f93d21ee00b0cf922846d9d0b183", + "sha256:21377472ca4ada2906bc313168c9dc7b1d7ca417b63c1c3011d0c74b7de9ae69", + "sha256:24979e9f2040c953a94bf3c6782e67795a4c260734e5264dceea65c8f4bae64a", + "sha256:2a46a89ad3e6176223b632056f321bc7de36b9f9b93b2cc1cccf935a3849dc62", + "sha256:322eb03ecc62784536bc173f1483e76747aafeb69c8728df48537eb431cd1911", + "sha256:436df4f203482f41aad60ed1813811ac4ab102765ecae7a2bbb1dbb66dcff5a7", + "sha256:4f422e8c6a28cf8b7f883eb790695d6d45b0c385a2583073f3cec434cc705e1a", + "sha256:53f23339864b617a3dfc2b0ac8d5c432625c80014c25caac9082314e9de56f41", + "sha256:5fed5cd6102bb4eb843e3315d2bf25fede494509bddadb81e03a859c1bc17b83", + "sha256:610a83540765a8d8ce0f351ce42e26e53e1f774a6efb71eb1b41eb01d01c3d12", + "sha256:6c8acf6f3d1f47acb2248ec3ea261171a671f3d9428e34ad0357148d492c7864", + "sha256:6f76fdd6fd048576a04c5210d53aa04ca34d2ed63336d4abd306d0cbe298fddf", + "sha256:72198e2b5925155497a5a3e8c216c7fb3e64c16ccee11f0e7da272fa93b35c4c", + "sha256:887143b9ff6bad2b7570da75a7fe8bbf5f65276365ac259a5d2d5147a73775f2", + "sha256:888fcc3fce0c888785a4876ca55f9f43787f4c5c1cc1e2e0da71ad481ff82c5b", + "sha256:8e6a85a93d0642bd774460a86513c5d9d80b5c002ca9693e63f6e540f1815ed0", + "sha256:94f99f2b943b354a5b6307d7e8d19f5c423a794462bde2bf310c770ba052b1c4", + "sha256:9b336599e2cb77b1008cb2ac264b290803ec5e8e89d618a5e978ff5eb6f715d9", + "sha256:a2d8a7045e1ab9b9f803f0d9531ead85f90c5f2859e653b61497228b18452008", + "sha256:b8272f257cf1cbd3f2e120f14c68bff2b6bdfcc157fafdee84a1b795efd72862", + "sha256:bf688f615c29bfe9dfc44312ca470989279f0e94bb9f631f85e3459af8efc009", + "sha256:d9c5b9f698a83c8bd71e0f4d3f9f839ef244798e5ffe96febfa9714717db7af7", + "sha256:dd7c7e2d71d908dc0f8d2027e1604102140d84b155e658c20e8ad1304317691f", + "sha256:df978682c1504fc93b3209de21aeabf2375cb1571d4e61907b3e7a2540e83026", + "sha256:e403f7f766ded778ecdb790da786b418a9f2394f36e8cc8b796cc056ab05f44f", + "sha256:eb3889330f2a4a148abead555399ec9a32b13b7c8ba969b72d8e500eb7ef84cd", + "sha256:f4daefc971c2d1f82f03097dc6f216744a6cd2ac0f04c68fb935ea2ba2a0d420", + "sha256:f51f5705ab27898afda1aaa430f34ad90dc117421057782022edf0600bec5f14", + "sha256:fd0ee90072861e276b0ff08bd627abec29e32a53b2be44e41dbcdf87cbee2b00" ], "markers": "python_version >= '3.7' and python_full_version not in '3.9.0, 3.9.1'", - "version": "==44.0.0" + "version": "==44.0.1" }, "docutils": { "hashes": [ @@ -1266,6 +1282,30 @@ "index": "pypi", "version": "==2024.8.6" }, + "h11": { + "hashes": [ + "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d", + "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761" + ], + "markers": "python_version >= '3.7'", + "version": "==0.14.0" + }, + "httpcore": { + "hashes": [ + "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c", + "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd" + ], + "markers": "python_version >= '3.8'", + "version": "==1.0.7" + }, + "httpx": { + "hashes": [ + "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", + "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad" + ], + "index": "pypi", + "version": "==0.28.1" + }, "id": { "hashes": [ "sha256:292cb8a49eacbbdbce97244f47a97b4c62540169c976552e497fd57df0734c1d", @@ -1639,6 +1679,14 @@ "markers": "python_full_version >= '3.8.0'", "version": "==13.9.4" }, + "roman-numerals-py": { + "hashes": [ + "sha256:91199c4373658c03d87d9fe004f4a5120a20f6cb192be745c2377cce274ef41c", + "sha256:a1421ce66b3eab7e8735065458de3fa5c4a46263d50f9f4ac8f0e5e7701dd125" + ], + "markers": "python_version >= '3.9'", + "version": "==3.0.0" + }, "secretstorage": { "hashes": [ "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77", @@ -1655,6 +1703,14 @@ "index": "pypi", "version": "==75.8.0" }, + "sniffio": { + "hashes": [ + "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" + ], + "markers": "python_version >= '3.7'", + "version": "==1.3.1" + }, "snowballstemmer": { "hashes": [ "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", @@ -1672,11 +1728,11 @@ }, "sphinx": { "hashes": [ - "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", - "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927" + "sha256:3c0a40ff71ace28b316bde7387d93b9249a3688c202181519689b66d5d0aed53", + "sha256:5b0067853d6e97f3fa87563e3404ebd008fce03525b55b25da90706764da6215" ], - "markers": "python_version >= '3.10'", - "version": "==8.1.3" + "markers": "python_version >= '3.11'", + "version": "==8.2.0" }, "sphinx-basic-ng": { "hashes": [ @@ -1742,6 +1798,14 @@ "index": "pypi", "version": "==6.1.0" }, + "typing-extensions": { + "hashes": [ + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + ], + "markers": "python_version >= '3.8'", + "version": "==4.12.2" + }, "urllib3": { "hashes": [ "sha256:1cee9ad369867bfdbbb48b7dd50374c0967a0bb7710050facf0dd6911440e3df", diff --git a/lib/python/coverage.xml b/lib/python/coverage.xml new file mode 100644 index 0000000000000000000000000000000000000000..ac21b0bc1ed6b9f659ba578333c89e481c34ca8f --- /dev/null +++ b/lib/python/coverage.xml @@ -0,0 +1,1866 @@ +<?xml version="1.0" ?> +<coverage version="7.6.10" timestamp="1740478405603" lines-valid="1820" lines-covered="1743" line-rate="0.9577" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0"> + <!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.6.10 --> + <!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --> + <sources> + <source>/home/mweise/Projects/fda-services/lib/python</source> + </sources> + <packages> + <package name="dbrepo" line-rate="0.9134" branch-rate="0" complexity="0"> + <classes> + <class name="RestClient.py" filename="dbrepo/RestClient.py" complexity="0" line-rate="0.9248" branch-rate="0"> + <methods/> + <lines> + <line number="1" hits="1"/> + <line number="2" hits="1"/> + <line number="3" hits="1"/> + <line number="5" hits="1"/> + <line number="6" hits="1"/> + <line number="7" hits="1"/> + <line number="9" hits="1"/> + <line number="10" hits="1"/> + <line number="11" hits="1"/> + <line number="15" hits="1"/> + <line number="19" hits="1"/> + <line number="31" hits="1"/> + <line number="32" hits="1"/> + <line number="33" hits="1"/> + <line number="34" hits="1"/> + <line number="36" hits="1"/> + <line number="41" hits="1"/> + <line number="42" hits="1"/> + <line number="43" hits="1"/> + <line number="44" hits="1"/> + <line number="45" hits="1"/> + <line number="47" hits="1"/> + <line number="48" hits="1"/> + <line number="51" hits="1"/> + <line number="53" hits="1"/> + <line number="54" hits="1"/> + <line number="55" hits="1"/> + <line number="56" hits="1"/> + <line number="57" hits="1"/> + <line number="58" hits="1"/> + <line number="59" hits="1"/> + <line number="60" hits="1"/> + <line number="61" hits="1"/> + <line number="62" hits="1"/> + <line number="63" hits="1"/> + <line number="64" hits="1"/> + <line number="66" hits="1"/> + <line number="67" hits="1"/> + <line number="68" hits="1"/> + <line number="69" hits="1"/> + <line number="70" hits="1"/> + <line number="71" hits="1"/> + <line number="72" hits="1"/> + <line number="73" hits="1"/> + <line number="74" hits="1"/> + <line number="75" hits="1"/> + <line number="76" hits="1"/> + <line number="77" hits="1"/> + <line number="80" hits="1"/> + <line number="86" hits="1"/> + <line number="87" hits="1"/> + <line number="88" hits="1"/> + <line number="89" hits="1"/> + <line number="90" hits="1"/> + <line number="92" hits="1"/> + <line number="100" hits="1"/> + <line number="101" hits="1"/> + <line number="102" hits="1"/> + <line number="103" hits="1"/> + <line number="104" hits="1"/> + <line number="105" hits="1"/> + <line number="108" hits="1"/> + <line number="116" hits="1"/> + <line number="117" hits="1"/> + <line number="118" hits="1"/> + <line number="119" hits="1"/> + <line number="120" hits="1"/> + <line number="121" hits="1"/> + <line number="124" hits="1"/> + <line number="134" hits="1"/> + <line number="135" hits="1"/> + <line number="136" hits="1"/> + <line number="137" hits="1"/> + <line number="138" hits="1"/> + <line number="139" hits="1"/> + <line number="140" hits="1"/> + <line number="141" hits="1"/> + <line number="142" hits="1"/> + <line number="143" hits="1"/> + <line number="146" hits="1"/> + <line number="166" hits="1"/> + <line number="167" hits="1"/> + <line number="170" hits="1"/> + <line number="171" hits="1"/> + <line number="172" hits="1"/> + <line number="173" hits="1"/> + <line number="174" hits="1"/> + <line number="175" hits="1"/> + <line number="176" hits="1"/> + <line number="177" hits="1"/> + <line number="178" hits="1"/> + <line number="179" hits="1"/> + <line number="182" hits="1"/> + <line number="190" hits="1"/> + <line number="191" hits="1"/> + <line number="192" hits="1"/> + <line number="193" hits="1"/> + <line number="194" hits="1"/> + <line number="195" hits="1"/> + <line number="198" hits="1"/> + <line number="207" hits="1"/> + <line number="208" hits="1"/> + <line number="209" hits="1"/> + <line number="210" hits="1"/> + <line number="211" hits="1"/> + <line number="212" hits="1"/> + <line number="213" hits="1"/> + <line number="214" hits="1"/> + <line number="217" hits="1"/> + <line number="225" hits="1"/> + <line number="226" hits="1"/> + <line number="227" hits="1"/> + <line number="228" hits="1"/> + <line number="229" hits="1"/> + <line number="230" hits="1"/> + <line number="233" hits="1"/> + <line number="240" hits="1"/> + <line number="241" hits="1"/> + <line number="242" hits="1"/> + <line number="243" hits="1"/> + <line number="244" hits="1"/> + <line number="247" hits="1"/> + <line number="258" hits="1"/> + <line number="259" hits="1"/> + <line number="260" hits="1"/> + <line number="261" hits="1"/> + <line number="262" hits="1"/> + <line number="263" hits="1"/> + <line number="264" hits="1"/> + <line number="265" hits="1"/> + <line number="266" hits="1"/> + <line number="267" hits="1"/> + <line number="270" hits="1"/> + <line number="290" hits="1"/> + <line number="291" hits="1"/> + <line number="294" hits="1"/> + <line number="295" hits="1"/> + <line number="296" hits="1"/> + <line number="297" hits="1"/> + <line number="298" hits="1"/> + <line number="299" hits="1"/> + <line number="300" hits="1"/> + <line number="301" hits="1"/> + <line number="302" hits="1"/> + <line number="303" hits="1"/> + <line number="304" hits="1"/> + <line number="305" hits="1"/> + <line number="306" hits="1"/> + <line number="307" hits="1"/> + <line number="308" hits="1"/> + <line number="309" hits="1"/> + <line number="312" hits="1"/> + <line number="336" hits="1"/> + <line number="337" hits="1"/> + <line number="342" hits="1"/> + <line number="343" hits="1"/> + <line number="344" hits="1"/> + <line number="345" hits="1"/> + <line number="346" hits="1"/> + <line number="347" hits="1"/> + <line number="348" hits="1"/> + <line number="349" hits="1"/> + <line number="350" hits="1"/> + <line number="351" hits="1"/> + <line number="352" hits="1"/> + <line number="353" hits="1"/> + <line number="356" hits="1"/> + <line number="373" hits="1"/> + <line number="374" hits="1"/> + <line number="376" hits="1"/> + <line number="377" hits="1"/> + <line number="378" hits="1"/> + <line number="379" hits="1"/> + <line number="380" hits="1"/> + <line number="381" hits="1"/> + <line number="382" hits="1"/> + <line number="383" hits="1"/> + <line number="384" hits="1"/> + <line number="385" hits="1"/> + <line number="386" hits="1"/> + <line number="388" hits="1"/> + <line number="389" hits="1"/> + <line number="390" hits="1"/> + <line number="393" hits="1"/> + <line number="409" hits="1"/> + <line number="410" hits="1"/> + <line number="411" hits="1"/> + <line number="412" hits="1"/> + <line number="413" hits="1"/> + <line number="414" hits="1"/> + <line number="415" hits="1"/> + <line number="416" hits="1"/> + <line number="417" hits="1"/> + <line number="418" hits="1"/> + <line number="419" hits="1"/> + <line number="420" hits="1"/> + <line number="421" hits="1"/> + <line number="423" hits="1"/> + <line number="424" hits="1"/> + <line number="426" hits="1"/> + <line number="429" hits="1"/> + <line number="444" hits="1"/> + <line number="445" hits="1"/> + <line number="446" hits="1"/> + <line number="447" hits="1"/> + <line number="448" hits="1"/> + <line number="449" hits="1"/> + <line number="450" hits="1"/> + <line number="451" hits="1"/> + <line number="452" hits="1"/> + <line number="453" hits="1"/> + <line number="454" hits="1"/> + <line number="455" hits="1"/> + <line number="456" hits="1"/> + <line number="457" hits="1"/> + <line number="458" hits="1"/> + <line number="459" hits="1"/> + <line number="460" hits="1"/> + <line number="462" hits="1"/> + <line number="463" hits="1"/> + <line number="464" hits="1"/> + <line number="467" hits="1"/> + <line number="491" hits="1"/> + <line number="492" hits="1"/> + <line number="495" hits="1"/> + <line number="496" hits="1"/> + <line number="497" hits="1"/> + <line number="498" hits="1"/> + <line number="499" hits="1"/> + <line number="500" hits="1"/> + <line number="501" hits="1"/> + <line number="502" hits="1"/> + <line number="503" hits="1"/> + <line number="504" hits="1"/> + <line number="505" hits="1"/> + <line number="506" hits="1"/> + <line number="507" hits="1"/> + <line number="508" hits="1"/> + <line number="509" hits="1"/> + <line number="510" hits="1"/> + <line number="513" hits="1"/> + <line number="525" hits="1"/> + <line number="526" hits="1"/> + <line number="527" hits="1"/> + <line number="528" hits="1"/> + <line number="529" hits="1"/> + <line number="530" hits="1"/> + <line number="531" hits="1"/> + <line number="532" hits="1"/> + <line number="533" hits="1"/> + <line number="534" hits="1"/> + <line number="537" hits="1"/> + <line number="550" hits="1"/> + <line number="551" hits="1"/> + <line number="552" hits="1"/> + <line number="553" hits="1"/> + <line number="554" hits="1"/> + <line number="555" hits="1"/> + <line number="556" hits="1"/> + <line number="557" hits="1"/> + <line number="558" hits="1"/> + <line number="559" hits="1"/> + <line number="562" hits="1"/> + <line number="576" hits="1"/> + <line number="577" hits="1"/> + <line number="578" hits="1"/> + <line number="579" hits="1"/> + <line number="580" hits="1"/> + <line number="581" hits="1"/> + <line number="582" hits="1"/> + <line number="583" hits="1"/> + <line number="584" hits="1"/> + <line number="585" hits="1"/> + <line number="586" hits="1"/> + <line number="587" hits="1"/> + <line number="588" hits="1"/> + <line number="589" hits="1"/> + <line number="590" hits="1"/> + <line number="593" hits="1"/> + <line number="606" hits="1"/> + <line number="607" hits="1"/> + <line number="608" hits="1"/> + <line number="609" hits="1"/> + <line number="610" hits="1"/> + <line number="611" hits="1"/> + <line number="612" hits="1"/> + <line number="613" hits="1"/> + <line number="614" hits="1"/> + <line number="615" hits="1"/> + <line number="616" hits="1"/> + <line number="619" hits="1"/> + <line number="633" hits="1"/> + <line number="634" hits="1"/> + <line number="635" hits="1"/> + <line number="636" hits="1"/> + <line number="637" hits="1"/> + <line number="638" hits="1"/> + <line number="639" hits="1"/> + <line number="640" hits="1"/> + <line number="641" hits="1"/> + <line number="642" hits="1"/> + <line number="643" hits="1"/> + <line number="644" hits="1"/> + <line number="645" hits="1"/> + <line number="646" hits="1"/> + <line number="649" hits="1"/> + <line number="660" hits="1"/> + <line number="661" hits="1"/> + <line number="662" hits="1"/> + <line number="663" hits="1"/> + <line number="664" hits="1"/> + <line number="665" hits="1"/> + <line number="666" hits="1"/> + <line number="667" hits="1"/> + <line number="670" hits="1"/> + <line number="683" hits="1"/> + <line number="684" hits="1"/> + <line number="685" hits="1"/> + <line number="686" hits="1"/> + <line number="687" hits="1"/> + <line number="688" hits="1"/> + <line number="689" hits="1"/> + <line number="690" hits="1"/> + <line number="691" hits="1"/> + <line number="692" hits="1"/> + <line number="695" hits="1"/> + <line number="710" hits="1"/> + <line number="711" hits="1"/> + <line number="713" hits="1"/> + <line number="714" hits="1"/> + <line number="715" hits="1"/> + <line number="716" hits="1"/> + <line number="717" hits="1"/> + <line number="718" hits="1"/> + <line number="719" hits="1"/> + <line number="720" hits="1"/> + <line number="723" hits="1"/> + <line number="743" hits="1"/> + <line number="744" hits="1"/> + <line number="747" hits="1"/> + <line number="748" hits="1"/> + <line number="749" hits="1"/> + <line number="750" hits="1"/> + <line number="751" hits="1"/> + <line number="752" hits="1"/> + <line number="753" hits="1"/> + <line number="754" hits="1"/> + <line number="755" hits="1"/> + <line number="756" hits="1"/> + <line number="757" hits="1"/> + <line number="758" hits="1"/> + <line number="759" hits="1"/> + <line number="760" hits="1"/> + <line number="761" hits="1"/> + <line number="762" hits="1"/> + <line number="765" hits="1"/> + <line number="780" hits="1"/> + <line number="781" hits="1"/> + <line number="782" hits="1"/> + <line number="783" hits="1"/> + <line number="784" hits="1"/> + <line number="785" hits="1"/> + <line number="786" hits="1"/> + <line number="787" hits="1"/> + <line number="788" hits="1"/> + <line number="789" hits="1"/> + <line number="790" hits="1"/> + <line number="791" hits="1"/> + <line number="792" hits="1"/> + <line number="793" hits="1"/> + <line number="794" hits="1"/> + <line number="795" hits="1"/> + <line number="796" hits="1"/> + <line number="799" hits="1"/> + <line number="817" hits="1"/> + <line number="818" hits="1"/> + <line number="819" hits="1"/> + <line number="820" hits="1"/> + <line number="821" hits="1"/> + <line number="822" hits="1"/> + <line number="823" hits="1"/> + <line number="824" hits="1"/> + <line number="825" hits="1"/> + <line number="826" hits="1"/> + <line number="827" hits="1"/> + <line number="828" hits="1"/> + <line number="829" hits="1"/> + <line number="830" hits="1"/> + <line number="831" hits="1"/> + <line number="832" hits="1"/> + <line number="833" hits="1"/> + <line number="834" hits="1"/> + <line number="836" hits="1"/> + <line number="839" hits="1"/> + <line number="858" hits="1"/> + <line number="859" hits="1"/> + <line number="860" hits="1"/> + <line number="861" hits="1"/> + <line number="862" hits="1"/> + <line number="863" hits="1"/> + <line number="864" hits="1"/> + <line number="865" hits="1"/> + <line number="866" hits="1"/> + <line number="867" hits="1"/> + <line number="868" hits="1"/> + <line number="869" hits="1"/> + <line number="870" hits="1"/> + <line number="871" hits="1"/> + <line number="872" hits="1"/> + <line number="873" hits="1"/> + <line number="874" hits="1"/> + <line number="875" hits="1"/> + <line number="877" hits="1"/> + <line number="880" hits="1"/> + <line number="894" hits="1"/> + <line number="895" hits="1"/> + <line number="896" hits="1"/> + <line number="897" hits="1"/> + <line number="898" hits="1"/> + <line number="899" hits="1"/> + <line number="900" hits="1"/> + <line number="901" hits="1"/> + <line number="902" hits="1"/> + <line number="903" hits="1"/> + <line number="904" hits="1"/> + <line number="905" hits="1"/> + <line number="907" hits="1"/> + <line number="910" hits="1"/> + <line number="926" hits="0"/> + <line number="927" hits="0"/> + <line number="928" hits="0"/> + <line number="929" hits="0"/> + <line number="932" hits="0"/> + <line number="933" hits="0"/> + <line number="934" hits="0"/> + <line number="935" hits="0"/> + <line number="936" hits="0"/> + <line number="937" hits="0"/> + <line number="938" hits="0"/> + <line number="939" hits="0"/> + <line number="940" hits="0"/> + <line number="941" hits="0"/> + <line number="943" hits="0"/> + <line number="946" hits="1"/> + <line number="960" hits="0"/> + <line number="961" hits="0"/> + <line number="962" hits="0"/> + <line number="968" hits="0"/> + <line number="969" hits="0"/> + <line number="970" hits="0"/> + <line number="971" hits="0"/> + <line number="972" hits="0"/> + <line number="973" hits="0"/> + <line number="974" hits="0"/> + <line number="975" hits="0"/> + <line number="976" hits="0"/> + <line number="977" hits="0"/> + <line number="980" hits="1"/> + <line number="992" hits="0"/> + <line number="993" hits="0"/> + <line number="994" hits="0"/> + <line number="998" hits="0"/> + <line number="999" hits="0"/> + <line number="1000" hits="0"/> + <line number="1001" hits="0"/> + <line number="1002" hits="0"/> + <line number="1003" hits="0"/> + <line number="1004" hits="0"/> + <line number="1005" hits="0"/> + <line number="1006" hits="0"/> + <line number="1007" hits="0"/> + <line number="1010" hits="1"/> + <line number="1025" hits="1"/> + <line number="1026" hits="1"/> + <line number="1027" hits="1"/> + <line number="1028" hits="1"/> + <line number="1029" hits="1"/> + <line number="1030" hits="1"/> + <line number="1031" hits="1"/> + <line number="1032" hits="1"/> + <line number="1033" hits="1"/> + <line number="1034" hits="1"/> + <line number="1035" hits="1"/> + <line number="1037" hits="1"/> + <line number="1038" hits="1"/> + <line number="1039" hits="1"/> + <line number="1042" hits="1"/> + <line number="1057" hits="1"/> + <line number="1058" hits="1"/> + <line number="1059" hits="1"/> + <line number="1060" hits="1"/> + <line number="1061" hits="1"/> + <line number="1062" hits="1"/> + <line number="1063" hits="1"/> + <line number="1064" hits="1"/> + <line number="1065" hits="1"/> + <line number="1066" hits="1"/> + <line number="1067" hits="1"/> + <line number="1068" hits="1"/> + <line number="1070" hits="1"/> + <line number="1073" hits="1"/> + <line number="1087" hits="1"/> + <line number="1088" hits="1"/> + <line number="1089" hits="1"/> + <line number="1090" hits="1"/> + <line number="1091" hits="1"/> + <line number="1092" hits="1"/> + <line number="1093" hits="1"/> + <line number="1094" hits="1"/> + <line number="1095" hits="1"/> + <line number="1096" hits="1"/> + <line number="1097" hits="1"/> + <line number="1098" hits="1"/> + <line number="1100" hits="1"/> + <line number="1103" hits="1"/> + <line number="1120" hits="1"/> + <line number="1121" hits="1"/> + <line number="1122" hits="1"/> + <line number="1123" hits="1"/> + <line number="1124" hits="1"/> + <line number="1125" hits="1"/> + <line number="1126" hits="1"/> + <line number="1127" hits="1"/> + <line number="1128" hits="1"/> + <line number="1129" hits="1"/> + <line number="1130" hits="1"/> + <line number="1131" hits="1"/> + <line number="1132" hits="1"/> + <line number="1133" hits="1"/> + <line number="1134" hits="1"/> + <line number="1135" hits="1"/> + <line number="1136" hits="1"/> + <line number="1138" hits="1"/> + <line number="1141" hits="1"/> + <line number="1157" hits="1"/> + <line number="1158" hits="1"/> + <line number="1159" hits="1"/> + <line number="1160" hits="1"/> + <line number="1161" hits="1"/> + <line number="1162" hits="1"/> + <line number="1163" hits="1"/> + <line number="1164" hits="1"/> + <line number="1165" hits="1"/> + <line number="1166" hits="1"/> + <line number="1167" hits="1"/> + <line number="1168" hits="1"/> + <line number="1169" hits="1"/> + <line number="1170" hits="1"/> + <line number="1172" hits="1"/> + <line number="1175" hits="1"/> + <line number="1187" hits="1"/> + <line number="1188" hits="1"/> + <line number="1189" hits="1"/> + <line number="1190" hits="1"/> + <line number="1191" hits="1"/> + <line number="1192" hits="1"/> + <line number="1193" hits="1"/> + <line number="1194" hits="1"/> + <line number="1195" hits="1"/> + <line number="1196" hits="1"/> + <line number="1199" hits="1"/> + <line number="1216" hits="1"/> + <line number="1217" hits="1"/> + <line number="1218" hits="1"/> + <line number="1219" hits="1"/> + <line number="1220" hits="1"/> + <line number="1221" hits="1"/> + <line number="1222" hits="1"/> + <line number="1223" hits="1"/> + <line number="1224" hits="1"/> + <line number="1225" hits="1"/> + <line number="1226" hits="1"/> + <line number="1227" hits="1"/> + <line number="1228" hits="1"/> + <line number="1230" hits="1"/> + <line number="1231" hits="1"/> + <line number="1232" hits="1"/> + <line number="1235" hits="1"/> + <line number="1252" hits="1"/> + <line number="1253" hits="1"/> + <line number="1254" hits="1"/> + <line number="1255" hits="1"/> + <line number="1256" hits="1"/> + <line number="1257" hits="1"/> + <line number="1258" hits="1"/> + <line number="1259" hits="1"/> + <line number="1260" hits="1"/> + <line number="1261" hits="1"/> + <line number="1262" hits="1"/> + <line number="1263" hits="1"/> + <line number="1264" hits="1"/> + <line number="1266" hits="1"/> + <line number="1267" hits="1"/> + <line number="1268" hits="1"/> + <line number="1271" hits="1"/> + <line number="1285" hits="1"/> + <line number="1286" hits="1"/> + <line number="1287" hits="1"/> + <line number="1288" hits="1"/> + <line number="1289" hits="1"/> + <line number="1290" hits="1"/> + <line number="1291" hits="1"/> + <line number="1292" hits="1"/> + <line number="1293" hits="1"/> + <line number="1294" hits="1"/> + <line number="1295" hits="1"/> + <line number="1296" hits="1"/> + <line number="1298" hits="1"/> + <line number="1299" hits="1"/> + <line number="1300" hits="1"/> + <line number="1303" hits="1"/> + <line number="1326" hits="1"/> + <line number="1327" hits="1"/> + <line number="1328" hits="1"/> + <line number="1329" hits="1"/> + <line number="1330" hits="1"/> + <line number="1331" hits="1"/> + <line number="1332" hits="1"/> + <line number="1333" hits="1"/> + <line number="1335" hits="1"/> + <line number="1336" hits="1"/> + <line number="1337" hits="1"/> + <line number="1338" hits="1"/> + <line number="1339" hits="1"/> + <line number="1340" hits="1"/> + <line number="1341" hits="1"/> + <line number="1342" hits="1"/> + <line number="1343" hits="1"/> + <line number="1344" hits="1"/> + <line number="1345" hits="1"/> + <line number="1346" hits="1"/> + <line number="1347" hits="1"/> + <line number="1348" hits="1"/> + <line number="1349" hits="1"/> + <line number="1350" hits="1"/> + <line number="1353" hits="1"/> + <line number="1371" hits="1"/> + <line number="1372" hits="1"/> + <line number="1373" hits="1"/> + <line number="1374" hits="1"/> + <line number="1375" hits="1"/> + <line number="1376" hits="1"/> + <line number="1377" hits="1"/> + <line number="1378" hits="1"/> + <line number="1379" hits="1"/> + <line number="1380" hits="1"/> + <line number="1381" hits="1"/> + <line number="1382" hits="1"/> + <line number="1383" hits="1"/> + <line number="1384" hits="1"/> + <line number="1385" hits="1"/> + <line number="1386" hits="1"/> + <line number="1389" hits="1"/> + <line number="1404" hits="1"/> + <line number="1405" hits="1"/> + <line number="1406" hits="1"/> + <line number="1407" hits="1"/> + <line number="1408" hits="1"/> + <line number="1409" hits="1"/> + <line number="1410" hits="1"/> + <line number="1411" hits="1"/> + <line number="1412" hits="1"/> + <line number="1413" hits="1"/> + <line number="1414" hits="1"/> + <line number="1415" hits="1"/> + <line number="1416" hits="1"/> + <line number="1419" hits="1"/> + <line number="1434" hits="1"/> + <line number="1435" hits="1"/> + <line number="1436" hits="1"/> + <line number="1437" hits="1"/> + <line number="1438" hits="1"/> + <line number="1439" hits="1"/> + <line number="1440" hits="1"/> + <line number="1441" hits="1"/> + <line number="1442" hits="1"/> + <line number="1443" hits="1"/> + <line number="1444" hits="1"/> + <line number="1445" hits="1"/> + <line number="1446" hits="1"/> + <line number="1447" hits="1"/> + <line number="1450" hits="1"/> + <line number="1463" hits="1"/> + <line number="1464" hits="1"/> + <line number="1465" hits="1"/> + <line number="1466" hits="1"/> + <line number="1467" hits="1"/> + <line number="1468" hits="1"/> + <line number="1469" hits="1"/> + <line number="1470" hits="1"/> + <line number="1471" hits="1"/> + <line number="1472" hits="1"/> + <line number="1473" hits="1"/> + <line number="1474" hits="1"/> + <line number="1477" hits="1"/> + <line number="1495" hits="1"/> + <line number="1496" hits="1"/> + <line number="1497" hits="1"/> + <line number="1498" hits="1"/> + <line number="1499" hits="1"/> + <line number="1500" hits="1"/> + <line number="1501" hits="1"/> + <line number="1502" hits="1"/> + <line number="1503" hits="1"/> + <line number="1504" hits="1"/> + <line number="1505" hits="1"/> + <line number="1506" hits="1"/> + <line number="1507" hits="1"/> + <line number="1508" hits="1"/> + <line number="1509" hits="1"/> + <line number="1510" hits="1"/> + <line number="1513" hits="1"/> + <line number="1549" hits="1"/> + <line number="1550" hits="1"/> + <line number="1555" hits="1"/> + <line number="1556" hits="1"/> + <line number="1557" hits="1"/> + <line number="1558" hits="1"/> + <line number="1559" hits="1"/> + <line number="1560" hits="1"/> + <line number="1561" hits="1"/> + <line number="1562" hits="1"/> + <line number="1563" hits="1"/> + <line number="1564" hits="1"/> + <line number="1565" hits="1"/> + <line number="1566" hits="1"/> + <line number="1568" hits="1"/> + <line number="1569" hits="1"/> + <line number="1570" hits="1"/> + <line number="1573" hits="1"/> + <line number="1610" hits="1"/> + <line number="1611" hits="1"/> + <line number="1617" hits="1"/> + <line number="1618" hits="1"/> + <line number="1619" hits="1"/> + <line number="1620" hits="1"/> + <line number="1621" hits="1"/> + <line number="1622" hits="1"/> + <line number="1623" hits="1"/> + <line number="1624" hits="1"/> + <line number="1625" hits="1"/> + <line number="1626" hits="1"/> + <line number="1627" hits="1"/> + <line number="1628" hits="1"/> + <line number="1630" hits="1"/> + <line number="1631" hits="1"/> + <line number="1632" hits="1"/> + <line number="1635" hits="1"/> + <line number="1650" hits="1"/> + <line number="1651" hits="1"/> + <line number="1652" hits="1"/> + <line number="1653" hits="1"/> + <line number="1654" hits="1"/> + <line number="1655" hits="1"/> + <line number="1656" hits="1"/> + <line number="1657" hits="1"/> + <line number="1658" hits="1"/> + <line number="1659" hits="1"/> + <line number="1660" hits="1"/> + <line number="1661" hits="1"/> + <line number="1662" hits="1"/> + <line number="1664" hits="1"/> + <line number="1665" hits="1"/> + <line number="1666" hits="1"/> + <line number="1669" hits="1"/> + <line number="1675" hits="1"/> + <line number="1676" hits="1"/> + <line number="1677" hits="1"/> + <line number="1678" hits="1"/> + <line number="1679" hits="1"/> + <line number="1680" hits="1"/> + <line number="1683" hits="1"/> + <line number="1689" hits="0"/> + <line number="1690" hits="0"/> + <line number="1691" hits="0"/> + <line number="1692" hits="0"/> + <line number="1693" hits="0"/> + <line number="1694" hits="0"/> + <line number="1697" hits="1"/> + <line number="1703" hits="1"/> + <line number="1704" hits="1"/> + <line number="1705" hits="1"/> + <line number="1706" hits="1"/> + <line number="1707" hits="1"/> + <line number="1708" hits="1"/> + <line number="1711" hits="1"/> + <line number="1730" hits="1"/> + <line number="1731" hits="1"/> + <line number="1732" hits="1"/> + <line number="1733" hits="1"/> + <line number="1734" hits="1"/> + <line number="1735" hits="1"/> + <line number="1736" hits="1"/> + <line number="1737" hits="1"/> + <line number="1738" hits="1"/> + <line number="1739" hits="1"/> + <line number="1740" hits="1"/> + <line number="1741" hits="1"/> + <line number="1742" hits="1"/> + <line number="1743" hits="1"/> + <line number="1744" hits="1"/> + <line number="1745" hits="1"/> + <line number="1746" hits="1"/> + <line number="1747" hits="1"/> + <line number="1748" hits="1"/> + <line number="1749" hits="1"/> + <line number="1750" hits="1"/> + <line number="1751" hits="1"/> + <line number="1752" hits="1"/> + <line number="1753" hits="1"/> + <line number="1754" hits="1"/> + <line number="1755" hits="1"/> + <line number="1756" hits="1"/> + <line number="1757" hits="1"/> + <line number="1759" hits="1"/> + <line number="1762" hits="1"/> + <line number="1773" hits="0"/> + <line number="1774" hits="0"/> + <line number="1775" hits="0"/> + <line number="1776" hits="0"/> + <line number="1777" hits="0"/> + <line number="1778" hits="0"/> + <line number="1779" hits="0"/> + <line number="1780" hits="0"/> + <line number="1783" hits="1"/> + <line number="1794" hits="0"/> + <line number="1795" hits="0"/> + <line number="1796" hits="0"/> + <line number="1797" hits="0"/> + <line number="1798" hits="0"/> + <line number="1799" hits="0"/> + <line number="1800" hits="0"/> + <line number="1801" hits="0"/> + <line number="1804" hits="1"/> + <line number="1810" hits="1"/> + <line number="1811" hits="1"/> + <line number="1812" hits="1"/> + <line number="1813" hits="1"/> + <line number="1814" hits="1"/> + <line number="1815" hits="0"/> + <line number="1818" hits="1"/> + <line number="1824" hits="1"/> + <line number="1825" hits="1"/> + <line number="1826" hits="1"/> + <line number="1827" hits="1"/> + <line number="1828" hits="1"/> + <line number="1829" hits="0"/> + <line number="1833" hits="1"/> + <line number="1853" hits="1"/> + <line number="1854" hits="1"/> + <line number="1856" hits="1"/> + <line number="1857" hits="1"/> + <line number="1858" hits="1"/> + <line number="1859" hits="1"/> + <line number="1860" hits="1"/> + <line number="1861" hits="1"/> + <line number="1862" hits="1"/> + <line number="1863" hits="1"/> + <line number="1864" hits="1"/> + <line number="1865" hits="1"/> + <line number="1866" hits="1"/> + <line number="1867" hits="1"/> + <line number="1868" hits="1"/> + <line number="1869" hits="1"/> + </lines> + </class> + <class name="UploadClient.py" filename="dbrepo/UploadClient.py" complexity="0" line-rate="0.52" branch-rate="0"> + <methods/> + <lines> + <line number="1" hits="1"/> + <line number="2" hits="1"/> + <line number="3" hits="1"/> + <line number="4" hits="1"/> + <line number="5" hits="1"/> + <line number="7" hits="1"/> + <line number="8" hits="1"/> + <line number="10" hits="1"/> + <line number="12" hits="1"/> + <line number="16" hits="1"/> + <line number="24" hits="1"/> + <line number="26" hits="1"/> + <line number="27" hits="0"/> + <line number="29" hits="1"/> + <line number="30" hits="0"/> + <line number="31" hits="0"/> + <line number="32" hits="0"/> + <line number="33" hits="0"/> + <line number="34" hits="0"/> + <line number="35" hits="0"/> + <line number="36" hits="0"/> + <line number="37" hits="0"/> + <line number="38" hits="0"/> + <line number="39" hits="0"/> + <line number="40" hits="0"/> + </lines> + </class> + <class name="__init__.py" filename="dbrepo/__init__.py" complexity="0" line-rate="1" branch-rate="0"> + <methods/> + <lines/> + </class> + </classes> + </package> + <package name="dbrepo.api" line-rate="1" branch-rate="0" complexity="0"> + <classes> + <class name="__init__.py" filename="dbrepo/api/__init__.py" complexity="0" line-rate="1" branch-rate="0"> + <methods/> + <lines/> + </class> + <class name="dto.py" filename="dbrepo/api/dto.py" complexity="0" line-rate="1" branch-rate="0"> + <methods/> + <lines> + <line number="1" hits="1"/> + <line number="3" hits="1"/> + <line number="4" hits="1"/> + <line number="5" hits="1"/> + <line number="6" hits="1"/> + <line number="8" hits="1"/> + <line number="10" hits="1"/> + <line number="15" hits="1"/> + <line number="16" hits="1"/> + <line number="17" hits="1"/> + <line number="18" hits="1"/> + <line number="19" hits="1"/> + <line number="22" hits="1"/> + <line number="23" hits="1"/> + <line number="24" hits="1"/> + <line number="25" hits="1"/> + <line number="26" hits="1"/> + <line number="27" hits="1"/> + <line number="28" hits="1"/> + <line number="29" hits="1"/> + <line number="30" hits="1"/> + <line number="31" hits="1"/> + <line number="32" hits="1"/> + <line number="33" hits="1"/> + <line number="36" hits="1"/> + <line number="37" hits="1"/> + <line number="38" hits="1"/> + <line number="39" hits="1"/> + <line number="40" hits="1"/> + <line number="43" hits="1"/> + <line number="44" hits="1"/> + <line number="45" hits="1"/> + <line number="46" hits="1"/> + <line number="47" hits="1"/> + <line number="50" hits="1"/> + <line number="51" hits="1"/> + <line number="52" hits="1"/> + <line number="55" hits="1"/> + <line number="56" hits="1"/> + <line number="57" hits="1"/> + <line number="58" hits="1"/> + <line number="59" hits="1"/> + <line number="60" hits="1"/> + <line number="61" hits="1"/> + <line number="62" hits="1"/> + <line number="63" hits="1"/> + <line number="66" hits="1"/> + <line number="67" hits="1"/> + <line number="68" hits="1"/> + <line number="69" hits="1"/> + <line number="72" hits="1"/> + <line number="73" hits="1"/> + <line number="74" hits="1"/> + <line number="75" hits="1"/> + <line number="76" hits="1"/> + <line number="77" hits="1"/> + <line number="78" hits="1"/> + <line number="81" hits="1"/> + <line number="82" hits="1"/> + <line number="83" hits="1"/> + <line number="84" hits="1"/> + <line number="85" hits="1"/> + <line number="86" hits="1"/> + <line number="87" hits="1"/> + <line number="88" hits="1"/> + <line number="91" hits="1"/> + <line number="92" hits="1"/> + <line number="93" hits="1"/> + <line number="94" hits="1"/> + <line number="95" hits="1"/> + <line number="96" hits="1"/> + <line number="97" hits="1"/> + <line number="98" hits="1"/> + <line number="99" hits="1"/> + <line number="102" hits="1"/> + <line number="103" hits="1"/> + <line number="104" hits="1"/> + <line number="105" hits="1"/> + <line number="106" hits="1"/> + <line number="107" hits="1"/> + <line number="108" hits="1"/> + <line number="111" hits="1"/> + <line number="112" hits="1"/> + <line number="113" hits="1"/> + <line number="114" hits="1"/> + <line number="115" hits="1"/> + <line number="116" hits="1"/> + <line number="117" hits="1"/> + <line number="118" hits="1"/> + <line number="121" hits="1"/> + <line number="122" hits="1"/> + <line number="123" hits="1"/> + <line number="124" hits="1"/> + <line number="125" hits="1"/> + <line number="126" hits="1"/> + <line number="127" hits="1"/> + <line number="128" hits="1"/> + <line number="129" hits="1"/> + <line number="130" hits="1"/> + <line number="133" hits="1"/> + <line number="134" hits="1"/> + <line number="135" hits="1"/> + <line number="136" hits="1"/> + <line number="137" hits="1"/> + <line number="140" hits="1"/> + <line number="141" hits="1"/> + <line number="142" hits="1"/> + <line number="143" hits="1"/> + <line number="144" hits="1"/> + <line number="145" hits="1"/> + <line number="146" hits="1"/> + <line number="147" hits="1"/> + <line number="150" hits="1"/> + <line number="151" hits="1"/> + <line number="154" hits="1"/> + <line number="155" hits="1"/> + <line number="158" hits="1"/> + <line number="162" hits="1"/> + <line number="163" hits="1"/> + <line number="165" hits="1"/> + <line number="166" hits="1"/> + <line number="168" hits="1"/> + <line number="169" hits="1"/> + <line number="172" hits="1"/> + <line number="176" hits="1"/> + <line number="177" hits="1"/> + <line number="178" hits="1"/> + <line number="179" hits="1"/> + <line number="180" hits="1"/> + <line number="181" hits="1"/> + <line number="182" hits="1"/> + <line number="183" hits="1"/> + <line number="184" hits="1"/> + <line number="185" hits="1"/> + <line number="186" hits="1"/> + <line number="187" hits="1"/> + <line number="188" hits="1"/> + <line number="189" hits="1"/> + <line number="190" hits="1"/> + <line number="191" hits="1"/> + <line number="192" hits="1"/> + <line number="193" hits="1"/> + <line number="194" hits="1"/> + <line number="195" hits="1"/> + <line number="196" hits="1"/> + <line number="197" hits="1"/> + <line number="198" hits="1"/> + <line number="199" hits="1"/> + <line number="200" hits="1"/> + <line number="201" hits="1"/> + <line number="202" hits="1"/> + <line number="203" hits="1"/> + <line number="204" hits="1"/> + <line number="205" hits="1"/> + <line number="208" hits="1"/> + <line number="212" hits="1"/> + <line number="213" hits="1"/> + <line number="214" hits="1"/> + <line number="215" hits="1"/> + <line number="216" hits="1"/> + <line number="217" hits="1"/> + <line number="218" hits="1"/> + <line number="219" hits="1"/> + <line number="220" hits="1"/> + <line number="221" hits="1"/> + <line number="222" hits="1"/> + <line number="223" hits="1"/> + <line number="224" hits="1"/> + <line number="225" hits="1"/> + <line number="226" hits="1"/> + <line number="227" hits="1"/> + <line number="228" hits="1"/> + <line number="229" hits="1"/> + <line number="230" hits="1"/> + <line number="231" hits="1"/> + <line number="232" hits="1"/> + <line number="233" hits="1"/> + <line number="234" hits="1"/> + <line number="235" hits="1"/> + <line number="236" hits="1"/> + <line number="237" hits="1"/> + <line number="238" hits="1"/> + <line number="239" hits="1"/> + <line number="240" hits="1"/> + <line number="241" hits="1"/> + <line number="242" hits="1"/> + <line number="243" hits="1"/> + <line number="244" hits="1"/> + <line number="245" hits="1"/> + <line number="246" hits="1"/> + <line number="247" hits="1"/> + <line number="248" hits="1"/> + <line number="249" hits="1"/> + <line number="250" hits="1"/> + <line number="251" hits="1"/> + <line number="252" hits="1"/> + <line number="253" hits="1"/> + <line number="254" hits="1"/> + <line number="255" hits="1"/> + <line number="256" hits="1"/> + <line number="257" hits="1"/> + <line number="258" hits="1"/> + <line number="259" hits="1"/> + <line number="260" hits="1"/> + <line number="261" hits="1"/> + <line number="262" hits="1"/> + <line number="263" hits="1"/> + <line number="264" hits="1"/> + <line number="265" hits="1"/> + <line number="266" hits="1"/> + <line number="267" hits="1"/> + <line number="268" hits="1"/> + <line number="269" hits="1"/> + <line number="270" hits="1"/> + <line number="271" hits="1"/> + <line number="272" hits="1"/> + <line number="273" hits="1"/> + <line number="274" hits="1"/> + <line number="275" hits="1"/> + <line number="276" hits="1"/> + <line number="277" hits="1"/> + <line number="278" hits="1"/> + <line number="279" hits="1"/> + <line number="280" hits="1"/> + <line number="281" hits="1"/> + <line number="282" hits="1"/> + <line number="283" hits="1"/> + <line number="284" hits="1"/> + <line number="285" hits="1"/> + <line number="286" hits="1"/> + <line number="287" hits="1"/> + <line number="288" hits="1"/> + <line number="289" hits="1"/> + <line number="290" hits="1"/> + <line number="291" hits="1"/> + <line number="292" hits="1"/> + <line number="293" hits="1"/> + <line number="294" hits="1"/> + <line number="295" hits="1"/> + <line number="296" hits="1"/> + <line number="297" hits="1"/> + <line number="298" hits="1"/> + <line number="299" hits="1"/> + <line number="300" hits="1"/> + <line number="301" hits="1"/> + <line number="302" hits="1"/> + <line number="303" hits="1"/> + <line number="304" hits="1"/> + <line number="305" hits="1"/> + <line number="306" hits="1"/> + <line number="307" hits="1"/> + <line number="308" hits="1"/> + <line number="309" hits="1"/> + <line number="310" hits="1"/> + <line number="311" hits="1"/> + <line number="312" hits="1"/> + <line number="313" hits="1"/> + <line number="314" hits="1"/> + <line number="315" hits="1"/> + <line number="316" hits="1"/> + <line number="317" hits="1"/> + <line number="318" hits="1"/> + <line number="319" hits="1"/> + <line number="320" hits="1"/> + <line number="321" hits="1"/> + <line number="322" hits="1"/> + <line number="323" hits="1"/> + <line number="324" hits="1"/> + <line number="325" hits="1"/> + <line number="326" hits="1"/> + <line number="327" hits="1"/> + <line number="328" hits="1"/> + <line number="329" hits="1"/> + <line number="330" hits="1"/> + <line number="331" hits="1"/> + <line number="332" hits="1"/> + <line number="333" hits="1"/> + <line number="334" hits="1"/> + <line number="335" hits="1"/> + <line number="336" hits="1"/> + <line number="337" hits="1"/> + <line number="338" hits="1"/> + <line number="339" hits="1"/> + <line number="340" hits="1"/> + <line number="341" hits="1"/> + <line number="342" hits="1"/> + <line number="343" hits="1"/> + <line number="344" hits="1"/> + <line number="345" hits="1"/> + <line number="346" hits="1"/> + <line number="347" hits="1"/> + <line number="348" hits="1"/> + <line number="349" hits="1"/> + <line number="350" hits="1"/> + <line number="351" hits="1"/> + <line number="352" hits="1"/> + <line number="353" hits="1"/> + <line number="354" hits="1"/> + <line number="355" hits="1"/> + <line number="356" hits="1"/> + <line number="357" hits="1"/> + <line number="358" hits="1"/> + <line number="359" hits="1"/> + <line number="360" hits="1"/> + <line number="361" hits="1"/> + <line number="362" hits="1"/> + <line number="363" hits="1"/> + <line number="364" hits="1"/> + <line number="365" hits="1"/> + <line number="366" hits="1"/> + <line number="367" hits="1"/> + <line number="368" hits="1"/> + <line number="369" hits="1"/> + <line number="370" hits="1"/> + <line number="371" hits="1"/> + <line number="372" hits="1"/> + <line number="373" hits="1"/> + <line number="374" hits="1"/> + <line number="375" hits="1"/> + <line number="376" hits="1"/> + <line number="377" hits="1"/> + <line number="378" hits="1"/> + <line number="379" hits="1"/> + <line number="380" hits="1"/> + <line number="381" hits="1"/> + <line number="382" hits="1"/> + <line number="383" hits="1"/> + <line number="384" hits="1"/> + <line number="385" hits="1"/> + <line number="386" hits="1"/> + <line number="387" hits="1"/> + <line number="388" hits="1"/> + <line number="389" hits="1"/> + <line number="390" hits="1"/> + <line number="391" hits="1"/> + <line number="392" hits="1"/> + <line number="393" hits="1"/> + <line number="394" hits="1"/> + <line number="395" hits="1"/> + <line number="398" hits="1"/> + <line number="399" hits="1"/> + <line number="400" hits="1"/> + <line number="403" hits="1"/> + <line number="404" hits="1"/> + <line number="407" hits="1"/> + <line number="408" hits="1"/> + <line number="411" hits="1"/> + <line number="415" hits="1"/> + <line number="416" hits="1"/> + <line number="417" hits="1"/> + <line number="418" hits="1"/> + <line number="421" hits="1"/> + <line number="422" hits="1"/> + <line number="423" hits="1"/> + <line number="424" hits="1"/> + <line number="427" hits="1"/> + <line number="428" hits="1"/> + <line number="431" hits="1"/> + <line number="432" hits="1"/> + <line number="433" hits="1"/> + <line number="434" hits="1"/> + <line number="435" hits="1"/> + <line number="438" hits="1"/> + <line number="439" hits="1"/> + <line number="440" hits="1"/> + <line number="441" hits="1"/> + <line number="444" hits="1"/> + <line number="445" hits="1"/> + <line number="448" hits="1"/> + <line number="449" hits="1"/> + <line number="450" hits="1"/> + <line number="451" hits="1"/> + <line number="452" hits="1"/> + <line number="453" hits="1"/> + <line number="454" hits="1"/> + <line number="455" hits="1"/> + <line number="458" hits="1"/> + <line number="459" hits="1"/> + <line number="460" hits="1"/> + <line number="461" hits="1"/> + <line number="462" hits="1"/> + <line number="463" hits="1"/> + <line number="464" hits="1"/> + <line number="467" hits="1"/> + <line number="468" hits="1"/> + <line number="471" hits="1"/> + <line number="472" hits="1"/> + <line number="473" hits="1"/> + <line number="474" hits="1"/> + <line number="477" hits="1"/> + <line number="478" hits="1"/> + <line number="479" hits="1"/> + <line number="480" hits="1"/> + <line number="481" hits="1"/> + <line number="482" hits="1"/> + <line number="483" hits="1"/> + <line number="486" hits="1"/> + <line number="487" hits="1"/> + <line number="490" hits="1"/> + <line number="491" hits="1"/> + <line number="492" hits="1"/> + <line number="495" hits="1"/> + <line number="496" hits="1"/> + <line number="499" hits="1"/> + <line number="500" hits="1"/> + <line number="501" hits="1"/> + <line number="502" hits="1"/> + <line number="503" hits="1"/> + <line number="504" hits="1"/> + <line number="507" hits="1"/> + <line number="508" hits="1"/> + <line number="509" hits="1"/> + <line number="512" hits="1"/> + <line number="513" hits="1"/> + <line number="514" hits="1"/> + <line number="517" hits="1"/> + <line number="518" hits="1"/> + <line number="521" hits="1"/> + <line number="522" hits="1"/> + <line number="523" hits="1"/> + <line number="524" hits="1"/> + <line number="525" hits="1"/> + <line number="526" hits="1"/> + <line number="527" hits="1"/> + <line number="530" hits="1"/> + <line number="531" hits="1"/> + <line number="532" hits="1"/> + <line number="533" hits="1"/> + <line number="534" hits="1"/> + <line number="535" hits="1"/> + <line number="536" hits="1"/> + <line number="537" hits="1"/> + <line number="538" hits="1"/> + <line number="539" hits="1"/> + <line number="540" hits="1"/> + <line number="541" hits="1"/> + <line number="544" hits="1"/> + <line number="545" hits="1"/> + <line number="546" hits="1"/> + <line number="547" hits="1"/> + <line number="548" hits="1"/> + <line number="551" hits="1"/> + <line number="555" hits="1"/> + <line number="556" hits="1"/> + <line number="557" hits="1"/> + <line number="558" hits="1"/> + <line number="561" hits="1"/> + <line number="565" hits="1"/> + <line number="566" hits="1"/> + <line number="567" hits="1"/> + <line number="570" hits="1"/> + <line number="571" hits="1"/> + <line number="572" hits="1"/> + <line number="573" hits="1"/> + <line number="574" hits="1"/> + <line number="575" hits="1"/> + <line number="576" hits="1"/> + <line number="577" hits="1"/> + <line number="578" hits="1"/> + <line number="579" hits="1"/> + <line number="580" hits="1"/> + <line number="581" hits="1"/> + <line number="582" hits="1"/> + <line number="585" hits="1"/> + <line number="586" hits="1"/> + <line number="587" hits="1"/> + <line number="588" hits="1"/> + <line number="589" hits="1"/> + <line number="590" hits="1"/> + <line number="591" hits="1"/> + <line number="592" hits="1"/> + <line number="593" hits="1"/> + <line number="596" hits="1"/> + <line number="597" hits="1"/> + <line number="598" hits="1"/> + <line number="599" hits="1"/> + <line number="600" hits="1"/> + <line number="601" hits="1"/> + <line number="602" hits="1"/> + <line number="603" hits="1"/> + <line number="604" hits="1"/> + <line number="605" hits="1"/> + <line number="606" hits="1"/> + <line number="607" hits="1"/> + <line number="610" hits="1"/> + <line number="611" hits="1"/> + <line number="614" hits="1"/> + <line number="615" hits="1"/> + <line number="616" hits="1"/> + <line number="617" hits="1"/> + <line number="618" hits="1"/> + <line number="621" hits="1"/> + <line number="622" hits="1"/> + <line number="623" hits="1"/> + <line number="624" hits="1"/> + <line number="627" hits="1"/> + <line number="628" hits="1"/> + <line number="631" hits="1"/> + <line number="632" hits="1"/> + <line number="633" hits="1"/> + <line number="634" hits="1"/> + <line number="635" hits="1"/> + <line number="636" hits="1"/> + <line number="637" hits="1"/> + <line number="638" hits="1"/> + <line number="639" hits="1"/> + <line number="640" hits="1"/> + <line number="641" hits="1"/> + <line number="642" hits="1"/> + <line number="643" hits="1"/> + <line number="644" hits="1"/> + <line number="645" hits="1"/> + <line number="646" hits="1"/> + <line number="647" hits="1"/> + <line number="648" hits="1"/> + <line number="649" hits="1"/> + <line number="650" hits="1"/> + <line number="651" hits="1"/> + <line number="652" hits="1"/> + <line number="653" hits="1"/> + <line number="656" hits="1"/> + <line number="657" hits="1"/> + <line number="660" hits="1"/> + <line number="661" hits="1"/> + <line number="662" hits="1"/> + <line number="663" hits="1"/> + <line number="664" hits="1"/> + <line number="665" hits="1"/> + <line number="666" hits="1"/> + <line number="667" hits="1"/> + <line number="668" hits="1"/> + <line number="669" hits="1"/> + <line number="670" hits="1"/> + <line number="671" hits="1"/> + <line number="672" hits="1"/> + <line number="673" hits="1"/> + <line number="674" hits="1"/> + <line number="675" hits="1"/> + <line number="676" hits="1"/> + <line number="677" hits="1"/> + <line number="678" hits="1"/> + <line number="679" hits="1"/> + <line number="680" hits="1"/> + <line number="681" hits="1"/> + <line number="682" hits="1"/> + <line number="683" hits="1"/> + <line number="684" hits="1"/> + <line number="685" hits="1"/> + <line number="688" hits="1"/> + <line number="689" hits="1"/> + <line number="690" hits="1"/> + <line number="691" hits="1"/> + <line number="692" hits="1"/> + <line number="693" hits="1"/> + <line number="694" hits="1"/> + <line number="697" hits="1"/> + <line number="698" hits="1"/> + <line number="699" hits="1"/> + <line number="700" hits="1"/> + <line number="701" hits="1"/> + <line number="702" hits="1"/> + <line number="703" hits="1"/> + <line number="704" hits="1"/> + <line number="705" hits="1"/> + <line number="706" hits="1"/> + <line number="707" hits="1"/> + <line number="708" hits="1"/> + <line number="709" hits="1"/> + <line number="712" hits="1"/> + <line number="713" hits="1"/> + <line number="714" hits="1"/> + <line number="715" hits="1"/> + <line number="716" hits="1"/> + <line number="717" hits="1"/> + <line number="718" hits="1"/> + <line number="719" hits="1"/> + <line number="720" hits="1"/> + <line number="721" hits="1"/> + <line number="722" hits="1"/> + <line number="723" hits="1"/> + <line number="724" hits="1"/> + <line number="727" hits="1"/> + <line number="728" hits="1"/> + <line number="729" hits="1"/> + <line number="730" hits="1"/> + <line number="731" hits="1"/> + <line number="734" hits="1"/> + <line number="735" hits="1"/> + <line number="736" hits="1"/> + <line number="737" hits="1"/> + <line number="740" hits="1"/> + <line number="741" hits="1"/> + <line number="742" hits="1"/> + <line number="743" hits="1"/> + <line number="744" hits="1"/> + <line number="745" hits="1"/> + <line number="746" hits="1"/> + <line number="747" hits="1"/> + <line number="748" hits="1"/> + <line number="749" hits="1"/> + <line number="750" hits="1"/> + <line number="753" hits="1"/> + <line number="754" hits="1"/> + <line number="755" hits="1"/> + <line number="756" hits="1"/> + <line number="757" hits="1"/> + <line number="760" hits="1"/> + <line number="761" hits="1"/> + <line number="762" hits="1"/> + <line number="763" hits="1"/> + <line number="766" hits="1"/> + <line number="767" hits="1"/> + <line number="770" hits="1"/> + <line number="771" hits="1"/> + <line number="772" hits="1"/> + <line number="773" hits="1"/> + <line number="774" hits="1"/> + <line number="775" hits="1"/> + <line number="778" hits="1"/> + <line number="779" hits="1"/> + <line number="780" hits="1"/> + <line number="781" hits="1"/> + <line number="784" hits="1"/> + <line number="785" hits="1"/> + <line number="788" hits="1"/> + <line number="789" hits="1"/> + <line number="790" hits="1"/> + <line number="791" hits="1"/> + <line number="792" hits="1"/> + <line number="795" hits="1"/> + <line number="796" hits="1"/> + <line number="799" hits="1"/> + <line number="803" hits="1"/> + <line number="804" hits="1"/> + <line number="805" hits="1"/> + <line number="806" hits="1"/> + <line number="809" hits="1"/> + <line number="813" hits="1"/> + <line number="814" hits="1"/> + <line number="817" hits="1"/> + <line number="821" hits="1"/> + <line number="822" hits="1"/> + <line number="823" hits="1"/> + <line number="824" hits="1"/> + <line number="825" hits="1"/> + <line number="826" hits="1"/> + <line number="827" hits="1"/> + <line number="828" hits="1"/> + <line number="829" hits="1"/> + <line number="830" hits="1"/> + <line number="831" hits="1"/> + <line number="832" hits="1"/> + <line number="833" hits="1"/> + <line number="834" hits="1"/> + <line number="835" hits="1"/> + <line number="836" hits="1"/> + <line number="837" hits="1"/> + <line number="838" hits="1"/> + <line number="841" hits="1"/> + <line number="845" hits="1"/> + <line number="846" hits="1"/> + <line number="847" hits="1"/> + <line number="848" hits="1"/> + <line number="849" hits="1"/> + <line number="850" hits="1"/> + <line number="851" hits="1"/> + <line number="852" hits="1"/> + <line number="853" hits="1"/> + <line number="854" hits="1"/> + <line number="855" hits="1"/> + <line number="856" hits="1"/> + <line number="857" hits="1"/> + <line number="858" hits="1"/> + <line number="859" hits="1"/> + <line number="860" hits="1"/> + <line number="861" hits="1"/> + <line number="862" hits="1"/> + <line number="863" hits="1"/> + <line number="864" hits="1"/> + <line number="865" hits="1"/> + <line number="866" hits="1"/> + <line number="867" hits="1"/> + <line number="868" hits="1"/> + <line number="869" hits="1"/> + <line number="870" hits="1"/> + <line number="871" hits="1"/> + <line number="872" hits="1"/> + <line number="873" hits="1"/> + <line number="874" hits="1"/> + <line number="875" hits="1"/> + <line number="876" hits="1"/> + <line number="877" hits="1"/> + <line number="878" hits="1"/> + <line number="881" hits="1"/> + <line number="885" hits="1"/> + <line number="886" hits="1"/> + <line number="887" hits="1"/> + <line number="888" hits="1"/> + <line number="889" hits="1"/> + <line number="890" hits="1"/> + <line number="893" hits="1"/> + <line number="897" hits="1"/> + <line number="898" hits="1"/> + <line number="900" hits="1"/> + <line number="901" hits="1"/> + <line number="904" hits="1"/> + <line number="908" hits="1"/> + <line number="909" hits="1"/> + <line number="911" hits="1"/> + <line number="912" hits="1"/> + <line number="914" hits="1"/> + <line number="915" hits="1"/> + <line number="917" hits="1"/> + <line number="918" hits="1"/> + <line number="921" hits="1"/> + <line number="925" hits="1"/> + <line number="926" hits="1"/> + <line number="928" hits="1"/> + <line number="929" hits="1"/> + <line number="932" hits="1"/> + <line number="936" hits="1"/> + <line number="937" hits="1"/> + <line number="939" hits="1"/> + <line number="940" hits="1"/> + <line number="942" hits="1"/> + <line number="943" hits="1"/> + <line number="945" hits="1"/> + <line number="946" hits="1"/> + <line number="949" hits="1"/> + <line number="950" hits="1"/> + <line number="951" hits="1"/> + <line number="952" hits="1"/> + <line number="953" hits="1"/> + <line number="954" hits="1"/> + <line number="955" hits="1"/> + <line number="956" hits="1"/> + <line number="957" hits="1"/> + <line number="958" hits="1"/> + <line number="959" hits="1"/> + <line number="960" hits="1"/> + <line number="961" hits="1"/> + <line number="964" hits="1"/> + <line number="965" hits="1"/> + <line number="968" hits="1"/> + <line number="969" hits="1"/> + <line number="970" hits="1"/> + <line number="973" hits="1"/> + <line number="974" hits="1"/> + <line number="975" hits="1"/> + <line number="978" hits="1"/> + <line number="979" hits="1"/> + <line number="980" hits="1"/> + <line number="981" hits="1"/> + <line number="982" hits="1"/> + <line number="983" hits="1"/> + <line number="984" hits="1"/> + <line number="985" hits="1"/> + <line number="986" hits="1"/> + <line number="987" hits="1"/> + <line number="988" hits="1"/> + <line number="989" hits="1"/> + <line number="990" hits="1"/> + <line number="991" hits="1"/> + <line number="992" hits="1"/> + <line number="993" hits="1"/> + <line number="994" hits="1"/> + <line number="997" hits="1"/> + <line number="998" hits="1"/> + <line number="999" hits="1"/> + <line number="1000" hits="1"/> + <line number="1001" hits="1"/> + <line number="1002" hits="1"/> + <line number="1003" hits="1"/> + <line number="1004" hits="1"/> + <line number="1005" hits="1"/> + <line number="1006" hits="1"/> + <line number="1007" hits="1"/> + <line number="1008" hits="1"/> + <line number="1009" hits="1"/> + <line number="1010" hits="1"/> + <line number="1011" hits="1"/> + <line number="1012" hits="1"/> + <line number="1013" hits="1"/> + <line number="1014" hits="1"/> + <line number="1015" hits="1"/> + <line number="1016" hits="1"/> + <line number="1017" hits="1"/> + <line number="1018" hits="1"/> + <line number="1019" hits="1"/> + <line number="1020" hits="1"/> + <line number="1021" hits="1"/> + <line number="1022" hits="1"/> + <line number="1023" hits="1"/> + <line number="1026" hits="1"/> + <line number="1027" hits="1"/> + <line number="1028" hits="1"/> + <line number="1029" hits="1"/> + <line number="1030" hits="1"/> + <line number="1031" hits="1"/> + <line number="1032" hits="1"/> + <line number="1033" hits="1"/> + <line number="1034" hits="1"/> + <line number="1035" hits="1"/> + <line number="1036" hits="1"/> + <line number="1037" hits="1"/> + <line number="1038" hits="1"/> + <line number="1039" hits="1"/> + <line number="1040" hits="1"/> + <line number="1041" hits="1"/> + <line number="1042" hits="1"/> + <line number="1045" hits="1"/> + <line number="1046" hits="1"/> + <line number="1047" hits="1"/> + <line number="1048" hits="1"/> + <line number="1049" hits="1"/> + <line number="1050" hits="1"/> + <line number="1051" hits="1"/> + <line number="1052" hits="1"/> + <line number="1053" hits="1"/> + <line number="1054" hits="1"/> + <line number="1055" hits="1"/> + <line number="1056" hits="1"/> + <line number="1057" hits="1"/> + <line number="1058" hits="1"/> + <line number="1059" hits="1"/> + <line number="1060" hits="1"/> + <line number="1061" hits="1"/> + <line number="1062" hits="1"/> + <line number="1063" hits="1"/> + <line number="1064" hits="1"/> + <line number="1067" hits="1"/> + <line number="1068" hits="1"/> + <line number="1069" hits="1"/> + <line number="1070" hits="1"/> + <line number="1071" hits="1"/> + <line number="1072" hits="1"/> + <line number="1073" hits="1"/> + <line number="1074" hits="1"/> + <line number="1075" hits="1"/> + <line number="1076" hits="1"/> + <line number="1077" hits="1"/> + <line number="1080" hits="1"/> + <line number="1081" hits="1"/> + <line number="1082" hits="1"/> + <line number="1083" hits="1"/> + <line number="1084" hits="1"/> + <line number="1085" hits="1"/> + <line number="1086" hits="1"/> + <line number="1087" hits="1"/> + <line number="1088" hits="1"/> + <line number="1089" hits="1"/> + <line number="1090" hits="1"/> + <line number="1091" hits="1"/> + <line number="1092" hits="1"/> + <line number="1093" hits="1"/> + <line number="1094" hits="1"/> + <line number="1095" hits="1"/> + <line number="1096" hits="1"/> + <line number="1097" hits="1"/> + <line number="1100" hits="1"/> + <line number="1101" hits="1"/> + <line number="1102" hits="1"/> + <line number="1103" hits="1"/> + <line number="1106" hits="1"/> + <line number="1107" hits="1"/> + <line number="1108" hits="1"/> + <line number="1109" hits="1"/> + <line number="1110" hits="1"/> + <line number="1113" hits="1"/> + <line number="1117" hits="1"/> + <line number="1118" hits="1"/> + <line number="1119" hits="1"/> + <line number="1120" hits="1"/> + <line number="1121" hits="1"/> + <line number="1124" hits="1"/> + <line number="1125" hits="1"/> + <line number="1128" hits="1"/> + <line number="1129" hits="1"/> + <line number="1130" hits="1"/> + <line number="1131" hits="1"/> + <line number="1132" hits="1"/> + <line number="1133" hits="1"/> + <line number="1134" hits="1"/> + <line number="1135" hits="1"/> + <line number="1138" hits="1"/> + <line number="1139" hits="1"/> + <line number="1140" hits="1"/> + <line number="1141" hits="1"/> + <line number="1142" hits="1"/> + <line number="1143" hits="1"/> + <line number="1146" hits="1"/> + <line number="1147" hits="1"/> + <line number="1148" hits="1"/> + <line number="1149" hits="1"/> + <line number="1152" hits="1"/> + <line number="1153" hits="1"/> + <line number="1154" hits="1"/> + <line number="1155" hits="1"/> + <line number="1156" hits="1"/> + </lines> + </class> + <class name="exceptions.py" filename="dbrepo/api/exceptions.py" complexity="0" line-rate="1" branch-rate="0"> + <methods/> + <lines> + <line number="1" hits="1"/> + <line number="5" hits="1"/> + <line number="8" hits="1"/> + <line number="12" hits="1"/> + <line number="15" hits="1"/> + <line number="19" hits="1"/> + <line number="22" hits="1"/> + <line number="26" hits="1"/> + <line number="29" hits="1"/> + <line number="33" hits="1"/> + <line number="36" hits="1"/> + <line number="40" hits="1"/> + <line number="43" hits="1"/> + <line number="47" hits="1"/> + <line number="50" hits="1"/> + <line number="54" hits="1"/> + <line number="57" hits="1"/> + <line number="61" hits="1"/> + <line number="64" hits="1"/> + <line number="68" hits="1"/> + <line number="71" hits="1"/> + <line number="75" hits="1"/> + <line number="78" hits="1"/> + <line number="82" hits="1"/> + <line number="85" hits="1"/> + <line number="89" hits="1"/> + <line number="92" hits="1"/> + <line number="96" hits="1"/> + <line number="99" hits="1"/> + <line number="103" hits="1"/> + <line number="106" hits="1"/> + <line number="110" hits="1"/> + </lines> + </class> + </classes> + </package> + </packages> +</coverage> diff --git a/lib/python/data.csv b/lib/python/data.csv deleted file mode 100644 index f776784b3750ee8d183efec700935bb0cbea570e..0000000000000000000000000000000000000000 Binary files a/lib/python/data.csv and /dev/null differ diff --git a/lib/python/dbrepo/RestClient.py b/lib/python/dbrepo/RestClient.py index 54d377079d4e8f32304f05652c8d9da01857bdd0..9b043bd32faa64783d02406a78d4a81b57716711 100644 --- a/lib/python/dbrepo/RestClient.py +++ b/lib/python/dbrepo/RestClient.py @@ -1,17 +1,17 @@ import logging import os import sys -import time +from io import BytesIO import requests from pandas import DataFrame from pydantic import TypeAdapter -from dbrepo.UploadClient import UploadClient from dbrepo.api.dto import * -from dbrepo.api.exceptions import ResponseCodeError, UsernameExistsError, EmailExistsError, NotExistsError, \ +from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, \ ForbiddenError, MalformedError, NameExistsError, QueryStoreError, ExternalSystemError, \ AuthenticationError, FormatNotAvailable, RequestError, ServiceError, ServiceConnectionError +from dbrepo.api.mapper import query_to_subset logging.basicConfig(format='%(asctime)s %(name)-12s %(levelname)-6s %(message)s', level=logging.INFO, stream=sys.stdout) @@ -50,7 +50,7 @@ class RestClient: f'initialized rest client with endpoint={self.endpoint}, username={username}, verify_ssl={secure}') def _wrapper(self, method: str, url: str, params: [(str,)] = None, payload=None, headers: dict = None, - force_auth: bool = False, stream: bool = False) -> requests.Response: + force_auth: bool = False, files: dict = None) -> requests.Response: if force_auth and (self.username is None and self.password is None): raise AuthenticationError(f"Failed to perform request: authentication required") url = f'{self.endpoint}{url}' @@ -58,8 +58,6 @@ class RestClient: logging.debug(f'url: {url}') if params is not None: logging.debug(f'params: {params}') - if stream is not None: - logging.debug(f'stream: {stream}') logging.debug(f'secure: {self.secure}') if headers is not None: logging.debug(f'headers: {headers}') @@ -76,72 +74,7 @@ class RestClient: auth = (self.username, self.password) logging.debug(f'configured for basic auth: username={self.username}, password=(hidden)') return requests.request(method=method, url=url, auth=auth, verify=self.secure, - json=payload, headers=headers, params=params, stream=stream) - - def get_jwt_auth(self, username: str = None, password: str = None) -> JwtAuth: - """ - Obtains a JWT auth object from the auth service containing e.g. the access token and refresh token. - - :param username: The username used to authenticate with the auth service. Optional. Default: username from the `RestClient` constructor. - :param password: The password used to authenticate with the auth service. Optional. Default: password from the `RestClient` constructor. - - :returns: JWT auth object from the auth service, if successful. - - :raises MalformedError: If the payload was rejected by the service. - :raises ForbiddenError: If something went wrong with the authorization. - :raises AuthenticationError: If something went wrong with the authentication. - :raises ServiceConnectionError: If something went wrong with connection to the auth service. - :raises ServiceError: If something went wrong with obtaining the information in the auth service. - :raises ResponseCodeError: If something went wrong with the authentication. - """ - if username is None: - username = self.username - if password is None: - password = self.password - url = f'{self.endpoint}/api/user/token' - response = requests.post(url=url, json=dict({"username": username, "password": password})) - if response.status_code == 202: - body = response.json() - return JwtAuth.model_validate(body) - if response.status_code == 400: - raise MalformedError(f'Failed to get JWT: {response.text}') - if response.status_code == 403: - raise ForbiddenError(f'Failed to get JWT: not allowed') - if response.status_code == 428: - raise AuthenticationError(f'Failed to get JWT: account not fully setup (requires password change?)') - if response.status_code == 502: - raise ServiceConnectionError(f'Failed to get JWT: failed to establish connection with auth service') - if response.status_code == 503: - raise ServiceError(f'Failed to get JWT: failed to get user in auth service') - raise ResponseCodeError(f'Failed to get JWT: response code: {response.status_code} is not ' - f'202 (ACCEPTED): {response.text}') - - def refresh_jwt_auth(self, refresh_token: str) -> JwtAuth: - """ - Refreshes a JWT auth object from the auth service containing e.g. the access token and refresh token. - - :param refresh_token: The refresh token. - - :returns: JWT auth object from the auth service, if successful. - - :raises MalformedError: If the payload was rejected by the service. - :raises ForbiddenError: If something went wrong with the authorization. - :raises ServiceConnectionError: If something went wrong with the connection to the auth service. - :raises ResponseCodeError: If something went wrong with the authentication. - """ - url = f'{self.endpoint}/api/user/token' - response = requests.put(url=url, json=dict({"refresh_token": refresh_token})) - if response.status_code == 202: - body = response.json() - return JwtAuth.model_validate(body) - if response.status_code == 400: - raise MalformedError(f'Failed to refresh JWT: {response.text}') - if response.status_code == 403: - raise ForbiddenError(f'Failed to refresh JWT: not allowed') - if response.status_code == 502: - raise ServiceConnectionError(f'Failed to refresh JWT: failed to establish connection with auth service') - raise ResponseCodeError(f'Failed to refresh JWT: response code: {response.status_code} is not ' - f'202 (ACCEPTED): {response.text}') + json=payload, headers=headers, params=params, files=files) def whoami(self) -> str | None: """ @@ -209,48 +142,6 @@ class RestClient: raise ResponseCodeError(f'Failed to find user: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def create_user(self, username: str, password: str, email: str) -> UserBrief: - """ - Creates a new user. - - :param username: The username of the new user. Must be unique. - :param password: The password of the new user. - :param email: The email of the new user. Must be unique. - - :returns: The user, if successful. - - :raises MalformedError: If the payload was rejected by the service. - :raises ForbiddenError: If the internal authentication to the auth service is invalid. - :raises UsernameExistsError: The username exists already. - :raises ForbiddenError: If something went wrong with the authorization. - :raises NotExistsError: If the created user was not found in the auth service. - :raises EmailExistsError: The email exists already. - :raises ServiceConnectionError: If something went wrong with connection to the auth service. - :raises ServiceError: If something went wrong with obtaining the information in the auth service. - """ - url = f'/api/user' - response = self._wrapper(method="post", url=url, - payload=CreateUser(username=username, password=password, email=email)) - if response.status_code == 201: - body = response.json() - return UserBrief.model_validate(body) - if response.status_code == 400: - raise MalformedError(f'Failed to create user: {response.text}') - if response.status_code == 403: - raise ForbiddenError(f'Failed to create user: internal authentication to the auth service is invalid') - if response.status_code == 404: - raise NotExistsError(f'Failed to create user: created user not found in auth service') - if response.status_code == 409: - raise UsernameExistsError(f'Failed to create user: user with username exists') - if response.status_code == 417: - raise EmailExistsError(f'Failed to create user: user with e-mail exists') - if response.status_code == 502: - raise ServiceConnectionError(f'Failed to create user: failed to establish connection with auth service') - if response.status_code == 503: - raise ServiceError(f'Failed to create user: failed to create in auth service') - raise ResponseCodeError(f'Failed to create user: response code: {response.status_code} is not ' - f'201 (CREATED): {response.text}') - def update_user(self, user_id: str, theme: str, language: str, firstname: str = None, lastname: str = None, affiliation: str = None, orcid: str = None) -> UserBrief: """ @@ -287,38 +178,6 @@ class RestClient: raise ResponseCodeError(f'Failed to update user: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def update_user_password(self, user_id: str, password: str) -> None: - """ - Updates the password of a user with given user id. - - :param user_id: The user id of the user that should be updated. - :param password: The updated user password. - - :raises MalformedError: If the payload was rejected by the service. - :raises ForbiddenError: If something went wrong with the authorization. - :raises NotExistsError: If the user does not exist. - :raises ServiceConnectionError: If something went wrong with connection to the auth service. - :raises ServiceError: If something went wrong with obtaining the information in the auth service. - :raises ResponseCodeError: If something went wrong with the update. - """ - url = f'/api/user/{user_id}/password' - response = self._wrapper(method="put", url=url, force_auth=True, payload=UpdateUserPassword(password=password)) - if response.status_code == 202: - return None - if response.status_code == 400: - raise MalformedError(f'Failed to update user password: {response.text}') - if response.status_code == 403: - raise ForbiddenError(f'Failed to update user password: not allowed') - if response.status_code == 404: - raise NotExistsError(f'Failed to update user password: not found') - if response.status_code == 502: - raise ServiceConnectionError( - f'Failed to update user password: failed to establish connection with auth service') - if response.status_code == 503: - raise ServiceError(f'Failed to update user password: failed to update in auth service') - raise ResponseCodeError(f'Failed to update user theme: response code: {response.status_code} is not ' - f'202 (ACCEPTED): {response.text}') - def get_containers(self) -> List[ContainerBrief]: """ Get all containers. @@ -335,7 +194,7 @@ class RestClient: raise ResponseCodeError(f'Failed to find containers: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_container(self, container_id: int) -> Container: + def get_container(self, container_id: str) -> Container: """ Get a container with given id. @@ -384,7 +243,7 @@ class RestClient: raise ResponseCodeError(f'Failed to find databases: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_database(self, database_id: int) -> Database: + def get_database(self, database_id: str) -> Database: """ Get a databases with given id. @@ -393,8 +252,6 @@ class RestClient: :returns: The database, if successful. :raises NotExistsError: If the container does not exist. - :raises ServiceConnectionError: If something went wrong with connection to the broker service. - :raises ServiceError: If something went wrong with obtaining the information in the broker service. :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}' @@ -402,16 +259,14 @@ class RestClient: if response.status_code == 200: body = response.json() return Database.model_validate(body) + if response.status_code == 403: + raise ForbiddenError(f'Failed to find database: not allowed') if response.status_code == 404: raise NotExistsError(f'Failed to find database: not found') - if response.status_code == 502: - raise ServiceConnectionError(f'Failed to find database: failed to establish connection with broker service') - if response.status_code == 503: - raise ServiceError(f'Failed to find database: failed to obtain queue metadata from broker service') raise ResponseCodeError(f'Failed to find database: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def create_database(self, name: str, container_id: int, is_public: bool = True, + def create_database(self, name: str, container_id: str, is_public: bool = True, is_schema_public: bool = True) -> Database: """ Create a databases in a container with given container id. @@ -453,9 +308,8 @@ class RestClient: raise ResponseCodeError(f'Failed to create database: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def create_container(self, name: str, host: str, image_id: int, sidecar_host: str, sidecar_port: int, - privileged_username: str, privileged_password: str, port: int = None, ui_host: str = None, - ui_port: int = None) -> Container: + def create_container(self, name: str, host: str, image_id: str, privileged_username: str, privileged_password: str, + port: int = None, ui_host: str = None, ui_port: int = None) -> Container: """ Register a container instance executing a given container image. Note that this does not create a container, but only saves it in the metadata database to be used within DBRepo. The container still needs to be created @@ -464,8 +318,6 @@ class RestClient: :param name: The container name. :param host: The container hostname. :param image_id: The container image id. - :param sidecar_host: The container sidecar hostname. - :param sidecar_port: The container sidecar port. :param privileged_username: The container privileged user username. :param privileged_password: The container privileged user password. :param port: The container port bound to the host. Optional. @@ -483,7 +335,6 @@ class RestClient: url = f'/api/container' response = self._wrapper(method="post", url=url, force_auth=True, payload=CreateContainer(name=name, host=host, image_id=image_id, - sidecar_host=sidecar_host, sidecar_port=sidecar_port, privileged_username=privileged_username, privileged_password=privileged_password, port=port, ui_host=ui_host, ui_port=ui_port)) @@ -501,7 +352,7 @@ class RestClient: raise ResponseCodeError(f'Failed to create container: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def update_database_visibility(self, database_id: int, is_public: bool, is_schema_public: bool) -> Database: + def update_database_visibility(self, database_id: str, is_public: bool, is_schema_public: bool) -> Database: """ Updates the database visibility of a database with given database id. @@ -538,7 +389,7 @@ class RestClient: raise ResponseCodeError( f'Failed to update database visibility: response code: {response.status_code} is not 202 (ACCEPTED)') - def update_database_owner(self, database_id: int, user_id: str) -> Database: + def update_database_owner(self, database_id: str, user_id: str) -> Database: """ Updates the database owner of a database with given database id. @@ -574,7 +425,7 @@ class RestClient: raise ResponseCodeError( f'Failed to update database visibility: response code: {response.status_code} is not 202 (ACCEPTED)') - def update_database_schema(self, database_id: int) -> Database: + def update_database_schema(self, database_id: str) -> DatabaseBrief: """ Updates the database table and view metadata of a database with given database id. @@ -597,7 +448,7 @@ class RestClient: response = self._wrapper(method="put", url=url, force_auth=True) if response.status_code == 200: body = response.json() - return Database.model_validate(body) + return DatabaseBrief.model_validate(body) if response.status_code == 400: raise MalformedError(f'Failed to update database schema: {response.text}') if response.status_code == 403: @@ -612,7 +463,7 @@ class RestClient: raise ResponseCodeError( f'Failed to update database schema: response code: {response.status_code} is not 200 (OK)') - def create_table(self, database_id: int, name: str, is_public: bool, is_schema_public: bool, + def create_table(self, database_id: str, name: str, is_public: bool, is_schema_public: bool, columns: List[CreateTableColumn], constraints: CreateTableConstraints, description: str = None) -> TableBrief: """ @@ -658,7 +509,7 @@ class RestClient: raise ResponseCodeError(f'Failed to create table: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def get_tables(self, database_id: int) -> List[TableBrief]: + def get_tables(self, database_id: str) -> List[TableBrief]: """ Get all tables. @@ -682,7 +533,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get tables: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_table(self, database_id: int, table_id: int) -> Table: + def get_table(self, database_id: str, table_id: str) -> Table: """ Get a table with given database id and table id. @@ -693,8 +544,6 @@ class RestClient: :raises ForbiddenError: If something went wrong with the authorization. :raises NotExistsError: If the table does not exist. - :raises ServiceConnectionError: If something went wrong with connection to the metadata service. - :raises ServiceError: If something went wrong with obtaining the information in the metadata service. :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}/table/{table_id}' @@ -706,14 +555,10 @@ class RestClient: raise ForbiddenError(f'Failed to find table: not allowed') if response.status_code == 404: raise NotExistsError(f'Failed to find table: not found') - if response.status_code == 502: - raise ServiceConnectionError(f'Failed to find table: failed to establish connection to broker service') - if response.status_code == 503: - raise ServiceError(f'Failed to find table: failed to obtain queue information from broker service') raise ResponseCodeError(f'Failed to find table: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def delete_table(self, database_id: int, table_id: int) -> None: + def delete_table(self, database_id: str, table_id: str) -> None: """ Delete a table with given database id and table id. @@ -744,7 +589,7 @@ class RestClient: raise ResponseCodeError(f'Failed to delete table: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def delete_container(self, container_id: int) -> None: + def delete_container(self, container_id: str) -> None: """ Deletes a container with given id. Note that this does not delete the container, but deletes the entry in the metadata database. The container still needs to be removed, e.g. `docker container stop hash` and then @@ -770,29 +615,7 @@ class RestClient: raise ResponseCodeError(f'Failed to delete container: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def get_table_metadata(self, database_id: int) -> Database: - """ - Generate metadata of all system-versioned tables in a database with given id. - - :param database_id: The database id. - - :raises ForbiddenError: If something went wrong with the authorization. - :raises NotExistsError: If the table does not exist. - :raises ResponseCodeError: If something went wrong with the retrieval. - """ - url = f'/api/database/{database_id}/metadata/table' - response = self._wrapper(method="put", url=url, force_auth=True) - if response.status_code == 200: - body = response.json() - return Database.model_validate(body) - if response.status_code == 403: - raise ForbiddenError(f'Failed to get tables metadata: not allowed') - if response.status_code == 404: - raise NotExistsError(f'Failed to get tables metadata: not found') - raise ResponseCodeError(f'Failed to get tables metadata: response code: {response.status_code} is not ' - f'200 (OK): {response.text}') - - def get_table_history(self, database_id: int, table_id: int, size: int = 100) -> Database: + def get_table_history(self, database_id: str, table_id: str, size: int = 100) -> [History]: """ Get the table history of insert/delete operations. @@ -807,10 +630,10 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}/table/{table_id}/history?size={size}' - response = self._wrapper(method="get", url=url, force_auth=True) + response = self._wrapper(method="get", url=url) if response.status_code == 200: body = response.json() - return Database.model_validate(body) + return TypeAdapter(List[History]).validate_python(body) if response.status_code == 400: raise MalformedError(f'Failed to get table history: {response.text}') if response.status_code == 403: @@ -822,7 +645,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get table history: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_views(self, database_id: int) -> List[ViewBrief]: + def get_views(self, database_id: str) -> List[ViewBrief]: """ Gets views of a database with given database id. @@ -843,7 +666,7 @@ class RestClient: raise ResponseCodeError(f'Failed to find views: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_view(self, database_id: int, view_id: int) -> View: + def get_view(self, database_id: str, view_id: str) -> View: """ Get a view of a database with given database id and view id. @@ -868,13 +691,14 @@ class RestClient: raise ResponseCodeError(f'Failed to find view: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def update_view(self, database_id: int, view_id: int, is_public: bool) -> ViewBrief: + def update_view(self, database_id: str, view_id: str, is_public: bool, is_schema_public: bool) -> ViewBrief: """ Get a view of a database with given database id and view id. :param database_id: The database id. :param view_id: The view id. - :param is_public: If set to `True`, the view is publicly visible. + :param is_public: If set to `True`, the view data is publicly visible. + :param is_schema_public: If set to `True`, the view schema is publicly visible. :returns: The view, if successful. @@ -883,7 +707,8 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}/view/{view_id}' - response = self._wrapper(method="put", url=url, payload=UpdateView(is_public=is_public)) + response = self._wrapper(method="put", url=url, force_auth=True, payload=UpdateView(is_public=is_public, + is_schema_public=is_schema_public)) if response.status_code == 202: body = response.json() return ViewBrief.model_validate(body) @@ -894,13 +719,14 @@ class RestClient: raise ResponseCodeError(f'Failed to update view: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def create_view(self, database_id: int, name: str, query: str, is_public: bool, is_schema_public: bool) -> View: + def create_view(self, database_id: str, name: str, query: QueryDefinition, is_public: bool, + is_schema_public: bool) -> ViewBrief: """ Create a view in a database with given database id. :param database_id: The database id. :param name: The name of the created view. - :param query: The query of the created view. + :param query: The query definition of the view. :param is_public: The visibility of the data. If set to true the data will be publicly visible. Optional. Default: `True`. :param is_schema_public: The visibility of the schema metadata. If set to true the schema metadata will be publicly visible. Optional. Default: `True`. @@ -914,13 +740,15 @@ class RestClient: :raises ServiceError: If something went wrong with obtaining the information in the search service. :raises ResponseCodeError: If something went wrong with the retrieval. """ + database = self.get_database(database_id=database_id) + subset = query_to_subset(database, self.get_image(database.container.image.id), query) url = f'/api/database/{database_id}/view' response = self._wrapper(method="post", url=url, force_auth=True, - payload=CreateView(name=name, query=query, is_public=is_public, + payload=CreateView(name=name, query=subset, is_public=is_public, is_schema_public=is_schema_public)) if response.status_code == 201: body = response.json() - return View.model_validate(body) + return ViewBrief.model_validate(body) if response.status_code == 400: raise MalformedError(f'Failed to create view: {response.text}') if response.status_code == 403: @@ -936,7 +764,7 @@ class RestClient: raise ResponseCodeError(f'Failed to create view: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def delete_view(self, database_id: int, view_id: int) -> None: + def delete_view(self, database_id: str, view_id: str) -> None: """ Deletes a view in a database with given database id and view id. @@ -970,7 +798,7 @@ class RestClient: raise ResponseCodeError(f'Failed to delete view: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def get_view_data(self, database_id: int, view_id: int, page: int = 0, size: int = 10) -> DataFrame: + def get_view_data(self, database_id: str, view_id: str, page: int = 0, size: int = 10) -> DataFrame: """ Get data of a view in a database with given database id and view id. @@ -1010,29 +838,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get view data: response code: {response.status_code} is not ' f'200 (OK):{response.text}') - def get_views_metadata(self, database_id: int) -> Database: - """ - Generate metadata of all views in a database with given id. - - :param database_id: The database id. - - :raises ForbiddenError: If something went wrong with the authorization. - :raises NotExistsError: If the container does not exist. - :raises ResponseCodeError: If something went wrong with the retrieval. - """ - url = f'/api/database/{database_id}/metadata/view' - response = self._wrapper(method="put", url=url, force_auth=True) - if response.status_code == 200: - body = response.json() - return Database.model_validate(body) - if response.status_code == 403: - raise ForbiddenError(f'Failed to get views metadata: not allowed') - if response.status_code == 404: - raise NotExistsError(f'Failed to get views metadata: not found') - raise ResponseCodeError(f'Failed to get views metadata: response code: {response.status_code} is not ' - f'200 (OK): {response.text}') - - def get_table_data(self, database_id: int, table_id: int, page: int = 0, size: int = 10, + def get_table_data(self, database_id: str, table_id: str, page: int = 0, size: int = 10, timestamp: datetime.datetime = None) -> DataFrame: """ Get data of a table in a database with given database id and table id. @@ -1057,7 +863,7 @@ class RestClient: params.append(('page', page)) params.append(('size', size)) if timestamp is not None: - params.append(('timestamp', timestamp)) + params.append(('timestamp', timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"))) response = self._wrapper(method="get", url=url, params=params) if response.status_code == 200: return DataFrame.from_records(response.json()) @@ -1073,7 +879,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get table data: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def create_table_data(self, database_id: int, table_id: int, data: dict) -> None: + def create_table_data(self, database_id: str, table_id: str, data: dict) -> None: """ Insert data into a table in a database with given database id and table id. @@ -1103,9 +909,28 @@ class RestClient: raise ResponseCodeError(f'Failed to insert table data: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def import_table_data(self, database_id: int, table_id: int, file_name_or_data_frame: str | DataFrame, - separator: str = ",", quote: str = "\"", header: bool = False, - line_encoding: str = "\n") -> None: + def _upload(self, dataframe: DataFrame) -> str: + """ + Uploads a pandas DataFrame to the S3 filesystem. + + :param dataframe: The dataframe to be uploaded. + + :returns: The S3 key if successful. + + :raises ResponseCodeError: If something went wrong with the insert. + """ + url = f'/api/upload' + buffer = BytesIO() + dataframe.to_csv(path_or_buf=buffer, header=False, index=False) + response = self._wrapper(method="post", url=url, force_auth=True, + files={'file': ('dataframe.csv', buffer.getvalue())}) + if response.status_code == 201: + body = response.json() + return UploadResponse.model_validate(body).s3_key + raise ResponseCodeError(f'Failed to upload: response code: {response.status_code} is not ' + f'202 (ACCEPTED): {response.text}') + + def import_table_data(self, database_id: str, table_id: str, dataframe: DataFrame) -> None: """ Import a csv dataset from a file into a table in a database with given database id and table id. ATTENTION: the import is column-ordering sensitive! The csv dataset must have the same columns in the same order as the @@ -1113,11 +938,7 @@ class RestClient: :param database_id: The database id. :param table_id: The table id. - :param file_name_or_data_frame: The path of the file that is imported on the storage service or pandas dataframe. - :param separator: The csv column separator. Optional. - :param quote: The column data quotation character. Optional. - :param header: If `True`, the first line contains column names, otherwise the first line is data. Optional. Default: `False`. - :param line_encoding: The encoding of the line termination. Optional. Default: CR (Windows). + :param dataframe: The pandas dataframe. :raises MalformedError: If the payload is rejected by the service (e.g. LOB could not be imported). :raises ForbiddenError: If something went wrong with the authorization. @@ -1125,18 +946,11 @@ class RestClient: :raises ServiceError: If something went wrong with obtaining the information in the metadata service. :raises ResponseCodeError: If something went wrong with the insert. """ - client = UploadClient(endpoint=f"{self.endpoint}/api/upload/files") - if type(file_name_or_data_frame) is DataFrame: - file_path: str = f"./tmp-{time.time()}" - df: DataFrame = file_name_or_data_frame - df.to_csv(path_or_buf=file_path, index=False, header=False) - else: - file_path: str = file_name_or_data_frame - filename = client.upload(file_path=file_path) + url = f'/api/database/{database_id}/table/{table_id}/data/import' response = self._wrapper(method="post", url=url, force_auth=True, - payload=Import(location=filename, separator=separator, quote=quote, - header=header, line_termination=line_encoding)) + payload=Import(location=self._upload(dataframe), separator=',', quote='"', + header=True, line_termination='\n')) if response.status_code == 202: return if response.status_code == 400: @@ -1151,17 +965,13 @@ class RestClient: raise ResponseCodeError(f'Failed to import table data: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def analyse_datatypes(self, file_path: str, separator: str, enum: bool = None, - enum_tol: int = None, upload: bool = True) -> DatatypeAnalysis: + def analyse_datatypes(self, dataframe: DataFrame, enum: bool = None, enum_tol: int = None) -> DatatypeAnalysis: """ Import a csv dataset from a file and analyse it for the possible enums, line encoding and column data types. - :param file_path: The path of the file that is imported on the storage service. - :param separator: The csv column separator. + :param dataframe: The dataframe. :param enum: If set to true, enumerations should be guessed, otherwise no guessing. Optional. :param enum_tol: The tolerance for guessing enumerations (ignored if enum=False). Optional. - :param upload: If set to true, the file from file_path will be uploaded, otherwise no upload will be performed \ - and the file_path will be treated as S3 filename and analysed instead. Optional. Default: true. :returns: The determined data types, if successful. @@ -1169,14 +979,9 @@ class RestClient: :raises NotExistsError: If the file was not found by the Analyse Service. :raises ResponseCodeError: If something went wrong with the analysis. """ - if upload: - client = UploadClient(endpoint=f"{self.endpoint}/api/upload/files") - filename = client.upload(file_path=file_path) - else: - filename = file_path params = [ - ('filename', filename), - ('separator', separator), + ('filename', self._upload(dataframe)), + ('separator', ','), ('enum', enum), ('enum_tol', enum_tol) ] @@ -1192,14 +997,11 @@ class RestClient: raise ResponseCodeError(f'Failed to analyse data types: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def analyse_keys(self, file_path: str, separator: str, upload: bool = True) -> KeyAnalysis: + def analyse_keys(self, dataframe: DataFrame) -> KeyAnalysis: """ Import a csv dataset from a file and analyse it for the possible primary key. - :param file_path: The path of the file that is imported on the storage service. - :param separator: The csv column separator. - :param upload: If set to true, the file from file_path will be uploaded, otherwise no upload will be performed \ - and the file_path will be treated as S3 filename and analysed instead. Optional. Default: `True`. + :param dataframe: The dataframe. :returns: The determined ranking of the primary key candidates, if successful. @@ -1207,14 +1009,9 @@ class RestClient: :raises NotExistsError: If the file was not found by the Analyse Service. :raises ResponseCodeError: If something went wrong with the analysis. """ - if upload: - client = UploadClient(endpoint=f"{self.endpoint}/api/upload/files") - filename = client.upload(file_path=file_path) - else: - filename = file_path params = [ - ('filename', filename), - ('separator', separator), + ('filename', self._upload(dataframe)), + ('separator', ','), ] url = f'/api/analyse/keys' response = self._wrapper(method="get", url=url, params=params) @@ -1228,7 +1025,7 @@ class RestClient: raise ResponseCodeError(f'Failed to analyse data types: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def analyse_table_statistics(self, database_id: int, table_id: int) -> TableStatistics: + def analyse_table_statistics(self, database_id: str, table_id: str) -> TableStatistics: """ Analyses the numerical contents of a table in a database with given database id and table id. @@ -1253,14 +1050,14 @@ class RestClient: if response.status_code == 404: raise NotExistsError(f'Failed to analyse table statistics: separator error') if response.status_code == 502: - raise NotExistsError( + raise ServiceConnectionError( f'Failed to analyse table statistics: data service failed to establish connection to metadata service') if response.status_code == 503: raise ServiceError(f'Failed to analyse table statistics: failed to save statistic in search service') raise ResponseCodeError(f'Failed to analyse table statistics: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def update_table_data(self, database_id: int, table_id: int, data: dict, keys: dict) -> None: + def update_table_data(self, database_id: str, table_id: str, data: dict, keys: dict) -> None: """ Update data in a table in a database with given database id and table id. @@ -1291,7 +1088,7 @@ class RestClient: raise ResponseCodeError(f'Failed to update table data: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def delete_table_data(self, database_id: int, table_id: int, keys: dict) -> None: + def delete_table_data(self, database_id: str, table_id: str, keys: dict) -> None: """ Delete data in a table in a database with given database id and table id. @@ -1321,15 +1118,12 @@ class RestClient: raise ResponseCodeError(f'Failed to delete table data: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def get_table_data_count(self, database_id: int, table_id: int, page: int = 0, size: int = 10, - timestamp: datetime.datetime = None) -> int: + def get_table_data_count(self, database_id: str, table_id: str, timestamp: datetime.datetime = None) -> int: """ Get data count of a table in a database with given database id and table id. :param database_id: The database id. :param table_id: The table id. - :param page: The result pagination number. Optional. Default: `0`. - :param size: The result pagination size. Optional. Default: `10`. :param timestamp: The query execution time. Optional. :returns: The result of the view query, if successful. @@ -1342,15 +1136,10 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}/table/{table_id}/data' - if page is not None and size is not None: - url += f'?page={page}&size={size}' + params = [] if timestamp is not None: - if page is not None and size is not None: - url += '&' - else: - url += '?' - url += f'timestamp={timestamp}' - response = self._wrapper(method="head", url=url) + params.append(('timestamp', timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"))) + response = self._wrapper(method="head", url=url, params=params) if response.status_code == 200: return int(response.headers.get('X-Count')) if response.status_code == 400: @@ -1367,7 +1156,7 @@ class RestClient: raise ResponseCodeError(f'Failed to count table data: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_view_data_count(self, database_id: int, view_id: int) -> int: + def get_view_data_count(self, database_id: str, view_id: str) -> int: """ Get data count of a view in a database with given database id and view id. @@ -1401,7 +1190,7 @@ class RestClient: raise ResponseCodeError(f'Failed to count view data: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_database_access(self, database_id: int) -> AccessType: + def get_database_access(self, database_id: str) -> AccessType: """ Get access of a view in a database with given database id and view id. @@ -1425,30 +1214,7 @@ class RestClient: raise ResponseCodeError(f'Failed to get database access: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def check_database_access(self, database_id: int) -> bool: - """ - Checks access of a view in a database with given database id and view id. - - :param database_id: The database id. - - :returns: The access type, if successful. - - :raises ForbiddenError: If something went wrong with the authorization. - :raises NotExistsError: If the container does not exist. - :raises ResponseCodeError: If something went wrong with the retrieval. - """ - url = f'/api/database/{database_id}/access' - response = self._wrapper(method="get", url=url) - if response.status_code == 200: - return True - if response.status_code == 403: - return False - if response.status_code == 404: - raise NotExistsError(f'Failed to check database access: not found') - raise ResponseCodeError(f'Failed to check database access: response code: {response.status_code} is not ' - f'200 (OK): {response.text}') - - def create_database_access(self, database_id: int, user_id: str, type: AccessType) -> AccessType: + def create_database_access(self, database_id: str, user_id: str, type: AccessType) -> AccessType: """ Create access to a database with given database id and user id. @@ -1484,7 +1250,7 @@ class RestClient: raise ResponseCodeError(f'Failed to create database access: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def update_database_access(self, database_id: int, user_id: str, type: AccessType) -> AccessType: + def update_database_access(self, database_id: str, user_id: str, type: AccessType) -> AccessType: """ Updates the access for a user to a database with given database id and user id. @@ -1520,7 +1286,7 @@ class RestClient: raise ResponseCodeError(f'Failed to update database access: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def delete_database_access(self, database_id: int, user_id: str) -> None: + def delete_database_access(self, database_id: str, user_id: str) -> None: """ Deletes the access for a user to a database with given database id and user id. @@ -1552,7 +1318,7 @@ class RestClient: raise ResponseCodeError(f'Failed to delete database access: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def create_subset(self, database_id: int, query: str, page: int = 0, size: int = 10, + def create_subset(self, database_id: str, query: QueryDefinition, page: int = 0, size: int = 10, timestamp: datetime.datetime = None) -> DataFrame: """ Executes a SQL query in a database where the current user has at least read access with given database id. The @@ -1560,7 +1326,7 @@ class RestClient: timestamp. :param database_id: The database id. - :param query: The query statement. + :param query: The query definition. :param page: The result pagination number. Optional. Default: `0`. :param size: The result pagination size. Optional. Default: `10`. :param timestamp: The timestamp at which the data validity is set. Optional. Default: <current timestamp>. @@ -1575,16 +1341,17 @@ class RestClient: :raises ServiceError: If something went wrong with obtaining the information in the data service. :raises ResponseCodeError: If something went wrong with the retrieval. """ - url = f'/api/database/{database_id}/subset' + database = self.get_database(database_id=database_id) + subset = query_to_subset(database, self.get_image(database.container.image.id), query) + params = [] if page is not None and size is not None: - url += f'?page={page}&size={size}' - if timestamp is not None: - url += f'×tamp={timestamp.strftime("%Y-%m-%dT%H:%M:%SZ")}' - else: - if timestamp is not None: - url += f'?timestamp={timestamp.strftime("%Y-%m-%dT%H:%M:%SZ")}' - response = self._wrapper(method="post", url=url, headers={"Accept": "application/json"}, - payload=ExecuteQuery(statement=query)) + params.append(('page', page)) + params.append(('size', size)) + if timestamp is not None: + params.append(('timestamp', timestamp.strftime("%Y-%m-%dT%H:%M:%SZ"))) + url = f'/api/database/{database_id}/subset' + response = self._wrapper(method="post", url=url, headers={"Accept": "application/json"}, params=params, + payload=subset) if response.status_code == 201: logging.info(f'Created subset with id: {response.headers["X-Id"]}') return DataFrame.from_records(response.json()) @@ -1603,7 +1370,7 @@ class RestClient: raise ResponseCodeError(f'Failed to create subset: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def get_subset_data(self, database_id: int, subset_id: int, page: int = 0, size: int = 10) -> DataFrame: + def get_subset_data(self, database_id: str, subset_id: str, page: int = 0, size: int = 10) -> DataFrame: """ Re-executes a query in a database with given database id and query id. @@ -1639,14 +1406,12 @@ class RestClient: raise ResponseCodeError(f'Failed to get query data: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_subset_data_count(self, database_id: int, subset_id: int, page: int = 0, size: int = 10) -> int: + def get_subset_data_count(self, database_id: str, subset_id: str) -> int: """ Re-executes a query in a database with given database id and query id and only counts the results. :param database_id: The database id. :param subset_id: The subset id. - :param page: The result pagination number. Optional. Default: `0`. - :param size: The result pagination size. Optional. Default: `10`. :returns: The result set, if successful. @@ -1657,8 +1422,6 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the retrieval. """ url = f'/api/database/{database_id}/subset/{subset_id}/data' - if page is not None and size is not None: - url += f'?page={page}&size={size}' response = self._wrapper(method="head", url=url) if response.status_code == 200: return int(response.headers.get('X-Count')) @@ -1673,7 +1436,7 @@ class RestClient: raise ResponseCodeError( f'Failed to get query count: response code: {response.status_code} is not 200 (OK)') - def get_subset(self, database_id: int, subset_id: int) -> Query: + def get_subset(self, database_id: str, subset_id: str) -> Query: """ Get query from a database with given database id and query id. @@ -1704,7 +1467,7 @@ class RestClient: raise ResponseCodeError(f'Failed to find subset: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_queries(self, database_id: int) -> List[Query]: + def get_queries(self, database_id: str) -> List[Query]: """ Get queries from a database with given database id. @@ -1731,7 +1494,7 @@ class RestClient: raise ResponseCodeError(f'Failed to find query: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def update_subset(self, database_id: int, subset_id: int, persist: bool) -> Query: + def update_subset(self, database_id: str, subset_id: str, persist: bool) -> Query: """ Save query or mark it for deletion (at a later time) in a database with given database id and query id. @@ -1767,13 +1530,13 @@ class RestClient: raise ResponseCodeError(f'Failed to update query: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def create_identifier(self, database_id: int, type: IdentifierType, titles: List[SaveIdentifierTitle], + def create_identifier(self, database_id: str, type: IdentifierType, titles: List[CreateIdentifierTitle], publisher: str, creators: List[CreateIdentifierCreator], publication_year: int, - descriptions: List[SaveIdentifierDescription] = None, - funders: List[SaveIdentifierFunder] = None, licenses: List[License] = None, - language: Language = None, subset_id: int = None, view_id: int = None, table_id: int = None, + descriptions: List[CreateIdentifierDescription] = None, + funders: List[CreateIdentifierFunder] = None, licenses: List[License] = None, + language: Language = None, subset_id: str = None, view_id: str = None, table_id: str = None, publication_day: int = None, publication_month: int = None, - related_identifiers: List[SaveRelatedIdentifier] = None) -> Identifier: + related_identifiers: List[CreateRelatedIdentifier] = None) -> Identifier: """ Create an identifier draft. @@ -1806,7 +1569,7 @@ class RestClient: url = f'/api/identifier' payload = CreateIdentifier(database_id=database_id, type=type, titles=titles, publisher=publisher, creators=creators, publication_year=publication_year, descriptions=descriptions, - funders=funders, licenses=licenses, language=language, subset_id=subset_id, + funders=funders, licenses=licenses, language=language, query_id=subset_id, view_id=view_id, table_id=table_id, publication_day=publication_day, publication_month=publication_month, related_identifiers=related_identifiers) response = self._wrapper(method="post", url=url, force_auth=True, payload=payload) @@ -1827,15 +1590,15 @@ class RestClient: raise ResponseCodeError(f'Failed to create identifier: response code: {response.status_code} is not ' f'201 (CREATED): {response.text}') - def save_identifier(self, identifier_id: int, database_id: int, type: IdentifierType, - titles: List[SaveIdentifierTitle], publisher: str, creators: List[CreateIdentifierCreator], - publication_year: int, descriptions: List[SaveIdentifierDescription] = None, - funders: List[SaveIdentifierFunder] = None, licenses: List[License] = None, - language: Language = None, subset_id: int = None, view_id: int = None, table_id: int = None, - publication_day: int = None, publication_month: int = None, - related_identifiers: List[SaveRelatedIdentifier] = None) -> Identifier: + def update_identifier(self, identifier_id: str, database_id: str, type: IdentifierType, + titles: List[SaveIdentifierTitle], publisher: str, creators: List[SaveIdentifierCreator], + publication_year: int, descriptions: List[SaveIdentifierDescription] = None, + funders: List[SaveIdentifierFunder] = None, licenses: List[License] = None, + language: Language = None, subset_id: str = None, view_id: str = None, table_id: str = None, + publication_day: int = None, publication_month: int = None, + related_identifiers: List[SaveRelatedIdentifier] = None) -> Identifier: """ - Save an existing identifier and update the metadata attached to it. + Update an existing identifier and update the metadata attached to it. :param identifier_id: The identifier id. :param database_id: The database id of the created identifier. @@ -1865,11 +1628,12 @@ class RestClient: :raises ResponseCodeError: If something went wrong with the creation of the identifier. """ url = f'/api/identifier/{identifier_id}' - payload = CreateIdentifier(database_id=database_id, type=type, titles=titles, publisher=publisher, - creators=creators, publication_year=publication_year, descriptions=descriptions, - funders=funders, licenses=licenses, language=language, subset_id=subset_id, - view_id=view_id, table_id=table_id, publication_day=publication_day, - publication_month=publication_month, related_identifiers=related_identifiers) + payload = IdentifierSave(id=identifier_id, database_id=database_id, type=type, titles=titles, + publisher=publisher, creators=creators, publication_year=publication_year, + descriptions=descriptions, funders=funders, licenses=licenses, language=language, + query_id=subset_id, view_id=view_id, table_id=table_id, + publication_day=publication_day, publication_month=publication_month, + related_identifiers=related_identifiers) response = self._wrapper(method="put", url=url, force_auth=True, payload=payload) if response.status_code == 202: body = response.json() @@ -1888,7 +1652,7 @@ class RestClient: raise ResponseCodeError(f'Failed to save identifier: response code: {response.status_code} is not ' f'202 (ACCEPTED): {response.text}') - def publish_identifier(self, identifier_id: int) -> Identifier: + def publish_identifier(self, identifier_id: str) -> Identifier: """ Publish an identifier with given id. @@ -1936,6 +1700,20 @@ class RestClient: raise ResponseCodeError(f'Failed to get licenses: response code: {response.status_code} is not ' f'200 (OK): {response.text}') + def get_ontologies(self) -> List[OntologyBrief]: + """ + Get list of ontologies. + + :returns: List of ontologies, if successful. + """ + url = f'/api/ontology' + response = self._wrapper(method="get", url=url) + if response.status_code == 200: + body = response.json() + return TypeAdapter(List[OntologyBrief]).validate_python(body) + raise ResponseCodeError(f'Failed to get ontologies: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + def get_concepts(self) -> List[ConceptBrief]: """ Get list of concepts known to the metadata database. @@ -1950,8 +1728,9 @@ class RestClient: raise ResponseCodeError(f'Failed to get concepts: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def get_identifiers(self, database_id: int = None, subset_id: int = None, view_id: int = None, - table_id: int = None) -> List[Identifier] | str: + def get_identifiers(self, database_id: str = None, subset_id: str = None, view_id: str = None, + table_id: str = None, type: IdentifierType = None, status: IdentifierStatusType = None) -> List[ + Identifier]: """ Get list of identifiers, filter by the remaining optional arguments. @@ -1959,6 +1738,8 @@ class RestClient: :param subset_id: The subset id. Optional. Requires `database_id` to be set. :param view_id: The view id. Optional. Requires `database_id` to be set. :param table_id: The table id. Optional. Requires `database_id` to be set. + :param type: The identifier type. Optional. + :param status: The identifier status. Optional. :returns: List of identifiers, if successful. @@ -1966,34 +1747,109 @@ class RestClient: :raises FormatNotAvailable: If the service could not represent the output. :raises ResponseCodeError: If something went wrong with the retrieval of the identifiers. """ - url = f'/api/identifiers' + url = f'/api/identifier' + params = [] if database_id is not None: - url += f'?dbid={database_id}' + params.append(('dbid', database_id)) if subset_id is not None: if database_id is None: raise RequestError(f'Filtering by subset_id requires database_id to be set') - url += f'&qid={subset_id}' + params.append(('qid', subset_id)) if view_id is not None: if database_id is None: raise RequestError(f'Filtering by view_id requires database_id to be set') - url += f'&vid={view_id}' + params.append(('vid', view_id)) if table_id is not None: if database_id is None: raise RequestError(f'Filtering by table_id requires database_id to be set') - url += f'&tid={table_id}' - response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + params.append(('tid', table_id)) + if type is not None: + params.append(('type', type)) + if status is not None: + params.append(('status', status)) + response = self._wrapper(method="get", url=url, params=params, headers={'Accept': 'application/json'}) if response.status_code == 200: body = response.json() return TypeAdapter(List[Identifier]).validate_python(body) if response.status_code == 404: raise NotExistsError(f'Failed to get identifiers: requested style is not known') if response.status_code == 406: - raise MalformedError( + raise FormatNotAvailable( f'Failed to get identifiers: accept header must be application/json or application/ld+json') raise ResponseCodeError(f'Failed to get identifiers: response code: {response.status_code} is not ' f'200 (OK): {response.text}') - def update_table_column(self, database_id: int, table_id: int, column_id: int, concept_uri: str = None, + def get_identifier(self, identifier_id: str) -> Identifier: + """ + Get list of identifiers, filter by the remaining optional arguments. + + :param identifier_id: The identifier id. + + :returns: The identifier, if successful. + + :raises NotExistsError: If the identifier does not exist. + :raises ResponseCodeError: If something went wrong with the retrieval of the identifier. + """ + url = f'/api/identifier/{identifier_id}' + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + if response.status_code == 200: + body = response.json() + return Identifier.model_validate(body) + if response.status_code == 404: + raise NotExistsError(f'Failed to get identifier: not found') + raise ResponseCodeError(f'Failed to get identifier: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + + def get_image(self, image_id: str) -> Image: + """ + Get container image. + + :param image_id: The image id. + + :returns: The image, if successful. + + :raises NotExistsError: If the image does not exist. + :raises ResponseCodeError: If something went wrong with the retrieval of the image. + """ + url = f'/api/image/{image_id}' + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + if response.status_code == 200: + body = response.json() + return Image.model_validate(body) + if response.status_code == 404: + raise NotExistsError(f'Failed to get image: not found') + raise ResponseCodeError(f'Failed to get image: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + + def get_images(self) -> List[ImageBrief]: + """ + Get list of container images. + + :returns: List of images, if successful. + """ + url = f'/api/image' + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + if response.status_code == 200: + body = response.json() + return TypeAdapter(List[ImageBrief]).validate_python(body) + raise ResponseCodeError(f'Failed to get images: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + + def get_messages(self) -> List[Message]: + """ + Get list of messages. + + :returns: List of messages, if successful. + """ + url = f'/api/message' + response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'}) + if response.status_code == 200: + body = response.json() + return TypeAdapter(List[Message]).validate_python(body) + raise ResponseCodeError(f'Failed to get messages: response code: {response.status_code} is not ' + f'200 (OK): {response.text}') + + def update_table_column(self, database_id: str, table_id: str, column_id: str, concept_uri: str = None, unit_uri: str = None) -> Column: """ Update semantic information of a table column by given database id and table id and column id. diff --git a/lib/python/dbrepo/UploadClient.py b/lib/python/dbrepo/UploadClient.py deleted file mode 100644 index b0bc90fc00aa1810d4e80873b9e8583ff1a4e5be..0000000000000000000000000000000000000000 --- a/lib/python/dbrepo/UploadClient.py +++ /dev/null @@ -1,39 +0,0 @@ -import logging -import os -import re -import sys -from tusclient import client - -logging.basicConfig(format='%(asctime)s %(name)-12s %(levelname)-6s %(message)s', level=logging.INFO, - stream=sys.stdout) - - -class UploadClient: - """ - The UploadClient class for communicating with the DBRepo REST API. All parameters can be set also via environment \ - variables, e.g. set endpoint with DBREPO_ENDPOINT, username with DBREPO_USERNAME, etc. You can override the \ - constructor parameters with the environment variables. - - :param endpoint: The REST API endpoint. Optional. Default: "http://gateway-service/api/upload/files" - """ - endpoint: str = None - - def __init__(self, endpoint: str = 'http://gateway-service/api/upload/files') -> None: - self.endpoint = os.environ.get('REST_UPLOAD_ENDPOINT', endpoint) - - def upload(self, file_path: str) -> str: - """ - Imports a file through the Upload Service into the Storage Service. - - :param file_path: The file path on the local machine. - - :returns: Filename on the Storage Service, if successful. - """ - logging.debug(f"upload file to endpoint: {self.endpoint}") - tus_client = client.TusClient(url=self.endpoint) - uploader = tus_client.uploader(file_path=file_path) - uploader.upload() - m = re.search('\\/([a-f0-9]+)\\+', uploader.url) - filename = m.group(0)[1:-1] - logging.info(f'Uploaded file {file_path} to storage service with key: {filename}') - return filename diff --git a/lib/python/dbrepo/api/dto.py b/lib/python/dbrepo/api/dto.py index 582f40c9b16a8fe60fd7b2f4a14901958a7a7b3b..526ba29bf7d4dfea5983bce99c84c2e67e8befe4 100644 --- a/lib/python/dbrepo/api/dto.py +++ b/lib/python/dbrepo/api/dto.py @@ -12,52 +12,45 @@ Timestamp = Annotated[ ] -class JwtAuth(BaseModel): - access_token: str - refresh_token: str - id_token: str - expires_in: int - refresh_expires_in: int - not_before_policy: int - scope: str - session_state: str - token_type: str +class Operator(BaseModel): + id: str + display_name: str + value: str + documentation: str class Image(BaseModel): - id: int - registry: str + id: str name: str version: str - dialect: str - driver_class: str - jdbc_method: str - default_port: int + default: bool data_types: List[DataType] = field(default_factory=list) + operators: List[Operator] = field(default_factory=list) class ImageBrief(BaseModel): - id: int + id: str name: str version: str - jdbc_method: str + default: bool class CreateDatabase(BaseModel): name: str - container_id: int + container_id: str is_public: bool is_schema_public: bool class UpdateView(BaseModel): is_public: bool + is_schema_public: bool class CreateContainer(BaseModel): name: str host: str - image_id: int + image_id: str privileged_username: str privileged_password: str ui_host: Optional[str] = None @@ -91,18 +84,16 @@ class UserBrief(BaseModel): class Container(BaseModel): - id: int + id: str name: str internal_name: str - host: str - port: int image: Image ui_host: Optional[str] = None ui_port: Optional[int] = None class ContainerBrief(BaseModel): - id: int + id: str name: str image: ImageBrief internal_name: str @@ -111,18 +102,18 @@ class ContainerBrief(BaseModel): class ColumnBrief(BaseModel): - id: int + id: str name: str - database_id: int - table_id: int + database_id: str + table_id: str internal_name: str type: ColumnType alias: Optional[str] = None class TableBrief(BaseModel): - id: int - database_id: int + id: str + database_id: str name: str description: Optional[str] = None internal_name: str @@ -134,6 +125,7 @@ class TableBrief(BaseModel): class UserAttributes(BaseModel): theme: str + language: str orcid: Optional[str] = None affiliation: Optional[str] = None @@ -413,33 +405,41 @@ class IdentifierTitle(BaseModel): """ Title of an identifier. See external documentation: https://support.datacite.org/docs/datacite-metadata-schema-v44-mandatory-properties#3-title. """ - id: int + id: str title: str language: Optional[Language] = None type: Optional[TitleType] = None -class SaveIdentifierTitle(BaseModel): +class CreateIdentifierTitle(BaseModel): title: str language: Optional[Language] = None type: Optional[TitleType] = None +class SaveIdentifierTitle(CreateIdentifierTitle): + id: str + + class IdentifierDescription(BaseModel): - id: int + id: str description: str language: Optional[Language] = None type: Optional[DescriptionType] = None -class SaveIdentifierDescription(BaseModel): +class CreateIdentifierDescription(BaseModel): description: str language: Optional[Language] = None type: Optional[DescriptionType] = None +class SaveIdentifierDescription(CreateIdentifierDescription): + id: str + + class IdentifierFunder(BaseModel): - id: int + id: str funder_name: str funder_identifier: Optional[str] = None funder_identifier_type: Optional[str] = None @@ -448,7 +448,7 @@ class IdentifierFunder(BaseModel): award_title: Optional[str] = None -class SaveIdentifierFunder(BaseModel): +class CreateIdentifierFunder(BaseModel): funder_name: str funder_identifier: Optional[str] = None funder_identifier_type: Optional[str] = None @@ -457,12 +457,25 @@ class SaveIdentifierFunder(BaseModel): award_title: Optional[str] = None +class SaveIdentifierFunder(CreateIdentifierFunder): + id: str + + class License(BaseModel): identifier: str uri: str description: str +class OntologyBrief(BaseModel): + id: str + uri: str + prefix: str + sparql: bool + rdf: bool + uri_pattern: Optional[str] = None + + class Tuple(BaseModel): data: dict @@ -548,7 +561,7 @@ class AffiliationIdentifierSchemeType(str, Enum): class Creator(BaseModel): - id: int + id: str creator_name: str firstname: Optional[str] = None lastname: Optional[str] = None @@ -563,7 +576,7 @@ class Creator(BaseModel): class CreatorBrief(BaseModel): - id: int + id: str creator_name: str affiliation: Optional[str] = None name_type: Optional[str] = None @@ -587,47 +600,59 @@ class CreateIdentifierCreator(BaseModel): affiliation_identifier_scheme_uri: Optional[str] = None +class SaveIdentifierCreator(CreateIdentifierCreator): + id: str + + class RelatedIdentifier(BaseModel): - id: int + id: str value: str type: RelatedIdentifierType relation: RelatedIdentifierRelation -class SaveRelatedIdentifier(BaseModel): +class CreateRelatedIdentifier(BaseModel): value: str type: RelatedIdentifierType relation: RelatedIdentifierRelation +class SaveRelatedIdentifier(CreateRelatedIdentifier): + id: str + + class CreateIdentifier(BaseModel): - database_id: int + database_id: str type: IdentifierType creators: List[CreateIdentifierCreator] publication_year: int publisher: str - titles: List[SaveIdentifierTitle] - descriptions: List[SaveIdentifierDescription] - funders: Optional[List[SaveIdentifierFunder]] = field(default_factory=list) + titles: List[CreateIdentifierTitle] + descriptions: List[CreateIdentifierDescription] + funders: Optional[List[CreateIdentifierFunder]] = field(default_factory=list) doi: Optional[str] = None language: Optional[str] = None licenses: Optional[List[License]] = field(default_factory=list) - query_id: Optional[int] = None - table_id: Optional[int] = None - view_id: Optional[int] = None + query_id: Optional[str] = None + table_id: Optional[str] = None + view_id: Optional[str] = None query: Optional[str] = None query_normalized: Optional[str] = None execution: Optional[str] = None - related_identifiers: Optional[List[SaveRelatedIdentifier]] = field(default_factory=list) + related_identifiers: Optional[List[CreateRelatedIdentifier]] = field(default_factory=list) result_hash: Optional[str] = None result_number: Optional[int] = None publication_day: Optional[int] = None publication_month: Optional[int] = None +class IdentifierSave(CreateIdentifier): + id: str + + class Identifier(BaseModel): - id: int - database_id: int + id: str + database_id: str type: IdentifierType owner: UserBrief status: IdentifierStatusType @@ -640,9 +665,9 @@ class Identifier(BaseModel): doi: Optional[str] = None language: Optional[str] = None licenses: Optional[List[License]] = field(default_factory=list) - query_id: Optional[int] = None - table_id: Optional[int] = None - view_id: Optional[int] = None + query_id: Optional[str] = None + table_id: Optional[str] = None + view_id: Optional[str] = None query: Optional[str] = None query_normalized: Optional[str] = None execution: Optional[str] = None @@ -653,9 +678,18 @@ class Identifier(BaseModel): publication_month: Optional[int] = None +class Message(BaseModel): + id: str + type: str + link: Optional[str] = None + link_text: Optional[str] = None + display_start: Optional[Timestamp] = None + display_end: Optional[Timestamp] = None + + class IdentifierBrief(BaseModel): - id: int - database_id: int + id: str + database_id: str type: IdentifierType owned_by: str status: IdentifierStatusType @@ -663,16 +697,16 @@ class IdentifierBrief(BaseModel): publisher: str titles: List[IdentifierTitle] doi: Optional[str] = None - query_id: Optional[int] = None - table_id: Optional[int] = None - view_id: Optional[int] = None + query_id: Optional[str] = None + table_id: Optional[str] = None + view_id: Optional[str] = None class View(BaseModel): - id: int - database_id: int + id: str name: str query: str + database_id: str query_hash: str owner: UserBrief internal_name: str @@ -685,14 +719,20 @@ class View(BaseModel): class CreateView(BaseModel): name: str - query: str + query: Subset is_public: bool is_schema_public: bool +class History(BaseModel): + event: HistoryEventType + total: int + timestamp: Timestamp + + class ViewBrief(BaseModel): - id: int - database_id: int + id: str + database_id: str name: str internal_name: str is_public: bool @@ -704,7 +744,7 @@ class ViewBrief(BaseModel): class ConceptBrief(BaseModel): - id: int + id: str uri: str name: Optional[str] = None description: Optional[str] = None @@ -739,14 +779,65 @@ class TableStatistics(BaseModel): class UnitBrief(BaseModel): - id: int + id: str uri: str name: Optional[str] = None description: Optional[str] = None -class ExecuteQuery(BaseModel): - statement: str +class FilterType(str, Enum): + """ + Enumeration of filter types. + """ + WHERE = "where" + OR = "or" + AND = "and" + + +class OrderType(str, Enum): + """ + Enumeration of order types. + """ + ASC = "asc" + DESC = "desc" + + +class Filter(BaseModel): + type: FilterType + column_id: str + operator_id: str + value: str + + +class FilterDefinition(BaseModel): + type: FilterType + column: str + operator: str + value: str + + +class Order(BaseModel): + column_id: str + direction: Optional[OrderType] = None + + +class OrderDefinition(BaseModel): + column: str + direction: Optional[OrderType] = None + + +class Subset(BaseModel): + table_id: str + columns: List[str] + filter: Optional[List[Filter]] = None + order: Optional[List[Order]] = None + + +class QueryDefinition(BaseModel): + table: str + columns: List[str] + filter: Optional[List[FilterDefinition]] = None + order: Optional[List[OrderDefinition]] = None class TitleType(str, Enum): @@ -759,6 +850,14 @@ class TitleType(str, Enum): OTHER = "Other" +class HistoryEventType(str, Enum): + """ + Enumeration of history event types. + """ + INSERT = "insert" + DELETE = "delete" + + class RelatedIdentifierType(str, Enum): """ Enumeration of related identifier types. @@ -874,30 +973,13 @@ class IdentifierStatusType(str, Enum): """The identifier is a draft and can still be edited.""" -class IdentifierType(str, Enum): - """ - Enumeration of identifier types. - """ - TABLE = "table" - """The identifier identifies a table.""" - - DATABASE = "database" - """The identifier identifies a database.""" - - VIEW = "view" - """The identifier identifies a view.""" - - SUBSET = "subset" - """The identifier identifies a subset.""" - - class Query(BaseModel): - id: int + id: str owner: UserBrief execution: Timestamp query: str type: QueryType - database_id: int + database_id: str query_hash: str is_persisted: bool result_hash: str @@ -910,7 +992,22 @@ class UpdateQuery(BaseModel): persist: bool +class ColumnEnum(BaseModel): + id: str + value: str + + +class ColumnSet(BaseModel): + id: str + value: str + + +class UploadResponse(BaseModel): + s3_key: str + + class DataType(BaseModel): + id: str display_name: str value: str documentation: str @@ -929,10 +1026,10 @@ class DataType(BaseModel): class Column(BaseModel): - id: int + id: str name: str - database_id: int - table_id: int + database_id: str + table_id: str ord: int internal_name: str is_null_allowed: bool @@ -945,8 +1042,8 @@ class Column(BaseModel): median: Optional[float] = None concept: Optional[ConceptBrief] = None unit: Optional[UnitBrief] = None - enums: Optional[List[str]] = field(default_factory=list) - sets: Optional[List[str]] = field(default_factory=list) + enums: Optional[List[ColumnEnum]] = field(default_factory=list) + sets: Optional[List[ColumnSet]] = field(default_factory=list) index_length: Optional[int] = None length: Optional[int] = None data_length: Optional[int] = None @@ -958,10 +1055,10 @@ class Column(BaseModel): class ViewColumn(BaseModel): - id: int + id: str name: str ord: int - database_id: int + database_id: str internal_name: str type: ColumnType is_null_allowed: bool @@ -977,8 +1074,8 @@ class ViewColumn(BaseModel): class Table(BaseModel): - id: int - database_id: int + id: str + database_id: str name: str owner: UserBrief columns: List[Column] @@ -999,7 +1096,7 @@ class Table(BaseModel): class DatabaseBrief(BaseModel): - id: int + id: str name: str contact: UserBrief owner_id: str @@ -1012,7 +1109,7 @@ class DatabaseBrief(BaseModel): class Database(BaseModel): - id: int + id: str name: str owner: UserBrief contact: UserBrief @@ -1032,13 +1129,13 @@ class Database(BaseModel): class Unique(BaseModel): - id: int + id: str table: TableBrief columns: List[ColumnBrief] class ForeignKeyReference(BaseModel): - id: int + id: str foreign_key: ForeignKeyBrief column: ColumnBrief referenced_column: ColumnBrief @@ -1056,11 +1153,11 @@ class ReferenceType(str, Enum): class ForeignKeyBrief(BaseModel): - id: int + id: str class ForeignKey(BaseModel): - id: int + id: str name: str references: List[ForeignKeyReference] table: TableBrief @@ -1078,7 +1175,7 @@ class CreateForeignKey(BaseModel): class PrimaryKey(BaseModel): - id: int + id: str table: TableBrief column: ColumnBrief diff --git a/lib/python/dbrepo/api/mapper.py b/lib/python/dbrepo/api/mapper.py new file mode 100644 index 0000000000000000000000000000000000000000..c062b29923f17f18f8a9d21f5c1913df2b3bb3d4 --- /dev/null +++ b/lib/python/dbrepo/api/mapper.py @@ -0,0 +1,40 @@ +from dbrepo.api.dto import Subset, QueryDefinition, Database, Table, Image, Filter, Order +from dbrepo.api.exceptions import MalformedError + + +def query_to_subset(database: Database, image: Image, query: QueryDefinition) -> Subset: + if len(query.columns) < 1: + raise MalformedError(f'Failed to create view: no columns selected') + tables: [Table] = [table for table in database.tables if table.internal_name == query.table] + if len(tables) != 1: + raise MalformedError(f'Failed to create view: table name not found in database') + filtered_column_ids: [str] = [column.id for column in tables[0].columns if + column.internal_name in query.columns] + if len(filtered_column_ids) != len(query.columns): + raise MalformedError(f'Failed to create view: not all columns found in database') + filters = [] + if query.filter is not None: + for filter in query.filter: + # column_id + filter_column_ids: [str] = [column.id for column in tables[0].columns if + column.internal_name == filter.column] + if len(filter_column_ids) != 1: + raise MalformedError(f'Failed to create view: filtered column name not found in database') + # operator_id + filter_ops_ids: [str] = [op.id for op in image.operators if op.value == filter.operator] + if len(filter_ops_ids) != 1: + raise MalformedError(f'Failed to create view: filter operator not found in image') + filters.append(Filter(type=filter.type, + column_id=filter_column_ids[0], + operator_id=filter_ops_ids[0], + value=filter.value)) + order = None + if query.order is not None: + for order in query.order: + # column_id + order_column_ids: [str] = [column.id for column in tables[0].columns if + column.internal_name == order.column] + if len(order_column_ids) != 1: + raise MalformedError(f'Failed to create view: order column name not found in database') + order.append(Order(column_id=order_column_ids[0].id, direction=order.direction)) + return Subset(table_id=tables[0].id, columns=filtered_column_ids, filter=filters, order=order) diff --git a/lib/python/docs/index.rst b/lib/python/docs/index.rst index 8951bf165f7c5738843ccdcb011c8b932f1531e5..511a08b52d559b8dc252e593dd69c692aacabf6c 100644 --- a/lib/python/docs/index.rst +++ b/lib/python/docs/index.rst @@ -6,7 +6,7 @@ Pandas `DataFrame <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame provides an object-oriented API as well as low-level access to DBRepo services. .. note:: - The SDK has been implemented and documented for DBRepo version 1.6.5, earlier versions may be supported but are not tested for compatibility. + The SDK has been implemented and documented for DBRepo version 1.7.0, earlier versions may be supported but are not tested for compatibility. Quickstart ---------- diff --git a/lib/python/pyproject.toml b/lib/python/pyproject.toml index cbebfbc8a90c462e808d50def00390739c217b80..49b9bbb1b7e166bff6f58533fbd879559485e239 100644 --- a/lib/python/pyproject.toml +++ b/lib/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dbrepo" -version = "1.6.5" +version = "1.7.0" description = "DBRepo Python Library" keywords = [ "DBRepo", @@ -34,7 +34,7 @@ requires = [ build-backend = "setuptools.build_meta" [project.urls] -Homepage = "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/" +Homepage = "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/" Documentation = "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/python/" Issues = "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/issues" Source = "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/" \ No newline at end of file diff --git a/lib/python/pytest.ini b/lib/python/pytest.ini new file mode 100644 index 0000000000000000000000000000000000000000..21cb1c450f4c85de4ba416e0fe68ec9a93345aee --- /dev/null +++ b/lib/python/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +log_cli = 1 +log_level = info \ No newline at end of file diff --git a/lib/python/setup.py b/lib/python/setup.py index 19600afc0be83a18d00fff7a75cc082bb73408c1..4fff48185b04734932caad08d4aa06583730a52f 100644 --- a/lib/python/setup.py +++ b/lib/python/setup.py @@ -2,9 +2,9 @@ from distutils.core import setup setup(name="dbrepo", - version="1.6.5", + version="1.7.0", description="A library for communicating with DBRepo", - url="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/", + url="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/", author="Martin Weise", license="Apache-2.0", author_email="martin.weise@tuwien.ac.at", diff --git a/lib/python/tests/test_dtos.py b/lib/python/tests/test_dtos.py index 3f05e24081b45deb662afed4a3b342803b6ce56a..3e99135e8b97574502939204dd131730a9bd7689 100644 --- a/lib/python/tests/test_dtos.py +++ b/lib/python/tests/test_dtos.py @@ -35,9 +35,10 @@ dictConfig({ }) -class AnalyseUnitTest(unittest.TestCase): +class DtoUnitTest(unittest.TestCase): schemas = None models: [()] = [] + exclusions: [str] = ['EnumType'] found: int = 0 skipped: [str] = [] @@ -48,7 +49,7 @@ class AnalyseUnitTest(unittest.TestCase): self.found += 1 if not inspect.isclass(obj): continue - if f'{name}Dto' not in self.schemas: + if f'{name}Dto' not in self.schemas or name not in self.exclusions: logging.debug(f'skip model {name}: OpenAPI schema definition {name}Dto not found') self.skipped.append(f'{name}Dto') continue diff --git a/lib/python/tests/test_unit_analyse.py b/lib/python/tests/test_unit_analyse.py deleted file mode 100644 index 5ca2b8301cbb04f9e896436909c97b4873842612..0000000000000000000000000000000000000000 --- a/lib/python/tests/test_unit_analyse.py +++ /dev/null @@ -1,23 +0,0 @@ -import unittest -import requests_mock - -from dbrepo.RestClient import RestClient - -from dbrepo.api.dto import KeyAnalysis - - -class AnalyseUnitTest(unittest.TestCase): - - def test_analyse_keys_succeeds(self): - with requests_mock.Mocker() as mock: - exp = KeyAnalysis(keys={'id': 0, 'firstname': 1, 'lastname': 2}) - # mock - mock.get('/api/analyse/keys', json=exp.model_dump(), status_code=202) - # test - response = RestClient().analyse_keys(file_path='f705a7bd0cb2d5e37ab2b425036810a2', separator=',', - upload=False) - self.assertEqual(exp, response) - - -if __name__ == "__main__": - unittest.main() diff --git a/lib/python/tests/test_unit_concept.py b/lib/python/tests/test_unit_concept.py new file mode 100644 index 0000000000000000000000000000000000000000..75f8aa52387ee2de10d673fdd298135d8a0880b1 --- /dev/null +++ b/lib/python/tests/test_unit_concept.py @@ -0,0 +1,35 @@ +import unittest + +import requests_mock + +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import ConceptBrief +from dbrepo.api.exceptions import ResponseCodeError + + +class ContainerUnitTest(unittest.TestCase): + + def test_get_concepts_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [ConceptBrief(id="65586aef-f5b0-446f-b2e1-9dc2a3c0c359", + uri="http://dbpedia.org/page/Category:Precipitation", + name="Precipitation")] + # mock + mock.get('/api/concept', json=[exp[0].model_dump()]) + # test + response = RestClient().get_concepts() + self.assertEqual(exp, response) + + def test_get_concepts_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/concept', status_code=202) + # test + try: + RestClient().get_concepts() + except ResponseCodeError: + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_container.py b/lib/python/tests/test_unit_container.py index b7a35e6a4a714f38d3cb06841541b182a0c769e2..052e2aa524787184fecb72da29c677a616f2e9f4 100644 --- a/lib/python/tests/test_unit_container.py +++ b/lib/python/tests/test_unit_container.py @@ -1,15 +1,139 @@ import unittest import requests_mock -import datetime from dbrepo.RestClient import RestClient -from dbrepo.api.dto import Container, Image, ContainerBrief, ImageBrief, DataType -from dbrepo.api.exceptions import ResponseCodeError, NotExistsError +from dbrepo.api.dto import Container, Image, ContainerBrief, ImageBrief, DataType, Operator +from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, AuthenticationError, MalformedError, \ + ForbiddenError, NameExistsError class ContainerUnitTest(unittest.TestCase): + def test_create_container_succeeds(self): + with requests_mock.Mocker() as mock: + exp = Container(id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + name="MariaDB 10.11.3", + internal_name="mariadb_10_11_3", + host="data-db", + port=12345, + image=Image(id="b104648b-54d2-4d72-9834-8e0e6d428b39", + registry="docker.io", + name="mariadb", + version="10.11.3", + default_port=3306, + dialect="org.hibernate.dialect.MariaDBDialect", + driver_class="org.mariadb.jdbc.Driver", + jdbc_method="mariadb", + default=True, + operators=[ + Operator(id="0917b17e-5d68-4ddf-94f6-f178f74a0dae", + display_name="XOR", + value="XOR", + documentation="https://mariadb.com/kb/en/xor/")], + data_types=[ + DataType(id="22975809-5496-4d67-9fd4-6689f0030f82", + display_name="SERIAL", + value="serial", + documentation="https://mariadb.com/kb/en/bigint/", + is_quoted=False, + is_buildable=True)])) + # mock + mock.post('/api/container', json=exp.model_dump(), status_code=201) + # test + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + self.assertEqual(exp, response) + + def test_create_container_anonymous_fails(self): + # test + try: + response = RestClient().create_container(name='MariaDB 10.11.3', host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', privileged_password='dbrepo', + port=3306) + except AuthenticationError: + pass + + def test_create_container_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/container', status_code=400) + # test + try: + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + except MalformedError: + pass + + def test_create_container_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/container', status_code=403) + # test + try: + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + except ForbiddenError: + pass + + def test_create_container_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/container', status_code=404) + # test + try: + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + except NotExistsError: + pass + + def test_create_container_409_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/container', status_code=409) + # test + try: + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + except NameExistsError: + pass + + def test_create_container_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/container', status_code=200) + # test + try: + response = RestClient(username="foo", password="bar").create_container(name='MariaDB 10.11.3', + host='data-db2', + image_id="b104648b-54d2-4d72-9834-8e0e6d428b39", + privileged_username='root', + privileged_password='dbrepo', + port=3306) + except ResponseCodeError: + pass + def test_get_containers_empty_succeeds(self): with requests_mock.Mocker() as mock: # mock @@ -21,14 +145,14 @@ class ContainerUnitTest(unittest.TestCase): def test_get_containers_succeeds(self): with requests_mock.Mocker() as mock: exp = [ - ContainerBrief(id=1, + ContainerBrief(id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", name="MariaDB 10.11.3", internal_name="mariadb_10_11_3", running=True, - image=ImageBrief(id=1, + image=ImageBrief(id="b104648b-54d2-4d72-9834-8e0e6d428b39", name="mariadb", version="10.11.3", - jdbc_method="mariadb"), + default=True), hash="f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50") ] # mock @@ -49,15 +173,12 @@ class ContainerUnitTest(unittest.TestCase): def test_get_container_succeeds(self): with requests_mock.Mocker() as mock: - exp = Container(id=1, + exp = Container(id="", name="MariaDB 10.11.3", internal_name="mariadb_10_11_3", - running=True, host="data-db", port=12345, - sidecar_host="data-db-sidecar", - sidecar_port=3305, - image=Image(id=1, + image=Image(id="b104648b-54d2-4d72-9834-8e0e6d428b39", registry="docker.io", name="mariadb", version="10.11.3", @@ -65,27 +186,104 @@ class ContainerUnitTest(unittest.TestCase): dialect="org.hibernate.dialect.MariaDBDialect", driver_class="org.mariadb.jdbc.Driver", jdbc_method="mariadb", + default=True, + operators=[ + Operator(id="0917b17e-5d68-4ddf-94f6-f178f74a0dae", + display_name="XOR", + value="XOR", + documentation="https://mariadb.com/kb/en/xor/")], data_types=[ - DataType(display_name="SERIAL", value="serial", + DataType(id="22975809-5496-4d67-9fd4-6689f0030f82", + display_name="SERIAL", + value="serial", documentation="https://mariadb.com/kb/en/bigint/", - is_quoted=False, is_buildable=True)]), - hash="f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50") + is_quoted=False, + is_buildable=True)])) # mock - mock.get('/api/container/1', json=exp.model_dump()) + mock.get('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', json=exp.model_dump()) # test - response = RestClient().get_container(container_id=1) + response = RestClient().get_container(container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") self.assertEqual(exp, response) - def test_get_container_not_found_fails(self): + def test_get_container_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=404) + # test + try: + response = RestClient().get_container(container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except NotExistsError: + pass + + def test_get_container_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=401) + # test + try: + response = RestClient().get_container(container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except ResponseCodeError: + pass + + def test_delete_container_succeeds(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=202) + # test + RestClient(username='foo', password='bar').delete_container( + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + + def test_delete_container_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=400) + # test + try: + RestClient(username='foo', password='bar').delete_container( + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except MalformedError: + pass + + def test_delete_container_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=403) + # test + try: + RestClient(username='foo', password='bar').delete_container( + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except ForbiddenError: + pass + + def test_delete_container_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/container/1', status_code=404) + mock.delete('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=404) # test try: - response = RestClient().get_container(container_id=1) + RestClient(username='foo', password='bar').delete_container( + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") except NotExistsError: pass + def test_delete_container_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/container/44d811a8-4019-46ba-bd57-ea10a2eb0c74', status_code=200) + # test + try: + RestClient(username='foo', password='bar').delete_container( + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except ResponseCodeError: + pass + + def test_delete_container_anonymous_fails(self): + # test + try: + RestClient().delete_container(container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74") + except AuthenticationError: + pass + if __name__ == "__main__": unittest.main() diff --git a/lib/python/tests/test_unit_database.py b/lib/python/tests/test_unit_database.py index 203c296b9c86d9bca0fce4f3b433af298f6cd251..54a41cfbd79027fad93e5b2c570110ac17a4ea8f 100644 --- a/lib/python/tests/test_unit_database.py +++ b/lib/python/tests/test_unit_database.py @@ -1,12 +1,12 @@ import unittest import requests_mock -from pydantic_core import ValidationError from dbrepo.RestClient import RestClient from dbrepo.api.dto import Database, DatabaseAccess, AccessType, DatabaseBrief, UserBrief, \ ContainerBrief, ImageBrief -from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, ForbiddenError, MalformedError, AuthenticationError +from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, ForbiddenError, MalformedError, \ + AuthenticationError, QueryStoreError, ServiceConnectionError, ServiceError class DatabaseUnitTest(unittest.TestCase): @@ -22,24 +22,13 @@ class DatabaseUnitTest(unittest.TestCase): def test_get_databases_succeeds(self): exp = [ DatabaseBrief( - id=1, + id="6bd39359-b154-456d-b9c2-caa516a45732", name='test', owner_id='8638c043-5145-4be8-a3e4-4b79991b0a16', contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), internal_name='test_abcd', is_public=True, - is_schema_public=True, - container=ContainerBrief( - id=1, - name='MariaDB Galera 11.1.3', - internal_name='mariadb', - image=ImageBrief( - id=1, - name='mariadb', - version='11.2.2', - jdbc_method='mariadb' - ) - ) + is_schema_public=True ) ] with requests_mock.Mocker() as mock: @@ -49,9 +38,37 @@ class DatabaseUnitTest(unittest.TestCase): response = RestClient().get_databases() self.assertEqual(exp, response) + def test_get_databases_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database', status_code=401) + # test + try: + RestClient().get_databases() + except ResponseCodeError: + pass + + def test_get_databases_count_succeeds(self): + with requests_mock.Mocker() as mock: + # mock + mock.head('/api/database', headers={'X-Count': '100'}) + # test + response = RestClient().get_databases_count() + self.assertEqual(100, response) + + def test_get_databases_count_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head('/api/database', status_code=401) + # test + try: + RestClient().get_databases_count() + except ResponseCodeError: + pass + def test_get_database_succeeds(self): exp = Database( - id=1, + id="6bd39359-b154-456d-b9c2-caa516a45732", name='test', owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), @@ -60,53 +77,56 @@ class DatabaseUnitTest(unittest.TestCase): is_public=True, is_schema_public=True, container=ContainerBrief( - id=1, + id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", name='MariaDB Galera 11.1.3', internal_name='mariadb', image=ImageBrief( - id=1, + id="b104648b-54d2-4d72-9834-8e0e6d428b39", name='mariadb', version='11.2.2', - jdbc_method='mariadb' - ) + default=True) ) ) with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1', json=exp.model_dump()) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732', json=exp.model_dump()) # test - response = RestClient().get_database(1) + response = RestClient().get_database(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(exp, response) - def test_get_database_not_found_fails(self): + def test_get_database_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1', status_code=404) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732', status_code=403) # test try: - response = RestClient().get_database(1) - except NotExistsError as e: + RestClient().get_database(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ForbiddenError as e: pass - def test_get_database_invalid_dto_fails(self): - try: - exp = Database() - except ValidationError as e: - pass + def test_get_database_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732', status_code=404) + # test + try: + RestClient().get_database(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except NotExistsError as e: + pass - def test_get_database_unauthorized_fails(self): + def test_get_database_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1', status_code=401) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732', status_code=202) # test try: - response = RestClient().get_database(1) + RestClient().get_database(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except ResponseCodeError as e: pass def test_create_database_succeeds(self): exp = Database( - id=1, + id="6bd39359-b154-456d-b9c2-caa516a45732", name='test', owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), @@ -115,15 +135,14 @@ class DatabaseUnitTest(unittest.TestCase): is_public=True, is_schema_public=True, container=ContainerBrief( - id=1, + id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", name='MariaDB Galera 11.1.3', internal_name='mariadb', image=ImageBrief( - id=1, + id="b104648b-54d2-4d72-9834-8e0e6d428b39", name='mariadb', version='11.2.2', - jdbc_method='mariadb' - ) + default=True) ) ) with requests_mock.Mocker() as mock: @@ -131,44 +150,110 @@ class DatabaseUnitTest(unittest.TestCase): mock.post('/api/database', json=exp.model_dump(), status_code=201) # test client = RestClient(username="a", password="b") - response = client.create_database(name='test', container_id=1, is_public=True) + response = RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) self.assertEqual(response.name, 'test') - def test_create_database_not_allowed_fails(self): + def test_create_database_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database', status_code=400) + # test + try: + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) + except MalformedError as e: + pass + + def test_create_database_403_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/database', status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.create_database(name='test', container_id=1, is_public=True) + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) except ForbiddenError as e: pass - def test_create_database_not_found_fails(self): + def test_create_database_404_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/database', status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.create_database(name='test', container_id=1, is_public=True) + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) except NotExistsError as e: pass - def test_create_database_not_auth_fails(self): + def test_create_database_409_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database', status_code=409) + # test + try: + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) + except QueryStoreError as e: + pass + + def test_create_database_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database', status_code=502) + # test + try: + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) + except ServiceConnectionError as e: + pass + + def test_create_database_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database', status_code=503) + # test + try: + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) + except ServiceError as e: + pass + + def test_create_database_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database', status_code=202) + # test + try: + RestClient(username="a", password="b").create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) + except ResponseCodeError as e: + pass + + def test_create_database_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/database', status_code=404) # test try: - response = RestClient().create_database(name='test', container_id=1, is_public=True) + RestClient().create_database(name='test', + container_id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + is_public=True) except AuthenticationError as e: pass def test_update_database_visibility_succeeds(self): exp = Database( - id=1, + id="6bd39359-b154-456d-b9c2-caa516a45732", name='test', owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), @@ -177,60 +262,116 @@ class DatabaseUnitTest(unittest.TestCase): is_public=True, is_schema_public=True, container=ContainerBrief( - id=1, + id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", name='MariaDB Galera 11.1.3', internal_name='mariadb', image=ImageBrief( - id=1, + id="b104648b-54d2-4d72-9834-8e0e6d428b39", name='mariadb', version='11.2.2', - jdbc_method='mariadb' - ) + default=True) ) ) with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/visibility', json=exp.model_dump(), status_code=202) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', json=exp.model_dump(), + status_code=202) # test - client = RestClient(username="a", password="b") - response = client.update_database_visibility(database_id=1, is_public=True, is_schema_public=True) + response = RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) self.assertEqual(response.is_public, True) - def test_update_database_visibility_not_allowed_fails(self): + def test_update_database_visibility_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/visibility', status_code=403) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=400) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_visibility(database_id=1, is_public=True, is_schema_public=True) + RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) + except MalformedError: + pass + + def test_update_database_visibility_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=403) + # test + try: + response = RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) except ForbiddenError: pass - def test_update_database_visibility_not_found_fails(self): + def test_update_database_visibility_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/visibility', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_visibility(database_id=1, is_public=True, is_schema_public=True) + response = RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) except NotExistsError: pass - def test_update_database_visibility_not_auth_fails(self): + def test_update_database_visibility_502_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=502) # test try: - response = RestClient().update_database_visibility(database_id=1, is_public=True, is_schema_public=True) - except AuthenticationError: + RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) + except ServiceConnectionError: pass + def test_update_database_visibility_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=503) + # test + try: + RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) + except ServiceError: + pass + + def test_update_database_visibility_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/visibility', status_code=200) + # test + try: + RestClient(username="a", password="b").update_database_visibility( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, + is_schema_public=True) + except ResponseCodeError: + pass + + def test_update_database_visibility_anonymous_fails(self): + # test + try: + RestClient().update_database_visibility(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + is_public=True, is_schema_public=True) + except AuthenticationError: + pass + def test_update_database_owner_succeeds(self): exp = Database( - id=1, + id="6bd39359-b154-456d-b9c2-caa516a45732", name='test', owner=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='mweise'), contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), @@ -239,258 +380,643 @@ class DatabaseUnitTest(unittest.TestCase): is_public=True, is_schema_public=True, container=ContainerBrief( - id=1, + id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", name='MariaDB Galera 11.1.3', internal_name='mariadb', image=ImageBrief( - id=1, + id="b104648b-54d2-4d72-9834-8e0e6d428b39", name='mariadb', version='11.2.2', - jdbc_method='mariadb' - ) + default=True) ) ) with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/owner', json=exp.model_dump(), status_code=202) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', json=exp.model_dump(), status_code=202) # test client = RestClient(username="a", password="b") - response = client.update_database_owner(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + response = RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') self.assertEqual(response.owner.id, 'abdbf897-e599-4e5a-a3f0-7529884ea011') - def test_update_database_owner_not_allowed_fails(self): + def test_update_database_owner_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/owner', status_code=403) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=400) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_owner(database_id=1, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except MalformedError: + pass + + def test_update_database_owner_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=403) + # test + try: + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except ForbiddenError: pass - def test_update_database_owner_not_found_fails(self): + def test_update_database_owner_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/owner', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_owner(database_id=1, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except NotExistsError: pass - def test_update_database_owner_not_auth_fails(self): + def test_update_database_owner_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=502) + # test + try: + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceConnectionError: + pass + + def test_update_database_owner_503_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/owner', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=503) # test try: - response = RestClient().update_database_owner(database_id=1, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceError: + pass + + def test_update_database_owner_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=200) + # test + try: + RestClient(username="a", password="b").update_database_owner( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ResponseCodeError: + pass + + def test_update_database_owner_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/owner', status_code=404) + # test + try: + RestClient().update_database_owner(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except AuthenticationError: pass + def test_update_database_schema_succeeds(self): + exp = DatabaseBrief( + id="6bd39359-b154-456d-b9c2-caa516a45732", + name='test', + owner_id='8638c043-5145-4be8-a3e4-4b79991b0a16', + contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + internal_name='test_abcd', + is_public=True, + is_schema_public=True + ) + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json=exp.model_dump()) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', json=exp.model_dump()) + # test + response = RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + self.assertEqual(exp, response) + + def test_update_database_schema_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=400) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except MalformedError: + pass + + def test_update_database_schema_view_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=400) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except MalformedError: + pass + + def test_update_database_schema_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=403) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ForbiddenError: + pass + + def test_update_database_schema_view_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=403) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ForbiddenError: + pass + + def test_update_database_schema_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=404) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except NotExistsError: + pass + + def test_update_database_schema_view_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=404) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except NotExistsError: + pass + + def test_update_database_schema_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=502) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ServiceConnectionError: + pass + + def test_update_database_schema_view_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=502) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ServiceConnectionError: + pass + + def test_update_database_schema_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=503) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ServiceError: + pass + + def test_update_database_schema_view_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=503) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ServiceError: + pass + + def test_update_database_schema_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', status_code=202) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + + def test_update_database_schema_view_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/table', json={}, status_code=200) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/metadata/view', status_code=202) + # test + try: + RestClient(username='foo', password='bar').update_database_schema( + database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + + def test_update_database_schema_anonymous_fails(self): + # test + try: + RestClient().update_database_schema(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except AuthenticationError: + pass + def test_get_database_access_succeeds(self): exp = DatabaseAccess(type=AccessType.READ, user=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='other')) with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/access', json=exp.model_dump()) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access', json=exp.model_dump()) # test - response = RestClient().get_database_access(database_id=1) + response = RestClient().get_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(response, AccessType.READ) - def test_get_database_access_not_allowed_fails(self): + def test_get_database_access_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/access', status_code=403) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access', status_code=403) # test try: - response = RestClient().get_database_access(database_id=1) + RestClient().get_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except ForbiddenError: pass - def test_get_database_access_not_found_fails(self): + def test_get_database_access_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/access', status_code=404) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access', status_code=404) # test try: - response = RestClient().get_database_access(database_id=1) + RestClient().get_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except NotExistsError: pass + def test_get_database_access_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access', status_code=202) + # test + try: + RestClient().get_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + def test_create_database_access_succeeds(self): exp = DatabaseAccess(type=AccessType.READ, user=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='other')) with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', json=exp.model_dump(), + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + json=exp.model_dump(), status_code=202) # test - client = RestClient(username="a", password="b") - response = client.create_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + response = RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') self.assertEqual(response, exp.type) - def test_create_database_access_malformed_fails(self): + def test_create_database_access_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=400) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=400) # test try: - client = RestClient(username="a", password="b") - response = client.create_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except MalformedError: pass - def test_create_database_access_not_auth_fails(self): + def test_create_database_access_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=400) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=400) # test try: - response = RestClient().create_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient().create_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except AuthenticationError: pass - def test_create_database_access_not_allowed_fails(self): + def test_create_database_access_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=403) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.create_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except ForbiddenError: pass - def test_create_database_access_not_found_fails(self): + def test_create_database_access_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=404) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.create_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except NotExistsError: pass + def test_create_database_access_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=502) + # test + try: + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceConnectionError: + pass + + def test_create_database_access_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=503) + # test + try: + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceError: + pass + + def test_create_database_access_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=200) + # test + try: + RestClient(username="a", password="b").create_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ResponseCodeError: + pass + def test_update_database_access_succeeds(self): exp = DatabaseAccess(type=AccessType.READ, user=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='other')) with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', json=exp.model_dump(), + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + json=exp.model_dump(), status_code=202) # test - client = RestClient(username="a", password="b") - response = client.update_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + response = RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') self.assertEqual(response, exp.type) - def test_update_database_access_malformed_fails(self): + def test_update_database_access_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=400) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=400) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except MalformedError: pass - def test_update_database_access_not_allowed_fails(self): + def test_update_database_access_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=403) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except ForbiddenError: pass - def test_update_database_access_not_found_fails(self): + def test_update_database_access_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.update_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except NotExistsError: pass - def test_update_database_access_not_auth_fails(self): + def test_update_database_access_502_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=502) # test try: - response = RestClient().update_database_access(database_id=1, type=AccessType.READ, - user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceConnectionError: + pass + + def test_update_database_access_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=503) + # test + try: + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceError: + pass + + def test_update_database_access_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=200) + # test + try: + RestClient(username="a", password="b").update_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ResponseCodeError: + pass + + def test_update_database_access_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=404) + # test + try: + RestClient().update_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=AccessType.READ, + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except AuthenticationError: pass def test_delete_database_access_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=202) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=202) # test client = RestClient(username="a", password="b") - client.delete_database_access(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') - def test_delete_database_access_malformed_fails(self): + def test_delete_database_access_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=400) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=400) # test try: - client = RestClient(username="a", password="b") - client.delete_database_access(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except MalformedError: pass - def test_delete_database_access_not_allowed_fails(self): + def test_delete_database_access_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=403) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=403) # test try: - client = RestClient(username="a", password="b") - client.delete_database_access(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except ForbiddenError: pass - def test_delete_database_access_not_found_fails(self): + def test_delete_database_access_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=404) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=404) # test try: - client = RestClient(username="a", password="b") - client.delete_database_access(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except NotExistsError: pass - def test_delete_database_access_not_auth_fails(self): + def test_delete_database_access_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=502) + # test + try: + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceConnectionError: + pass + + def test_delete_database_access_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=503) + # test + try: + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ServiceError: + pass + + def test_delete_database_access_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=200) + # test + try: + RestClient(username="a", password="b").delete_database_access( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + except ResponseCodeError: + pass + + def test_delete_database_access_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/access/abdbf897-e599-4e5a-a3f0-7529884ea011', status_code=404) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/access/abdbf897-e599-4e5a-a3f0-7529884ea011', + status_code=404) # test try: - RestClient().delete_database_access(database_id=1, user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') + RestClient().delete_database_access(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + user_id='abdbf897-e599-4e5a-a3f0-7529884ea011') except AuthenticationError: pass diff --git a/lib/python/tests/test_unit_identifier.py b/lib/python/tests/test_unit_identifier.py index 8726d05ef23108c2a0a8fb9e8c4cd65052e19b1e..9ac386437c29f4c65f6879d1a1f0c98641652652 100644 --- a/lib/python/tests/test_unit_identifier.py +++ b/lib/python/tests/test_unit_identifier.py @@ -6,28 +6,36 @@ from dbrepo.RestClient import RestClient from dbrepo.api.dto import Identifier, IdentifierType, SaveIdentifierTitle, Creator, IdentifierTitle, \ IdentifierDescription, SaveIdentifierDescription, Language, SaveIdentifierFunder, SaveRelatedIdentifier, \ RelatedIdentifierRelation, RelatedIdentifierType, IdentifierFunder, RelatedIdentifier, UserBrief, \ - IdentifierStatusType, CreateIdentifierCreator -from dbrepo.api.exceptions import MalformedError, ForbiddenError, NotExistsError, AuthenticationError + IdentifierStatusType, CreateIdentifierCreator, CreateIdentifierTitle, CreateIdentifierFunder, \ + CreateRelatedIdentifier, CreateIdentifierDescription, SaveIdentifierCreator +from dbrepo.api.exceptions import MalformedError, ForbiddenError, NotExistsError, AuthenticationError, \ + ServiceConnectionError, ServiceError, ResponseCodeError, FormatNotAvailable, RequestError class IdentifierUnitTest(unittest.TestCase): def test_create_identifier_succeeds(self): with requests_mock.Mocker() as mock: - exp = Identifier(id=10, - database_id=1, - view_id=32, + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", publication_year=2024, publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, - descriptions=[IdentifierDescription(id=2, description='Test Description')], - titles=[IdentifierTitle(id=3, title='Test Title')], - funders=[IdentifierFunder(id=4, funder_name='FWF')], + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="ffaf9e0c-c37d-4655-bd68-80cd991cf24c", + title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], related_identifiers=[ - RelatedIdentifier(id=7, value='10.12345/abc', relation=RelatedIdentifierRelation.CITES, + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, type=RelatedIdentifierType.DOI)], - creators=[Creator(id=5, creator_name='Carberry, Josiah')], + creators=[Creator(id="70539dff-c549-4c95-8257-9c750decf232", + creator_name='Carberry, Josiah')], status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) # mock @@ -35,105 +43,686 @@ class IdentifierUnitTest(unittest.TestCase): # test client = RestClient(username="a", password="b") response = client.create_identifier( - database_id=1, type=IdentifierType.VIEW, - titles=[SaveIdentifierTitle(title='Test Title')], + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], publisher='TU Wien', publication_year=2024, language=Language.EN, - funders=[SaveIdentifierFunder(funder_name='FWF')], - related_identifiers=[SaveRelatedIdentifier(value='10.12345/abc', - relation=RelatedIdentifierRelation.CITES, - type=RelatedIdentifierType.DOI)], - descriptions=[SaveIdentifierDescription(description='Test Description')], + funders=[CreateIdentifierFunder(funder_name='FWF')], + related_identifiers=[CreateRelatedIdentifier(value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[CreateIdentifierDescription(description='Test Description')], creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) self.assertEqual(exp, response) - def test_create_identifier_malformed_fails(self): + def test_create_identifier_400_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/identifier', status_code=400) # test try: client = RestClient(username="a", password="b") - response = client.create_identifier( - database_id=1, type=IdentifierType.VIEW, - titles=[SaveIdentifierTitle(title='Test Title')], - descriptions=[SaveIdentifierDescription(description='Test')], + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], publisher='TU Wien', publication_year=2024, creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) except MalformedError: pass - def test_create_identifier_not_allowed_fails(self): + def test_create_identifier_403_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/identifier', status_code=403) # test try: client = RestClient(username="a", password="b") - response = client.create_identifier( - database_id=1, type=IdentifierType.VIEW, - titles=[SaveIdentifierTitle(title='Test Title')], - descriptions=[SaveIdentifierDescription(description='Test')], + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], publisher='TU Wien', publication_year=2024, creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) except ForbiddenError: pass - def test_create_identifier_not_found_fails(self): + def test_create_identifier_404_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/identifier', status_code=404) # test try: client = RestClient(username="a", password="b") - response = client.create_identifier( - database_id=1, type=IdentifierType.VIEW, - titles=[SaveIdentifierTitle(title='Test Title')], - descriptions=[SaveIdentifierDescription(description='Test')], + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], publisher='TU Wien', publication_year=2024, creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) except NotExistsError: pass - def test_create_identifier_not_auth_fails(self): + def test_create_identifier_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/identifier', status_code=502) + # test + try: + client = RestClient(username="a", password="b") + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], + publisher='TU Wien', publication_year=2024, + creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) + except ServiceConnectionError: + pass + + def test_create_identifier_503_fails(self): with requests_mock.Mocker() as mock: # mock mock.post('/api/identifier', status_code=503) # test try: - response = RestClient().create_identifier( - database_id=1, type=IdentifierType.VIEW, - titles=[SaveIdentifierTitle(title='Test Title')], - descriptions=[SaveIdentifierDescription(description='Test')], + client = RestClient(username="a", password="b") + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], + publisher='TU Wien', publication_year=2024, + creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) + except ServiceError: + pass + + def test_create_identifier_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/identifier', status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], publisher='TU Wien', publication_year=2024, creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) - except AuthenticationError: + except ResponseCodeError: pass - def test_get_identifiers_succeeds(self): + def test_create_identifier_anonymous_fails(self): + # test + try: + RestClient().create_identifier( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[CreateIdentifierTitle(title='Test Title')], + descriptions=[CreateIdentifierDescription(description='Test')], + publisher='TU Wien', publication_year=2024, + creators=[CreateIdentifierCreator(creator_name='Carberry, Josiah')]) + except AuthenticationError: + pass + + def test_get_identifiers_view_succeeds(self): with requests_mock.Mocker() as mock: - exp = [Identifier(id=10, - database_id=1, - view_id=32, + exp = [Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", publication_year=2024, publisher='TU Wien', type=IdentifierType.VIEW, language=Language.EN, - descriptions=[IdentifierDescription(id=2, description='Test Description')], - titles=[IdentifierTitle(id=3, title='Test Title')], - funders=[IdentifierFunder(id=4, funder_name='FWF')], - related_identifiers=[RelatedIdentifier(id=7, value='10.12345/abc', - relation=RelatedIdentifierRelation.CITES, - type=RelatedIdentifierType.DOI)], - creators=[Creator(id=5, creator_name='Carberry, Josiah')], + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[Creator(id="70539dff-c549-4c95-8257-9c750decf232", + creator_name='Carberry, Josiah')], status=IdentifierStatusType.PUBLISHED, owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'))] # mock - mock.get('/api/identifiers', json=[exp[0].model_dump()], headers={"Accept": "application/json"}) + mock.get('/api/identifier', json=[exp[0].model_dump()], headers={"Accept": "application/json"}) + # test + response = RestClient().get_identifiers(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + type=IdentifierType.VIEW, + status=IdentifierStatusType.PUBLISHED) + self.assertEqual(exp, response) + + def test_get_identifiers_subset_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [] + # mock + mock.get('/api/identifier', json=[], headers={"Accept": "application/json"}) + # test + response = RestClient().get_identifiers(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="0831bf54-9dd9-46fe-8c2c-c539332ea177") + self.assertEqual(exp, response) + + def test_get_identifiers_table_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [] + # mock + mock.get('/api/identifier', json=[], headers={"Accept": "application/json"}) + # test + response = RestClient().get_identifiers(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + self.assertEqual(exp, response) + + def test_get_identifiers_view_param_database_fails(self): + # test + try: + RestClient().get_identifiers(view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c") + except RequestError: + pass + + def test_get_identifiers_subset_param_database_fails(self): + # test + try: + RestClient().get_identifiers(subset_id="0831bf54-9dd9-46fe-8c2c-c539332ea177") + except RequestError: + pass + + def test_get_identifiers_table_param_database_fails(self): + # test + try: + RestClient().get_identifiers(table_id="b3230b86-4743-498d-9015-3fad58049692") + except RequestError: + pass + + def test_get_identifiers_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/identifier', status_code=404) + # test + try: + RestClient().get_identifiers() + except NotExistsError: + pass + + def test_get_identifiers_406_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/identifier', status_code=406) + # test + try: + RestClient().get_identifiers() + except FormatNotAvailable: + pass + + def test_get_identifiers_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/identifier', status_code=202) + # test + try: + RestClient().get_identifiers() + except ResponseCodeError: + pass + + def test_update_identifier_succeeds(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[Creator(id="70539dff-c549-4c95-8257-9c750decf232", + creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', json=exp.model_dump(), status_code=202) + # test + client = RestClient(username="a", password="b") + response = client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[ + SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + self.assertEqual(exp, response) + + def test_update_identifier_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=400) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except MalformedError: + pass + + def test_update_identifier_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=403) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except ForbiddenError: + pass + + def test_update_identifier_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=404) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except NotExistsError: + pass + + def test_update_identifier_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=502) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except ServiceConnectionError: + pass + + def test_update_identifier_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=503) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except ServiceError: + pass + + def test_update_identifier_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3', status_code=200) + # test + client = RestClient(username="a", password="b") + try: + client.update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except ResponseCodeError: + pass + + def test_update_identifier_anonymous_fails(self): + # test + try: + RestClient().update_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=IdentifierType.VIEW, + titles=[SaveIdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + title='Test Title')], + publisher='TU Wien', publication_year=2024, + language=Language.EN, + funders=[SaveIdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", + funder_name='FWF')], + related_identifiers=[ + SaveRelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", + value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + descriptions=[ + SaveIdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + creators=[SaveIdentifierCreator(id="6bf894bc-8f55-4b5d-83cf-198b29253260", + creator_name='Carberry, Josiah')]) + except AuthenticationError: + pass + + def test_publish_identifier_succeeds(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=202) # test - response = RestClient().get_identifiers() + client = RestClient(username="a", password="b") + response = client.publish_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") self.assertEqual(exp, response) + def test_publish_identifier_400_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=400) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except MalformedError: + pass + + def test_publish_identifier_403_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=403) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except ForbiddenError: + pass + + def test_publish_identifier_404_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=404) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except NotExistsError: + pass + + def test_publish_identifier_502_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=502) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except ServiceConnectionError: + pass + + def test_publish_identifier_503_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=503) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except ServiceError: + pass + + def test_publish_identifier_unknown_fails(self): + with requests_mock.Mocker() as mock: + exp = Identifier(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="e5229d24-584a-43e8-b9f6-d349c3053f9c", + publication_year=2024, + publisher='TU Wien', + type=IdentifierType.VIEW, + language=Language.EN, + descriptions=[IdentifierDescription(id="d8bdc933-655c-46bd-9903-ede3928a304b", + description='Test Description')], + titles=[IdentifierTitle(id="f6171539-a479-4829-9b9b-a6b474e1c7d3", title='Test Title')], + funders=[IdentifierFunder(id="d0dc801d-cfb7-4b07-9b20-2d7af39c913c", funder_name='FWF')], + related_identifiers=[ + RelatedIdentifier(id="6655eba7-b0ac-4bc4-9f09-6355fec8d815", value='10.12345/abc', + relation=RelatedIdentifierRelation.CITES, + type=RelatedIdentifierType.DOI)], + creators=[ + Creator(id="70539dff-c549-4c95-8257-9c750decf232", creator_name='Carberry, Josiah')], + status=IdentifierStatusType.PUBLISHED, + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')) + # mock + mock.put('/api/identifier/f6171539-a479-4829-9b9b-a6b474e1c7d3/publish', json=exp.model_dump(), status_code=200) + # test + try: + RestClient(username="a", password="b").publish_identifier( + identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except ResponseCodeError: + pass + + def test_publish_identifier_anonymous_fails(self): + # test + try: + RestClient().publish_identifier(identifier_id="f6171539-a479-4829-9b9b-a6b474e1c7d3") + except AuthenticationError: + pass + if __name__ == "__main__": unittest.main() diff --git a/lib/python/tests/test_unit_image.py b/lib/python/tests/test_unit_image.py new file mode 100644 index 0000000000000000000000000000000000000000..8930303e5399184f9d976ca7eea4540c7df24541 --- /dev/null +++ b/lib/python/tests/test_unit_image.py @@ -0,0 +1,33 @@ +import unittest + +import requests_mock + +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import ImageBrief + + +class ImageUnitTest(unittest.TestCase): + + def test_get_images_empty_succeeds(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/image', json=[]) + # test + response = RestClient().get_images() + self.assertEqual([], response) + + def test_get_images_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [ImageBrief(id="96c1876a-7473-44fd-8115-19ca6fde32d4", + name="mariadb", + version="11.1.3", + default=False)] + # mock + mock.get('/api/image', json=[exp[0].model_dump()]) + # test + response = RestClient().get_images() + self.assertEqual(exp, response) + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_jwt.py b/lib/python/tests/test_unit_jwt.py deleted file mode 100644 index 4a0748fe38d4799ff9e1bf3eda8d41ba6f48e39f..0000000000000000000000000000000000000000 --- a/lib/python/tests/test_unit_jwt.py +++ /dev/null @@ -1,65 +0,0 @@ -import json -from unittest import TestCase, main - -import requests_mock - -from dbrepo.RestClient import RestClient -from dbrepo.api.dto import JwtAuth - - -class DatabaseUnitTest(TestCase): - - def test_get_jwt_auth_succeeds(self): - exp = JwtAuth(access_token='eyABC', - refresh_token='ey123', - id_token='eyXYZ', - expires_in=3600, - refresh_expires_in=36000, - not_before_policy=0, - scope='openid', - session_state='4604e4b1-2163-42c3-806d-3be2e426c3a5', - token_type='Bearer') - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', json=exp.model_dump(), status_code=202) - # test - response = RestClient().get_jwt_auth(username='foo', password='bar') - self.assertEqual(exp, response) - - def test_get_jwt_auth_empty_succeeds(self): - exp = JwtAuth(access_token='eyABC', - refresh_token='ey123', - id_token='eyXYZ', - expires_in=3600, - refresh_expires_in=36000, - not_before_policy=0, - scope='openid', - session_state='4604e4b1-2163-42c3-806d-3be2e426c3a5', - token_type='Bearer') - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', json=exp.model_dump(), status_code=202) - # test - response = RestClient().get_jwt_auth() - self.assertEqual(exp, response) - - def test_refresh_jwt_auth_succeeds(self): - exp = JwtAuth(access_token='eyABC', - refresh_token='ey123', - id_token='eyXYZ', - expires_in=3600, - refresh_expires_in=36000, - not_before_policy=0, - scope='openid', - session_state='4604e4b1-2163-42c3-806d-3be2e426c3a5', - token_type='Bearer') - with requests_mock.Mocker() as mock: - # mock - mock.put('/api/user/token', json=exp.model_dump(), status_code=202) - # test - response = RestClient().refresh_jwt_auth(refresh_token='ey123') - self.assertEqual(exp, response) - - -if __name__ == "__main__": - main() diff --git a/lib/python/tests/test_unit_license.py b/lib/python/tests/test_unit_license.py index f64ed76d31e3fd797e96add601d9f690beb23d14..b2bb3a79f372157b508d790b4c5e43e9bd623bf6 100644 --- a/lib/python/tests/test_unit_license.py +++ b/lib/python/tests/test_unit_license.py @@ -3,8 +3,8 @@ import unittest import requests_mock from dbrepo.RestClient import RestClient - from dbrepo.api.dto import License +from dbrepo.api.exceptions import ResponseCodeError class LicenseUnitTest(unittest.TestCase): @@ -27,6 +27,16 @@ class LicenseUnitTest(unittest.TestCase): response = RestClient().get_licenses() self.assertEqual(exp, response) + def test_get_licenses_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/license', status_code=202) + # test + try: + RestClient().get_licenses() + except ResponseCodeError: + pass + if __name__ == "__main__": unittest.main() diff --git a/lib/python/tests/test_unit_messages.py b/lib/python/tests/test_unit_messages.py new file mode 100644 index 0000000000000000000000000000000000000000..7d5d26e39d325d6d20587fd066d3b778bff598b6 --- /dev/null +++ b/lib/python/tests/test_unit_messages.py @@ -0,0 +1,30 @@ +import unittest + +import requests_mock + +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import Message + + +class ImageUnitTest(unittest.TestCase): + + def test_get_message_empty_succeeds(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/message', json=[]) + # test + response = RestClient().get_messages() + self.assertEqual([], response) + + def test_get_images_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [Message(id="a456d7f0-9d42-48a8-bf5b-4ead85279e0e", type="info")] + # mock + mock.get('/api/message', json=[exp[0].model_dump()]) + # test + response = RestClient().get_messages() + self.assertEqual(exp, response) + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_ontology.py b/lib/python/tests/test_unit_ontology.py new file mode 100644 index 0000000000000000000000000000000000000000..55565b6cd2a1e03172e0fda0dd61def48502434a --- /dev/null +++ b/lib/python/tests/test_unit_ontology.py @@ -0,0 +1,35 @@ +import unittest + +import requests_mock + +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import OntologyBrief + + +class OntologyUnitTest(unittest.TestCase): + + def test_get_ontologies_empty_succeeds(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/ontology', json=[]) + # test + response = RestClient().get_ontologies() + self.assertEqual([], response) + + def test_get_ontologies_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [OntologyBrief(id="ec6ee082-b6b2-4d65-b931-2f1735f25759", + uri="http://www.ontology-of-units-of-measure.org/resource/om-2/", + prefix="om", + sparql=False, + rdf=True, + uri_pattern="http://www.ontology-of-units-of-measure.org/resource/om-2/.*")] + # mock + mock.get('/api/ontology', json=[exp[0].model_dump()]) + # test + response = RestClient().get_ontologies() + self.assertEqual(exp, response) + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_query.py b/lib/python/tests/test_unit_query.py index 6dff04867e33062f09ea151b8651f4362ce06bf8..44f165b9b0ba36ab2375ddcd78c6c50cd363c7d9 100644 --- a/lib/python/tests/test_unit_query.py +++ b/lib/python/tests/test_unit_query.py @@ -1,176 +1,562 @@ +import datetime import json import unittest import requests_mock -import datetime - -from dbrepo.RestClient import RestClient from pandas import DataFrame -from dbrepo.api.dto import Query, User, UserAttributes, QueryType, UserBrief -from dbrepo.api.exceptions import MalformedError, NotExistsError, ForbiddenError +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import Query, QueryType, UserBrief, QueryDefinition, FilterDefinition, FilterType, Database, \ + ContainerBrief, ImageBrief, Image, Table, Constraints, PrimaryKey, TableBrief, ColumnBrief, ColumnType, \ + Column, Operator +from dbrepo.api.exceptions import MalformedError, NotExistsError, ForbiddenError, QueryStoreError, FormatNotAvailable, \ + ServiceError, ResponseCodeError, AuthenticationError class QueryUnitTest(unittest.TestCase): + database = Database( + id="6bd39359-b154-456d-b9c2-caa516a45732", + name='test', + owner=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='mweise'), + contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + exchange_name='dbrepo', + internal_name='test_abcd', + is_public=True, + is_schema_public=True, + tables=[Table(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + name="Some Table", + description="Test Table", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + internal_name="some_table", + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + is_versioned=True, + queue_name='test', + routing_key='dbrepo.test_database_1234.test', + is_public=True, + is_schema_public=True, + constraints=Constraints(uniques=[], + foreign_keys=[], + checks=[], + primary_key=[PrimaryKey(id="1516310f-ecb5-4614-abe2-3b96114e1484", + table=TableBrief( + id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='Other', + internal_name='other', + description=None, + is_versioned=True, + is_public=True, + is_schema_public=True, + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16'), + column=ColumnBrief( + id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='id', + alias=None, + internal_name='id', + type=ColumnType.BIGINT))]), + columns=[Column(id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", + name="ID", + ord=0, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + internal_name="id", + type=ColumnType.BIGINT, + is_null_allowed=False), + Column(id="85de93a8-834c-4cf4-9d34-f80ebd97e606", + name="Username", + ord=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + internal_name="username", + type=ColumnType.VARCHAR, + is_null_allowed=False) + ])], + container=ContainerBrief(id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + name='MariaDB Galera 11.1.3', + internal_name='mariadb', + image=ImageBrief(id="b104648b-54d2-4d72-9834-8e0e6d428b39", + name='mariadb', + version='11.2.2', + default=True))) + image = Image(id="b104648b-54d2-4d72-9834-8e0e6d428b39", + name='mariadb', + version='11.2.2', + default=True, + data_types=[], + operators=[Operator(id="6a96bd99-be3d-4d56-8c38-b14bdfead634", + display_name="IN", + value="IN", + documentation="https://mariadb.com/kb/en/in/")]) def test_create_subset_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.post('/api/database/1/subset', json=json.dumps(exp), headers={'X-Id': '1'}, status_code=201) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', json=json.dumps(exp), + headers={'X-Id': '1'}, status_code=201) # test client = RestClient(username="a", password="b") - response = client.create_subset(database_id=1, page=0, size=10, - query="SELECT id, username FROM some_table WHERE id IN (1,2)") + response = client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", page=0, size=10, + timestamp=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, datetime.timezone.utc), + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) self.assertTrue(DataFrame.equals(df, response)) - def test_create_subset_malformed_fails(self): + def test_create_subset_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/subset', status_code=400) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=400) # test try: client = RestClient(username="a", password="b") - response = client.create_subset(database_id=1, - query="SELECT id, username FROM some_table WHERE id IN (1,2)") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except MalformedError: pass - def test_create_subset_not_allowed_fails(self): + def test_create_subset_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/subset', status_code=403) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=403) # test try: client = RestClient(username="a", password="b") - response = client.create_subset(database_id=1, - query="SELECT id, username FROM some_table WHERE id IN (1,2)") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except ForbiddenError: pass - def test_create_subset_not_found_fails(self): + def test_create_subset_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/subset', status_code=404) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=404) # test try: client = RestClient(username="a", password="b") - response = client.create_subset(database_id=1, - query="SELECT id, username FROM some_table WHERE id IN (1,2)") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except NotExistsError: pass - def test_create_subset_not_auth_succeeds(self): + def test_create_subset_417_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=417) + # test + try: + client = RestClient(username="a", password="b") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except QueryStoreError: + pass + + def test_create_subset_501_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=501) + # test + try: + client = RestClient(username="a", password="b") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except FormatNotAvailable: + pass + + def test_create_subset_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ServiceError: + pass + + def test_create_subset_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ResponseCodeError: + pass + + def test_create_subset_anonymous_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.post('/api/database/1/subset', json=json.dumps(exp), headers={'X-Id': '1'}, status_code=201) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/subset', json=json.dumps(exp), + headers={'X-Id': '1'}, status_code=201) # test client = RestClient() - response = client.create_subset(database_id=1, page=0, size=10, - query="SELECT id, username FROM some_table WHERE id IN (1,2)") + response = client.create_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", page=0, size=10, + query=QueryDefinition(table="some_table", + columns=["id", "username"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) self.assertTrue(DataFrame.equals(df, response)) - def test_find_query_succeeds(self): + def test_get_subset_succeeds(self): with requests_mock.Mocker() as mock: - exp = Query(id=6, + exp = Query(id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), execution=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, datetime.timezone.utc), query='SELECT id, username FROM some_table WHERE id IN (1,2)', query_normalized='SELECT id, username FROM some_table WHERE id IN (1,2)', type=QueryType.QUERY, - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", query_hash='da5ff66c4a57683171e2ffcec25298ee684680d1e03633cd286f9067d6924ad8', result_hash='464740ba612225913bb15b26f13377707949b55e65288e89c3f8b4c6469aecb4', is_persisted=False, result_number=None, identifiers=[]) # mock - mock.get('/api/database/1/subset/6', json=exp.model_dump()) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + json=exp.model_dump()) # test - response = RestClient().get_subset(database_id=1, subset_id=6) + response = RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") self.assertEqual(exp, response) - def test_find_query_not_allowed_fails(self): + def test_get_subset_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset/6', status_code=403) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=403) # test try: - response = RestClient().get_subset(database_id=1, subset_id=6) + RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except ForbiddenError: pass - def test_find_query_not_found_fails(self): + def test_get_subset_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset/6', status_code=404) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=404) # test try: - response = RestClient().get_subset(database_id=1, subset_id=6) + RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except NotExistsError: pass + def test_get_subset_406_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=406) + # test + try: + RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except FormatNotAvailable: + pass + + def test_get_subset_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=503) + # test + try: + RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ServiceError: + pass + + def test_get_subset_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=202) + # test + try: + RestClient().get_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ResponseCodeError: + pass + def test_get_queries_empty_succeeds(self): with requests_mock.Mocker() as mock: exp = [] # mock - mock.get('/api/database/1/subset', json=[]) + mock.get(f'/api/database/{self.database.id}/subset', json=[]) # test - response = RestClient().get_queries(database_id=1) + response = RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(exp, response) + def test_update_subset_succeeds(self): + with requests_mock.Mocker() as mock: + exp = Query(id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + execution=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, datetime.timezone.utc), + query='SELECT id, username FROM some_table WHERE id IN (1,2)', + query_normalized='SELECT id, username FROM some_table WHERE id IN (1,2)', + type=QueryType.QUERY, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + query_hash='da5ff66c4a57683171e2ffcec25298ee684680d1e03633cd286f9067d6924ad8', + result_hash='464740ba612225913bb15b26f13377707949b55e65288e89c3f8b4c6469aecb4', + is_persisted=True, + result_number=None, + identifiers=[]) + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + json=exp.model_dump(), + status_code=202) + # test + response = RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", + persist=True) + self.assertEqual(exp, response) + + def test_update_subset_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=400) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", persist=True) + except MalformedError: + pass + + def test_update_subset_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=403) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", persist=True) + except ForbiddenError: + pass + + def test_update_subset_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=404) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", persist=True) + except NotExistsError: + pass + + def test_update_subset_417_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=417) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", persist=True) + except QueryStoreError: + pass + + def test_update_subset_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=503) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", persist=True) + except ServiceError: + pass + + def test_update_subset_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939', + status_code=200) + # test + try: + RestClient(username='foo', password='bar').update_subset( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", + persist=True) + except ResponseCodeError: + pass + + def test_update_subset_anonymous_fails(self): + # test + try: + RestClient().update_subset(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", + persist=True) + except AuthenticationError: + pass + def test_get_queries_succeeds(self): with requests_mock.Mocker() as mock: - exp = [Query(id=6, + exp = [Query(id="e1df2bb8-1f12-494a-ade5-2c4aecdab939", owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), execution=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, datetime.timezone.utc), query='SELECT id, username FROM some_table WHERE id IN (1,2)', query_normalized='SELECT id, username FROM some_table WHERE id IN (1,2)', type=QueryType.QUERY, - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", query_hash='da5ff66c4a57683171e2ffcec25298ee684680d1e03633cd286f9067d6924ad8', result_hash='464740ba612225913bb15b26f13377707949b55e65288e89c3f8b4c6469aecb4', is_persisted=False, result_number=None, identifiers=[])] # mock - mock.get('/api/database/1/subset', json=[exp[0].model_dump()]) + mock.get(f'/api/database/{self.database.id}/subset', json=[exp[0].model_dump()]) # test - response = RestClient().get_queries(database_id=1) + response = RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(exp, response) - def test_get_queries_not_allowed_fails(self): + def test_get_queries_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset', status_code=403) + mock.get(f'/api/database/{self.database.id}/subset', status_code=403) # test try: - response = RestClient().get_queries(database_id=1) + RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except ForbiddenError: pass - def test_get_queries_not_found_fails(self): + def test_get_queries_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset', status_code=404) + mock.get(f'/api/database/{self.database.id}/subset', status_code=404) # test try: - response = RestClient().get_queries(database_id=1) + RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except NotExistsError: pass + def test_get_queries_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/database/{self.database.id}/subset', status_code=503) + # test + try: + RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ServiceError: + pass + + def test_get_queries_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/database/{self.database.id}/subset', status_code=202) + # test + try: + RestClient().get_queries(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + def test_get_subset_data_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/subset/6/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + json=json.dumps(exp)) # test - response = RestClient().get_subset_data(database_id=1, subset_id=6) + response = RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") self.assertTrue(DataFrame.equals(df, response)) def test_get_subset_data_dataframe_succeeds(self): @@ -178,61 +564,157 @@ class QueryUnitTest(unittest.TestCase): exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/subset/6/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + json=json.dumps(exp)) # test - response = RestClient().get_subset_data(database_id=1, subset_id=6) + response = RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") self.assertEqual(df.shape, response.shape) self.assertTrue(DataFrame.equals(df, response)) - def test_get_subset_data_not_allowed_fails(self): + def test_get_subset_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset/6/data', status_code=403) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=400) # test try: - response = RestClient().get_subset_data(database_id=1, subset_id=6) + RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except MalformedError: + pass + + def test_get_subset_data_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=403) + # test + try: + RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except ForbiddenError: pass - def test_get_subset_data_not_found_fails(self): + def test_get_subset_data_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/subset/6/data', status_code=404) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=404) # test try: - response = RestClient().get_subset_data(database_id=1, subset_id=6) + RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except NotExistsError: pass + def test_get_subset_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=503) + # test + try: + RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ServiceError: + pass + + def test_get_subset_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=202) + # test + try: + RestClient().get_subset_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ResponseCodeError: + pass + def test_get_subset_data_count_succeeds(self): with requests_mock.Mocker() as mock: exp = 2 # mock - mock.head('/api/database/1/subset/6/data', headers={'X-Count': str(exp)}) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + headers={'X-Count': str(exp)}) # test - response = RestClient().get_subset_data_count(database_id=1, subset_id=6) + response = RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") self.assertEqual(exp, response) - def test_get_subset_data_count_not_allowed_fails(self): + def test_get_subset_data_count_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/subset/6/data', status_code=403) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=400) # test try: - response = RestClient().get_subset_data_count(database_id=1, subset_id=6) + RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except MalformedError: + pass + + def test_get_subset_data_count_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=403) + # test + try: + RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except ForbiddenError: pass - def test_get_subset_data_count_not_found_fails(self): + def test_get_subset_data_count_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/subset/6/data', status_code=404) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=404) # test try: - response = RestClient().get_subset_data_count(database_id=1, subset_id=6) + RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") except NotExistsError: pass + def test_get_subset_data_count_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=503) + # test + try: + RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ServiceError: + pass + + def test_get_subset_data_count_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/subset/e1df2bb8-1f12-494a-ade5-2c4aecdab939/data', + status_code=202) + # test + try: + RestClient().get_subset_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + subset_id="e1df2bb8-1f12-494a-ade5-2c4aecdab939") + except ResponseCodeError: + pass + if __name__ == "__main__": unittest.main() diff --git a/lib/python/tests/test_unit_rest_client.py b/lib/python/tests/test_unit_rest_client.py index 61a9432ce41cb36a0ea2f4295c7d6136e3a7a696..e4eef89066fe253f62b8e832c512cb449427f60d 100644 --- a/lib/python/tests/test_unit_rest_client.py +++ b/lib/python/tests/test_unit_rest_client.py @@ -4,96 +4,34 @@ import unittest import requests_mock from dbrepo.RestClient import RestClient -from dbrepo.api.dto import JwtAuth -from dbrepo.api.exceptions import MalformedError, ServiceConnectionError, ServiceError, ForbiddenError, \ - AuthenticationError, ResponseCodeError class RestClientUnitTest(unittest.TestCase): def test_constructor_succeeds(self): - with requests_mock.Mocker() as mock: - # test - os.environ['REST_API_SECURE'] = 'True' - response = RestClient() - self.assertTrue(response.secure) - - def test_get_jwt_auth_empty_succeeds(self): - with requests_mock.Mocker() as mock: - exp = JwtAuth(access_token='ey123', - refresh_token='ey456', - id_token='ey789', - expires_in=3600, - scope='scope', - token_type='Bearer', - not_before_policy=0, - session_state='session_state', - refresh_expires_in=7200) - # mock - mock.post('/api/user/token', json=exp.model_dump(), status_code=202) - # test - response = RestClient().get_jwt_auth() - self.assertEqual(exp, response) - - def test_get_jwt_auth_400_fails(self): - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', status_code=400) - # test - try: - response = RestClient().get_jwt_auth() - except MalformedError: - pass - - def test_get_jwt_auth_403_fails(self): - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', status_code=403) - # test - try: - response = RestClient().get_jwt_auth() - except ForbiddenError: - pass - - def test_get_jwt_auth_428_fails(self): - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', status_code=428) - # test - try: - response = RestClient().get_jwt_auth() - except AuthenticationError: - pass + # test + os.environ['REST_API_SECURE'] = 'True' + response = RestClient() + self.assertTrue(response.secure) - def test_get_jwt_auth_502_fails(self): + def test_constructor_token_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/user/token', status_code=502) + mock.get('/api/user', json=[]) # test - try: - response = RestClient().get_jwt_auth() - except ServiceConnectionError: - pass + client = RestClient(password='bar') + client.get_users() + self.assertEqual('bar', client.password) - def test_get_jwt_auth_503_fails(self): - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', status_code=503) - # test - try: - response = RestClient().get_jwt_auth() - except ServiceError: - pass + def test_whoami_anonymous_succeeds(self): + # test + response = RestClient().whoami() + self.assertIsNone(response) - def test_get_jwt_auth_unknown_fails(self): - with requests_mock.Mocker() as mock: - # mock - mock.post('/api/user/token', status_code=418) - # test - try: - response = RestClient().get_jwt_auth() - except ResponseCodeError: - pass + def test_whoami_succeeds(self): + # test + response = RestClient(username="foobar").whoami() + self.assertEqual("foobar", response) if __name__ == "__main__": diff --git a/lib/python/tests/test_unit_table.py b/lib/python/tests/test_unit_table.py index eccf8c2a59ee45c3341c4116678301e438f0089b..a5632f4237f2ab9a34b111e5168cebe7fc084ef6 100644 --- a/lib/python/tests/test_unit_table.py +++ b/lib/python/tests/test_unit_table.py @@ -1,3 +1,4 @@ +import datetime import json import unittest @@ -6,16 +7,16 @@ from pandas import DataFrame from dbrepo.RestClient import RestClient from dbrepo.api.dto import Table, CreateTableConstraints, Column, Constraints, ColumnType, ConceptBrief, UnitBrief, \ - TableStatistics, ColumnStatistic, PrimaryKey, ColumnBrief, TableBrief, UserBrief + TableStatistics, ColumnStatistic, PrimaryKey, ColumnBrief, TableBrief, UserBrief, History, HistoryEventType from dbrepo.api.exceptions import MalformedError, ForbiddenError, NotExistsError, NameExistsError, \ - AuthenticationError, ExternalSystemError + AuthenticationError, ExternalSystemError, ServiceError, ServiceConnectionError, ResponseCodeError class TableUnitTest(unittest.TestCase): def test_create_table_succeeds(self): - exp = TableBrief(id=2, - database_id=1, + exp = TableBrief(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", description="Test Table", internal_name="test", @@ -25,73 +26,122 @@ class TableUnitTest(unittest.TestCase): is_schema_public=True) with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', json=exp.model_dump(), status_code=201) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', json=exp.model_dump(), + status_code=201) # test client = RestClient(username="a", password="b") - response = client.create_table(database_id=1, name="Test", description="Test Table", columns=[], + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], is_public=True, is_schema_public=True, constraints=CreateTableConstraints()) self.assertEqual(exp, response) - def test_create_table_malformed_fails(self): + def test_create_table_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', status_code=400) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=400) # test try: client = RestClient(username="a", password="b") - response = client.create_table(database_id=1, name="Test", description="Test Table", columns=[], + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], is_public=True, is_schema_public=True, constraints=CreateTableConstraints()) except MalformedError: pass - def test_create_table_not_allowed_fails(self): + def test_create_table_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', status_code=403) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.create_table(database_id=1, name="Test", description="Test Table", columns=[], - is_public=True, is_schema_public=True, - constraints=CreateTableConstraints()) + RestClient(username="a", password="b").create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name="Test", + description="Test Table", columns=[], + is_public=True, is_schema_public=True, + constraints=CreateTableConstraints()) except ForbiddenError: pass - def test_create_table_not_allowed_fails(self): + def test_create_table_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', status_code=404) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=404) # test try: client = RestClient(username="a", password="b") - response = client.create_table(database_id=1, name="Test", description="Test Table", columns=[], + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], is_public=True, is_schema_public=True, constraints=CreateTableConstraints()) except NotExistsError: pass - def test_create_table_name_exists_fails(self): + def test_create_table_409_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', status_code=409) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=409) # test try: client = RestClient(username="a", password="b") - response = client.create_table(database_id=1, name="Test", description="Test Table", columns=[], + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], is_public=True, is_schema_public=True, constraints=CreateTableConstraints()) except NameExistsError: pass - def test_create_table_not_auth_fails(self): + def test_create_table_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=502) + # test + try: + client = RestClient(username="a", password="b") + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], + is_public=True, is_schema_public=True, + constraints=CreateTableConstraints()) + except ServiceConnectionError: + pass + + def test_create_table_503_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table', status_code=409) + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=503) # test try: - response = RestClient().create_table(database_id=1, name="Test", description="Test Table", columns=[], + client = RestClient(username="a", password="b") + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], + is_public=True, is_schema_public=True, + constraints=CreateTableConstraints()) + except ServiceError: + pass + + def test_create_table_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=200) + # test + try: + client = RestClient(username="a", password="b") + response = client.create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], + is_public=True, is_schema_public=True, + constraints=CreateTableConstraints()) + except ResponseCodeError: + pass + + def test_create_table_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=409) + # test + try: + response = RestClient().create_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Test", + description="Test Table", columns=[], is_public=True, is_schema_public=True, constraints=CreateTableConstraints()) except AuthenticationError: @@ -100,34 +150,64 @@ class TableUnitTest(unittest.TestCase): def test_get_tables_empty_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table', json=[]) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', json=[]) # test - response = RestClient().get_tables(database_id=1) + response = RestClient().get_tables(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual([], response) def test_get_tables_succeeds(self): with requests_mock.Mocker() as mock: - exp = [TableBrief(id=2, + exp = [TableBrief(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", name="Test", description="Test Table", - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", internal_name="test", is_public=True, is_schema_public=True, owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16', is_versioned=True)] # mock - mock.get('/api/database/1/table', json=[exp[0].model_dump()]) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', json=[exp[0].model_dump()]) # test - response = RestClient().get_tables(database_id=1) + response = RestClient().get_tables(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(exp, response) + def test_get_tables_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=403) + # test + try: + RestClient().get_tables(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ForbiddenError: + pass + + def test_get_tables_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=404) + # test + try: + RestClient().get_tables(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except NotExistsError: + pass + + def test_get_tables_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table', status_code=202) + # test + try: + RestClient().get_tables(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + def test_get_table_succeeds(self): with requests_mock.Mocker() as mock: - exp = Table(id=2, + exp = Table(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", name="Test", description="Test Table", - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", internal_name="test", owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), is_versioned=True, @@ -138,106 +218,269 @@ class TableUnitTest(unittest.TestCase): constraints=Constraints(uniques=[], foreign_keys=[], checks=[], - primary_key=[PrimaryKey(id=1, - table=TableBrief(id=2, database_id=1, - name='Other', - internal_name='other', - description=None, - is_versioned=True, - is_public=True, - is_schema_public=True, - owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16'), - column=ColumnBrief(id=1, table_id=2, - database_id=1, - name='id', - alias=None, - internal_name='id', - type=ColumnType.BIGINT))]), - columns=[Column(id=1, + primary_key=[PrimaryKey(id="1516310f-ecb5-4614-abe2-3b96114e1484", + table=TableBrief( + id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='Other', + internal_name='other', + description=None, + is_versioned=True, + is_public=True, + is_schema_public=True, + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16'), + column=ColumnBrief( + id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", + table_id="", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='id', + alias=None, + internal_name='id', + type=ColumnType.BIGINT))]), + columns=[Column(id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", name="ID", ord=0, - database_id=1, - table_id=2, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", internal_name="id", - auto_generated=True, - is_primary_key=True, type=ColumnType.BIGINT, - is_public=True, is_null_allowed=False)]) # mock - mock.get('/api/database/1/table/2', json=exp.model_dump()) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + json=exp.model_dump()) # test - response = RestClient().get_table(database_id=1, table_id=2) + response = RestClient().get_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") self.assertEqual(exp, response) - def test_get_table_not_allowed_fails(self): + def test_get_table_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table/2', status_code=403) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=403) # test try: - response = RestClient().get_table(database_id=1, table_id=2) + response = RestClient().get_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except ForbiddenError: pass - def test_get_table_not_found_fails(self): + def test_get_table_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table/2', status_code=404) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=404) # test try: - response = RestClient().get_table(database_id=1, table_id=2) + response = RestClient().get_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except NotExistsError: pass + def test_get_table_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=202) + # test + try: + response = RestClient().get_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + def test_delete_table_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/2', status_code=202) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=202) # test client = RestClient(username="a", password="b") - client.delete_table(database_id=1, table_id=2) + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + + def test_delete_table_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=400) + # test + try: + client = RestClient(username="a", password="b") + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except MalformedError: + pass - def test_delete_table_not_allowed_fails(self): + def test_delete_table_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/2', status_code=403) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.delete_table(database_id=1, table_id=2) + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except ForbiddenError: pass - def test_delete_table_not_found_fails(self): + def test_delete_table_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/2', status_code=404) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=404) # test try: client = RestClient(username="a", password="b") - client.delete_table(database_id=1, table_id=2) + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except NotExistsError: pass - def test_delete_table_not_auth_fails(self): + def test_delete_table_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=502) + # test + try: + client = RestClient(username="a", password="b") + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceConnectionError: + pass + + def test_delete_table_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceError: + pass + + def test_delete_table_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/2', status_code=404) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=200) # test try: - RestClient().delete_table(database_id=1, table_id=2) + client = RestClient(username="a", password="b") + client.delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + + def test_delete_table_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692', + status_code=404) + # test + try: + RestClient().delete_table(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except AuthenticationError: pass + def test_get_table_history_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [History(event=HistoryEventType.INSERT, + total=2, + timestamp=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, datetime.timezone.utc))] + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + json=[exp[0].model_dump()]) + # test + response = RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + self.assertEqual(exp, response) + + def test_get_table_history_400_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + status_code=400) + # test + try: + RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except MalformedError: + pass + + def test_get_table_history_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + status_code=403) + # test + try: + RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ForbiddenError: + pass + + def test_get_table_history_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + status_code=404) + # test + try: + RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except NotExistsError: + pass + + def test_get_table_history_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + status_code=503) + # test + try: + RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceError: + pass + + def test_get_table_history_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/history?size=100', + status_code=202) + # test + try: + RestClient().get_table_history(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + def test_get_table_data_succeeds(self): with requests_mock.Mocker() as mock: exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/table/9/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + json=json.dumps(exp)) # test - response = RestClient().get_table_data(database_id=1, table_id=9) + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + timestamp=datetime.datetime(2024, 1, 1, 0, 0, 0, 0, + datetime.timezone.utc)) self.assertTrue(DataFrame.equals(df, response)) def test_get_table_data_dataframe_succeeds(self): @@ -245,310 +488,603 @@ class TableUnitTest(unittest.TestCase): exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/table/9/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + json=json.dumps(exp)) # test - response = RestClient().get_table_data(database_id=1, table_id=9) + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") self.assertEqual(df.shape, response.shape) self.assertTrue(DataFrame.equals(df, response)) - def test_get_table_data_malformed_fails(self): + def test_get_table_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table/9/data', status_code=400) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=400) # test try: - response = RestClient().get_table_data(database_id=1, table_id=9) + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except MalformedError: pass - def test_get_table_data_not_allowed_fails(self): + def test_get_table_data_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table/9/data', status_code=403) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=403) # test try: - response = RestClient().get_table_data(database_id=1, table_id=9) + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except ForbiddenError: pass - def test_get_table_data_not_found_fails(self): + def test_get_table_data_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/table/9/data', status_code=404) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: - response = RestClient().get_table_data(database_id=1, table_id=9) + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except NotExistsError: pass + def test_get_table_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceError: + pass + + def test_get_table_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=202) + # test + try: + response = RestClient().get_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + def test_get_table_data_count_succeeds(self): with requests_mock.Mocker() as mock: exp = 2 # mock - mock.head('/api/database/1/table/9/data', headers={'X-Count': str(exp)}) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + headers={'X-Count': str(exp)}) # test - response = RestClient().get_table_data_count(database_id=1, table_id=9) + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + timestamp=datetime.datetime(2024, 1, 1, 0, 0, 0, 0)) self.assertEqual(exp, response) - def test_get_table_data_count_malformed_fails(self): + def test_get_table_data_count_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/table/9/data', status_code=400) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=400) # test try: - response = RestClient().get_table_data_count(database_id=1, table_id=9) + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except MalformedError: pass - def test_get_table_data_count_not_allowed_fails(self): + def test_get_table_data_count_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/table/9/data', status_code=403) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=403) # test try: - response = RestClient().get_table_data_count(database_id=1, table_id=9) + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except ForbiddenError: pass - def test_get_table_data_count_not_found_fails(self): + def test_get_table_data_count_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/table/9/data', status_code=404) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: - response = RestClient().get_table_data_count(database_id=1, table_id=9) + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except NotExistsError: pass + def test_get_table_data_count_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceError: + pass + + def test_get_table_data_count_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=202) + # test + try: + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + def test_get_table_data_count_not_countable_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/table/9/data', status_code=409) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=409) # test try: - response = RestClient().get_table_data_count(database_id=1, table_id=9) + response = RestClient().get_table_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except ExternalSystemError: pass def test_create_table_data_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table/9/data', status_code=201) + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=201) # test client = RestClient(username="a", password="b") - client.create_table_data(database_id=1, table_id=9, + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) - def test_create_table_data_malformed_fails(self): + def test_create_table_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table/9/data', status_code=400) + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=400) # test try: client = RestClient(username="a", password="b") - client.create_table_data(database_id=1, table_id=9, + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) except MalformedError: pass - def test_create_table_data_not_allowed_fails(self): + def test_create_table_data_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table/9/data', status_code=403) + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.create_table_data(database_id=1, table_id=9, + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) except ForbiddenError: pass - def test_create_table_data_not_found_fails(self): + def test_create_table_data_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/table/9/data', status_code=404) + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: client = RestClient(username="a", password="b") - client.create_table_data(database_id=1, table_id=9, + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) except NotExistsError: pass + def test_create_table_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) + except ServiceError: + pass + + def test_create_table_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) + except ResponseCodeError: + pass + + def test_create_table_data_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.post( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + RestClient().create_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + data={'name': 'Josiah', 'age': 45, 'gender': 'male'}) + except AuthenticationError: + pass + def test_update_table_data_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/9/data', status_code=202) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=202) # test client = RestClient(username="a", password="b") - client.update_table_data(database_id=1, table_id=9, + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, keys={'id': 1}) - def test_update_table_data_malformed_fails(self): + def test_update_table_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/9/data', status_code=400) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=400) # test try: client = RestClient(username="a", password="b") - client.update_table_data(database_id=1, table_id=9, + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, keys={'id': 1}) except MalformedError: pass - def test_update_table_data_not_allowed_fails(self): + def test_update_table_data_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/9/data', status_code=403) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.update_table_data(database_id=1, table_id=9, + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, keys={'id': 1}) except ForbiddenError: pass - def test_update_table_data_not_found_fails(self): + def test_update_table_data_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/9/data', status_code=404) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: client = RestClient(username="a", password="b") - client.update_table_data(database_id=1, table_id=9, + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, keys={'id': 1}) except NotExistsError: pass + def test_update_table_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, + keys={'id': 1}) + except ServiceError: + pass + + def test_update_table_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.update_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + data={'name': 'Josiah', 'age': 45, 'gender': 'male'}, + keys={'id': 1}) + except ResponseCodeError: + pass + def test_delete_table_data_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/9/data', status_code=202) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=202) # test client = RestClient(username="a", password="b") - client.delete_table_data(database_id=1, table_id=9, keys={'id': 1}) + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) - def test_delete_table_data_malformed_fails(self): + def test_delete_table_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/9/data', status_code=400) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=400) # test try: client = RestClient(username="a", password="b") - client.delete_table_data(database_id=1, table_id=9, keys={'id': 1}) + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) except MalformedError: pass - def test_delete_table_data_not_allowed_fails(self): + def test_delete_table_data_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/9/data', status_code=403) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.delete_table_data(database_id=1, table_id=9, keys={'id': 1}) + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) except ForbiddenError: pass - def test_delete_table_data_not_found_fails(self): + def test_delete_table_data_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/9/data', status_code=404) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: client = RestClient(username="a", password="b") - client.delete_table_data(database_id=1, table_id=9, keys={'id': 1}) + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) except NotExistsError: pass - def test_delete_table_data_not_auth_fails(self): + def test_delete_table_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) + except ServiceError: + pass + + def test_delete_table_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", keys={'id': 1}) + except ResponseCodeError: + pass + + def test_delete_table_data_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/table/9/data', status_code=404) + mock.delete( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/data', + status_code=404) # test try: - RestClient().delete_table_data(database_id=1, table_id=9, keys={'id': 1}) + RestClient().delete_table_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + keys={'id': 1}) except AuthenticationError: pass def test_update_table_column_succeeds(self): with requests_mock.Mocker() as mock: - exp = Column(id=1, + exp = Column(id="2f30858d-b47b-4068-9028-fb0524ddf6cb", ord=0, name="ID", - database_id=1, - table_id=2, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", internal_name="id", - auto_generated=True, - is_primary_key=True, type=ColumnType.BIGINT, - is_public=True, - concept=ConceptBrief(id=2, + concept=ConceptBrief(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", uri="http://dbpedia.org/page/Category:Precipitation", name="Precipitation"), - unit=UnitBrief(id=2, + unit=UnitBrief(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", uri="http://www.wikidata.org/entity/Q119856947", name="liters per square meter"), is_null_allowed=False) # mock - mock.put('/api/database/1/table/2/column/1', json=exp.model_dump(), status_code=202) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + json=exp.model_dump(), + status_code=202) # test client = RestClient(username="a", password="b") - response = client.update_table_column(database_id=1, table_id=2, column_id=1, + response = client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", unit_uri="http://www.wikidata.org/entity/Q119856947", concept_uri="http://dbpedia.org/page/Category:Precipitation") self.assertEqual(exp, response) - def test_update_table_column_malformed_fails(self): + def test_update_table_column_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/2/column/1', status_code=400) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=400) # test try: client = RestClient(username="a", password="b") - client.update_table_column(database_id=1, table_id=2, column_id=1, + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", unit_uri="http://www.wikidata.org/entity/Q119856947", concept_uri="http://dbpedia.org/page/Category:Precipitation") except MalformedError: pass - def test_update_table_column_not_allowed_fails(self): + def test_update_table_column_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/2/column/1', status_code=403) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.update_table_column(database_id=1, table_id=2, column_id=1, + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", unit_uri="http://www.wikidata.org/entity/Q119856947", concept_uri="http://dbpedia.org/page/Category:Precipitation") except ForbiddenError: pass - def test_update_table_column_not_found_fails(self): + def test_update_table_column_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/2/column/1', status_code=404) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=404) # test try: client = RestClient(username="a", password="b") - client.update_table_column(database_id=1, table_id=2, column_id=1, + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", unit_uri="http://www.wikidata.org/entity/Q119856947", concept_uri="http://dbpedia.org/page/Category:Precipitation") except NotExistsError: pass - def test_update_table_column_not_auth_fails(self): + def test_update_table_column_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=502) + # test + try: + client = RestClient(username="a", password="b") + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", + unit_uri="http://www.wikidata.org/entity/Q119856947", + concept_uri="http://dbpedia.org/page/Category:Precipitation") + except ServiceConnectionError: + pass + + def test_update_table_column_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", + unit_uri="http://www.wikidata.org/entity/Q119856947", + concept_uri="http://dbpedia.org/page/Category:Precipitation") + except ServiceError: + pass + + def test_update_table_column_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", + unit_uri="http://www.wikidata.org/entity/Q119856947", + concept_uri="http://dbpedia.org/page/Category:Precipitation") + except ResponseCodeError: + pass + + def test_update_table_column_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('/api/database/1/table/2/column/1', status_code=404) + mock.put( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/column/758da021-f809-4d87-a866-9d4664a039dc', + status_code=404) # test try: - RestClient().update_table_column(database_id=1, table_id=2, column_id=1, + RestClient().update_table_column(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692", + column_id="758da021-f809-4d87-a866-9d4664a039dc", unit_uri="http://www.wikidata.org/entity/Q119856947", concept_uri="http://dbpedia.org/page/Category:Precipitation") except AuthenticationError: @@ -559,31 +1095,79 @@ class TableUnitTest(unittest.TestCase): exp = TableStatistics( columns={"id": ColumnStatistic(val_min=1.0, val_max=9.0, mean=5.0, median=5.0, std_dev=2.73)}) # mock - mock.get('/api/analyse/database/1/table/2/statistics', json=exp.model_dump(), status_code=202) + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + json=exp.model_dump(), status_code=202) # test - response = RestClient().analyse_table_statistics(database_id=1, table_id=2) + response = RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") self.assertEqual(exp, response) - def test_analyse_table_statistics_malformed_fails(self): + def test_analyse_table_statistics_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/analyse/database/1/table/2/statistics', status_code=400) + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + status_code=400) # test try: - RestClient().analyse_table_statistics(database_id=1, table_id=2) + RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except MalformedError: pass - def test_analyse_table_statistics_not_found_fails(self): + def test_analyse_table_statistics_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/analyse/database/1/table/2/statistics', status_code=404) + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + status_code=404) # test try: - RestClient().analyse_table_statistics(database_id=1, table_id=2) + RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") except NotExistsError: pass + def test_analyse_table_statistics_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + status_code=502) + # test + try: + RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceConnectionError: + pass + + def test_analyse_table_statistics_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + status_code=503) + # test + try: + RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ServiceError: + pass + + def test_analyse_table_statistics_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/analyse/database/6bd39359-b154-456d-b9c2-caa516a45732/table/b3230b86-4743-498d-9015-3fad58049692/statistics', + status_code=200) + # test + try: + RestClient().analyse_table_statistics(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="b3230b86-4743-498d-9015-3fad58049692") + except ResponseCodeError: + pass + if __name__ == "__main__": unittest.main() diff --git a/lib/python/tests/test_unit_unit.py b/lib/python/tests/test_unit_unit.py new file mode 100644 index 0000000000000000000000000000000000000000..3af429b74ebcb84767105d3b4da23540fd3fdf31 --- /dev/null +++ b/lib/python/tests/test_unit_unit.py @@ -0,0 +1,35 @@ +import unittest + +import requests_mock + +from dbrepo.RestClient import RestClient +from dbrepo.api.dto import UnitBrief +from dbrepo.api.exceptions import ResponseCodeError + + +class UserUnitTest(unittest.TestCase): + + def test_get_units_succeeds(self): + with requests_mock.Mocker() as mock: + exp = [UnitBrief(id="d8eec1ab-7b37-4eb3-bdf7-b44a8b384c0b", + uri='http://www.ontology-of-units-of-measure.org/resource/om-2/CelsiusTemperature', + name='Celsius Temperature')] + # mock + mock.get('/api/unit', json=[exp[0].model_dump()]) + # test + response = RestClient().get_units() + self.assertEqual(exp, response) + + def test_get_units_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/unit', status_code=202) + # test + try: + RestClient().get_units() + except ResponseCodeError: + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/lib/python/tests/test_unit_user.py b/lib/python/tests/test_unit_user.py index 0e846b1b42e6ba935a2f204d09aa0920dce69626..213635634f4248ec32997b02966f79fd45c12663 100644 --- a/lib/python/tests/test_unit_user.py +++ b/lib/python/tests/test_unit_user.py @@ -3,9 +3,9 @@ import unittest import requests_mock from dbrepo.RestClient import RestClient -from dbrepo.api.dto import User, UserAttributes, UserBrief -from dbrepo.api.exceptions import ResponseCodeError, UsernameExistsError, EmailExistsError, NotExistsError, \ - ForbiddenError, AuthenticationError, MalformedError, ServiceError +from dbrepo.api.dto import UserAttributes, UserBrief, User, UnitBrief +from dbrepo.api.exceptions import ResponseCodeError, NotExistsError, \ + ForbiddenError, AuthenticationError, ServiceError, MalformedError class UserUnitTest(unittest.TestCase): @@ -22,101 +22,45 @@ class UserUnitTest(unittest.TestCase): def test_get_users_empty_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.get('http://localhost/api/user', json=[]) + mock.get('/api/user', json=[]) # test response = RestClient().get_users() self.assertEqual([], response) - def test_get_user_succeeds(self): + def test_get_users_succeeds(self): with requests_mock.Mocker() as mock: - exp = [ - User(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise', - attributes=UserAttributes(theme='dark')) - ] + exp = [UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise')] # mock - mock.get('http://localhost/api/user', json=[exp[0].model_dump()]) + mock.get('/api/user', json=[exp[0].model_dump()]) # test response = RestClient().get_users() self.assertEqual(exp, response) - def test_get_user_fails(self): + def test_get_users_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('http://localhost/api/user', status_code=404) + mock.get('/api/user', status_code=404) # test try: response = RestClient().get_users() except ResponseCodeError as e: pass - def test_create_user_succeeds(self): - with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise') - # mock - mock.post('http://localhost/api/user', json=exp.model_dump(), status_code=201) - # test - response = RestClient().create_user(username='mweise', password='s3cr3t', email='mweise@example.com') - self.assertEqual(exp, response) - - def test_create_user_bad_request_fails(self): - with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise') - # mock - mock.post('http://localhost/api/user', json=exp.model_dump(), status_code=400) - # test - try: - response = RestClient().create_user(username='mweise', password='s3cr3t', email='mweise@example.com') - except MalformedError as e: - pass - - def test_create_user_username_exists_fails(self): - with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise') - # mock - mock.post('http://localhost/api/user', json=exp.model_dump(), status_code=409) - # test - try: - response = RestClient().create_user(username='mweise', password='s3cr3t', email='mweise@example.com') - except UsernameExistsError as e: - pass - - def test_create_user_default_role_not_exists_fails(self): - with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise') - # mock - mock.post('http://localhost/api/user', json=exp.model_dump(), status_code=404) - # test - try: - response = RestClient().create_user(username='mweise', password='s3cr3t', email='mweise@example.com') - except NotExistsError as e: - pass - - def test_create_user_emails_exists_fails(self): - with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise') - # mock - mock.post('http://localhost/api/user', json=exp.model_dump(), status_code=417) - # test - try: - response = RestClient().create_user(username='mweise', password='s3cr3t', email='mweise@example.com') - except EmailExistsError as e: - pass - def test_get_user_succeeds(self): with requests_mock.Mocker() as mock: exp = User(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise', - attributes=UserAttributes(theme='dark')) + attributes=UserAttributes(theme='dark', language='en')) # mock - mock.get('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', + mock.get('/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', json=exp.model_dump()) # test response = RestClient().get_user(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16') self.assertEqual(exp, response) - def test_get_user_not_found_fails(self): + def test_get_user_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=404) + mock.get('/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=404) # test try: response = RestClient().get_user(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16') @@ -125,10 +69,9 @@ class UserUnitTest(unittest.TestCase): def test_update_user_succeeds(self): with requests_mock.Mocker() as mock: - exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise', given_name='Martin', - attributes=UserAttributes(theme='dark')) + exp = UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise', given_name='Martin') # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=202, + mock.put('/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=202, json=exp.model_dump()) # test client = RestClient(username="a", password="b") @@ -136,95 +79,88 @@ class UserUnitTest(unittest.TestCase): language='en', theme='light') self.assertEqual(exp, response) - def test_update_user_not_allowed_fails(self): + def test_get_user_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=403) + mock.get(f'/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.update_user(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', firstname='Martin', - language='en', theme='light') - except ForbiddenError as e: + RestClient().get_user('f27921d4-b05f-4e21-a122-4953a6a779a2') + except ForbiddenError: pass - def test_update_user_not_found_fails(self): + def test_get_user_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=404) + mock.get(f'/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.update_user(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', firstname='Martin', - language='en', theme='light') - except NotExistsError as e: + RestClient().get_user('f27921d4-b05f-4e21-a122-4953a6a779a2') + except NotExistsError: pass - def test_update_user_not_auth_fails(self): + def test_get_user_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16', status_code=405) + mock.get(f'/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=409) # test try: - response = RestClient().update_user(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', firstname='Martin', - language='en', theme='light') - except AuthenticationError as e: + RestClient().get_user('f27921d4-b05f-4e21-a122-4953a6a779a2') + except ResponseCodeError: pass - def test_update_user_password_succeeds(self): + def test_update_user_anonymous_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16/password', status_code=202) + mock.put('/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=202) # test - client = RestClient(username="a", password="b") - response = client.update_user_password(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', - password='s3cr3t1n0rm4t10n') + try: + RestClient().update_user(user_id='f27921d4-b05f-4e21-a122-4953a6a779a2', theme='dark', language='en') + except AuthenticationError: + pass - def test_update_user_password_not_allowed_fails(self): + def test_update_user_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16/password', status_code=403) + mock.put('/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=400) # test try: - client = RestClient(username="a", password="b") - response = client.update_user_password(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', - password='s3cr3t1n0rm4t10n') - except ForbiddenError as e: + RestClient(username='foo', password='bar').update_user(user_id='f27921d4-b05f-4e21-a122-4953a6a779a2', + theme='dark', language='en') + except MalformedError: pass - def test_update_user_password_not_found_fails(self): + def test_update_user_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16/password', status_code=404) + mock.put('/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=403) # test try: - client = RestClient(username="a", password="b") - response = client.update_user_password(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', - password='s3cr3t1n0rm4t10n') - except NotExistsError as e: + RestClient(username='foo', password='bar').update_user(user_id='f27921d4-b05f-4e21-a122-4953a6a779a2', + theme='dark', language='en') + except ForbiddenError: pass - def test_update_user_password_keycloak_fails(self): + def test_update_user_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16/password', status_code=503) + mock.put('/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=404) # test try: - client = RestClient(username="a", password="b") - response = client.update_user_password(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', - password='s3cr3t1n0rm4t10n') - except ServiceError as e: + RestClient(username='foo', password='bar').update_user(user_id='f27921d4-b05f-4e21-a122-4953a6a779a2', + theme='dark', language='en') + except NotExistsError: pass - def test_update_user_password_not_auth_fails(self): + def test_update_user_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.put('http://localhost/api/user/8638c043-5145-4be8-a3e4-4b79991b0a16/password', status_code=503) + mock.put('/api/user/f27921d4-b05f-4e21-a122-4953a6a779a2', status_code=200) # test try: - response = RestClient().update_user_password(user_id='8638c043-5145-4be8-a3e4-4b79991b0a16', - password='s3cr3t1n0rm4t10n') - except AuthenticationError as e: + RestClient(username='foo', password='bar').update_user(user_id='f27921d4-b05f-4e21-a122-4953a6a779a2', + theme='dark', language='en') + except ResponseCodeError: pass diff --git a/lib/python/tests/test_unit_view.py b/lib/python/tests/test_unit_view.py index 29fd6aac2f7942fa978c492a5b95ea31e724e0b9..cb26eeaba8584d201202f7b6693f240b36701011 100644 --- a/lib/python/tests/test_unit_view.py +++ b/lib/python/tests/test_unit_view.py @@ -5,206 +5,584 @@ import requests_mock from pandas import DataFrame from dbrepo.RestClient import RestClient -from dbrepo.api.dto import View, ViewColumn, ColumnType, UserBrief, ViewBrief -from dbrepo.api.exceptions import ForbiddenError, NotExistsError, MalformedError, AuthenticationError +from dbrepo.api.dto import View, ViewColumn, ColumnType, UserBrief, ViewBrief, QueryDefinition, FilterDefinition, \ + FilterType, Database, Table, Constraints, PrimaryKey, TableBrief, ColumnBrief, Column, ContainerBrief, ImageBrief, \ + Image, Operator +from dbrepo.api.exceptions import ForbiddenError, NotExistsError, MalformedError, AuthenticationError, \ + ResponseCodeError, ExternalSystemError, ServiceError, ServiceConnectionError class ViewUnitTest(unittest.TestCase): + database = Database( + id="6bd39359-b154-456d-b9c2-caa516a45732", + name='test', + owner=UserBrief(id='abdbf897-e599-4e5a-a3f0-7529884ea011', username='mweise'), + contact=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + exchange_name='dbrepo', + internal_name='test_abcd', + is_public=True, + is_schema_public=True, + tables=[Table(id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + name="Some Table", + description="Test Table", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + internal_name="some_table", + owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + is_versioned=True, + queue_name='test', + routing_key='dbrepo.test_database_1234.test', + is_public=True, + is_schema_public=True, + constraints=Constraints(uniques=[], + foreign_keys=[], + checks=[], + primary_key=[PrimaryKey(id="1516310f-ecb5-4614-abe2-3b96114e1484", + table=TableBrief( + id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='Other', + internal_name='other', + description=None, + is_versioned=True, + is_public=True, + is_schema_public=True, + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16'), + column=ColumnBrief( + id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + name='id', + alias=None, + internal_name='id', + type=ColumnType.BIGINT))]), + columns=[Column(id="31a533b6-8ddf-43d6-ac6a-b9da597cb976", + name="ID", + ord=0, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + internal_name="id", + type=ColumnType.BIGINT, + is_null_allowed=False), + Column(id="85de93a8-834c-4cf4-9d34-f80ebd97e606", + name="Username", + ord=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + table_id="029d773f-f98b-40c0-ab22-b8b1635d4fbc", + internal_name="username", + type=ColumnType.VARCHAR, + is_null_allowed=False) + ])], + container=ContainerBrief(id="44d811a8-4019-46ba-bd57-ea10a2eb0c74", + name='MariaDB Galera 11.1.3', + internal_name='mariadb', + image=ImageBrief(id="b104648b-54d2-4d72-9834-8e0e6d428b39", + name='mariadb', + version='11.2.2', + default=True))) + image = Image(id="b104648b-54d2-4d72-9834-8e0e6d428b39", + name='mariadb', + version='11.2.2', + default=True, + data_types=[], + operators=[Operator(id="6a96bd99-be3d-4d56-8c38-b14bdfead634", + display_name="IN", + value="IN", + documentation="https://mariadb.com/kb/en/in/")]) def test_get_views_empty_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view', json=[]) + mock.get(f'/api/database/{self.database.id}/view', json=[]) # test - response = RestClient().get_views(database_id=1) + response = RestClient().get_views(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual([], response) def test_get_views_succeeds(self): with requests_mock.Mocker() as mock: - exp = [ViewBrief(id=1, - name="Data", - internal_name="data", - database_id=1, - initial_view=False, - query="SELECT id FROM mytable WHERE deg > 0", - query_hash="94c74728b11a690e51d64719868824735f0817b7", - owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16', - is_public=True, - is_schema_public=True)] + exp = [ViewBrief(id="1b3449d2-780e-4683-9af0-8733e608a4aa", + name="Data", + internal_name="data", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + initial_view=False, + query="SELECT id FROM mytable WHERE deg > 0", + query_hash="94c74728b11a690e51d64719868824735f0817b7", + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16', + is_public=True, + is_schema_public=True)] # mock - mock.get('/api/database/1/view', json=[exp[0].model_dump()]) + mock.get(f'/api/database/{self.database.id}/view', json=[exp[0].model_dump()]) # test - response = RestClient().get_views(database_id=1) + response = RestClient().get_views(database_id="6bd39359-b154-456d-b9c2-caa516a45732") self.assertEqual(exp, response) - def test_get_views_not_found_fails(self): + def test_get_views_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view', status_code=404) + mock.get(f'/api/database/{self.database.id}/view', status_code=404) # test try: - response = RestClient().get_views(database_id=1) + response = RestClient().get_views(database_id="6bd39359-b154-456d-b9c2-caa516a45732") except NotExistsError: pass + def test_get_views_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/database/{self.database.id}/view', status_code=202) + # test + try: + response = RestClient().get_views(database_id="6bd39359-b154-456d-b9c2-caa516a45732") + except ResponseCodeError: + pass + def test_get_view_succeeds(self): with requests_mock.Mocker() as mock: - exp = View(id=3, + exp = View(id="1b3449d2-780e-4683-9af0-8733e608a4aa", name="Data", internal_name="data", - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", initial_view=False, query="SELECT id FROM mytable WHERE deg > 0", query_hash="94c74728b11a690e51d64719868824735f0817b7", owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), is_public=True, is_schema_public=True, - columns=[ViewColumn(id=1, + columns=[ViewColumn(id="1b3449d2-780e-4683-9af0-8733e608a4aa", ord=0, name="id", internal_name="id", - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", type=ColumnType.BIGINT, is_null_allowed=False)], identifiers=[]) # mock - mock.get('/api/database/1/view/3', json=exp.model_dump()) + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + json=exp.model_dump()) + # test + response = RestClient().get_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + self.assertEqual(exp, response) + + def test_get_view_403_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=403) + # test + try: + response = RestClient().get_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ForbiddenError: + pass + + def test_get_view_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=404) + # test + try: + response = RestClient().get_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except NotExistsError: + pass + + def test_get_view_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=202) # test - response = RestClient().get_view(database_id=1, view_id=3) + try: + response = RestClient().get_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ResponseCodeError: + pass + + def test_update_view_succeeds(self): + with requests_mock.Mocker() as mock: + exp = ViewBrief(id="1b3449d2-780e-4683-9af0-8733e608a4aa", + name="Data", + internal_name="data", + database_id="6bd39359-b154-456d-b9c2-caa516a45732", + initial_view=False, + query="SELECT id FROM mytable WHERE deg > 0", + query_hash="94c74728b11a690e51d64719868824735f0817b7", + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16', + is_public=False, + is_schema_public=False) + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1', json=exp.model_dump(), + status_code=202) + # test + response = RestClient(username='foo', password='bar').update_view( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id=1, + is_public=False, is_schema_public=False) self.assertEqual(exp, response) - def test_get_view_not_allowed_fails(self): + def test_update_view_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view/3', status_code=403) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1', status_code=403) # test try: - response = RestClient().get_view(database_id=1, view_id=3) + RestClient(username='foo', password='bar').update_view( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id=1, is_public=False, + is_schema_public=False) except ForbiddenError: pass - def test_get_views_not_found_fails(self): + def test_update_view_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view/3', status_code=404) + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1', status_code=404) # test try: - response = RestClient().get_view(database_id=1, view_id=3) + RestClient(username='foo', password='bar').update_view( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id=1, is_public=False, + is_schema_public=False) except NotExistsError: pass + def test_update_view_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1', status_code=200) + # test + try: + RestClient(username='foo', password='bar').update_view( + database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id=1, is_public=False, + is_schema_public=False) + except ResponseCodeError: + pass + + def test_update_view_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.put('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1', status_code=403) + # test + try: + RestClient().update_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", view_id=1, is_public=False, + is_schema_public=False) + except AuthenticationError: + pass + def test_create_view_succeeds(self): with requests_mock.Mocker() as mock: - exp = View(id=3, + exp = ViewBrief(id="1b3449d2-780e-4683-9af0-8733e608a4aa", name="Data", internal_name="data", - database_id=1, + database_id="6bd39359-b154-456d-b9c2-caa516a45732", initial_view=False, - query="SELECT id FROM mytable WHERE deg > 0", + query="SELECT id FROM some_table WHERE id IN (1,2)", query_hash="94c74728b11a690e51d64719868824735f0817b7", - owner=UserBrief(id='8638c043-5145-4be8-a3e4-4b79991b0a16', username='mweise'), + owned_by='8638c043-5145-4be8-a3e4-4b79991b0a16', is_public=True, - is_schema_public=True, - columns=[ViewColumn(id=1, - ord=0, - name="id", - internal_name="id", - database_id=1, - type=ColumnType.BIGINT, - is_null_allowed=False)], - identifiers=[]) + is_schema_public=True) # mock - mock.post('/api/database/1/view', json=exp.model_dump(), status_code=201) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', json=exp.model_dump(), status_code=201) # test client = RestClient(username="a", password="b") - response = client.create_view(database_id=1, name="Data", is_public=True, is_schema_public=True, - query="SELECT id FROM mytable WHERE deg > 0") + response = client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) self.assertEqual(exp, response) - def test_create_view_malformed_fails(self): + def test_create_view_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/view', status_code=400) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=400) # test try: client = RestClient(username="a", password="b") - response = client.create_view(database_id=1, name="Data", is_public=True, is_schema_public=True, - query="SELECT id FROM mytable WHERE deg > 0") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except MalformedError: pass - def test_create_view_not_allowed_fails(self): + def test_create_view_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/view', status_code=403) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=403) # test try: client = RestClient(username="a", password="b") - response = client.create_view(database_id=1, name="Data", is_public=True, is_schema_public=True, - query="SELECT id FROM mytable WHERE deg > 0") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except ForbiddenError: pass - def test_create_view_not_found_fails(self): + def test_create_view_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/view', status_code=404) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=404) # test try: client = RestClient(username="a", password="b") - response = client.create_view(database_id=1, name="Data", is_public=True, is_schema_public=True, - query="SELECT id FROM mytable WHERE deg > 0") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except NotExistsError: pass - def test_create_view_not_auth_fails(self): + def test_create_view_423_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=423) + # test + try: + client = RestClient(username="a", password="b") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ExternalSystemError: + pass + + def test_create_view_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=502) + # test + try: + client = RestClient(username="a", password="b") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ServiceConnectionError: + pass + + def test_create_view_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ServiceError: + pass + + def test_create_view_unknown_fails(self): with requests_mock.Mocker() as mock: # mock - mock.post('/api/database/1/view', status_code=404) + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=200) # test try: - response = RestClient().create_view(database_id=1, name="Data", is_public=True, is_schema_public=True, - query="SELECT id FROM mytable WHERE deg > 0") + client = RestClient(username="a", password="b") + client.create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) + except ResponseCodeError: + pass + + def test_create_view_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get(f'/api/image/{self.image.id}', json=self.image.model_dump(), + status_code=200) + mock.get(f'/api/database/{self.database.id}', json=self.database.model_dump(), + status_code=200) + mock.post(f'/api/database/{self.database.id}/view', status_code=404) + # test + try: + RestClient().create_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", name="Data", + is_public=True, is_schema_public=True, + query=QueryDefinition(table="some_table", + columns=["id"], + filter=[ + FilterDefinition(type=FilterType.WHERE, + column="id", + operator="IN", + value="(1,2)")])) except AuthenticationError: pass def test_delete_view_succeeds(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/view/3', status_code=202) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=202) # test client = RestClient(username="a", password="b") - client.delete_view(database_id=1, view_id=3) + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") - def test_delete_view_malformed_fails(self): + def test_delete_view_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/view/3', status_code=400) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=400) # test try: client = RestClient(username="a", password="b") - client.delete_view(database_id=1, view_id=3) + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except MalformedError: pass - def test_delete_view_not_allowed_fails(self): + def test_delete_view_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/view/3', status_code=403) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=403) # test try: client = RestClient(username="a", password="b") - client.delete_view(database_id=1, view_id=3) + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except ForbiddenError: pass - def test_delete_view_not_auth_fails(self): + def test_delete_view_404_fails(self): with requests_mock.Mocker() as mock: # mock - mock.delete('/api/database/1/view/3', status_code=403) + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=404) # test try: - RestClient().delete_view(database_id=1, view_id=3) + client = RestClient(username="a", password="b") + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except NotExistsError: + pass + + def test_delete_view_423_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=423) + # test + try: + client = RestClient(username="a", password="b") + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ExternalSystemError: + pass + + def test_delete_view_502_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=502) + # test + try: + client = RestClient(username="a", password="b") + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ServiceConnectionError: + pass + + def test_delete_view_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=503) + # test + try: + client = RestClient(username="a", password="b") + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ServiceError: + pass + + def test_delete_view_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=200) + # test + try: + client = RestClient(username="a", password="b") + client.delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ResponseCodeError: + pass + + def test_delete_view_anonymous_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.delete('/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa', + status_code=403) + # test + try: + RestClient().delete_view(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except AuthenticationError: pass @@ -213,9 +591,12 @@ class ViewUnitTest(unittest.TestCase): exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/view/3/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + json=json.dumps(exp)) # test - response = RestClient().get_view_data(database_id=1, view_id=3) + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") self.assertTrue(DataFrame.equals(df, response)) def test_get_view_data_dataframe_succeeds(self): @@ -223,61 +604,183 @@ class ViewUnitTest(unittest.TestCase): exp = [{'id': 1, 'username': 'foo'}, {'id': 2, 'username': 'bar'}] df = DataFrame.from_records(json.dumps(exp)) # mock - mock.get('/api/database/1/view/3/data', json=json.dumps(exp)) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + json=json.dumps(exp)) # test - response: DataFrame = RestClient().get_view_data(database_id=1, view_id=3) + response: DataFrame = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") self.assertEqual(df.shape, response.shape) self.assertTrue(DataFrame.equals(df, response)) - def test_get_view_data_malformed_fails(self): + def test_get_view_data_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view/3/data', status_code=400) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=400) # test try: - response = RestClient().get_view_data(database_id=1, view_id=3) + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except MalformedError: pass - def test_get_view_data_not_allowed_fails(self): + def test_get_view_data_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.get('/api/database/1/view/3/data', status_code=403) + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=403) # test try: - response = RestClient().get_view_data(database_id=1, view_id=3) + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except ForbiddenError: pass + def test_get_view_data_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=404) + # test + try: + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except NotExistsError: + pass + + def test_get_view_data_409_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=409) + # test + try: + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ExternalSystemError: + pass + + def test_get_view_data_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=503) + # test + try: + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ServiceError: + pass + + def test_get_view_data_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.get( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=202) + # test + try: + response = RestClient().get_view_data(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ResponseCodeError: + pass + def test_get_view_data_count_succeeds(self): with requests_mock.Mocker() as mock: exp = 844737 # mock - mock.head('/api/database/1/view/3/data', headers={'X-Count': str(exp)}) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + headers={'X-Count': str(exp)}) # test - response = RestClient().get_view_data_count(database_id=1, view_id=3) + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") self.assertEqual(exp, response) - def test_get_view_data_count_malformed_fails(self): + def test_get_view_data_count_400_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/view/3/data', status_code=400) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=400) # test try: - response = RestClient().get_view_data_count(database_id=1, view_id=3) + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except MalformedError: pass - def test_get_view_data_count_not_allowed_fails(self): + def test_get_view_data_count_403_fails(self): with requests_mock.Mocker() as mock: # mock - mock.head('/api/database/1/view/3/data', status_code=403) + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=403) # test try: - response = RestClient().get_view_data_count(database_id=1, view_id=3) + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") except ForbiddenError: pass + def test_get_view_data_count_404_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=404) + # test + try: + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except NotExistsError: + pass + + def test_get_view_data_count_409_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=409) + # test + try: + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ExternalSystemError: + pass + + def test_get_view_data_count_503_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=503) + # test + try: + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ServiceError: + pass + + def test_get_view_data_count_unknown_fails(self): + with requests_mock.Mocker() as mock: + # mock + mock.head( + '/api/database/6bd39359-b154-456d-b9c2-caa516a45732/view/1b3449d2-780e-4683-9af0-8733e608a4aa/data', + status_code=202) + # test + try: + response = RestClient().get_view_data_count(database_id="6bd39359-b154-456d-b9c2-caa516a45732", + view_id="1b3449d2-780e-4683-9af0-8733e608a4aa") + except ResponseCodeError: + pass + if __name__ == "__main__": unittest.main() diff --git a/make/rel.mk b/make/rel.mk index 0c4b2bb193f3618e3098d13fd283882701e29a20..c98668f08b9bc79f23be811f3fdfa0f753ca3d24 100644 --- a/make/rel.mk +++ b/make/rel.mk @@ -2,29 +2,29 @@ .PHONY: tag-images tag-images: build-images ## Tag the docker images. - docker tag dbrepo-analyse-service:latest "${REPOSITORY_URL}/analyse-service:${APP_VERSION}" - docker tag dbrepo-dashboard-service:latest "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}" - docker tag dbrepo-ui:latest "${REPOSITORY_URL}/ui:${APP_VERSION}" - docker tag dbrepo-data-service:latest "${REPOSITORY_URL}/data-service:${APP_VERSION}" - docker tag dbrepo-auth-service-init:latest "${REPOSITORY_URL}/auth-service-init:${APP_VERSION}" - docker tag dbrepo-metadata-service:latest "${REPOSITORY_URL}/metadata-service:${APP_VERSION}" - docker tag dbrepo-search-db:latest "${REPOSITORY_URL}/search-db:${APP_VERSION}" - docker tag dbrepo-search-service:latest "${REPOSITORY_URL}/search-service:${APP_VERSION}" - docker tag dbrepo-search-service-init:latest "${REPOSITORY_URL}/search-service-init:${APP_VERSION}" - docker tag dbrepo-storage-service-init:latest "${REPOSITORY_URL}/storage-service-init:${APP_VERSION}" + docker tag dbrepo-analyse-service:latest "${REPOSITORY_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-dashboard-service:latest "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-ui:latest "${REPOSITORY_URL}/ui:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-data-service:latest "${REPOSITORY_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-auth-service-init:latest "${REPOSITORY_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-metadata-service:latest "${REPOSITORY_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-search-db:latest "${REPOSITORY_URL}/search-db:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-search-service:latest "${REPOSITORY_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-search-service-init:latest "${REPOSITORY_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" + docker tag dbrepo-storage-service-init:latest "${REPOSITORY_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" .PHONY: release-images release-images: tag-images ## Release the docker images. - docker push "${REPOSITORY_URL}/analyse-service:${APP_VERSION}" - docker push "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}" - docker push "${REPOSITORY_URL}/ui:${APP_VERSION}" - docker push "${REPOSITORY_URL}/data-service:${APP_VERSION}" - docker push "${REPOSITORY_URL}/auth-service-init:${APP_VERSION}" - docker push "${REPOSITORY_URL}/search-db:${APP_VERSION}" - docker push "${REPOSITORY_URL}/metadata-service:${APP_VERSION}" - docker push "${REPOSITORY_URL}/search-service:${APP_VERSION}" - docker push "${REPOSITORY_URL}/search-service-init:${APP_VERSION}" - docker push "${REPOSITORY_URL}/storage-service-init:${APP_VERSION}" + docker push "${REPOSITORY_URL}/analyse-service:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/dashboard-service:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/ui:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/data-service:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/auth-service-init:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/search-db:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/metadata-service:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/search-service:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/search-service-init:${APP_VERSION}${BUILD_VERSION}" + docker push "${REPOSITORY_URL}/storage-service-init:${APP_VERSION}${BUILD_VERSION}" .PHONY: release-helm release-helm: gen-helm-doc ## Release the DBRepo and DBRepo MariaDB Galera Helm charts. diff --git a/mkdocs.yml b/mkdocs.yml index 5ec3a92799fba08d9299e466e780422f20bf1a65..536eed294ed4f5683d601f2e0a460a8ade5267d1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ site_name: Database Repository -site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/ +site_url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/ repo_url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services repo_name: fda-services site_author: Research Unit Data Science, Technische Universität Wien @@ -120,9 +120,9 @@ markdown_extensions: custom_icons: - .docs/overrides/.icons extra: - homepage: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/ + homepage: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.7/ version: - default: 1.6 + default: 1.7 provider: mike social: - icon: simple/artifacthub diff --git a/sonar-project.properties b/sonar-project.properties index c044de9ff1cd165bdd794b1959d5bae87369f5a0..0d25b112d7133494be618d3f61e3e17a2c415e94 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=fair-data-austria-db-repository_fda-services_a57fa043-ab99-4cdd-a721-162d9a916d77 sonar.host.url=https://s39.datalab.tuwien.ac.at # project -sonar.projectVersion=1.6.5 +sonar.projectVersion=1.7.0 # general sonar.qualitygate.wait=true sonar.projectCreation.mainBranchName=master diff --git a/versions.json b/versions.json index b42a3dfd7d8ac8f78858923d4ac6d89906452771..95ca2a62a6fec4b73534bc3d6981b1bcdfd8fff2 100644 --- a/versions.json +++ b/versions.json @@ -1,4 +1,9 @@ [ + { + "version": "1.7", + "title": "1.7", + "aliases": [] + }, { "version": "1.6", "title": "1.6", diff --git a/yq b/yq deleted file mode 100644 index 5578822fb407e254544a2b532ef439174956ea45..0000000000000000000000000000000000000000 --- a/yq +++ /dev/null @@ -1,7043 +0,0 @@ -openapi: 3.0.1 -info: - title: Database Repository Metadata Service API - description: Service that manages the metadata - contact: - name: Prof. Andreas Rauber - email: andreas.rauber@tuwien.ac.at - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - version: 1.6.2 -externalDocs: - description: Sourcecode Documentation - url: https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6.2/system-services-metadata/ -servers: -- url: http://localhost - description: Development instance -- url: https://test.dbrepo.tuwien.ac.at - description: Staging instance -paths: - /api/database: - get: - tags: - - database-endpoint - summary: List databases - description: "Lists all databases in the metadata database. Requests with HTTP\ - \ method **GET** return the list of databases, requests with HTTP method **HEAD**\ - \ only the number in the `X-Count` header." - operationId: list - parameters: - - name: internal_name - in: query - required: false - schema: - type: string - responses: - "200": - description: List of databases - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of databases - required: true - style: simple - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/DatabaseBriefDto" - post: - tags: - - database-endpoint - summary: Create database - description: Creates a database in the container with id. Requires roles `create-database`. - operationId: create_5 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseCreateDto" - required: true - responses: - "409": - description: Query store could not be created - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Database create query is malformed or image is not supported - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "423": - description: Database quota exceeded - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Database create permission is missing or grant permissions - at broker service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to fin container/user/database in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new database - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - security: - - bearerAuth: [] - - basicAuth: [] - head: - tags: - - database-endpoint - summary: List databases - description: "Lists all databases in the metadata database. Requests with HTTP\ - \ method **GET** return the list of databases, requests with HTTP method **HEAD**\ - \ only the number in the `X-Count` header." - operationId: list_1 - parameters: - - name: internal_name - in: query - required: false - schema: - type: string - responses: - "200": - description: List of databases - headers: - Access-Control-Expose-Headers: - description: Expose `X-Count` custom header - required: true - style: simple - X-Count: - description: Number of databases - required: true - style: simple - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/DatabaseBriefDto" - /api/database/{databaseId}/access/{userId}: - get: - tags: - - access-endpoint - summary: Find/Check access - description: "Finds or checks access of a user with given id to a database with\ - \ given id. Requests with HTTP method **GET** return the access object, requests\ - \ with HTTP method **HEAD** only the status. When the user has at least *READ*\ - \ access, the status 200 is returned, 403 otherwise. Requires role `check-database-access`\ - \ or `check-foreign-database-access`." - operationId: find - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - "403": - description: No access to this database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" - security: - - bearerAuth: [] - - basicAuth: [] - put: - tags: - - access-endpoint - summary: Modify access - description: Modifies access of a user with given id to database with given - id. Requires role `update-database-access`. - operationId: update_5 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: userId - in: path - required: true - schema: - type: string - format: uuid - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateDatabaseAccessDto" - required: true - responses: - "404": - description: Database or user not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Modify access not permitted when no access is granted in the - first place - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Access could not be updated in the data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Modified access - "502": - description: Access could not be updated due to connection error in the - data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Modify access query or database connection is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - post: - tags: - - access-endpoint - summary: Give access - description: Give a user with given id access to some database with given id. - Requires role `create-database-access`. - operationId: create_8 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: userId - in: path - required: true - schema: - type: string - format: uuid - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UpdateDatabaseAccessDto" - required: true - responses: - "404": - description: Database or user not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Access could not be created in the data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Failed giving access - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Granting access succeeded - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" - "400": - description: Granting access query or database connection is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Access could not be created due to connection error - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - access-endpoint - summary: Delete access - description: Delete access of a user with id to a database with id. Requires - role `delete-database-access`. - operationId: revoke - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - "403": - description: Revoke of access not permitted as no access was found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted access - "502": - description: Access could not be created due to connection error - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "User, database with access was not found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Access could not be revoked in the data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Modify access query or database connection is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - head: - tags: - - access-endpoint - summary: Find/Check access - description: "Finds or checks access of a user with given id to a database with\ - \ given id. Requests with HTTP method **GET** return the access object, requests\ - \ with HTTP method **HEAD** only the status. When the user has at least *READ*\ - \ access, the status 200 is returned, 403 otherwise. Requires role `check-database-access`\ - \ or `check-foreign-database-access`." - operationId: find_1 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - "403": - description: No access to this database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found database access - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseAccessDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/user/{userId}: - get: - tags: - - user-endpoint - summary: Get user - description: Gets own user information from the metadata database. Requires - authentication. Foreign user information can only be obtained if additional - role `find-foreign-user` is present. Finding information about internal users - results in a 404 error. - operationId: find_2 - parameters: - - name: userId - in: path - required: true - schema: - type: string - format: uuid - responses: - "404": - description: User was not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found user - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" - "403": - description: Find user is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - put: - tags: - - user-endpoint - summary: Update user - description: Updates user with id. Requires role `modify-user-information`. - operationId: modify - parameters: - - name: userId - in: path - required: true - schema: - type: string - format: uuid - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UserUpdateDto" - required: true - responses: - "202": - description: Modified user information - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" - "404": - description: Failed to find database/user in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Modify user query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to modify user metadata - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/user/{userId}/password: - put: - tags: - - user-endpoint - summary: Update user password - description: Updates password of user with id. Requires authentication. - operationId: password - parameters: - - name: userId - in: path - required: true - schema: - type: string - format: uuid - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UserPasswordDto" - required: true - responses: - "400": - description: Invalid password payload - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Modified user password - "403": - description: Not allowed to change foreign user password - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to get user in auth service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/user in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to auth service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/user/token: - put: - tags: - - user-endpoint - summary: Refresh token - description: Refreshes user token by refresh token. - operationId: refreshToken - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/RefreshTokenRequestDto" - required: true - responses: - "202": - description: Refreshed user token - content: - application/json: - schema: - $ref: "#/components/schemas/TokenDto" - "403": - description: Not allowed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Invalid refresh token - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to auth service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - post: - tags: - - user-endpoint - summary: Create token - description: Creates a user token via the Auth Service. - operationId: getToken - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LoginRequestDto" - required: true - responses: - "400": - description: Invalid login request - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not allowed to get token - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find user in auth database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to get user in auth service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Obtained user token - content: - application/json: - schema: - $ref: "#/components/schemas/TokenDto" - "428": - description: Account is not fully setup in auth service (requires password - change?) - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to auth service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/ontology/{ontologyId}: - get: - tags: - - ontology-endpoint - summary: Find ontology - description: Finds an ontology with id in the metadata database. - operationId: find_3 - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Could not find ontology - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Find one ontology - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyDto" - put: - tags: - - ontology-endpoint - summary: Update ontology - description: Updates an ontology with id. Requires role `update-ontology`. - operationId: update - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyModifyDto" - required: true - responses: - "404": - description: Could not find ontology - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated ontology successfully - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - ontology-endpoint - summary: Delete ontology - description: Deletes an ontology with given id. Requires role `delete-ontology`. - operationId: delete - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "202": - description: Deleted ontology successfully - content: - application/json: {} - "404": - description: Could not find ontology - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/message/{messageId}: - put: - tags: - - message-endpoint - summary: Update message - description: Updates a message with id. Requires role `update-maintenance-message`. - operationId: update_1 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageUpdateDto" - required: true - responses: - "202": - description: Updated message - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageBriefDto" - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - message-endpoint - summary: Delete message - description: Deletes a message with id. Requires role `delete-maintenance-message`. - operationId: delete_1 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted message - content: - application/json: {} - security: - - bearerAuth: [] - - basicAuth: [] - /api/image/{imageId}: - get: - tags: - - image-endpoint - summary: Find image - description: Finds a container image in the metadata database. - operationId: findById - parameters: - - name: imageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found image - content: - application/json: - schema: - $ref: "#/components/schemas/ImageDto" - put: - tags: - - image-endpoint - summary: Update image - description: Updates container image in the metadata database. Requires role - `modify-image`. - operationId: update_2 - parameters: - - name: imageId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ImageChangeDto" - required: true - responses: - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated image successfully - content: - application/json: - schema: - $ref: "#/components/schemas/ImageDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - image-endpoint - summary: Delete image - description: Deletes a container image in the metadata database. Requires role - `delete-image`. - operationId: delete_2 - parameters: - - name: imageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "202": - description: Deleted image successfully - "404": - description: Image could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/identifier/{identifierId}: - get: - tags: - - identifier-endpoint - summary: Find identifier - description: Finds an identifier with id. The response format depends on the - HTTP `Accept` header set on the request. - operationId: find_6 - parameters: - - name: identifierId - in: path - required: true - schema: - type: integer - format: int64 - - name: Accept - in: header - required: true - schema: - type: string - responses: - "200": - description: Found identifier successfully - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - application/ld+json: - schema: - $ref: "#/components/schemas/LdDatasetDto" - text/csv: {} - text/xml: {} - text/bibliography: {} - text/bibliography; style=apa: {} - text/bibliography; style=ieee: {} - text/bibliography; style=bibtex: {} - "502": - description: Connection to data service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: "Identifier could not be exported, the requested style is not\ - \ known" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "409": - description: Exported resource was not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "410": - description: Failed to retrieve from S3 endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Identifier could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "406": - description: Failed to find acceptable representation - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to find in data service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - put: - tags: - - identifier-endpoint - summary: Save identifier - description: Saves an identifier with id as a draft identifier. Identifiers - can only be created for objects the user has at least *READ* access in the - associated database (requires role `create-identifier`) or for any object - in any database (requires role `create-foreign-identifier`). - operationId: save - parameters: - - name: identifierId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierSaveDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Identifier form contains invalid request data - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Saved identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - "403": - description: Insufficient access rights or authorities - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - identifier-endpoint - summary: Delete identifier - description: Deletes an identifier with id. Requires role `delete-identifier`. - operationId: delete_3 - parameters: - - name: identifierId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to delete in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Identifier or database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted identifier - "403": - description: Deleting identifier not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/identifier/{identifierId}/publish: - put: - tags: - - identifier-endpoint - summary: Publish identifier - description: Publishes an identifier with id. A published identifier cannot - be changed anymore. Requires role `publish-identifier`. - operationId: publish - parameters: - - name: identifierId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Failed to find database, table or view" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Published identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - "400": - description: Identifier form contains invalid request data - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/visibility: - put: - tags: - - database-endpoint - summary: Update database visibility - description: Updates the database with id on the visibility. Only the database - owner can perform this operation. Requires role `modify-database-visibility`. - operationId: visibility - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseModifyVisibilityDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Visibility modified successfully - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "400": - description: The visibility payload is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Visibility modification is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/view/{viewId}: - get: - tags: - - view-endpoint - summary: Get view - description: Gets a view with id in the metadata database. - operationId: find_7 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: viewId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "403": - description: Find view is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, view or user could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Find view successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Type: - description: The JDBC connection type - style: simple - X-View: - description: The view internal name - style: simple - X-Database: - description: The database internal name - style: simple - X-Password: - description: The authentication password - style: simple - X-Host: - description: The database hostname - style: simple - X-Port: - description: The database port number - style: simple - content: - application/json: - schema: - $ref: "#/components/schemas/ViewDto" - security: - - bearerAuth: [] - - basicAuth: [] - put: - tags: - - view-endpoint - summary: Update view - description: Updates a view with id. This can only be performed by the view - owner or database owner. Requires role `create-database-view`. - operationId: update_3 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: viewId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ViewUpdateDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database or View could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Update not allowed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Update view query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Update view successfully - content: - '*/*': - schema: - $ref: "#/components/schemas/ViewDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - view-endpoint - summary: Delete view - description: Deletes a view with id. Requires role `delete-database-view`. - operationId: delete_4 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: viewId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "423": - description: Delete view resulted in an invalid query statement - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, view or user could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Delete view successfully - content: - '*/*': - schema: - type: object - "400": - description: Delete view query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Deletion not allowed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}: - get: - tags: - - table-endpoint - summary: Find table - description: "Finds a table with id. When a table is hidden (i.e. when `is_public`\ - \ is `false`), then the user needs to have at least read access and the role\ - \ `find-table`. When the `system` role is present, the endpoint responds with\ - \ additional connection metadata in the header." - operationId: findById_2 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Find table successfully - headers: - X-Username: - description: The authentication username - style: simple - X-Table: - description: The table internal name - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Type: - description: The JDBC connection type - style: simple - X-Database: - description: The database internal name - style: simple - X-Password: - description: The authentication password - style: simple - X-Host: - description: The database hostname - style: simple - X-Port: - description: The database port number - style: simple - content: - application/json: - schema: - $ref: "#/components/schemas/TableDto" - "503": - description: Failed to obtain queue information from broker service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Failed to establish connection with broker service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Table, database or container could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - put: - tags: - - table-endpoint - summary: Update table - description: Updates a table in the database with id. Requires role `update-table`. - operationId: update_4 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/TableUpdateDto" - required: true - responses: - "403": - description: Update table visibility not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Table could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated the table - content: - application/json: - schema: - $ref: "#/components/schemas/TableBriefDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Update table visibility payload is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - delete: - tags: - - table-endpoint - summary: Delete table - description: Deletes a table with id. Only the owner of a table can perform - this action (requires role `delete-table`) or anyone can delete a table (requires - role `delete-foreign-table`). - operationId: delete_5 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Delete table successfully - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Delete table query resulted in an invalid query statement - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Table, database or container could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/statistic: - put: - tags: - - table-endpoint - summary: Update statistics - description: "Updates basic statistical properties (min, max, mean, median,\ - \ std.dev) for numerical columns in a table with id. This action can only\ - \ be performed by the table owner. Requires role `update-table-statistic`." - operationId: updateStatistic - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Failed to map column statistic to known columns - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not the owner - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated table statistics successfully - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/column/{columnId}: - put: - tags: - - table-endpoint - summary: Update semantics - description: Updates column semantics of a table column with id. Only the table - owner with at least *READ* access to the associated database can update the - column semantics (requires role `modify-table-column-semantics`) or foreign - table columns if role `modify-foreign-table-column-semantics`. - operationId: updateColumn - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - - name: columnId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ColumnSemanticsUpdateDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Access to the database is forbidden - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find user/table/database/ontology in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Updated column semantics successfully - content: - application/json: - schema: - $ref: "#/components/schemas/ColumnDto" - "400": - description: Update semantic concept query is malformed or update unit of - measurement query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/owner: - put: - tags: - - database-endpoint - summary: Update database owner - description: Updates the database with id on the owner. Only the database owner - can perform this operation. Requires role `modify-database-owner`. - operationId: transfer - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseTransferDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Transfer of ownership was successful - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "403": - description: Transfer of ownership is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Owner payload is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/metadata/view: - put: - tags: - - database-endpoint - summary: Update database view schemas - description: Updates the database with id with generated metadata from view - that are not yet known to the database. Only the database owner can perform - this operation. Requires role `find-database`. - operationId: refreshViewMetadata - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Refreshed database views metadata - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "403": - description: Refresh view metadata is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/metadata/table: - put: - tags: - - database-endpoint - summary: Update database table schemas - description: Updates the database with id with generated metadata from tables - that are not yet known to the database. Only the database owner can perform - this operation. Requires role `find-database`. - operationId: refreshTableMetadata - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "403": - description: Not allowed to refresh table metadata - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to fin user/database in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Refreshed database tables metadata - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "400": - description: Failed to parse payload at search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/image: - get: - tags: - - database-endpoint - summary: Get database preview image - description: Gets the database with id on the preview image. - operationId: findPreviewImage - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: View of image was successful - content: - '*/*': - schema: - type: array - items: - type: string - format: byte - security: - - bearerAuth: [] - - basicAuth: [] - put: - tags: - - database-endpoint - summary: Update database preview image - description: Updates the database with id on the preview image. Only the database - owner can perform this operation. Requires role `modify-database-image`. - operationId: modifyImage - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseModifyImageDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Modify of image was successful - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "410": - description: File was not found in the Storage Service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Modify of image is not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/user: - get: - tags: - - user-endpoint - summary: List users - description: "Lists users known to the metadata database. Internal users are\ - \ omitted from the result list. If the optional query parameter `username`\ - \ is present, the result list can be filtered by matching this exact username." - operationId: findAll - parameters: - - name: username - in: query - required: false - schema: - type: string - responses: - "200": - description: List users - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/UserBriefDto" - post: - tags: - - user-endpoint - summary: Create user - description: Creates a user in the auth service and metadata database. Requires - that no credentials are sent in the request. - operationId: create - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/SignupRequestDto" - required: true - responses: - "403": - description: Internal authentication to the auth service is invalid - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Parameters are not well-formed (likely email) - content: - application/json: {} - "409": - description: User with username already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "417": - description: User with e-mail already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to create in auth service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created user - content: - application/json: - schema: - $ref: "#/components/schemas/UserDto" - "502": - description: Failed to create in auth service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Default role not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/ontology: - get: - tags: - - ontology-endpoint - summary: List ontologies - description: Lists all ontologies known to the metadata database. - operationId: findAll_2 - responses: - "200": - description: List ontologies - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/OntologyBriefDto" - post: - tags: - - ontology-endpoint - summary: Create ontology - description: Creates an ontology in the metadata database. Requires role `create-ontology`. - operationId: create_1 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyCreateDto" - required: true - responses: - "201": - description: Registered ontology successfully - content: - application/json: - schema: - $ref: "#/components/schemas/OntologyDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/message: - get: - tags: - - message-endpoint - summary: List messages - description: "Lists messages known to the metadata database. Messages can be\ - \ filtered be filtered with the optional `active` parameter. If set to *true*,\ - \ only active messages (that is, messages whose end time has not been reached)\ - \ will be returned. Otherwise only inactive messages are returned. If not\ - \ set, active and inactive messages are returned." - operationId: list_2 - parameters: - - name: active - in: query - required: false - schema: - type: boolean - responses: - "200": - description: List messages - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/BannerMessageDto" - post: - tags: - - message-endpoint - summary: Create message - description: Creates a message in the metadata database. Requires role `create-maintenance-message`. - operationId: create_2 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageCreateDto" - required: true - responses: - "201": - description: Created message - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageBriefDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/image: - get: - tags: - - image-endpoint - summary: List images - description: Lists all container images known to the metadata database. - operationId: findAll_3 - responses: - "200": - description: List images - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ImageBriefDto" - post: - tags: - - image-endpoint - summary: Create image - description: Creates a container image in the metadata database. Requires role - `create-image`. - operationId: create_3 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ImageCreateDto" - required: true - responses: - "409": - description: Image already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Image specification is invalid - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created image - content: - application/json: - schema: - $ref: "#/components/schemas/ImageDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/identifier: - get: - tags: - - identifier-endpoint - summary: List identifiers - description: Lists all identifiers known to the metadata database - operationId: findAll_4 - parameters: - - name: dbid - in: query - required: false - schema: - type: integer - format: int64 - - name: qid - in: query - required: false - schema: - type: integer - format: int64 - - name: vid - in: query - required: false - schema: - type: integer - format: int64 - - name: tid - in: query - required: false - schema: - type: integer - format: int64 - - name: Accept - in: header - required: true - schema: - type: string - responses: - "200": - description: Found identifiers successfully - content: - application/json: - schema: - type: array - items: - type: string - application/ld+json: - schema: - type: array - items: - $ref: "#/components/schemas/LdDatasetDto" - "406": - description: "Identifier could not be exported, the requested style is not\ - \ known" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - post: - tags: - - identifier-endpoint - summary: Create identifier - description: Create an identifier with id to create a draft identifier. Identifiers - can only be created for objects the user has at least *READ* access in the - associated database (requires role `create-identifier`) or for any object - in any database (requires role `create-foreign-identifier`). - operationId: create_4 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierCreateDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Drafted identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - "404": - description: "Failed to find database, table or view" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Identifier form contains invalid request data - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Insufficient access rights or authorities - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/view: - get: - tags: - - view-endpoint - summary: List views - description: Lists views known to the metadata database. - operationId: findAll_5 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Find views successfully - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ViewBriefDto" - "404": - description: Database or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - post: - tags: - - view-endpoint - summary: Create view - description: Creates a view. This can only be performed by the database owner. - Requires role `create-database-view`. - operationId: create_6 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ViewCreateDto" - required: true - responses: - "423": - description: Create view resulted in an invalid query statement - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Create view successfully - content: - application/json: - schema: - $ref: "#/components/schemas/ViewBriefDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Credentials missing - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/user in metadata database. - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create view query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table: - get: - tags: - - table-endpoint - summary: List tables - description: "Lists all tables known to the metadata database. When a database\ - \ has a hidden schema (i.e. when `is_schema_public` is `false`), then the\ - \ user needs to have at least read access and the role `list-tables`." - operationId: list_4 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "403": - description: List tables not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Database could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: List tables - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/TableBriefDto" - security: - - bearerAuth: [] - - basicAuth: [] - post: - tags: - - table-endpoint - summary: Create table - description: Creates a table in the database with id. Requires role `create-table`. - operationId: create_7 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/TableCreateDto" - required: true - responses: - "502": - description: Connection to search service failed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Create table not permitted - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new table - content: - application/json: - schema: - $ref: "#/components/schemas/TableBriefDto" - "409": - description: Create table conflicts with existing table name - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, container or user could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "503": - description: Failed to save in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Create table query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/container: - get: - tags: - - container-endpoint - summary: List containers - description: List all containers in the metadata database. - operationId: findAll_6 - parameters: - - name: limit - in: query - required: false - schema: - type: integer - format: int32 - responses: - "200": - description: List containers - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ContainerBriefDto" - post: - tags: - - container-endpoint - summary: Create container - description: Creates a container in the metadata database. Requires role `create-container`. - operationId: create_9 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ContainerCreateDto" - required: true - responses: - "400": - description: Container payload malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Container image or user could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "409": - description: Container name already exists - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "201": - description: Created a new container - content: - application/json: - schema: - $ref: "#/components/schemas/ContainerDto" - "403": - description: "Create container not permitted, need authority `create-container`" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/unit: - get: - tags: - - unit-endpoint - summary: List units - description: Lists units known to the metadata database. - operationId: findAll_1 - responses: - "200": - description: Find all semantic units - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/UnitDto" - /api/ontology/{ontologyId}/entity: - get: - tags: - - ontology-endpoint - summary: Find entities - description: Finds semantic entities by label or uri in an ontology with id. - Requires role `execute-semantic-query`. - operationId: find_4 - parameters: - - name: ontologyId - in: path - required: true - schema: - type: integer - format: int64 - - name: label - in: query - required: false - schema: - type: string - - name: uri - in: query - required: false - schema: - type: string - responses: - "400": - description: Filter params are invalid - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Found entities - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/EntityDto" - "404": - description: Could not find ontology - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "417": - description: Generated query or uri is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/oai: - get: - tags: - - metadata-endpoint - summary: Get record - operationId: identify_1_1_1_1 - parameters: - - name: verb - in: query - - name: parameters - in: query - required: true - schema: - $ref: "#/components/schemas/OaiListIdentifiersParameters" - responses: - "200": - description: List containers - content: - text/xml: {} - /api/message/message/{messageId}: - get: - tags: - - message-endpoint - summary: Find message - description: Finds a message with id in the metadata database. - operationId: find_5 - parameters: - - name: messageId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Get messages - content: - application/json: - schema: - $ref: "#/components/schemas/BannerMessageDto" - "404": - description: Could not find message - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/license: - get: - tags: - - license-endpoint - summary: List licenses - description: Lists licenses known to the metadata database. - operationId: list_3 - responses: - "200": - description: List of licenses - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - /api/identifier/retrieve: - get: - tags: - - identifier-endpoint - summary: Retrieve PID metadata - description: "Retrieves Persistent Identifier (PID) metadata from external endpoints.\ - \ Supported PIDs are: ORCID, ROR, DOI." - operationId: retrieve - parameters: - - name: url - in: query - required: true - schema: - type: string - responses: - "200": - description: Retrieved metadata from identifier - content: - application/json: - schema: - $ref: "#/components/schemas/IdentifierDto" - "404": - description: Failed to find metadata for identifier - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - /api/database/{databaseId}: - get: - tags: - - database-endpoint - summary: Find database - description: Finds a database with id. - operationId: findById_1 - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "503": - description: Failed to find queue information in broker service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "502": - description: Connection to the broker service could not be established - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Database found successfully - headers: - X-Username: - description: The authentication username - style: simple - Access-Control-Expose-Headers: - description: Expose custom headers - style: simple - X-Password: - description: The authentication password - style: simple - content: - application/json: - schema: - $ref: "#/components/schemas/DatabaseBriefDto" - "403": - description: Not allowed to view database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: "Database, user or exchange could not be found" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/suggest: - get: - tags: - - table-endpoint - summary: Suggest semantics - description: Suggests semantic concepts for a table. This action can only be - performed by the table owner. Requires role `table-semantic-analyse`. - operationId: analyseTable - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "417": - description: Generated query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "400": - description: Failed to parse statistic in search service - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "403": - description: Not the table owner. - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Suggested table semantics successfully - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/EntityDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/database/{databaseId}/table/{tableId}/column/{columnId}/suggest: - get: - tags: - - table-endpoint - summary: Suggest semantics - description: Suggests column semantics. Requires role `table-semantic-analyse`. - operationId: analyseTableColumn - parameters: - - name: databaseId - in: path - required: true - schema: - type: integer - format: int64 - - name: tableId - in: path - required: true - schema: - type: integer - format: int64 - - name: columnId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "400": - description: Generated query is malformed - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "422": - description: Ontology does not have rdf or sparql endpoint - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "200": - description: Suggested table column semantics successfully - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/TableColumnEntityDto" - "404": - description: Failed to find database/table in metadata database - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/container/{containerId}: - get: - tags: - - container-endpoint - summary: Find container - description: Finds a container in the metadata database. - operationId: findById_3 - parameters: - - name: containerId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "200": - description: Found container - content: - application/json: - schema: - $ref: "#/components/schemas/ContainerDto" - "404": - description: Container image could not be found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - delete: - tags: - - container-endpoint - summary: Delete container - description: Deletes a container in the metadata database. Requires role `delete-container`. - operationId: delete_6 - parameters: - - name: containerId - in: path - required: true - schema: - type: integer - format: int64 - responses: - "404": - description: Container not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - "202": - description: Deleted container - "403": - description: "Create container not permitted, need authority `delete-container`" - content: - application/json: - schema: - $ref: "#/components/schemas/ApiErrorDto" - security: - - bearerAuth: [] - - basicAuth: [] - /api/concept: - get: - tags: - - concept-endpoint - summary: List concepts - description: List all semantic concepts known to the metadata database - operationId: findAll_7 - responses: - "200": - description: List concepts - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ConceptDto" -components: - schemas: - DatabaseBriefDto: - required: - - contact - - id - - internal_name - - is_public - - is_schema_public - - name - - owner_id - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - description: - type: string - example: Air Quality - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierBriefDto" - contact: - $ref: "#/components/schemas/UserBriefDto" - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - owner_id: - type: string - format: uuid - preview_image: - type: string - IdentifierBriefDto: - required: - - created_by - - database_id - - id - - publication_year - - publisher - - titles - - type - type: object - properties: - id: - type: integer - format: int64 - type: - type: string - enum: - - database - - subset - - table - - view - titles: - type: array - items: - $ref: "#/components/schemas/IdentifierTitleDto" - doi: - type: string - example: 10.1038/nphys1170 - publisher: - type: string - example: TU Wien - status: - type: string - enum: - - draft - - published - database_id: - type: integer - format: int64 - example: 1 - query_id: - type: integer - format: int64 - example: 1 - table_id: - type: integer - format: int64 - example: 1 - view_id: - type: integer - format: int64 - example: 1 - publication_year: - type: integer - format: int32 - example: 2022 - created_by: - type: string - format: uuid - IdentifierTitleDto: - required: - - id - type: object - properties: - id: - type: integer - format: int64 - title: - type: string - example: Airquality Demonstrator - language: - type: string - example: en - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - type: - type: string - enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle - - Other - UserBriefDto: - required: - - id - - username - type: object - properties: - id: - type: string - format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - username: - type: string - description: Only contains lowercase characters - example: jcarberry - name: - type: string - example: Josiah Carberry - orcid: - type: string - example: 0000-0002-1825-0097 - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry - ApiErrorDto: - required: - - code - - message - - status - type: object - properties: - status: - type: string - example: NOT_FOUND - enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 EARLY_HINTS - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED - message: - type: string - example: Error message - code: - type: string - example: error.service.code - DatabaseAccessDto: - required: - - type - - user - type: object - properties: - user: - $ref: "#/components/schemas/UserBriefDto" - type: - type: string - enum: - - read - - write_own - - write_all - UserUpdateDto: - required: - - language - - theme - type: object - properties: - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Brown University - orcid: - type: string - example: 0000-0002-1825-0097 - theme: - type: string - example: dark - language: - type: string - example: en - UserAttributesDto: - required: - - language - - theme - type: object - properties: - theme: - type: string - example: light - orcid: - type: string - example: https://orcid.org/0000-0002-1825-0097 - affiliation: - type: string - example: Brown University - language: - type: string - example: en - UserDto: - required: - - attributes - - id - type: object - properties: - id: - type: string - format: uuid - example: 1ffc7b0e-9aeb-4e8b-b8f1-68f3936155b4 - name: - type: string - example: Josiah Carberry - attributes: - $ref: "#/components/schemas/UserAttributesDto" - last_retrieved: - type: string - format: date-time - qualified_name: - type: string - example: Josiah Carberry — @jcarberry - given_name: - type: string - example: Josiah - family_name: - type: string - example: Carberry - UserPasswordDto: - required: - - password - type: object - properties: - password: - type: string - RefreshTokenRequestDto: - required: - - refresh_token - type: object - properties: - refresh_token: - type: string - example: refresh_token - TokenDto: - required: - - access_token - - expires_in - - id_token - - not-before-policy - - refresh_expires_in - - refresh_token - - scope - - session_state - - token_type - type: object - properties: - scope: - type: string - access_token: - type: string - expires_in: - type: integer - format: int64 - refresh_token: - type: string - refresh_expires_in: - type: integer - format: int64 - id_token: - type: string - session_state: - type: string - token_type: - type: string - not-before-policy: - type: integer - format: int64 - OntologyModifyDto: - required: - - prefix - - uri - type: object - properties: - uri: - type: string - example: Ontology URI - prefix: - type: string - example: Ontology prefix - sparql_endpoint: - type: string - example: Ontology SPARQL endpoint - rdf_path: - type: string - example: rdf/om-2.0.rdf - OntologyDto: - required: - - id - - prefix - - rdf - - sparql - - uri - type: object - properties: - id: - type: integer - format: int64 - uri: - type: string - example: http://www.wikidata.org/ - prefix: - type: string - example: wd - sparql: - type: boolean - example: true - rdf: - type: boolean - example: false - uri_pattern: - type: string - example: http://www.wikidata.org/entity/.* - sparql_endpoint: - type: string - example: https://query.wikidata.org/sparql - rdf_path: - type: string - example: rdf/om-2.0.rdf - BannerMessageUpdateDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - display_start: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - display_end: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - BannerMessageBriefDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - ImageChangeDto: - required: - - dialect - - driver_class - - jdbc_method - - registry - type: object - properties: - registry: - type: string - example: docker.io/library - defaultPort: - maximum: 65535 - minimum: 1024 - type: integer - format: int32 - example: 5432 - dialect: - type: string - example: Postgres - driver_class: - type: string - example: org.postgresql.Driver - jdbc_method: - type: string - example: postgresql - DataTypeDto: - required: - - display_name - - documentation - - is_buildable - - is_quoted - - value - type: object - properties: - value: - type: string - example: time - documentation: - type: string - example: https://mariadb.com/kb/en/time/ - display_name: - type: string - example: TIME(fsp) - size_min: - type: integer - format: int32 - example: 0 - size_max: - type: integer - format: int32 - example: 6 - size_default: - type: integer - format: int32 - example: 0 - size_required: - type: boolean - example: false - d_min: - type: integer - format: int32 - d_max: - type: integer - format: int32 - d_default: - type: integer - format: int32 - d_required: - type: boolean - data_hint: - type: string - example: "e.g. HH:MM:SS, HH:MM, HHMMSS, H:M:S" - type_hint: - type: string - example: "fsp=microsecond precision, min. 0, max. 6" - is_quoted: - type: boolean - description: frontend needs to quote this data type - example: false - is_buildable: - type: boolean - description: frontend can build this data type - example: true - ImageDto: - required: - - data_types - - default - - default_port - - dialect - - driver_class - - id - - jdbc_method - - name - - operators - - registry - - version - type: object - properties: - id: - type: integer - format: int64 - registry: - type: string - example: docker.io/library - name: - type: string - example: mariadb - version: - type: string - example: "10.5" - dialect: - type: string - example: org.hibernate.dialect.MariaDBDialect - operators: - type: array - items: - $ref: "#/components/schemas/OperatorDto" - driver_class: - type: string - example: org.mariadb.jdbc.Driver - jdbc_method: - type: string - example: mariadb - default: - type: boolean - example: false - default_port: - type: integer - format: int32 - example: 3306 - data_types: - type: array - items: - $ref: "#/components/schemas/DataTypeDto" - OperatorDto: - required: - - display_name - - documentation - - value - type: object - properties: - id: - type: integer - format: int64 - value: - type: string - example: XOR - documentation: - type: string - example: https://mariadb.com/kb/en/xor/ - display_name: - type: string - example: XOR - CreatorSaveDto: - required: - - creator_name - - id - type: object - properties: - id: - type: integer - format: int64 - example: 1 - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Wesleyan University - creator_name: - type: string - example: "Carberry, Josiah" - name_type: - type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: - type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: - type: string - example: ORCID - enum: - - ORCID - - ROR - - ISNI - - GRID - affiliation_identifier: - type: string - example: https://ror.org/04d836q62 - affiliation_identifier_scheme: - type: string - example: ROR - enum: - - ROR - - GRID - - ISNI - IdentifierFunderSaveDto: - required: - - funder_name - - id - type: object - properties: - id: - type: integer - format: int64 - example: 1 - funder_name: - type: string - example: European Commission - funder_identifier: - type: string - example: http://doi.org/10.13039/501100000780 - funder_identifier_type: - type: string - example: Crossref Funder ID - enum: - - Crossref Funder ID - - ROR - - GND - - ISNI - - Other - scheme_uri: - type: string - example: http://doi.org/ - award_number: - type: string - example: "824087" - award_title: - type: string - example: EOSC-Life - IdentifierSaveDescriptionDto: - required: - - description - - id - type: object - properties: - id: - type: integer - format: int64 - example: 1 - description: - type: string - example: "Air quality reports at Stephansplatz, Vienna" - language: - type: string - example: en - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - type: - type: string - example: Abstract - enum: - - Abstract - - Methods - - SeriesInformation - - TableOfContents - - TechnicalInfo - - Other - IdentifierSaveDto: - required: - - creators - - database_id - - id - - publication_year - - publisher - - titles - - type - type: object - properties: - id: - type: integer - format: int64 - example: 1 - type: - type: string - example: database - enum: - - database - - subset - - table - - view - doi: - type: string - example: 10.1111/11111111 - titles: - type: array - items: - $ref: "#/components/schemas/IdentifierSaveTitleDto" - descriptions: - type: array - items: - $ref: "#/components/schemas/IdentifierSaveDescriptionDto" - funders: - type: array - items: - $ref: "#/components/schemas/IdentifierFunderSaveDto" - licenses: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - publisher: - type: string - example: TU Wien - language: - type: string - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - creators: - type: array - items: - $ref: "#/components/schemas/CreatorSaveDto" - database_id: - type: integer - format: int64 - example: 1 - query_id: - type: integer - format: int64 - view_id: - type: integer - format: int64 - table_id: - type: integer - format: int64 - publication_day: - type: integer - format: int32 - example: 15 - publication_month: - type: integer - format: int32 - example: 12 - publication_year: - type: integer - format: int32 - example: 2022 - related_identifiers: - type: array - items: - $ref: "#/components/schemas/RelatedIdentifierSaveDto" - IdentifierSaveTitleDto: - required: - - id - - title - type: object - properties: - id: - type: integer - format: int64 - example: 1 - title: - type: string - example: Airquality Demonstrator - language: - type: string - example: en - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - type: - type: string - example: Subtitle - enum: - - AlternativeTitle - - Subtitle - - TranslatedTitle - - Other - LicenseDto: - required: - - identifier - - uri - type: object - properties: - identifier: - type: string - example: MIT - uri: - type: string - example: https://opensource.org/licenses/MIT - description: - type: string - example: "A short and simple permissive license with conditions only requiring\ - \ preservation of copyright and license notices. Licensed works, modifications,\ - \ and larger works may be distributed under different terms and without\ - \ source code." - RelatedIdentifierSaveDto: - required: - - id - - relation - - type - - value - type: object - properties: - id: - type: integer - format: int64 - example: 1 - value: - type: string - example: 10.70124/dc4zh-9ce78 - type: - type: string - example: DOI - enum: - - DOI - - URL - - URN - - ARK - - arXiv - - bibcode - - EAN13 - - EISSN - - Handle - - IGSN - - ISBN - - ISTC - - LISSN - - LSID - - PMID - - PURL - - UPC - - w3id - relation: - type: string - example: Cites - enum: - - IsCitedBy - - Cites - - IsSupplementTo - - IsSupplementedBy - - IsContinuedBy - - Continues - - IsDescribedBy - - Describes - - HasMetadata - - IsMetadataFor - - HasVersion - - IsVersionOf - - IsNewVersionOf - - IsPreviousVersionOf - - IsPartOf - - HasPart - - IsPublishedIn - - IsReferencedBy - - References - - IsDocumentedBy - - Documents - - IsCompiledBy - - Compiles - - IsVariantFormOf - - IsOriginalFormOf - - IsIdenticalTo - - IsReviewedBy - - Reviews - - IsDerivedFrom - - IsSourceOf - - IsRequiredBy - - Requires - - IsObsoletedBy - - Obsoletes - CreatorDto: - required: - - creator_name - - id - type: object - properties: - id: - type: integer - format: int64 - firstname: - type: string - example: Josiah - lastname: - type: string - example: Carberry - affiliation: - type: string - example: Brown University - creator_name: - type: string - example: "Carberry, Josiah" - name_type: - type: string - example: Personal - enum: - - Personal - - Organizational - name_identifier: - type: string - example: 0000-0002-1825-0097 - name_identifier_scheme: - type: string - example: ORCID - enum: - - ORCID - - ROR - - ISNI - - GRID - name_identifier_scheme_uri: - type: string - example: https://orcid.org/ - affiliation_identifier: - type: string - example: https://ror.org/05gq02987 - affiliation_identifier_scheme: - type: string - example: ROR - enum: - - ROR - - GRID - - ISNI - affiliation_identifier_scheme_uri: - type: string - example: https://ror.org/ - IdentifierDescriptionDto: - required: - - id - type: object - properties: - id: - type: integer - format: int64 - description: - type: string - example: "Air quality reports at Stephansplatz, Vienna" - language: - type: string - example: en - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - type: - type: string - example: Abstract - enum: - - Abstract - - Methods - - SeriesInformation - - TableOfContents - - TechnicalInfo - - Other - IdentifierDto: - required: - - creators - - database_id - - id - - owner - - publication_year - - publisher - - query - - query_hash - - query_normalized - - titles - - type - type: object - properties: - id: - type: integer - format: int64 - type: - type: string - enum: - - database - - subset - - table - - view - titles: - type: array - items: - $ref: "#/components/schemas/IdentifierTitleDto" - descriptions: - type: array - items: - $ref: "#/components/schemas/IdentifierDescriptionDto" - funders: - type: array - items: - $ref: "#/components/schemas/IdentifierFunderDto" - query: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - execution: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - doi: - type: string - example: 10.1038/nphys1170 - publisher: - type: string - example: TU Wien - owner: - $ref: "#/components/schemas/UserBriefDto" - language: - type: string - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - licenses: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - creators: - type: array - items: - $ref: "#/components/schemas/CreatorDto" - status: - type: string - enum: - - draft - - published - database_id: - type: integer - format: int64 - example: 1 - query_id: - type: integer - format: int64 - example: 1 - table_id: - type: integer - format: int64 - example: 1 - view_id: - type: integer - format: int64 - example: 1 - query_normalized: - type: string - example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ - \ = \"09:STEF\"" - related_identifiers: - type: array - items: - $ref: "#/components/schemas/RelatedIdentifierDto" - query_hash: - type: string - description: query hash in sha512 - result_hash: - type: string - example: 34fe82cda2c53f13f8d90cfd7a3469e3a939ff311add50dce30d9136397bf8e5 - result_number: - type: integer - format: int64 - example: 1 - publication_day: - type: integer - format: int32 - example: 15 - publication_month: - type: integer - format: int32 - example: 12 - publication_year: - type: integer - format: int32 - example: 2022 - IdentifierFunderDto: - required: - - funder_name - - id - type: object - properties: - id: - type: integer - format: int64 - funder_name: - type: string - example: European Commission - funder_identifier: - type: string - example: http://doi.org/10.13039/501100000780 - funder_identifier_type: - type: string - example: Crossref Funder ID - enum: - - Crossref Funder ID - - ROR - - GND - - ISNI - - Other - scheme_uri: - type: string - example: http://doi.org/ - award_number: - type: string - example: "824087" - award_title: - type: string - example: EOSC-Life - RelatedIdentifierDto: - required: - - id - - relation - - type - - value - type: object - properties: - id: - type: integer - format: int64 - value: - type: string - example: 10.70124/dc4zh-9ce78 - type: - type: string - example: DOI - enum: - - DOI - - URL - - URN - - ARK - - arXiv - - bibcode - - EAN13 - - EISSN - - Handle - - IGSN - - ISBN - - ISTC - - LISSN - - LSID - - PMID - - PURL - - UPC - - w3id - relation: - type: string - example: Cites - enum: - - IsCitedBy - - Cites - - IsSupplementTo - - IsSupplementedBy - - IsContinuedBy - - Continues - - IsDescribedBy - - Describes - - HasMetadata - - IsMetadataFor - - HasVersion - - IsVersionOf - - IsNewVersionOf - - IsPreviousVersionOf - - IsPartOf - - HasPart - - IsPublishedIn - - IsReferencedBy - - References - - IsDocumentedBy - - Documents - - IsCompiledBy - - Compiles - - IsVariantFormOf - - IsOriginalFormOf - - IsIdenticalTo - - IsReviewedBy - - Reviews - - IsDerivedFrom - - IsSourceOf - - IsRequiredBy - - Requires - - IsObsoletedBy - - Obsoletes - DatabaseModifyVisibilityDto: - required: - - is_public - - is_schema_public - type: object - properties: - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - ViewUpdateDto: - required: - - is_public - - is_schema_public - type: object - properties: - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - ViewColumnDto: - required: - - auto_generated - - database_id - - id - - internal_name - - is_null_allowed - - name - - ord - - type - type: object - properties: - id: - type: integer - format: int64 - name: - maxLength: 64 - minLength: 0 - type: string - example: Date - size: - type: integer - format: int64 - example: 255 - d: - type: integer - format: int64 - example: 0 - description: - maxLength: 2048 - minLength: 0 - type: string - example: Column comment - database_id: - type: integer - format: int64 - ord: - type: integer - format: int32 - example: 0 - internal_name: - maxLength: 64 - minLength: 0 - type: string - example: mdb_date - auto_generated: - type: boolean - example: false - index_length: - type: integer - format: int64 - length: - type: integer - format: int64 - type: - type: string - example: string - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - is_null_allowed: - type: boolean - example: false - ViewDto: - required: - - columns - - database_id - - id - - internal_name - - name - - owner - - query - - query_hash - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierDto" - query: - type: string - example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC - owner: - $ref: "#/components/schemas/UserBriefDto" - columns: - type: array - items: - $ref: "#/components/schemas/ViewColumnDto" - last_retrieved: - type: string - format: date-time - database_id: - type: integer - format: int64 - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - initial_view: - type: boolean - description: True if it is the default view for the database - example: true - query_hash: - type: string - example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 - TableUpdateDto: - required: - - is_public - - is_schema_public - type: object - properties: - description: - maxLength: 180 - minLength: 0 - type: string - example: Air Quality in Austria - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - TableBriefDto: - required: - - database_id - - id - - internal_name - - is_public - - is_schema_public - - is_versioned - - name - - owned_by - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - description: - type: string - example: Air Quality in Austria - database_id: - type: integer - format: int64 - internal_name: - type: string - example: air_quality - is_versioned: - type: boolean - example: true - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - owned_by: - type: string - format: uuid - ColumnSemanticsUpdateDto: - type: object - properties: - concept_uri: - type: string - unit_uri: - type: string - ColumnDto: - required: - - database_id - - id - - internal_name - - is_null_allowed - - name - - ord - - table_id - - type - type: object - properties: - id: - type: integer - format: int64 - example: 1 - name: - maxLength: 64 - minLength: 0 - type: string - example: Given Name - alias: - type: string - example: firstname - size: - type: integer - format: int64 - example: 255 - d: - type: integer - format: int64 - example: 0 - mean: - type: number - example: 45.4 - median: - type: number - example: 51 - concept: - $ref: "#/components/schemas/ConceptBriefDto" - unit: - $ref: "#/components/schemas/UnitBriefDto" - description: - maxLength: 2048 - minLength: 0 - type: string - example: Column comment - enums: - type: array - items: - type: string - sets: - type: array - items: - type: string - database_id: - type: integer - format: int64 - example: 2 - table_id: - type: integer - format: int64 - example: 3 - ord: - type: integer - format: int32 - example: 0 - internal_name: - maxLength: 64 - minLength: 0 - type: string - example: given_name - index_length: - type: integer - format: int64 - example: 255 - length: - type: integer - format: int64 - example: 255 - type: - type: string - example: varchar - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - data_length: - type: integer - format: int64 - example: 34300 - max_data_length: - type: integer - format: int64 - example: 34300 - num_rows: - type: integer - format: int64 - example: 32 - val_min: - type: number - example: 0 - val_max: - type: number - example: 100 - std_dev: - type: number - example: 5.32 - is_null_allowed: - type: boolean - example: false - ConceptBriefDto: - required: - - id - - uri - type: object - properties: - id: - type: integer - format: int64 - example: 23 - uri: - type: string - example: http://www.wikidata.org/entity/Q202444 - name: - type: string - example: given name - description: - type: string - example: "name typically used to differentiate people from the same family,\ - \ clan, or other social group who have a common last name" - UnitBriefDto: - required: - - id - - uri - type: object - properties: - id: - type: integer - format: int64 - example: 34 - uri: - type: string - example: http://www.wikidata.org/entity/Q1422583 - name: - type: string - example: importance - description: - type: string - example: "subjective magnitude of value, meaning, or purpose" - DatabaseTransferDto: - required: - - id - type: object - properties: - id: - type: string - format: uuid - DatabaseModifyImageDto: - type: object - properties: - key: - type: string - UpdateDatabaseAccessDto: - required: - - type - type: object - properties: - type: - type: string - enum: - - read - - write_own - - write_all - SignupRequestDto: - required: - - email - - password - - username - type: object - properties: - username: - pattern: "^[a-z0-9]{3,}$" - type: string - example: user - email: - type: string - example: user@example.com - password: - type: string - LoginRequestDto: - required: - - password - - username - type: object - properties: - username: - type: string - example: user - password: - type: string - OntologyCreateDto: - required: - - prefix - - uri - type: object - properties: - uri: - type: string - example: Ontology URI - prefix: - type: string - example: Ontology prefix - sparql_endpoint: - type: string - example: Ontology SPARQL endpoint - BannerMessageCreateDto: - required: - - message - - type - type: object - properties: - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - display_start: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - display_end: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - ImageCreateDto: - required: - - default_port - - dialect - - driver_class - - is_default - - jdbc_method - - name - - registry - - version - type: object - properties: - registry: - type: string - example: docker.io/library - name: - type: string - example: mariadb - version: - type: string - dialect: - type: string - is_default: - type: boolean - example: false - driver_class: - type: string - jdbc_method: - type: string - default_port: - maximum: 65535 - minimum: 1024 - type: integer - format: int32 - IdentifierCreateDto: - required: - - creators - - database_id - - publication_year - - publisher - - titles - - type - type: object - properties: - type: - type: string - example: database - enum: - - database - - subset - - table - - view - doi: - type: string - example: 10.1111/11111111 - titles: - type: array - items: - $ref: "#/components/schemas/IdentifierSaveTitleDto" - descriptions: - type: array - items: - $ref: "#/components/schemas/IdentifierSaveDescriptionDto" - funders: - type: array - items: - $ref: "#/components/schemas/IdentifierFunderSaveDto" - licenses: - type: array - items: - $ref: "#/components/schemas/LicenseDto" - publisher: - type: string - example: TU Wien - language: - type: string - enum: - - ab - - aa - - af - - ak - - sq - - am - - ar - - an - - hy - - as - - av - - ae - - ay - - az - - bm - - ba - - eu - - be - - bn - - bh - - bi - - bs - - br - - bg - - my - - ca - - km - - ch - - ce - - ny - - zh - - cu - - cv - - kw - - co - - cr - - hr - - cs - - da - - dv - - nl - - dz - - en - - eo - - et - - ee - - fo - - fj - - fi - - fr - - ff - - gd - - gl - - lg - - ka - - de - - ki - - el - - kl - - gn - - gu - - ht - - ha - - he - - hz - - hi - - ho - - hu - - is - - io - - ig - - id - - ia - - ie - - iu - - ik - - ga - - it - - ja - - jv - - kn - - kr - - ks - - kk - - rw - - kv - - kg - - ko - - kj - - ku - - ky - - lo - - la - - lv - - lb - - li - - ln - - lt - - lu - - mk - - mg - - ms - - ml - - mt - - gv - - mi - - mr - - mh - - ro - - mn - - na - - nv - - nd - - ng - - ne - - se - - "no" - - nb - - nn - - ii - - oc - - oj - - or - - om - - os - - pi - - pa - - ps - - fa - - pl - - pt - - qu - - rm - - rn - - ru - - sm - - sg - - sa - - sc - - sr - - sn - - sd - - si - - sk - - sl - - so - - st - - nr - - es - - su - - sw - - ss - - sv - - tl - - ty - - tg - - ta - - tt - - te - - th - - bo - - ti - - to - - ts - - tn - - tr - - tk - - tw - - ug - - uk - - ur - - uz - - ve - - vi - - vo - - wa - - cy - - fy - - wo - - xh - - yi - - yo - - za - - zu - creators: - type: array - items: - $ref: "#/components/schemas/CreatorSaveDto" - database_id: - type: integer - format: int64 - example: 1 - query_id: - type: integer - format: int64 - view_id: - type: integer - format: int64 - table_id: - type: integer - format: int64 - publication_day: - type: integer - format: int32 - example: 15 - publication_month: - type: integer - format: int32 - example: 12 - publication_year: - type: integer - format: int32 - example: 2022 - related_identifiers: - type: array - items: - $ref: "#/components/schemas/RelatedIdentifierSaveDto" - DatabaseCreateDto: - required: - - container_id - - is_public - - is_schema_public - - name - type: object - properties: - name: - type: string - example: Air Quality - container_id: - type: integer - format: int64 - example: 1 - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - ViewCreateDto: - required: - - is_public - - is_schema_public - - name - - query - type: object - properties: - name: - maxLength: 63 - minLength: 1 - type: string - example: Air Quality - query: - type: string - example: SELECT `id` FROM `air_quality` - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - ViewBriefDto: - required: - - database_id - - id - - internal_name - - name - - query - - query_hash - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - query: - type: string - example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC - database_id: - type: integer - format: int64 - internal_name: - type: string - example: air_quality - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - initial_view: - type: boolean - description: True if it is the default view for the database - example: true - query_hash: - type: string - example: 7de03e818900b6ea6d58ad0306d4a741d658c6df3d1964e89ed2395d8c7e7916 - owned_by: - type: string - format: uuid - ColumnCreateDto: - required: - - name - - null_allowed - - type - type: object - properties: - name: - type: string - example: Date - type: - type: string - example: string - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - size: - type: integer - format: int64 - example: 255 - d: - type: integer - format: int64 - example: 0 - description: - maxLength: 2048 - minLength: 0 - type: string - example: Formatted as YYYY-MM-dd - enums: - type: array - description: "enum values, only considered when type = ENUM" - items: - type: string - description: "enum values, only considered when type = ENUM" - sets: - type: array - description: "set values, only considered when type = SET" - items: - type: string - description: "set values, only considered when type = SET" - index_length: - type: integer - format: int64 - null_allowed: - type: boolean - example: true - concept_uri: - type: string - unit_uri: - type: string - ConstraintsCreateDto: - required: - - checks - - foreign_keys - - primary_key - - uniques - type: object - properties: - uniques: - type: array - items: - type: array - items: - type: string - checks: - uniqueItems: true - type: array - items: - type: string - foreign_keys: - type: array - items: - $ref: "#/components/schemas/ForeignKeyCreateDto" - primary_key: - uniqueItems: true - type: array - items: - type: string - ForeignKeyCreateDto: - required: - - columns - - referenced_columns - - referenced_table - type: object - properties: - columns: - type: array - items: - type: string - referenced_table: - type: string - referenced_columns: - type: array - items: - type: string - on_update: - type: string - enum: - - restrict - - cascade - - set_null - - no_action - - set_default - on_delete: - type: string - enum: - - restrict - - cascade - - set_null - - no_action - - set_default - TableCreateDto: - required: - - columns - - constraints - - is_public - - is_schema_public - - name - type: object - properties: - name: - maxLength: 64 - minLength: 1 - type: string - example: Air Quality - description: - maxLength: 180 - minLength: 0 - type: string - example: Air Quality in Austria - columns: - type: array - items: - $ref: "#/components/schemas/ColumnCreateDto" - constraints: - $ref: "#/components/schemas/ConstraintsCreateDto" - is_public: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - ContainerCreateDto: - required: - - host - - image_id - - name - - privileged_password - - privileged_username - - quota - type: object - properties: - name: - type: string - example: Air Quality - host: - type: string - description: Hostname of container - port: - type: integer - description: Port of container - format: int32 - quota: - type: integer - format: int64 - example: 50 - image_id: - type: integer - description: Image ID - format: int64 - ui_host: - type: string - ui_port: - type: integer - format: int32 - privileged_username: - type: string - description: Username of privileged user - example: root - privileged_password: - type: string - description: Password of privileged user - ContainerDto: - required: - - count - - id - - image - - internal_name - - name - - quota - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - image: - $ref: "#/components/schemas/ImageDto" - quota: - type: integer - format: int64 - example: 50 - count: - type: integer - format: int64 - example: 10 - last_retrieved: - type: string - format: date-time - internal_name: - type: string - example: data-db - ui_host: - type: string - ui_port: - type: integer - format: int32 - ColumnBriefDto: - required: - - column_type - - database_id - - id - - internal_name - - name - - table_id - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: date - alias: - type: string - database_id: - type: integer - format: int64 - table_id: - type: integer - format: int64 - internal_name: - type: string - example: mdb_date - column_type: - type: string - example: date - enum: - - char - - varchar - - binary - - varbinary - - tinyblob - - tinytext - - text - - blob - - mediumtext - - mediumblob - - longtext - - longblob - - enum - - set - - serial - - bit - - tinyint - - bool - - smallint - - mediumint - - int - - bigint - - float - - double - - decimal - - date - - datetime - - timestamp - - time - - year - UnitDto: - required: - - columns - - id - - uri - type: object - properties: - id: - type: integer - format: int64 - uri: - type: string - name: - type: string - description: - type: string - columns: - type: array - items: - $ref: "#/components/schemas/ColumnBriefDto" - OntologyBriefDto: - required: - - id - - prefix - - rdf - - sparql - - uri - type: object - properties: - id: - type: integer - format: int64 - uri: - type: string - example: http://www.wikidata.org/ - prefix: - type: string - example: wd - sparql: - type: boolean - example: true - rdf: - type: boolean - example: false - uri_pattern: - type: string - example: http://www.wikidata.org/entity/.* - EntityDto: - required: - - label - - uri - type: object - properties: - uri: - type: string - example: https://www.wikidata.org/entity/Q1686799 - label: - type: string - example: Apache Jena - description: - type: string - example: open source semantic web framework for Java - OaiListIdentifiersParameters: - type: object - properties: - metadataPrefix: - type: string - from: - type: string - until: - type: string - set: - type: string - resumptionToken: - type: string - fromDate: - type: string - format: date-time - untilDate: - type: string - format: date-time - parametersString: - type: string - BannerMessageDto: - required: - - id - - message - - type - type: object - properties: - id: - type: integer - format: int64 - type: - type: string - enum: - - error - - warning - - info - message: - type: string - example: Maintenance starts on 8am on Monday - link: - type: string - example: https://example.com - link_text: - type: string - example: More - display_start: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - display_end: - type: string - format: date-time - example: 2021-03-12T15:26:21Z - ImageBriefDto: - required: - - default - - id - - jdbc_method - - name - - version - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: mariadb - version: - type: string - example: "10.5" - jdbc_method: - type: string - example: mariadb - default: - type: boolean - example: false - LdCreatorDto: - required: - - '@type' - - name - type: object - properties: - name: - type: string - sameAs: - type: string - givenName: - type: string - familyName: - type: string - '@type': - type: string - LdDatasetDto: - required: - - '@context' - - '@type' - - citation - - creator - - description - - hasPart - - identifier - - name - - temporalCoverage - - url - - version - type: object - properties: - name: - type: string - description: - type: string - url: - type: string - identifier: - type: array - items: - type: string - license: - type: string - creator: - type: array - items: - $ref: "#/components/schemas/LdCreatorDto" - citation: - type: string - hasPart: - type: array - items: - $ref: "#/components/schemas/LdDatasetDto" - temporalCoverage: - type: string - version: - type: string - format: date-time - '@context': - type: string - '@type': - type: string - ConstraintsDto: - type: object - properties: - uniques: - type: array - items: - $ref: "#/components/schemas/UniqueDto" - checks: - uniqueItems: true - type: array - items: - type: string - foreign_keys: - type: array - items: - $ref: "#/components/schemas/ForeignKeyDto" - primary_key: - uniqueItems: true - type: array - items: - $ref: "#/components/schemas/PrimaryKeyDto" - ForeignKeyBriefDto: - type: object - properties: - id: - type: integer - format: int64 - ForeignKeyDto: - required: - - name - - referenced_table - - references - - table - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - references: - type: array - items: - $ref: "#/components/schemas/ForeignKeyReferenceDto" - table: - $ref: "#/components/schemas/TableBriefDto" - referenced_table: - $ref: "#/components/schemas/TableBriefDto" - on_update: - type: string - enum: - - restrict - - cascade - - set_null - - no_action - - set_default - on_delete: - type: string - enum: - - restrict - - cascade - - set_null - - no_action - - set_default - ForeignKeyReferenceDto: - required: - - column - - foreign_key - - referenced_column - type: object - properties: - id: - type: integer - format: int64 - column: - $ref: "#/components/schemas/ColumnBriefDto" - foreign_key: - $ref: "#/components/schemas/ForeignKeyBriefDto" - referenced_column: - $ref: "#/components/schemas/ColumnBriefDto" - PrimaryKeyDto: - required: - - column - - table - type: object - properties: - id: - type: integer - format: int64 - table: - $ref: "#/components/schemas/TableBriefDto" - column: - $ref: "#/components/schemas/ColumnBriefDto" - TableDto: - required: - - columns - - constraints - - database_id - - id - - internal_name - - is_public - - is_schema_public - - is_versioned - - name - - owner - - queue_name - - routing_key - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - example: Air Quality - alias: - type: string - identifiers: - type: array - items: - $ref: "#/components/schemas/IdentifierDto" - owner: - $ref: "#/components/schemas/UserBriefDto" - description: - maxLength: 2048 - minLength: 0 - type: string - example: Air Quality in Austria - columns: - type: array - items: - $ref: "#/components/schemas/ColumnDto" - constraints: - $ref: "#/components/schemas/ConstraintsDto" - last_retrieved: - type: string - format: date-time - database_id: - type: integer - format: int64 - internal_name: - type: string - example: air_quality - is_versioned: - type: boolean - example: true - is_schema_public: - type: boolean - example: true - queue_name: - type: string - example: air_quality - queue_type: - type: string - example: quorum - routing_key: - type: string - example: dbrepo.1.2 - is_public: - type: boolean - example: true - num_rows: - type: integer - format: int64 - example: 5 - data_length: - type: integer - description: in bytes - format: int64 - example: 16384 - max_data_length: - type: integer - description: in bytes - format: int64 - example: 0 - avg_row_length: - type: integer - description: in bytes - format: int64 - example: 3276 - UniqueDto: - required: - - columns - - id - - name - - table - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - table: - $ref: "#/components/schemas/TableBriefDto" - columns: - type: array - items: - $ref: "#/components/schemas/ColumnDto" - TableColumnEntityDto: - required: - - column_id - - database_id - - table_id - - uri - type: object - properties: - uri: - type: string - example: https://www.wikidata.org/entity/Q1686799 - label: - type: string - example: Apache Jena - description: - type: string - example: open source semantic web framework for Java - database_id: - type: integer - format: int64 - example: 1 - table_id: - type: integer - format: int64 - example: 1 - column_id: - type: integer - format: int64 - example: 1 - ContainerBriefDto: - required: - - count - - hash - - id - - image - - internal_name - - name - - quota - type: object - properties: - id: - type: integer - format: int64 - hash: - type: string - example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 - name: - type: string - example: Air Quality - image: - $ref: "#/components/schemas/ImageBriefDto" - quota: - type: integer - format: int32 - example: 50 - count: - type: integer - format: int32 - example: 10 - internal_name: - type: string - example: air-quality - ConceptDto: - required: - - columns - - id - - uri - type: object - properties: - id: - type: integer - format: int64 - uri: - type: string - name: - type: string - description: - type: string - columns: - type: array - items: - $ref: "#/components/schemas/ColumnBriefDto" - securitySchemes: - basicAuth: - type: http - scheme: basic - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT