diff --git a/.eslintignore b/.eslintignore index c77f8beaf..206888592 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ src/app/modules/common-regobs-api/* +src/app/api/* diff --git a/.gitattributes b/.gitattributes index 0c1340810..ccddf5cb1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ # Language files. When we download files from lokalise, they only get as line break character src/assets/i18n/*.json text eol=lf +src/app/modules/common-regobs-api/**/*.ts text eol=lf # Custom for Visual Studio *.cs diff=csharp diff --git a/generate-models-index.ts b/generate-models-index.ts new file mode 100644 index 000000000..4001728a0 --- /dev/null +++ b/generate-models-index.ts @@ -0,0 +1,18 @@ +//Genererer models/models.ts med eksport av alle genererte modeller +import * as fs from 'fs'; +import * as path from 'path'; + +console.log('Starter generering av models/models.ts med eksport av alle modeller...'); + +const modelsDir = path.join(__dirname, 'src', 'app', 'modules', 'common-regobs-api', 'models'); +const outFile = path.join(modelsDir, 'models.ts'); + +const files = fs + .readdirSync(modelsDir) + .filter((f) => f.endsWith('.ts') && f !== 'index.ts' && f !== 'models.ts') + .map((f) => f.replace(/\.ts$/, '')); + +const content = files.map((f) => `export * from './${f}';`).join('\n') + '\n'; + +fs.writeFileSync(outFile, content); +console.log(outFile + ' oppdatert med', files.length, 'modeller.'); diff --git a/openapi-templates/index.mustache b/openapi-templates/index.mustache new file mode 100644 index 000000000..5c7d845c2 --- /dev/null +++ b/openapi-templates/index.mustache @@ -0,0 +1,8 @@ +{{! Denne trenger vi fordi vi har overstyrt standard mappe for modeller }} +export * from './api/api'; +export * from './models/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; +export * from './provide-api'; +export * from './param'; diff --git a/openapi-templates/licenseInfo.mustache b/openapi-templates/licenseInfo.mustache new file mode 100644 index 000000000..7d052af88 --- /dev/null +++ b/openapi-templates/licenseInfo.mustache @@ -0,0 +1,6 @@ +{{! Denne trenger vi for å ikke få med byggenummer og commit-ID i header på genererte filer }} +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ diff --git a/openapi-templates/modelGeneric.mustache b/openapi-templates/modelGeneric.mustache new file mode 100644 index 000000000..54942ea31 --- /dev/null +++ b/openapi-templates/modelGeneric.mustache @@ -0,0 +1,23 @@ +{{! Denne trenger vi for å overstyre nullable felter i API'et, slik at ikke alle nullable felter i modellene får typen | null i tillegg }} +export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{.}}}{{^-last}}, {{/-last}}{{/allParents}} { {{>modelGenericAdditionalProperties}} +{{#vars}} + {{#description}} + /** + {{#description}} + * {{{.}}} + {{/description}} + */ + {{/description}} + {{#deprecated}} + /** @deprecated */ + {{/deprecated}} + {{#isReadOnly}} + /** Readonly property */ + {{/isReadOnly}} + {{name}}{{^required}}?{{/required}}: {{{datatypeWithEnum}}}{{#nullable}}{{^isPrimitiveType}} | null{{/isPrimitiveType}}{{/nullable}}; +{{/vars}} +} +{{! Fjern tom namespace-blokk }} +{{#hasEnums}} +{{>modelGenericEnums}} +{{/hasEnums}} diff --git a/openapi-templates/models.mustache b/openapi-templates/models.mustache new file mode 100644 index 000000000..52ad28296 --- /dev/null +++ b/openapi-templates/models.mustache @@ -0,0 +1,4 @@ +{{! Denne trenger vi for å generere en models.ts i common-regobs-api/models }} +{{#models}} +export * from './{{modelFilename}}'; +{{/models}} diff --git a/openapi-templates/readme.md b/openapi-templates/readme.md new file mode 100644 index 000000000..128f8d814 --- /dev/null +++ b/openapi-templates/readme.md @@ -0,0 +1,2 @@ +Her ligger det maler for generering av klient-kode basert på Regobs-API'et. +Mer info: https://openapi-generator.tech/docs/templating/ diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 000000000..8992c8443 --- /dev/null +++ b/openapitools.json @@ -0,0 +1,21 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.17.0", + "generators": { + "regobs-client": { + "generatorName": "typescript-angular", + "inputSpec": "http://localhost:5130/swagger/v6/swagger.json", + "output": "src/app/modules/common-regobs-api", + "templateDir": "openapi-templates", + "additionalProperties": { + "fileNaming": "kebab-case", + "useSingleRequestParameter": true, + "modelPackage": "models", + "nullableReference": false + } + } + } + } +} diff --git a/package-lock.json b/package-lock.json index c7615b961..1265bca3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,6 +97,7 @@ "@ionic/angular-toolkit": "^11.0.1", "@ionic/cli": "^7.2.1", "@lokalise/node-api": "^8.5.1", + "@openapitools/openapi-generator-cli": "^2.25.0", "@sentry/cli": "^1.68.0", "@sentry/wizard": "^1.2.11", "@types/clone-deep": "^4.0.1", @@ -135,9 +136,11 @@ "karma-junit-reporter": "^2.0.1", "madge": "^5.0.1", "manifest-android": "^0.1.1", + "ng-openapi": "^0.2.8", "ng-swagger-gen": "^2.3.1", "plist": "^3.0.5", "prettier": "^3.4.2", + "ts-morph": "^27.0.2", "ts-node": "^10.9.1", "typescript": "5.9.2" }, @@ -4243,6 +4246,17 @@ "leaflet.markercluster": "1" } }, + "node_modules/@borewit/text-codec": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.1.1.tgz", + "integrity": "sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/@braintree/sanitize-url": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz", @@ -5906,6 +5920,29 @@ "node": ">=16.0.0" } }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "dev": true, @@ -6306,6 +6343,16 @@ "node": ">=10" } }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/@mapbox/leaflet-pip": { "version": "1.1.0", "license": "ISC", @@ -6904,6 +6951,102 @@ "node": ">= 10" } }, + "node_modules/@nestjs/axios": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-4.0.1.tgz", + "integrity": "sha512-68pFJgu+/AZbWkGu65Z3r55bTsCPlgyKaV4BSG8yUAD72q1PPuyVRgUwFv6BxdnibTUHlyxm06FmYWNC+bjN7A==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@nestjs/common": "^10.0.0 || ^11.0.0", + "axios": "^1.3.1", + "rxjs": "^7.0.0" + } + }, + "node_modules/@nestjs/common": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.6.tgz", + "integrity": "sha512-krKwLLcFmeuKDqngG2N/RuZHCs2ycsKcxWIDgcm7i1lf3sQ0iG03ci+DsP/r3FcT/eJDFsIHnKtNta2LIi7PzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-type": "21.0.0", + "iterare": "1.2.1", + "load-esm": "1.0.2", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": ">=0.4.1", + "class-validator": ">=0.13.2", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "11.1.6", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.6.tgz", + "integrity": "sha512-siWX7UDgErisW18VTeJA+x+/tpNZrJewjTBsRPF3JVxuWRuAB1kRoiJcxHgln8Lb5UY9NdvklITR84DUEXD0Cg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@nuxt/opencollective": "0.4.1", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "8.2.0", + "tslib": "2.8.1", + "uid": "2.0.2" + }, + "engines": { + "node": ">= 20" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^11.0.0", + "@nestjs/microservices": "^11.0.0", + "@nestjs/platform-express": "^11.0.0", + "@nestjs/websockets": "^11.0.0", + "reflect-metadata": "^0.1.12 || ^0.2.0", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, + "node_modules/@nestjs/core/node_modules/path-to-regexp": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", + "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + } + }, "node_modules/@ngtools/webpack": { "version": "20.3.7", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-20.3.7.tgz", @@ -7212,51 +7355,411 @@ "dev": true, "license": "ISC", "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-9.1.0.tgz", + "integrity": "sha512-aoNSbxtkePXUlbZB+anS1LqsJdctG5n3UVhfU47+CDdwMi6uNTBMF9gPcQRnqghQd2FGzcwwIFBruFMxjhBewg==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "node-gyp": "^11.0.0", + "proc-log": "^5.0.0", + "which": "^5.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/isexe": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", + "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", + "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/@nuxt/opencollective": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.4.1.tgz", + "integrity": "sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": "^14.18.0 || >=16.10.0", + "npm": ">=5.10.0" + } + }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@nuxtjs/opencollective/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "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/@nuxtjs/opencollective/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@nuxtjs/opencollective/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nuxtjs/opencollective/node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nuxtjs/opencollective/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@nuxtjs/opencollective/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.25.0.tgz", + "integrity": "sha512-u/3VAbF8c68AXBgm8nBAdDPLPW/KgrtHz28yemf92zNB0iDZFGdRUX2W80Lzf177g6ctYLz0GIPHCOU0LTJegQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@nestjs/axios": "4.0.1", + "@nestjs/common": "11.1.6", + "@nestjs/core": "11.1.6", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.12.2", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "6.1.1", + "concurrently": "9.2.1", + "console.table": "0.10.0", + "fs-extra": "11.3.2", + "glob": "11.0.3", + "inquirer": "8.2.7", + "proxy-agent": "6.5.0", + "reflect-metadata": "0.2.2", + "rxjs": "7.8.2", + "tslib": "2.8.1" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/@openapitools/openapi-generator-cli/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "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/@openapitools/openapi-generator-cli/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/glob": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz", + "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.3.1", + "jackspeak": "^4.1.1", + "minimatch": "^10.0.3", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/jackspeak": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", + "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" } }, - "node_modules/@npmcli/run-script": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-9.1.0.tgz", - "integrity": "sha512-aoNSbxtkePXUlbZB+anS1LqsJdctG5n3UVhfU47+CDdwMi6uNTBMF9gPcQRnqghQd2FGzcwwIFBruFMxjhBewg==", + "node_modules/@openapitools/openapi-generator-cli/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { - "@npmcli/node-gyp": "^4.0.0", - "@npmcli/package-json": "^6.0.0", - "@npmcli/promise-spawn": "^8.0.0", - "node-gyp": "^11.0.0", - "proc-log": "^5.0.0", - "which": "^5.0.0" + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@npmcli/run-script/node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", + "node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=16" + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" } }, - "node_modules/@npmcli/run-script/node_modules/which": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", - "integrity": "sha512-JEdGzHwwkrbWoGOlIHqQ5gtprKGOenpDHpxE9zVR1bWbOtYRyPPHMe9FaP6x61CmNaTThSkb0DAJte5jD+DmzQ==", + "node_modules/@openapitools/openapi-generator-cli/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==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" + "has-flag": "^4.0.0" }, "engines": { - "node": "^18.17.0 || >=20.5.0" + "node": ">=8" } }, "node_modules/@openid/appauth": { @@ -8665,11 +9168,85 @@ "node": ">=10" } }, + "node_modules/@tokenizer/inflate": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.2.7.tgz", + "integrity": "sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "fflate": "^0.8.2", + "token-types": "^6.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/@tokenizer/inflate/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@tokenizer/token": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true, + "license": "MIT" + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true, "license": "MIT" }, + "node_modules/@ts-morph/common": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.28.1.tgz", + "integrity": "sha512-W74iWf7ILp1ZKNYXY5qbddNaml7e9Sedv5lvU1V8lftlitkc9Pq1A+jlH23ltDgWYeZFFEqGCD1Ies9hqu3O+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimatch": "^10.0.1", + "path-browserify": "^1.0.1", + "tinyglobby": "^0.2.14" + } + }, + "node_modules/@ts-morph/common/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.9", "dev": true, @@ -14866,6 +15443,13 @@ "@types/node": "*" } }, + "node_modules/@types/swagger-schema-official": { + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz", + "integrity": "sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", @@ -15535,6 +16119,8 @@ }, "node_modules/ast-types": { "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", "dev": true, "license": "MIT", "dependencies": { @@ -15605,6 +16191,18 @@ "postcss": "^8.1.0" } }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/babel-loader": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-10.0.0.tgz", @@ -15719,6 +16317,8 @@ }, "node_modules/basic-ftp": { "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", "dev": true, "license": "MIT", "engines": { @@ -16494,6 +17094,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/code-block-writer": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz", + "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==", + "dev": true, + "license": "MIT" + }, "node_modules/color-convert": { "version": "1.9.3", "devOptional": true, @@ -16559,6 +17166,13 @@ "dev": true, "license": "MIT" }, + "node_modules/compare-versions": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", + "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", + "dev": true, + "license": "MIT" + }, "node_modules/component-emitter": { "version": "1.3.1", "dev": true, @@ -16616,50 +17230,221 @@ "dev": true, "license": "MIT" }, - "node_modules/compression/node_modules/negotiator": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", - "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "node_modules/compression/node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression/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==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/concaveman": { + "version": "1.2.1", + "license": "ISC", + "dependencies": { + "point-in-polygon": "^1.1.0", + "rbush": "^3.0.1", + "robust-predicates": "^2.0.4", + "tinyqueue": "^2.0.3" + } + }, + "node_modules/concurrently": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.1.tgz", + "integrity": "sha512-fsfrO0MxV64Znoy8/l1vVIjjHa29SZyyqPgQBwhiDcaW8wJc2W3XWVOGx4M3oJBnv/zdUZIIp1gDeS98GzP8Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.3", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "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/concurrently/node_modules/chalk/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/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==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/concurrently/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/concurrently/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/concurrently/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==", "dev": true, "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/compression/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==", + "node_modules/concurrently/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "license": "MIT", + "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/concat-map": { - "version": "0.0.1", + "node_modules/concurrently/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==", "dev": true, - "license": "MIT" - }, - "node_modules/concaveman": { - "version": "1.2.1", "license": "ISC", - "dependencies": { - "point-in-polygon": "^1.1.0", - "rbush": "^3.0.1", - "robust-predicates": "^2.0.4", - "tinyqueue": "^2.0.3" + "engines": { + "node": ">=12" } }, "node_modules/confbox": { @@ -16720,6 +17505,29 @@ "dev": true, "license": "MIT" }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, "node_modules/content-disposition": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", @@ -17749,6 +18557,8 @@ }, "node_modules/data-uri-to-buffer": { "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "dev": true, "license": "MIT", "engines": { @@ -17912,6 +18722,8 @@ }, "node_modules/degenerator": { "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -18379,6 +19191,16 @@ "dev": true, "license": "MIT" }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "dev": true, @@ -19529,6 +20351,13 @@ "pend": "~1.2.0" } }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, "node_modules/figures": { "version": "3.2.0", "dev": true, @@ -19554,6 +20383,25 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-type": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.0.0.tgz", + "integrity": "sha512-ek5xNX2YBYlXhiUXui3D/BXa3LdqPmoLJ7rqEx2bKJ7EAUEfmXgW0Das7Dc6Nr9MvqaOnIqiPV0mZk/r/UpNAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tokenizer/inflate": "^0.2.7", + "strtok3": "^10.2.2", + "token-types": "^6.0.0", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, "node_modules/filing-cabinet": { "version": "3.3.1", "dev": true, @@ -19780,11 +20628,13 @@ } }, "node_modules/foreground-child": { - "version": "3.3.0", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -20074,32 +20924,20 @@ } }, "node_modules/get-uri": { - "version": "6.0.3", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", "dev": true, "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4", - "fs-extra": "^11.2.0" + "debug": "^4.3.4" }, "engines": { "node": ">= 14" } }, - "node_modules/get-uri/node_modules/fs-extra": { - "version": "11.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", @@ -20679,72 +21517,257 @@ "node": ">=0.10.0" } }, - "node_modules/immediate": { - "version": "3.0.6", - "license": "MIT" - }, - "node_modules/immutable": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.2.tgz", - "integrity": "sha512-qHKXW1q6liAk1Oys6umoaZbDRqjcjgSrbnrifHsfsttza7zcvRAsL7mMV6xWcyhwQy7Xj5v4hhbr6b+iDYwlmQ==", + "node_modules/immediate": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/immutable": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.2.tgz", + "integrity": "sha512-qHKXW1q6liAk1Oys6umoaZbDRqjcjgSrbnrifHsfsttza7zcvRAsL7mMV6xWcyhwQy7Xj5v4hhbr6b+iDYwlmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indexes-of": { + "version": "1.0.1", + "dev": true, + "license": "MIT" + }, + "node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/ini": { + "version": "4.1.3", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/inquirer": { + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz", + "integrity": "sha512-UjOaSel/iddGZJ5xP/Eixh6dY1XghiBw4XK13rCCIJcJfyhhoul/7KhLLUGtebEj6GDYM6Vnx/mVsjx2L/mFIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/external-editor": "^1.0.0", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/@inquirer/external-editor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/inquirer/node_modules/@types/node": { + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.0.tgz", + "integrity": "sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/inquirer/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "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/inquirer/node_modules/chardet": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.1.tgz", + "integrity": "sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==", "dev": true, "license": "MIT" }, - "node_modules/import-fresh": { - "version": "3.3.0", + "node_modules/inquirer/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==", "dev": true, "license": "MIT", "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=7.0.0" } }, - "node_modules/import-fresh/node_modules/resolve-from": { + "node_modules/inquirer/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==", + "dev": true, + "license": "MIT" + }, + "node_modules/inquirer/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==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", + "node_modules/inquirer/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", "dev": true, "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, - "node_modules/indexes-of": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, - "node_modules/inflight": { - "version": "1.0.6", + "node_modules/inquirer/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==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" + "node_modules/inquirer/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true }, - "node_modules/ini": { - "version": "4.1.3", + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, - "license": "ISC", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": ">=8" } }, "node_modules/internmap": { @@ -21245,6 +22268,16 @@ "node": ">=8" } }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=6" + } + }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", @@ -22170,6 +23203,26 @@ "license": "MIT", "optional": true }, + "node_modules/load-esm": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/load-esm/-/load-esm-1.0.2.tgz", + "integrity": "sha512-nVAvWk/jeyrWyXEAs84mpQCYccxRqgKY4OznLuJhJCa0XsPSfdOIr2zvBZEj3IHEHbX97jjscKRRV539bW0Gpw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + }, + { + "type": "buymeacoffee", + "url": "https://buymeacoffee.com/borewit" + } + ], + "license": "MIT", + "engines": { + "node": ">=13.2.0" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "dev": true, @@ -23691,12 +24744,121 @@ }, "node_modules/netmask": { "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4.0" } }, + "node_modules/ng-openapi": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/ng-openapi/-/ng-openapi-0.2.8.tgz", + "integrity": "sha512-SksX8GUh32BqHytKsunIeZa2jdEsh267t94Van/hgmWHbxflYf1W3fhXGfIpGNjivf2utcCoKkW8bYs+xPb+ig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/swagger-schema-official": "^2.0.25", + "commander": "^14.0.0", + "js-yaml": "^4.1.0", + "ts-morph": "^26.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.8.3" + }, + "bin": { + "ng-openapi": "cli.cjs" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "funding": { + "type": "buymeacoffee", + "url": "https://buymeacoffee.com/ngopenapi" + }, + "peerDependencies": { + "@angular/common": ">=15", + "@angular/core": ">=15" + }, + "peerDependenciesMeta": { + "@angular/common": { + "optional": false + }, + "@angular/core": { + "optional": false + } + } + }, + "node_modules/ng-openapi/node_modules/@ts-morph/common": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz", + "integrity": "sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "^3.3.3", + "minimatch": "^10.0.1", + "path-browserify": "^1.0.1" + } + }, + "node_modules/ng-openapi/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==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/ng-openapi/node_modules/commander": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/ng-openapi/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==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/ng-openapi/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ng-openapi/node_modules/ts-morph": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz", + "integrity": "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ts-morph/common": "~0.27.0", + "code-block-writer": "^13.0.3" + } + }, "node_modules/ng-swagger-gen": { "version": "2.3.1", "dev": true, @@ -24537,40 +25699,43 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.0.2", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", "dev": true, "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.4" + "socks-proxy-agent": "^8.0.5" }, "engines": { "node": ">= 14" } }, "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, "engines": { "node": ">= 14" } }, "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -24579,6 +25744,8 @@ }, "node_modules/pac-resolver": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "dev": true, "license": "MIT", "dependencies": { @@ -24786,6 +25953,13 @@ "node": ">= 0.8" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true, + "license": "MIT" + }, "node_modules/path-data-parser": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", @@ -25426,40 +26600,43 @@ } }, "node_modules/proxy-agent": { - "version": "6.4.0", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", - "https-proxy-agent": "^7.0.3", + "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.1", + "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.2" + "socks-proxy-agent": "^8.0.5" }, "engines": { "node": ">= 14" } }, "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.1", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, "engines": { "node": ">= 14" } }, "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { @@ -26926,11 +28103,13 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.4", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.1.1", + "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" }, @@ -26939,12 +28118,11 @@ } }, "node_modules/socks-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, "engines": { "node": ">= 14" } @@ -27342,6 +28520,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strtok3": { + "version": "10.3.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", + "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tokenizer/token": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/stylis": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz", @@ -27720,6 +28915,25 @@ "node": ">=0.6" } }, + "node_modules/token-types": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.1.tgz", + "integrity": "sha512-kh9LVIWH5CnL63Ipf0jhlBIy0UsrMj/NJDfpsy1SqOXlLKEVyXXYrnFxFT1yOOYVGBSApeVnjPw/sBz5BfEjAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@borewit/text-codec": "^0.1.0", + "@tokenizer/token": "^0.3.0", + "ieee754": "^1.2.1" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, "node_modules/topojson-client": { "version": "3.1.0", "license": "ISC", @@ -27788,8 +29002,21 @@ "node": ">=6.10" } }, + "node_modules/ts-morph": { + "version": "27.0.2", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-27.0.2.tgz", + "integrity": "sha512-fhUhgeljcrdZ+9DZND1De1029PrE+cMkIP7ooqkLRTrRLTqcki2AstsyJm0vRNbTbVCNJ0idGlbBrfqc7/nA8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ts-morph/common": "~0.28.1", + "code-block-writer": "^13.0.3" + } + }, "node_modules/ts-node": { - "version": "10.9.1", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "license": "MIT", "dependencies": { @@ -28056,6 +29283,32 @@ "version": "1.0.2", "license": "MIT" }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/undici-types": { "version": "7.12.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.12.0.tgz", diff --git a/package.json b/package.json index 9daf3d53a..945078ae4 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "scripts": { "ng": "ng", "generate-swagger-api-module": "ng-swagger-gen -c ng-swagger-gen.json", + "generate-openapi-models": "npx openapi-generator-cli generate --generator-key regobs-client & ts-node --project tsconfig.npm-script.json generate-models-index.ts", "start": "ionic serve", "build": "ionic build", "build:prod": "ng build --configuration production", @@ -126,6 +127,7 @@ "@ionic/angular-toolkit": "^11.0.1", "@ionic/cli": "^7.2.1", "@lokalise/node-api": "^8.5.1", + "@openapitools/openapi-generator-cli": "^2.25.0", "@sentry/cli": "^1.68.0", "@sentry/wizard": "^1.2.11", "@types/clone-deep": "^4.0.1", @@ -164,9 +166,11 @@ "karma-junit-reporter": "^2.0.1", "madge": "^5.0.1", "manifest-android": "^0.1.1", + "ng-openapi": "^0.2.8", "ng-swagger-gen": "^2.3.1", "plist": "^3.0.5", "prettier": "^3.4.2", + "ts-morph": "^27.0.2", "ts-node": "^10.9.1", "typescript": "5.9.2" }, diff --git a/src/app/components/observation/registration-edit-button/registration-edit-button.component.ts b/src/app/components/observation/registration-edit-button/registration-edit-button.component.ts index 7e847d091..b29db765a 100644 --- a/src/app/components/observation/registration-edit-button/registration-edit-button.component.ts +++ b/src/app/components/observation/registration-edit-button/registration-edit-button.component.ts @@ -71,11 +71,9 @@ export class RegistrationEditButtonComponent { }); } - private fetchRegistrationBeforeEdit( - regId: RegistrationService.RegistrationGetParams['regId'] - ): Observable { + private fetchRegistrationBeforeEdit(regId: number): Observable { return this.userSettingService.language$.pipe( - switchMap((langKey) => this.registrationService.RegistrationGet({ regId, langKey })), + switchMap((langKey) => this.registrationService.registrationGet(regId, langKey)), timeout(FETCH_OBS_TIMEOUT_MS), catchError((error) => { let msg: string; @@ -109,6 +107,9 @@ export class RegistrationEditButtonComponent { //we don't have a local working copy of this registration yet, so fetch it and save as draft const obs = this.registration(); this.logger.debug(`Registration edit: Fetching from API. RegID = ${obs.RegId}, uuid = ${uuid}`, DEBUG_TAG); + if (!obs.RegId) { + throw new Error('regId is required to fetch registration for editing'); + } const registrationFromServer = await firstValueFrom(this.fetchRegistrationBeforeEdit(obs.RegId)); if (registrationFromServer === null) { const continueEditing = await this.confirmEditDespiteNoFreshRegistrationFromServer(); diff --git a/src/app/core/services/add-update-delete-registration/add-update-delete-registration.service.ts b/src/app/core/services/add-update-delete-registration/add-update-delete-registration.service.ts index d52f18d3f..c10048cbe 100644 --- a/src/app/core/services/add-update-delete-registration/add-update-delete-registration.service.ts +++ b/src/app/core/services/add-update-delete-registration/add-update-delete-registration.service.ts @@ -5,7 +5,11 @@ import { AnalyticService } from 'src/app/modules/analytics/services/analytic.ser import { LangKey } from 'src/app/modules/common-core/models'; import { removeEmptyRegistrations } from 'src/app/modules/common-registration/registration.helpers'; import { AttachmentUploadEditModel } from 'src/app/modules/common-registration/registration.models'; -import { RegistrationEditModel, RegistrationService, RegistrationViewModel } from 'src/app/modules/common-regobs-api'; +import { + type RegistrationEditModel, + RegistrationService, + type RegistrationViewModel, +} from 'src/app/modules/common-regobs-api'; import { RegistrationDraft, RegistrationEditModelWithRemoteOrLocalAttachments } from '../draft/draft-model'; import { UploadAttachmentsService } from '../upload-attachments/upload-attachments.service'; import { UserSettingService } from '../user-setting/user-setting.service'; @@ -67,16 +71,16 @@ export class AddUpdateDeleteRegistrationService { const langKey = await firstValueFrom(this.userSettings.language$); const registrationWithMeta = this.addMetadata(registration, draft); - const data: RegistrationService.RegistrationInsertParams = { - registration: registrationWithMeta, - langKey, - externalReferenceId: draft.uuid, - }; - - this.logger.debug('RegistrationInsert', DEBUG_TAG, data); + this.logger.debug('RegistrationInsert', DEBUG_TAG, { + uuid: draft.uuid, + langKey: langKey, + registrationWithMeta: registrationWithMeta, + }); // Send registration to regobs - const result = await firstValueFrom(this.regobsApiRegistrationService.RegistrationInsert(data)); + const result = await firstValueFrom( + this.regobsApiRegistrationService.registrationInsert(draft.uuid, langKey, registrationWithMeta) + ); this.logger.debug('RegistrationInsert result', DEBUG_TAG, { result, externalReferenceId: draft.uuid }); @@ -102,28 +106,33 @@ export class AddUpdateDeleteRegistrationService { async update(draft: RegistrationDraft, ignoreVersionCheck = false): Promise { this.logger.debug('Update registration', DEBUG_TAG, { draft, ignoreVersionCheck }); - if (draft.regId == null) { - throw new Error('Update operation needs regid'); - } - const langKey = await firstValueFrom(this.userSettings.language$); draft = removeEmptyRegistrations(draft); const uploadedAttachments = await this.uploadAttachments(draft); const registration = this.addAttachmentToRegistration(uploadedAttachments, draft.registration); const registrationWithMeta = this.addMetadata(registration, draft); - const data: RegistrationService.RegistrationInsertOrUpdateParams = { - registration: registrationWithMeta, - langKey, - externalReferenceId: draft.uuid, - id: draft.regId as number, // Type check higher up + this.logger.debug('RegistrationInsertOrUpdate', DEBUG_TAG, { + regId: draft.regId, + uuid: draft.uuid, + langKey: langKey, ignoreVersionCheck: ignoreVersionCheck, - }; - - this.logger.debug('RegistrationInsertOrUpdate', DEBUG_TAG, data); + registrationWithMeta: registrationWithMeta, + }); + if (draft.regId == null) { + throw new Error('Update operation needs regid'); + } // Send registration to regobs - const result = await firstValueFrom(this.regobsApiRegistrationService.RegistrationInsertOrUpdate(data)); + const result = await firstValueFrom( + this.regobsApiRegistrationService.registrationInsertOrUpdate( + draft.regId, + draft.uuid, + langKey, + ignoreVersionCheck, + registrationWithMeta + ) + ); this.logger.debug('RegistrationInsertOrUpdate result', DEBUG_TAG, { result, externalReferenceId: draft.uuid }); @@ -148,7 +157,7 @@ export class AddUpdateDeleteRegistrationService { throw new Error('regId required'); } return firstValueFrom( - this.regobsApiRegistrationService.RegistrationDelete(regId).pipe( + this.regobsApiRegistrationService.registrationDelete(regId).pipe( timeout(timeoutInMillis), tap(() => this.deletedRegistrationIds.next(regId)) ) diff --git a/src/app/core/services/add-update-delete-registration/attachmentHelpers.ts b/src/app/core/services/add-update-delete-registration/attachmentHelpers.ts index a58ac9e68..0c08a2b43 100644 --- a/src/app/core/services/add-update-delete-registration/attachmentHelpers.ts +++ b/src/app/core/services/add-update-delete-registration/attachmentHelpers.ts @@ -6,7 +6,7 @@ import { AttachmentUploadEditModel, WaterLevelMeasurementUploadModel, } from 'src/app/modules/common-registration/registration.models'; -import { AttachmentEditModel, RegistrationEditModel } from 'src/app/modules/common-regobs-api'; +import { type AttachmentEditModel, type RegistrationEditModel } from 'src/app/modules/common-regobs-api'; import { removeEmpty } from '../../helpers/remove-empty'; /** diff --git a/src/app/core/services/draft/draft-model.ts b/src/app/core/services/draft/draft-model.ts index d31d9bc03..8a17df182 100644 --- a/src/app/core/services/draft/draft-model.ts +++ b/src/app/core/services/draft/draft-model.ts @@ -1,5 +1,9 @@ import { SyncStatus } from '../../../modules/common-registration/registration.models'; -import { AttachmentEditModel, AttachmentViewModel, RegistrationEditModel } from '../../../modules/common-regobs-api'; +import { + type AttachmentEditModel, + type AttachmentViewModel, + type RegistrationEditModel, +} from '../../../modules/common-regobs-api'; // eslint-disable-next-line @typescript-eslint/ban-types // If we want to make RegistrationEditModel immutable, use Immutable @@ -28,10 +32,11 @@ export interface RegistrationDraftError { message?: string; } -export type RemoteOrLocalAttachmentEditModel = Pick & AttachmentEditModel; +export type RemoteOrLocalAttachmentEditModel = Pick & + AttachmentEditModel; export interface RegistrationEditModelWithRemoteOrLocalAttachments extends Omit { - Attachments?: RemoteOrLocalAttachmentEditModel[]; + Attachments?: RemoteOrLocalAttachmentEditModel[] | null; } /** diff --git a/src/app/core/services/location/location.service.ts b/src/app/core/services/location/location.service.ts index e4bc622ca..30532072b 100644 --- a/src/app/core/services/location/location.service.ts +++ b/src/app/core/services/location/location.service.ts @@ -1,5 +1,5 @@ import { Injectable, inject } from '@angular/core'; -import { LocationService as RegobsApiLocationService } from 'src/app/modules/common-regobs-api/services'; +import { LocationService as RegobsApiLocationService } from 'src/app/modules/common-regobs-api'; import { GeoHazard } from 'src/app/modules/common-core/models'; import { catchError, switchMap } from 'rxjs/operators'; import { RegobsAuthService } from '../../../modules/auth/services/regobs-auth.service'; @@ -17,14 +17,8 @@ export class LocationService { getLocationWithinRadiusObservable(geoHazard: GeoHazard, lat: number, lng: number, radius: number) { return this.regobsAuthService.loggedInUser$.pipe( - switchMap(() => - this.apiLocationService.LocationWithinRadius({ - geoHazardTypeIds: [geoHazard], - radius, - latitude: lat, - longitude: lng, - returnCount: 100, - }) + switchMap( + () => this.apiLocationService.locationWithinRadius(lat, lng, radius, [geoHazard], 100) //TODO: sjekk om dette fungerer ), catchError((err) => { this.loggingService.error(err, DEBUG_TAG, 'Could not fetch loactions within radius'); diff --git a/src/app/core/services/observer-trips/observer-trips.service.ts b/src/app/core/services/observer-trips/observer-trips.service.ts index d5113b8d2..20abead56 100644 --- a/src/app/core/services/observer-trips/observer-trips.service.ts +++ b/src/app/core/services/observer-trips/observer-trips.service.ts @@ -189,7 +189,7 @@ export class ObserverTripsService { let data: FeatureCollection; try { // Appearantly TripGet is missing typing - data = (await firstValueFrom(this.tripService.TripGet())) as unknown as FeatureCollection; + data = (await firstValueFrom(this.tripService.tripGetObserverTrips())) as unknown as FeatureCollection; } catch (error) { if (error instanceof HttpErrorResponse) { if (error.status === HttpStatusCode.Unauthorized) { diff --git a/src/app/core/services/search-registration/search-registration.service.ts b/src/app/core/services/search-registration/search-registration.service.ts index 0edf8335e..64f163b7b 100644 --- a/src/app/core/services/search-registration/search-registration.service.ts +++ b/src/app/core/services/search-registration/search-registration.service.ts @@ -26,7 +26,7 @@ import { SearchCriteriaRequestDto, SearchService, } from 'src/app/modules/common-regobs-api'; -import { SearchRegistrationsWithAttachments } from 'src/app/modules/common-regobs-api/models/search-registrations-with-attachments'; +import { RegistrationsWithAttachments } from 'src/app/modules/common-regobs-api'; import { LoggingService } from 'src/app/modules/shared/services/logging/logging.service'; export class SearchResult { @@ -254,11 +254,11 @@ export class SearchRegistrationService { searchAttachments( searchCriteria$: Observable - ): PagedSearchResult { - return new PagedSearchResult( + ): PagedSearchResult { + return new PagedSearchResult( searchCriteria$, - this.searchService.SearchAttachments.bind(this.searchService), - (searchCriteria) => this.searchService.SearchCount(searchCriteria).pipe(map((result) => result.TotalMatches)) + this.searchService.searchAttachments.bind(this.searchService), + (searchCriteria) => this.searchService.searchCount(searchCriteria).pipe(map((result: any) => result.TotalMatches)) ); } } diff --git a/src/app/core/services/trip-logger/trip-logger.service.ts b/src/app/core/services/trip-logger/trip-logger.service.ts index 4e5664cf4..c9418821c 100644 --- a/src/app/core/services/trip-logger/trip-logger.service.ts +++ b/src/app/core/services/trip-logger/trip-logger.service.ts @@ -6,7 +6,7 @@ import { TripLogActivity } from './trip-log-activity.model'; import { NanoSql } from '../../../../nanosql'; import { Observable, from, BehaviorSubject, throwError, firstValueFrom, of, EMPTY } from 'rxjs'; import { CreateTripDto } from 'src/app/modules/common-regobs-api/models'; -import { TripService } from 'src/app/modules/common-regobs-api/services'; +import { TripService } from 'src/app/modules/common-regobs-api'; import { switchMap, take, map, concatMap, tap, catchError, timeout } from 'rxjs/operators'; import { UserSettingService } from '../user-setting/user-setting.service'; import { ToastController, AlertController } from '@ionic/angular/standalone'; diff --git a/src/app/core/services/user-group/user-group.service.ts b/src/app/core/services/user-group/user-group.service.ts index afa14c419..29ee4c00a 100644 --- a/src/app/core/services/user-group/user-group.service.ts +++ b/src/app/core/services/user-group/user-group.service.ts @@ -3,8 +3,7 @@ import { UserSettingService } from '../user-setting/user-setting.service'; import { NanoSql } from '../../../../nanosql'; import { AppMode } from 'src/app/modules/common-core/models'; import { DataLoadService } from '../../../modules/data-load/services/data-load.service'; -import { ObserverGroupDto } from 'src/app/modules/common-regobs-api/models'; -import { AccountService as RegobsApiAccountService } from 'src/app/modules/common-regobs-api/services'; +import { AccountService as RegobsApiAccountService, type ObserverGroupDto } from 'src/app/modules/common-regobs-api'; import moment from 'moment'; import { from, combineLatest, Observable, lastValueFrom, firstValueFrom } from 'rxjs'; import { switchMap } from 'rxjs/operators'; @@ -40,7 +39,7 @@ export class UserGroupService { async updateUserGroupsForUser(appMode: AppMode, email: string) { const dataLoadId = this.getDataLoadId(appMode, email); await this.dataLoadService.startLoading(dataLoadId); - const result = await lastValueFrom(this.accountApiService.AccountGetObserverGroups()); + const result = await lastValueFrom(this.accountApiService.accountGetObserverGroups()); this.saveUserGroups(appMode, email, result); await this.dataLoadService.loadingCompleted(dataLoadId, result.length); } diff --git a/src/app/modules/auth/services/regobs-auth.service.ts b/src/app/modules/auth/services/regobs-auth.service.ts index cfc6371bb..65edd67b9 100644 --- a/src/app/modules/auth/services/regobs-auth.service.ts +++ b/src/app/modules/auth/services/regobs-auth.service.ts @@ -8,13 +8,12 @@ import { filter, map, shareReplay, skip, switchMap, take, tap, withLatestFrom } import { LangKey } from 'src/app/modules/common-core/models'; import { UserSettingService } from '../../../core/services/user-setting/user-setting.service'; import { LoggedInUser } from '../../login/models/logged-in-user.model'; -import { MyPageData, ObserverResponseDto } from 'src/app/modules/common-regobs-api/models'; -import { AccountService } from 'src/app/modules/common-regobs-api/services'; import { LoggingService } from '../../shared/services/logging/logging.service'; import { Location } from '@angular/common'; import { nowInSeconds, StorageBackend } from '@openid/appauth'; import { NetworkStatusService } from 'src/app/core/services/network-status/network-status.service'; import { MapService, parseMapViewFromSearchParams } from '../../map/services/map/map.service'; +import { AccountService, type MyPageData, type ObserverResponseDto } from '../../common-regobs-api'; const DEBUG_TAG = 'RegobsAuthService'; export const RETURN_URL_KEY = 'authreturnurl'; @@ -84,7 +83,7 @@ export class RegobsAuthService { return this.loggedInUser$.pipe( take(1), switchMap((loggedInUser) => - loggedInUser.isLoggedIn ? this.accountApi.AccountGetMyPageData() : of(undefined) + loggedInUser.isLoggedIn ? this.accountApi.accountGetMyPageData() : of(undefined) ) ); }), @@ -186,12 +185,12 @@ export class RegobsAuthService { private async checkAndSetNickIfNickIsNull(): Promise { try { - const user = await lastValueFrom(this.accountService.AccountGetObserver()); + const user = await lastValueFrom(this.accountService.accountGetObserver()); if (user && user.Nick != null && user.Nick != '') { return user; } const nick = await this.showSetNickDialog(); - await lastValueFrom(this.accountService.AccountUpdateObserver({ Nick: nick })); + await lastValueFrom(this.accountService.accountUpdateObserver({ Nick: nick })); user.Nick = nick; return user; } catch (err) { diff --git a/src/app/modules/common-registration/models/attachment-upload-edit.interface.ts b/src/app/modules/common-registration/models/attachment-upload-edit.interface.ts index ff6812883..cb767d80e 100644 --- a/src/app/modules/common-registration/models/attachment-upload-edit.interface.ts +++ b/src/app/modules/common-registration/models/attachment-upload-edit.interface.ts @@ -1,5 +1,5 @@ import { RemoteOrLocalAttachmentEditModel } from 'src/app/core/services/draft/draft-model'; -import { AttachmentEditModel } from 'src/app/modules/common-regobs-api/models'; +import { type AttachmentEditModel } from 'src/app/modules/common-regobs-api'; export interface AttachmentUploadEditModel extends AttachmentEditModel { id: string; diff --git a/src/app/modules/common-registration/models/water-level-measurement-upload-model.ts b/src/app/modules/common-registration/models/water-level-measurement-upload-model.ts index 3b58f5948..73bc6e031 100644 --- a/src/app/modules/common-registration/models/water-level-measurement-upload-model.ts +++ b/src/app/modules/common-registration/models/water-level-measurement-upload-model.ts @@ -1,4 +1,4 @@ -import { WaterLevelMeasurementEditModel } from 'src/app/modules/common-regobs-api/models'; +import { WaterLevelMeasurementEditModel } from 'src/app/modules/common-regobs-api'; export interface WaterLevelMeasurementUploadModel extends WaterLevelMeasurementEditModel { /** diff --git a/src/app/modules/common-registration/services/help-text/help-text.service.ts b/src/app/modules/common-registration/services/help-text/help-text.service.ts index e21e589e1..c7e59be4d 100644 --- a/src/app/modules/common-registration/services/help-text/help-text.service.ts +++ b/src/app/modules/common-registration/services/help-text/help-text.service.ts @@ -1,6 +1,5 @@ import { Injectable, inject } from '@angular/core'; -import { HelptextDto } from 'src/app/modules/common-regobs-api/models'; -import { HelptextService as HelpTextApiService } from 'src/app/modules/common-regobs-api/services'; +import { HelptextService as HelpTextApiService, type HelptextDto } from 'src/app/modules/common-regobs-api'; import { AppMode, LangKey, GeoHazard } from 'src/app/modules/common-core/models'; import { HttpClient } from '@angular/common/http'; import { catchError, map } from 'rxjs/operators'; @@ -30,7 +29,7 @@ export class HelpTextService extends ApiSyncOfflineBaseService { } protected getUpdatedData(_: AppMode, langKey: LangKey): Observable { - return this.helpTextApiService.HelptextGet(langKey); + return this.helpTextApiService.helptextGet(langKey); } protected getFallbackData(_: AppMode, langKey: LangKey): Observable { @@ -43,7 +42,7 @@ export class HelpTextService extends ApiSyncOfflineBaseService { ); } - public getHelpTextObservable(geoHazard: GeoHazard, registrationTid: number): Observable { + public getHelpTextObservable(geoHazard: GeoHazard, registrationTid: number): Observable { return this.data$.pipe( map((helptexts: HelptextDto[]) => helptexts.find((data) => data.GeoHazardTID === geoHazard && data.RegistrationTID === registrationTid) diff --git a/src/app/modules/common-registration/services/kdv/kdv.service.ts b/src/app/modules/common-registration/services/kdv/kdv.service.ts index 360b945ba..0b8857a28 100644 --- a/src/app/modules/common-registration/services/kdv/kdv.service.ts +++ b/src/app/modules/common-registration/services/kdv/kdv.service.ts @@ -3,8 +3,7 @@ import { AppMode, LangKey } from 'src/app/modules/common-core/models'; import { getLangKeyString } from 'src/app/modules/common-core/helpers'; import { of, Observable } from 'rxjs'; import { map, catchError } from 'rxjs/operators'; -import { KdvElementsResponseDto, KdvElement } from 'src/app/modules/common-regobs-api/models'; -import { KdvElementsService } from 'src/app/modules/common-regobs-api/services'; +import { KdvElementsService, type KdvElementsResponseDto, type KdvElement } from 'src/app/modules/common-regobs-api'; import { HttpClient } from '@angular/common/http'; import { KdvKey } from '../../models/kdv-key.type'; import { KdvViewRepositoryKey } from '../../models/view-repository-key.type'; @@ -50,7 +49,7 @@ export class KdvService extends ApiSyncOfflineBaseService { - return this.kdvElementsService.KdvElementsGetKdvs({ langkey: langKey }); + return this.kdvElementsService.kdvElementsGetKdvs(langKey); } protected getOfflineDatabaseKey(appMode: AppMode, langKey: LangKey): string { diff --git a/src/app/modules/common-regobs-api/.gitignore b/src/app/modules/common-regobs-api/.gitignore new file mode 100644 index 000000000..149b57654 --- /dev/null +++ b/src/app/modules/common-regobs-api/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/src/app/modules/common-regobs-api/.openapi-generator-ignore b/src/app/modules/common-regobs-api/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/src/app/modules/common-regobs-api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/src/app/modules/common-regobs-api/.openapi-generator/FILES b/src/app/modules/common-regobs-api/.openapi-generator/FILES new file mode 100644 index 000000000..27a4ddde7 --- /dev/null +++ b/src/app/modules/common-regobs-api/.openapi-generator/FILES @@ -0,0 +1,127 @@ +.gitignore +README.md +api.base.service.ts +api.module.ts +api/account.service.ts +api/api.ts +api/attachment.service.ts +api/geo-code.service.ts +api/helptext.service.ts +api/kdv-elements.service.ts +api/location.service.ts +api/registration.service.ts +api/search.service.ts +api/trip.service.ts +configuration.ts +encoder.ts +git_push.sh +index.ts +models/areas-dto-forecast-regions.ts +models/areas-dto.ts +models/at-a-glance-view-model.ts +models/attachment-edit-model.ts +models/attachment-view-model-url-formats.ts +models/attachment-view-model.ts +models/avalanche-activity-obs-view-model.ts +models/avalanche-activity-obs2-edit-model.ts +models/avalanche-activity-obs2-view-model.ts +models/avalanche-danger-obs-view-model.ts +models/avalanche-eval-problem-view-model.ts +models/avalanche-eval-problem2-edit-model.ts +models/avalanche-eval-problem2-view-model.ts +models/avalanche-evaluation-view-model.ts +models/avalanche-evaluation2-view-model.ts +models/avalanche-evaluation3-edit-model.ts +models/avalanche-evaluation3-view-model.ts +models/avalanche-obs-edit-model.ts +models/avalanche-obs-view-model.ts +models/compression-test-edit-model.ts +models/compression-test-view-model.ts +models/county-dto.ts +models/create-trip-dto.ts +models/damage-obs-edit-model.ts +models/damage-obs-view-model.ts +models/danger-obs-edit-model.ts +models/danger-obs-view-model.ts +models/finish-trip-dto.ts +models/forecast-region-dto.ts +models/forecast-region-sub-region-dto.ts +models/general-observation-edit-model.ts +models/general-observation-view-model.ts +models/geo-hazard-types.ts +models/geo-location-info.ts +models/geo-location-summary.ts +models/helptext-dto.ts +models/ice-cover-edit-model.ts +models/ice-cover-view-model.ts +models/ice-thickness-edit-model.ts +models/ice-thickness-layer-edit-model.ts +models/ice-thickness-layer-view-model.ts +models/ice-thickness-view-model.ts +models/incident-edit-model.ts +models/incident-view-model.ts +models/kdv-element.ts +models/kdv-elements-response-dto.ts +models/landslide-edit-model.ts +models/landslide-view-model.ts +models/lang-key.ts +models/lat-lng-object.ts +models/lat-lng.ts +models/models.ts +models/my-page-data.ts +models/obs-location-edit-model.ts +models/obs-location-view-model.ts +models/obs-locations-response-dto-v2.ts +models/observer-competence-dto.ts +models/observer-competence-level-dto.ts +models/observer-group-dto.ts +models/observer-patch-request-dto.ts +models/observer-response-dto.ts +models/observer-view-model.ts +models/operator.ts +models/position-dto.ts +models/problem-details.ts +models/property-filter.ts +models/reg-obs-generic-value.ts +models/registration-edit-model.ts +models/registration-type-criteria-dto.ts +models/registration-type-dto.ts +models/registration-type-sub-type-dto.ts +models/registration-view-model.ts +models/registrations-with-attachments.ts +models/search-count-response-dto.ts +models/search-criteria-excl-user-request-dto.ts +models/search-criteria-request-dto.ts +models/search-side-bar-dto-observer-competence-levels.ts +models/search-side-bar-dto-registration-types.ts +models/search-side-bar-dto.ts +models/search-side-bar-request-dto.ts +models/snow-cover-obs-view-model.ts +models/snow-density-layer-model.ts +models/snow-density-model.ts +models/snow-profile-edit-model.ts +models/snow-profile-view-model.ts +models/snow-surface-edit-model.ts +models/snow-surface-view-model.ts +models/snow-temp-model.ts +models/snow-temp-obs-model.ts +models/strat-profile-edit-model.ts +models/strat-profile-layer-edit-model.ts +models/strat-profile-layer-view-model.ts +models/strat-profile-view-model.ts +models/summary.ts +models/url-edit-model.ts +models/url-view-model.ts +models/value-kind.ts +models/water-level-measurement-edit-model.ts +models/water-level-measurement-view-model.ts +models/water-level-view-model.ts +models/waterlevel2-edit-model.ts +models/waterlevel2-view-model.ts +models/weather-edit-model.ts +models/weather-view-model.ts +models/within-extent-criteria-dto.ts +models/within-radius-criteria-dto.ts +param.ts +provide-api.ts +variables.ts diff --git a/src/app/modules/common-regobs-api/.openapi-generator/VERSION b/src/app/modules/common-regobs-api/.openapi-generator/VERSION new file mode 100644 index 000000000..6328c5424 --- /dev/null +++ b/src/app/modules/common-regobs-api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/src/app/modules/common-regobs-api/README.md b/src/app/modules/common-regobs-api/README.md new file mode 100644 index 000000000..81ede8f57 --- /dev/null +++ b/src/app/modules/common-regobs-api/README.md @@ -0,0 +1,185 @@ +# @ + + ## Introduction RegObs is a tool for collecting observations and events
related to natural hazards. It is currently used by the
Norwegian flood, landslide and avalanche warning service in
Norway, but the data is openly available for anyone through this API.
Regobs has been developed by the Norwegian Water resources and
Energy Directorate (NVE), in collaboration with the Norwegian
Meteorological Institute (MET) and the Norwegian Public Roads
Administration (Statens vegvesen).
You can check out our representation of the data at [regobs.no](https://regobs.no).
For more info about the API, please visit the [RegObs page](https://api.nve.no/doc/regobs/) at api.nve.no.
## API lifetime Regobs API is constantly developed, and once in the future we will probably release a new version of the API with breaking changes.
The old version of the API will then be shut down 6 months after the new version is released.
**You should already monitor the \'[Sunset](https://www.rfc-editor.org/rfc/rfc8594.html)\' header in the API response.**
It will contain a shutdown date for current API when the new version is released.
## Authentication Some endpoints require a client ID used to fetch an authentication token.
This is primarily endpoints submitting data or fetching private data.
You can get a client ID by sending an email to
[regobs@nve.no](mailto:regobs@nve.no?subject=RegObs%20Client%20ID).
You must then fetch a token as outlined in
[NVE Account Authentication](https://api.nve.no/doc/nve-account-authentication/).
This is not necessary for simpler API queries, such as searching for observations.
To get a token with the swagger ui, log in by clicking on the green authorize button.
The `regObs_apptoken` header is a deprecated
form of client identification and is not necessary.
## Client library To simplify interaction with the API we are working on a
Python client library. Currently it supports submitting data
as well as searching. It is available at
[https://pypi.org/project/regobslib/](https://pypi.org/project/regobslib/).
## Data Types In order to find information on Regobs data types use the
GET/KDVElements method. KDVElements are used for describing an observation. If we look up GeoHazard in the response we get:
``` GeoHazardKDV: [ { Id: 0, Name: Not specified, Description: null }, { Id: 10, Name: Snow, Description: Avalanche }, { Id: 20, Name: Soil, Description: Earth slide }, ] ``` The GeoHazardTID of 10 corresponds to snow. The GeoHazardTID of 20 corresponds to soil and so on. Note that the naming of data types in the API ends with TID while the GET/KDVElements service returns data types with KDV. Otherwise the naming should be identical. ## Example Get the last 10 observations using python: ```python import requests r = requests.post(\'https://api.regobs.no/v6/Search\', data={\'NumberOfRecords\': 10}, headers={\'Content-Type\': \'application/json\'} ) data = r.json() print(len(data)) # 10 ``` + +The version of the OpenAPI document: v6 + +## Building + +To install the required dependencies and to build the typescript sources run: + +```console +npm install +npm run build +``` + +## Publishing + +First build the package then run `npm publish dist` (don't forget to specify the `dist` folder!) + +## Consuming + +Navigate to the folder of your consuming project and run one of next commands. + +_published:_ + +```console +npm install @ --save +``` + +_without publishing (not recommended):_ + +```console +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save +``` + +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + +_using `npm link`:_ + +In PATH_TO_GENERATED_PACKAGE/dist: + +```console +npm link +``` + +In your project: + +```console +npm link +``` + +__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. +Please refer to this issue for a solution / workaround. +Published packages are not effected by this issue. + +### General usage + +In your Angular project: + +```typescript + +import { ApplicationConfig } from '@angular/core'; +import { provideHttpClient } from '@angular/common/http'; +import { provideApi } from ''; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideHttpClient(), + provideApi() + ], +}; +``` + +**NOTE** +If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module: +```typescript +import { ApiModule } from ''; +``` + +If different from the generated base path, during app bootstrap, you can provide the base path to your service. + +```typescript +import { ApplicationConfig } from '@angular/core'; +import { provideHttpClient } from '@angular/common/http'; +import { provideApi } from ''; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideHttpClient(), + provideApi('http://localhost:9999') + ], +}; +``` + +```typescript +// with a custom configuration +import { ApplicationConfig } from '@angular/core'; +import { provideHttpClient } from '@angular/common/http'; +import { provideApi } from ''; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideHttpClient(), + provideApi({ + withCredentials: true, + username: 'user', + password: 'password' + }) + ], +}; +``` + +```typescript +// with factory building a custom configuration +import { ApplicationConfig } from '@angular/core'; +import { provideHttpClient } from '@angular/common/http'; +import { provideApi, Configuration } from ''; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideHttpClient(), + { + provide: Configuration, + useFactory: (authService: AuthService) => new Configuration({ + basePath: 'http://localhost:9999', + withCredentials: true, + username: authService.getUsername(), + password: authService.getPassword(), + }), + deps: [AuthService], + multi: false + } + ], +}; +``` + +### Using multiple OpenAPI files / APIs + +In order to use multiple APIs generated from different OpenAPI files, +you can create an alias name when importing the modules +in order to avoid naming conflicts: + +```typescript +import { provideApi as provideUserApi } from 'my-user-api-path'; +import { provideApi as provideAdminApi } from 'my-admin-api-path'; +import { HttpClientModule } from '@angular/common/http'; +import { environment } from '../environments/environment'; + +export const appConfig: ApplicationConfig = { + providers: [ + // ... + provideHttpClient(), + provideUserApi(environment.basePath), + provideAdminApi(environment.basePath), + ], +}; +``` + +### Customizing path parameter encoding + +Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple' +and Dates for format 'date-time' are encoded correctly. + +Other styles (e.g. "matrix") are not that easy to encode +and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]). + +To implement your own parameter encoding (or call another library), +pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object +(see [General Usage](#general-usage) above). + +Example value for use in your Configuration-Provider: + +```typescript +new Configuration({ + encodeParam: (param: Param) => myFancyParamEncoder(param), +}) +``` + +[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations +[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values +[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander diff --git a/src/app/modules/common-regobs-api/api.base.service.ts b/src/app/modules/common-regobs-api/api.base.service.ts new file mode 100644 index 000000000..76f2d3c50 --- /dev/null +++ b/src/app/modules/common-regobs-api/api.base.service.ts @@ -0,0 +1,80 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http'; +import { CustomHttpParameterCodec } from './encoder'; +import { Configuration } from './configuration'; + +export class BaseService { + protected basePath = 'http://localhost'; + public defaultHeaders = new HttpHeaders(); + public configuration: Configuration; + public encoder: HttpParameterCodec; + + constructor(basePath?: string|string[], configuration?: Configuration) { + this.configuration = configuration || new Configuration(); + if (typeof this.configuration.basePath !== 'string') { + const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined; + if (firstBasePath != undefined) { + basePath = firstBasePath; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + protected canConsumeForm(consumes: string[]): boolean { + return consumes.indexOf('multipart/form-data') !== -1; + } + + protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams { + // If the value is an object (but not a Date), recursively add its keys. + if (typeof value === 'object' && !(value instanceof Date)) { + return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep); + } + return this.addToHttpParamsRecursive(httpParams, value, key); + } + + protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams { + if (value === null || value === undefined) { + return httpParams; + } + if (typeof value === 'object') { + // If JSON format is preferred, key must be provided. + if (key != null) { + return isDeep + ? Object.keys(value as Record).reduce( + (hp, k) => hp.append(`${key}[${k}]`, value[k]), + httpParams, + ) + : httpParams.append(key, JSON.stringify(value)); + } + // Otherwise, if it's an array, add each element. + if (Array.isArray(value)) { + value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, value.toISOString()); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach(k => { + const paramKey = key ? `${key}.${k}` : k; + httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey); + }); + } + return httpParams; + } else if (key != null) { + return httpParams.append(key, value); + } + throw Error("key may not be null if value is not object or array"); + } +} diff --git a/src/app/modules/common-regobs-api/api.module.ts b/src/app/modules/common-regobs-api/api.module.ts new file mode 100644 index 000000000..58d341fbd --- /dev/null +++ b/src/app/modules/common-regobs-api/api.module.ts @@ -0,0 +1,30 @@ +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { Configuration } from './configuration'; +import { HttpClient } from '@angular/common/http'; + + +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [] +}) +export class ApiModule { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } + } +} diff --git a/src/app/modules/common-regobs-api/api/account.service.ts b/src/app/modules/common-regobs-api/api/account.service.ts new file mode 100644 index 000000000..ead503c23 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/account.service.ts @@ -0,0 +1,304 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { LangKey } from '../models/lang-key'; +// @ts-ignore +import { MyPageData } from '../models/my-page-data'; +// @ts-ignore +import { ObserverGroupDto } from '../models/observer-group-dto'; +// @ts-ignore +import { ObserverPatchRequestDto } from '../models/observer-patch-request-dto'; +// @ts-ignore +import { ObserverResponseDto } from '../models/observer-response-dto'; +// @ts-ignore +import { ProblemDetails } from '../models/problem-details'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface AccountGetMyPageDataRequestParams { + langKey?: LangKey; +} + +export interface AccountUpdateObserverRequestParams { + observerPatchRequestDto?: ObserverPatchRequestDto; +} + + +@Injectable({ + providedIn: 'root' +}) +export class AccountService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * @endpoint get /Account/Mypage + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public accountGetMyPageData(requestParameters?: AccountGetMyPageDataRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public accountGetMyPageData(requestParameters?: AccountGetMyPageDataRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public accountGetMyPageData(requestParameters?: AccountGetMyPageDataRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public accountGetMyPageData(requestParameters?: AccountGetMyPageDataRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const langKey = requestParameters?.langKey; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Account/Mypage`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint get /Account/GetObserver + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public accountGetObserver(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public accountGetObserver(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public accountGetObserver(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public accountGetObserver(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Account/GetObserver`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint get /Account/Groups + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public accountGetObserverGroups(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public accountGetObserverGroups(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public accountGetObserverGroups(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public accountGetObserverGroups(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Account/Groups`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Set nickname for an observer + * @endpoint put /Account/UpdateObserver + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public accountUpdateObserver(requestParameters?: AccountUpdateObserverRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public accountUpdateObserver(requestParameters?: AccountUpdateObserverRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public accountUpdateObserver(requestParameters?: AccountUpdateObserverRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public accountUpdateObserver(requestParameters?: AccountUpdateObserverRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const observerPatchRequestDto = requestParameters?.observerPatchRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Account/UpdateObserver`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: observerPatchRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/api.ts b/src/app/modules/common-regobs-api/api/api.ts new file mode 100644 index 000000000..9fa3ffbff --- /dev/null +++ b/src/app/modules/common-regobs-api/api/api.ts @@ -0,0 +1,19 @@ +export * from './account.service'; +import { AccountService } from './account.service'; +export * from './attachment.service'; +import { AttachmentService } from './attachment.service'; +export * from './geo-code.service'; +import { GeoCodeService } from './geo-code.service'; +export * from './helptext.service'; +import { HelptextService } from './helptext.service'; +export * from './kdv-elements.service'; +import { KdvElementsService } from './kdv-elements.service'; +export * from './location.service'; +import { LocationService } from './location.service'; +export * from './registration.service'; +import { RegistrationService } from './registration.service'; +export * from './search.service'; +import { SearchService } from './search.service'; +export * from './trip.service'; +import { TripService } from './trip.service'; +export const APIS = [AccountService, AttachmentService, GeoCodeService, HelptextService, KdvElementsService, LocationService, RegistrationService, SearchService, TripService]; diff --git a/src/app/modules/common-regobs-api/api/attachment.service.ts b/src/app/modules/common-regobs-api/api/attachment.service.ts new file mode 100644 index 000000000..3a74a7d30 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/attachment.service.ts @@ -0,0 +1,193 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface AttachmentGetRequestParams { + /** Attachment id */ + id: number; + /** Image format. For video, use Raw. Possible image formats: Raw, Original, Large, Medium, Thumbnail */ + format: string; +} + +export interface AttachmentUploadRequestParams { + file?: Blob; +} + + +@Injectable({ + providedIn: 'root' +}) +export class AttachmentService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get Attachment file by id + * @endpoint get /Attachment/{format}/{id} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public attachmentGet(requestParameters: AttachmentGetRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public attachmentGet(requestParameters: AttachmentGetRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public attachmentGet(requestParameters: AttachmentGetRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public attachmentGet(requestParameters: AttachmentGetRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const id = requestParameters?.id; + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling attachmentGet.'); + } + const format = requestParameters?.format; + if (format === null || format === undefined) { + throw new Error('Required parameter format was null or undefined when calling attachmentGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Attachment/${this.configuration.encodeParam({name: "format", value: format, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Upload an image to a registration + * @endpoint post /Attachment/Upload + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public attachmentUpload(requestParameters?: AttachmentUploadRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public attachmentUpload(requestParameters?: AttachmentUploadRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public attachmentUpload(requestParameters?: AttachmentUploadRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public attachmentUpload(requestParameters?: AttachmentUploadRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const file = requestParameters?.file; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = [ + 'multipart/form-data' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + localVarUseForm = canConsumeForm; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (file !== undefined) { + localVarFormParams = localVarFormParams.append('file', file) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Attachment/Upload`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/geo-code.service.ts b/src/app/modules/common-regobs-api/api/geo-code.service.ts new file mode 100644 index 000000000..5470db33d --- /dev/null +++ b/src/app/modules/common-regobs-api/api/geo-code.service.ts @@ -0,0 +1,206 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { GeoLocationInfo } from '../models/geo-location-info'; +// @ts-ignore +import { GeoLocationSummary } from '../models/geo-location-summary'; +// @ts-ignore +import { LangKey } from '../models/lang-key'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface GeoCodeLocationInfoRequestParams { + /** Latitude */ + latitude?: number; + /** Longitude */ + longitude?: number; + /** Geohazard ID */ + geoHazardId?: number; +} + +export interface GeoCodeLocationSummaryRequestParams { + /** Latitude */ + latitude?: number; + /** Longitude */ + longitude?: number; + /** Language key */ + langKey?: LangKey; + /** Geohazard ID */ + geoHazardId?: number; +} + + +@Injectable({ + providedIn: 'root' +}) +export class GeoCodeService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get detailed geolocation info. + * @endpoint get /GeoCode/LocationInfo + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geoCodeLocationInfo(requestParameters?: GeoCodeLocationInfoRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geoCodeLocationInfo(requestParameters?: GeoCodeLocationInfoRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geoCodeLocationInfo(requestParameters?: GeoCodeLocationInfoRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geoCodeLocationInfo(requestParameters?: GeoCodeLocationInfoRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const latitude = requestParameters?.latitude; + const longitude = requestParameters?.longitude; + const geoHazardId = requestParameters?.geoHazardId; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + latitude, 'latitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + longitude, 'longitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + geoHazardId, 'geoHazardId'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/GeoCode/LocationInfo`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get preformatted geolocation summary. + * @endpoint get /GeoCode/LocationSummary + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geoCodeLocationSummary(requestParameters?: GeoCodeLocationSummaryRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geoCodeLocationSummary(requestParameters?: GeoCodeLocationSummaryRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geoCodeLocationSummary(requestParameters?: GeoCodeLocationSummaryRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geoCodeLocationSummary(requestParameters?: GeoCodeLocationSummaryRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const latitude = requestParameters?.latitude; + const longitude = requestParameters?.longitude; + const langKey = requestParameters?.langKey; + const geoHazardId = requestParameters?.geoHazardId; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + latitude, 'latitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + longitude, 'longitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + geoHazardId, 'geoHazardId'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/GeoCode/LocationSummary`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/helptext.service.ts b/src/app/modules/common-regobs-api/api/helptext.service.ts new file mode 100644 index 000000000..99dbac381 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/helptext.service.ts @@ -0,0 +1,106 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { HelptextDto } from '../models/helptext-dto'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface HelptextGetRequestParams { + /** Specify 1 for Norwegian or 2 for English */ + langKey?: number; +} + + +@Injectable({ + providedIn: 'root' +}) +export class HelptextService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get a list of helptext objects. + * @endpoint get /Helptext + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public helptextGet(requestParameters?: HelptextGetRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public helptextGet(requestParameters?: HelptextGetRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public helptextGet(requestParameters?: HelptextGetRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public helptextGet(requestParameters?: HelptextGetRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const langKey = requestParameters?.langKey; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Helptext`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/kdv-elements.service.ts b/src/app/modules/common-regobs-api/api/kdv-elements.service.ts new file mode 100644 index 000000000..4b4de12e0 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/kdv-elements.service.ts @@ -0,0 +1,118 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { KdvElementsResponseDto } from '../models/kdv-elements-response-dto'; +// @ts-ignore +import { LangKey } from '../models/lang-key'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface KdvElementsGetKdvsRequestParams { + /** 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 7 = norwegian nynorsk, 8 = french. Norwegian is the default language if none is selected. Default langKey is norwegian */ + langkey?: LangKey; + /** False returns data types that are no longer in use */ + isActive?: boolean; + /** False returns data types sorted by id */ + sortOrder?: boolean; +} + + +@Injectable({ + providedIn: 'root' +}) +export class KdvElementsService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Returns id, name, and description for data types. This is most often used in input fields, dropdowns etc. KDVElements that belong to a geo hazard are prefixed with the corresponding hazard (Snow_, Ice_, Water_, Landslide_). If a type is missing in given language, we will fill the holes with equivalent types in English (if they exist). + * @endpoint get /KdvElements + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public kdvElementsGetKdvs(requestParameters?: KdvElementsGetKdvsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public kdvElementsGetKdvs(requestParameters?: KdvElementsGetKdvsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public kdvElementsGetKdvs(requestParameters?: KdvElementsGetKdvsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public kdvElementsGetKdvs(requestParameters?: KdvElementsGetKdvsRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const langkey = requestParameters?.langkey; + const isActive = requestParameters?.isActive; + const sortOrder = requestParameters?.sortOrder; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langkey, 'langkey'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + isActive, 'isActive'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/KdvElements`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/location.service.ts b/src/app/modules/common-regobs-api/api/location.service.ts new file mode 100644 index 000000000..2cc73ee21 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/location.service.ts @@ -0,0 +1,201 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { LangKey } from '../models/lang-key'; +// @ts-ignore +import { ObsLocationsResponseDtoV2 } from '../models/obs-locations-response-dto-v2'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface LocationGetRequestParams { + /** The ID of the location. */ + locationId: number; + /** The language key. */ + langKey?: LangKey; +} + +export interface LocationWithinRadiusRequestParams { + latitude?: number; + longitude?: number; + radius?: number; + geoHazardTypeIds?: Array; + returnCount?: number; +} + + +@Injectable({ + providedIn: 'root' +}) +export class LocationService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Gets a specific location by ID. + * @endpoint get /Location/{locationId} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public locationGet(requestParameters: LocationGetRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public locationGet(requestParameters: LocationGetRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public locationGet(requestParameters: LocationGetRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public locationGet(requestParameters: LocationGetRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const locationId = requestParameters?.locationId; + if (locationId === null || locationId === undefined) { + throw new Error('Required parameter locationId was null or undefined when calling locationGet.'); + } + const langKey = requestParameters?.langKey; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Location/${this.configuration.encodeParam({name: "locationId", value: locationId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns a list of locations within the given radius from the given coordinates. For an unauthenticated client, it only returns public ice locations. For an authenticated client, it returns public locations as well as the authenticated user\'s private locations. Empty list if no registrations found. + * @endpoint get /Location/WithinRadius + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public locationWithinRadius(requestParameters?: LocationWithinRadiusRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public locationWithinRadius(requestParameters?: LocationWithinRadiusRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public locationWithinRadius(requestParameters?: LocationWithinRadiusRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public locationWithinRadius(requestParameters?: LocationWithinRadiusRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const latitude = requestParameters?.latitude; + const longitude = requestParameters?.longitude; + const radius = requestParameters?.radius; + const geoHazardTypeIds = requestParameters?.geoHazardTypeIds; + const returnCount = requestParameters?.returnCount; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + latitude, 'latitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + longitude, 'longitude'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + radius, 'radius'); + if (geoHazardTypeIds) { + geoHazardTypeIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'geoHazardTypeIds'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + returnCount, 'returnCount'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Location/WithinRadius`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/registration.service.ts b/src/app/modules/common-regobs-api/api/registration.service.ts new file mode 100644 index 000000000..e64fed766 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/registration.service.ts @@ -0,0 +1,631 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { LangKey } from '../models/lang-key'; +// @ts-ignore +import { RegistrationEditModel } from '../models/registration-edit-model'; +// @ts-ignore +import { RegistrationViewModel } from '../models/registration-view-model'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface RegistrationDeleteRequestParams { + id: number; +} + +export interface RegistrationGetRequestParams { + /** Registration Id */ + regId: number; + /** 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. */ + langKey: LangKey; +} + +export interface RegistrationGetCaamlRequestParams { + /** Registration Id */ + regId: number; +} + +export interface RegistrationInsertRequestParams { + /** Unique identifier for registration, in GUID format. This parameter will be required in next version of the API */ + externalReferenceId?: string; + /** 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. */ + langKey?: LangKey; + /** ObsLocation, GeoHazardTID and DtObsTime are mandatory. */ + registrationEditModel?: RegistrationEditModel; +} + +export interface RegistrationInsertOrUpdateRequestParams { + /** Set to regId if update existing registration, else leave blank */ + id: number; + /** External reference id, must be unique for application and in GUID format */ + externalReferenceId?: string; + /** 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. */ + langKey?: LangKey; + /** Set this to true if you want to replace the last saved version of this registration even if your copy is outdated */ + ignoreVersionCheck?: boolean; + /** Registration data */ + registrationEditModel?: RegistrationEditModel; +} + +export interface RegistrationPlotPreviewPngRequestParams { + /** */ + format?: number; + /** */ + height?: number; + /** */ + width?: number; + /** 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. */ + langKey?: LangKey; + /** Snow profile registration */ + registrationEditModel?: RegistrationEditModel; +} + +export interface RegistrationValidateRequestParams { + /** RegId if existing registration else null if new */ + id: number; + /** External reference id, must be unique for application and in GUID format */ + externalReferenceId?: string; + /** Registration data */ + registrationEditModel?: RegistrationEditModel; +} + + +@Injectable({ + providedIn: 'root' +}) +export class RegistrationService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Delete registration + * @endpoint delete /Registration/{id} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationDelete(requestParameters: RegistrationDeleteRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public registrationDelete(requestParameters: RegistrationDeleteRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationDelete(requestParameters: RegistrationDeleteRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationDelete(requestParameters: RegistrationDeleteRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const id = requestParameters?.id; + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling registrationDelete.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get registration by regId. + * @endpoint get /Registration/{regId}/{langKey} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationGet(requestParameters: RegistrationGetRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public registrationGet(requestParameters: RegistrationGetRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationGet(requestParameters: RegistrationGetRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationGet(requestParameters: RegistrationGetRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const regId = requestParameters?.regId; + if (regId === null || regId === undefined) { + throw new Error('Required parameter regId was null or undefined when calling registrationGet.'); + } + const langKey = requestParameters?.langKey; + if (langKey === null || langKey === undefined) { + throw new Error('Required parameter langKey was null or undefined when calling registrationGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/${this.configuration.encodeParam({name: "regId", value: regId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "langKey", value: langKey, in: "path", style: "simple", explode: false, dataType: "LangKey", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get a registration in CAAML format + * CAAML (Canadian Avalanche Association Markup Language) is a standard for the electronic representation of information pertinent to avalanche safety operations. See http://caaml.org/. + * @endpoint get /Registration/Caaml/{regId} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationGetCaaml(requestParameters: RegistrationGetCaamlRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml', context?: HttpContext, transferCache?: boolean}): Observable; + public registrationGetCaaml(requestParameters: RegistrationGetCaamlRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationGetCaaml(requestParameters: RegistrationGetCaamlRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationGetCaaml(requestParameters: RegistrationGetCaamlRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml', context?: HttpContext, transferCache?: boolean}): Observable { + const regId = requestParameters?.regId; + if (regId === null || regId === undefined) { + throw new Error('Required parameter regId was null or undefined when calling registrationGetCaaml.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/xml' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/Caaml/${this.configuration.encodeParam({name: "regId", value: regId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Create a new registration. The purpose is to send in one or more forms. + * Example critera for creating a new registration with one form. { \"GeoHazardTID\": 20, \"DtObsTime\": \"2021-06-25T13:18:00.000Z\", \"ObsLocation\": { \"Latitude\": 60.919917123811992, \"Longitude\": 7.210167614875667, }, \"LandSlideObs\": { \"LandSlideTID\": 2, \"LandSlideTriggerTID\": 0, \"LandSlideSizeTID\": 0, \"Comment\": \"Flomskred på FV5627 løsnet fra vegskjæring 0-50m. Anslått skredvolum på veg: mindre enn 10m^3.Blokkert veglengde: Kun i grøft.\", \"GeoHazardTID\": 20, \"ActivityInfluencedTID\": 220, \"ForecastAccurateTID\": 0, \"DamageExtentTID\": 0, \"DtLandSlideTime\": \"2021-06-25T08:10:00+02:00\", } } + * @endpoint post /Registration + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationInsert(requestParameters?: RegistrationInsertRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public registrationInsert(requestParameters?: RegistrationInsertRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationInsert(requestParameters?: RegistrationInsertRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationInsert(requestParameters?: RegistrationInsertRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const externalReferenceId = requestParameters?.externalReferenceId; + const langKey = requestParameters?.langKey; + const registrationEditModel = requestParameters?.registrationEditModel; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + externalReferenceId, 'externalReferenceId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: registrationEditModel, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Update registration. Updating existing obsLocation with new values will be possible only if there is no other registrations connected to that location from before. Otherwise new values are ignored. User don\'t get any error message. + * @endpoint put /Registration/{id} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationInsertOrUpdate(requestParameters: RegistrationInsertOrUpdateRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public registrationInsertOrUpdate(requestParameters: RegistrationInsertOrUpdateRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationInsertOrUpdate(requestParameters: RegistrationInsertOrUpdateRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationInsertOrUpdate(requestParameters: RegistrationInsertOrUpdateRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const id = requestParameters?.id; + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling registrationInsertOrUpdate.'); + } + const externalReferenceId = requestParameters?.externalReferenceId; + const langKey = requestParameters?.langKey; + const ignoreVersionCheck = requestParameters?.ignoreVersionCheck; + const registrationEditModel = requestParameters?.registrationEditModel; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + externalReferenceId, 'externalReferenceId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + ignoreVersionCheck, 'ignoreVersionCheck'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: registrationEditModel, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Generate a preview figure for a snow profile registration. + * @endpoint post /Registration/PlotPreviewPng + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationPlotPreviewPng(requestParameters?: RegistrationPlotPreviewPngRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public registrationPlotPreviewPng(requestParameters?: RegistrationPlotPreviewPngRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationPlotPreviewPng(requestParameters?: RegistrationPlotPreviewPngRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationPlotPreviewPng(requestParameters?: RegistrationPlotPreviewPngRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const format = requestParameters?.format; + const height = requestParameters?.height; + const width = requestParameters?.width; + const langKey = requestParameters?.langKey; + const registrationEditModel = requestParameters?.registrationEditModel; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + format, 'format'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + height, 'height'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + width, 'width'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + langKey, 'langKey'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/PlotPreviewPng`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: registrationEditModel, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Validate registration data. + * @endpoint post /Registration/Validate/{id} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registrationValidate(requestParameters: RegistrationValidateRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public registrationValidate(requestParameters: RegistrationValidateRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationValidate(requestParameters: RegistrationValidateRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registrationValidate(requestParameters: RegistrationValidateRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const id = requestParameters?.id; + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling registrationValidate.'); + } + const externalReferenceId = requestParameters?.externalReferenceId; + const registrationEditModel = requestParameters?.registrationEditModel; + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + externalReferenceId, 'externalReferenceId'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Registration/Validate/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: registrationEditModel, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/search.service.ts b/src/app/modules/common-regobs-api/api/search.service.ts new file mode 100644 index 000000000..edaca91a0 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/search.service.ts @@ -0,0 +1,831 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { AtAGlanceViewModel } from '../models/at-a-glance-view-model'; +// @ts-ignore +import { ProblemDetails } from '../models/problem-details'; +// @ts-ignore +import { RegistrationViewModel } from '../models/registration-view-model'; +// @ts-ignore +import { RegistrationsWithAttachments } from '../models/registrations-with-attachments'; +// @ts-ignore +import { SearchCountResponseDto } from '../models/search-count-response-dto'; +// @ts-ignore +import { SearchCriteriaExclUserRequestDto } from '../models/search-criteria-excl-user-request-dto'; +// @ts-ignore +import { SearchCriteriaRequestDto } from '../models/search-criteria-request-dto'; +// @ts-ignore +import { SearchSideBarDto } from '../models/search-side-bar-dto'; +// @ts-ignore +import { SearchSideBarRequestDto } from '../models/search-side-bar-request-dto'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface SearchAtAGlanceRequestParams { + /** Search criteria */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchAttachmentsCountRequestParams { + /** Search criteria */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchCountRequestParams { + /** Search criteria */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchCountMyRegistrationsRequestParams { + /** You may add additional filters */ + searchCriteriaExclUserRequestDto?: SearchCriteriaExclUserRequestDto; +} + +export interface SearchGetRegIdsFromDeletedRegistrationsRequestParams { + /** Search criteria */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchGetSearchCriteriaRequestParams { + /** A comma separated list of geo hazard ID\'s. Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. */ + geoHazards: string; + /** NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6, NN = 7 */ + langKey: number; +} + +export interface SearchSearchRequestParams { + /** Use this to filter out registrations and change ordering of them. The attribute \"ObserverGuid\" is deprecated and will be removed in the future. */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchSearchCriteriaRequestParams { + /** A request for relevant search criteria */ + searchSideBarRequestDto?: SearchSideBarRequestDto; +} + +export interface SearchSearchImagesRequestParams { + /** Search criteria */ + searchCriteriaRequestDto?: SearchCriteriaRequestDto; +} + +export interface SearchSearchMyRegistrationsRequestParams { + /** Use this to filter out registrations and change ordering of them */ + searchCriteriaExclUserRequestDto?: SearchCriteriaExclUserRequestDto; +} + + +@Injectable({ + providedIn: 'root' +}) +export class SearchService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Simplified search for registrations. Returns less data per registration, so faster than /Search Returns empty list if no registrations found. Returns only first attachment and count on how many other attachments user can expect when opening a detailed info + * @endpoint post /Search/AtAGlance + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchAtAGlance(requestParameters?: SearchAtAGlanceRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchAtAGlance(requestParameters?: SearchAtAGlanceRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchAtAGlance(requestParameters?: SearchAtAGlanceRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchAtAGlance(requestParameters?: SearchAtAGlanceRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/AtAGlance`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns search result count for registrations with attachments + * @endpoint post /Search/Attachments/Count + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchAttachmentsCount(requestParameters?: SearchAttachmentsCountRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchAttachmentsCount(requestParameters?: SearchAttachmentsCountRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchAttachmentsCount(requestParameters?: SearchAttachmentsCountRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchAttachmentsCount(requestParameters?: SearchAttachmentsCountRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/Attachments/Count`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns search result count + * @endpoint post /Search/Count + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchCount(requestParameters?: SearchCountRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchCount(requestParameters?: SearchCountRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCount(requestParameters?: SearchCountRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCount(requestParameters?: SearchCountRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/Count`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns number of registrations that were registered by the logged in user + * @endpoint post /Search/MyRegistrationsCount + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchCountMyRegistrations(requestParameters?: SearchCountMyRegistrationsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchCountMyRegistrations(requestParameters?: SearchCountMyRegistrationsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCountMyRegistrations(requestParameters?: SearchCountMyRegistrationsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCountMyRegistrations(requestParameters?: SearchCountMyRegistrationsRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaExclUserRequestDto = requestParameters?.searchCriteriaExclUserRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/MyRegistrationsCount`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaExclUserRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns list of regIds from deleted registrations that can be filtered with criteria model. Used with offline syncing on mobile devices. + * @endpoint post /Search/DeletedRegistrations + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchGetRegIdsFromDeletedRegistrations(requestParameters?: SearchGetRegIdsFromDeletedRegistrationsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchGetRegIdsFromDeletedRegistrations(requestParameters?: SearchGetRegIdsFromDeletedRegistrationsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchGetRegIdsFromDeletedRegistrations(requestParameters?: SearchGetRegIdsFromDeletedRegistrationsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchGetRegIdsFromDeletedRegistrations(requestParameters?: SearchGetRegIdsFromDeletedRegistrationsRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/DeletedRegistrations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns relevant search criteria for the specified geo hazard types and language. This can help you to find the right criteria to use in the other search methods. + * @endpoint get /Search/SearchCriteria/{geoHazards}/{langKey} + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchGetSearchCriteria(requestParameters: SearchGetSearchCriteriaRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchGetSearchCriteria(requestParameters: SearchGetSearchCriteriaRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchGetSearchCriteria(requestParameters: SearchGetSearchCriteriaRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchGetSearchCriteria(requestParameters: SearchGetSearchCriteriaRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const geoHazards = requestParameters?.geoHazards; + if (geoHazards === null || geoHazards === undefined) { + throw new Error('Required parameter geoHazards was null or undefined when calling searchGetSearchCriteria.'); + } + const langKey = requestParameters?.langKey; + if (langKey === null || langKey === undefined) { + throw new Error('Required parameter langKey was null or undefined when calling searchGetSearchCriteria.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/SearchCriteria/${this.configuration.encodeParam({name: "geoHazards", value: geoHazards, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/${this.configuration.encodeParam({name: "langKey", value: langKey, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns a list of complete registrations that matches your filter. Empty list if no registrations found. Use POST /Search/AtAGlance for faster search. + * Example critera for returning the 10 newest registrations: ``` { \"NumberOfRecords\": 10 } ``` + * @endpoint post /Search + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchSearch(requestParameters?: SearchSearchRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchSearch(requestParameters?: SearchSearchRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearch(requestParameters?: SearchSearchRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearch(requestParameters?: SearchSearchRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Please use GET /Search/SearchCriteria instead. Returns relevant search criteria for the specified geo hazard types and language. This can help you to find the right criteria to use in the other search methods. + * @endpoint post /Search/SearchCriteria + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + * @deprecated + */ + public searchSearchCriteria(requestParameters?: SearchSearchCriteriaRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchSearchCriteria(requestParameters?: SearchSearchCriteriaRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchSearchCriteria(requestParameters?: SearchSearchCriteriaRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchSearchCriteria(requestParameters?: SearchSearchCriteriaRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchSideBarRequestDto = requestParameters?.searchSideBarRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/SearchCriteria`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchSideBarRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Search for images only + * @endpoint post /Search/Attachments + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchSearchImages(requestParameters?: SearchSearchImagesRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchSearchImages(requestParameters?: SearchSearchImagesRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearchImages(requestParameters?: SearchSearchImagesRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearchImages(requestParameters?: SearchSearchImagesRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaRequestDto = requestParameters?.searchCriteriaRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/Attachments`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns a list of complete registrations that were registered by the logged in user. Empty list if no registrations found. + * Example critera for returning the 10 newest registrations: ``` { \"NumberOfRecords\": 10 } ``` + * @endpoint post /Search/MyRegistrations + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchSearchMyRegistrations(requestParameters?: SearchSearchMyRegistrationsRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchSearchMyRegistrations(requestParameters?: SearchSearchMyRegistrationsRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearchMyRegistrations(requestParameters?: SearchSearchMyRegistrationsRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public searchSearchMyRegistrations(requestParameters?: SearchSearchMyRegistrationsRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext, transferCache?: boolean}): Observable { + const searchCriteriaExclUserRequestDto = requestParameters?.searchCriteriaExclUserRequestDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'text/plain', + 'application/json', + 'text/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Search/MyRegistrations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: searchCriteriaExclUserRequestDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/api/trip.service.ts b/src/app/modules/common-regobs-api/api/trip.service.ts new file mode 100644 index 000000000..c9da30372 --- /dev/null +++ b/src/app/modules/common-regobs-api/api/trip.service.ts @@ -0,0 +1,239 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { CreateTripDto } from '../models/create-trip-dto'; +// @ts-ignore +import { FinishTripDto } from '../models/finish-trip-dto'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + +export interface TripCreateTripRequestParams { + createTripDto?: CreateTripDto; +} + +export interface TripUpdateTripRequestParams { + finishTripDto?: FinishTripDto; +} + + +@Injectable({ + providedIn: 'root' +}) +export class TripService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * @endpoint post /Trip + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public tripCreateTrip(requestParameters?: TripCreateTripRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public tripCreateTrip(requestParameters?: TripCreateTripRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripCreateTrip(requestParameters?: TripCreateTripRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripCreateTrip(requestParameters?: TripCreateTripRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const createTripDto = requestParameters?.createTripDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Trip`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createTripDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Fetches GeoJSON representations of the pre-approved observation trips. Only available for users in Obskorps administrative group. + * @endpoint get /Trip/ObserverTrips + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public tripGetObserverTrips(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public tripGetObserverTrips(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripGetObserverTrips(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripGetObserverTrips(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Trip/ObserverTrips`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint put /Trip + * @param requestParameters + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public tripUpdateTrip(requestParameters?: TripUpdateTripRequestParams, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; + public tripUpdateTrip(requestParameters?: TripUpdateTripRequestParams, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripUpdateTrip(requestParameters?: TripUpdateTripRequestParams, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; + public tripUpdateTrip(requestParameters?: TripUpdateTripRequestParams, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + const finishTripDto = requestParameters?.finishTripDto; + + let localVarHeaders = this.defaultHeaders; + + // authentication (ApiKey) required + localVarHeaders = this.configuration.addCredentialToHeaders('ApiKey', 'regObs_apptoken', localVarHeaders); + + // authentication (Bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('Bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'text/json', + 'application/*+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/Trip`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: finishTripDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/modules/common-regobs-api/base-service.ts b/src/app/modules/common-regobs-api/base-service.ts deleted file mode 100644 index 56914f4da..000000000 --- a/src/app/modules/common-regobs-api/base-service.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* tslint:disable */ -import { HttpClient, HttpParameterCodec, HttpParams } from '@angular/common/http'; -import { RegobsApiConfiguration } from './regobs-api-configuration'; - -/** - * Custom parameter codec to correctly handle the plus sign in parameter - * values. See https://github.com/angular/angular/issues/18261 - */ -class ParameterCodec implements HttpParameterCodec { - encodeKey(key: string): string { - return encodeURIComponent(key); - } - - encodeValue(value: string): string { - return encodeURIComponent(value); - } - - decodeKey(key: string): string { - return decodeURIComponent(key); - } - - decodeValue(value: string): string { - return decodeURIComponent(value); - } -} -const PARAMETER_CODEC = new ParameterCodec(); - -/** - * Base class for API services - */ -export class BaseService { - constructor( - protected config: RegobsApiConfiguration, - protected http: HttpClient - ) { - } - - private _rootUrl: string = ''; - - /** - * Returns the root url for API operations. If not set directly in this - * service, will fallback to ApiConfiguration.rootUrl. - */ - get rootUrl(): string { - return this._rootUrl || this.config.rootUrl; - } - - /** - * Sets the root URL for API operations in this service. - */ - set rootUrl(rootUrl: string) { - this._rootUrl = rootUrl; - } - - /** - * Creates a new `HttpParams` with the correct codec - */ - protected newParams(): HttpParams { - return new HttpParams({ - encoder: PARAMETER_CODEC - }); - } -} diff --git a/src/app/modules/common-regobs-api/configuration.ts b/src/app/modules/common-regobs-api/configuration.ts new file mode 100644 index 000000000..e4ee35071 --- /dev/null +++ b/src/app/modules/common-regobs-api/configuration.ts @@ -0,0 +1,204 @@ +import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http'; +import { Param } from './param'; + +export interface ConfigurationParameters { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Override the default method for encoding path parameters in various + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam?: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials?: {[ key: string ]: string | (() => string | undefined)}; +} + +export class Configuration { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Encoding of various path parameter + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials: {[ key: string ]: string | (() => string | undefined)}; + +constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) { + if (apiKeys) { + this.apiKeys = apiKeys; + } + if (username !== undefined) { + this.username = username; + } + if (password !== undefined) { + this.password = password; + } + if (accessToken !== undefined) { + this.accessToken = accessToken; + } + if (basePath !== undefined) { + this.basePath = basePath; + } + if (withCredentials !== undefined) { + this.withCredentials = withCredentials; + } + if (encoder) { + this.encoder = encoder; + } + this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param)); + this.credentials = credentials ?? {}; + + // init default Bearer credential + if (!this.credentials['Bearer']) { + this.credentials['Bearer'] = () => { + return typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + }; + } + + // init default ApiKey credential + if (!this.credentials['ApiKey']) { + this.credentials['ApiKey'] = () => { + if (this.apiKeys === null || this.apiKeys === undefined) { + return undefined; + } else { + return this.apiKeys['ApiKey'] || this.apiKeys['regObs_apptoken']; + } + }; + } + } + + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } + + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } + + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } + + public lookupCredential(key: string): string | undefined { + const value = this.credentials[key]; + return typeof value === 'function' + ? value() + : value; + } + + public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders { + const value = this.lookupCredential(credentialKey); + return value + ? headers.set(headerName, (prefix ?? '') + value) + : headers; + } + + public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams { + const value = this.lookupCredential(credentialKey); + return value + ? query.set(paramName, value) + : query; + } + + private defaultEncodeParam(param: Param): string { + // This implementation exists as fallback for missing configuration + // and for backwards compatibility to older typescript-angular generator versions. + // It only works for the 'simple' parameter style. + // Date-handling only works for the 'date-time' format. + // All other styles and Date-formats are probably handled incorrectly. + // + // But: if that's all you need (i.e.: the most common use-case): no need for customization! + + const value = param.dataFormat === 'date-time' && param.value instanceof Date + ? (param.value as Date).toISOString() + : param.value; + + return encodeURIComponent(String(value)); + } +} diff --git a/src/app/modules/common-regobs-api/encoder.ts b/src/app/modules/common-regobs-api/encoder.ts new file mode 100644 index 000000000..138c4d5cf --- /dev/null +++ b/src/app/modules/common-regobs-api/encoder.ts @@ -0,0 +1,20 @@ +import { HttpParameterCodec } from '@angular/common/http'; + +/** + * Custom HttpParameterCodec + * Workaround for https://github.com/angular/angular/issues/18261 + */ +export class CustomHttpParameterCodec implements HttpParameterCodec { + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } +} diff --git a/src/app/modules/common-regobs-api/git_push.sh b/src/app/modules/common-regobs-api/git_push.sh new file mode 100644 index 000000000..f53a75d4f --- /dev/null +++ b/src/app/modules/common-regobs-api/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/src/app/modules/common-regobs-api/index.ts b/src/app/modules/common-regobs-api/index.ts index 6bccc4853..f70b6da94 100644 --- a/src/app/modules/common-regobs-api/index.ts +++ b/src/app/modules/common-regobs-api/index.ts @@ -1,5 +1,7 @@ -export * from './services'; -export * from './models'; -export * from './regobs-api.module'; -export * from './regobs-api-with-config.module'; -export * from './regobs-api-configuration'; +export * from './api/api'; +export * from './models/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; +export * from './provide-api'; +export * from './param'; diff --git a/src/app/modules/common-regobs-api/model/areas-dto-forecast-regions.ts b/src/app/modules/common-regobs-api/model/areas-dto-forecast-regions.ts new file mode 100644 index 000000000..bf96572db --- /dev/null +++ b/src/app/modules/common-regobs-api/model/areas-dto-forecast-regions.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ForecastRegionDto } from './forecast-region-dto'; + + +export interface AreasDtoForecastRegions { + NotSpecified?: Array; + Avalanche?: Array; + EarthFlow?: Array; + LandSlide?: Array; + RockFall?: Array; + IceFall?: Array; + Flooding?: Array; + Ice?: Array; + EventOnGlacier?: Array; + 'Jøkulhaup'?: Array; + Drought?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/areas-dto.ts b/src/app/modules/common-regobs-api/model/areas-dto.ts new file mode 100644 index 000000000..810a66214 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/areas-dto.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AreasDtoForecastRegions } from './areas-dto-forecast-regions'; +import { CountyDto } from './county-dto'; + + +export interface AreasDto { + CountryId: number; + CountryName?: string; + CountryDescription?: string; + SortOrder: number; + ForecastRegions?: AreasDtoForecastRegions; + Counties?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/at-a-glance-view-model.ts b/src/app/modules/common-regobs-api/model/at-a-glance-view-model.ts new file mode 100644 index 000000000..e37f4b6cc --- /dev/null +++ b/src/app/modules/common-regobs-api/model/at-a-glance-view-model.ts @@ -0,0 +1,33 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AtAGlanceViewModel { + RegId: number; + GeoHazardTID?: number | null; + DtObsTime: string; + NickName?: string; + CompetenceLevelTID?: number | null; + Title?: string; + Latitude: number; + Longitude: number; + UtmNorth: number; + UtmEast: number; + FormNames?: Array; + /** + * Returns first attachement url from the observation or null + */ + FirstAttachmentUrl?: string; + /** + * Count of all attachments + */ + AttachmentsCount?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/attachment-edit-model.ts b/src/app/modules/common-regobs-api/model/attachment-edit-model.ts new file mode 100644 index 000000000..28b34b1c2 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/attachment-edit-model.ts @@ -0,0 +1,48 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AttachmentEditModel { + /** + * Navn på fotograf. + */ + Photographer?: string | null; + /** + * Rettigheter til bilde. + */ + Copyright?: string | null; + /** + * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect?: number | null; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier + */ + RegistrationTID?: number | null; + /** + * Kommentarfelt for bildet. F.eks for å beskrive det. + */ + Comment?: string | null; + AttachmentMimeType?: string | null; + /** + * Om bildet skal vises først i registreringen, eller ikke + */ + IsMainAttachment?: boolean | null; + AttachmentId?: number | null; + /** + * Last opp attachment på forhånd og sett AttachmentUploadId + */ + AttachmentUploadId?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/attachment-view-model-url-formats.ts b/src/app/modules/common-regobs-api/model/attachment-view-model-url-formats.ts new file mode 100644 index 000000000..8b84b379c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/attachment-view-model-url-formats.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Urls in different formats + */ +export interface AttachmentViewModelUrlFormats { + Raw?: string; + Original?: string; + Thumbnail?: string; + Large?: string; + Medium?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/attachment-view-model.ts b/src/app/modules/common-regobs-api/model/attachment-view-model.ts new file mode 100644 index 000000000..6f545bd9e --- /dev/null +++ b/src/app/modules/common-regobs-api/model/attachment-view-model.ts @@ -0,0 +1,62 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AttachmentViewModelUrlFormats } from './attachment-view-model-url-formats'; + + +export interface AttachmentViewModel { + /** + * Navn på fotograf. + */ + Photographer?: string | null; + /** + * Rettigheter til bilde. + */ + Copyright?: string | null; + /** + * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect?: number | null; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier + */ + RegistrationTID?: number | null; + /** + * Kommentarfelt for bildet. F.eks for å beskrive det. + */ + Comment?: string | null; + AttachmentMimeType?: string | null; + /** + * Om bildet skal vises først i registreringen, eller ikke + */ + IsMainAttachment?: boolean | null; + AttachmentId: number; + /** + * GeoHazard name + */ + GeoHazardName?: string; + /** + * Registration name + */ + RegistrationName?: string; + UrlFormats?: AttachmentViewModelUrlFormats; + /** + * Full original image url + */ + Url?: string; + /** + * If true, the attachment is an image generated from a snow profile plot + */ + IsSnowProfilePlot: boolean; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-activity-obs-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-activity-obs-view-model.ts new file mode 100644 index 000000000..064380a39 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-activity-obs-view-model.ts @@ -0,0 +1,65 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheActivityObsViewModel { + /** + * Unik id på denne tabellen da flere er mulig pr RegID. + */ + AvalancheActivityObsID: number; + /** + * Hvilken side av fjellene har skredene gått? Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect: number; + /** + * Meter over havet på løsneområdet. + */ + HeigthStartZone: number; + /** + * Når gikk skredene? Her bruker vi feltet som en ca. tid og brukerene oppfordres til å anta best mulig. + */ + DtAvalancheTime: string; + /** + * Hvor store er skredene?. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number | null; + DestructiveSizeName?: string; + /** + * Hvor mange skred er gått? The EstimatedNumKD unique identifier + */ + EstimatedNumTID?: number | null; + EstimatedNumName?: string; + /** + * Typen skred som er gått. The AvalancheKD unique identifier + */ + AvalancheTID?: number | null; + AvalancheName?: string; + /** + * Hva utløste skredet? Det er ofte beskrevet som det svake laget i snødekket. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number | null; + AvalancheTriggerName?: string; + /** + * Hva slags terrengtype var det i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number | null; + TerrainStartZoneName?: string; + /** + * Hvor går snøgrensa i området? + */ + SnowLine?: number | null; + SnowLineName?: string; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + DtOffAvalancheTime: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-edit-model.ts b/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-edit-model.ts new file mode 100644 index 000000000..01fb73023 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-edit-model.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheActivityObs2EditModel { + EstimatedNumTID?: number | null; + DtStart?: string | null; + DtEnd?: string | null; + ValidExposition?: string | null; + ExposedHeight1?: number | null; + ExposedHeight2?: number | null; + ExposedHeightComboTID?: number | null; + AvalancheExtTID?: number | null; + AvalCauseTID?: number | null; + AvalTriggerSimpleTID?: number | null; + DestructiveSizeTID?: number | null; + AvalPropagationTID?: number | null; + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-view-model.ts new file mode 100644 index 000000000..41c0d1f04 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-activity-obs2-view-model.ts @@ -0,0 +1,34 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheActivityObs2ViewModel { + EstimatedNumTID?: number | null; + DtStart?: string | null; + DtEnd?: string | null; + ValidExposition?: string | null; + ExposedHeight1?: number | null; + ExposedHeight2?: number | null; + ExposedHeightComboTID?: number | null; + AvalancheExtTID?: number | null; + AvalCauseTID?: number | null; + AvalTriggerSimpleTID?: number | null; + DestructiveSizeTID?: number | null; + AvalPropagationTID?: number | null; + Comment?: string | null; + EstimatedNumName?: string; + ExposedHeightComboName?: string; + AvalancheExtName?: string; + AvalCauseName?: string; + AvalTriggerSimpleName?: string; + DestructiveSizeName?: string; + AvalPropagationName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-danger-obs-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-danger-obs-view-model.ts new file mode 100644 index 000000000..e00647aa2 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-danger-obs-view-model.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheDangerObsViewModel { + AvalancheDangerObsID: number; + DangerSignTID?: number | null; + DangerSignName?: string; + Comment?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-eval-problem-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-eval-problem-view-model.ts new file mode 100644 index 000000000..6f8ceba0c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-eval-problem-view-model.ts @@ -0,0 +1,32 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvalProblemViewModel { + AvalancheEvalProblemID: number; + AvalProbabilityTID?: number | null; + AvalProbabilityName?: string; + AvalTriggerSimpleTID?: number | null; + AvalTriggerSimpleName?: string; + DestructiveSizeExtTID?: number | null; + DestructiveSizeExtName?: string; + AvalancheExtTID?: number | null; + AvalancheExtName?: string; + AvalCauseTID?: number | null; + AvalCauseName?: string; + AvalCauseExtTID?: number | null; + AvalCauseExtName?: string; + AvalReleaseHeightTID?: number | null; + AvalReleaseHeightName?: string; + AvalancheProbabilityAutoText?: string; + AvalancheProblemAutoText?: string; + Comment?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-edit-model.ts b/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-edit-model.ts new file mode 100644 index 000000000..c2723a458 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-edit-model.ts @@ -0,0 +1,66 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvalProblem2EditModel { + /** + * Sannsynlighet for skred. The AvalProbabilityKD unique identifier + */ + AvalProbabilityTID?: number | null; + /** + * + */ + AvalPropagationTID?: number | null; + /** + * The AvalTriggerSimpleKD unique identifier + */ + AvalTriggerSimpleTID?: number | null; + /** + * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier + */ + AvalCauseDepthTID?: number | null; + /** + * Velg utsatte retninger + */ + ValidExposition?: string | null; + /** + * Øverste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight1?: number | null; + /** + * Nederste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight2?: number | null; + /** + * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier + */ + ExposedHeightComboTID?: number | null; + /** + * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier + */ + AvalancheExtTID?: number | null; + /** + * Kommentar til skredproblemet + */ + Comment?: string | null; + /** + * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier + */ + AvalCauseTID?: number | null; + AvalCauseAttributeLightTID: number; + AvalCauseAttributeThinTID: number; + AvalCauseAttributeSoftTID: number; + AvalCauseAttributeCrystalTID: number; + /** + * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-view-model.ts new file mode 100644 index 000000000..30df522b6 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-eval-problem2-view-model.ts @@ -0,0 +1,78 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvalProblem2ViewModel { + /** + * Sannsynlighet for skred. The AvalProbabilityKD unique identifier + */ + AvalProbabilityTID?: number | null; + /** + * + */ + AvalPropagationTID?: number | null; + /** + * The AvalTriggerSimpleKD unique identifier + */ + AvalTriggerSimpleTID?: number | null; + /** + * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier + */ + AvalCauseDepthTID?: number | null; + /** + * Velg utsatte retninger + */ + ValidExposition?: string | null; + /** + * Øverste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight1?: number | null; + /** + * Nederste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight2?: number | null; + /** + * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier + */ + ExposedHeightComboTID?: number | null; + /** + * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier + */ + AvalancheExtTID?: number | null; + /** + * Kommentar til skredproblemet + */ + Comment?: string | null; + /** + * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier + */ + AvalCauseTID?: number | null; + AvalCauseAttributeLightTID: number; + AvalCauseAttributeThinTID: number; + AvalCauseAttributeSoftTID: number; + AvalCauseAttributeCrystalTID: number; + /** + * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number | null; + AvalProbabilityName?: string; + AvalTriggerSimpleName?: string; + AvalCauseDepthName?: string; + ExposedHeightComboName?: string; + AvalancheExtName?: string; + AvalCauseName?: string; + DestructiveSizeName?: string; + AvalPropagationName?: string; + AvalCauseAttributeLightName?: string; + AvalCauseAttributeThinName?: string; + AvalCauseAttributeSoftName?: string; + AvalCauseAttributeCrystalName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-evaluation-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-evaluation-view-model.ts new file mode 100644 index 000000000..f39f63269 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-evaluation-view-model.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvaluationViewModel { + RegID: number; + CanPublish: boolean; + AvalancheDangerTID: number; + AvalancheDangerName?: string; + ValidExposition?: string; + ValidHeightRelative?: string; + ValidHeightFrom?: number | null; + ValidHeigtTo?: number | null; + AvalancheProblemTID1?: number | null; + AvalancheProblemName1?: string; + AvalancheProblemTID2?: number | null; + AvalancheProblemName2?: string; + AvalancheProblemTID3?: number | null; + AvalancheProblemName3?: string; + AvalancheEvaluation1?: string; + Comment?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-evaluation2-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-evaluation2-view-model.ts new file mode 100644 index 000000000..8ae862aa4 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-evaluation2-view-model.ts @@ -0,0 +1,28 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; + + +export interface AvalancheEvaluation2ViewModel { + AvalancheDangerName?: string; + ValidExposition?: string; + Comment?: string; + AvalancheEvaluation?: string; + AvalancheDevelopment?: string; + ExposedHeight1?: number | null; + ExposedHeight2?: number | null; + ExposedHeightComboTID?: number | null; + ExposedHeightComboName?: string; + ExposedClimateTID?: number | null; + ExposedClimateName?: string; + AvalancheDangerTID?: number | null; + AvalancheEvalProblems?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-evaluation3-edit-model.ts b/src/app/modules/common-regobs-api/model/avalanche-evaluation3-edit-model.ts new file mode 100644 index 000000000..3e8e77c2a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-evaluation3-edit-model.ts @@ -0,0 +1,34 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvaluation3EditModel { + /** + * Faregrad. The AvalancheDangerKD unique identifier + */ + AvalancheDangerTID?: number | null; + /** + * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen + */ + AvalancheEvaluation?: string | null; + /** + * Her blir forventet utvikling skrevet inn. + */ + AvalancheDevelopment?: string | null; + /** + * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier + */ + ForecastCorrectTID?: number | null; + /** + * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. + */ + ForecastComment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-evaluation3-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-evaluation3-view-model.ts new file mode 100644 index 000000000..7ca3a870e --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-evaluation3-view-model.ts @@ -0,0 +1,36 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheEvaluation3ViewModel { + /** + * Faregrad. The AvalancheDangerKD unique identifier + */ + AvalancheDangerTID?: number | null; + /** + * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen + */ + AvalancheEvaluation?: string | null; + /** + * Her blir forventet utvikling skrevet inn. + */ + AvalancheDevelopment?: string | null; + /** + * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier + */ + ForecastCorrectTID?: number | null; + /** + * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. + */ + ForecastComment?: string | null; + AvalancheDangerName?: string; + ForecastCorrectName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-obs-edit-model.ts b/src/app/modules/common-regobs-api/model/avalanche-obs-edit-model.ts new file mode 100644 index 000000000..4220eee42 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-obs-edit-model.ts @@ -0,0 +1,110 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheObsEditModel { + /** + * Tid da skredet gikk. + */ + DtAvalancheTime: string; + /** + * Tidligste tidspunkt da skredet gikk. + */ + DtEarliestAvalancheTime?: string | null; + /** + * Eksposisjon + */ + Aspect?: number | null; + /** + * Høyde i løsneområde + */ + HeightStartZone?: number | null; + /** + * Høyde i stoppområdet + */ + HeightStopZone?: number | null; + /** + * Størrelse. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number | null; + /** + * Skredutløser. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number | null; + /** + * Skredtype. The AvalancheKD unique identifier + */ + AvalancheTID?: number | null; + /** + * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number | null; + /** + * SnowLine + */ + SnowLine?: number | null; + /** + * ValidExposition + */ + ValidExposition?: string | null; + /** + * Skredutløser. The AvalCauseTID unique identifier + */ + AvalCauseTID?: number | null; + /** + * Bruddhøyde + */ + FractureHeight?: number | null; + /** + * Bruddbredde + */ + FractureWidth?: number | null; + /** + * Skredbanenavn + */ + Trajectory?: string | null; + /** + * StartLat + */ + StartLat?: number | null; + /** + * StartLong + */ + StartLong?: number | null; + /** + * StopLat + */ + StopLat?: number | null; + /** + * StopLong + */ + StopLong?: number | null; + /** + * Ble skredet fjernutløst? + */ + RemotelyTriggered?: boolean | null; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array> | null; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array> | null; + /** + * Hull of avalanche runout zone, List (lon, lat) + */ + StopExtent?: Array> | null; + /** + * Comment + */ + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/avalanche-obs-view-model.ts b/src/app/modules/common-regobs-api/model/avalanche-obs-view-model.ts new file mode 100644 index 000000000..87d2536dd --- /dev/null +++ b/src/app/modules/common-regobs-api/model/avalanche-obs-view-model.ts @@ -0,0 +1,115 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AvalancheObsViewModel { + /** + * Tid da skredet gikk. + */ + DtAvalancheTime: string; + /** + * Tidligste tidspunkt da skredet gikk. + */ + DtEarliestAvalancheTime?: string | null; + /** + * Eksposisjon + */ + Aspect?: number | null; + /** + * Høyde i løsneområde + */ + HeightStartZone?: number | null; + /** + * Høyde i stoppområdet + */ + HeightStopZone?: number | null; + /** + * Størrelse. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number | null; + /** + * Skredutløser. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number | null; + /** + * Skredtype. The AvalancheKD unique identifier + */ + AvalancheTID?: number | null; + /** + * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number | null; + /** + * SnowLine + */ + SnowLine?: number | null; + /** + * ValidExposition + */ + ValidExposition?: string | null; + /** + * Skredutløser. The AvalCauseTID unique identifier + */ + AvalCauseTID?: number | null; + /** + * Bruddhøyde + */ + FractureHeight?: number | null; + /** + * Bruddbredde + */ + FractureWidth?: number | null; + /** + * Skredbanenavn + */ + Trajectory?: string | null; + /** + * StartLat + */ + StartLat?: number | null; + /** + * StartLong + */ + StartLong?: number | null; + /** + * StopLat + */ + StopLat?: number | null; + /** + * StopLong + */ + StopLong?: number | null; + /** + * Ble skredet fjernutløst? + */ + RemotelyTriggered?: boolean | null; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array> | null; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array> | null; + /** + * Hull of avalanche runout zone, List (lon, lat) + */ + StopExtent?: Array> | null; + /** + * Comment + */ + Comment?: string | null; + DestructiveSizeName?: string; + AvalancheTriggerName?: string; + AvalancheName?: string; + TerrainStartZoneName?: string; + AvalCauseName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/compression-test-edit-model.ts b/src/app/modules/common-regobs-api/model/compression-test-edit-model.ts new file mode 100644 index 000000000..70b544336 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/compression-test-edit-model.ts @@ -0,0 +1,59 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CompressionTestEditModel { + /** + * The CompressionTestKDV unique identifier + */ + CompressionTestTID?: number | null; + /** + * TapsFracture + */ + TapsFracture?: number | null; + /** + * TapsFullPropagation + */ + TapsFullPropagation?: number | null; + /** + * The PropagationKD unique identifier + */ + PropagationTID?: number | null; + /** + * FractureDepth + */ + FractureDepth?: number | null; + /** + * PST X distance (in meters) + */ + PstX?: number | null; + /** + * PST Y distance (in meters) + */ + PstY?: number | null; + /** + * The StabilityEvalKD unique identifier + */ + StabilityEvalTID?: number | null; + /** + * The ComprTestFractureKD unique identifier + */ + ComprTestFractureTID?: number | null; + /** + * Percentage of block that released in Rutchblock test + */ + RbRelease?: number | null; + /** + * Comment + */ + Comment?: string | null; + IncludeInSnowProfile?: boolean | null; +} + diff --git a/src/app/modules/common-regobs-api/model/compression-test-view-model.ts b/src/app/modules/common-regobs-api/model/compression-test-view-model.ts new file mode 100644 index 000000000..62b79189e --- /dev/null +++ b/src/app/modules/common-regobs-api/model/compression-test-view-model.ts @@ -0,0 +1,63 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CompressionTestViewModel { + /** + * The CompressionTestKDV unique identifier + */ + CompressionTestTID?: number | null; + /** + * TapsFracture + */ + TapsFracture?: number | null; + /** + * TapsFullPropagation + */ + TapsFullPropagation?: number | null; + /** + * The PropagationKD unique identifier + */ + PropagationTID?: number | null; + /** + * FractureDepth + */ + FractureDepth?: number | null; + /** + * PST X distance (in meters) + */ + PstX?: number | null; + /** + * PST Y distance (in meters) + */ + PstY?: number | null; + /** + * The StabilityEvalKD unique identifier + */ + StabilityEvalTID?: number | null; + /** + * The ComprTestFractureKD unique identifier + */ + ComprTestFractureTID?: number | null; + /** + * Percentage of block that released in Rutchblock test + */ + RbRelease?: number | null; + /** + * Comment + */ + Comment?: string | null; + IncludeInSnowProfile?: boolean | null; + CompressionTestName?: string; + PropagationName?: string; + StabilityEvalName?: string; + ComprTestFractureName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/county-dto.ts b/src/app/modules/common-regobs-api/model/county-dto.ts new file mode 100644 index 000000000..de56c8fd2 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/county-dto.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CountyDto { + CountyNo?: string; + Name?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/create-trip-dto.ts b/src/app/modules/common-regobs-api/model/create-trip-dto.ts new file mode 100644 index 000000000..d953ce970 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/create-trip-dto.ts @@ -0,0 +1,21 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CreateTripDto { + Comment?: string; + DeviceGuid: string; + GeoHazardID: number; + Lat?: string; + Lng?: string; + ObservationExpectedMinutes: number; + TripTypeID: number; +} + diff --git a/src/app/modules/common-regobs-api/model/damage-obs-edit-model.ts b/src/app/modules/common-regobs-api/model/damage-obs-edit-model.ts new file mode 100644 index 000000000..0614028e0 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/damage-obs-edit-model.ts @@ -0,0 +1,21 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { LatLng } from './lat-lng'; +import { AttachmentEditModel } from './attachment-edit-model'; + + +export interface DamageObsEditModel { + GeoHazardTID?: number | null; + DamageTypeTID: number; + DamagePosition?: LatLng | null; + Comment?: string | null; + Attachments?: Array | null; +} + diff --git a/src/app/modules/common-regobs-api/model/damage-obs-view-model.ts b/src/app/modules/common-regobs-api/model/damage-obs-view-model.ts new file mode 100644 index 000000000..659ed8fde --- /dev/null +++ b/src/app/modules/common-regobs-api/model/damage-obs-view-model.ts @@ -0,0 +1,23 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AttachmentViewModel } from './attachment-view-model'; +import { LatLng } from './lat-lng'; + + +export interface DamageObsViewModel { + GeoHazardTID?: number | null; + DamageTypeTID: number; + DamagePosition?: LatLng | null; + Comment?: string | null; + Attachments?: Array; + GeoHazardName?: string; + DamageTypeName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/danger-obs-edit-model.ts b/src/app/modules/common-regobs-api/model/danger-obs-edit-model.ts new file mode 100644 index 000000000..6f47d1f20 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/danger-obs-edit-model.ts @@ -0,0 +1,26 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DangerObsEditModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier + */ + DangerSignTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om faretegnet. + */ + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/danger-obs-view-model.ts b/src/app/modules/common-regobs-api/model/danger-obs-view-model.ts new file mode 100644 index 000000000..46fc4417b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/danger-obs-view-model.ts @@ -0,0 +1,28 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface DangerObsViewModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier + */ + DangerSignTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om faretegnet. + */ + Comment?: string | null; + GeoHazardName?: string; + DangerSignName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/finish-trip-dto.ts b/src/app/modules/common-regobs-api/model/finish-trip-dto.ts new file mode 100644 index 000000000..c649a52e1 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/finish-trip-dto.ts @@ -0,0 +1,15 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FinishTripDto { + DeviceGuid: string; +} + diff --git a/src/app/modules/common-regobs-api/model/forecast-region-dto.ts b/src/app/modules/common-regobs-api/model/forecast-region-dto.ts new file mode 100644 index 000000000..f00c2b91b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/forecast-region-dto.ts @@ -0,0 +1,20 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ForecastRegionSubRegionDto } from './forecast-region-sub-region-dto'; + + +export interface ForecastRegionDto { + Id: number; + Text?: string; + SortOrder: number; + SubRegions?: Array; + IsRegionForGrouping: boolean; +} + diff --git a/src/app/modules/common-regobs-api/model/forecast-region-sub-region-dto.ts b/src/app/modules/common-regobs-api/model/forecast-region-sub-region-dto.ts new file mode 100644 index 000000000..4e60ad44b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/forecast-region-sub-region-dto.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ForecastRegionSubRegionDto { + Id: number; + Text?: string; + RegionType?: string; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/general-observation-edit-model.ts b/src/app/modules/common-regobs-api/model/general-observation-edit-model.ts new file mode 100644 index 000000000..bbba70365 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/general-observation-edit-model.ts @@ -0,0 +1,32 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlEditModel } from './url-edit-model'; + + +export interface GeneralObservationEditModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number | null; + /** + * Selve registreringen. + */ + ObsComment?: string | null; + /** + * Overskriften (hovedpoenget). + */ + ObsHeader?: string | null; + /** + * Kommentarfelt for å skrive utfyllende tekst + */ + Comment?: string | null; + Urls?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/general-observation-view-model.ts b/src/app/modules/common-regobs-api/model/general-observation-view-model.ts new file mode 100644 index 000000000..bd02e000d --- /dev/null +++ b/src/app/modules/common-regobs-api/model/general-observation-view-model.ts @@ -0,0 +1,33 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlViewModel } from './url-view-model'; + + +export interface GeneralObservationViewModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number | null; + /** + * Selve registreringen. + */ + ObsComment?: string | null; + /** + * Overskriften (hovedpoenget). + */ + ObsHeader?: string | null; + /** + * Kommentarfelt for å skrive utfyllende tekst + */ + Comment?: string | null; + Urls?: Array; + GeoHazardName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/geo-hazard-types.ts b/src/app/modules/common-regobs-api/model/geo-hazard-types.ts new file mode 100644 index 000000000..dfe730342 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/geo-hazard-types.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * NotSpecified = 0, Avalanche = 10, EarthFlow = 20, LandSlide = 30, RockFall = 40, IceFall = 50, Flooding = 60, Ice = 70, EventOnGlacier = 100, Jøkulhaup = 110, Drought = 200, Unknown = 999 + */ +export const GeoHazardTypes = { + NUMBER_0: 0, + NUMBER_10: 10, + NUMBER_20: 20, + NUMBER_30: 30, + NUMBER_40: 40, + NUMBER_50: 50, + NUMBER_60: 60, + NUMBER_70: 70, + NUMBER_100: 100, + NUMBER_110: 110, + NUMBER_200: 200, + NUMBER_999: 999 +} as const; +export type GeoHazardTypes = typeof GeoHazardTypes[keyof typeof GeoHazardTypes]; + diff --git a/src/app/modules/common-regobs-api/model/geo-location-info.ts b/src/app/modules/common-regobs-api/model/geo-location-info.ts new file mode 100644 index 000000000..f2530e1ab --- /dev/null +++ b/src/app/modules/common-regobs-api/model/geo-location-info.ts @@ -0,0 +1,25 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface GeoLocationInfo { + Name?: string; + Municipality?: string; + MunicipalityId?: string; + AdminAreaName?: string; + AdminAreaId?: string; + Country?: string; + CountryCode?: string; + Masl?: number | null; + Steepness?: number | null; + WarningRegionId?: string; + WarningRegionName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/geo-location-summary.ts b/src/app/modules/common-regobs-api/model/geo-location-summary.ts new file mode 100644 index 000000000..d461990fb --- /dev/null +++ b/src/app/modules/common-regobs-api/model/geo-location-summary.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface GeoLocationSummary { + Header?: string; + Lines?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/helptext-dto.ts b/src/app/modules/common-regobs-api/model/helptext-dto.ts new file mode 100644 index 000000000..1a5fd4b09 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/helptext-dto.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HelptextDto { + RegistrationTID: number; + GeoHazardTID: number; + LangKey: number; + Text?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-cover-edit-model.ts b/src/app/modules/common-regobs-api/model/ice-cover-edit-model.ts new file mode 100644 index 000000000..4a5971756 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-cover-edit-model.ts @@ -0,0 +1,37 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlEditModel } from './url-edit-model'; + + +export interface IceCoverEditModel { + /** + * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier + */ + IceCoverBeforeTID?: number | null; + /** + * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier + */ + IceCoverTID?: number | null; + IceCoverAfterTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string | null; + /** + * Skøytebarhet. IceSkateabilityKD unique identifier + */ + IceSkateabilityTID?: number | null; + /** + * Bæreevne. IceCapacityKD unique identifier + */ + IceCapacityTID?: number | null; + Urls?: Array | null; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-cover-view-model.ts b/src/app/modules/common-regobs-api/model/ice-cover-view-model.ts new file mode 100644 index 000000000..a1361e564 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-cover-view-model.ts @@ -0,0 +1,42 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlViewModel } from './url-view-model'; + + +export interface IceCoverViewModel { + /** + * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier + */ + IceCoverBeforeTID?: number | null; + /** + * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier + */ + IceCoverTID?: number | null; + IceCoverAfterTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string | null; + /** + * Skøytebarhet. IceSkateabilityKD unique identifier + */ + IceSkateabilityTID?: number | null; + /** + * Bæreevne. IceCapacityKD unique identifier + */ + IceCapacityTID?: number | null; + Urls?: Array; + IceCoverBeforeName?: string; + IceCoverName?: string; + IceCoverAfterName?: string; + IceSkateabilityName?: string; + IceCapacityName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-thickness-edit-model.ts b/src/app/modules/common-regobs-api/model/ice-thickness-edit-model.ts new file mode 100644 index 000000000..b661fdee7 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-thickness-edit-model.ts @@ -0,0 +1,40 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { IceThicknessLayerEditModel } from './ice-thickness-layer-edit-model'; + + +export interface IceThicknessEditModel { + /** + * Mengden tørr snø oppå isen. Verdi i meter [m]. + */ + SnowDepth?: number | null; + /** + * Mengden sørpe oppå isen. Verdi i meter [m]. + */ + SlushSnow?: number | null; + /** + * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. + */ + IceThicknessSum?: number | null; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightBefore?: number | null; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightAfter?: number | null; + /** + * Comment + */ + Comment?: string | null; + IceThicknessLayers?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-thickness-layer-edit-model.ts b/src/app/modules/common-regobs-api/model/ice-thickness-layer-edit-model.ts new file mode 100644 index 000000000..fbe21d74f --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-thickness-layer-edit-model.ts @@ -0,0 +1,26 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface IceThicknessLayerEditModel { + /** + * The IceLayerKD unique identifier + */ + IceLayerTID?: number | null; + /** + * IceLayerThickness + */ + IceLayerThickness?: number | null; + /** + * Comment + */ + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-thickness-layer-view-model.ts b/src/app/modules/common-regobs-api/model/ice-thickness-layer-view-model.ts new file mode 100644 index 000000000..b73521429 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-thickness-layer-view-model.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface IceThicknessLayerViewModel { + /** + * The IceLayerKD unique identifier + */ + IceLayerTID?: number | null; + /** + * IceLayerThickness + */ + IceLayerThickness?: number | null; + /** + * Comment + */ + Comment?: string | null; + IceLayerName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/ice-thickness-view-model.ts b/src/app/modules/common-regobs-api/model/ice-thickness-view-model.ts new file mode 100644 index 000000000..54b94bc62 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/ice-thickness-view-model.ts @@ -0,0 +1,40 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { IceThicknessLayerViewModel } from './ice-thickness-layer-view-model'; + + +export interface IceThicknessViewModel { + /** + * Mengden tørr snø oppå isen. Verdi i meter [m]. + */ + SnowDepth?: number | null; + /** + * Mengden sørpe oppå isen. Verdi i meter [m]. + */ + SlushSnow?: number | null; + /** + * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. + */ + IceThicknessSum?: number | null; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightBefore?: number | null; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightAfter?: number | null; + /** + * Comment + */ + Comment?: string | null; + IceThicknessLayers?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/incident-edit-model.ts b/src/app/modules/common-regobs-api/model/incident-edit-model.ts new file mode 100644 index 000000000..d5ab9c64c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/incident-edit-model.ts @@ -0,0 +1,103 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlEditModel } from './url-edit-model'; + + +export interface IncidentEditModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number | null; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number | null; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number | null; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number | null; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristTID?: number | null; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeTID?: number | null; + /** + * Hvor mange var involvert? + */ + InvolvedNum?: number | null; + /** + * Hvor mange var i skredet/vannet? + */ + CasualtiesNum?: number | null; + /** + * Hvor mange vart skadd? + */ + HarmedNum?: number | null; + /** + * Hvor mange døde? + */ + DeadNum?: number | null; + /** + * Hvor mange evakuerte? + */ + EvacuatedNum?: number | null; + /** + * Er trafikk hindret? + */ + TrafficObstructed?: boolean | null; + /** + * Er det noen materielle skader? + */ + MaterialDamages?: boolean | null; + /** + * Var det noe sikkerhetsutstyr i bruk? + */ + SafetyGearTID?: number | null; + /** + * Hvem gjennomførte redningen? + */ + RescueTID?: number | null; + /** + * Hvilken turfase? + */ + SlopeActivityTID?: number | null; + /** + * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? + */ + DtEndTime?: string | null; + /** + * Hendelsen beskrives med overskrift .. + */ + IncidentHeader?: string | null; + /** + * .. med ingress eller sammendrag .. + */ + IncidentIngress?: string | null; + /** + * .. og teksten eller artikkelen. + */ + IncidentText?: string | null; + /** + * Comment. + */ + Comment?: string | null; + /** + * Provide description for IncidentURLs + */ + IncidentURLs?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/incident-view-model.ts b/src/app/modules/common-regobs-api/model/incident-view-model.ts new file mode 100644 index 000000000..ca3687113 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/incident-view-model.ts @@ -0,0 +1,127 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlViewModel } from './url-view-model'; + + +export interface IncidentViewModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number | null; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number | null; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number | null; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number | null; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristTID?: number | null; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeTID?: number | null; + /** + * Hvor mange var involvert? + */ + InvolvedNum?: number | null; + /** + * Hvor mange var i skredet/vannet? + */ + CasualtiesNum?: number | null; + /** + * Hvor mange vart skadd? + */ + HarmedNum?: number | null; + /** + * Hvor mange døde? + */ + DeadNum?: number | null; + /** + * Hvor mange evakuerte? + */ + EvacuatedNum?: number | null; + /** + * Er trafikk hindret? + */ + TrafficObstructed?: boolean | null; + /** + * Er det noen materielle skader? + */ + MaterialDamages?: boolean | null; + /** + * Var det noe sikkerhetsutstyr i bruk? + */ + SafetyGearTID?: number | null; + /** + * Hvem gjennomførte redningen? + */ + RescueTID?: number | null; + /** + * Hvilken turfase? + */ + SlopeActivityTID?: number | null; + /** + * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? + */ + DtEndTime?: string | null; + /** + * Hendelsen beskrives med overskrift .. + */ + IncidentHeader?: string | null; + /** + * .. med ingress eller sammendrag .. + */ + IncidentIngress?: string | null; + /** + * .. og teksten eller artikkelen. + */ + IncidentText?: string | null; + /** + * Comment. + */ + Comment?: string | null; + /** + * Provide description for IncidentURLs + */ + IncidentURLs?: Array; + GeoHazardName?: string; + ActivityInfluencedName?: string; + DamageExtentName?: string; + ForecastAccurateName?: string; + /** + * Hadde man sikkerhetsutstyr? + */ + SafetyGearName?: string; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristName?: string; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeName?: string; + /** + * Hvem gjennomførte redningen? + */ + RescueName?: string; + /** + * Hvilken turfase gjelder det? + */ + SlopeActivityName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/kdv-element.ts b/src/app/modules/common-regobs-api/model/kdv-element.ts new file mode 100644 index 000000000..eb8a1e926 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/kdv-element.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface KdvElement { + Id: number; + Name?: string; + Description?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/kdv-elements-response-dto.ts b/src/app/modules/common-regobs-api/model/kdv-elements-response-dto.ts new file mode 100644 index 000000000..8e8530157 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/kdv-elements-response-dto.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { KdvElement } from './kdv-element'; + + +export interface KdvElementsResponseDto { + KdvRepositories?: { [key: string]: Array; }; + ViewRepositories?: any | null; +} + diff --git a/src/app/modules/common-regobs-api/model/landslide-edit-model.ts b/src/app/modules/common-regobs-api/model/landslide-edit-model.ts new file mode 100644 index 000000000..9f98346e5 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/landslide-edit-model.ts @@ -0,0 +1,81 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlEditModel } from './url-edit-model'; + + +export interface LandslideEditModel { + /** + * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier + */ + LandSlideTID?: number | null; + /** + * Hva utløste skredet? The LandSlideTriggerKD unique identifier + */ + LandSlideTriggerTID?: number | null; + /** + * Hvor stort er skredet? The LandSlideSizeKD unique identifier + */ + LandSlideSizeTID?: number | null; + Comment?: string | null; + /** + * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number | null; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number | null; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number | null; + /** + * Latitude start posisjon + */ + StartLat?: number | null; + /** + * Long start posisjon + */ + StartLong?: number | null; + /** + * Latitude stopp posisjon + */ + StopLat?: number | null; + /** + * Long stopp posisjon + */ + StopLong?: number | null; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array> | null; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array> | null; + /** + * Hull of avalanche runout zone, List(lon, lat) + */ + StopExtent?: Array> | null; + /** + * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. + */ + DtLandSlideTime: string; + /** + * Når stoppet skredet? + */ + DtLandSlideTimeEnd?: string | null; + Urls?: Array | null; +} + diff --git a/src/app/modules/common-regobs-api/model/landslide-view-model.ts b/src/app/modules/common-regobs-api/model/landslide-view-model.ts new file mode 100644 index 000000000..68000477d --- /dev/null +++ b/src/app/modules/common-regobs-api/model/landslide-view-model.ts @@ -0,0 +1,88 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { UrlViewModel } from './url-view-model'; + + +export interface LandslideViewModel { + /** + * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier + */ + LandSlideTID?: number | null; + /** + * Hva utløste skredet? The LandSlideTriggerKD unique identifier + */ + LandSlideTriggerTID?: number | null; + /** + * Hvor stort er skredet? The LandSlideSizeKD unique identifier + */ + LandSlideSizeTID?: number | null; + Comment?: string | null; + /** + * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier + */ + GeoHazardTID?: number | null; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number | null; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number | null; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number | null; + /** + * Latitude start posisjon + */ + StartLat?: number | null; + /** + * Long start posisjon + */ + StartLong?: number | null; + /** + * Latitude stopp posisjon + */ + StopLat?: number | null; + /** + * Long stopp posisjon + */ + StopLong?: number | null; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array> | null; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array> | null; + /** + * Hull of avalanche runout zone, List(lon, lat) + */ + StopExtent?: Array> | null; + /** + * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. + */ + DtLandSlideTime: string; + /** + * Når stoppet skredet? + */ + DtLandSlideTimeEnd?: string | null; + Urls?: Array; + LandSlideName?: string; + LandSlideTriggerName?: string; + LandSlideSizeName?: string; + GeoHazardName?: string; + ActivityInfluencedName?: string; + ForecastAccurateName?: string; + DamageExtentName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/lang-key.ts b/src/app/modules/common-regobs-api/model/lang-key.ts new file mode 100644 index 000000000..cd1feabef --- /dev/null +++ b/src/app/modules/common-regobs-api/model/lang-key.ts @@ -0,0 +1,24 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const LangKey = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, + NUMBER_5: 5, + NUMBER_6: 6, + NUMBER_7: 7, + NUMBER_8: 8, + NUMBER_9: 9 +} as const; +export type LangKey = typeof LangKey[keyof typeof LangKey]; + diff --git a/src/app/modules/common-regobs-api/model/lat-lng-object.ts b/src/app/modules/common-regobs-api/model/lat-lng-object.ts new file mode 100644 index 000000000..c450de877 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/lat-lng-object.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface LatLngObject { + Latitude: number; + Longitude: number; +} + diff --git a/src/app/modules/common-regobs-api/model/lat-lng.ts b/src/app/modules/common-regobs-api/model/lat-lng.ts new file mode 100644 index 000000000..9975cfe2d --- /dev/null +++ b/src/app/modules/common-regobs-api/model/lat-lng.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface LatLng { + Latitude: number; + Longitude: number; +} + diff --git a/src/app/modules/common-regobs-api/model/models.ts b/src/app/modules/common-regobs-api/model/models.ts new file mode 100644 index 000000000..efb5d72b3 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/models.ts @@ -0,0 +1,105 @@ +export * from './areas-dto'; +export * from './areas-dto-forecast-regions'; +export * from './at-a-glance-view-model'; +export * from './attachment-edit-model'; +export * from './attachment-view-model'; +export * from './attachment-view-model-url-formats'; +export * from './avalanche-activity-obs2-edit-model'; +export * from './avalanche-activity-obs2-view-model'; +export * from './avalanche-activity-obs-view-model'; +export * from './avalanche-danger-obs-view-model'; +export * from './avalanche-eval-problem2-edit-model'; +export * from './avalanche-eval-problem2-view-model'; +export * from './avalanche-eval-problem-view-model'; +export * from './avalanche-evaluation2-view-model'; +export * from './avalanche-evaluation3-edit-model'; +export * from './avalanche-evaluation3-view-model'; +export * from './avalanche-evaluation-view-model'; +export * from './avalanche-obs-edit-model'; +export * from './avalanche-obs-view-model'; +export * from './compression-test-edit-model'; +export * from './compression-test-view-model'; +export * from './county-dto'; +export * from './create-trip-dto'; +export * from './damage-obs-edit-model'; +export * from './damage-obs-view-model'; +export * from './danger-obs-edit-model'; +export * from './danger-obs-view-model'; +export * from './finish-trip-dto'; +export * from './forecast-region-dto'; +export * from './forecast-region-sub-region-dto'; +export * from './general-observation-edit-model'; +export * from './general-observation-view-model'; +export * from './geo-hazard-types'; +export * from './geo-location-info'; +export * from './geo-location-summary'; +export * from './helptext-dto'; +export * from './ice-cover-edit-model'; +export * from './ice-cover-view-model'; +export * from './ice-thickness-edit-model'; +export * from './ice-thickness-layer-edit-model'; +export * from './ice-thickness-layer-view-model'; +export * from './ice-thickness-view-model'; +export * from './incident-edit-model'; +export * from './incident-view-model'; +export * from './kdv-element'; +export * from './kdv-elements-response-dto'; +export * from './landslide-edit-model'; +export * from './landslide-view-model'; +export * from './lang-key'; +export * from './lat-lng'; +export * from './lat-lng-object'; +export * from './my-page-data'; +export * from './obs-location-edit-model'; +export * from './obs-location-view-model'; +export * from './obs-locations-response-dto-v2'; +export * from './observer-competence-dto'; +export * from './observer-competence-level-dto'; +export * from './observer-group-dto'; +export * from './observer-patch-request-dto'; +export * from './observer-response-dto'; +export * from './observer-view-model'; +export * from './operator'; +export * from './position-dto'; +export * from './problem-details'; +export * from './property-filter'; +export * from './reg-obs-generic-value'; +export * from './registration-edit-model'; +export * from './registration-type-criteria-dto'; +export * from './registration-type-dto'; +export * from './registration-type-sub-type-dto'; +export * from './registration-view-model'; +export * from './registrations-with-attachments'; +export * from './search-count-response-dto'; +export * from './search-criteria-excl-user-request-dto'; +export * from './search-criteria-request-dto'; +export * from './search-side-bar-dto'; +export * from './search-side-bar-dto-observer-competence-levels'; +export * from './search-side-bar-dto-registration-types'; +export * from './search-side-bar-request-dto'; +export * from './snow-cover-obs-view-model'; +export * from './snow-density-layer-model'; +export * from './snow-density-model'; +export * from './snow-profile-edit-model'; +export * from './snow-profile-view-model'; +export * from './snow-surface-edit-model'; +export * from './snow-surface-view-model'; +export * from './snow-temp-model'; +export * from './snow-temp-obs-model'; +export * from './strat-profile-edit-model'; +export * from './strat-profile-layer-edit-model'; +export * from './strat-profile-layer-view-model'; +export * from './strat-profile-view-model'; +export * from './summary'; +export * from './url-edit-model'; +export * from './url-view-model'; +export * from './value-kind'; +export * from './water-level-measurement-edit-model'; +export * from './water-level-measurement-view-model'; +export * from './water-level-view-model'; +export * from './waterlevel2-edit-model'; +export * from './waterlevel2-view-model'; +export * from './weather-edit-model'; +export * from './weather-view-model'; +export * from './within-extent-criteria-dto'; +export * from './within-radius-criteria-dto'; diff --git a/src/app/modules/common-regobs-api/model/my-page-data.ts b/src/app/modules/common-regobs-api/model/my-page-data.ts new file mode 100644 index 000000000..c0626231b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/my-page-data.ts @@ -0,0 +1,37 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ObserverGroupDto } from './observer-group-dto'; +import { ObserverCompetenceDto } from './observer-competence-dto'; + + +export interface MyPageData { + Guid: string; + /** + * Returns unique id that identifies an observer + */ + ObserverId: number; + NickName?: string; + Email?: string; + MobPhoneNr?: string; + FirstName?: string; + LastName?: string; + WorkPlace?: string; + Adrnr?: number | null; + DtRegTime?: string | null; + MemberOfGroups?: Array; + PendingInvitationsToGroups?: Array; + Competence?: Array; + NumberOfObservations: number; + MainGeohazardTID: number; + LastRegistrationDate?: string | null; + DefaultMunicipality?: string; + Roles?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/obs-location-edit-model.ts b/src/app/modules/common-regobs-api/model/obs-location-edit-model.ts new file mode 100644 index 000000000..2e1d20669 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/obs-location-edit-model.ts @@ -0,0 +1,42 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObsLocationEditModel { + /** + * ObsLocationID + */ + ObsLocationID?: number | null; + /** + * Navn på stedet + */ + LocationName?: string | null; + /** + * Beskriver stedet. + */ + LocationDescription?: string | null; + /** + * Latitude + */ + Latitude: number; + /** + * Longitude + */ + Longitude: number; + /** + * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD + */ + UTMSourceTID?: number | null; + /** + * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. + */ + Uncertainty?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/obs-location-view-model.ts b/src/app/modules/common-regobs-api/model/obs-location-view-model.ts new file mode 100644 index 000000000..c20c0f773 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/obs-location-view-model.ts @@ -0,0 +1,57 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObsLocationViewModel { + ObsLocationID: number; + /** + * Navn på stedet + */ + LocationName?: string | null; + /** + * Beskriver stedet. + */ + LocationDescription?: string | null; + /** + * Latitude + */ + Latitude: number; + /** + * Longitude + */ + Longitude: number; + /** + * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD + */ + UTMSourceTID: number; + UTMSourceName?: string; + /** + * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. + */ + Uncertainty?: number | null; + /** + * Anngir varslingsregion stedet tilhører. Varslingsregioner gitt i ForecastRegionKD. The ForecastRegionKD unique identifier + */ + ForecastRegionTID?: number | null; + ForecastRegionName?: string; + Height?: number | null; + MunicipalName?: string; + /** + * Kommune nr stedet tilhører + */ + MunicipalNo?: string; + CountryId?: number | null; + CountryName?: string; + /** + * Read-only generert tittel + */ + Title?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/obs-locations-response-dto-v2.ts b/src/app/modules/common-regobs-api/model/obs-locations-response-dto-v2.ts new file mode 100644 index 000000000..bbe40a497 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/obs-locations-response-dto-v2.ts @@ -0,0 +1,24 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { LatLngObject } from './lat-lng-object'; + + +export interface ObsLocationsResponseDtoV2 { + Name?: string; + Id: number; + Distance: number; + LatLngObject?: LatLngObject; + ObserverNickName?: string; + ObserverGroupName?: string; + ObserverGroupId?: number | null; + LocationDescription?: string; + GeoHazardId?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-competence-dto.ts b/src/app/modules/common-regobs-api/model/observer-competence-dto.ts new file mode 100644 index 000000000..8003ffff7 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-competence-dto.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObserverCompetenceDto { + CompetenceTID: number; + GeohazardTID: number; + CompetenceName?: string; + CompetenceDescription?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-competence-level-dto.ts b/src/app/modules/common-regobs-api/model/observer-competence-level-dto.ts new file mode 100644 index 000000000..21d8b1db0 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-competence-level-dto.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObserverCompetenceLevelDto { + Id: number; + Name: string; + Description?: string; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-group-dto.ts b/src/app/modules/common-regobs-api/model/observer-group-dto.ts new file mode 100644 index 000000000..46c9e0541 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-group-dto.ts @@ -0,0 +1,19 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObserverGroupDto { + Id: number; + Name?: string; + ObserverGroupDescription?: string; + WorkPlace?: string; + Comment?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-patch-request-dto.ts b/src/app/modules/common-regobs-api/model/observer-patch-request-dto.ts new file mode 100644 index 000000000..a94e81c9f --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-patch-request-dto.ts @@ -0,0 +1,15 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObserverPatchRequestDto { + Nick?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-response-dto.ts b/src/app/modules/common-regobs-api/model/observer-response-dto.ts new file mode 100644 index 000000000..b7cd1058b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-response-dto.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ObserverGroupDto } from './observer-group-dto'; + + +export interface ObserverResponseDto { + Guid: string; + ObserverGroup?: Array; + Nick?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/observer-view-model.ts b/src/app/modules/common-regobs-api/model/observer-view-model.ts new file mode 100644 index 000000000..725e1bc0a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/observer-view-model.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ObserverViewModel { + NickName?: string; + ObserverID: number; + CompetenceLevelTID: number; + CompetenceLevelName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/operator.ts b/src/app/modules/common-regobs-api/model/operator.ts new file mode 100644 index 000000000..a6eb5a8ee --- /dev/null +++ b/src/app/modules/common-regobs-api/model/operator.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const Operator = { + NUMBER_0: 0 +} as const; +export type Operator = typeof Operator[keyof typeof Operator]; + diff --git a/src/app/modules/common-regobs-api/model/position-dto.ts b/src/app/modules/common-regobs-api/model/position-dto.ts new file mode 100644 index 000000000..f34b28c8c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/position-dto.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface PositionDto { + Latitude: number; + Longitude: number; +} + diff --git a/src/app/modules/common-regobs-api/model/problem-details.ts b/src/app/modules/common-regobs-api/model/problem-details.ts new file mode 100644 index 000000000..7480ac6bf --- /dev/null +++ b/src/app/modules/common-regobs-api/model/problem-details.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ProblemDetails { + [key: string]: any | any; + + + type?: string | null; + title?: string | null; + status?: number | null; + detail?: string | null; + instance?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/property-filter.ts b/src/app/modules/common-regobs-api/model/property-filter.ts new file mode 100644 index 000000000..c2e322344 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/property-filter.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Operator } from './operator'; + + +/** + * Filter by property value + */ +export interface PropertyFilter { + /** + * Property name. Properties in sub schemas must be prefixed with schema name. Example: AvalancheObs.AvalancheTID Multiple instance schemas, like DangerSign, are not supported. If you use unknown/unsupported properties, you will get an HTTP 400. + */ + Name?: string; + Operator: Operator; + /** + * Target property value + */ + Value?: string; +} +export namespace PropertyFilter { +} + + diff --git a/src/app/modules/common-regobs-api/model/reg-obs-generic-value.ts b/src/app/modules/common-regobs-api/model/reg-obs-generic-value.ts new file mode 100644 index 000000000..be3ad2b34 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/reg-obs-generic-value.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ValueKind } from './value-kind'; + + +export interface RegObsGenericValue { + Kind: ValueKind; + readonly KindType?: string; + Header?: string; + Value?: any | null; +} +export namespace RegObsGenericValue { +} + + diff --git a/src/app/modules/common-regobs-api/model/registration-edit-model.ts b/src/app/modules/common-regobs-api/model/registration-edit-model.ts new file mode 100644 index 000000000..cfba6900a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registration-edit-model.ts @@ -0,0 +1,76 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Waterlevel2EditModel } from './waterlevel2-edit-model'; +import { DangerObsEditModel } from './danger-obs-edit-model'; +import { AvalancheEvalProblem2EditModel } from './avalanche-eval-problem2-edit-model'; +import { SnowProfileEditModel } from './snow-profile-edit-model'; +import { GeoHazardTypes } from './geo-hazard-types'; +import { LandslideEditModel } from './landslide-edit-model'; +import { AvalancheActivityObs2EditModel } from './avalanche-activity-obs2-edit-model'; +import { AttachmentEditModel } from './attachment-edit-model'; +import { DamageObsEditModel } from './damage-obs-edit-model'; +import { IceThicknessEditModel } from './ice-thickness-edit-model'; +import { IncidentEditModel } from './incident-edit-model'; +import { WeatherEditModel } from './weather-edit-model'; +import { SnowSurfaceEditModel } from './snow-surface-edit-model'; +import { ObsLocationEditModel } from './obs-location-edit-model'; +import { AvalancheObsEditModel } from './avalanche-obs-edit-model'; +import { CompressionTestEditModel } from './compression-test-edit-model'; +import { GeneralObservationEditModel } from './general-observation-edit-model'; +import { IceCoverEditModel } from './ice-cover-edit-model'; +import { AvalancheEvaluation3EditModel } from './avalanche-evaluation3-edit-model'; + + +export interface RegistrationEditModel { + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID: GeoHazardTypes; + /** + * Kildereferanse på en registrering. F.eks. har brukeren sette dette selv eller er det referert til fra nyheter. The SourceKD unique identifier + */ + SourceTID?: number | null; + /** + * Tiden da observasjonen ble gjort. + */ + DtObsTime: string; + DtChangeTime?: string | null; + ObserverGroupID?: number | null; + ObserverGroupName?: string | null; + /** + * If set to true, the user\'s account will not be shown publicly. NVE will still be able to see who sent in the observation. + */ + Anonymous?: boolean | null; + /** + * The observation location object. Latitude and longitute are needed to create a new registration. + */ + ObsLocation?: ObsLocationEditModel; + Attachments?: Array; + AvalancheActivityObs2?: Array; + AvalancheEvalProblem2?: Array; + AvalancheEvaluation3?: AvalancheEvaluation3EditModel | null; + AvalancheObs?: AvalancheObsEditModel | null; + CompressionTest?: Array; + DangerObs?: Array; + GeneralObservation?: GeneralObservationEditModel | null; + IceCoverObs?: IceCoverEditModel | null; + IceThickness?: IceThicknessEditModel | null; + Incident?: IncidentEditModel | null; + LandSlideObs?: LandslideEditModel | null; + SnowProfile2?: SnowProfileEditModel | null; + SnowSurfaceObservation?: SnowSurfaceEditModel | null; + WeatherObservation?: WeatherEditModel | null; + WaterLevel2?: Waterlevel2EditModel | null; + DamageObs?: Array; +} +export namespace RegistrationEditModel { +} + + diff --git a/src/app/modules/common-regobs-api/model/registration-type-criteria-dto.ts b/src/app/modules/common-regobs-api/model/registration-type-criteria-dto.ts new file mode 100644 index 000000000..b4d4de094 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registration-type-criteria-dto.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RegistrationTypeCriteriaDto { + Id: number; + SubTypes?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/registration-type-dto.ts b/src/app/modules/common-regobs-api/model/registration-type-dto.ts new file mode 100644 index 000000000..7336d443f --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registration-type-dto.ts @@ -0,0 +1,19 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RegistrationTypeSubTypeDto } from './registration-type-sub-type-dto'; + + +export interface RegistrationTypeDto { + Id: number; + Name?: string; + SubTypes?: Array; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/registration-type-sub-type-dto.ts b/src/app/modules/common-regobs-api/model/registration-type-sub-type-dto.ts new file mode 100644 index 000000000..0a486915a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registration-type-sub-type-dto.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RegistrationTypeSubTypeDto { + Id: number; + Name?: string; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/registration-view-model.ts b/src/app/modules/common-regobs-api/model/registration-view-model.ts new file mode 100644 index 000000000..7ffd46fc5 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registration-view-model.ts @@ -0,0 +1,89 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { IceThicknessViewModel } from './ice-thickness-view-model'; +import { SnowSurfaceViewModel } from './snow-surface-view-model'; +import { IncidentViewModel } from './incident-view-model'; +import { ObserverViewModel } from './observer-view-model'; +import { GeoHazardTypes } from './geo-hazard-types'; +import { WeatherViewModel } from './weather-view-model'; +import { DamageObsViewModel } from './damage-obs-view-model'; +import { LandslideViewModel } from './landslide-view-model'; +import { WaterLevelViewModel } from './water-level-view-model'; +import { SnowProfileViewModel } from './snow-profile-view-model'; +import { AvalancheObsViewModel } from './avalanche-obs-view-model'; +import { AvalancheActivityObsViewModel } from './avalanche-activity-obs-view-model'; +import { AvalancheDangerObsViewModel } from './avalanche-danger-obs-view-model'; +import { SnowCoverObsViewModel } from './snow-cover-obs-view-model'; +import { AvalancheEvaluation3ViewModel } from './avalanche-evaluation3-view-model'; +import { CompressionTestViewModel } from './compression-test-view-model'; +import { IceCoverViewModel } from './ice-cover-view-model'; +import { AvalancheEvaluationViewModel } from './avalanche-evaluation-view-model'; +import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; +import { ObsLocationViewModel } from './obs-location-view-model'; +import { AvalancheActivityObs2ViewModel } from './avalanche-activity-obs2-view-model'; +import { AttachmentViewModel } from './attachment-view-model'; +import { Waterlevel2ViewModel } from './waterlevel2-view-model'; +import { DangerObsViewModel } from './danger-obs-view-model'; +import { AvalancheEvaluation2ViewModel } from './avalanche-evaluation2-view-model'; +import { AvalancheEvalProblem2ViewModel } from './avalanche-eval-problem2-view-model'; +import { Summary } from './summary'; +import { GeneralObservationViewModel } from './general-observation-view-model'; + + +export interface RegistrationViewModel { + RegId: number; + /** + * NotSpecified = 0, Avalanche = 10, EarthFlow = 20, LandSlide = 30, RockFall = 40, IceFall = 50, Flooding = 60, Ice = 70, EventOnGlacier = 100, Jøkulhaup = 110, Drought = 200, Unknown = 999 + */ + GeoHazardTID: GeoHazardTypes; + SourceTID: number; + DtObsTime: string; + DtChangeTime?: string | null; + ObserverGroupID?: number | null; + ObserverGroupName?: string | null; + Anonymous?: boolean | null; + ExternalReferenceId?: string | null; + GeoHazardName?: string; + DtRegTime: string; + SourceName?: string; + Observer: ObserverViewModel; + ObsLocation: ObsLocationViewModel; + Attachments?: Array; + AvalancheActivityObs2?: Array | null; + AvalancheEvalProblem2?: Array | null; + AvalancheEvaluation3?: AvalancheEvaluation3ViewModel | null; + AvalancheObs?: AvalancheObsViewModel | null; + CompressionTest?: Array | null; + DangerObs?: Array | null; + GeneralObservation?: GeneralObservationViewModel | null; + IceCoverObs?: IceCoverViewModel | null; + IceThickness?: IceThicknessViewModel | null; + Incident?: IncidentViewModel | null; + LandSlideObs?: LandslideViewModel | null; + SnowProfile2?: SnowProfileViewModel | null; + SnowSurfaceObservation?: SnowSurfaceViewModel | null; + WeatherObservation?: WeatherViewModel | null; + WaterLevel2?: Waterlevel2ViewModel | null; + DamageObs?: Array | null; + Summaries?: Array; + AttachmentSummaries?: Array | null; + SnowProfile?: AttachmentViewModel | null; + AvalancheEvaluation?: AvalancheEvaluationViewModel | null; + AvalancheActivityObs?: Array | null; + AvalancheDangerObs?: Array | null; + AvalancheEvalProblem?: Array | null; + AvalancheEvaluation2?: AvalancheEvaluation2ViewModel | null; + SnowCoverObs?: SnowCoverObsViewModel | null; + WaterLevel?: WaterLevelViewModel | null; +} +export namespace RegistrationViewModel { +} + + diff --git a/src/app/modules/common-regobs-api/model/registrations-with-attachments.ts b/src/app/modules/common-regobs-api/model/registrations-with-attachments.ts new file mode 100644 index 000000000..5cac4f552 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/registrations-with-attachments.ts @@ -0,0 +1,23 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AttachmentViewModel } from './attachment-view-model'; + + +export interface RegistrationsWithAttachments { + /** + * Unique registration id that contains attachments + */ + RegId: number; + /** + * List of registration\'s attachments + */ + Attachments?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/search-count-response-dto.ts b/src/app/modules/common-regobs-api/model/search-count-response-dto.ts new file mode 100644 index 000000000..be85d52f3 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-count-response-dto.ts @@ -0,0 +1,15 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SearchCountResponseDto { + TotalMatches: number; +} + diff --git a/src/app/modules/common-regobs-api/model/search-criteria-excl-user-request-dto.ts b/src/app/modules/common-regobs-api/model/search-criteria-excl-user-request-dto.ts new file mode 100644 index 000000000..3d3dc064e --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-criteria-excl-user-request-dto.ts @@ -0,0 +1,87 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; +import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; +import { PropertyFilter } from './property-filter'; +import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; + + +/** + * Use this to filter out registrations. + */ +export interface SearchCriteriaExclUserRequestDto { + /** + * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} + */ + RegId?: number | null; + /** + * Language of result Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. Default = 1 + */ + LangKey?: number | null; + LocationId?: number | null; + /** + * Find registrations with obervation time after given date and time (inclusive) + */ + FromDtObsTime?: string | null; + /** + * Find registrations with obervation time before given date and time (inclusive) + */ + ToDtObsTime?: string | null; + /** + * Find registrations saved or changed after given date and time (inclusive) + */ + FromDtChangeTime?: string | null; + /** + * Find registrations saved or changed before given date and time (inclusive) + */ + ToDtChangeTime?: string | null; + /** + * Max number of registrations to return. Default = 100 + */ + NumberOfRecords?: number | null; + /** + * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk + */ + Offset?: number | null; + TimeZone?: string | null; + /** + * Find registrations of given types. Use /Search/SearchCriteria to find out which types are used for different geo hazards. + */ + SelectedRegistrationTypes?: Array; + /** + * Find registrations in given regions. Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. + */ + SelectedRegions?: Array; + /** + * Find registrations on given geo hazard ID\'s. Snow = 10, soil = 20, water = 60, ice = 70. + */ + SelectedGeoHazards?: Array; + Countries?: Array; + /** + * Find registrations in given county. Only relevant for Norway. Current valid county numbers are here (from 2024): https://no.wikipedia.org/wiki/Fylkesnummer + */ + Counties?: Array | null; + TextSearch?: string | null; + Radius?: WithinRadiusCriteriaDto | null; + Extent?: WithinExtentCriteriaDto | null; + /** + * Find registrations with given property value. [Obsolete(\"Experimental feature that may be changed or removed in later versions\")] + */ + PropertyFilters?: Array | null; + /** + * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work + */ + OrderBy?: string; + /** + * Descending order is default. Set this to true to use ascending order. + */ + AscendingOrder: boolean; +} + diff --git a/src/app/modules/common-regobs-api/model/search-criteria-request-dto.ts b/src/app/modules/common-regobs-api/model/search-criteria-request-dto.ts new file mode 100644 index 000000000..b637a5bb8 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-criteria-request-dto.ts @@ -0,0 +1,107 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; +import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; +import { PropertyFilter } from './property-filter'; +import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; + + +/** + * Use this to filter out registrations. + */ +export interface SearchCriteriaRequestDto { + /** + * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} + */ + RegId?: number | null; + /** + * Language of result Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. Default = 1 + */ + LangKey?: number | null; + LocationId?: number | null; + /** + * Find registrations with obervation time after given date and time (inclusive) + */ + FromDtObsTime?: string | null; + /** + * Find registrations with obervation time before given date and time (inclusive) + */ + ToDtObsTime?: string | null; + /** + * Find registrations saved or changed after given date and time (inclusive) + */ + FromDtChangeTime?: string | null; + /** + * Find registrations saved or changed before given date and time (inclusive) + */ + ToDtChangeTime?: string | null; + /** + * Max number of registrations to return. Default = 100 + */ + NumberOfRecords?: number | null; + /** + * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk + */ + Offset?: number | null; + TimeZone?: string | null; + /** + * Find registrations of given types. Use /Search/SearchCriteria to find out which types are used for different geo hazards. + */ + SelectedRegistrationTypes?: Array; + /** + * Find registrations in given regions. Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. + */ + SelectedRegions?: Array; + /** + * Find registrations on given geo hazard ID\'s. Snow = 10, soil = 20, water = 60, ice = 70. + */ + SelectedGeoHazards?: Array; + Countries?: Array; + /** + * Find registrations in given county. Only relevant for Norway. Current valid county numbers are here (from 2024): https://no.wikipedia.org/wiki/Fylkesnummer + */ + Counties?: Array | null; + TextSearch?: string | null; + Radius?: WithinRadiusCriteriaDto | null; + Extent?: WithinExtentCriteriaDto | null; + /** + * Find registrations with given property value. [Obsolete(\"Experimental feature that may be changed or removed in later versions\")] + */ + PropertyFilters?: Array | null; + /** + * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work + */ + OrderBy?: string; + /** + * Descending order is default. Set this to true to use ascending order. + */ + AscendingOrder: boolean; + /** + * Find registrations made by the observer with given ID + */ + ObserverId?: number | null; + /** + * Find registrations made by the observer with given GUID. This attribute is deprecated and will be removed in the future. + */ + ObserverGuid?: string | null; + /** + * Find registrations made by the observers in a specific group + */ + GroupId?: number | null; + /** + * Find registrations made by observers with specific competence level IDs Use /Search/SearchCriteria to find out which competence levels are used for different geo hazards. + */ + ObserverCompetence?: Array; + /** + * Find registrations made by the observer with given nick name + */ + ObserverNickName?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/search-side-bar-dto-observer-competence-levels.ts b/src/app/modules/common-regobs-api/model/search-side-bar-dto-observer-competence-levels.ts new file mode 100644 index 000000000..7faa8e113 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-side-bar-dto-observer-competence-levels.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ObserverCompetenceLevelDto } from './observer-competence-level-dto'; + + +export interface SearchSideBarDtoObserverCompetenceLevels { + NotSpecified?: Array; + Avalanche?: Array; + EarthFlow?: Array; + LandSlide?: Array; + RockFall?: Array; + IceFall?: Array; + Flooding?: Array; + Ice?: Array; + EventOnGlacier?: Array; + 'Jøkulhaup'?: Array; + Drought?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/search-side-bar-dto-registration-types.ts b/src/app/modules/common-regobs-api/model/search-side-bar-dto-registration-types.ts new file mode 100644 index 000000000..8ba15e503 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-side-bar-dto-registration-types.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RegistrationTypeDto } from './registration-type-dto'; + + +export interface SearchSideBarDtoRegistrationTypes { + NotSpecified?: Array; + Avalanche?: Array; + EarthFlow?: Array; + LandSlide?: Array; + RockFall?: Array; + IceFall?: Array; + Flooding?: Array; + Ice?: Array; + EventOnGlacier?: Array; + 'Jøkulhaup'?: Array; + Drought?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/search-side-bar-dto.ts b/src/app/modules/common-regobs-api/model/search-side-bar-dto.ts new file mode 100644 index 000000000..4524414f5 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-side-bar-dto.ts @@ -0,0 +1,20 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AreasDto } from './areas-dto'; +import { SearchSideBarDtoObserverCompetenceLevels } from './search-side-bar-dto-observer-competence-levels'; +import { SearchSideBarDtoRegistrationTypes } from './search-side-bar-dto-registration-types'; + + +export interface SearchSideBarDto { + RegistrationTypes?: SearchSideBarDtoRegistrationTypes; + ObserverCompetenceLevels?: SearchSideBarDtoObserverCompetenceLevels; + Areas?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/search-side-bar-request-dto.ts b/src/app/modules/common-regobs-api/model/search-side-bar-request-dto.ts new file mode 100644 index 000000000..62f2be5f8 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/search-side-bar-request-dto.ts @@ -0,0 +1,27 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { GeoHazardTypes } from './geo-hazard-types'; +import { LangKey } from './lang-key'; + + +export interface SearchSideBarRequestDto { + /** + * Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. + */ + GeoHazards?: Array; + /** + * NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6 Default = 2. + */ + LangKey: LangKey; +} +export namespace SearchSideBarRequestDto { +} + + diff --git a/src/app/modules/common-regobs-api/model/snow-cover-obs-view-model.ts b/src/app/modules/common-regobs-api/model/snow-cover-obs-view-model.ts new file mode 100644 index 000000000..624404442 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-cover-obs-view-model.ts @@ -0,0 +1,39 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SnowCoverObsViewModel { + /** + * DepthHoarThickness + */ + DepthHoarThickness?: number | null; + /** + * CriticalLayerExists + */ + CriticalLayerExists?: boolean | null; + /** + * CriticalLayerLocation + */ + CriticalLayerLocation?: number | null; + /** + * The CriticalLayerKD unique identifier + */ + CriticalLayerTID?: number | null; + /** + * SnowPilotRef + */ + SnowPilotRef?: string; + /** + * Comment. + */ + Comment?: string; + CriticalLayerName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-density-layer-model.ts b/src/app/modules/common-regobs-api/model/snow-density-layer-model.ts new file mode 100644 index 000000000..b5f75021c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-density-layer-model.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SnowDensityLayerModel { + Depth?: number | null; + /** + * thickness in m + */ + Thickness?: number | null; + /** + * Density in kg/m^3 + */ + Density?: number | null; + Comment?: string | null; + /** + * Weight in KG + */ + Weight: number; + WaterEquivalent: number; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-density-model.ts b/src/app/modules/common-regobs-api/model/snow-density-model.ts new file mode 100644 index 000000000..65e1a60b4 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-density-model.ts @@ -0,0 +1,19 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { SnowDensityLayerModel } from './snow-density-layer-model'; + + +export interface SnowDensityModel { + CylinderDiameter?: number | null; + TareWeight?: number | null; + Comment?: string | null; + Layers?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-profile-edit-model.ts b/src/app/modules/common-regobs-api/model/snow-profile-edit-model.ts new file mode 100644 index 000000000..8b36a3a03 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-profile-edit-model.ts @@ -0,0 +1,24 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { SnowDensityModel } from './snow-density-model'; +import { StratProfileEditModel } from './strat-profile-edit-model'; +import { SnowTempModel } from './snow-temp-model'; + + +export interface SnowProfileEditModel { + Comment?: string | null; + IsProfileToGround?: boolean | null; + Exposition?: number | null; + SlopeAngle?: number | null; + SnowTemp?: SnowTempModel | null; + SnowDensity?: Array; + StratProfile?: StratProfileEditModel; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-profile-view-model.ts b/src/app/modules/common-regobs-api/model/snow-profile-view-model.ts new file mode 100644 index 000000000..c4e706ab0 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-profile-view-model.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { SnowDensityModel } from './snow-density-model'; +import { StratProfileViewModel } from './strat-profile-view-model'; +import { AttachmentViewModel } from './attachment-view-model'; +import { SnowTempModel } from './snow-temp-model'; + + +export interface SnowProfileViewModel { + Comment?: string | null; + IsProfileToGround?: boolean | null; + Exposition?: number | null; + SlopeAngle?: number | null; + SnowTemp?: SnowTempModel | null; + SnowDensity?: Array; + StratProfile?: StratProfileViewModel; + TotalDepth: number; + /** + * Urls to simplified images of the snow profile model + */ + PlotImage?: AttachmentViewModel; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-surface-edit-model.ts b/src/app/modules/common-regobs-api/model/snow-surface-edit-model.ts new file mode 100644 index 000000000..91b71d5b7 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-surface-edit-model.ts @@ -0,0 +1,54 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SnowSurfaceEditModel { + /** + * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. + */ + SnowDepth?: number | null; + /** + * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området + */ + NewSnowDepth24?: number | null; + /** + * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. + */ + NewSnowLine?: number | null; + /** + * Overflatefuktighet + */ + SurfaceWaterContentTID?: number | null; + /** + * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier + */ + SnowDriftTID?: number | null; + /** + * Snødekkehardhet + */ + SnowSurfaceTID?: number | null; + /** + * Skiføre + */ + SkiConditionsTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string | null; + /** + * Grense lagdelt snø (moh) + */ + HeightLimitLayeredSnow?: number | null; + /** + * Snøgrense (moh) + */ + SnowLine?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-surface-view-model.ts b/src/app/modules/common-regobs-api/model/snow-surface-view-model.ts new file mode 100644 index 000000000..34ae03fc0 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-surface-view-model.ts @@ -0,0 +1,68 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SnowSurfaceViewModel { + /** + * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. + */ + SnowDepth?: number | null; + /** + * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området + */ + NewSnowDepth24?: number | null; + /** + * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. + */ + NewSnowLine?: number | null; + /** + * Overflatefuktighet + */ + SurfaceWaterContentTID?: number | null; + /** + * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier + */ + SnowDriftTID?: number | null; + /** + * Snødekkehardhet + */ + SnowSurfaceTID?: number | null; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string | null; + /** + * Grense lagdelt snø (moh) + */ + HeightLimitLayeredSnow?: number | null; + /** + * Snøgrense (moh) + */ + SnowLine?: number | null; + /** + * Obsolete - Only in View Model + */ + SnowWindDepth24?: number | null; + SurfaceWaterContentName?: string; + SnowDriftName?: string; + SnowSurfaceName?: string; + SkiConditionsTID?: number | null; + SkiConditionsName?: string; + /** + * Obsolete - Only in View Model + */ + SurfaceRougnessTID?: number | null; + SurfaceRougnessName?: string; + /** + * Obsolete - Only in View Model + */ + FootPenetration?: number | null; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-temp-model.ts b/src/app/modules/common-regobs-api/model/snow-temp-model.ts new file mode 100644 index 000000000..65e5a5349 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-temp-model.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { SnowTempObsModel } from './snow-temp-obs-model'; + + +export interface SnowTempModel { + Layers?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/snow-temp-obs-model.ts b/src/app/modules/common-regobs-api/model/snow-temp-obs-model.ts new file mode 100644 index 000000000..eee0d04e1 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/snow-temp-obs-model.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface SnowTempObsModel { + Depth: number; + SnowTemp: number; +} + diff --git a/src/app/modules/common-regobs-api/model/strat-profile-edit-model.ts b/src/app/modules/common-regobs-api/model/strat-profile-edit-model.ts new file mode 100644 index 000000000..19c0a0b98 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/strat-profile-edit-model.ts @@ -0,0 +1,16 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { StratProfileLayerEditModel } from './strat-profile-layer-edit-model'; + + +export interface StratProfileEditModel { + Layers?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/strat-profile-layer-edit-model.ts b/src/app/modules/common-regobs-api/model/strat-profile-layer-edit-model.ts new file mode 100644 index 000000000..b295b55f9 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/strat-profile-layer-edit-model.ts @@ -0,0 +1,26 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface StratProfileLayerEditModel { + DepthTop?: number | null; + Thickness?: number | null; + GrainFormPrimaryTID?: number | null; + GrainFormSecondaryTID?: number | null; + GrainSizeAvg?: number | null; + GrainSizeAvgMax?: number | null; + HardnessTID?: number | null; + HardnessBottomTID?: number | null; + WetnessTID?: number | null; + CriticalLayerTID?: number | null; + Comment?: string | null; + SortOrder: number; +} + diff --git a/src/app/modules/common-regobs-api/model/strat-profile-layer-view-model.ts b/src/app/modules/common-regobs-api/model/strat-profile-layer-view-model.ts new file mode 100644 index 000000000..db8df84fb --- /dev/null +++ b/src/app/modules/common-regobs-api/model/strat-profile-layer-view-model.ts @@ -0,0 +1,32 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface StratProfileLayerViewModel { + DepthTop?: number | null; + Thickness?: number | null; + GrainFormPrimaryTID?: number | null; + GrainFormSecondaryTID?: number | null; + GrainSizeAvg?: number | null; + GrainSizeAvgMax?: number | null; + HardnessTID?: number | null; + HardnessBottomTID?: number | null; + WetnessTID?: number | null; + CriticalLayerTID?: number | null; + Comment?: string | null; + SortOrder: number; + GrainFormPrimaryTName?: string; + GrainFormSecondaryTName?: string; + HardnessTName?: string; + HardnessBottomTName?: string; + WetnessTName?: string; + CriticalLayerTName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/strat-profile-view-model.ts b/src/app/modules/common-regobs-api/model/strat-profile-view-model.ts new file mode 100644 index 000000000..a0aaabc5a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/strat-profile-view-model.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { StratProfileLayerViewModel } from './strat-profile-layer-view-model'; + + +export interface StratProfileViewModel { + Layers?: Array; + TotalDepth: number; +} + diff --git a/src/app/modules/common-regobs-api/model/summary.ts b/src/app/modules/common-regobs-api/model/summary.ts new file mode 100644 index 000000000..2bc91bd82 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/summary.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { RegObsGenericValue } from './reg-obs-generic-value'; + + +export interface Summary { + RegistrationTID: number; + RegistrationName?: string; + Summaries?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/url-edit-model.ts b/src/app/modules/common-regobs-api/model/url-edit-model.ts new file mode 100644 index 000000000..658f6030e --- /dev/null +++ b/src/app/modules/common-regobs-api/model/url-edit-model.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface UrlEditModel { + /** + * UrlDescription + */ + UrlDescription?: string | null; + /** + * UrlLine + */ + UrlLine: string; +} + diff --git a/src/app/modules/common-regobs-api/model/url-view-model.ts b/src/app/modules/common-regobs-api/model/url-view-model.ts new file mode 100644 index 000000000..7b50efc8a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/url-view-model.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface UrlViewModel { + /** + * UrlDescription + */ + UrlDescription?: string | null; + /** + * UrlLine + */ + UrlLine: string; +} + diff --git a/src/app/modules/common-regobs-api/model/value-kind.ts b/src/app/modules/common-regobs-api/model/value-kind.ts new file mode 100644 index 000000000..38d5eb3d7 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/value-kind.ts @@ -0,0 +1,18 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const ValueKind = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; +export type ValueKind = typeof ValueKind[keyof typeof ValueKind]; + diff --git a/src/app/modules/common-regobs-api/model/water-level-measurement-edit-model.ts b/src/app/modules/common-regobs-api/model/water-level-measurement-edit-model.ts new file mode 100644 index 000000000..0674131eb --- /dev/null +++ b/src/app/modules/common-regobs-api/model/water-level-measurement-edit-model.ts @@ -0,0 +1,20 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AttachmentEditModel } from './attachment-edit-model'; + + +export interface WaterLevelMeasurementEditModel { + WaterLevelMeasurementId?: number | null; + WaterLevelValue?: number | null; + DtMeasurementTime: string; + Comment?: string | null; + Attachments?: Array | null; +} + diff --git a/src/app/modules/common-regobs-api/model/water-level-measurement-view-model.ts b/src/app/modules/common-regobs-api/model/water-level-measurement-view-model.ts new file mode 100644 index 000000000..9df25d90b --- /dev/null +++ b/src/app/modules/common-regobs-api/model/water-level-measurement-view-model.ts @@ -0,0 +1,20 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AttachmentViewModel } from './attachment-view-model'; + + +export interface WaterLevelMeasurementViewModel { + WaterLevelMeasurementId: number; + WaterLevelValue?: number | null; + DtMeasurementTime: string; + Comment?: string | null; + Attachments?: Array; +} + diff --git a/src/app/modules/common-regobs-api/model/water-level-view-model.ts b/src/app/modules/common-regobs-api/model/water-level-view-model.ts new file mode 100644 index 000000000..bd8e1d33a --- /dev/null +++ b/src/app/modules/common-regobs-api/model/water-level-view-model.ts @@ -0,0 +1,21 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface WaterLevelViewModel { + WaterLevelDescribed?: string; + WaterLevelValue?: number | null; + WaterLevelRefTID: number; + WaterLevelRefName?: string; + Comment?: string; + MeasuredDischarge?: number | null; + IsRiver: boolean; +} + diff --git a/src/app/modules/common-regobs-api/model/waterlevel2-edit-model.ts b/src/app/modules/common-regobs-api/model/waterlevel2-edit-model.ts new file mode 100644 index 000000000..53e4a7258 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/waterlevel2-edit-model.ts @@ -0,0 +1,30 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { WaterLevelMeasurementEditModel } from './water-level-measurement-edit-model'; + + +export interface Waterlevel2EditModel { + WaterAstrayTID?: number | null; + ObservationTimingTID?: number | null; + MeasurementReferenceTID?: number | null; + MeasurementTypeTID?: number | null; + WaterLevelMethodTID?: number | null; + MarkingReferenceTID?: number | null; + WaterLevelStateTID?: number | null; + MarkingTypeTID?: number | null; + MeasuringToolDescription?: string | null; + WaterLevelMeasurement?: Array; + /** + * Flood polygon area, List(lon, lat) + */ + Extent?: Array> | null; + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/waterlevel2-view-model.ts b/src/app/modules/common-regobs-api/model/waterlevel2-view-model.ts new file mode 100644 index 000000000..fd25a0068 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/waterlevel2-view-model.ts @@ -0,0 +1,38 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { WaterLevelMeasurementViewModel } from './water-level-measurement-view-model'; + + +export interface Waterlevel2ViewModel { + WaterAstrayTID?: number | null; + ObservationTimingTID?: number | null; + MeasurementReferenceTID?: number | null; + MeasurementTypeTID?: number | null; + WaterLevelMethodTID?: number | null; + MarkingReferenceTID?: number | null; + WaterLevelStateTID?: number | null; + MarkingTypeTID?: number | null; + MeasuringToolDescription?: string | null; + WaterLevelMeasurement?: Array; + Comment?: string | null; + WaterLevelStateName?: string; + WaterAstrayName?: string; + ObservationTimingName?: string; + MeasurementReferenceName?: string; + MeasurementTypeName?: string; + WaterLevelMethodName?: string; + MarkingReferenceName?: string; + MarkingTypeName?: string; + /** + * Flood polygon area, List(lon, lat) + */ + Extent?: Array>; +} + diff --git a/src/app/modules/common-regobs-api/model/weather-edit-model.ts b/src/app/modules/common-regobs-api/model/weather-edit-model.ts new file mode 100644 index 000000000..823eeffc0 --- /dev/null +++ b/src/app/modules/common-regobs-api/model/weather-edit-model.ts @@ -0,0 +1,20 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface WeatherEditModel { + PrecipitationTID?: number | null; + AirTemperature?: number | null; + WindSpeed?: number | null; + WindDirection?: number | null; + CloudCover?: number | null; + Comment?: string | null; +} + diff --git a/src/app/modules/common-regobs-api/model/weather-view-model.ts b/src/app/modules/common-regobs-api/model/weather-view-model.ts new file mode 100644 index 000000000..d8a614e7f --- /dev/null +++ b/src/app/modules/common-regobs-api/model/weather-view-model.ts @@ -0,0 +1,22 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface WeatherViewModel { + PrecipitationTID?: number | null; + AirTemperature?: number | null; + WindSpeed?: number | null; + WindDirection?: number | null; + CloudCover?: number | null; + Comment?: string | null; + PrecipitationName?: string; + WindDirectionName?: string; +} + diff --git a/src/app/modules/common-regobs-api/model/within-extent-criteria-dto.ts b/src/app/modules/common-regobs-api/model/within-extent-criteria-dto.ts new file mode 100644 index 000000000..a05dd7c1c --- /dev/null +++ b/src/app/modules/common-regobs-api/model/within-extent-criteria-dto.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PositionDto } from './position-dto'; + + +export interface WithinExtentCriteriaDto { + TopLeft?: PositionDto; + BottomRight?: PositionDto; +} + diff --git a/src/app/modules/common-regobs-api/model/within-radius-criteria-dto.ts b/src/app/modules/common-regobs-api/model/within-radius-criteria-dto.ts new file mode 100644 index 000000000..2779ca7bd --- /dev/null +++ b/src/app/modules/common-regobs-api/model/within-radius-criteria-dto.ts @@ -0,0 +1,17 @@ +/** + * RegObs API, build: Local build - commit: b86cb26d + * + * Contact: regobs@nve.no + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PositionDto } from './position-dto'; + + +export interface WithinRadiusCriteriaDto { + Position?: PositionDto; + Radius: number; +} + diff --git a/src/app/modules/common-regobs-api/models.ts b/src/app/modules/common-regobs-api/models.ts deleted file mode 100644 index d411f56a0..000000000 --- a/src/app/modules/common-regobs-api/models.ts +++ /dev/null @@ -1,95 +0,0 @@ -export type { ObserverResponseDto } from './models/observer-response-dto'; -export type { ObserverGroupDto } from './models/observer-group-dto'; -export type { MyPageData } from './models/my-page-data'; -export type { ObserverCompetenceDto } from './models/observer-competence-dto'; -export type { ObserverPatchRequestDto } from './models/observer-patch-request-dto'; -export type { GeoLocationInfo } from './models/geo-location-info'; -export type { GeoLocationSummary } from './models/geo-location-summary'; -export type { HelptextDto } from './models/helptext-dto'; -export type { KdvElementsResponseDto } from './models/kdv-elements-response-dto'; -export type { KdvElement } from './models/kdv-element'; -export type { ObsLocationsResponseDtoV2 } from './models/obs-locations-response-dto-v2'; -export type { LatLngObject } from './models/lat-lng-object'; -export type { RegistrationViewModel } from './models/registration-view-model'; -export type { ObserverViewModel } from './models/observer-view-model'; -export type { ObsLocationViewModel } from './models/obs-location-view-model'; -export type { AttachmentViewModel } from './models/attachment-view-model'; -export type { AvalancheActivityObs2ViewModel } from './models/avalanche-activity-obs-2view-model'; -export type { AvalancheEvalProblem2ViewModel } from './models/avalanche-eval-problem-2view-model'; -export type { AvalancheEvaluation3ViewModel } from './models/avalanche-evaluation-3view-model'; -export type { AvalancheObsViewModel } from './models/avalanche-obs-view-model'; -export type { CompressionTestViewModel } from './models/compression-test-view-model'; -export type { DangerObsViewModel } from './models/danger-obs-view-model'; -export type { GeneralObservationViewModel } from './models/general-observation-view-model'; -export type { IceCoverViewModel } from './models/ice-cover-view-model'; -export type { IceThicknessViewModel } from './models/ice-thickness-view-model'; -export type { IncidentViewModel } from './models/incident-view-model'; -export type { LandslideViewModel } from './models/landslide-view-model'; -export type { SnowProfileViewModel } from './models/snow-profile-view-model'; -export type { SnowSurfaceViewModel } from './models/snow-surface-view-model'; -export type { WeatherViewModel } from './models/weather-view-model'; -export type { Waterlevel2ViewModel } from './models/waterlevel-2view-model'; -export type { DamageObsViewModel } from './models/damage-obs-view-model'; -export type { Summary } from './models/summary'; -export type { AvalancheEvaluationViewModel } from './models/avalanche-evaluation-view-model'; -export type { AvalancheActivityObsViewModel } from './models/avalanche-activity-obs-view-model'; -export type { AvalancheDangerObsViewModel } from './models/avalanche-danger-obs-view-model'; -export type { AvalancheEvalProblemViewModel } from './models/avalanche-eval-problem-view-model'; -export type { AvalancheEvaluation2ViewModel } from './models/avalanche-evaluation-2view-model'; -export type { SnowCoverObsViewModel } from './models/snow-cover-obs-view-model'; -export type { WaterLevelViewModel } from './models/water-level-view-model'; -export type { UrlViewModel } from './models/url-view-model'; -export type { IceThicknessLayerViewModel } from './models/ice-thickness-layer-view-model'; -export type { StratProfileViewModel } from './models/strat-profile-view-model'; -export type { SnowTempModel } from './models/snow-temp-model'; -export type { SnowDensityModel } from './models/snow-density-model'; -export type { WaterLevelMeasurementViewModel } from './models/water-level-measurement-view-model'; -export type { LatLng } from './models/lat-lng'; -export type { RegObsGenericValue } from './models/reg-obs-generic-value'; -export type { StratProfileLayerViewModel } from './models/strat-profile-layer-view-model'; -export type { SnowTempObsModel } from './models/snow-temp-obs-model'; -export type { SnowDensityLayerModel } from './models/snow-density-layer-model'; -export type { RegistrationEditModel } from './models/registration-edit-model'; -export type { ObsLocationEditModel } from './models/obs-location-edit-model'; -export type { AttachmentEditModel } from './models/attachment-edit-model'; -export type { AvalancheActivityObs2EditModel } from './models/avalanche-activity-obs-2edit-model'; -export type { AvalancheEvalProblem2EditModel } from './models/avalanche-eval-problem-2edit-model'; -export type { AvalancheEvaluation3EditModel } from './models/avalanche-evaluation-3edit-model'; -export type { AvalancheObsEditModel } from './models/avalanche-obs-edit-model'; -export type { CompressionTestEditModel } from './models/compression-test-edit-model'; -export type { DangerObsEditModel } from './models/danger-obs-edit-model'; -export type { GeneralObservationEditModel } from './models/general-observation-edit-model'; -export type { IceCoverEditModel } from './models/ice-cover-edit-model'; -export type { IceThicknessEditModel } from './models/ice-thickness-edit-model'; -export type { IncidentEditModel } from './models/incident-edit-model'; -export type { LandslideEditModel } from './models/landslide-edit-model'; -export type { SnowProfileEditModel } from './models/snow-profile-edit-model'; -export type { SnowSurfaceEditModel } from './models/snow-surface-edit-model'; -export type { WeatherEditModel } from './models/weather-edit-model'; -export type { Waterlevel2EditModel } from './models/waterlevel-2edit-model'; -export type { DamageObsEditModel } from './models/damage-obs-edit-model'; -export type { UrlEditModel } from './models/url-edit-model'; -export type { IceThicknessLayerEditModel } from './models/ice-thickness-layer-edit-model'; -export type { StratProfileEditModel } from './models/strat-profile-edit-model'; -export type { WaterLevelMeasurementEditModel } from './models/water-level-measurement-edit-model'; -export type { StratProfileLayerEditModel } from './models/strat-profile-layer-edit-model'; -export type { SearchCriteriaRequestDto } from './models/search-criteria-request-dto'; -export type { RegistrationTypeCriteriaDto } from './models/registration-type-criteria-dto'; -export type { WithinRadiusCriteriaDto } from './models/within-radius-criteria-dto'; -export type { WithinExtentCriteriaDto } from './models/within-extent-criteria-dto'; -export type { PropertyFilter } from './models/property-filter'; -export type { PositionDto } from './models/position-dto'; -export type { SearchCriteriaExclUserRequestDto } from './models/search-criteria-excl-user-request-dto'; -export type { SearchCountResponseDto } from './models/search-count-response-dto'; -export type { SearchSideBarDto } from './models/search-side-bar-dto'; -export type { RegistrationTypeDto } from './models/registration-type-dto'; -export type { ObserverCompetenceLevelDto } from './models/observer-competence-level-dto'; -export type { AreasDto } from './models/areas-dto'; -export type { RegistrationTypeSubTypeDto } from './models/registration-type-sub-type-dto'; -export type { ForecastRegionDto } from './models/forecast-region-dto'; -export type { CountyDto } from './models/county-dto'; -export type { ForecastRegionSubRegionDto } from './models/forecast-region-sub-region-dto'; -export type { SearchSideBarRequestDto } from './models/search-side-bar-request-dto'; -export type { AtAGlanceViewModel } from './models/at-aglance-view-model'; -export type { FinishTripDto } from './models/finish-trip-dto'; -export type { CreateTripDto } from './models/create-trip-dto'; diff --git a/src/app/modules/common-regobs-api/models/areas-dto-forecast-regions.ts b/src/app/modules/common-regobs-api/models/areas-dto-forecast-regions.ts new file mode 100644 index 000000000..bae511222 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/areas-dto-forecast-regions.ts @@ -0,0 +1,24 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ForecastRegionDto } from './forecast-region-dto'; + + +export interface AreasDtoForecastRegions { + Avalanche?: Array; + Drought?: Array; + EarthFlow?: Array; + EventOnGlacier?: Array; + Flooding?: Array; + Ice?: Array; + IceFall?: Array; + Jokulhaup?: Array; + LandSlide?: Array; + NotSpecified?: Array; + RockFall?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/models/areas-dto.ts b/src/app/modules/common-regobs-api/models/areas-dto.ts index 3b44a9fed..3db358b3a 100644 --- a/src/app/modules/common-regobs-api/models/areas-dto.ts +++ b/src/app/modules/common-regobs-api/models/areas-dto.ts @@ -1,11 +1,19 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AreasDtoForecastRegions } from './areas-dto-forecast-regions'; import { CountyDto } from './county-dto'; -import { ForecastRegionDto } from './forecast-region-dto'; -export interface AreasDto { - Counties?: Array; - CountryDescription?: string; - CountryId?: number; - CountryName?: string; - ForecastRegions?: {NotSpecified?: Array, Avalanche?: Array, EarthFlow?: Array, LandSlide?: Array, RockFall?: Array, IceFall?: Array, Flooding?: Array, Ice?: Array, EventOnGlacier?: Array, Jøkulhaup?: Array, Drought?: Array, Unknown?: Array}; - SortOrder?: number; + + +export interface AreasDto { + Counties?: Array; + CountryDescription?: string; + CountryId: number; + CountryName?: string; + ForecastRegions?: AreasDtoForecastRegions; + SortOrder: number; } + diff --git a/src/app/modules/common-regobs-api/models/at-a-glance-view-model.ts b/src/app/modules/common-regobs-api/models/at-a-glance-view-model.ts new file mode 100644 index 000000000..92667f566 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/at-a-glance-view-model.ts @@ -0,0 +1,30 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AtAGlanceViewModel { + /** + * Count of all attachments + */ + AttachmentsCount?: number; + CompetenceLevelTID?: number; + DtObsTime: string; + /** + * Returns first attachement url from the observation or null + */ + FirstAttachmentUrl?: string; + FormNames?: Array; + GeoHazardTID?: number; + Latitude: number; + Longitude: number; + NickName?: string; + RegId: number; + Title?: string; + UtmEast: number; + UtmNorth: number; +} + diff --git a/src/app/modules/common-regobs-api/models/at-aglance-view-model.ts b/src/app/modules/common-regobs-api/models/at-aglance-view-model.ts deleted file mode 100644 index 2c168c511..000000000 --- a/src/app/modules/common-regobs-api/models/at-aglance-view-model.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* tslint:disable */ -export interface AtAGlanceViewModel { - - /** - * Count of all attachments - */ - AttachmentsCount?: number; - CompetenceLevelTID?: number; - DtObsTime?: string; - - /** - * this field is deprecated and wont be used inpcoming versions of the app - */ - FirstAttachmentId?: number; - - /** - * Returns first attachement url from the observation or null - */ - FirstAttachmentUrl?: string; - FormNames?: Array; - GeoHazardTID?: number; - Latitude?: number; - Longitude?: number; - NickName?: string; - RegId?: number; - Title?: string; - UtmEast?: number; - UtmNorth?: number; -} diff --git a/src/app/modules/common-regobs-api/models/attachment-edit-model.ts b/src/app/modules/common-regobs-api/models/attachment-edit-model.ts index add780174..2c837fb1d 100644 --- a/src/app/modules/common-regobs-api/models/attachment-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/attachment-edit-model.ts @@ -1,45 +1,45 @@ -/* tslint:disable */ -export interface AttachmentEditModel { - - /** - * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. - */ - Aspect?: number; - AttachmentId?: number; - AttachmentMimeType?: string; - - /** - * Last opp attachment på forhånd og sett AttachmentUploadId - */ - AttachmentUploadId?: string; - - /** - * Kommentarfelt for bildet. F.eks for å beskrive det. - */ - Comment?: string; - - /** - * Rettigheter til bilde. - */ - Copyright?: string; - - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; - - /** - * Om bildet skal vises først i registreringen, eller ikke - */ - IsMainAttachment?: boolean; - - /** - * Navn på fotograf. - */ - Photographer?: string; - - /** - * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier - */ - RegistrationTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AttachmentEditModel { + /** + * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect?: number; + AttachmentId?: number; + AttachmentMimeType?: string; + /** + * Last opp attachment på forhånd og sett AttachmentUploadId + */ + AttachmentUploadId?: string; + /** + * Kommentarfelt for bildet. F.eks for å beskrive det. + */ + Comment?: string; + /** + * Rettigheter til bilde. + */ + Copyright?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; + /** + * Om bildet skal vises først i registreringen, eller ikke + */ + IsMainAttachment?: boolean; + /** + * Navn på fotograf. + */ + Photographer?: string; + /** + * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier + */ + RegistrationTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/attachment-view-model-url-formats.ts b/src/app/modules/common-regobs-api/models/attachment-view-model-url-formats.ts new file mode 100644 index 000000000..5ba9f58f4 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/attachment-view-model-url-formats.ts @@ -0,0 +1,19 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * Urls in different formats + */ +export interface AttachmentViewModelUrlFormats { + Large?: string; + Medium?: string; + Original?: string; + Raw?: string; + Thumbnail?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/attachment-view-model.ts b/src/app/modules/common-regobs-api/models/attachment-view-model.ts index c8c330149..5faac74e9 100644 --- a/src/app/modules/common-regobs-api/models/attachment-view-model.ts +++ b/src/app/modules/common-regobs-api/models/attachment-view-model.ts @@ -1,69 +1,59 @@ -/* tslint:disable */ -export interface AttachmentViewModel { - - /** - * Unik beskrivelsen for bildet. Legges på klienten. Dette feltet kommer ikke fra api. - */ - Alt?: string; - /** - * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. - */ - Aspect?: number; - AttachmentId?: number; - AttachmentMimeType?: string; - - /** - * Kommentarfelt for bildet. F.eks for å beskrive det. - */ - Comment?: string; - - /** - * Rettigheter til bilde. - */ - Copyright?: string; - - /** - * GeoHazard name - */ - GeoHazardName?: string; - - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; - - /** - * Om bildet skal vises først i registreringen, eller ikke - */ - IsMainAttachment?: boolean; - - /** - * Navn på fotograf. - */ - Photographer?: string; - - /** - * Registration name - */ - RegistrationName?: string; - - /** - * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier - */ - RegistrationTID?: number; - - /** - * Full original image url - */ - Url?: string; - - /** - * Urls in different formats - */ - UrlFormats?: {Raw?: string, Original?: string, Thumbnail?: string, Large?: string, Medium?: string}; - - /** - * Om bildet er generert fra et snøprofil-plott - */ - IsSnowProfilePlot?: boolean; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AttachmentViewModelUrlFormats } from './attachment-view-model-url-formats'; + + +export interface AttachmentViewModel { + /** + * Hvilken himmelretning peker bilde. Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect?: number; + AttachmentId?: number; + AttachmentMimeType?: string; + /** + * Kommentarfelt for bildet. F.eks for å beskrive det. + */ + Comment?: string; + /** + * Rettigheter til bilde. + */ + Copyright?: string; + /** + * GeoHazard name + */ + GeoHazardName?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; + /** + * Om bildet skal vises først i registreringen, eller ikke + */ + IsMainAttachment?: boolean; + /** + * If true, the attachment is an image generated from a snow profile plot + */ + IsSnowProfilePlot: boolean; + /** + * Navn på fotograf. + */ + Photographer?: string; + /** + * Registration name + */ + RegistrationName?: string; + /** + * Hva er bildet av. Dette feltet relaterer bildet til en observasjonstype. Feks værobservasjon, faretegn, osv. The RegistrationKD unique identifier + */ + RegistrationTID?: number; + /** + * Full original image url + */ + Url?: string; + UrlFormats?: AttachmentViewModelUrlFormats; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2edit-model.ts deleted file mode 100644 index 0c2fc518b..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2edit-model.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -export interface AvalancheActivityObs2EditModel { - AvalCauseTID?: number; - AvalPropagationTID?: number; - AvalTriggerSimpleTID?: number; - AvalancheExtTID?: number; - Comment?: string; - DestructiveSizeTID?: number; - DtEnd?: string; - DtStart?: string; - EstimatedNumTID?: number; - ExposedHeight1?: number; - ExposedHeight2?: number; - ExposedHeightComboTID?: number; - ValidExposition?: string; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2view-model.ts deleted file mode 100644 index 99a907dca..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-2view-model.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* tslint:disable */ -export interface AvalancheActivityObs2ViewModel { - AvalCauseName?: string; - AvalCauseTID?: number; - AvalPropagationName?: string; - AvalPropagationTID?: number; - AvalTriggerSimpleName?: string; - AvalTriggerSimpleTID?: number; - AvalancheExtName?: string; - AvalancheExtTID?: number; - Comment?: string; - DestructiveSizeName?: string; - DestructiveSizeTID?: number; - DtEnd?: string; - DtStart?: string; - EstimatedNumName?: string; - EstimatedNumTID?: number; - ExposedHeight1?: number; - ExposedHeight2?: number; - ExposedHeightComboName?: string; - ExposedHeightComboTID?: number; - ValidExposition?: string; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-activity-obs-view-model.ts index 7e2c2e795..f749cd5a3 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-activity-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-activity-obs-view-model.ts @@ -1,65 +1,62 @@ -/* tslint:disable */ -export interface AvalancheActivityObsViewModel { - - /** - * Hvilken side av fjellene har skredene gått? Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. - */ - Aspect?: number; - - /** - * Unik id på denne tabellen da flere er mulig pr RegID. - */ - AvalancheActivityObsID?: number; - AvalancheName?: string; - - /** - * Typen skred som er gått. The AvalancheKD unique identifier - */ - AvalancheTID?: number; - AvalancheTriggerName?: string; - - /** - * Hva utløste skredet? Det er ofte beskrevet som det svake laget i snødekket. The AvalancheTriggerKD unique identifier - */ - AvalancheTriggerTID?: number; - - /** - * Kommentarfelt for å skrive utfyllende tekst om observasjonen. - */ - Comment?: string; - DestructiveSizeName?: string; - - /** - * Hvor store er skredene?. The DestructiveSizeKD unique identifier - */ - DestructiveSizeTID?: number; - - /** - * Når gikk skredene? Her bruker vi feltet som en ca. tid og brukerene oppfordres til å anta best mulig. - */ - DtAvalancheTime?: string; - DtOffAvalancheTime?: string; - EstimatedNumName?: string; - - /** - * Hvor mange skred er gått? The EstimatedNumKD unique identifier - */ - EstimatedNumTID?: number; - - /** - * Meter over havet på løsneområdet. - */ - HeigthStartZone?: number; - - /** - * Hvor går snøgrensa i området? - */ - SnowLine?: number; - SnowLineName?: string; - TerrainStartZoneName?: string; - - /** - * Hva slags terrengtype var det i løsneområdet. The TerrainStartZoneKD unique identifier - */ - TerrainStartZoneTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheActivityObsViewModel { + /** + * Hvilken side av fjellene har skredene gått? Gis i grader slik gitt på kompass. 0 er nord og 90 er øst osv. + */ + Aspect: number; + /** + * Unik id på denne tabellen da flere er mulig pr RegID. + */ + AvalancheActivityObsID: number; + AvalancheName?: string; + /** + * Typen skred som er gått. The AvalancheKD unique identifier + */ + AvalancheTID?: number; + AvalancheTriggerName?: string; + /** + * Hva utløste skredet? Det er ofte beskrevet som det svake laget i snødekket. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number; + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + DestructiveSizeName?: string; + /** + * Hvor store er skredene?. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number; + /** + * Når gikk skredene? Her bruker vi feltet som en ca. tid og brukerene oppfordres til å anta best mulig. + */ + DtAvalancheTime: string; + DtOffAvalancheTime: string; + EstimatedNumName?: string; + /** + * Hvor mange skred er gått? The EstimatedNumKD unique identifier + */ + EstimatedNumTID?: number; + /** + * Meter over havet på løsneområdet. + */ + HeigthStartZone: number; + /** + * Hvor går snøgrensa i området? + */ + SnowLine?: number; + SnowLineName?: string; + TerrainStartZoneName?: string; + /** + * Hva slags terrengtype var det i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-edit-model.ts new file mode 100644 index 000000000..1a6a14591 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-edit-model.ts @@ -0,0 +1,24 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheActivityObs2EditModel { + AvalancheExtTID?: number; + AvalCauseTID?: number; + AvalPropagationTID?: number; + AvalTriggerSimpleTID?: number; + Comment?: string; + DestructiveSizeTID?: number; + DtEnd?: string; + DtStart?: string; + EstimatedNumTID?: number; + ExposedHeight1?: number; + ExposedHeight2?: number; + ExposedHeightComboTID?: number; + ValidExposition?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-view-model.ts new file mode 100644 index 000000000..648a993ee --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-activity-obs2-view-model.ts @@ -0,0 +1,31 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheActivityObs2ViewModel { + AvalancheExtName?: string; + AvalancheExtTID?: number; + AvalCauseName?: string; + AvalCauseTID?: number; + AvalPropagationName?: string; + AvalPropagationTID?: number; + AvalTriggerSimpleName?: string; + AvalTriggerSimpleTID?: number; + Comment?: string; + DestructiveSizeName?: string; + DestructiveSizeTID?: number; + DtEnd?: string; + DtStart?: string; + EstimatedNumName?: string; + EstimatedNumTID?: number; + ExposedHeight1?: number; + ExposedHeight2?: number; + ExposedHeightComboName?: string; + ExposedHeightComboTID?: number; + ValidExposition?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-danger-obs-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-danger-obs-view-model.ts index 4fa757275..edf690bfe 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-danger-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-danger-obs-view-model.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface AvalancheDangerObsViewModel { - AvalancheDangerObsID?: number; - Comment?: string; - DangerSignName?: string; - DangerSignTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheDangerObsViewModel { + AvalancheDangerObsID: number; + Comment?: string; + DangerSignName?: string; + DangerSignTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2edit-model.ts deleted file mode 100644 index ce75b0ce1..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2edit-model.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* tslint:disable */ -export interface AvalancheEvalProblem2EditModel { - AvalCauseAttributeCrystalTID?: number; - AvalCauseAttributeLightTID?: number; - AvalCauseAttributeSoftTID?: number; - AvalCauseAttributeThinTID?: number; - - /** - * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier - */ - AvalCauseDepthTID?: number; - - /** - * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier - */ - AvalCauseTID?: number; - - /** - * Sannsynlighet for skred. The AvalProbabilityKD unique identifier - */ - AvalProbabilityTID?: number; - AvalPropagationTID?: number; - - /** - * The AvalTriggerSimpleKD unique identifier - */ - AvalTriggerSimpleTID?: number; - - /** - * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier - */ - AvalancheExtTID?: number; - - /** - * Kommentar til skredproblemet - */ - Comment?: string; - - /** - * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier - */ - DestructiveSizeTID?: number; - - /** - * Øverste høyde på “utsatt høyde” symbolet. - */ - ExposedHeight1?: number; - - /** - * Nederste høyde på “utsatt høyde” symbolet. - */ - ExposedHeight2?: number; - - /** - * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier - */ - ExposedHeightComboTID?: number; - - /** - * Velg utsatte retninger - */ - ValidExposition?: string; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2view-model.ts deleted file mode 100644 index eebbfb287..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-2view-model.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -export interface AvalancheEvalProblem2ViewModel { - AvalCauseAttributeCrystalName?: string; - AvalCauseAttributeCrystalTID?: number; - AvalCauseAttributeLightName?: string; - AvalCauseAttributeLightTID?: number; - AvalCauseAttributeSoftName?: string; - AvalCauseAttributeSoftTID?: number; - AvalCauseAttributeThinName?: string; - AvalCauseAttributeThinTID?: number; - AvalCauseDepthName?: string; - - /** - * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier - */ - AvalCauseDepthTID?: number; - AvalCauseName?: string; - - /** - * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier - */ - AvalCauseTID?: number; - AvalProbabilityName?: string; - - /** - * Sannsynlighet for skred. The AvalProbabilityKD unique identifier - */ - AvalProbabilityTID?: number; - AvalPropagationName?: string; - AvalPropagationTID?: number; - AvalTriggerSimpleName?: string; - - /** - * The AvalTriggerSimpleKD unique identifier - */ - AvalTriggerSimpleTID?: number; - AvalancheExtName?: string; - - /** - * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier - */ - AvalancheExtTID?: number; - - /** - * Kommentar til skredproblemet - */ - Comment?: string; - DestructiveSizeName?: string; - - /** - * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier - */ - DestructiveSizeTID?: number; - - /** - * Øverste høyde på “utsatt høyde” symbolet. - */ - ExposedHeight1?: number; - - /** - * Nederste høyde på “utsatt høyde” symbolet. - */ - ExposedHeight2?: number; - ExposedHeightComboName?: string; - - /** - * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier - */ - ExposedHeightComboTID?: number; - - /** - * Velg utsatte retninger - */ - ValidExposition?: string; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-eval-problem-view-model.ts index 9e5592184..11dbcbd6a 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-eval-problem-view-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-eval-problem-view-model.ts @@ -1,21 +1,29 @@ -/* tslint:disable */ -export interface AvalancheEvalProblemViewModel { - AvalCauseExtName?: string; - AvalCauseExtTID?: number; - AvalCauseName?: string; - AvalCauseTID?: number; - AvalProbabilityName?: string; - AvalProbabilityTID?: number; - AvalReleaseHeightName?: string; - AvalReleaseHeightTID?: number; - AvalTriggerSimpleName?: string; - AvalTriggerSimpleTID?: number; - AvalancheEvalProblemID?: number; - AvalancheExtName?: string; - AvalancheExtTID?: number; - AvalancheProbabilityAutoText?: string; - AvalancheProblemAutoText?: string; - Comment?: string; - DestructiveSizeExtName?: string; - DestructiveSizeExtTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvalProblemViewModel { + AvalancheEvalProblemID: number; + AvalancheExtName?: string; + AvalancheExtTID?: number; + AvalancheProbabilityAutoText?: string; + AvalancheProblemAutoText?: string; + AvalCauseExtName?: string; + AvalCauseExtTID?: number; + AvalCauseName?: string; + AvalCauseTID?: number; + AvalProbabilityName?: string; + AvalProbabilityTID?: number; + AvalReleaseHeightName?: string; + AvalReleaseHeightTID?: number; + AvalTriggerSimpleName?: string; + AvalTriggerSimpleTID?: number; + Comment?: string; + DestructiveSizeExtName?: string; + DestructiveSizeExtTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-edit-model.ts new file mode 100644 index 000000000..fb9e60764 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-edit-model.ts @@ -0,0 +1,63 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvalProblem2EditModel { + /** + * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier + */ + AvalancheExtTID?: number; + AvalCauseAttributeCrystalTID: number; + AvalCauseAttributeLightTID: number; + AvalCauseAttributeSoftTID: number; + AvalCauseAttributeThinTID: number; + /** + * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier + */ + AvalCauseDepthTID?: number; + /** + * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier + */ + AvalCauseTID?: number; + /** + * Sannsynlighet for skred. The AvalProbabilityKD unique identifier + */ + AvalProbabilityTID?: number; + /** + * + */ + AvalPropagationTID?: number; + /** + * The AvalTriggerSimpleKD unique identifier + */ + AvalTriggerSimpleTID?: number; + /** + * Kommentar til skredproblemet + */ + Comment?: string; + /** + * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number; + /** + * Øverste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight1?: number; + /** + * Nederste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight2?: number; + /** + * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier + */ + ExposedHeightComboTID?: number; + /** + * Velg utsatte retninger + */ + ValidExposition?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-view-model.ts new file mode 100644 index 000000000..c75849da0 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-eval-problem2-view-model.ts @@ -0,0 +1,75 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvalProblem2ViewModel { + AvalancheExtName?: string; + /** + * Skredtype. I appen er dette 1. felt under skredproblem. The AvalancheExtKD unique identifier + */ + AvalancheExtTID?: number; + AvalCauseAttributeCrystalName?: string; + AvalCauseAttributeCrystalTID: number; + AvalCauseAttributeLightName?: string; + AvalCauseAttributeLightTID: number; + AvalCauseAttributeSoftName?: string; + AvalCauseAttributeSoftTID: number; + AvalCauseAttributeThinName?: string; + AvalCauseAttributeThinTID: number; + AvalCauseDepthName?: string; + /** + * Hvor dypt ligger det overnevnte svake laget? The AvalCauseDepthKD unique identifier + */ + AvalCauseDepthTID?: number; + AvalCauseName?: string; + /** + * Hvilket svakt lag løsner skredet på? The AvalCauseKD unique identifier + */ + AvalCauseTID?: number; + AvalProbabilityName?: string; + /** + * Sannsynlighet for skred. The AvalProbabilityKD unique identifier + */ + AvalProbabilityTID?: number; + AvalPropagationName?: string; + /** + * + */ + AvalPropagationTID?: number; + AvalTriggerSimpleName?: string; + /** + * The AvalTriggerSimpleKD unique identifier + */ + AvalTriggerSimpleTID?: number; + /** + * Kommentar til skredproblemet + */ + Comment?: string; + DestructiveSizeName?: string; + /** + * Sannsynlig tilleggsbelastning for å utløse skred. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number; + /** + * Øverste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight1?: number; + /** + * Nederste høyde på “utsatt høyde” symbolet. + */ + ExposedHeight2?: number; + ExposedHeightComboName?: string; + /** + * Hvilket symbol brukes? Er utsatt tereng over ExposedHeight2 eller under den? The ExposedHeightComboKD unique identifier + */ + ExposedHeightComboTID?: number; + /** + * Velg utsatte retninger + */ + ValidExposition?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation-2view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation-2view-model.ts deleted file mode 100644 index 843822816..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-evaluation-2view-model.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; -export interface AvalancheEvaluation2ViewModel { - AvalancheDangerName?: string; - AvalancheDangerTID?: number; - AvalancheDevelopment?: string; - AvalancheEvalProblems?: Array; - AvalancheEvaluation?: string; - Comment?: string; - ExposedClimateName?: string; - ExposedClimateTID?: number; - ExposedHeight1?: number; - ExposedHeight2?: number; - ExposedHeightComboName?: string; - ExposedHeightComboTID?: number; - ValidExposition?: string; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation-3edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation-3edit-model.ts deleted file mode 100644 index f0ca82a69..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-evaluation-3edit-model.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* tslint:disable */ -export interface AvalancheEvaluation3EditModel { - - /** - * Faregrad. The AvalancheDangerKD unique identifier - */ - AvalancheDangerTID?: number; - - /** - * Her blir forventet utvikling skrevet inn. - */ - AvalancheDevelopment?: string; - - /** - * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen - */ - AvalancheEvaluation?: string; - - /** - * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. - */ - ForecastComment?: string; - - /** - * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier - */ - ForecastCorrectTID?: number; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation-3view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation-3view-model.ts deleted file mode 100644 index 6777046ab..000000000 --- a/src/app/modules/common-regobs-api/models/avalanche-evaluation-3view-model.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* tslint:disable */ -export interface AvalancheEvaluation3ViewModel { - AvalancheDangerName?: string; - - /** - * Faregrad. The AvalancheDangerKD unique identifier - */ - AvalancheDangerTID?: number; - - /** - * Her blir forventet utvikling skrevet inn. - */ - AvalancheDevelopment?: string; - - /** - * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen - */ - AvalancheEvaluation?: string; - - /** - * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. - */ - ForecastComment?: string; - ForecastCorrectName?: string; - - /** - * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier - */ - ForecastCorrectTID?: number; -} diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation-view-model.ts index c4be6aec4..00d6c37fd 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-evaluation-view-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-evaluation-view-model.ts @@ -1,19 +1,27 @@ -/* tslint:disable */ -export interface AvalancheEvaluationViewModel { - AvalancheDangerName?: string; - AvalancheDangerTID?: number; - AvalancheEvaluation1?: string; - AvalancheProblemName1?: string; - AvalancheProblemName2?: string; - AvalancheProblemName3?: string; - AvalancheProblemTID1?: number; - AvalancheProblemTID2?: number; - AvalancheProblemTID3?: number; - CanPublish?: boolean; - Comment?: string; - RegID?: number; - ValidExposition?: string; - ValidHeightFrom?: number; - ValidHeightRelative?: string; - ValidHeigtTo?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvaluationViewModel { + AvalancheDangerName?: string; + AvalancheDangerTID: number; + AvalancheEvaluation1?: string; + AvalancheProblemName1?: string; + AvalancheProblemName2?: string; + AvalancheProblemName3?: string; + AvalancheProblemTID1?: number; + AvalancheProblemTID2?: number; + AvalancheProblemTID3?: number; + CanPublish: boolean; + Comment?: string; + RegID: number; + ValidExposition?: string; + ValidHeightFrom?: number; + ValidHeightRelative?: string; + ValidHeigtTo?: number; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation2-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation2-view-model.ts new file mode 100644 index 000000000..5a2c19e71 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-evaluation2-view-model.ts @@ -0,0 +1,25 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; + + +export interface AvalancheEvaluation2ViewModel { + AvalancheDangerName?: string; + AvalancheDangerTID?: number; + AvalancheDevelopment?: string; + AvalancheEvalProblems?: Array; + AvalancheEvaluation?: string; + Comment?: string; + ExposedClimateName?: string; + ExposedClimateTID?: number; + ExposedHeight1?: number; + ExposedHeight2?: number; + ExposedHeightComboName?: string; + ExposedHeightComboTID?: number; + ValidExposition?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation3-edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation3-edit-model.ts new file mode 100644 index 000000000..253ca3111 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-evaluation3-edit-model.ts @@ -0,0 +1,31 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvaluation3EditModel { + /** + * Faregrad. The AvalancheDangerKD unique identifier + */ + AvalancheDangerTID?: number; + /** + * Her blir forventet utvikling skrevet inn. + */ + AvalancheDevelopment?: string; + /** + * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen + */ + AvalancheEvaluation?: string; + /** + * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. + */ + ForecastComment?: string; + /** + * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier + */ + ForecastCorrectTID?: number; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-evaluation3-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-evaluation3-view-model.ts new file mode 100644 index 000000000..b0a03ed81 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/avalanche-evaluation3-view-model.ts @@ -0,0 +1,33 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheEvaluation3ViewModel { + AvalancheDangerName?: string; + /** + * Faregrad. The AvalancheDangerKD unique identifier + */ + AvalancheDangerTID?: number; + /** + * Her blir forventet utvikling skrevet inn. + */ + AvalancheDevelopment?: string; + /** + * Her blir Skredfarevurdering skrevet inn. I appen blir “Utstrekning” lagt til som tekst i denne kolonnen + */ + AvalancheEvaluation?: string; + /** + * Kommetarfelt for utdypende kommentar om varslet stemmer eller ikke. + */ + ForecastComment?: string; + ForecastCorrectName?: string; + /** + * Felt hvor observatøren kan fortelle de syns varslet stemmer. Valg fra liste gitt i ForecastCorrectKD. The ForecastCorrectKD unique identifier + */ + ForecastCorrectTID?: number; +} + diff --git a/src/app/modules/common-regobs-api/models/avalanche-obs-edit-model.ts b/src/app/modules/common-regobs-api/models/avalanche-obs-edit-model.ts index 95a0f0c4f..62214240d 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-obs-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-obs-edit-model.ts @@ -1,123 +1,107 @@ -/* tslint:disable */ -export interface AvalancheObsEditModel { - - /** - * Eksposisjon - */ - Aspect?: number; - - /** - * Skredutløser. The AvalCauseTID unique identifier - */ - AvalCauseTID?: number; - - /** - * Skredtype. The AvalancheKD unique identifier - */ - AvalancheTID?: number; - - /** - * Skredutløser. The AvalancheTriggerKD unique identifier - */ - AvalancheTriggerTID?: number; - - /** - * Comment - */ - Comment?: string; - - /** - * Størrelse. The DestructiveSizeKD unique identifier - */ - DestructiveSizeTID?: number; - - /** - * Tid da skredet gikk. - */ - DtAvalancheTime: string; - - /** - * Tidligste tidspunkt da skredet gikk. - */ - DtEarliestAvalancheTime?: string; - - /** - * Hull of avalanche polygon, List(lon, lat) - */ - Extent?: Array>; - - /** - * Bruddhøyde - */ - FractureHeight?: number; - - /** - * Bruddbredde - */ - FractureWidth?: number; - - /** - * Høyde i løsneområde - */ - HeightStartZone?: number; - - /** - * Høyde i stoppområdet - */ - HeightStopZone?: number; - - /** - * Ble skredet fjernutløst? - */ - RemotelyTriggered?: boolean; - - /** - * SnowLine - */ - SnowLine?: number; - - /** - * Hull of avalanche starting zone, List(lon, lat) - */ - StartExtent?: Array>; - - /** - * StartLat - */ - StartLat?: number; - - /** - * StartLong - */ - StartLong?: number; - - /** - * Hull of avalanche runout zone, List (lon, lat) - */ - StopExtent?: Array>; - - /** - * StopLat - */ - StopLat?: number; - - /** - * StopLong - */ - StopLong?: number; - - /** - * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier - */ - TerrainStartZoneTID?: number; - - /** - * Skredbanenavn - */ - Trajectory?: string; - - /** - * ValidExposition - */ - ValidExposition?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheObsEditModel { + /** + * Eksposisjon + */ + Aspect?: number; + /** + * Skredtype. The AvalancheKD unique identifier + */ + AvalancheTID?: number; + /** + * Skredutløser. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number; + /** + * Skredutløser. The AvalCauseTID unique identifier + */ + AvalCauseTID?: number; + /** + * Comment + */ + Comment?: string; + /** + * Størrelse. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number; + /** + * Tid da skredet gikk. + */ + DtAvalancheTime: string; + /** + * Tidligste tidspunkt da skredet gikk. + */ + DtEarliestAvalancheTime?: string; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array>; + /** + * Bruddhøyde + */ + FractureHeight?: number; + /** + * Bruddbredde + */ + FractureWidth?: number; + /** + * Høyde i løsneområde + */ + HeightStartZone?: number; + /** + * Høyde i stoppområdet + */ + HeightStopZone?: number; + /** + * Ble skredet fjernutløst? + */ + RemotelyTriggered?: boolean; + /** + * SnowLine + */ + SnowLine?: number; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array>; + /** + * StartLat + */ + StartLat?: number; + /** + * StartLong + */ + StartLong?: number; + /** + * Hull of avalanche runout zone, List (lon, lat) + */ + StopExtent?: Array>; + /** + * StopLat + */ + StopLat?: number; + /** + * StopLong + */ + StopLong?: number; + /** + * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number; + /** + * Skredbanenavn + */ + Trajectory?: string; + /** + * ValidExposition + */ + ValidExposition?: string; } + diff --git a/src/app/modules/common-regobs-api/models/avalanche-obs-view-model.ts b/src/app/modules/common-regobs-api/models/avalanche-obs-view-model.ts index 193c42e87..78bf9b4a9 100644 --- a/src/app/modules/common-regobs-api/models/avalanche-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/avalanche-obs-view-model.ts @@ -1,128 +1,112 @@ -/* tslint:disable */ -export interface AvalancheObsViewModel { - - /** - * Eksposisjon - */ - Aspect?: number; - AvalCauseName?: string; - - /** - * Skredutløser. The AvalCauseTID unique identifier - */ - AvalCauseTID?: number; - AvalancheName?: string; - - /** - * Skredtype. The AvalancheKD unique identifier - */ - AvalancheTID?: number; - AvalancheTriggerName?: string; - - /** - * Skredutløser. The AvalancheTriggerKD unique identifier - */ - AvalancheTriggerTID?: number; - - /** - * Comment - */ - Comment?: string; - DestructiveSizeName?: string; - - /** - * Størrelse. The DestructiveSizeKD unique identifier - */ - DestructiveSizeTID?: number; - - /** - * Tid da skredet gikk. - */ - DtAvalancheTime: string; - - /** - * Tidligste tidspunkt da skredet gikk. - */ - DtEarliestAvalancheTime?: string; - - /** - * Hull of avalanche polygon, List(lon, lat) - */ - Extent?: Array>; - - /** - * Bruddhøyde - */ - FractureHeight?: number; - - /** - * Bruddbredde - */ - FractureWidth?: number; - - /** - * Høyde i løsneområde - */ - HeightStartZone?: number; - - /** - * Høyde i stoppområdet - */ - HeightStopZone?: number; - - /** - * Ble skredet fjernutløst? - */ - RemotelyTriggered?: boolean; - - /** - * SnowLine - */ - SnowLine?: number; - - /** - * Hull of avalanche starting zone, List(lon, lat) - */ - StartExtent?: Array>; - - /** - * StartLat - */ - StartLat?: number; - - /** - * StartLong - */ - StartLong?: number; - - /** - * Hull of avalanche runout zone, List (lon, lat) - */ - StopExtent?: Array>; - - /** - * StopLat - */ - StopLat?: number; - - /** - * StopLong - */ - StopLong?: number; - TerrainStartZoneName?: string; - - /** - * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier - */ - TerrainStartZoneTID?: number; - - /** - * Skredbanenavn - */ - Trajectory?: string; - - /** - * ValidExposition - */ - ValidExposition?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface AvalancheObsViewModel { + /** + * Eksposisjon + */ + Aspect?: number; + AvalancheName?: string; + /** + * Skredtype. The AvalancheKD unique identifier + */ + AvalancheTID?: number; + AvalancheTriggerName?: string; + /** + * Skredutløser. The AvalancheTriggerKD unique identifier + */ + AvalancheTriggerTID?: number; + AvalCauseName?: string; + /** + * Skredutløser. The AvalCauseTID unique identifier + */ + AvalCauseTID?: number; + /** + * Comment + */ + Comment?: string; + DestructiveSizeName?: string; + /** + * Størrelse. The DestructiveSizeKD unique identifier + */ + DestructiveSizeTID?: number; + /** + * Tid da skredet gikk. + */ + DtAvalancheTime: string; + /** + * Tidligste tidspunkt da skredet gikk. + */ + DtEarliestAvalancheTime?: string; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array>; + /** + * Bruddhøyde + */ + FractureHeight?: number; + /** + * Bruddbredde + */ + FractureWidth?: number; + /** + * Høyde i løsneområde + */ + HeightStartZone?: number; + /** + * Høyde i stoppområdet + */ + HeightStopZone?: number; + /** + * Ble skredet fjernutløst? + */ + RemotelyTriggered?: boolean; + /** + * SnowLine + */ + SnowLine?: number; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array>; + /** + * StartLat + */ + StartLat?: number; + /** + * StartLong + */ + StartLong?: number; + /** + * Hull of avalanche runout zone, List (lon, lat) + */ + StopExtent?: Array>; + /** + * StopLat + */ + StopLat?: number; + /** + * StopLong + */ + StopLong?: number; + TerrainStartZoneName?: string; + /** + * Terrengtype i løsneområdet. The TerrainStartZoneKD unique identifier + */ + TerrainStartZoneTID?: number; + /** + * Skredbanenavn + */ + Trajectory?: string; + /** + * ValidExposition + */ + ValidExposition?: string; } + diff --git a/src/app/modules/common-regobs-api/models/compression-test-edit-model.ts b/src/app/modules/common-regobs-api/models/compression-test-edit-model.ts index 2c928d96b..5da1ee966 100644 --- a/src/app/modules/common-regobs-api/models/compression-test-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/compression-test-edit-model.ts @@ -1,59 +1,56 @@ -/* tslint:disable */ -export interface CompressionTestEditModel { - - /** - * Comment - */ - Comment?: string; - - /** - * The ComprTestFractureKD unique identifier - */ - ComprTestFractureTID?: number; - - /** - * The CompressionTestKDV unique identifier - */ - CompressionTestTID?: number; - - /** - * FractureDepth - */ - FractureDepth?: number; - IncludeInSnowProfile?: boolean; - - /** - * The PropagationKD unique identifier - */ - PropagationTID?: number; - - /** - * PST X distance (in meters) - */ - PstX?: number; - - /** - * PST Y distance (in meters) - */ - PstY?: number; - - /** - * Percentage of block that released in Rutchblock test - */ - RbRelease?: number; - - /** - * The StabilityEvalKD unique identifier - */ - StabilityEvalTID?: number; - - /** - * TapsFracture - */ - TapsFracture?: number; - - /** - * TapsFullPropagation - */ - TapsFullPropagation?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface CompressionTestEditModel { + /** + * Comment + */ + Comment?: string; + /** + * The CompressionTestKDV unique identifier + */ + CompressionTestTID?: number; + /** + * The ComprTestFractureKD unique identifier + */ + ComprTestFractureTID?: number; + /** + * FractureDepth + */ + FractureDepth?: number; + IncludeInSnowProfile?: boolean; + /** + * The PropagationKD unique identifier + */ + PropagationTID?: number; + /** + * PST X distance (in meters) + */ + PstX?: number; + /** + * PST Y distance (in meters) + */ + PstY?: number; + /** + * Percentage of block that released in Rutchblock test + */ + RbRelease?: number; + /** + * The StabilityEvalKD unique identifier + */ + StabilityEvalTID?: number; + /** + * TapsFracture + */ + TapsFracture?: number; + /** + * TapsFullPropagation + */ + TapsFullPropagation?: number; } + diff --git a/src/app/modules/common-regobs-api/models/compression-test-view-model.ts b/src/app/modules/common-regobs-api/models/compression-test-view-model.ts index 8239db033..76e547810 100644 --- a/src/app/modules/common-regobs-api/models/compression-test-view-model.ts +++ b/src/app/modules/common-regobs-api/models/compression-test-view-model.ts @@ -1,63 +1,60 @@ -/* tslint:disable */ -export interface CompressionTestViewModel { - - /** - * Comment - */ - Comment?: string; - ComprTestFractureName?: string; - - /** - * The ComprTestFractureKD unique identifier - */ - ComprTestFractureTID?: number; - CompressionTestName?: string; - - /** - * The CompressionTestKDV unique identifier - */ - CompressionTestTID?: number; - - /** - * FractureDepth - */ - FractureDepth?: number; - IncludeInSnowProfile?: boolean; - PropagationName?: string; - - /** - * The PropagationKD unique identifier - */ - PropagationTID?: number; - - /** - * PST X distance (in meters) - */ - PstX?: number; - - /** - * PST Y distance (in meters) - */ - PstY?: number; - - /** - * Percentage of block that released in Rutchblock test - */ - RbRelease?: number; - StabilityEvalName?: string; - - /** - * The StabilityEvalKD unique identifier - */ - StabilityEvalTID?: number; - - /** - * TapsFracture - */ - TapsFracture?: number; - - /** - * TapsFullPropagation - */ - TapsFullPropagation?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface CompressionTestViewModel { + /** + * Comment + */ + Comment?: string; + CompressionTestName?: string; + /** + * The CompressionTestKDV unique identifier + */ + CompressionTestTID?: number; + ComprTestFractureName?: string; + /** + * The ComprTestFractureKD unique identifier + */ + ComprTestFractureTID?: number; + /** + * FractureDepth + */ + FractureDepth?: number; + IncludeInSnowProfile?: boolean; + PropagationName?: string; + /** + * The PropagationKD unique identifier + */ + PropagationTID?: number; + /** + * PST X distance (in meters) + */ + PstX?: number; + /** + * PST Y distance (in meters) + */ + PstY?: number; + /** + * Percentage of block that released in Rutchblock test + */ + RbRelease?: number; + StabilityEvalName?: string; + /** + * The StabilityEvalKD unique identifier + */ + StabilityEvalTID?: number; + /** + * TapsFracture + */ + TapsFracture?: number; + /** + * TapsFullPropagation + */ + TapsFullPropagation?: number; } + diff --git a/src/app/modules/common-regobs-api/models/county-dto.ts b/src/app/modules/common-regobs-api/models/county-dto.ts index 67cc41839..fcfb6d5c9 100644 --- a/src/app/modules/common-regobs-api/models/county-dto.ts +++ b/src/app/modules/common-regobs-api/models/county-dto.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface CountyDto { - CountyNo?: string; - Name?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface CountyDto { + CountyNo?: string; + Name?: string; } + diff --git a/src/app/modules/common-regobs-api/models/create-trip-dto.ts b/src/app/modules/common-regobs-api/models/create-trip-dto.ts index 0ef594209..0aefc1897 100644 --- a/src/app/modules/common-regobs-api/models/create-trip-dto.ts +++ b/src/app/modules/common-regobs-api/models/create-trip-dto.ts @@ -1,10 +1,18 @@ -/* tslint:disable */ -export interface CreateTripDto { - Comment?: string; - DeviceGuid?: string; - GeoHazardID?: number; - Lat?: string; - Lng?: string; - ObservationExpectedMinutes?: number; - TripTypeID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface CreateTripDto { + Comment?: string; + DeviceGuid: string; + GeoHazardID: number; + Lat?: string; + Lng?: string; + ObservationExpectedMinutes: number; + TripTypeID: number; } + diff --git a/src/app/modules/common-regobs-api/models/damage-obs-edit-model.ts b/src/app/modules/common-regobs-api/models/damage-obs-edit-model.ts index 3fda6e3a1..e3599a5c0 100644 --- a/src/app/modules/common-regobs-api/models/damage-obs-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/damage-obs-edit-model.ts @@ -1,10 +1,18 @@ -/* tslint:disable */ -import { AttachmentEditModel } from './attachment-edit-model'; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { LatLng } from './lat-lng'; -export interface DamageObsEditModel { - Attachments?: Array; - Comment?: string; - DamagePosition?: LatLng; - DamageTypeTID: number; - GeoHazardTID?: number; +import { AttachmentEditModel } from './attachment-edit-model'; + + +export interface DamageObsEditModel { + Attachments?: Array; + Comment?: string; + DamagePosition?: LatLng; + DamageTypeTID: number; + GeoHazardTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/damage-obs-view-model.ts b/src/app/modules/common-regobs-api/models/damage-obs-view-model.ts index 75156bc84..e1862b153 100644 --- a/src/app/modules/common-regobs-api/models/damage-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/damage-obs-view-model.ts @@ -1,12 +1,20 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { AttachmentViewModel } from './attachment-view-model'; import { LatLng } from './lat-lng'; -export interface DamageObsViewModel { - Attachments?: Array; - Comment?: string; - DamagePosition?: LatLng; - DamageTypeName?: string; - DamageTypeTID: number; - GeoHazardName?: string; - GeoHazardTID?: number; + + +export interface DamageObsViewModel { + Attachments?: Array; + Comment?: string; + DamagePosition?: LatLng; + DamageTypeName?: string; + DamageTypeTID: number; + GeoHazardName?: string; + GeoHazardTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/danger-obs-edit-model.ts b/src/app/modules/common-regobs-api/models/danger-obs-edit-model.ts index 1a1633839..74b288659 100644 --- a/src/app/modules/common-regobs-api/models/danger-obs-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/danger-obs-edit-model.ts @@ -1,18 +1,23 @@ -/* tslint:disable */ -export interface DangerObsEditModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Kommentarfelt for å skrive utfyllende tekst om faretegnet. - */ - Comment?: string; - /** - * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier - */ - DangerSignTID: number; - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; +export interface DangerObsEditModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om faretegnet. + */ + Comment?: string; + /** + * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier + */ + DangerSignTID?: number; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/danger-obs-view-model.ts b/src/app/modules/common-regobs-api/models/danger-obs-view-model.ts index 40ef332ac..32ab7baec 100644 --- a/src/app/modules/common-regobs-api/models/danger-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/danger-obs-view-model.ts @@ -1,20 +1,25 @@ -/* tslint:disable */ -export interface DangerObsViewModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Kommentarfelt for å skrive utfyllende tekst om faretegnet. - */ - Comment?: string; - DangerSignName?: string; - /** - * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier - */ - DangerSignTID?: number; - GeoHazardName?: string; - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; +export interface DangerObsViewModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om faretegnet. + */ + Comment?: string; + DangerSignName?: string; + /** + * Faretegn er listet i tabellen DangerSignKD. The DangerSignKD unique identifier + */ + DangerSignTID?: number; + GeoHazardName?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/finish-trip-dto.ts b/src/app/modules/common-regobs-api/models/finish-trip-dto.ts index b91606641..9de49f1ae 100644 --- a/src/app/modules/common-regobs-api/models/finish-trip-dto.ts +++ b/src/app/modules/common-regobs-api/models/finish-trip-dto.ts @@ -1,4 +1,12 @@ -/* tslint:disable */ -export interface FinishTripDto { - DeviceGuid?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface FinishTripDto { + DeviceGuid: string; } + diff --git a/src/app/modules/common-regobs-api/models/forecast-region-dto.ts b/src/app/modules/common-regobs-api/models/forecast-region-dto.ts index 937ba8acf..2b6b5616a 100644 --- a/src/app/modules/common-regobs-api/models/forecast-region-dto.ts +++ b/src/app/modules/common-regobs-api/models/forecast-region-dto.ts @@ -1,9 +1,17 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { ForecastRegionSubRegionDto } from './forecast-region-sub-region-dto'; -export interface ForecastRegionDto { - Id?: number; - IsRegionForGrouping?: boolean; - SortOrder?: number; - SubRegions?: Array; - Text?: string; + + +export interface ForecastRegionDto { + Id: number; + IsRegionForGrouping: boolean; + SortOrder: number; + SubRegions?: Array; + Text?: string; } + diff --git a/src/app/modules/common-regobs-api/models/forecast-region-sub-region-dto.ts b/src/app/modules/common-regobs-api/models/forecast-region-sub-region-dto.ts index aa0215351..d859de434 100644 --- a/src/app/modules/common-regobs-api/models/forecast-region-sub-region-dto.ts +++ b/src/app/modules/common-regobs-api/models/forecast-region-sub-region-dto.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface ForecastRegionSubRegionDto { - Id?: number; - RegionType?: string; - SortOrder?: number; - Text?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ForecastRegionSubRegionDto { + Id: number; + RegionType?: string; + SortOrder: number; + Text?: string; } + diff --git a/src/app/modules/common-regobs-api/models/general-observation-edit-model.ts b/src/app/modules/common-regobs-api/models/general-observation-edit-model.ts index 5b36bb46b..97e6a1c5d 100644 --- a/src/app/modules/common-regobs-api/models/general-observation-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/general-observation-edit-model.ts @@ -1,25 +1,29 @@ -/* tslint:disable */ -import { UrlEditModel } from './url-edit-model'; -export interface GeneralObservationEditModel { - - /** - * Kommentarfelt for å skrive utfyllende tekst - */ - Comment?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). - */ - GeoHazardTID?: number; +import { UrlEditModel } from './url-edit-model'; - /** - * Selve registreringen. - */ - ObsComment?: string; - /** - * Overskriften (hovedpoenget). - */ - ObsHeader?: string; - Urls?: Array; +export interface GeneralObservationEditModel { + /** + * Kommentarfelt for å skrive utfyllende tekst + */ + Comment?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number; + /** + * Selve registreringen. + */ + ObsComment?: string; + /** + * Overskriften (hovedpoenget). + */ + ObsHeader?: string; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/general-observation-view-model.ts b/src/app/modules/common-regobs-api/models/general-observation-view-model.ts index 55c562553..47ffd0bec 100644 --- a/src/app/modules/common-regobs-api/models/general-observation-view-model.ts +++ b/src/app/modules/common-regobs-api/models/general-observation-view-model.ts @@ -1,26 +1,30 @@ -/* tslint:disable */ -import { UrlViewModel } from './url-view-model'; -export interface GeneralObservationViewModel { - - /** - * Kommentarfelt for å skrive utfyllende tekst - */ - Comment?: string; - GeoHazardName?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). - */ - GeoHazardTID?: number; +import { UrlViewModel } from './url-view-model'; - /** - * Selve registreringen. - */ - ObsComment?: string; - /** - * Overskriften (hovedpoenget). - */ - ObsHeader?: string; - Urls?: Array; +export interface GeneralObservationViewModel { + /** + * Kommentarfelt for å skrive utfyllende tekst + */ + Comment?: string; + GeoHazardName?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number; + /** + * Selve registreringen. + */ + ObsComment?: string; + /** + * Overskriften (hovedpoenget). + */ + ObsHeader?: string; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/geo-hazard-types.ts b/src/app/modules/common-regobs-api/models/geo-hazard-types.ts new file mode 100644 index 000000000..dcb73487d --- /dev/null +++ b/src/app/modules/common-regobs-api/models/geo-hazard-types.ts @@ -0,0 +1,27 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * NotSpecified = 0, Avalanche = 10, EarthFlow = 20, LandSlide = 30, RockFall = 40, IceFall = 50, Flooding = 60, Ice = 70, EventOnGlacier = 100, Jøkulhaup = 110, Drought = 200, Unknown = 999 + */ +export const GeoHazardTypes = { + NUMBER_0: 0, + NUMBER_10: 10, + NUMBER_20: 20, + NUMBER_30: 30, + NUMBER_40: 40, + NUMBER_50: 50, + NUMBER_60: 60, + NUMBER_70: 70, + NUMBER_100: 100, + NUMBER_110: 110, + NUMBER_200: 200, + NUMBER_999: 999 +} as const; +export type GeoHazardTypes = typeof GeoHazardTypes[keyof typeof GeoHazardTypes]; + diff --git a/src/app/modules/common-regobs-api/models/geo-location-info.ts b/src/app/modules/common-regobs-api/models/geo-location-info.ts index 75883c74e..dcb052392 100644 --- a/src/app/modules/common-regobs-api/models/geo-location-info.ts +++ b/src/app/modules/common-regobs-api/models/geo-location-info.ts @@ -1,14 +1,22 @@ -/* tslint:disable */ -export interface GeoLocationInfo { - AdminAreaId?: string; - AdminAreaName?: string; - Country?: string; - CountryCode?: string; - Masl?: number; - Municipality?: string; - MunicipalityId?: string; - Name?: string; - Steepness?: number; - WarningRegionId?: string; - WarningRegionName?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface GeoLocationInfo { + AdminAreaId?: string; + AdminAreaName?: string; + Country?: string; + CountryCode?: string; + Masl?: number; + Municipality?: string; + MunicipalityId?: string; + Name?: string; + Steepness?: number; + WarningRegionId?: string; + WarningRegionName?: string; } + diff --git a/src/app/modules/common-regobs-api/models/geo-location-summary.ts b/src/app/modules/common-regobs-api/models/geo-location-summary.ts index ca6331e2b..741a98b93 100644 --- a/src/app/modules/common-regobs-api/models/geo-location-summary.ts +++ b/src/app/modules/common-regobs-api/models/geo-location-summary.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface GeoLocationSummary { - Header?: string; - Lines?: Array; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface GeoLocationSummary { + Header?: string; + Lines?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/helptext-dto.ts b/src/app/modules/common-regobs-api/models/helptext-dto.ts index 67b00af51..342307460 100644 --- a/src/app/modules/common-regobs-api/models/helptext-dto.ts +++ b/src/app/modules/common-regobs-api/models/helptext-dto.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface HelptextDto { - GeoHazardTID?: number; - LangKey?: number; - RegistrationTID?: number; - Text?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface HelptextDto { + GeoHazardTID: number; + LangKey: number; + RegistrationTID: number; + Text?: string; } + diff --git a/src/app/modules/common-regobs-api/models/ice-cover-edit-model.ts b/src/app/modules/common-regobs-api/models/ice-cover-edit-model.ts index 7edd34b2a..535a1ba5d 100644 --- a/src/app/modules/common-regobs-api/models/ice-cover-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-cover-edit-model.ts @@ -1,31 +1,34 @@ -/* tslint:disable */ -import { UrlEditModel } from './url-edit-model'; -export interface IceCoverEditModel { - - /** - * Kommentarfelt for å skrive utfyllende tekst om observasjonen. - */ - Comment?: string; - - /** - * Bæreevne. IceCapacityKD unique identifier - */ - IceCapacityTID?: number; - IceCoverAfterTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier - */ - IceCoverBeforeTID?: number; +import { UrlEditModel } from './url-edit-model'; - /** - * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier - */ - IceCoverTID?: number; - /** - * Skøytebarhet. IceSkateabilityKD unique identifier - */ - IceSkateabilityTID?: number; - Urls?: Array; +export interface IceCoverEditModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + /** + * Bæreevne. IceCapacityKD unique identifier + */ + IceCapacityTID?: number; + IceCoverAfterTID?: number; + /** + * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier + */ + IceCoverBeforeTID?: number; + /** + * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier + */ + IceCoverTID?: number; + /** + * Skøytebarhet. IceSkateabilityKD unique identifier + */ + IceSkateabilityTID?: number; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/ice-cover-view-model.ts b/src/app/modules/common-regobs-api/models/ice-cover-view-model.ts index 7b80bb4eb..c92241cdf 100644 --- a/src/app/modules/common-regobs-api/models/ice-cover-view-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-cover-view-model.ts @@ -1,36 +1,39 @@ -/* tslint:disable */ -import { UrlViewModel } from './url-view-model'; -export interface IceCoverViewModel { - - /** - * Kommentarfelt for å skrive utfyllende tekst om observasjonen. - */ - Comment?: string; - IceCapacityName?: string; - - /** - * Bæreevne. IceCapacityKD unique identifier - */ - IceCapacityTID?: number; - IceCoverAfterName?: string; - IceCoverAfterTID?: number; - IceCoverBeforeName?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier - */ - IceCoverBeforeTID?: number; - IceCoverName?: string; +import { UrlViewModel } from './url-view-model'; - /** - * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier - */ - IceCoverTID?: number; - IceSkateabilityName?: string; - /** - * Skøytebarhet. IceSkateabilityKD unique identifier - */ - IceSkateabilityTID?: number; - Urls?: Array; +export interface IceCoverViewModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + IceCapacityName?: string; + /** + * Bæreevne. IceCapacityKD unique identifier + */ + IceCapacityTID?: number; + IceCoverAfterName?: string; + IceCoverAfterTID?: number; + IceCoverBeforeName?: string; + /** + * Hvordan har vannet vært isdekt før den aktuelle observajonen? Feks var det isfritt? Feltet sier noe om hvordan utviklingen er. The IceCoverBeforeKD unique identifier + */ + IceCoverBeforeTID?: number; + IceCoverName?: string; + /** + * Hvordan er vannet dekket av is nå. The IceCoverKD unique identifier + */ + IceCoverTID?: number; + IceSkateabilityName?: string; + /** + * Skøytebarhet. IceSkateabilityKD unique identifier + */ + IceSkateabilityTID?: number; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/ice-thickness-edit-model.ts b/src/app/modules/common-regobs-api/models/ice-thickness-edit-model.ts index f867c2147..13a0adc9e 100644 --- a/src/app/modules/common-regobs-api/models/ice-thickness-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-thickness-edit-model.ts @@ -1,35 +1,37 @@ -/* tslint:disable */ -import { IceThicknessLayerEditModel } from './ice-thickness-layer-edit-model'; -export interface IceThicknessEditModel { - - /** - * Comment - */ - Comment?: string; - - /** - * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. - */ - IceHeightAfter?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. - */ - IceHeightBefore?: number; - IceThicknessLayers?: Array; - - /** - * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. - */ - IceThicknessSum?: number; +import { IceThicknessLayerEditModel } from './ice-thickness-layer-edit-model'; - /** - * Mengden sørpe oppå isen. Verdi i meter [m]. - */ - SlushSnow?: number; - /** - * Mengden tørr snø oppå isen. Verdi i meter [m]. - */ - SnowDepth?: number; +export interface IceThicknessEditModel { + /** + * Comment + */ + Comment?: string; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightAfter?: number; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightBefore?: number; + IceThicknessLayers?: Array; + /** + * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. + */ + IceThicknessSum?: number; + /** + * Mengden sørpe oppå isen. Verdi i meter [m]. + */ + SlushSnow?: number; + /** + * Mengden tørr snø oppå isen. Verdi i meter [m]. + */ + SnowDepth?: number; } + diff --git a/src/app/modules/common-regobs-api/models/ice-thickness-layer-edit-model.ts b/src/app/modules/common-regobs-api/models/ice-thickness-layer-edit-model.ts index 40cbd26bd..277aba206 100644 --- a/src/app/modules/common-regobs-api/models/ice-thickness-layer-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-thickness-layer-edit-model.ts @@ -1,18 +1,23 @@ -/* tslint:disable */ -export interface IceThicknessLayerEditModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Comment - */ - Comment?: string; - /** - * The IceLayerKD unique identifier - */ - IceLayerTID?: number; - /** - * IceLayerThickness - */ - IceLayerThickness?: number; +export interface IceThicknessLayerEditModel { + /** + * Comment + */ + Comment?: string; + /** + * IceLayerThickness + */ + IceLayerThickness?: number; + /** + * The IceLayerKD unique identifier + */ + IceLayerTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/ice-thickness-layer-view-model.ts b/src/app/modules/common-regobs-api/models/ice-thickness-layer-view-model.ts index 1b908c323..251b2cb8a 100644 --- a/src/app/modules/common-regobs-api/models/ice-thickness-layer-view-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-thickness-layer-view-model.ts @@ -1,19 +1,24 @@ -/* tslint:disable */ -export interface IceThicknessLayerViewModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Comment - */ - Comment?: string; - IceLayerName?: string; - /** - * The IceLayerKD unique identifier - */ - IceLayerTID?: number; - /** - * IceLayerThickness - */ - IceLayerThickness?: number; +export interface IceThicknessLayerViewModel { + /** + * Comment + */ + Comment?: string; + IceLayerName?: string; + /** + * IceLayerThickness + */ + IceLayerThickness?: number; + /** + * The IceLayerKD unique identifier + */ + IceLayerTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/ice-thickness-view-model.ts b/src/app/modules/common-regobs-api/models/ice-thickness-view-model.ts index 681f6595b..f92887735 100644 --- a/src/app/modules/common-regobs-api/models/ice-thickness-view-model.ts +++ b/src/app/modules/common-regobs-api/models/ice-thickness-view-model.ts @@ -1,35 +1,37 @@ -/* tslint:disable */ -import { IceThicknessLayerViewModel } from './ice-thickness-layer-view-model'; -export interface IceThicknessViewModel { - - /** - * Comment - */ - Comment?: string; - - /** - * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. - */ - IceHeightAfter?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. - */ - IceHeightBefore?: number; - IceThicknessLayers?: Array; - - /** - * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. - */ - IceThicknessSum?: number; +import { IceThicknessLayerViewModel } from './ice-thickness-layer-view-model'; - /** - * Mengden sørpe oppå isen. Verdi i meter [m]. - */ - SlushSnow?: number; - /** - * Mengden tørr snø oppå isen. Verdi i meter [m]. - */ - SnowDepth?: number; +export interface IceThicknessViewModel { + /** + * Comment + */ + Comment?: string; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden etter borring. IPositive verdier angir at vannet står nedi hulet og og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightAfter?: number; + /** + * Isen kan være presset under vannspeilet eller flyte oppå. Her registreres denne høyden før borring. IceHeightBefore = 0 betyr at isen er tørr og negative verdier angir overvann. Verdi i meter [m]. + */ + IceHeightBefore?: number; + IceThicknessLayers?: Array; + /** + * Total istykkelse. I tabellen IceThicknessLayer kan individuelle islag registreres. Summen av dem skal samsvare med IceThickenssSum. Verdi i meter [m]. + */ + IceThicknessSum?: number; + /** + * Mengden sørpe oppå isen. Verdi i meter [m]. + */ + SlushSnow?: number; + /** + * Mengden tørr snø oppå isen. Verdi i meter [m]. + */ + SnowDepth?: number; } + diff --git a/src/app/modules/common-regobs-api/models/incident-edit-model.ts b/src/app/modules/common-regobs-api/models/incident-edit-model.ts index e8dffc4df..10ded9a10 100644 --- a/src/app/modules/common-regobs-api/models/incident-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/incident-edit-model.ts @@ -1,114 +1,100 @@ -/* tslint:disable */ -import { UrlEditModel } from './url-edit-model'; -export interface IncidentEditModel { - - /** - * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier - */ - ActivityInfluencedTID?: number; - - /** - * Hvor mange var i skredet/vannet? - */ - CasualtiesNum?: number; - - /** - * Comment. - */ - Comment?: string; - - /** - * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier - */ - DamageExtentTID?: number; - - /** - * Hvor mange døde? - */ - DeadNum?: number; - - /** - * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? - */ - DtEndTime?: string; - - /** - * Hvor mange evakuerte? - */ - EvacuatedNum?: number; - - /** - * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier - */ - ForecastAccurateTID?: number; - - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). - */ - GeoHazardTID?: number; - - /** - * Hvor mange vart skadd? - */ - HarmedNum?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Hendelsen beskrives med overskrift .. - */ - IncidentHeader?: string; - - /** - * .. med ingress eller sammendrag .. - */ - IncidentIngress?: string; - - /** - * .. og teksten eller artikkelen. - */ - IncidentText?: string; - - /** - * Provide description for IncidentURLs - */ - IncidentURLs?: Array; - - /** - * Hvor mange var involvert? - */ - InvolvedNum?: number; - - /** - * Hvor ofte er man i området? - */ - LocalKnowledgeTID?: number; - - /** - * Var man lokal, norsk eller utenlandsk turist? - */ - LocalTouristTID?: number; - - /** - * Er det noen materielle skader? - */ - MaterialDamages?: boolean; - - /** - * Hvem gjennomførte redningen? - */ - RescueTID?: number; - - /** - * Var det noe sikkerhetsutstyr i bruk? - */ - SafetyGearTID?: number; +import { UrlEditModel } from './url-edit-model'; - /** - * Hvilken turfase? - */ - SlopeActivityTID?: number; - /** - * Er trafikk hindret? - */ - TrafficObstructed?: boolean; +export interface IncidentEditModel { + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number; + /** + * Hvor mange var i skredet/vannet? + */ + CasualtiesNum?: number; + /** + * Comment. + */ + Comment?: string; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number; + /** + * Hvor mange døde? + */ + DeadNum?: number; + /** + * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? + */ + DtEndTime?: string; + /** + * Hvor mange evakuerte? + */ + EvacuatedNum?: number; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number; + /** + * Hvor mange vart skadd? + */ + HarmedNum?: number; + /** + * Hendelsen beskrives med overskrift .. + */ + IncidentHeader?: string; + /** + * .. med ingress eller sammendrag .. + */ + IncidentIngress?: string; + /** + * .. og teksten eller artikkelen. + */ + IncidentText?: string; + /** + * Provide description for IncidentURLs + */ + IncidentURLs?: Array; + /** + * Hvor mange var involvert? + */ + InvolvedNum?: number; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeTID?: number; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristTID?: number; + /** + * Er det noen materielle skader? + */ + MaterialDamages?: boolean; + /** + * Hvem gjennomførte redningen? + */ + RescueTID?: number; + /** + * Var det noe sikkerhetsutstyr i bruk? + */ + SafetyGearTID?: number; + /** + * Hvilken turfase? + */ + SlopeActivityTID?: number; + /** + * Er trafikk hindret? + */ + TrafficObstructed?: boolean; } + diff --git a/src/app/modules/common-regobs-api/models/incident-view-model.ts b/src/app/modules/common-regobs-api/models/incident-view-model.ts index aa4f3823e..f6f5dd7bc 100644 --- a/src/app/modules/common-regobs-api/models/incident-view-model.ts +++ b/src/app/modules/common-regobs-api/models/incident-view-model.ts @@ -1,143 +1,124 @@ -/* tslint:disable */ -import { UrlViewModel } from './url-view-model'; -export interface IncidentViewModel { - ActivityInfluencedName?: string; - - /** - * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier - */ - ActivityInfluencedTID?: number; - - /** - * Hvor mange var i skredet/vannet? - */ - CasualtiesNum?: number; - - /** - * Comment. - */ - Comment?: string; - DamageExtentName?: string; - - /** - * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier - */ - DamageExtentTID?: number; - - /** - * Hvor mange døde? - */ - DeadNum?: number; - - /** - * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? - */ - DtEndTime?: string; - - /** - * Hvor mange evakuerte? - */ - EvacuatedNum?: number; - ForecastAccurateName?: string; - - /** - * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier - */ - ForecastAccurateTID?: number; - GeoHazardName?: string; - - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). - */ - GeoHazardTID?: number; - - /** - * Hvor mange vart skadd? - */ - HarmedNum?: number; - - /** - * Hendelsen beskrives med overskrift .. - */ - IncidentHeader?: string; - - /** - * .. med ingress eller sammendrag .. - */ - IncidentIngress?: string; - - /** - * .. og teksten eller artikkelen. - */ - IncidentText?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Provide description for IncidentURLs - */ - IncidentURLs?: Array; - - /** - * Hvor mange var involvert? - */ - InvolvedNum?: number; - - /** - * Hvor ofte er man i området? - */ - LocalKnowledgeName?: string; - - /** - * Hvor ofte er man i området? - */ - LocalKnowledgeTID?: number; - - /** - * Var man lokal, norsk eller utenlandsk turist? - */ - LocalTouristName?: string; - - /** - * Var man lokal, norsk eller utenlandsk turist? - */ - LocalTouristTID?: number; - - /** - * Er det noen materielle skader? - */ - MaterialDamages?: boolean; - - /** - * Hvem gjennomførte redningen? - */ - RescueName?: string; - - /** - * Hvem gjennomførte redningen? - */ - RescueTID?: number; - - /** - * Hadde man sikkerhetsutstyr? - */ - SafetyGearName?: string; - - /** - * Var det noe sikkerhetsutstyr i bruk? - */ - SafetyGearTID?: number; - - /** - * Hvilken turfase gjelder det? - */ - SlopeActivityName?: string; +import { UrlViewModel } from './url-view-model'; - /** - * Hvilken turfase? - */ - SlopeActivityTID?: number; - /** - * Er trafikk hindret? - */ - TrafficObstructed?: boolean; +export interface IncidentViewModel { + ActivityInfluencedName?: string; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number; + /** + * Hvor mange var i skredet/vannet? + */ + CasualtiesNum?: number; + /** + * Comment. + */ + Comment?: string; + DamageExtentName?: string; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number; + /** + * Hvor mange døde? + */ + DeadNum?: number; + /** + * Om hendelsen strakte seg ut i tid, når sluttet den å gjelde? Feks, når åpnet veien igjen etter raset? + */ + DtEndTime?: string; + /** + * Hvor mange evakuerte? + */ + EvacuatedNum?: number; + ForecastAccurateName?: string; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number; + GeoHazardName?: string; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). + */ + GeoHazardTID?: number; + /** + * Hvor mange vart skadd? + */ + HarmedNum?: number; + /** + * Hendelsen beskrives med overskrift .. + */ + IncidentHeader?: string; + /** + * .. med ingress eller sammendrag .. + */ + IncidentIngress?: string; + /** + * .. og teksten eller artikkelen. + */ + IncidentText?: string; + /** + * Provide description for IncidentURLs + */ + IncidentURLs?: Array; + /** + * Hvor mange var involvert? + */ + InvolvedNum?: number; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeName?: string; + /** + * Hvor ofte er man i området? + */ + LocalKnowledgeTID?: number; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristName?: string; + /** + * Var man lokal, norsk eller utenlandsk turist? + */ + LocalTouristTID?: number; + /** + * Er det noen materielle skader? + */ + MaterialDamages?: boolean; + /** + * Hvem gjennomførte redningen? + */ + RescueName?: string; + /** + * Hvem gjennomførte redningen? + */ + RescueTID?: number; + /** + * Hadde man sikkerhetsutstyr? + */ + SafetyGearName?: string; + /** + * Var det noe sikkerhetsutstyr i bruk? + */ + SafetyGearTID?: number; + /** + * Hvilken turfase gjelder det? + */ + SlopeActivityName?: string; + /** + * Hvilken turfase? + */ + SlopeActivityTID?: number; + /** + * Er trafikk hindret? + */ + TrafficObstructed?: boolean; } + diff --git a/src/app/modules/common-regobs-api/models/index.ts b/src/app/modules/common-regobs-api/models/index.ts new file mode 100644 index 000000000..5f62139dd --- /dev/null +++ b/src/app/modules/common-regobs-api/models/index.ts @@ -0,0 +1,105 @@ +export * from './areas-dto-forecast-regions'; +export * from './areas-dto'; +export * from './at-a-glance-view-model'; +export * from './attachment-edit-model'; +export * from './attachment-view-model-url-formats'; +export * from './attachment-view-model'; +export * from './avalanche-activity-obs-view-model'; +export * from './avalanche-activity-obs2-edit-model'; +export * from './avalanche-activity-obs2-view-model'; +export * from './avalanche-danger-obs-view-model'; +export * from './avalanche-eval-problem-view-model'; +export * from './avalanche-eval-problem2-edit-model'; +export * from './avalanche-eval-problem2-view-model'; +export * from './avalanche-evaluation-view-model'; +export * from './avalanche-evaluation2-view-model'; +export * from './avalanche-evaluation3-edit-model'; +export * from './avalanche-evaluation3-view-model'; +export * from './avalanche-obs-edit-model'; +export * from './avalanche-obs-view-model'; +export * from './compression-test-edit-model'; +export * from './compression-test-view-model'; +export * from './county-dto'; +export * from './create-trip-dto'; +export * from './damage-obs-edit-model'; +export * from './damage-obs-view-model'; +export * from './danger-obs-edit-model'; +export * from './danger-obs-view-model'; +export * from './finish-trip-dto'; +export * from './forecast-region-dto'; +export * from './forecast-region-sub-region-dto'; +export * from './general-observation-edit-model'; +export * from './general-observation-view-model'; +export * from './geo-hazard-types'; +export * from './geo-location-info'; +export * from './geo-location-summary'; +export * from './helptext-dto'; +export * from './ice-cover-edit-model'; +export * from './ice-cover-view-model'; +export * from './ice-thickness-edit-model'; +export * from './ice-thickness-layer-edit-model'; +export * from './ice-thickness-layer-view-model'; +export * from './ice-thickness-view-model'; +export * from './incident-edit-model'; +export * from './incident-view-model'; +export * from './kdv-element'; +export * from './kdv-elements-response-dto'; +export * from './landslide-edit-model'; +export * from './landslide-view-model'; +export * from './lang-key'; +export * from './lat-lng-object'; +export * from './lat-lng'; +export * from './my-page-data'; +export * from './obs-location-edit-model'; +export * from './obs-location-view-model'; +export * from './obs-locations-response-dto-v2'; +export * from './observer-competence-dto'; +export * from './observer-competence-level-dto'; +export * from './observer-group-dto'; +export * from './observer-patch-request-dto'; +export * from './observer-response-dto'; +export * from './observer-view-model'; +export * from './operator'; +export * from './position-dto'; +export * from './problem-details'; +export * from './property-filter'; +export * from './reg-obs-generic-value'; +export * from './registration-edit-model'; +export * from './registration-type-criteria-dto'; +export * from './registration-type-dto'; +export * from './registration-type-sub-type-dto'; +export * from './registration-view-model'; +export * from './registrations-with-attachments'; +export * from './search-count-response-dto'; +export * from './search-criteria-excl-user-request-dto'; +export * from './search-criteria-request-dto'; +export * from './search-side-bar-dto-observer-competence-levels'; +export * from './search-side-bar-dto-registration-types'; +export * from './search-side-bar-dto'; +export * from './search-side-bar-request-dto'; +export * from './snow-cover-obs-view-model'; +export * from './snow-density-layer-model'; +export * from './snow-density-model'; +export * from './snow-profile-edit-model'; +export * from './snow-profile-view-model'; +export * from './snow-surface-edit-model'; +export * from './snow-surface-view-model'; +export * from './snow-temp-model'; +export * from './snow-temp-obs-model'; +export * from './strat-profile-edit-model'; +export * from './strat-profile-layer-edit-model'; +export * from './strat-profile-layer-view-model'; +export * from './strat-profile-view-model'; +export * from './summary'; +export * from './url-edit-model'; +export * from './url-view-model'; +export * from './value-kind'; +export * from './water-level-measurement-edit-model'; +export * from './water-level-measurement-view-model'; +export * from './water-level-view-model'; +export * from './waterlevel2-edit-model'; +export * from './waterlevel2-view-model'; +export * from './weather-edit-model'; +export * from './weather-view-model'; +export * from './within-extent-criteria-dto'; +export * from './within-radius-criteria-dto'; diff --git a/src/app/modules/common-regobs-api/models/kdv-element.ts b/src/app/modules/common-regobs-api/models/kdv-element.ts index 8b40291db..47524a10d 100644 --- a/src/app/modules/common-regobs-api/models/kdv-element.ts +++ b/src/app/modules/common-regobs-api/models/kdv-element.ts @@ -1,6 +1,14 @@ -/* tslint:disable */ -export interface KdvElement { - Description?: string; - Id: number; - Name?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface KdvElement { + Description?: string; + Id: number; + Name?: string; } + diff --git a/src/app/modules/common-regobs-api/models/kdv-elements-response-dto.ts b/src/app/modules/common-regobs-api/models/kdv-elements-response-dto.ts index 60f7579a6..270b708f6 100644 --- a/src/app/modules/common-regobs-api/models/kdv-elements-response-dto.ts +++ b/src/app/modules/common-regobs-api/models/kdv-elements-response-dto.ts @@ -1,6 +1,14 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { KdvElement } from './kdv-element'; -export interface KdvElementsResponseDto { - KdvRepositories?: {[key: string]: Array}; - ViewRepositories?: {[key: string]: unknown}; + + +export interface KdvElementsResponseDto { + KdvRepositories?: { [key: string]: Array; }; + ViewRepositories?: any; } + diff --git a/src/app/modules/common-regobs-api/models/landslide-edit-model.ts b/src/app/modules/common-regobs-api/models/landslide-edit-model.ts index c95ed9d57..0cd16d431 100644 --- a/src/app/modules/common-regobs-api/models/landslide-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/landslide-edit-model.ts @@ -1,86 +1,78 @@ -/* tslint:disable */ -import { UrlEditModel } from './url-edit-model'; -export interface LandslideEditModel { - - /** - * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier - */ - ActivityInfluencedTID?: number; - Comment?: string; - - /** - * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier - */ - DamageExtentTID?: number; - - /** - * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. - */ - DtLandSlideTime: string; - - /** - * Når stoppet skredet? - */ - DtLandSlideTimeEnd?: string; - - /** - * Hull of avalanche polygon, List(lon, lat) - */ - Extent?: Array>; - - /** - * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier - */ - ForecastAccurateTID?: number; - - /** - * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Hvor stort er skredet? The LandSlideSizeKD unique identifier - */ - LandSlideSizeTID?: number; - - /** - * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier - */ - LandSlideTID?: number; - - /** - * Hva utløste skredet? The LandSlideTriggerKD unique identifier - */ - LandSlideTriggerTID?: number; - - /** - * Hull of avalanche starting zone, List(lon, lat) - */ - StartExtent?: Array>; - - /** - * Latitude start posisjon - */ - StartLat?: number; - - /** - * Long start posisjon - */ - StartLong?: number; - - /** - * Hull of avalanche runout zone, List(lon, lat) - */ - StopExtent?: Array>; +import { UrlEditModel } from './url-edit-model'; - /** - * Latitude stopp posisjon - */ - StopLat?: number; - /** - * Long stopp posisjon - */ - StopLong?: number; - Urls?: Array; +export interface LandslideEditModel { + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number; + Comment?: string; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number; + /** + * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. + */ + DtLandSlideTime: string; + /** + * Når stoppet skredet? + */ + DtLandSlideTimeEnd?: string; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array>; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number; + /** + * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; + /** + * Hvor stort er skredet? The LandSlideSizeKD unique identifier + */ + LandSlideSizeTID?: number; + /** + * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier + */ + LandSlideTID?: number; + /** + * Hva utløste skredet? The LandSlideTriggerKD unique identifier + */ + LandSlideTriggerTID?: number; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array>; + /** + * Latitude start posisjon + */ + StartLat?: number; + /** + * Long start posisjon + */ + StartLong?: number; + /** + * Hull of avalanche runout zone, List(lon, lat) + */ + StopExtent?: Array>; + /** + * Latitude stopp posisjon + */ + StopLat?: number; + /** + * Long stopp posisjon + */ + StopLong?: number; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/landslide-view-model.ts b/src/app/modules/common-regobs-api/models/landslide-view-model.ts index ea2525df4..444783b31 100644 --- a/src/app/modules/common-regobs-api/models/landslide-view-model.ts +++ b/src/app/modules/common-regobs-api/models/landslide-view-model.ts @@ -1,93 +1,85 @@ -/* tslint:disable */ -import { UrlViewModel } from './url-view-model'; -export interface LandslideViewModel { - ActivityInfluencedName?: string; - - /** - * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier - */ - ActivityInfluencedTID?: number; - Comment?: string; - DamageExtentName?: string; - - /** - * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier - */ - DamageExtentTID?: number; - - /** - * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. - */ - DtLandSlideTime: string; - - /** - * Når stoppet skredet? - */ - DtLandSlideTimeEnd?: string; - - /** - * Hull of avalanche polygon, List(lon, lat) - */ - Extent?: Array>; - ForecastAccurateName?: string; - - /** - * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier - */ - ForecastAccurateTID?: number; - GeoHazardName?: string; - - /** - * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier - */ - GeoHazardTID?: number; - LandSlideName?: string; - LandSlideSizeName?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Hvor stort er skredet? The LandSlideSizeKD unique identifier - */ - LandSlideSizeTID?: number; - - /** - * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier - */ - LandSlideTID?: number; - LandSlideTriggerName?: string; - - /** - * Hva utløste skredet? The LandSlideTriggerKD unique identifier - */ - LandSlideTriggerTID?: number; - - /** - * Hull of avalanche starting zone, List(lon, lat) - */ - StartExtent?: Array>; - - /** - * Latitude start posisjon - */ - StartLat?: number; - - /** - * Long start posisjon - */ - StartLong?: number; - - /** - * Hull of avalanche runout zone, List(lon, lat) - */ - StopExtent?: Array>; +import { UrlViewModel } from './url-view-model'; - /** - * Latitude stopp posisjon - */ - StopLat?: number; - /** - * Long stopp posisjon - */ - StopLong?: number; - Urls?: Array; +export interface LandslideViewModel { + ActivityInfluencedName?: string; + /** + * Hva ble påvirket av hendelsen. Valgene er gitt i ActivityInfluencedKD. The ActivityInfluencedKD unique identifier + */ + ActivityInfluencedTID?: number; + Comment?: string; + DamageExtentName?: string; + /** + * Skadeomfang. Hva var konsekvensen av hendelsen. Valgene gitt i DamageExtentKD. The DamageExtentKD unique identifier + */ + DamageExtentTID?: number; + /** + * Når gikk skredet? Dette er ikke det samme tidspunktet da skredet ble observert. + */ + DtLandSlideTime: string; + /** + * Når stoppet skredet? + */ + DtLandSlideTimeEnd?: string; + /** + * Hull of avalanche polygon, List(lon, lat) + */ + Extent?: Array>; + ForecastAccurateName?: string; + /** + * Var det et varsel utstedt og stemte det? The ForecastAccurateKD unique identifier + */ + ForecastAccurateTID?: number; + GeoHazardName?: string; + /** + * Spesifiser skredtype. vått jordskred?, jordskred eller steinskred? GeoHazardTID = 20, 30 og 40 er aktuelle. The GeoHazardKD unique identifier + */ + GeoHazardTID?: number; + LandSlideName?: string; + LandSlideSizeName?: string; + /** + * Hvor stort er skredet? The LandSlideSizeKD unique identifier + */ + LandSlideSizeTID?: number; + /** + * Hva slags type skred er det snakk om? Valg gitt i LandSlideKD. The LandSlideKD unique identifier + */ + LandSlideTID?: number; + LandSlideTriggerName?: string; + /** + * Hva utløste skredet? The LandSlideTriggerKD unique identifier + */ + LandSlideTriggerTID?: number; + /** + * Hull of avalanche starting zone, List(lon, lat) + */ + StartExtent?: Array>; + /** + * Latitude start posisjon + */ + StartLat?: number; + /** + * Long start posisjon + */ + StartLong?: number; + /** + * Hull of avalanche runout zone, List(lon, lat) + */ + StopExtent?: Array>; + /** + * Latitude stopp posisjon + */ + StopLat?: number; + /** + * Long stopp posisjon + */ + StopLong?: number; + Urls?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/lang-key.ts b/src/app/modules/common-regobs-api/models/lang-key.ts new file mode 100644 index 000000000..2afdbec75 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/lang-key.ts @@ -0,0 +1,21 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export const LangKey = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, + NUMBER_5: 5, + NUMBER_6: 6, + NUMBER_7: 7, + NUMBER_8: 8, + NUMBER_9: 9 +} as const; +export type LangKey = typeof LangKey[keyof typeof LangKey]; + diff --git a/src/app/modules/common-regobs-api/models/lat-lng-object.ts b/src/app/modules/common-regobs-api/models/lat-lng-object.ts index 8a4192d94..90b5cdce5 100644 --- a/src/app/modules/common-regobs-api/models/lat-lng-object.ts +++ b/src/app/modules/common-regobs-api/models/lat-lng-object.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface LatLngObject { - Latitude: number; - Longitude: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface LatLngObject { + Latitude: number; + Longitude: number; } + diff --git a/src/app/modules/common-regobs-api/models/lat-lng.ts b/src/app/modules/common-regobs-api/models/lat-lng.ts index d1f104eb1..d55ccbaeb 100644 --- a/src/app/modules/common-regobs-api/models/lat-lng.ts +++ b/src/app/modules/common-regobs-api/models/lat-lng.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface LatLng { - Latitude?: number; - Longitude?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface LatLng { + Latitude: number; + Longitude: number; } + diff --git a/src/app/modules/common-regobs-api/models/models.ts b/src/app/modules/common-regobs-api/models/models.ts new file mode 100644 index 000000000..5f62139dd --- /dev/null +++ b/src/app/modules/common-regobs-api/models/models.ts @@ -0,0 +1,105 @@ +export * from './areas-dto-forecast-regions'; +export * from './areas-dto'; +export * from './at-a-glance-view-model'; +export * from './attachment-edit-model'; +export * from './attachment-view-model-url-formats'; +export * from './attachment-view-model'; +export * from './avalanche-activity-obs-view-model'; +export * from './avalanche-activity-obs2-edit-model'; +export * from './avalanche-activity-obs2-view-model'; +export * from './avalanche-danger-obs-view-model'; +export * from './avalanche-eval-problem-view-model'; +export * from './avalanche-eval-problem2-edit-model'; +export * from './avalanche-eval-problem2-view-model'; +export * from './avalanche-evaluation-view-model'; +export * from './avalanche-evaluation2-view-model'; +export * from './avalanche-evaluation3-edit-model'; +export * from './avalanche-evaluation3-view-model'; +export * from './avalanche-obs-edit-model'; +export * from './avalanche-obs-view-model'; +export * from './compression-test-edit-model'; +export * from './compression-test-view-model'; +export * from './county-dto'; +export * from './create-trip-dto'; +export * from './damage-obs-edit-model'; +export * from './damage-obs-view-model'; +export * from './danger-obs-edit-model'; +export * from './danger-obs-view-model'; +export * from './finish-trip-dto'; +export * from './forecast-region-dto'; +export * from './forecast-region-sub-region-dto'; +export * from './general-observation-edit-model'; +export * from './general-observation-view-model'; +export * from './geo-hazard-types'; +export * from './geo-location-info'; +export * from './geo-location-summary'; +export * from './helptext-dto'; +export * from './ice-cover-edit-model'; +export * from './ice-cover-view-model'; +export * from './ice-thickness-edit-model'; +export * from './ice-thickness-layer-edit-model'; +export * from './ice-thickness-layer-view-model'; +export * from './ice-thickness-view-model'; +export * from './incident-edit-model'; +export * from './incident-view-model'; +export * from './kdv-element'; +export * from './kdv-elements-response-dto'; +export * from './landslide-edit-model'; +export * from './landslide-view-model'; +export * from './lang-key'; +export * from './lat-lng-object'; +export * from './lat-lng'; +export * from './my-page-data'; +export * from './obs-location-edit-model'; +export * from './obs-location-view-model'; +export * from './obs-locations-response-dto-v2'; +export * from './observer-competence-dto'; +export * from './observer-competence-level-dto'; +export * from './observer-group-dto'; +export * from './observer-patch-request-dto'; +export * from './observer-response-dto'; +export * from './observer-view-model'; +export * from './operator'; +export * from './position-dto'; +export * from './problem-details'; +export * from './property-filter'; +export * from './reg-obs-generic-value'; +export * from './registration-edit-model'; +export * from './registration-type-criteria-dto'; +export * from './registration-type-dto'; +export * from './registration-type-sub-type-dto'; +export * from './registration-view-model'; +export * from './registrations-with-attachments'; +export * from './search-count-response-dto'; +export * from './search-criteria-excl-user-request-dto'; +export * from './search-criteria-request-dto'; +export * from './search-side-bar-dto-observer-competence-levels'; +export * from './search-side-bar-dto-registration-types'; +export * from './search-side-bar-dto'; +export * from './search-side-bar-request-dto'; +export * from './snow-cover-obs-view-model'; +export * from './snow-density-layer-model'; +export * from './snow-density-model'; +export * from './snow-profile-edit-model'; +export * from './snow-profile-view-model'; +export * from './snow-surface-edit-model'; +export * from './snow-surface-view-model'; +export * from './snow-temp-model'; +export * from './snow-temp-obs-model'; +export * from './strat-profile-edit-model'; +export * from './strat-profile-layer-edit-model'; +export * from './strat-profile-layer-view-model'; +export * from './strat-profile-view-model'; +export * from './summary'; +export * from './url-edit-model'; +export * from './url-view-model'; +export * from './value-kind'; +export * from './water-level-measurement-edit-model'; +export * from './water-level-measurement-view-model'; +export * from './water-level-view-model'; +export * from './waterlevel2-edit-model'; +export * from './waterlevel2-view-model'; +export * from './weather-edit-model'; +export * from './weather-view-model'; +export * from './within-extent-criteria-dto'; +export * from './within-radius-criteria-dto'; diff --git a/src/app/modules/common-regobs-api/models/my-page-data.ts b/src/app/modules/common-regobs-api/models/my-page-data.ts index d18485d57..bb65e64f6 100644 --- a/src/app/modules/common-regobs-api/models/my-page-data.ts +++ b/src/app/modules/common-regobs-api/models/my-page-data.ts @@ -1,27 +1,34 @@ -/* tslint:disable */ -import { ObserverCompetenceDto } from './observer-competence-dto'; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { ObserverGroupDto } from './observer-group-dto'; -export interface MyPageData { - Adrnr?: number; - Competence?: Array; - DefaultMunicipality?: string; - DtRegTime?: string; - Email?: string; - FirstName?: string; - Guid?: string; - LastName?: string; - LastRegistrationDate?: string; - MainGeohazardTID?: number; - MemberOfGroups?: Array; - MobPhoneNr?: string; - NickName?: string; - NumberOfObservations?: number; +import { ObserverCompetenceDto } from './observer-competence-dto'; - /** - * Returns unique id that identifies an observer - */ - ObserverId?: number; - PendingInvitationsToGroups?: Array; - Roles?: Array; - WorkPlace?: string; + +export interface MyPageData { + Adrnr?: number; + Competence?: Array; + DefaultMunicipality?: string; + DtRegTime?: string; + Email?: string; + FirstName?: string; + Guid: string; + LastName?: string; + LastRegistrationDate?: string; + MainGeohazardTID: number; + MemberOfGroups?: Array; + MobPhoneNr?: string; + NickName?: string; + NumberOfObservations: number; + /** + * Returns unique id that identifies an observer + */ + ObserverId: number; + PendingInvitationsToGroups?: Array; + Roles?: Array; + WorkPlace?: string; } + diff --git a/src/app/modules/common-regobs-api/models/obs-location-edit-model.ts b/src/app/modules/common-regobs-api/models/obs-location-edit-model.ts index 6eb01b0cb..4b1090ea8 100644 --- a/src/app/modules/common-regobs-api/models/obs-location-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/obs-location-edit-model.ts @@ -1,38 +1,39 @@ -/* tslint:disable */ -export interface ObsLocationEditModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Latitude - */ - Latitude: number; - /** - * Beskriver stedet. - */ - LocationDescription?: string; - /** - * Navn på stedet - */ - LocationName?: string; - - /** - * Longitude - */ - Longitude: number; - - /** - * ObsLocationID - */ - ObsLocationID?: number; - - /** - * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD - */ - UTMSourceTID?: number; - - /** - * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. - */ - Uncertainty?: number; +export interface ObsLocationEditModel { + /** + * Latitude + */ + Latitude: number; + /** + * Beskriver stedet. + */ + LocationDescription?: string; + /** + * Navn på stedet + */ + LocationName?: string; + /** + * Longitude + */ + Longitude: number; + /** + * ObsLocationID + */ + ObsLocationID?: number; + /** + * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. + */ + Uncertainty?: number; + /** + * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD + */ + UTMSourceTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/obs-location-view-model.ts b/src/app/modules/common-regobs-api/models/obs-location-view-model.ts index 751b0149f..de0349950 100644 --- a/src/app/modules/common-regobs-api/models/obs-location-view-model.ts +++ b/src/app/modules/common-regobs-api/models/obs-location-view-model.ts @@ -1,59 +1,54 @@ -/* tslint:disable */ -export interface ObsLocationViewModel { - CountryId?: number; - CountryName?: string; - ForecastRegionName?: string; - - /** - * Anngir varslingsregion stedet tilhører. Varslingsregioner gitt i ForecastRegionKD. The ForecastRegionKD unique identifier - */ - ForecastRegionTID?: number; - Height?: number; - - /** - * Latitude - */ - Latitude: number; - - /** - * Beskriver stedet. - */ - LocationDescription?: string; - - /** - * Navn på stedet - */ - LocationName?: string; - - /** - * Longitude - */ - Longitude: number; - MunicipalName?: string; - - /** - * Kommune nr stedet tilhører - */ - MunicipalNo?: string; - - /** - * ObsLocationID - */ - ObsLocationID?: number; - - /** - * Read-only generert tittel - */ - Title?: string; - UTMSourceName?: string; - - /** - * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD - */ - UTMSourceTID?: number; - - /** - * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. - */ - Uncertainty?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObsLocationViewModel { + CountryId?: number; + CountryName?: string; + ForecastRegionName?: string; + /** + * Anngir varslingsregion stedet tilhører. Varslingsregioner gitt i ForecastRegionKD. The ForecastRegionKD unique identifier + */ + ForecastRegionTID?: number; + Height?: number; + /** + * Latitude + */ + Latitude: number; + /** + * Beskriver stedet. + */ + LocationDescription?: string; + /** + * Navn på stedet + */ + LocationName?: string; + /** + * Longitude + */ + Longitude: number; + MunicipalName?: string; + /** + * Kommune nr stedet tilhører + */ + MunicipalNo?: string; + ObsLocationID: number; + /** + * Read-only generert tittel + */ + Title?: string; + /** + * Usikkerhet i posisjon i meter. Anslås på web og i app hentes det fra gps. + */ + Uncertainty?: number; + UTMSourceName?: string; + /** + * Kildehenvisning på hvordan koordinaten er satt. (GPS i tlf, klikk i kart, osv). Verdier gitt i UTMSourceKD + */ + UTMSourceTID: number; } + diff --git a/src/app/modules/common-regobs-api/models/obs-locations-response-dto-v2.ts b/src/app/modules/common-regobs-api/models/obs-locations-response-dto-v2.ts index fc47cf93c..b38f7df41 100644 --- a/src/app/modules/common-regobs-api/models/obs-locations-response-dto-v2.ts +++ b/src/app/modules/common-regobs-api/models/obs-locations-response-dto-v2.ts @@ -1,13 +1,21 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { LatLngObject } from './lat-lng-object'; -export interface ObsLocationsResponseDtoV2 { - Distance?: number; - GeoHazardId?: number; - Id?: number; - LatLngObject?: LatLngObject; - LocationDescription?: string; - Name?: string; - ObserverGroupId?: number; - ObserverGroupName?: string; - ObserverNickName?: string; + + +export interface ObsLocationsResponseDtoV2 { + Distance: number; + GeoHazardId?: number; + Id: number; + LatLngObject?: LatLngObject; + LocationDescription?: string; + Name?: string; + ObserverGroupId?: number; + ObserverGroupName?: string; + ObserverNickName?: string; } + diff --git a/src/app/modules/common-regobs-api/models/observer-competence-dto.ts b/src/app/modules/common-regobs-api/models/observer-competence-dto.ts index 9c60b389a..777874731 100644 --- a/src/app/modules/common-regobs-api/models/observer-competence-dto.ts +++ b/src/app/modules/common-regobs-api/models/observer-competence-dto.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface ObserverCompetenceDto { - CompetenceDescription?: string; - CompetenceName?: string; - CompetenceTID: number; - GeohazardTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObserverCompetenceDto { + CompetenceDescription?: string; + CompetenceName?: string; + CompetenceTID: number; + GeohazardTID: number; } + diff --git a/src/app/modules/common-regobs-api/models/observer-competence-level-dto.ts b/src/app/modules/common-regobs-api/models/observer-competence-level-dto.ts index 6bdbe652f..2744e6ccb 100644 --- a/src/app/modules/common-regobs-api/models/observer-competence-level-dto.ts +++ b/src/app/modules/common-regobs-api/models/observer-competence-level-dto.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface ObserverCompetenceLevelDto { - Description?: string; - Id: number; - Name: string; - SortOrder?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObserverCompetenceLevelDto { + Description?: string; + Id: number; + Name: string; + SortOrder: number; } + diff --git a/src/app/modules/common-regobs-api/models/observer-group-dto.ts b/src/app/modules/common-regobs-api/models/observer-group-dto.ts index 3ee8fa24e..6378881e3 100644 --- a/src/app/modules/common-regobs-api/models/observer-group-dto.ts +++ b/src/app/modules/common-regobs-api/models/observer-group-dto.ts @@ -1,8 +1,16 @@ -/* tslint:disable */ -export interface ObserverGroupDto { - Comment?: string; - Id: number; - Name?: string; - ObserverGroupDescription?: string; - WorkPlace?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObserverGroupDto { + Comment?: string; + Id: number; + Name?: string; + ObserverGroupDescription?: string; + WorkPlace?: string; } + diff --git a/src/app/modules/common-regobs-api/models/observer-patch-request-dto.ts b/src/app/modules/common-regobs-api/models/observer-patch-request-dto.ts index 3ccb95e7d..42e3559ec 100644 --- a/src/app/modules/common-regobs-api/models/observer-patch-request-dto.ts +++ b/src/app/modules/common-regobs-api/models/observer-patch-request-dto.ts @@ -1,4 +1,12 @@ -/* tslint:disable */ -export interface ObserverPatchRequestDto { - Nick?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObserverPatchRequestDto { + Nick?: string; } + diff --git a/src/app/modules/common-regobs-api/models/observer-response-dto.ts b/src/app/modules/common-regobs-api/models/observer-response-dto.ts index 0db49c655..dd05aa1fc 100644 --- a/src/app/modules/common-regobs-api/models/observer-response-dto.ts +++ b/src/app/modules/common-regobs-api/models/observer-response-dto.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { ObserverGroupDto } from './observer-group-dto'; -export interface ObserverResponseDto { - Guid?: string; - Nick?: string; - ObserverGroup?: Array; + + +export interface ObserverResponseDto { + Guid: string; + Nick?: string; + ObserverGroup?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/observer-view-model.ts b/src/app/modules/common-regobs-api/models/observer-view-model.ts index 455b7e8b7..bc4287a47 100644 --- a/src/app/modules/common-regobs-api/models/observer-view-model.ts +++ b/src/app/modules/common-regobs-api/models/observer-view-model.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ -export interface ObserverViewModel { - CompetenceLevelName?: string; - CompetenceLevelTID?: number; - NickName?: string; - ObserverID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ObserverViewModel { + CompetenceLevelName?: string; + CompetenceLevelTID: number; + NickName?: string; + ObserverID: number; } + diff --git a/src/app/modules/common-regobs-api/models/operator.ts b/src/app/modules/common-regobs-api/models/operator.ts new file mode 100644 index 000000000..3ace4d9b4 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/operator.ts @@ -0,0 +1,13 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export const Operator = { + NUMBER_0: 0 +} as const; +export type Operator = typeof Operator[keyof typeof Operator]; + diff --git a/src/app/modules/common-regobs-api/models/position-dto.ts b/src/app/modules/common-regobs-api/models/position-dto.ts index 95e2e769c..5b8bdd6bb 100644 --- a/src/app/modules/common-regobs-api/models/position-dto.ts +++ b/src/app/modules/common-regobs-api/models/position-dto.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface PositionDto { - Latitude?: number; - Longitude?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface PositionDto { + Latitude: number; + Longitude: number; } + diff --git a/src/app/modules/common-regobs-api/models/problem-details.ts b/src/app/modules/common-regobs-api/models/problem-details.ts new file mode 100644 index 000000000..b6d8f9430 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/problem-details.ts @@ -0,0 +1,19 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface ProblemDetails { + [key: string]: any | any; + + + detail?: string; + instance?: string; + status?: number; + title?: string; + type?: string; +} + diff --git a/src/app/modules/common-regobs-api/models/property-filter.ts b/src/app/modules/common-regobs-api/models/property-filter.ts index 6e74a9053..411f5880a 100644 --- a/src/app/modules/common-regobs-api/models/property-filter.ts +++ b/src/app/modules/common-regobs-api/models/property-filter.ts @@ -1,21 +1,27 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Operator } from './operator'; + /** * Filter by property value */ -export interface PropertyFilter { - - /** - * Property name. Properties in sub schemas must be prefixed with schema name. - * Example: AvalancheObs.AvalancheTID - * Multiple instance schemas, like DangerSign, are not supported. - * If you use unknown/unsupported properties, you will get an HTTP 400. - */ - Name?: string; - Operator?: 0; +export interface PropertyFilter { + /** + * Property name. Properties in sub schemas must be prefixed with schema name. Example: AvalancheObs.AvalancheTID Multiple instance schemas, like DangerSign, are not supported. If you use unknown/unsupported properties, you will get an HTTP 400. + */ + Name?: string; + Operator: Operator; + /** + * Target property value + */ + Value?: string; +} - /** - * Target property value - */ - Value?: string; +export namespace PropertyFilter { } + diff --git a/src/app/modules/common-regobs-api/models/reg-obs-generic-value.ts b/src/app/modules/common-regobs-api/models/reg-obs-generic-value.ts index 431861c02..2b1df210b 100644 --- a/src/app/modules/common-regobs-api/models/reg-obs-generic-value.ts +++ b/src/app/modules/common-regobs-api/models/reg-obs-generic-value.ts @@ -1,7 +1,20 @@ -/* tslint:disable */ -export interface RegObsGenericValue { - Header?: string; - Kind?: 0 | 1 | 2; - KindType?: string; - Value?: {}; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ValueKind } from './value-kind'; + + +export interface RegObsGenericValue { + Header?: string; + Kind: ValueKind; + /** Readonly property */ + KindType?: string; + Value?: any; } + +export namespace RegObsGenericValue { +} + diff --git a/src/app/modules/common-regobs-api/models/registration-edit-model.ts b/src/app/modules/common-regobs-api/models/registration-edit-model.ts index 4e48e0718..1b5cc6e85 100644 --- a/src/app/modules/common-regobs-api/models/registration-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/registration-edit-model.ts @@ -1,66 +1,73 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { Waterlevel2EditModel } from './waterlevel2-edit-model'; +import { DangerObsEditModel } from './danger-obs-edit-model'; +import { AvalancheEvalProblem2EditModel } from './avalanche-eval-problem2-edit-model'; +import { SnowProfileEditModel } from './snow-profile-edit-model'; +import { GeoHazardTypes } from './geo-hazard-types'; +import { LandslideEditModel } from './landslide-edit-model'; +import { AvalancheActivityObs2EditModel } from './avalanche-activity-obs2-edit-model'; import { AttachmentEditModel } from './attachment-edit-model'; -import { AvalancheActivityObs2EditModel } from './avalanche-activity-obs-2edit-model'; -import { AvalancheEvalProblem2EditModel } from './avalanche-eval-problem-2edit-model'; -import { AvalancheEvaluation3EditModel } from './avalanche-evaluation-3edit-model'; -import { AvalancheObsEditModel } from './avalanche-obs-edit-model'; -import { CompressionTestEditModel } from './compression-test-edit-model'; import { DamageObsEditModel } from './damage-obs-edit-model'; -import { DangerObsEditModel } from './danger-obs-edit-model'; -import { GeneralObservationEditModel } from './general-observation-edit-model'; -import { IceCoverEditModel } from './ice-cover-edit-model'; import { IceThicknessEditModel } from './ice-thickness-edit-model'; import { IncidentEditModel } from './incident-edit-model'; -import { LandslideEditModel } from './landslide-edit-model'; -import { ObsLocationEditModel } from './obs-location-edit-model'; -import { SnowProfileEditModel } from './snow-profile-edit-model'; -import { SnowSurfaceEditModel } from './snow-surface-edit-model'; -import { Waterlevel2EditModel } from './waterlevel-2edit-model'; import { WeatherEditModel } from './weather-edit-model'; -export interface RegistrationEditModel { - - /** - * If set to true, the user's account will not be shown publicly. NVE will still be able to see who sent in the observation. - */ - Anonymous?: boolean; - Attachments?: Array; - AvalancheActivityObs2?: Array; - AvalancheEvalProblem2?: Array; - AvalancheEvaluation3?: AvalancheEvaluation3EditModel; - AvalancheObs?: AvalancheObsEditModel; - CompressionTest?: Array; - DamageObs?: Array; - DangerObs?: Array; - DtChangeTime?: string; - - /** - * Tiden da observasjonen ble gjort. - */ - DtObsTime: string; - GeneralObservation?: GeneralObservationEditModel; +import { SnowSurfaceEditModel } from './snow-surface-edit-model'; +import { ObsLocationEditModel } from './obs-location-edit-model'; +import { AvalancheObsEditModel } from './avalanche-obs-edit-model'; +import { CompressionTestEditModel } from './compression-test-edit-model'; +import { GeneralObservationEditModel } from './general-observation-edit-model'; +import { IceCoverEditModel } from './ice-cover-edit-model'; +import { AvalancheEvaluation3EditModel } from './avalanche-evaluation3-edit-model'; - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID: 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 100 | 110 | 200 | 999; - IceCoverObs?: IceCoverEditModel; - IceThickness?: IceThicknessEditModel; - Incident?: IncidentEditModel; - LandSlideObs?: LandslideEditModel; - /** - * The observation location object. Latitude and longitute are needed to create a new registration. - */ - ObsLocation?: ObsLocationEditModel; - ObserverGroupID?: number; - ObserverGroupName?: string; - SnowProfile2?: SnowProfileEditModel; - SnowSurfaceObservation?: SnowSurfaceEditModel; +export interface RegistrationEditModel { + /** + * If set to true, the user\'s account will not be shown publicly. NVE will still be able to see who sent in the observation. + */ + Anonymous?: boolean; + Attachments?: Array; + AvalancheActivityObs2?: Array; + AvalancheEvalProblem2?: Array; + AvalancheEvaluation3?: AvalancheEvaluation3EditModel; + AvalancheObs?: AvalancheObsEditModel; + CompressionTest?: Array; + DamageObs?: Array; + DangerObs?: Array; + DtChangeTime?: string; + /** + * Tiden da observasjonen ble gjort. + */ + DtObsTime: string; + GeneralObservation?: GeneralObservationEditModel; + /** + * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier + */ + GeoHazardTID: GeoHazardTypes; + IceCoverObs?: IceCoverEditModel; + IceThickness?: IceThicknessEditModel; + Incident?: IncidentEditModel; + LandSlideObs?: LandslideEditModel; + ObserverGroupID?: number; + ObserverGroupName?: string; + /** + * The observation location object. Latitude and longitute are needed to create a new registration. + */ + ObsLocation?: ObsLocationEditModel; + SnowProfile2?: SnowProfileEditModel; + SnowSurfaceObservation?: SnowSurfaceEditModel; + /** + * Kildereferanse på en registrering. F.eks. har brukeren sette dette selv eller er det referert til fra nyheter. The SourceKD unique identifier + */ + SourceTID?: number; + WaterLevel2?: Waterlevel2EditModel; + WeatherObservation?: WeatherEditModel; +} - /** - * Kildereferanse på en registrering. F.eks. har brukeren sette dette selv eller er det referert til fra nyheter. The SourceKD unique identifier - */ - SourceTID?: number; - WaterLevel2?: Waterlevel2EditModel; - WeatherObservation?: WeatherEditModel; +export namespace RegistrationEditModel { } + diff --git a/src/app/modules/common-regobs-api/models/registration-type-criteria-dto.ts b/src/app/modules/common-regobs-api/models/registration-type-criteria-dto.ts index 127fb3407..e43eca49b 100644 --- a/src/app/modules/common-regobs-api/models/registration-type-criteria-dto.ts +++ b/src/app/modules/common-regobs-api/models/registration-type-criteria-dto.ts @@ -1,9 +1,13 @@ -/* tslint:disable */ -export interface RegistrationTypeCriteriaDto { - - /** - * TODO: See - */ - Id: number; - SubTypes?: Array; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface RegistrationTypeCriteriaDto { + Id: number; + SubTypes?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/registration-type-dto.ts b/src/app/modules/common-regobs-api/models/registration-type-dto.ts index 9c64f55d6..0b933c42f 100644 --- a/src/app/modules/common-regobs-api/models/registration-type-dto.ts +++ b/src/app/modules/common-regobs-api/models/registration-type-dto.ts @@ -1,8 +1,16 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { RegistrationTypeSubTypeDto } from './registration-type-sub-type-dto'; -export interface RegistrationTypeDto { - Id: number; - Name?: string; - SortOrder?: number; - SubTypes?: Array; + + +export interface RegistrationTypeDto { + Id: number; + Name?: string; + SortOrder: number; + SubTypes?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/registration-type-sub-type-dto.ts b/src/app/modules/common-regobs-api/models/registration-type-sub-type-dto.ts index 09f7fd555..0bc1900c0 100644 --- a/src/app/modules/common-regobs-api/models/registration-type-sub-type-dto.ts +++ b/src/app/modules/common-regobs-api/models/registration-type-sub-type-dto.ts @@ -1,6 +1,14 @@ -/* tslint:disable */ -export interface RegistrationTypeSubTypeDto { - Id: number; - Name?: string; - SortOrder?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface RegistrationTypeSubTypeDto { + Id: number; + Name?: string; + SortOrder: number; } + diff --git a/src/app/modules/common-regobs-api/models/registration-view-model.ts b/src/app/modules/common-regobs-api/models/registration-view-model.ts index f60b3ccfd..1bcc95d78 100644 --- a/src/app/modules/common-regobs-api/models/registration-view-model.ts +++ b/src/app/modules/common-regobs-api/models/registration-view-model.ts @@ -1,99 +1,86 @@ -/* tslint:disable */ -import { Summary } from './summary'; -import { AttachmentViewModel } from './attachment-view-model'; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { IceThicknessViewModel } from './ice-thickness-view-model'; +import { SnowSurfaceViewModel } from './snow-surface-view-model'; +import { IncidentViewModel } from './incident-view-model'; +import { ObserverViewModel } from './observer-view-model'; +import { GeoHazardTypes } from './geo-hazard-types'; +import { WeatherViewModel } from './weather-view-model'; +import { DamageObsViewModel } from './damage-obs-view-model'; +import { LandslideViewModel } from './landslide-view-model'; +import { WaterLevelViewModel } from './water-level-view-model'; +import { SnowProfileViewModel } from './snow-profile-view-model'; +import { AvalancheObsViewModel } from './avalanche-obs-view-model'; import { AvalancheActivityObsViewModel } from './avalanche-activity-obs-view-model'; -import { AvalancheActivityObs2ViewModel } from './avalanche-activity-obs-2view-model'; import { AvalancheDangerObsViewModel } from './avalanche-danger-obs-view-model'; -import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; -import { AvalancheEvalProblem2ViewModel } from './avalanche-eval-problem-2view-model'; -import { AvalancheEvaluationViewModel } from './avalanche-evaluation-view-model'; -import { AvalancheEvaluation2ViewModel } from './avalanche-evaluation-2view-model'; -import { AvalancheEvaluation3ViewModel } from './avalanche-evaluation-3view-model'; -import { AvalancheObsViewModel } from './avalanche-obs-view-model'; +import { SnowCoverObsViewModel } from './snow-cover-obs-view-model'; +import { AvalancheEvaluation3ViewModel } from './avalanche-evaluation3-view-model'; import { CompressionTestViewModel } from './compression-test-view-model'; -import { DamageObsViewModel } from './damage-obs-view-model'; -import { DangerObsViewModel } from './danger-obs-view-model'; -import { GeneralObservationViewModel } from './general-observation-view-model'; import { IceCoverViewModel } from './ice-cover-view-model'; -import { IceThicknessViewModel } from './ice-thickness-view-model'; -import { IncidentViewModel } from './incident-view-model'; -import { LandslideViewModel } from './landslide-view-model'; +import { AvalancheEvaluationViewModel } from './avalanche-evaluation-view-model'; +import { AvalancheEvalProblemViewModel } from './avalanche-eval-problem-view-model'; import { ObsLocationViewModel } from './obs-location-view-model'; -import { ObserverViewModel } from './observer-view-model'; -import { SnowCoverObsViewModel } from './snow-cover-obs-view-model'; -import { SnowProfileViewModel } from './snow-profile-view-model'; -import { SnowSurfaceViewModel } from './snow-surface-view-model'; -import { WaterLevelViewModel } from './water-level-view-model'; -import { Waterlevel2ViewModel } from './waterlevel-2view-model'; -import { WeatherViewModel } from './weather-view-model'; -export interface RegistrationViewModel { - - /** - * If set to true, the user's account will not be shown publicly. NVE will still be able to see who sent in the observation. - */ - Anonymous?: boolean; - AttachmentSummaries?: Array; - Attachments?: Array; - AvalancheActivityObs?: Array; - AvalancheActivityObs2?: Array; - AvalancheDangerObs?: Array; - AvalancheEvalProblem?: Array; - AvalancheEvalProblem2?: Array; - AvalancheEvaluation?: AvalancheEvaluationViewModel; - AvalancheEvaluation2?: AvalancheEvaluation2ViewModel; - AvalancheEvaluation3?: AvalancheEvaluation3ViewModel; - AvalancheObs?: AvalancheObsViewModel; - CompressionTest?: Array; - DamageObs?: Array; - DangerObs?: Array; - - /** - * Timestamp for endret i systemet. (Read-Only) - */ - DtChangeTime?: string; - - /** - * Tiden da observasjonen ble gjort. - */ - DtObsTime: string; - - /** - * Timestamp for registrert i systemet. (Read-Only) - */ - DtRegTime: string; +import { AvalancheActivityObs2ViewModel } from './avalanche-activity-obs2-view-model'; +import { AttachmentViewModel } from './attachment-view-model'; +import { Waterlevel2ViewModel } from './waterlevel2-view-model'; +import { DangerObsViewModel } from './danger-obs-view-model'; +import { AvalancheEvaluation2ViewModel } from './avalanche-evaluation2-view-model'; +import { AvalancheEvalProblem2ViewModel } from './avalanche-eval-problem2-view-model'; +import { Summary } from './summary'; +import { GeneralObservationViewModel } from './general-observation-view-model'; - /** - * Ekstern referanse ID. Må være unik for Applikasjon. - */ - ExternalReferenceId?: string; - GeneralObservation?: GeneralObservationViewModel; - GeoHazardName?: string; - /** - * Sett naturfare. Tabellen brukes av alle naturfarer (snø, jord, vann, is). The GeoHazardKD unique identifier - */ - GeoHazardTID: 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 100 | 110 | 200 | 999; - IceCoverObs?: IceCoverViewModel; - IceThickness?: IceThicknessViewModel; - Incident?: IncidentViewModel; - LandSlideObs?: LandslideViewModel; - ObsLocation: ObsLocationViewModel; - Observer: ObserverViewModel; - ObserverGroupID?: number; - ObserverGroupName?: string; - RegId: number; - SnowCoverObs?: SnowCoverObsViewModel; - SnowProfile?: AttachmentViewModel; - SnowProfile2?: SnowProfileViewModel; - SnowSurfaceObservation?: SnowSurfaceViewModel; - SourceName?: string; +export interface RegistrationViewModel { + Anonymous?: boolean; + Attachments?: Array; + AttachmentSummaries?: Array; + AvalancheActivityObs?: Array; + AvalancheActivityObs2?: Array; + AvalancheDangerObs?: Array; + AvalancheEvalProblem?: Array; + AvalancheEvalProblem2?: Array; + AvalancheEvaluation?: AvalancheEvaluationViewModel; + AvalancheEvaluation2?: AvalancheEvaluation2ViewModel; + AvalancheEvaluation3?: AvalancheEvaluation3ViewModel; + AvalancheObs?: AvalancheObsViewModel; + CompressionTest?: Array; + DamageObs?: Array; + DangerObs?: Array; + DtChangeTime?: string; + DtObsTime: string; + DtRegTime: string; + ExternalReferenceId?: string; + GeneralObservation?: GeneralObservationViewModel; + GeoHazardName?: string; + /** + * NotSpecified = 0, Avalanche = 10, EarthFlow = 20, LandSlide = 30, RockFall = 40, IceFall = 50, Flooding = 60, Ice = 70, EventOnGlacier = 100, Jøkulhaup = 110, Drought = 200, Unknown = 999 + */ + GeoHazardTID: GeoHazardTypes; + IceCoverObs?: IceCoverViewModel; + IceThickness?: IceThicknessViewModel; + Incident?: IncidentViewModel; + LandSlideObs?: LandslideViewModel; + Observer: ObserverViewModel; + ObserverGroupID?: number; + ObserverGroupName?: string; + ObsLocation: ObsLocationViewModel; + RegId: number; + SnowCoverObs?: SnowCoverObsViewModel; + SnowProfile?: AttachmentViewModel; + SnowProfile2?: SnowProfileViewModel; + SnowSurfaceObservation?: SnowSurfaceViewModel; + SourceName?: string; + SourceTID: number; + Summaries?: Array; + WaterLevel?: WaterLevelViewModel; + WaterLevel2?: Waterlevel2ViewModel; + WeatherObservation?: WeatherViewModel; +} - /** - * Kildereferanse på en registrering. F.eks. har brukeren sette dette selv eller er det referert til fra nyheter. The SourceKD unique identifier - */ - SourceTID?: number; - Summaries?: Array; - WaterLevel?: WaterLevelViewModel; - WaterLevel2?: Waterlevel2ViewModel; - WeatherObservation?: WeatherViewModel; +export namespace RegistrationViewModel { } + diff --git a/src/app/modules/common-regobs-api/models/registrations-with-attachments.ts b/src/app/modules/common-regobs-api/models/registrations-with-attachments.ts new file mode 100644 index 000000000..5be962fc2 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/registrations-with-attachments.ts @@ -0,0 +1,20 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { AttachmentViewModel } from './attachment-view-model'; + + +export interface RegistrationsWithAttachments { + /** + * List of registration\'s attachments + */ + Attachments?: Array; + /** + * Unique registration id that contains attachments + */ + RegId: number; +} + diff --git a/src/app/modules/common-regobs-api/models/search-count-response-dto.ts b/src/app/modules/common-regobs-api/models/search-count-response-dto.ts index 086749a62..d422086ea 100644 --- a/src/app/modules/common-regobs-api/models/search-count-response-dto.ts +++ b/src/app/modules/common-regobs-api/models/search-count-response-dto.ts @@ -1,4 +1,12 @@ -/* tslint:disable */ -export interface SearchCountResponseDto { - TotalMatches?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface SearchCountResponseDto { + TotalMatches: number; } + diff --git a/src/app/modules/common-regobs-api/models/search-criteria-excl-user-request-dto.ts b/src/app/modules/common-regobs-api/models/search-criteria-excl-user-request-dto.ts index ecddfc559..1a3b6c1d0 100644 --- a/src/app/modules/common-regobs-api/models/search-criteria-excl-user-request-dto.ts +++ b/src/app/modules/common-regobs-api/models/search-criteria-excl-user-request-dto.ts @@ -1,100 +1,84 @@ -/* tslint:disable */ -import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; -import { PropertyFilter } from './property-filter'; -import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; -import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; - /** - * Use this to filter out registrations. + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -export interface SearchCriteriaExclUserRequestDto { - - /** - * Descending order is default. Set this to true to use ascending order. - */ - AscendingOrder?: boolean; - - /** - * Find registrations in given county. - * Only relevant for Norway. - * ØSTFOLD = 01, AKERSHUS = 02, OSLO = 03, HEDMARK = 04, OPPLAND = 05, BUSKERUD = 06, VESTFOLD = 07, TELEMARK = 08, AUST-AGDER = 09, VEST-AGDER = 10, ROGALAND = 11, HORDALAND = 12, SOGN OG FJORDANE = 14, MØRE OG ROMSDAL = 15, SØR-TRØNDELAG = 16, NORD-TRØNDELAG = 17, NORDLAND = 18, TROMS = 19, FINNMARK = 20, SVALBARD = 21, VIKEN = 30, INNLANDET = 34, VESTFOLD OG TELEMARK = 38, AGDER = 42, VESTLAND = 46, Trøndelag = 50, TROMS OG FINNMARK = 54 - */ - Counties?: Array; - Countries?: Array; - Extent?: WithinExtentCriteriaDto; - - /** - * Find registrations saved or changed after given date and time (inclusive) - */ - FromDtChangeTime?: string; - - /** - * Find registrations with obervation time after given date and time (inclusive) - */ - FromDtObsTime?: string; - - /** - * Language of result - * Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. - * Default = 1 - */ - LangKey?: number; - LocationId?: number; - - /** - * Max number of registrations to return. Default = 100 - */ - NumberOfRecords?: number; - - /** - * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk - */ - Offset?: number; - /** - * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work - */ - OrderBy?: string; - - /** - * Find registrations with given property value. - * [Obsolete("Experimental feature that may be changed or removed in later versions")] - */ - PropertyFilters?: Array; - Radius?: WithinRadiusCriteriaDto; - - /** - * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} - */ - RegId?: number; - - /** - * Find registrations on given geo hazard ID's. - * Snow = 10, dirt = 20, water = 60, ice = 70. - */ - SelectedGeoHazards?: Array; - - /** - * Find registrations in given regions. - * Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. - */ - SelectedRegions?: Array; - - /** - * Find registrations of given types. - * Use /Search/SearchCriteria to find out which types are used for different geo hazards. - */ - SelectedRegistrationTypes?: Array; - TextSearch?: string; - TimeZone?: string; +import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; +import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; +import { PropertyFilter } from './property-filter'; +import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; - /** - * Find registrations saved or changed before given date and time (inclusive) - */ - ToDtChangeTime?: string; - /** - * Find registrations with obervation time before given date and time (inclusive) - */ - ToDtObsTime?: string; +/** + * Use this to filter out registrations. + */ +export interface SearchCriteriaExclUserRequestDto { + /** + * Descending order is default. Set this to true to use ascending order. + */ + AscendingOrder: boolean; + /** + * Find registrations in given county. Only relevant for Norway. Current valid county numbers are here (from 2024): https://no.wikipedia.org/wiki/Fylkesnummer + */ + Counties?: Array; + Countries?: Array; + Extent?: WithinExtentCriteriaDto; + /** + * Find registrations saved or changed after given date and time (inclusive) + */ + FromDtChangeTime?: string; + /** + * Find registrations with obervation time after given date and time (inclusive) + */ + FromDtObsTime?: string; + /** + * Language of result Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. Default = 1 + */ + LangKey?: number; + LocationId?: number; + /** + * Max number of registrations to return. Default = 100 + */ + NumberOfRecords?: number; + /** + * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk + */ + Offset?: number; + /** + * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work + */ + OrderBy?: string; + /** + * Find registrations with given property value. [Obsolete(\"Experimental feature that may be changed or removed in later versions\")] + */ + PropertyFilters?: Array; + Radius?: WithinRadiusCriteriaDto; + /** + * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} + */ + RegId?: number; + /** + * Find registrations on given geo hazard ID\'s. Snow = 10, soil = 20, water = 60, ice = 70. + */ + SelectedGeoHazards?: Array; + /** + * Find registrations in given regions. Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. + */ + SelectedRegions?: Array; + /** + * Find registrations of given types. Use /Search/SearchCriteria to find out which types are used for different geo hazards. + */ + SelectedRegistrationTypes?: Array; + TextSearch?: string; + TimeZone?: string; + /** + * Find registrations saved or changed before given date and time (inclusive) + */ + ToDtChangeTime?: string; + /** + * Find registrations with obervation time before given date and time (inclusive) + */ + ToDtObsTime?: string; } + diff --git a/src/app/modules/common-regobs-api/models/search-criteria-request-dto.ts b/src/app/modules/common-regobs-api/models/search-criteria-request-dto.ts index cbfacb36a..492004c03 100644 --- a/src/app/modules/common-regobs-api/models/search-criteria-request-dto.ts +++ b/src/app/modules/common-regobs-api/models/search-criteria-request-dto.ts @@ -1,127 +1,104 @@ -/* tslint:disable */ -import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; -import { PropertyFilter } from './property-filter'; -import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; -import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; - /** - * Use this to filter out registrations. + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. */ -export interface SearchCriteriaRequestDto { - - /** - * Descending order is default. Set this to true to use ascending order. - */ - AscendingOrder?: boolean; - - /** - * Find registrations in given county. - * Only relevant for Norway. - * ØSTFOLD = 01, AKERSHUS = 02, OSLO = 03, HEDMARK = 04, OPPLAND = 05, BUSKERUD = 06, VESTFOLD = 07, TELEMARK = 08, AUST-AGDER = 09, VEST-AGDER = 10, ROGALAND = 11, HORDALAND = 12, SOGN OG FJORDANE = 14, MØRE OG ROMSDAL = 15, SØR-TRØNDELAG = 16, NORD-TRØNDELAG = 17, NORDLAND = 18, TROMS = 19, FINNMARK = 20, SVALBARD = 21, VIKEN = 30, INNLANDET = 34, VESTFOLD OG TELEMARK = 38, AGDER = 42, VESTLAND = 46, Trøndelag = 50, TROMS OG FINNMARK = 54 - */ - Counties?: Array; - Countries?: Array; - Extent?: WithinExtentCriteriaDto; - - /** - * Find registrations saved or changed after given date and time (inclusive) - */ - FromDtChangeTime?: string; - - /** - * Find registrations with obervation time after given date and time (inclusive) - */ - FromDtObsTime?: string; - - /** - * Find registrations made by the observers in a specific group - */ - GroupId?: number; - - /** - * Language of result - * Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. - * Default = 1 - */ - LangKey?: number; - LocationId?: number; - - /** - * Max number of registrations to return. Default = 100 - */ - NumberOfRecords?: number; - - /** - * Find registrations made by observers with specific competence level IDs - * Use /Search/SearchCriteria to find out which competence levels are used for different geo hazards. - */ - ObserverCompetence?: Array; - - /** - * Find registrations made by the observer with given GUID. - * This attribute is deprecated and will be removed in the future. - */ - ObserverGuid?: string; - - /** - * Find registrations made by the observer with given ID - */ - ObserverId?: number; - /** - * Find registrations made by the observer with given nick name - */ - ObserverNickName?: string; - - /** - * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk - */ - Offset?: number; - - /** - * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work - */ - OrderBy?: string; - - /** - * Find registrations with given property value. - * [Obsolete("Experimental feature that may be changed or removed in later versions")] - */ - PropertyFilters?: Array; - Radius?: WithinRadiusCriteriaDto; - - /** - * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} - */ - RegId?: number; - - /** - * Find registrations on given geo hazard ID's. - * Snow = 10, dirt = 20, water = 60, ice = 70. - */ - SelectedGeoHazards?: Array; - - /** - * Find registrations in given regions. - * Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. - */ - SelectedRegions?: Array; - - /** - * Find registrations of given types. - * Use /Search/SearchCriteria to find out which types are used for different geo hazards. - */ - SelectedRegistrationTypes?: Array; - TextSearch?: string; - TimeZone?: string; +import { RegistrationTypeCriteriaDto } from './registration-type-criteria-dto'; +import { WithinRadiusCriteriaDto } from './within-radius-criteria-dto'; +import { PropertyFilter } from './property-filter'; +import { WithinExtentCriteriaDto } from './within-extent-criteria-dto'; - /** - * Find registrations saved or changed before given date and time (inclusive) - */ - ToDtChangeTime?: string; - /** - * Find registrations with obervation time before given date and time (inclusive) - */ - ToDtObsTime?: string; +/** + * Use this to filter out registrations. + */ +export interface SearchCriteriaRequestDto { + /** + * Descending order is default. Set this to true to use ascending order. + */ + AscendingOrder: boolean; + /** + * Find registrations in given county. Only relevant for Norway. Current valid county numbers are here (from 2024): https://no.wikipedia.org/wiki/Fylkesnummer + */ + Counties?: Array; + Countries?: Array; + Extent?: WithinExtentCriteriaDto; + /** + * Find registrations saved or changed after given date and time (inclusive) + */ + FromDtChangeTime?: string; + /** + * Find registrations with obervation time after given date and time (inclusive) + */ + FromDtObsTime?: string; + /** + * Find registrations made by the observers in a specific group + */ + GroupId?: number; + /** + * Language of result Norwegian = 1, English = 2, German = 3, Slovenian = 4, Swedish = 5, Italian = 6, Norwegian (nn) = 7. Default = 1 + */ + LangKey?: number; + LocationId?: number; + /** + * Max number of registrations to return. Default = 100 + */ + NumberOfRecords?: number; + /** + * Find registrations made by observers with specific competence level IDs Use /Search/SearchCriteria to find out which competence levels are used for different geo hazards. + */ + ObserverCompetence?: Array; + /** + * Find registrations made by the observer with given GUID. This attribute is deprecated and will be removed in the future. + */ + ObserverGuid?: string; + /** + * Find registrations made by the observer with given ID + */ + ObserverId?: number; + /** + * Find registrations made by the observer with given nick name + */ + ObserverNickName?: string; + /** + * Start index. If more registrations matches your filter than you get in one chunk, set Offset to the count of how many records you already fetched, to retrieve the next chunk + */ + Offset?: number; + /** + * Field to order by. You may use these fields: DtObsTime, DtRegTime, DtChangeTime. Default is DtObsTime. A few other fields may also work + */ + OrderBy?: string; + /** + * Find registrations with given property value. [Obsolete(\"Experimental feature that may be changed or removed in later versions\")] + */ + PropertyFilters?: Array; + Radius?: WithinRadiusCriteriaDto; + /** + * Find a registration with a specific unique ID. You may also use GET /Registration/{regId}/{langKey} + */ + RegId?: number; + /** + * Find registrations on given geo hazard ID\'s. Snow = 10, soil = 20, water = 60, ice = 70. + */ + SelectedGeoHazards?: Array; + /** + * Find registrations in given regions. Use /Search/SearchCriteria to find the forecast region IDs that are used for different geo hazards. + */ + SelectedRegions?: Array; + /** + * Find registrations of given types. Use /Search/SearchCriteria to find out which types are used for different geo hazards. + */ + SelectedRegistrationTypes?: Array; + TextSearch?: string; + TimeZone?: string; + /** + * Find registrations saved or changed before given date and time (inclusive) + */ + ToDtChangeTime?: string; + /** + * Find registrations with obervation time before given date and time (inclusive) + */ + ToDtObsTime?: string; } + diff --git a/src/app/modules/common-regobs-api/models/search-registrations-with-attachments.ts b/src/app/modules/common-regobs-api/models/search-registrations-with-attachments.ts deleted file mode 100644 index 50baf93ce..000000000 --- a/src/app/modules/common-regobs-api/models/search-registrations-with-attachments.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { AttachmentViewModel } from "./attachment-view-model"; - -export interface SearchRegistrationsWithAttachments { - - /// Unique registration id that contains attachments - RegId: number - - /// List of registration's attachments - Attachments: Array -} diff --git a/src/app/modules/common-regobs-api/models/search-side-bar-dto-observer-competence-levels.ts b/src/app/modules/common-regobs-api/models/search-side-bar-dto-observer-competence-levels.ts new file mode 100644 index 000000000..f3b8ed942 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/search-side-bar-dto-observer-competence-levels.ts @@ -0,0 +1,24 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ObserverCompetenceLevelDto } from './observer-competence-level-dto'; + + +export interface SearchSideBarDtoObserverCompetenceLevels { + Avalanche?: Array; + Drought?: Array; + EarthFlow?: Array; + EventOnGlacier?: Array; + Flooding?: Array; + Ice?: Array; + IceFall?: Array; + Jokulhaup?: Array; + LandSlide?: Array; + NotSpecified?: Array; + RockFall?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/models/search-side-bar-dto-registration-types.ts b/src/app/modules/common-regobs-api/models/search-side-bar-dto-registration-types.ts new file mode 100644 index 000000000..bb79dad33 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/search-side-bar-dto-registration-types.ts @@ -0,0 +1,24 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { RegistrationTypeDto } from './registration-type-dto'; + + +export interface SearchSideBarDtoRegistrationTypes { + Avalanche?: Array; + Drought?: Array; + EarthFlow?: Array; + EventOnGlacier?: Array; + Flooding?: Array; + Ice?: Array; + IceFall?: Array; + Jokulhaup?: Array; + LandSlide?: Array; + NotSpecified?: Array; + RockFall?: Array; + Unknown?: Array; +} + diff --git a/src/app/modules/common-regobs-api/models/search-side-bar-dto.ts b/src/app/modules/common-regobs-api/models/search-side-bar-dto.ts index 831562cc2..1c64202a7 100644 --- a/src/app/modules/common-regobs-api/models/search-side-bar-dto.ts +++ b/src/app/modules/common-regobs-api/models/search-side-bar-dto.ts @@ -1,9 +1,17 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { AreasDto } from './areas-dto'; -import { ObserverCompetenceLevelDto } from './observer-competence-level-dto'; -import { RegistrationTypeDto } from './registration-type-dto'; -export interface SearchSideBarDto { - Areas?: Array; - ObserverCompetenceLevels?: {NotSpecified?: Array, Avalanche?: Array, EarthFlow?: Array, LandSlide?: Array, RockFall?: Array, IceFall?: Array, Flooding?: Array, Ice?: Array, EventOnGlacier?: Array, Jøkulhaup?: Array, Drought?: Array, Unknown?: Array}; - RegistrationTypes?: {NotSpecified?: Array, Avalanche?: Array, EarthFlow?: Array, LandSlide?: Array, RockFall?: Array, IceFall?: Array, Flooding?: Array, Ice?: Array, EventOnGlacier?: Array, Jøkulhaup?: Array, Drought?: Array, Unknown?: Array}; +import { SearchSideBarDtoObserverCompetenceLevels } from './search-side-bar-dto-observer-competence-levels'; +import { SearchSideBarDtoRegistrationTypes } from './search-side-bar-dto-registration-types'; + + +export interface SearchSideBarDto { + Areas?: Array; + ObserverCompetenceLevels?: SearchSideBarDtoObserverCompetenceLevels; + RegistrationTypes?: SearchSideBarDtoRegistrationTypes; } + diff --git a/src/app/modules/common-regobs-api/models/search-side-bar-request-dto.ts b/src/app/modules/common-regobs-api/models/search-side-bar-request-dto.ts index fd3a91fbc..989277a9c 100644 --- a/src/app/modules/common-regobs-api/models/search-side-bar-request-dto.ts +++ b/src/app/modules/common-regobs-api/models/search-side-bar-request-dto.ts @@ -1,15 +1,24 @@ -/* tslint:disable */ -export interface SearchSideBarRequestDto { - - /** - * Snow = 10, dirt = 20, water = 60, ice = 70. - * At least one geo hazard is required. - */ - GeoHazards?: Array<0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 100 | 110 | 200 | 999>; - - /** - * NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6 - * Default = 2. - */ - LangKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { GeoHazardTypes } from './geo-hazard-types'; +import { LangKey } from './lang-key'; + + +export interface SearchSideBarRequestDto { + /** + * Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. + */ + GeoHazards?: Array; + /** + * NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6 Default = 2. + */ + LangKey: LangKey; } + +export namespace SearchSideBarRequestDto { +} + diff --git a/src/app/modules/common-regobs-api/models/snow-cover-obs-view-model.ts b/src/app/modules/common-regobs-api/models/snow-cover-obs-view-model.ts index f65d91724..2b2488b09 100644 --- a/src/app/modules/common-regobs-api/models/snow-cover-obs-view-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-cover-obs-view-model.ts @@ -1,34 +1,36 @@ -/* tslint:disable */ -export interface SnowCoverObsViewModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Comment. - */ - Comment?: string; - /** - * CriticalLayerExists - */ - CriticalLayerExists?: boolean; - /** - * CriticalLayerLocation - */ - CriticalLayerLocation?: number; - CriticalLayerName?: string; - - /** - * The CriticalLayerKD unique identifier - */ - CriticalLayerTID?: number; - - /** - * DepthHoarThickness - */ - DepthHoarThickness?: number; - - /** - * SnowPilotRef - */ - SnowPilotRef?: string; +export interface SnowCoverObsViewModel { + /** + * Comment. + */ + Comment?: string; + /** + * CriticalLayerExists + */ + CriticalLayerExists?: boolean; + /** + * CriticalLayerLocation + */ + CriticalLayerLocation?: number; + CriticalLayerName?: string; + /** + * The CriticalLayerKD unique identifier + */ + CriticalLayerTID?: number; + /** + * DepthHoarThickness + */ + DepthHoarThickness?: number; + /** + * SnowPilotRef + */ + SnowPilotRef?: string; } + diff --git a/src/app/modules/common-regobs-api/models/snow-density-layer-model.ts b/src/app/modules/common-regobs-api/models/snow-density-layer-model.ts index 64215d26a..4eb1cb533 100644 --- a/src/app/modules/common-regobs-api/models/snow-density-layer-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-density-layer-model.ts @@ -1,22 +1,27 @@ -/* tslint:disable */ -export interface SnowDensityLayerModel { - Comment?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Density in kg/m^3 - */ - Density?: number; - Depth?: number; - SortOrder?: number; - /** - * thickness in m - */ - Thickness?: number; - WaterEquivalent?: number; - /** - * Weight in KG - */ - Weight?: number; +export interface SnowDensityLayerModel { + Comment?: string; + /** + * Density in kg/m^3 + */ + Density?: number; + Depth?: number; + SortOrder: number; + /** + * thickness in m + */ + Thickness?: number; + WaterEquivalent: number; + /** + * Weight in KG + */ + Weight: number; } + diff --git a/src/app/modules/common-regobs-api/models/snow-density-model.ts b/src/app/modules/common-regobs-api/models/snow-density-model.ts index 270d4e8b9..6cef07600 100644 --- a/src/app/modules/common-regobs-api/models/snow-density-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-density-model.ts @@ -1,8 +1,16 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { SnowDensityLayerModel } from './snow-density-layer-model'; -export interface SnowDensityModel { - Comment?: string; - CylinderDiameter?: number; - Layers?: Array; - TareWeight?: number; + + +export interface SnowDensityModel { + Comment?: string; + CylinderDiameter?: number; + Layers?: Array; + TareWeight?: number; } + diff --git a/src/app/modules/common-regobs-api/models/snow-profile-edit-model.ts b/src/app/modules/common-regobs-api/models/snow-profile-edit-model.ts index 76cabca25..9cbd84edc 100644 --- a/src/app/modules/common-regobs-api/models/snow-profile-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-profile-edit-model.ts @@ -1,13 +1,21 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { SnowDensityModel } from './snow-density-model'; -import { SnowTempModel } from './snow-temp-model'; import { StratProfileEditModel } from './strat-profile-edit-model'; -export interface SnowProfileEditModel { - Comment?: string; - Exposition?: number; - IsProfileToGround?: boolean; - SlopeAngle?: number; - SnowDensity?: Array; - SnowTemp?: SnowTempModel; - StratProfile?: StratProfileEditModel; +import { SnowTempModel } from './snow-temp-model'; + + +export interface SnowProfileEditModel { + Comment?: string; + Exposition?: number; + IsProfileToGround?: boolean; + SlopeAngle?: number; + SnowDensity?: Array; + SnowTemp?: SnowTempModel; + StratProfile?: StratProfileEditModel; } + diff --git a/src/app/modules/common-regobs-api/models/snow-profile-view-model.ts b/src/app/modules/common-regobs-api/models/snow-profile-view-model.ts index 450808c62..97d79c8f4 100644 --- a/src/app/modules/common-regobs-api/models/snow-profile-view-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-profile-view-model.ts @@ -1,18 +1,27 @@ -/* tslint:disable */ -import { AttachmentViewModel } from './attachment-view-model'; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { SnowDensityModel } from './snow-density-model'; -import { SnowTempModel } from './snow-temp-model'; import { StratProfileViewModel } from './strat-profile-view-model'; -export interface SnowProfileViewModel { - Comment?: string; - Exposition?: number; - IsProfileToGround?: boolean; - SlopeAngle?: number; - SnowDensity?: Array; - SnowTemp?: SnowTempModel; - StratProfile?: StratProfileViewModel; - TotalDepth?: number; +import { AttachmentViewModel } from './attachment-view-model'; +import { SnowTempModel } from './snow-temp-model'; + - /** Metadata til bilde av snøprofil-plott */ - PlotImage?: AttachmentViewModel; +export interface SnowProfileViewModel { + Comment?: string; + Exposition?: number; + IsProfileToGround?: boolean; + /** + * Urls to simplified images of the snow profile model + */ + PlotImage?: AttachmentViewModel; + SlopeAngle?: number; + SnowDensity?: Array; + SnowTemp?: SnowTempModel; + StratProfile?: StratProfileViewModel; + TotalDepth: number; } + diff --git a/src/app/modules/common-regobs-api/models/snow-surface-edit-model.ts b/src/app/modules/common-regobs-api/models/snow-surface-edit-model.ts index b5413cd34..377796a98 100644 --- a/src/app/modules/common-regobs-api/models/snow-surface-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-surface-edit-model.ts @@ -1,53 +1,51 @@ -/* tslint:disable */ -export interface SnowSurfaceEditModel { - - /** - * Kommentarfelt for å skrive utfyllende tekst om observasjonen. - */ - Comment?: string; - - /** - * Grense lagdelt snø (moh) - */ - HeightLimitLayeredSnow?: number; - - /** - * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området - */ - NewSnowDepth24?: number; - - /** - * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. - */ - NewSnowLine?: number; - - /** - * Skiføre - */ - SkiConditionsTID?: number; - - /** - * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. - */ - SnowDepth?: number; - - /** - * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier - */ - SnowDriftTID?: number; - - /** - * Snøgrense (moh) - */ - SnowLine?: number; - - /** - * Snødekkehardhet - */ - SnowSurfaceTID?: number; - - /** - * Overflatefuktighet - */ - SurfaceWaterContentTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface SnowSurfaceEditModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + /** + * Grense lagdelt snø (moh) + */ + HeightLimitLayeredSnow?: number; + /** + * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området + */ + NewSnowDepth24?: number; + /** + * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. + */ + NewSnowLine?: number; + /** + * Skiføre + */ + SkiConditionsTID?: number; + /** + * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. + */ + SnowDepth?: number; + /** + * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier + */ + SnowDriftTID?: number; + /** + * Snøgrense (moh) + */ + SnowLine?: number; + /** + * Snødekkehardhet + */ + SnowSurfaceTID?: number; + /** + * Overflatefuktighet + */ + SurfaceWaterContentTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/snow-surface-view-model.ts b/src/app/modules/common-regobs-api/models/snow-surface-view-model.ts index a38220f65..2b25d4c98 100644 --- a/src/app/modules/common-regobs-api/models/snow-surface-view-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-surface-view-model.ts @@ -1,69 +1,65 @@ -/* tslint:disable */ -export interface SnowSurfaceViewModel { +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ - /** - * Kommentarfelt for å skrive utfyllende tekst om observasjonen. - */ - Comment?: string; - /** - * Obsolete - Only in View Model - */ - FootPenetration?: number; - /** - * Grense lagdelt snø (moh) - */ - HeightLimitLayeredSnow?: number; - - /** - * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området - */ - NewSnowDepth24?: number; - - /** - * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. - */ - NewSnowLine?: number; - SkiConditionsName?: string; - SkiConditionsTID?: number; - - /** - * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. - */ - SnowDepth?: number; - SnowDriftName?: string; - - /** - * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier - */ - SnowDriftTID?: number; - - /** - * Snøgrense (moh) - */ - SnowLine?: number; - SnowSurfaceName?: string; - - /** - * Snødekkehardhet - */ - SnowSurfaceTID?: number; - - /** - * Obsolete - Only in View Model - */ - SnowWindDepth24?: number; - SurfaceRougnessName?: string; - - /** - * Obsolete - Only in View Model - */ - SurfaceRougnessTID?: number; - SurfaceWaterContentName?: string; - - /** - * Overflatefuktighet - */ - SurfaceWaterContentTID?: number; +export interface SnowSurfaceViewModel { + /** + * Kommentarfelt for å skrive utfyllende tekst om observasjonen. + */ + Comment?: string; + /** + * Obsolete - Only in View Model + */ + FootPenetration?: number; + /** + * Grense lagdelt snø (moh) + */ + HeightLimitLayeredSnow?: number; + /** + * Nysnødybde i cm. Vi ønsker et gjennomsnitt for området + */ + NewSnowDepth24?: number; + /** + * Nysnøgrensa. Hvor faller nedbør som snø? Meter over havet. + */ + NewSnowLine?: number; + SkiConditionsName?: string; + SkiConditionsTID?: number; + /** + * Total snødybde i cm. Vi ønsker et gjennomsnitt for området. + */ + SnowDepth?: number; + SnowDriftName?: string; + /** + * Hvor mye har vinden transportert snøen? Valg fra nedtrekksmeny. The SnowDriftKD unique identifier + */ + SnowDriftTID?: number; + /** + * Snøgrense (moh) + */ + SnowLine?: number; + SnowSurfaceName?: string; + /** + * Snødekkehardhet + */ + SnowSurfaceTID?: number; + /** + * Obsolete - Only in View Model + */ + SnowWindDepth24?: number; + SurfaceRougnessName?: string; + /** + * Obsolete - Only in View Model + */ + SurfaceRougnessTID?: number; + SurfaceWaterContentName?: string; + /** + * Overflatefuktighet + */ + SurfaceWaterContentTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/snow-temp-model.ts b/src/app/modules/common-regobs-api/models/snow-temp-model.ts index f5bffa7b4..a4ec06e78 100644 --- a/src/app/modules/common-regobs-api/models/snow-temp-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-temp-model.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { SnowTempObsModel } from './snow-temp-obs-model'; -export interface SnowTempModel { - Layers?: Array; + + +export interface SnowTempModel { + Layers?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/snow-temp-obs-model.ts b/src/app/modules/common-regobs-api/models/snow-temp-obs-model.ts index d0485d16b..89e1c8038 100644 --- a/src/app/modules/common-regobs-api/models/snow-temp-obs-model.ts +++ b/src/app/modules/common-regobs-api/models/snow-temp-obs-model.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ -export interface SnowTempObsModel { - Depth?: number; - SnowTemp?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface SnowTempObsModel { + Depth: number; + SnowTemp: number; } + diff --git a/src/app/modules/common-regobs-api/models/strat-profile-edit-model.ts b/src/app/modules/common-regobs-api/models/strat-profile-edit-model.ts index e9b723764..d4b9420c4 100644 --- a/src/app/modules/common-regobs-api/models/strat-profile-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/strat-profile-edit-model.ts @@ -1,5 +1,13 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { StratProfileLayerEditModel } from './strat-profile-layer-edit-model'; -export interface StratProfileEditModel { - Layers?: Array; + + +export interface StratProfileEditModel { + Layers?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/strat-profile-layer-edit-model.ts b/src/app/modules/common-regobs-api/models/strat-profile-layer-edit-model.ts index 22bd7af75..87caf4498 100644 --- a/src/app/modules/common-regobs-api/models/strat-profile-layer-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/strat-profile-layer-edit-model.ts @@ -1,15 +1,23 @@ -/* tslint:disable */ -export interface StratProfileLayerEditModel { - Comment?: string; - CriticalLayerTID?: number; - DepthTop?: number; - GrainFormPrimaryTID?: number; - GrainFormSecondaryTID?: number; - GrainSizeAvg?: number; - GrainSizeAvgMax?: number; - HardnessBottomTID?: number; - HardnessTID?: number; - SortOrder?: number; - Thickness?: number; - WetnessTID?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface StratProfileLayerEditModel { + Comment?: string; + CriticalLayerTID?: number; + DepthTop?: number; + GrainFormPrimaryTID?: number; + GrainFormSecondaryTID?: number; + GrainSizeAvg?: number; + GrainSizeAvgMax?: number; + HardnessBottomTID?: number; + HardnessTID?: number; + SortOrder: number; + Thickness?: number; + WetnessTID?: number; } + diff --git a/src/app/modules/common-regobs-api/models/strat-profile-layer-view-model.ts b/src/app/modules/common-regobs-api/models/strat-profile-layer-view-model.ts index 529bc09e7..f5be5cc54 100644 --- a/src/app/modules/common-regobs-api/models/strat-profile-layer-view-model.ts +++ b/src/app/modules/common-regobs-api/models/strat-profile-layer-view-model.ts @@ -1,21 +1,29 @@ -/* tslint:disable */ -export interface StratProfileLayerViewModel { - Comment?: string; - CriticalLayerTID?: number; - CriticalLayerTName?: string; - DepthTop?: number; - GrainFormPrimaryTID?: number; - GrainFormPrimaryTName?: string; - GrainFormSecondaryTID?: number; - GrainFormSecondaryTName?: string; - GrainSizeAvg?: number; - GrainSizeAvgMax?: number; - HardnessBottomTID?: number; - HardnessBottomTName?: string; - HardnessTID?: number; - HardnessTName?: string; - SortOrder?: number; - Thickness?: number; - WetnessTID?: number; - WetnessTName?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface StratProfileLayerViewModel { + Comment?: string; + CriticalLayerTID?: number; + CriticalLayerTName?: string; + DepthTop?: number; + GrainFormPrimaryTID?: number; + GrainFormPrimaryTName?: string; + GrainFormSecondaryTID?: number; + GrainFormSecondaryTName?: string; + GrainSizeAvg?: number; + GrainSizeAvgMax?: number; + HardnessBottomTID?: number; + HardnessBottomTName?: string; + HardnessTID?: number; + HardnessTName?: string; + SortOrder: number; + Thickness?: number; + WetnessTID?: number; + WetnessTName?: string; } + diff --git a/src/app/modules/common-regobs-api/models/strat-profile-view-model.ts b/src/app/modules/common-regobs-api/models/strat-profile-view-model.ts index 0ec7de253..ad64949db 100644 --- a/src/app/modules/common-regobs-api/models/strat-profile-view-model.ts +++ b/src/app/modules/common-regobs-api/models/strat-profile-view-model.ts @@ -1,9 +1,14 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { StratProfileLayerViewModel } from './strat-profile-layer-view-model'; -export interface StratProfileViewModel { - Layers?: Array; - TotalDepth?: number; - /** URL til bilde av snøprofil-plott */ - PlotImageUrl?: string; + +export interface StratProfileViewModel { + Layers?: Array; + TotalDepth: number; } + diff --git a/src/app/modules/common-regobs-api/models/summary.ts b/src/app/modules/common-regobs-api/models/summary.ts index 4268ceaab..7edbee5bc 100644 --- a/src/app/modules/common-regobs-api/models/summary.ts +++ b/src/app/modules/common-regobs-api/models/summary.ts @@ -1,7 +1,15 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { RegObsGenericValue } from './reg-obs-generic-value'; -export interface Summary { - RegistrationName?: string; - RegistrationTID?: number; - Summaries?: Array; + + +export interface Summary { + RegistrationName?: string; + RegistrationTID: number; + Summaries?: Array; } + diff --git a/src/app/modules/common-regobs-api/models/url-edit-model.ts b/src/app/modules/common-regobs-api/models/url-edit-model.ts index 57756f096..a6081394a 100644 --- a/src/app/modules/common-regobs-api/models/url-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/url-edit-model.ts @@ -1,13 +1,19 @@ -/* tslint:disable */ -export interface UrlEditModel { - - /** - * UrlDescription - */ - UrlDescription?: string; - - /** - * UrlLine - */ - UrlLine?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface UrlEditModel { + /** + * UrlDescription + */ + UrlDescription?: string; + /** + * UrlLine + */ + UrlLine: string; } + diff --git a/src/app/modules/common-regobs-api/models/url-view-model.ts b/src/app/modules/common-regobs-api/models/url-view-model.ts index 64adceb0d..818ce9e8e 100644 --- a/src/app/modules/common-regobs-api/models/url-view-model.ts +++ b/src/app/modules/common-regobs-api/models/url-view-model.ts @@ -1,13 +1,19 @@ -/* tslint:disable */ -export interface UrlViewModel { - - /** - * UrlDescription - */ - UrlDescription?: string; - - /** - * UrlLine - */ - UrlLine?: string; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface UrlViewModel { + /** + * UrlDescription + */ + UrlDescription?: string; + /** + * UrlLine + */ + UrlLine: string; } + diff --git a/src/app/modules/common-regobs-api/models/value-kind.ts b/src/app/modules/common-regobs-api/models/value-kind.ts new file mode 100644 index 000000000..4bee89609 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/value-kind.ts @@ -0,0 +1,15 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export const ValueKind = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2 +} as const; +export type ValueKind = typeof ValueKind[keyof typeof ValueKind]; + diff --git a/src/app/modules/common-regobs-api/models/water-level-measurement-edit-model.ts b/src/app/modules/common-regobs-api/models/water-level-measurement-edit-model.ts index 93e1f5f61..b94b217a7 100644 --- a/src/app/modules/common-regobs-api/models/water-level-measurement-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/water-level-measurement-edit-model.ts @@ -1,9 +1,17 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { AttachmentEditModel } from './attachment-edit-model'; -export interface WaterLevelMeasurementEditModel { - Attachments?: Array; - Comment?: string; - DtMeasurementTime: string; - WaterLevelMeasurementId?: number; - WaterLevelValue?: number; + + +export interface WaterLevelMeasurementEditModel { + Attachments?: Array; + Comment?: string; + DtMeasurementTime: string; + WaterLevelMeasurementId?: number; + WaterLevelValue?: number; } + diff --git a/src/app/modules/common-regobs-api/models/water-level-measurement-view-model.ts b/src/app/modules/common-regobs-api/models/water-level-measurement-view-model.ts index 7103c3d69..7f956895a 100644 --- a/src/app/modules/common-regobs-api/models/water-level-measurement-view-model.ts +++ b/src/app/modules/common-regobs-api/models/water-level-measurement-view-model.ts @@ -1,9 +1,17 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { AttachmentViewModel } from './attachment-view-model'; -export interface WaterLevelMeasurementViewModel { - Attachments?: Array; - Comment?: string; - DtMeasurementTime: string; - WaterLevelMeasurementId?: number; - WaterLevelValue?: number; + + +export interface WaterLevelMeasurementViewModel { + Attachments?: Array; + Comment?: string; + DtMeasurementTime: string; + WaterLevelMeasurementId: number; + WaterLevelValue?: number; } + diff --git a/src/app/modules/common-regobs-api/models/water-level-view-model.ts b/src/app/modules/common-regobs-api/models/water-level-view-model.ts index 1280717a6..312afe123 100644 --- a/src/app/modules/common-regobs-api/models/water-level-view-model.ts +++ b/src/app/modules/common-regobs-api/models/water-level-view-model.ts @@ -1,10 +1,18 @@ -/* tslint:disable */ -export interface WaterLevelViewModel { - Comment?: string; - IsRiver?: boolean; - MeasuredDischarge?: number; - WaterLevelDescribed?: string; - WaterLevelRefName?: string; - WaterLevelRefTID?: number; - WaterLevelValue?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface WaterLevelViewModel { + Comment?: string; + IsRiver: boolean; + MeasuredDischarge?: number; + WaterLevelDescribed?: string; + WaterLevelRefName?: string; + WaterLevelRefTID: number; + WaterLevelValue?: number; } + diff --git a/src/app/modules/common-regobs-api/models/waterlevel-2edit-model.ts b/src/app/modules/common-regobs-api/models/waterlevel-2edit-model.ts deleted file mode 100644 index 57212d007..000000000 --- a/src/app/modules/common-regobs-api/models/waterlevel-2edit-model.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -import { WaterLevelMeasurementEditModel } from './water-level-measurement-edit-model'; -export interface Waterlevel2EditModel { - Comment?: string; - Extent?: Array>; - MarkingReferenceTID?: number; - MarkingTypeTID?: number; - MeasurementReferenceTID?: number; - MeasurementTypeTID?: number; - MeasuringToolDescription?: string; - ObservationTimingTID?: number; - WaterAstrayTID?: number; - WaterLevelMeasurement?: Array; - WaterLevelMethodTID?: number; - WaterLevelStateTID?: number; -} diff --git a/src/app/modules/common-regobs-api/models/waterlevel-2view-model.ts b/src/app/modules/common-regobs-api/models/waterlevel-2view-model.ts deleted file mode 100644 index 19c71e508..000000000 --- a/src/app/modules/common-regobs-api/models/waterlevel-2view-model.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* tslint:disable */ -import { WaterLevelMeasurementViewModel } from './water-level-measurement-view-model'; -export interface Waterlevel2ViewModel { - Comment?: string; - /** - * Flood polygon area, List(lon, lat) - */ - Extent?: Array>; - MarkingReferenceName?: string; - MarkingReferenceTID?: number; - MarkingTypeName?: string; - MarkingTypeTID?: number; - MeasurementReferenceName?: string; - MeasurementReferenceTID?: number; - MeasurementTypeName?: string; - MeasurementTypeTID?: number; - MeasuringToolDescription?: string; - ObservationTimingName?: string; - ObservationTimingTID?: number; - WaterAstrayName?: string; - WaterAstrayTID?: number; - WaterLevelMeasurement?: Array; - WaterLevelMethodName?: string; - WaterLevelMethodTID?: number; - WaterLevelStateName?: string; - WaterLevelStateTID?: number; -} diff --git a/src/app/modules/common-regobs-api/models/waterlevel2-edit-model.ts b/src/app/modules/common-regobs-api/models/waterlevel2-edit-model.ts new file mode 100644 index 000000000..9d10ee733 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/waterlevel2-edit-model.ts @@ -0,0 +1,27 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WaterLevelMeasurementEditModel } from './water-level-measurement-edit-model'; + + +export interface Waterlevel2EditModel { + Comment?: string; + /** + * Flood polygon area, List(lon, lat) + */ + Extent?: Array>; + MarkingReferenceTID?: number; + MarkingTypeTID?: number; + MeasurementReferenceTID?: number; + MeasurementTypeTID?: number; + MeasuringToolDescription?: string; + ObservationTimingTID?: number; + WaterAstrayTID?: number; + WaterLevelMeasurement?: Array; + WaterLevelMethodTID?: number; + WaterLevelStateTID?: number; +} + diff --git a/src/app/modules/common-regobs-api/models/waterlevel2-view-model.ts b/src/app/modules/common-regobs-api/models/waterlevel2-view-model.ts new file mode 100644 index 000000000..5f3e4b2e5 --- /dev/null +++ b/src/app/modules/common-regobs-api/models/waterlevel2-view-model.ts @@ -0,0 +1,35 @@ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { WaterLevelMeasurementViewModel } from './water-level-measurement-view-model'; + + +export interface Waterlevel2ViewModel { + Comment?: string; + /** + * Flood polygon area, List(lon, lat) + */ + Extent?: Array>; + MarkingReferenceName?: string; + MarkingReferenceTID?: number; + MarkingTypeName?: string; + MarkingTypeTID?: number; + MeasurementReferenceName?: string; + MeasurementReferenceTID?: number; + MeasurementTypeName?: string; + MeasurementTypeTID?: number; + MeasuringToolDescription?: string; + ObservationTimingName?: string; + ObservationTimingTID?: number; + WaterAstrayName?: string; + WaterAstrayTID?: number; + WaterLevelMeasurement?: Array; + WaterLevelMethodName?: string; + WaterLevelMethodTID?: number; + WaterLevelStateName?: string; + WaterLevelStateTID?: number; +} + diff --git a/src/app/modules/common-regobs-api/models/weather-edit-model.ts b/src/app/modules/common-regobs-api/models/weather-edit-model.ts index e2bb2d4ca..7a56e61a1 100644 --- a/src/app/modules/common-regobs-api/models/weather-edit-model.ts +++ b/src/app/modules/common-regobs-api/models/weather-edit-model.ts @@ -1,9 +1,17 @@ -/* tslint:disable */ -export interface WeatherEditModel { - AirTemperature?: number; - CloudCover?: number; - Comment?: string; - PrecipitationTID?: number; - WindDirection?: number; - WindSpeed?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface WeatherEditModel { + AirTemperature?: number; + CloudCover?: number; + Comment?: string; + PrecipitationTID?: number; + WindDirection?: number; + WindSpeed?: number; } + diff --git a/src/app/modules/common-regobs-api/models/weather-view-model.ts b/src/app/modules/common-regobs-api/models/weather-view-model.ts index 5fd7576ba..3a4848e5f 100644 --- a/src/app/modules/common-regobs-api/models/weather-view-model.ts +++ b/src/app/modules/common-regobs-api/models/weather-view-model.ts @@ -1,11 +1,19 @@ -/* tslint:disable */ -export interface WeatherViewModel { - AirTemperature?: number; - CloudCover?: number; - Comment?: string; - PrecipitationName?: string; - PrecipitationTID?: number; - WindDirection?: number; - WindDirectionName?: string; - WindSpeed?: number; +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export interface WeatherViewModel { + AirTemperature?: number; + CloudCover?: number; + Comment?: string; + PrecipitationName?: string; + PrecipitationTID?: number; + WindDirection?: number; + WindDirectionName?: string; + WindSpeed?: number; } + diff --git a/src/app/modules/common-regobs-api/models/within-extent-criteria-dto.ts b/src/app/modules/common-regobs-api/models/within-extent-criteria-dto.ts index f3edd4535..ee1ae214d 100644 --- a/src/app/modules/common-regobs-api/models/within-extent-criteria-dto.ts +++ b/src/app/modules/common-regobs-api/models/within-extent-criteria-dto.ts @@ -1,6 +1,14 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { PositionDto } from './position-dto'; -export interface WithinExtentCriteriaDto { - BottomRight?: PositionDto; - TopLeft?: PositionDto; + + +export interface WithinExtentCriteriaDto { + BottomRight?: PositionDto; + TopLeft?: PositionDto; } + diff --git a/src/app/modules/common-regobs-api/models/within-radius-criteria-dto.ts b/src/app/modules/common-regobs-api/models/within-radius-criteria-dto.ts index 009924c40..a10ab21d7 100644 --- a/src/app/modules/common-regobs-api/models/within-radius-criteria-dto.ts +++ b/src/app/modules/common-regobs-api/models/within-radius-criteria-dto.ts @@ -1,6 +1,14 @@ -/* tslint:disable */ +/** + * NOTE: This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + import { PositionDto } from './position-dto'; -export interface WithinRadiusCriteriaDto { - Position?: PositionDto; - Radius?: number; + + +export interface WithinRadiusCriteriaDto { + Position?: PositionDto; + Radius: number; } + diff --git a/src/app/modules/common-regobs-api/param.ts b/src/app/modules/common-regobs-api/param.ts new file mode 100644 index 000000000..78a2d20a6 --- /dev/null +++ b/src/app/modules/common-regobs-api/param.ts @@ -0,0 +1,69 @@ +/** + * Standard parameter styles defined by OpenAPI spec + */ +export type StandardParamStyle = + | 'matrix' + | 'label' + | 'form' + | 'simple' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + ; + +/** + * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. + */ +export type ParamStyle = StandardParamStyle | string; + +/** + * Standard parameter locations defined by OpenAPI spec + */ +export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; + +/** + * Standard types as defined in OpenAPI Specification: Data Types + */ +export type StandardDataType = + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; + +/** + * Standard {@link DataType}s plus your own types/classes. + */ +export type DataType = StandardDataType | string; + +/** + * Standard formats as defined in OpenAPI Specification: Data Types + */ +export type StandardDataFormat = + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; + +export type DataFormat = StandardDataFormat | string; + +/** + * The parameter to encode. + */ +export interface Param { + name: string; + value: unknown; + in: ParamLocation; + style: ParamStyle, + explode: boolean; + dataType: DataType; + dataFormat: DataFormat | undefined; +} diff --git a/src/app/modules/common-regobs-api/provide-api.ts b/src/app/modules/common-regobs-api/provide-api.ts new file mode 100644 index 000000000..19c762acd --- /dev/null +++ b/src/app/modules/common-regobs-api/provide-api.ts @@ -0,0 +1,15 @@ +import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core"; +import { Configuration, ConfigurationParameters } from './configuration'; +import { BASE_PATH } from './variables'; + +// Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig). +export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders { + return makeEnvironmentProviders([ + typeof configOrBasePath === "string" + ? { provide: BASE_PATH, useValue: configOrBasePath } + : { + provide: Configuration, + useValue: new Configuration({ ...configOrBasePath }), + }, + ]); +} \ No newline at end of file diff --git a/src/app/modules/common-regobs-api/public-api.ts b/src/app/modules/common-regobs-api/public-api.ts deleted file mode 100644 index 12dbaf5d4..000000000 --- a/src/app/modules/common-regobs-api/public-api.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index'; \ No newline at end of file diff --git a/src/app/modules/common-regobs-api/regobs-api-configuration-provider.ts b/src/app/modules/common-regobs-api/regobs-api-configuration-provider.ts deleted file mode 100644 index ef49f3b10..000000000 --- a/src/app/modules/common-regobs-api/regobs-api-configuration-provider.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { AppMode } from 'src/app/modules/common-core/models'; -import { RegobsApiConfigurationInterface } from './regobs-api-configuration'; -import { OnDestroy, Injectable } from '@angular/core'; -import { Subscription } from 'rxjs'; -import { settings } from 'src/settings'; -import { UserSettingService } from 'src/app/core/services/user-setting/user-setting.service'; - -@Injectable() -export class RegObsApiConfigurationProvider implements RegobsApiConfigurationInterface, OnDestroy { - private subscription: Subscription; - private appMode: AppMode = AppMode.Prod; - - constructor(private userSettingService: UserSettingService) { - this.subscription = this.userSettingService.appMode$.subscribe((val) => { - this.appMode = val; - }); - } - - get rootUrl() { - return settings.services.regObs.apiUrl[this.appMode]; - } - - ngOnDestroy(): void { - if (this.subscription) { - this.subscription.unsubscribe(); - } - } -} diff --git a/src/app/modules/common-regobs-api/regobs-api-configuration.ts b/src/app/modules/common-regobs-api/regobs-api-configuration.ts deleted file mode 100644 index 5b81ae736..000000000 --- a/src/app/modules/common-regobs-api/regobs-api-configuration.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; - -/** - * Global configuration for regobsApi services - */ -@Injectable({ - providedIn: 'root', -}) -export class RegobsApiConfiguration { - rootUrl: string = 'https://test-api.regobs.no/v5'; -} - -export interface RegobsApiConfigurationInterface { - rootUrl?: string; -} diff --git a/src/app/modules/common-regobs-api/regobs-api-with-config.module.ts b/src/app/modules/common-regobs-api/regobs-api-with-config.module.ts deleted file mode 100644 index 270119e68..000000000 --- a/src/app/modules/common-regobs-api/regobs-api-with-config.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { NgModule, InjectionToken, ModuleWithProviders } from '@angular/core'; -import { RegobsApiConfigurationInterface, RegobsApiConfiguration } from './regobs-api-configuration'; -import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; -import { UserSettingService } from 'src/app/core/services/user-setting/user-setting.service'; -import { RegObsApiConfigurationProvider } from './regobs-api-configuration-provider'; - -export const FOR_ROOT_OPTIONS_TOKEN = new InjectionToken('forRoot() Module configuration'); - - -@NgModule({imports: [], providers: [provideHttpClient(withInterceptorsFromDi())] }) -export class RegobsApiModuleWithConfig { - static forRoot(options?: RegobsApiConfigurationInterface): ModuleWithProviders { - return { - ngModule: RegobsApiModuleWithConfig, - providers: [ - { - provide: FOR_ROOT_OPTIONS_TOKEN, - useValue: options - }, - { - provide: RegobsApiConfiguration, - useFactory: regObsConfigurationFactory, - deps: [UserSettingService, FOR_ROOT_OPTIONS_TOKEN] - } - ] - }; - } - // static forTesting(): ModuleWithProviders { - // return ({ - // ngModule: RegobsApiModuleWithConfig, - // providers: [] - // }); - // } -} - -export function regObsConfigurationFactory( - userSettingService: UserSettingService, - options?: RegobsApiConfigurationInterface -) { - return options ? options : new RegObsApiConfigurationProvider(userSettingService); -} diff --git a/src/app/modules/common-regobs-api/regobs-api.module.ts b/src/app/modules/common-regobs-api/regobs-api.module.ts deleted file mode 100644 index f3dcb59dd..000000000 --- a/src/app/modules/common-regobs-api/regobs-api.module.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -import { NgModule, ModuleWithProviders } from '@angular/core'; -import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; -import { RegobsApiConfiguration, RegobsApiConfigurationInterface } from './regobs-api-configuration'; - -import { AccountService } from './services/account.service'; -import { AttachmentService } from './services/attachment.service'; -import { GeoCodeService } from './services/geo-code.service'; -import { HelptextService } from './services/helptext.service'; -import { KdvElementsService } from './services/kdv-elements.service'; -import { LocationService } from './services/location.service'; -import { RegistrationService } from './services/registration.service'; -import { SearchService } from './services/search.service'; -import { TripService } from './services/trip.service'; - -/** - * Provider for all regobsApi services, plus RegobsApiConfiguration - */ -@NgModule({ - declarations: [], imports: [], providers: [ - RegobsApiConfiguration, - AccountService, - AttachmentService, - GeoCodeService, - HelptextService, - KdvElementsService, - LocationService, - RegistrationService, - SearchService, - TripService, - provideHttpClient(withInterceptorsFromDi()) - ] }) -export class RegobsApiModule { - static forRoot(customParams: RegobsApiConfigurationInterface): ModuleWithProviders { - return { - ngModule: RegobsApiModule, - providers: [ - { - provide: RegobsApiConfiguration, - useValue: {rootUrl: customParams.rootUrl} - } - ] - } - } -} diff --git a/src/app/modules/common-regobs-api/services.ts b/src/app/modules/common-regobs-api/services.ts deleted file mode 100644 index 7359ed459..000000000 --- a/src/app/modules/common-regobs-api/services.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { AccountService } from './services/account.service'; -export { AttachmentService } from './services/attachment.service'; -export { GeoCodeService } from './services/geo-code.service'; -export { HelptextService } from './services/helptext.service'; -export { KdvElementsService } from './services/kdv-elements.service'; -export { LocationService } from './services/location.service'; -export { RegistrationService } from './services/registration.service'; -export { SearchService } from './services/search.service'; -export { TripService } from './services/trip.service'; diff --git a/src/app/modules/common-regobs-api/services/account.service.ts b/src/app/modules/common-regobs-api/services/account.service.ts deleted file mode 100644 index f8de5ac4c..000000000 --- a/src/app/modules/common-regobs-api/services/account.service.ts +++ /dev/null @@ -1,213 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { ObserverResponseDto } from '../models/observer-response-dto'; -import { ObserverGroupDto } from '../models/observer-group-dto'; -import { MyPageData } from '../models/my-page-data'; -import { ObserverPatchRequestDto } from '../models/observer-patch-request-dto'; -@Injectable({ - providedIn: 'root', -}) -class AccountService extends __BaseService { - static readonly AccountGetObserverPath = '/Account/GetObserver'; - static readonly AccountGetObserverGroupsPath = '/Account/Groups'; - static readonly AccountGetAccountGroupsByGuidPath = '/Account/Groups/{guid}'; - static readonly AccountGetMyPageDataPath = '/Account/Mypage'; - static readonly AccountUpdateObserverPath = '/Account/UpdateObserver'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * @return OK - */ - AccountGetObserverResponse(): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Account/GetObserver`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * @return OK - */ - AccountGetObserver(): __Observable { - return this.AccountGetObserverResponse().pipe( - __map(_r => _r.body as ObserverResponseDto) - ); - } - - /** - * @return Observer Groups - */ - AccountGetObserverGroupsResponse(): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Account/Groups`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * @return Observer Groups - */ - AccountGetObserverGroups(): __Observable> { - return this.AccountGetObserverGroupsResponse().pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * Use GET Account/Groups instead - * @param guid undefined - * @return Observer Groups - */ - AccountGetAccountGroupsByGuidResponse(guid: string): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Account/Groups/${encodeURIComponent(String(guid))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Use GET Account/Groups instead - * @param guid undefined - * @return Observer Groups - */ - AccountGetAccountGroupsByGuid(guid: string): __Observable> { - return this.AccountGetAccountGroupsByGuidResponse(guid).pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * @param langKey undefined - * @return OK - */ - AccountGetMyPageDataResponse(langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (langKey != null) __params = __params.set('langKey', langKey.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Account/Mypage`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * @param langKey undefined - * @return OK - */ - AccountGetMyPageData(langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9): __Observable { - return this.AccountGetMyPageDataResponse(langKey).pipe( - __map(_r => _r.body as MyPageData) - ); - } - - /** - * Set nickname for an observer - * @param observerPatchRequestDto undefined - * @return OK - */ - AccountUpdateObserverResponse(observerPatchRequestDto: ObserverPatchRequestDto): __Observable<__StrictHttpResponse<{}>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = observerPatchRequestDto; - let req = new HttpRequest( - 'PUT', - this.rootUrl + `/Account/UpdateObserver`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse<{}>; - }) - ); - } - /** - * Set nickname for an observer - * @param observerPatchRequestDto undefined - * @return OK - */ - AccountUpdateObserver(observerPatchRequestDto: ObserverPatchRequestDto): __Observable<{}> { - return this.AccountUpdateObserverResponse(observerPatchRequestDto).pipe( - __map(_r => _r.body as {}) - ); - } -} - -module AccountService { -} - -export { AccountService } diff --git a/src/app/modules/common-regobs-api/services/attachment.service.ts b/src/app/modules/common-regobs-api/services/attachment.service.ts deleted file mode 100644 index 377b7b4a3..000000000 --- a/src/app/modules/common-regobs-api/services/attachment.service.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -@Injectable({ - providedIn: 'root', -}) -class AttachmentService extends __BaseService { - static readonly AttachmentPostPath = '/Attachment/Upload'; - static readonly AttachmentGetPath = '/Attachment/{format}/{id}'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Upload an image to a registration - * @param file Attachment to upload - * @return OK - */ - AttachmentPostResponse(file: Blob): __Observable<__StrictHttpResponse<{}>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - let __formData = new FormData(); - __body = __formData; - if (file != null) { __formData.append('file', file as string | Blob);} - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Attachment/Upload`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse<{}>; - }) - ); - } - /** - * Upload an image to a registration - * @param file Attachment to upload - * @return OK - */ - AttachmentPost(file: Blob): __Observable<{}> { - return this.AttachmentPostResponse(file).pipe( - __map(_r => _r.body as {}) - ); - } - - /** - * Get Attachment file by id - * @param params The `AttachmentService.AttachmentGetParams` containing the following parameters: - * - * - `id`: Attachment id - * - * - `format`: Image format. For video, use Raw. Possible image formats: Raw, Original, Large, Medium, Thumbnail - */ - AttachmentGetResponse(params: AttachmentService.AttachmentGetParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Attachment/${encodeURIComponent(String(params.format))}/${encodeURIComponent(String(params.id))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Get Attachment file by id - * @param params The `AttachmentService.AttachmentGetParams` containing the following parameters: - * - * - `id`: Attachment id - * - * - `format`: Image format. For video, use Raw. Possible image formats: Raw, Original, Large, Medium, Thumbnail - */ - AttachmentGet(params: AttachmentService.AttachmentGetParams): __Observable { - return this.AttachmentGetResponse(params).pipe( - __map(_r => _r.body as null) - ); - } -} - -module AttachmentService { - - /** - * Parameters for AttachmentGet - */ - export interface AttachmentGetParams { - - /** - * Attachment id - */ - id: number; - - /** - * Image format. For video, use Raw. Possible image formats: Raw, Original, Large, Medium, Thumbnail - */ - format: string; - } -} - -export { AttachmentService } diff --git a/src/app/modules/common-regobs-api/services/geo-code.service.ts b/src/app/modules/common-regobs-api/services/geo-code.service.ts deleted file mode 100644 index 4452e6397..000000000 --- a/src/app/modules/common-regobs-api/services/geo-code.service.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { GeoLocationInfo } from '../models/geo-location-info'; -import { GeoLocationSummary } from '../models/geo-location-summary'; -@Injectable({ - providedIn: 'root', -}) -class GeoCodeService extends __BaseService { - static readonly GeoCodeLocationInfoPath = '/GeoCode/LocationInfo'; - static readonly GeoCodeLocationSummaryPath = '/GeoCode/LocationSummary'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * @param params The `GeoCodeService.GeoCodeLocationInfoParams` containing the following parameters: - * - * - `longitude`: - * - * - `latitude`: - * - * - `geoHazardId`: - * - * @return OK - */ - GeoCodeLocationInfoResponse(params: GeoCodeService.GeoCodeLocationInfoParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (params.longitude != null) __params = __params.set('longitude', params.longitude.toString()); - if (params.latitude != null) __params = __params.set('latitude', params.latitude.toString()); - if (params.geoHazardId != null) __params = __params.set('geoHazardId', params.geoHazardId.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/GeoCode/LocationInfo`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * @param params The `GeoCodeService.GeoCodeLocationInfoParams` containing the following parameters: - * - * - `longitude`: - * - * - `latitude`: - * - * - `geoHazardId`: - * - * @return OK - */ - GeoCodeLocationInfo(params: GeoCodeService.GeoCodeLocationInfoParams): __Observable { - return this.GeoCodeLocationInfoResponse(params).pipe( - __map(_r => _r.body as GeoLocationInfo) - ); - } - - /** - * Get preformatted geolocation info. - * - * The response contains a header and one to three lines of geolocation info, depending on what kind of geolocation info the API has available. - * The header may be empty if no geolocation info is available, but at least the position is always returned (line 1). - * - * Example JSON response: - * - * ```json - * { - * "Header": "Lom", - * "Lines": [ - * "61,636°N, 8,313°Ø, 2469 moh", - * "Lom kommune", - * "Varslingsregion Jotunheimen" - * ] - * } - * ``` - * @param params The `GeoCodeService.GeoCodeLocationSummaryParams` containing the following parameters: - * - * - `longitude`: Longitude - * - * - `latitude`: Latitude - * - * - `langKey`: Language key, 1 = NO, 2 = EN etc - * - * - `geoHazardId`: Geohazard id, eg. 10 = Snow/Avalanche - * - * @return OK - */ - GeoCodeLocationSummaryResponse(params: GeoCodeService.GeoCodeLocationSummaryParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (params.longitude != null) __params = __params.set('longitude', params.longitude.toString()); - if (params.latitude != null) __params = __params.set('latitude', params.latitude.toString()); - if (params.langKey != null) __params = __params.set('langKey', params.langKey.toString()); - if (params.geoHazardId != null) __params = __params.set('geoHazardId', params.geoHazardId.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/GeoCode/LocationSummary`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Get preformatted geolocation info. - * - * The response contains a header and one to three lines of geolocation info, depending on what kind of geolocation info the API has available. - * The header may be empty if no geolocation info is available, but at least the position is always returned (line 1). - * - * Example JSON response: - * - * ```json - * { - * "Header": "Lom", - * "Lines": [ - * "61,636°N, 8,313°Ø, 2469 moh", - * "Lom kommune", - * "Varslingsregion Jotunheimen" - * ] - * } - * ``` - * @param params The `GeoCodeService.GeoCodeLocationSummaryParams` containing the following parameters: - * - * - `longitude`: Longitude - * - * - `latitude`: Latitude - * - * - `langKey`: Language key, 1 = NO, 2 = EN etc - * - * - `geoHazardId`: Geohazard id, eg. 10 = Snow/Avalanche - * - * @return OK - */ - GeoCodeLocationSummary(params: GeoCodeService.GeoCodeLocationSummaryParams): __Observable { - return this.GeoCodeLocationSummaryResponse(params).pipe( - __map(_r => _r.body as GeoLocationSummary) - ); - } -} - -module GeoCodeService { - - /** - * Parameters for GeoCodeLocationInfo - */ - export interface GeoCodeLocationInfoParams { - longitude: number; - latitude: number; - geoHazardId: number; - } - - /** - * Parameters for GeoCodeLocationSummary - */ - export interface GeoCodeLocationSummaryParams { - - /** - * Longitude - */ - longitude: number; - - /** - * Latitude - */ - latitude: number; - - /** - * Language key, 1 = NO, 2 = EN etc - */ - langKey: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - - /** - * Geohazard id, eg. 10 = Snow/Avalanche - */ - geoHazardId: number; - } -} - -export { GeoCodeService } diff --git a/src/app/modules/common-regobs-api/services/helptext.service.ts b/src/app/modules/common-regobs-api/services/helptext.service.ts deleted file mode 100644 index d3ad60b79..000000000 --- a/src/app/modules/common-regobs-api/services/helptext.service.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { HelptextDto } from '../models/helptext-dto'; -@Injectable({ - providedIn: 'root', -}) -class HelptextService extends __BaseService { - static readonly HelptextGetPath = '/HelpText'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Get a list of helptext objects. - * - * Used by the app and regobs.no web for displaying help texts. - * @param langKey Specify 1 for norwegian or 2 for english - * @return OK - */ - HelptextGetResponse(langKey: number): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (langKey != null) __params = __params.set('langKey', langKey.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/HelpText`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Get a list of helptext objects. - * - * Used by the app and regobs.no web for displaying help texts. - * @param langKey Specify 1 for norwegian or 2 for english - * @return OK - */ - HelptextGet(langKey: number): __Observable> { - return this.HelptextGetResponse(langKey).pipe( - __map(_r => _r.body as Array) - ); - } -} - -module HelptextService { -} - -export { HelptextService } diff --git a/src/app/modules/common-regobs-api/services/kdv-elements.service.ts b/src/app/modules/common-regobs-api/services/kdv-elements.service.ts deleted file mode 100644 index dfef22c58..000000000 --- a/src/app/modules/common-regobs-api/services/kdv-elements.service.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { KdvElementsResponseDto } from '../models/kdv-elements-response-dto'; -@Injectable({ - providedIn: 'root', -}) -class KdvElementsService extends __BaseService { - static readonly KdvElementsGetKdvsPath = '/KdvElements'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Returns id, name, and description for data types. This is most often used in input fields, dropdowns etc. KDVElements that belong to a geo hazard are prefixed with the corresponding hazard (Snow_, Ice_, Water_, Landslide_). - * If a type is missing in given language, we will fill the holes with equivalent types in English (if they exists) - * @param params The `KdvElementsService.KdvElementsGetKdvsParams` containing the following parameters: - * - * - `sortOrder`: False returns data types sorted by id - * - * - `langkey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 7 = norwegian nynorsk, 8 = french. Norwegian is the default language if none is selected. Default langKey is norwegian - * - * - `isActive`: False returns data types that are no longer in use - * - * @return OK - */ - KdvElementsGetKdvsResponse(params: KdvElementsService.KdvElementsGetKdvsParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (params.sortOrder != null) __params = __params.set('sortOrder', params.sortOrder.toString()); - if (params.langkey != null) __params = __params.set('langkey', params.langkey.toString()); - if (params.isActive != null) __params = __params.set('isActive', params.isActive.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/KdvElements`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Returns id, name, and description for data types. This is most often used in input fields, dropdowns etc. KDVElements that belong to a geo hazard are prefixed with the corresponding hazard (Snow_, Ice_, Water_, Landslide_). - * If a type is missing in given language, we will fill the holes with equivalent types in English (if they exists) - * @param params The `KdvElementsService.KdvElementsGetKdvsParams` containing the following parameters: - * - * - `sortOrder`: False returns data types sorted by id - * - * - `langkey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 7 = norwegian nynorsk, 8 = french. Norwegian is the default language if none is selected. Default langKey is norwegian - * - * - `isActive`: False returns data types that are no longer in use - * - * @return OK - */ - KdvElementsGetKdvs(params: KdvElementsService.KdvElementsGetKdvsParams): __Observable { - return this.KdvElementsGetKdvsResponse(params).pipe( - __map(_r => _r.body as KdvElementsResponseDto) - ); - } -} - -module KdvElementsService { - - /** - * Parameters for KdvElementsGetKdvs - */ - export interface KdvElementsGetKdvsParams { - - /** - * False returns data types sorted by id - */ - sortOrder?: boolean; - - /** - * 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 7 = norwegian nynorsk, 8 = french. Norwegian is the default language if none is selected. Default langKey is norwegian - */ - langkey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - - /** - * False returns data types that are no longer in use - */ - isActive?: boolean; - } -} - -export { KdvElementsService } diff --git a/src/app/modules/common-regobs-api/services/location.service.ts b/src/app/modules/common-regobs-api/services/location.service.ts deleted file mode 100644 index ee94320ae..000000000 --- a/src/app/modules/common-regobs-api/services/location.service.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { ObsLocationsResponseDtoV2 } from '../models/obs-locations-response-dto-v2'; -@Injectable({ - providedIn: 'root', -}) -class LocationService extends __BaseService { - static readonly LocationWithinRadiusPath = '/Location/WithinRadius'; - static readonly LocationGetPath = '/Location/{locationId}'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Returns a list of locations within the given radius from the given coordinates. - * For an unauthenticated client, it only returns public ice locations. - * For an authenticated client, it returns public locations as well as the - * authenticated user's private locations. - * Empty list if no registrations found. - * @param params The `LocationService.LocationWithinRadiusParams` containing the following parameters: - * - * - `radius`: - * - * - `longitude`: - * - * - `latitude`: - * - * - `returnCount`: - * - * - `geoHazardTypeIds`: - * - * @return OK - */ - LocationWithinRadiusResponse(params: LocationService.LocationWithinRadiusParams): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (params.radius != null) __params = __params.set('radius', params.radius.toString()); - if (params.longitude != null) __params = __params.set('longitude', params.longitude.toString()); - if (params.latitude != null) __params = __params.set('latitude', params.latitude.toString()); - if (params.returnCount != null) __params = __params.set('returnCount', params.returnCount.toString()); - (params.geoHazardTypeIds || []).forEach(val => {if (val != null) __params = __params.append('geoHazardTypeIds', val.toString())}); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Location/WithinRadius`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Returns a list of locations within the given radius from the given coordinates. - * For an unauthenticated client, it only returns public ice locations. - * For an authenticated client, it returns public locations as well as the - * authenticated user's private locations. - * Empty list if no registrations found. - * @param params The `LocationService.LocationWithinRadiusParams` containing the following parameters: - * - * - `radius`: - * - * - `longitude`: - * - * - `latitude`: - * - * - `returnCount`: - * - * - `geoHazardTypeIds`: - * - * @return OK - */ - LocationWithinRadius(params: LocationService.LocationWithinRadiusParams): __Observable> { - return this.LocationWithinRadiusResponse(params).pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * @param params The `LocationService.LocationGetParams` containing the following parameters: - * - * - `locationId`: - * - * - `langKey`: - * - * @return OK - */ - LocationGetResponse(params: LocationService.LocationGetParams): __Observable<__StrictHttpResponse<{}>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - if (params.langKey != null) __params = __params.set('langKey', params.langKey.toString()); - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Location/${encodeURIComponent(String(params.locationId))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse<{}>; - }) - ); - } - /** - * @param params The `LocationService.LocationGetParams` containing the following parameters: - * - * - `locationId`: - * - * - `langKey`: - * - * @return OK - */ - LocationGet(params: LocationService.LocationGetParams): __Observable<{}> { - return this.LocationGetResponse(params).pipe( - __map(_r => _r.body as {}) - ); - } -} - -module LocationService { - - /** - * Parameters for LocationWithinRadius - */ - export interface LocationWithinRadiusParams { - radius: number; - longitude: number; - latitude: number; - returnCount?: number; - geoHazardTypeIds?: Array; - } - - /** - * Parameters for LocationGet - */ - export interface LocationGetParams { - locationId: number; - langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - } -} - -export { LocationService } diff --git a/src/app/modules/common-regobs-api/services/registration.service.ts b/src/app/modules/common-regobs-api/services/registration.service.ts deleted file mode 100644 index 68be44f8c..000000000 --- a/src/app/modules/common-regobs-api/services/registration.service.ts +++ /dev/null @@ -1,556 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { RegistrationViewModel } from '../models/registration-view-model'; -import { RegistrationEditModel } from '../models/registration-edit-model'; -@Injectable({ - providedIn: 'root', -}) -class RegistrationService extends __BaseService { - static readonly RegistrationGetPath = '/Registration/{regId}/{langKey}'; - static readonly RegistrationGetCaamlPath = '/Registration/Caaml/{regId}'; - static readonly RegistrationPlotPreviewPngPath = '/Registration/PlotPreviewPng'; - static readonly RegistrationInsertOrUpdatePath = '/Registration/{id}'; - static readonly RegistrationDeletePath = '/Registration/{id}'; - static readonly RegistrationInsertPath = '/Registration'; - static readonly RegistrationValidatePath = '/Registration/Validate/{id}'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Get registration by regId. - * @param params The `RegistrationService.RegistrationGetParams` containing the following parameters: - * - * - `regId`: Registration Id - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * @return OK - */ - RegistrationGetResponse(params: RegistrationService.RegistrationGetParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Registration/${encodeURIComponent(String(params.regId))}/${encodeURIComponent(String(params.langKey))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Get registration by regId. - * @param params The `RegistrationService.RegistrationGetParams` containing the following parameters: - * - * - `regId`: Registration Id - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * @return OK - */ - RegistrationGet(params: RegistrationService.RegistrationGetParams): __Observable { - return this.RegistrationGetResponse(params).pipe( - __map(_r => _r.body as RegistrationViewModel) - ); - } - - /** - * Get a registration in CAAML format - * - * CAAML (Canadian Avalanche Association Markup Language) is a standard - * for the electronic representation of information pertinent to avalanche - * safety operations. See http://caaml.org/. - * @param regId Registration Id - * @return OK - */ - RegistrationGetCaamlResponse(regId: number): __Observable<__StrictHttpResponse<{}>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Registration/Caaml/${encodeURIComponent(String(regId))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse<{}>; - }) - ); - } - /** - * Get a registration in CAAML format - * - * CAAML (Canadian Avalanche Association Markup Language) is a standard - * for the electronic representation of information pertinent to avalanche - * safety operations. See http://caaml.org/. - * @param regId Registration Id - * @return OK - */ - RegistrationGetCaaml(regId: number): __Observable<{}> { - return this.RegistrationGetCaamlResponse(regId).pipe( - __map(_r => _r.body as {}) - ); - } - - /** - * Generate a preview figure for a snow profile registration. - * @param params The `RegistrationService.RegistrationPlotPreviewPngParams` containing the following parameters: - * - * - `width`: - * - * - `registration`: Snow profile registration - * - * - `height`: - * - * - `format`: - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * @return OK - */ - RegistrationPlotPreviewPngResponse(params: RegistrationService.RegistrationPlotPreviewPngParams): __Observable<__StrictHttpResponse<{}>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - if (params.width != null) __params = __params.set('width', params.width.toString()); - __body = params.registration; - if (params.height != null) __params = __params.set('height', params.height.toString()); - if (params.format != null) __params = __params.set('format', params.format.toString()); - if (params.langKey != null) __params = __params.set('langKey', params.langKey.toString()); - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Registration/PlotPreviewPng`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse<{}>; - }) - ); - } - /** - * Generate a preview figure for a snow profile registration. - * @param params The `RegistrationService.RegistrationPlotPreviewPngParams` containing the following parameters: - * - * - `width`: - * - * - `registration`: Snow profile registration - * - * - `height`: - * - * - `format`: - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * @return OK - */ - RegistrationPlotPreviewPng(params: RegistrationService.RegistrationPlotPreviewPngParams): __Observable<{}> { - return this.RegistrationPlotPreviewPngResponse(params).pipe( - __map(_r => _r.body as {}) - ); - } - - /** - * Update registration. Updating existing obsLocation with new values will be possible only - * if there is no other registrations connected to that location from before. Otherwise new values are ignored. User don't get any error message. - * @param params The `RegistrationService.RegistrationInsertOrUpdateParams` containing the following parameters: - * - * - `registration`: Registration data - * - * - `id`: Set to regId if update existing registration, else leave blank - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * - `ignoreVersionCheck`: Set this to true if you want to replace the last saved version of this registration even if your copy is outdated - * - * - `externalReferenceId`: External reference id, must be unique for application and in GUID format - * - * @return OK - */ - RegistrationInsertOrUpdateResponse(params: RegistrationService.RegistrationInsertOrUpdateParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = params.registration; - - if (params.langKey != null) __params = __params.set('langKey', params.langKey.toString()); - if (params.ignoreVersionCheck != null) __params = __params.set('ignoreVersionCheck', params.ignoreVersionCheck.toString()); - if (params.externalReferenceId != null) __params = __params.set('externalReferenceId', params.externalReferenceId.toString()); - let req = new HttpRequest( - 'PUT', - this.rootUrl + `/Registration/${encodeURIComponent(String(params.id))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Update registration. Updating existing obsLocation with new values will be possible only - * if there is no other registrations connected to that location from before. Otherwise new values are ignored. User don't get any error message. - * @param params The `RegistrationService.RegistrationInsertOrUpdateParams` containing the following parameters: - * - * - `registration`: Registration data - * - * - `id`: Set to regId if update existing registration, else leave blank - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * - `ignoreVersionCheck`: Set this to true if you want to replace the last saved version of this registration even if your copy is outdated - * - * - `externalReferenceId`: External reference id, must be unique for application and in GUID format - * - * @return OK - */ - RegistrationInsertOrUpdate(params: RegistrationService.RegistrationInsertOrUpdateParams): __Observable { - return this.RegistrationInsertOrUpdateResponse(params).pipe( - __map(_r => _r.body as RegistrationViewModel) - ); - } - - /** - * Delete registration - * @param id undefined - */ - RegistrationDeleteResponse(id: number): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - let req = new HttpRequest( - 'DELETE', - this.rootUrl + `/Registration/${encodeURIComponent(String(id))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Delete registration - * @param id undefined - */ - RegistrationDelete(id: number): __Observable { - return this.RegistrationDeleteResponse(id).pipe( - __map(_r => _r.body as null) - ); - } - - /** - * Create a new registration. The purpose is to send in one or more forms. - * - * Example critera for creating a new registration with one form. - * - * { - * "GeoHazardTID": 20, - * "DtObsTime": "2021-06-25T13:18:00.000Z", - * "ObsLocation": { - * "Latitude": 60.919917123811992, - * "Longitude": 7.210167614875667, - * }, - * "LandSlideObs": { - * "LandSlideTID": 2, - * "LandSlideTriggerTID": 0, - * "LandSlideSizeTID": 0, - * "Comment": "Flomskred på FV5627 løsnet fra vegskjæring 0-50m. Anslått skredvolum på veg: mindre enn 10m^3.Blokkert veglengde: Kun i grøft.", - * "GeoHazardTID": 20, - * "ActivityInfluencedTID": 220, - * "ForecastAccurateTID": 0, - * "DamageExtentTID": 0, - * "DtLandSlideTime": "2021-06-25T08:10:00+02:00", - * } - * } - * @param params The `RegistrationService.RegistrationInsertParams` containing the following parameters: - * - * - `registration`: ObsLocation, GeoHazardTID and DtObsTime are mandatory. - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * - `externalReferenceId`: Unique identifier for registration (must be in GUID format). - * - * @return OK - */ - RegistrationInsertResponse(params: RegistrationService.RegistrationInsertParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = params.registration; - if (params.langKey != null) __params = __params.set('langKey', params.langKey.toString()); - if (params.externalReferenceId != null) __params = __params.set('externalReferenceId', params.externalReferenceId.toString()); - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Registration`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Create a new registration. The purpose is to send in one or more forms. - * - * Example critera for creating a new registration with one form. - * - * { - * "GeoHazardTID": 20, - * "DtObsTime": "2021-06-25T13:18:00.000Z", - * "ObsLocation": { - * "Latitude": 60.919917123811992, - * "Longitude": 7.210167614875667, - * }, - * "LandSlideObs": { - * "LandSlideTID": 2, - * "LandSlideTriggerTID": 0, - * "LandSlideSizeTID": 0, - * "Comment": "Flomskred på FV5627 løsnet fra vegskjæring 0-50m. Anslått skredvolum på veg: mindre enn 10m^3.Blokkert veglengde: Kun i grøft.", - * "GeoHazardTID": 20, - * "ActivityInfluencedTID": 220, - * "ForecastAccurateTID": 0, - * "DamageExtentTID": 0, - * "DtLandSlideTime": "2021-06-25T08:10:00+02:00", - * } - * } - * @param params The `RegistrationService.RegistrationInsertParams` containing the following parameters: - * - * - `registration`: ObsLocation, GeoHazardTID and DtObsTime are mandatory. - * - * - `langKey`: 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - * - * - `externalReferenceId`: Unique identifier for registration (must be in GUID format). - * - * @return OK - */ - RegistrationInsert(params: RegistrationService.RegistrationInsertParams): __Observable { - return this.RegistrationInsertResponse(params).pipe( - __map(_r => _r.body as RegistrationViewModel) - ); - } - - /** - * Validate registration data. - * @param params The `RegistrationService.RegistrationValidateParams` containing the following parameters: - * - * - `registration`: Registration data - * - * - `id`: RegId if existing registration else null if new - * - * - `externalReferenceId`: External reference id, must be unique for application and in GUID format - * - * @return OK - */ - RegistrationValidateResponse(params: RegistrationService.RegistrationValidateParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = params.registration; - - if (params.externalReferenceId != null) __params = __params.set('externalReferenceId', params.externalReferenceId.toString()); - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Registration/Validate/${encodeURIComponent(String(params.id))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Validate registration data. - * @param params The `RegistrationService.RegistrationValidateParams` containing the following parameters: - * - * - `registration`: Registration data - * - * - `id`: RegId if existing registration else null if new - * - * - `externalReferenceId`: External reference id, must be unique for application and in GUID format - * - * @return OK - */ - RegistrationValidate(params: RegistrationService.RegistrationValidateParams): __Observable { - return this.RegistrationValidateResponse(params).pipe( - __map(_r => _r.body as RegistrationEditModel) - ); - } -} - -module RegistrationService { - - /** - * Parameters for RegistrationGet - */ - export interface RegistrationGetParams { - - /** - * Registration Id - */ - regId: number; - - /** - * 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - */ - langKey: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - } - - /** - * Parameters for RegistrationPlotPreviewPng - */ - export interface RegistrationPlotPreviewPngParams { - width: number; - - /** - * Snow profile registration - */ - registration: RegistrationEditModel; - height: number; - format: number; - - /** - * 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - */ - langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - } - - /** - * Parameters for RegistrationInsertOrUpdate - */ - export interface RegistrationInsertOrUpdateParams { - - /** - * Registration data - */ - registration: RegistrationEditModel; - - /** - * Set to regId if update existing registration, else leave blank - */ - id: number; - - /** - * 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - */ - langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - - /** - * Set this to true if you want to replace the last saved version of this registration even if your copy is outdated - */ - ignoreVersionCheck?: boolean; - - /** - * External reference id, must be unique for application and in GUID format - */ - externalReferenceId?: string; - } - - /** - * Parameters for RegistrationInsert - */ - export interface RegistrationInsertParams { - - /** - * ObsLocation, GeoHazardTID and DtObsTime are mandatory. - */ - registration: RegistrationEditModel; - - /** - * 1 = norwegian, 2 = english, 3 = german, 4 = slovenian, 5 = swedish, 6 = italian, 7 = norwegian nynorsk. - */ - langKey?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; - - /** - * Unique identifier for registration (must be in GUID format). - */ - externalReferenceId?: string; - } - - /** - * Parameters for RegistrationValidate - */ - export interface RegistrationValidateParams { - - /** - * Registration data - */ - registration: RegistrationEditModel; - - /** - * RegId if existing registration else null if new - */ - id: number; - - /** - * External reference id, must be unique for application and in GUID format - */ - externalReferenceId?: string; - } -} - -export { RegistrationService } diff --git a/src/app/modules/common-regobs-api/services/search.service.ts b/src/app/modules/common-regobs-api/services/search.service.ts deleted file mode 100644 index d6b250f2e..000000000 --- a/src/app/modules/common-regobs-api/services/search.service.ts +++ /dev/null @@ -1,461 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { RegistrationViewModel } from '../models/registration-view-model'; -import { SearchCriteriaRequestDto } from '../models/search-criteria-request-dto'; -import { SearchCriteriaExclUserRequestDto } from '../models/search-criteria-excl-user-request-dto'; -import { SearchCountResponseDto } from '../models/search-count-response-dto'; -import { SearchSideBarDto } from '../models/search-side-bar-dto'; -import { SearchSideBarRequestDto } from '../models/search-side-bar-request-dto'; -import { AtAGlanceViewModel } from '../models/at-aglance-view-model'; -import { SearchRegistrationsWithAttachments } from '../models/search-registrations-with-attachments'; - -/** - * Search for registrations. - * Some methods use POST although they don't change anything in Regobs. The search criteria is too complex to put in the url, so we chose POST in order to have the search criteria in the body. - */ -@Injectable({ - providedIn: 'root', -}) -class SearchService extends __BaseService { - static readonly SearchSearchPath = '/Search'; - static readonly SearchPostSearchMyRegistrationsPath = '/Search/MyRegistrations'; - static readonly SearchCountMyRegistrationsPath = '/Search/MyRegistrationsCount'; - static readonly SearchCountPath = '/Search/Count'; - static readonly SearchGetRegIdsFromDeletedRegistrationsPath = '/Search/DeletedRegistrations'; - static readonly SearchGetSearchCriteriaPath = '/Search/SearchCriteria/{geoHazards}/{langKey}'; - static readonly SearchSearchCriteriaPath = '/Search/SearchCriteria'; - static readonly SearchAtAGlancePath = '/Search/AtAGlance'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Returns a list of complete registrations that matches your filter. Empty list if no registrations found. - * Use POST /Search/AtAGlance for faster search. - * - * Example critera for returning the 10 newest registrations: - * - * { "NumberOfRecords": 10 } - * - * @param criteria Use this to filter out registrations and change ordering of them. - * The attribute "ObserverGuid" is deprecated and will be removed in the future. - * @return OK - */ - SearchSearchResponse(criteria: SearchCriteriaRequestDto): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Returns a list of complete registrations that matches your filter. Empty list if no registrations found. - * Use POST /Search/AtAGlance for faster search. - * - * Example critera for returning the 10 newest registrations: - * - * { "NumberOfRecords": 10 } - * - * @param criteria Use this to filter out registrations and change ordering of them. - * The attribute "ObserverGuid" is deprecated and will be removed in the future. - * @return OK - */ - SearchSearch(criteria: SearchCriteriaRequestDto): __Observable> { - console.log('[DEBUG][SearchService] SearchSearch triggered', criteria); //TODO: Fjerne dette når vi ikke har bruk for logging lengre - return this.SearchSearchResponse(criteria).pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * Returns a list of complete registrations that were registered by the logged in user. - * Empty list if no registrations found. - * - * Example critera for returning the 10 newest registrations: - * - * { "NumberOfRecords": 10 } - * - * @param criteria Use this to filter out registrations and change ordering of them - * @return OK - */ - SearchPostSearchMyRegistrationsResponse(criteria: SearchCriteriaExclUserRequestDto): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/MyRegistrations`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Returns a list of complete registrations that were registered by the logged in user. - * Empty list if no registrations found. - * - * Example critera for returning the 10 newest registrations: - * - * { "NumberOfRecords": 10 } - * - * @param criteria Use this to filter out registrations and change ordering of them - * @return OK - */ - SearchPostSearchMyRegistrations(criteria: SearchCriteriaExclUserRequestDto): __Observable> { - console.log('[DEBUG][SearchService] SearchPostSearchMyRegistrations triggered', criteria); //TODO: Fjerne dette når vi ikke har bruk for logging lengre - return this.SearchPostSearchMyRegistrationsResponse(criteria).pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * Returns number of registrations that were registered by the logged in user - * @param criteria You may add additional filters - * @return OK - */ - SearchCountMyRegistrationsResponse(criteria: SearchCriteriaExclUserRequestDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/MyRegistrationsCount`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Returns number of registrations that were registered by the logged in user - * @param criteria You may add additional filters - * @return OK - */ - SearchCountMyRegistrations(criteria: SearchCriteriaExclUserRequestDto): __Observable { - return this.SearchCountMyRegistrationsResponse(criteria).pipe( - __map(_r => _r.body as SearchCountResponseDto) - ); - } - - /** - * Returns search result count - * @param criteria Search criteria - * @return OK - */ - SearchCountResponse(criteria: SearchCriteriaRequestDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/Count`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Returns search result count - * @param criteria Search criteria - * @return OK - */ - SearchCount(criteria: SearchCriteriaRequestDto): __Observable { - return this.SearchCountResponse(criteria).pipe( - __map(_r => _r.body as SearchCountResponseDto) - ); - } - - /** - * Search for images only - * @param criteria Search criteria - * @return OK - */ - SearchAttachmentsResponse(criteria: SearchCriteriaRequestDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/Attachments`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - - /** - * Search for images only - * @param criteria Search criteria - * @return OK - */ - SearchAttachments(criteria: SearchCriteriaRequestDto): __Observable { - return this.SearchAttachmentsResponse(criteria).pipe( - __map(_r => _r.body as SearchRegistrationsWithAttachments[]) - ); - } - - - /** - * Returns list of regIds from deleted registrations that can be filtered with criteria model. - * Used with offline syncing on mobile devices. - * @param criteria Search criteria - * @return OK - */ - SearchGetRegIdsFromDeletedRegistrationsResponse(criteria: SearchCriteriaRequestDto): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/DeletedRegistrations`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Returns list of regIds from deleted registrations that can be filtered with criteria model. - * Used with offline syncing on mobile devices. - * @param criteria Search criteria - * @return OK - */ - SearchGetRegIdsFromDeletedRegistrations(criteria: SearchCriteriaRequestDto): __Observable> { - return this.SearchGetRegIdsFromDeletedRegistrationsResponse(criteria).pipe( - __map(_r => _r.body as Array) - ); - } - - /** - * Returns relevant search criteria for the specified geo hazard types and language. - * This can help you to find the right criteria to use in the other search methods. - * @param params The `SearchService.SearchGetSearchCriteriaParams` containing the following parameters: - * - * - `langKey`: NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6, NN = 7 - * - * - `geoHazards`: A comma separated list of geo hazard ID's. Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. - * - * @return OK - */ - SearchGetSearchCriteriaResponse(params: SearchService.SearchGetSearchCriteriaParams): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - - - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Search/SearchCriteria/${encodeURIComponent(String(params.geoHazards))}/${encodeURIComponent(String(params.langKey))}`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Returns relevant search criteria for the specified geo hazard types and language. - * This can help you to find the right criteria to use in the other search methods. - * @param params The `SearchService.SearchGetSearchCriteriaParams` containing the following parameters: - * - * - `langKey`: NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6, NN = 7 - * - * - `geoHazards`: A comma separated list of geo hazard ID's. Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. - * - * @return OK - */ - SearchGetSearchCriteria(params: SearchService.SearchGetSearchCriteriaParams): __Observable { - return this.SearchGetSearchCriteriaResponse(params).pipe( - __map(_r => _r.body as SearchSideBarDto) - ); - } - - /** - * Please use GET /Search/SearchCriteria instead. - * Returns relevant search criteria for the specified geo hazard types and language. - * This can help you to find the right criteria to use in the other search methods. - * @param request A request for relevant search criteria - * @return OK - */ - SearchSearchCriteriaResponse(request: SearchSideBarRequestDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = request; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/SearchCriteria`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Please use GET /Search/SearchCriteria instead. - * Returns relevant search criteria for the specified geo hazard types and language. - * This can help you to find the right criteria to use in the other search methods. - * @param request A request for relevant search criteria - * @return OK - */ - SearchSearchCriteria(request: SearchSideBarRequestDto): __Observable { - return this.SearchSearchCriteriaResponse(request).pipe( - __map(_r => _r.body as SearchSideBarDto) - ); - } - - /** - * Simplified search for registrations. Returns less data per registration, so faster than /Search - * Returns empty list if no registrations found. - * Returns only first attachment and count on how many other attachments user can expect when opening - * a detailed info - * @param criteria Search criteria - * @return OK - */ - SearchAtAGlanceResponse(criteria: SearchCriteriaRequestDto): __Observable<__StrictHttpResponse>> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = criteria; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Search/AtAGlance`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse>; - }) - ); - } - /** - * Simplified search for registrations. Returns less data per registration, so faster than /Search - * Returns empty list if no registrations found. - * Returns only first attachment and count on how many other attachments user can expect when opening - * a detailed info - * @param criteria Search criteria - * @return OK - */ - SearchAtAGlance(criteria: SearchCriteriaRequestDto): __Observable> { - console.log('[DEBUG][SearchService] SearchAtAGlance triggered', criteria); //TODO: Fjerne dette når vi ikke har bruk for logging lengre - return this.SearchAtAGlanceResponse(criteria).pipe( - __map(_r => _r.body as Array) - ); - } -} - -module SearchService { - - /** - * Parameters for SearchGetSearchCriteria - */ - export interface SearchGetSearchCriteriaParams { - - /** - * NO = 1, EN = 2, DE = 3, SL = 4, SV = 5, IT = 6, NN = 7 - */ - langKey: number; - - /** - * A comma separated list of geo hazard ID's. Snow = 10, dirt = 20, water = 60, ice = 70. At least one geo hazard is required. - */ - geoHazards: string; - } -} - -export { SearchService } diff --git a/src/app/modules/common-regobs-api/services/trip.service.ts b/src/app/modules/common-regobs-api/services/trip.service.ts deleted file mode 100644 index 0992f47b5..000000000 --- a/src/app/modules/common-regobs-api/services/trip.service.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* tslint:disable */ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http'; -import { BaseService as __BaseService } from '../base-service'; -import { RegobsApiConfiguration as __Configuration } from '../regobs-api-configuration'; -import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response'; -import { Observable as __Observable } from 'rxjs'; -import { map as __map, filter as __filter } from 'rxjs/operators'; - -import { FinishTripDto } from '../models/finish-trip-dto'; -import { CreateTripDto } from '../models/create-trip-dto'; -@Injectable({ - providedIn: 'root', -}) -class TripService extends __BaseService { - static readonly TripGetPath = '/Trip/ObserverTrips'; - static readonly TripPutPath = '/Trip'; - static readonly TripPostPath = '/Trip'; - - constructor( - config: __Configuration, - http: HttpClient - ) { - super(config, http); - } - - /** - * Fetches GeoJSON representations of the pre-approved observation trips. - * Only available for users in Obskorps administrative group. - */ - TripGetResponse(): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - let req = new HttpRequest( - 'GET', - this.rootUrl + `/Trip/ObserverTrips`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * Fetches GeoJSON representations of the pre-approved observation trips. - * Only available for users in Obskorps administrative group. - */ - TripGet(): __Observable { - return this.TripGetResponse().pipe( - __map(_r => _r.body as null) - ); - } - - /** - * @param trip undefined - */ - TripPutResponse(trip: FinishTripDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = trip; - let req = new HttpRequest( - 'PUT', - this.rootUrl + `/Trip`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * @param trip undefined - */ - TripPut(trip: FinishTripDto): __Observable { - return this.TripPutResponse(trip).pipe( - __map(_r => _r.body as null) - ); - } - - /** - * @param trip undefined - */ - TripPostResponse(trip: CreateTripDto): __Observable<__StrictHttpResponse> { - let __params = this.newParams(); - let __headers = new HttpHeaders(); - let __body: any = null; - __body = trip; - let req = new HttpRequest( - 'POST', - this.rootUrl + `/Trip`, - __body, - { - headers: __headers, - params: __params, - responseType: 'json' - }); - - return this.http.request(req).pipe( - __filter(_r => _r instanceof HttpResponse), - __map((_r) => { - return _r as __StrictHttpResponse; - }) - ); - } - /** - * @param trip undefined - */ - TripPost(trip: CreateTripDto): __Observable { - return this.TripPostResponse(trip).pipe( - __map(_r => _r.body as null) - ); - } -} - -module TripService { -} - -export { TripService } diff --git a/src/app/modules/common-regobs-api/strict-http-response.ts b/src/app/modules/common-regobs-api/strict-http-response.ts deleted file mode 100644 index ebdeada77..000000000 --- a/src/app/modules/common-regobs-api/strict-http-response.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* tslint:disable */ -import { HttpResponse } from '@angular/common/http'; - -/** - * Constrains the http to not expand the response type with `| null` - */ -export type StrictHttpResponse = HttpResponse & { - readonly body: T; -} diff --git a/src/app/modules/common-regobs-api/test.ts b/src/app/modules/common-regobs-api/test.ts deleted file mode 100644 index 01f9d5f9d..000000000 --- a/src/app/modules/common-regobs-api/test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -// import 'core-js/es7/reflect'; -import 'zone.js'; -import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -declare const require: any; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); diff --git a/src/app/modules/common-regobs-api/variables.ts b/src/app/modules/common-regobs-api/variables.ts new file mode 100644 index 000000000..6fe58549f --- /dev/null +++ b/src/app/modules/common-regobs-api/variables.ts @@ -0,0 +1,9 @@ +import { InjectionToken } from '@angular/core'; + +export const BASE_PATH = new InjectionToken('basePath'); +export const COLLECTION_FORMATS = { + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/src/app/modules/login/pages/user-information/user-information.page.ts b/src/app/modules/login/pages/user-information/user-information.page.ts index f3d18e4f1..1ff882023 100644 --- a/src/app/modules/login/pages/user-information/user-information.page.ts +++ b/src/app/modules/login/pages/user-information/user-information.page.ts @@ -9,7 +9,7 @@ import { ExternalLinkService } from '../../../../core/services/external-link/ext import { LangKey } from 'src/app/modules/common-core/models'; import { UserGroupService } from '../../../../core/services/user-group/user-group.service'; import { StarRatingHelper } from '../../../../components/competence/star-helper'; -import { AccountService, MyPageData, ObserverGroupDto } from 'src/app/modules/common-regobs-api'; +import { AccountService, type MyPageData, type ObserverGroupDto } from 'src/app/modules/common-regobs-api'; import { IonBackButton, IonButton, @@ -197,7 +197,7 @@ export class UserInformation implements OnInit { const { data } = await modal.onWillDismiss(); if (data && data.nick) { try { - await firstValueFrom(this.accountService.AccountUpdateObserver({ Nick: data.nick })); + await firstValueFrom(this.accountService.accountUpdateObserver({ Nick: data.nick })); this.regobsAuthService.refreshMyPageData$.next(); } catch (error) { this.showErrorToast('MY_PROFILE.NICKNAME_UPDATE_ERROR'); diff --git a/src/app/modules/map/services/map-search/map-search.service.ts b/src/app/modules/map/services/map-search/map-search.service.ts index 4b2f0e972..53aa6913e 100644 --- a/src/app/modules/map/services/map-search/map-search.service.ts +++ b/src/app/modules/map/services/map-search/map-search.service.ts @@ -8,7 +8,7 @@ import { Observable, forkJoin, of, Subject, firstValueFrom } from 'rxjs'; import { ViewInfo } from './view-info.model'; import { UserSettingService } from '../../../../core/services/user-setting/user-setting.service'; import { LangKey, GeoHazard } from 'src/app/modules/common-core/models'; -import { GeoCodeService } from 'src/app/modules/common-regobs-api/services'; +import { GeoCodeService } from 'src/app/modules/common-regobs-api'; import { NanoSql } from '../../../../../nanosql'; import { MapSearchHistory } from './map-search-history.model'; import moment from 'moment'; @@ -146,7 +146,7 @@ export class MapSearchService { getViewInfo(latLng: L.LatLng, geoHazard = GeoHazard.Soil): Observable { return this.geoCodeService - .GeoCodeLocationInfo({ + .geoCodeLocationInfo({ latitude: latLng.lat, longitude: latLng.lng, geoHazardId: geoHazard, diff --git a/src/app/modules/registration/components/set-location-in-map/set-location-in-map.component.ts b/src/app/modules/registration/components/set-location-in-map/set-location-in-map.component.ts index 1bff660cc..1b68e19a9 100644 --- a/src/app/modules/registration/components/set-location-in-map/set-location-in-map.component.ts +++ b/src/app/modules/registration/components/set-location-in-map/set-location-in-map.component.ts @@ -33,7 +33,7 @@ import moment from 'moment'; import { firstValueFrom, Observable, of, Subject } from 'rxjs'; import { catchError, debounceTime, filter, map, switchMap, take, takeUntil, tap } from 'rxjs/operators'; import { GeoHazard } from 'src/app/modules/common-core/models'; -import { ObsLocationEditModel, ObsLocationsResponseDtoV2 } from 'src/app/modules/common-regobs-api/models'; +import { type ObsLocationEditModel, type ObsLocationsResponseDtoV2 } from 'src/app/modules/common-regobs-api'; import { IMapView } from 'src/app/modules/map/services/map/map-view.interface'; import { SelectOption } from 'src/app/modules/shared/components/input/select/select-option.model'; import { GeoPositionService } from '../../../../core/services/geo-position/geo-position.service'; @@ -58,10 +58,10 @@ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop'; import { DatetimePickerComponent } from '../../../../components/datetime-picker/datetime-picker.component'; export interface LocationTime { - location: ObsLocationEditModel; + location: ObsLocationEditModel | null; datetime?: string; - source?: number; - spatialAccuracy?: number; + source?: number | null; + spatialAccuracy?: number | null; } const defaultIcon = L.icon({ diff --git a/src/app/modules/registration/components/snow/snow-profile/strat-profile/strat-profile-layer-history-modal/strat-profile-layer-history-modal.page.ts b/src/app/modules/registration/components/snow/snow-profile/strat-profile/strat-profile-layer-history-modal/strat-profile-layer-history-modal.page.ts index 0107964cb..c807915d4 100644 --- a/src/app/modules/registration/components/snow/snow-profile/strat-profile/strat-profile-layer-history-modal/strat-profile-layer-history-modal.page.ts +++ b/src/app/modules/registration/components/snow/snow-profile/strat-profile/strat-profile-layer-history-modal/strat-profile-layer-history-modal.page.ts @@ -19,7 +19,7 @@ import { SearchCriteriaExclUserRequestDto, StratProfileLayerViewModel, } from 'src/app/modules/common-regobs-api/models'; -import { SearchService } from 'src/app/modules/common-regobs-api/services'; +import { SearchService } from 'src/app/modules/common-regobs-api'; import { Observable, of } from 'rxjs'; import moment from 'moment'; import { GeoHazard } from 'src/app/modules/common-core/models'; @@ -68,7 +68,7 @@ export class StratProfileLayerHistoryModalPage implements OnInit { ngOnInit() { if (this.draft()?.registration?.ObsLocation) { - this.$previousUsedLayers = this.searchService.SearchPostSearchMyRegistrations(this.criteria).pipe( + this.$previousUsedLayers = this.searchService.searchSearchMyRegistrations(this.criteria).pipe( map((result) => this.getLayersFromSearchResult(result)), tap(() => { this.isLoading = false; diff --git a/src/app/modules/registration/edit-registration-helper-functions.ts b/src/app/modules/registration/edit-registration-helper-functions.ts index af9c0c0c5..a1f597746 100644 --- a/src/app/modules/registration/edit-registration-helper-functions.ts +++ b/src/app/modules/registration/edit-registration-helper-functions.ts @@ -1,7 +1,4 @@ -import { WritableSignal } from '@angular/core'; -import { Observable } from 'rxjs'; -import { RegistrationViewModel, MyPageData } from 'src/app/modules/common-regobs-api/models'; -import { RegistrationService } from '../common-regobs-api'; +import { type RegistrationViewModel, type MyPageData } from 'src/app/modules/common-regobs-api'; export type EditMode = 'EDIT_AS_MODERATOR' | 'EDIT_OWN_REGISTRATION'; @@ -9,7 +6,7 @@ export function isSameObserver(reg: RegistrationViewModel, observer: MyPageData) if (!observer) { return false; } - return observer.ObserverId === reg.Observer.ObserverID; + return observer.ObserverId === reg.Observer?.ObserverID; } export function isInGroup(reg: RegistrationViewModel, observer: MyPageData): boolean { @@ -43,6 +40,9 @@ export function checkEditPriviliges(reg: RegistrationViewModel, observer: MyPage } function isRegistrationOlderThan2days(reg: RegistrationViewModel): boolean { + if (!reg?.DtRegTime) { + return false; + } const now = new Date(); const twoDaysAgo = new Date(now.getTime() - 2 * 24 * 60 * 60 * 1000); const registrationDate = new Date(reg?.DtRegTime); diff --git a/src/app/modules/registration/pages/obs-location/obs-location.page.ts b/src/app/modules/registration/pages/obs-location/obs-location.page.ts index f05d4c615..5cf8fd266 100644 --- a/src/app/modules/registration/pages/obs-location/obs-location.page.ts +++ b/src/app/modules/registration/pages/obs-location/obs-location.page.ts @@ -9,12 +9,6 @@ import { IonToolbar, NavController, } from '@ionic/angular/standalone'; -import { - ObsLocationEditModel, - ObsLocationsResponseDtoV2, - ObsLocationViewModel, - RegistrationEditModel, -} from 'src/app/modules/common-regobs-api/models'; import { ActivatedRoute } from '@angular/router'; import { GeoHazard } from 'src/app/modules/common-core/models'; import { firstValueFrom, Observable, Subscription } from 'rxjs'; @@ -27,7 +21,13 @@ import { import { UserSettingService } from '../../../../core/services/user-setting/user-setting.service'; import { DraftRepositoryService } from 'src/app/core/services/draft/draft-repository.service'; import { RegistrationDraft } from 'src/app/core/services/draft/draft-model'; -import { LocationService } from 'src/app/modules/common-regobs-api'; +import { + LocationService, + type ObsLocationEditModel, + type ObsLocationsResponseDtoV2, + type ObsLocationViewModel, + type RegistrationEditModel, +} from 'src/app/modules/common-regobs-api'; import { NgIf, AsyncPipe } from '@angular/common'; import { HeaderColorDirective } from '../../../shared/directives/header-color/header-color.directive'; import { TranslatePipe } from '@ngx-translate/core'; @@ -124,9 +124,7 @@ export class ObsLocationPage implements OnInit, OnDestroy { this.setLocationMarker(lat, lon); this.initialMinZoom = DEFAULT_MIN_ZOOM_FOR_KNOWN_LOCATION; } else if (locationId) { - const location = (await firstValueFrom( - this.locationService.LocationGet({ locationId: locationId }) - )) as ObsLocationViewModel; + const location = (await firstValueFrom(this.locationService.locationGet(locationId))) as ObsLocationViewModel; this.setLocationMarker(location.Latitude, location.Longitude); this.selectedLocation = { Name: location.LocationName || location.LocationDescription, diff --git a/src/app/modules/shared/components/images-grid/images-grid.ts/images-grid.component.ts b/src/app/modules/shared/components/images-grid/images-grid.ts/images-grid.component.ts index c0ace30d9..ba3f24768 100644 --- a/src/app/modules/shared/components/images-grid/images-grid.ts/images-grid.component.ts +++ b/src/app/modules/shared/components/images-grid/images-grid.ts/images-grid.component.ts @@ -1,6 +1,6 @@ import { Component, Input, inject } from '@angular/core'; import { LoggingService } from '../../../services/logging/logging.service'; -import { SearchRegistrationsWithAttachments } from 'src/app/modules/common-regobs-api/models/search-registrations-with-attachments'; +import { RegistrationsWithAttachments } from 'src/app/modules/common-regobs-api'; import { ModalController } from '@ionic/angular/standalone'; import { AttachmentViewModel } from 'src/app/modules/common-regobs-api'; import { FullscreenImageModalPage } from 'src/app/pages/modal-pages/fullscreen-image-modal/fullscreen-image-modal.page'; @@ -17,7 +17,7 @@ export class ImagesGridComponent { private logger = inject(LoggingService); private modalController = inject(ModalController); - @Input() attachments: SearchRegistrationsWithAttachments[]; + @Input() attachments: RegistrationsWithAttachments[]; trackById(_, obs: HasRegId) { return obs ? obs.RegId : undefined; diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 9e9e20472..1b302eeba 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -49,12 +49,7 @@ import { Immutable } from 'src/app/core/models/immutable'; import { SearchCriteria } from 'src/app/core/models/search-criteria'; import { SearchCriteriaService } from 'src/app/core/services/search-criteria/search-criteria.service'; import { SearchService } from 'src/app/modules/common-regobs-api'; -import { - AtAGlanceViewModel, - PositionDto, - SearchCriteriaRequestDto, - WithinExtentCriteriaDto, -} from 'src/app/modules/common-regobs-api/models'; +import { AtAGlanceViewModel, PositionDto, SearchCriteriaRequestDto, WithinExtentCriteriaDto } from 'src/app/modules/common-regobs-api'; import { MapCenterInfoComponent } from 'src/app/modules/map/components/map-center-info/map-center-info.component'; import { MapService } from 'src/app/modules/map/services/map/map.service'; import { LogLevel } from 'src/app/modules/shared/services/logging/log-level.model'; @@ -249,7 +244,7 @@ export class HomePage extends RouterPage implements OnInit, AfterViewChecked, On tap(() => this.isFetchingObservations.next(true)), switchMap((criteria: SearchCriteriaRequestDto) => - this.searchService.SearchAtAGlance(criteria).pipe( + this.searchService.searchAtAGlance(criteria).pipe( timeout(120000), // Successfull search handling diff --git a/src/app/pages/observation-list/image-list/image-list.component.ts b/src/app/pages/observation-list/image-list/image-list.component.ts index 9073e6edc..f70844d03 100644 --- a/src/app/pages/observation-list/image-list/image-list.component.ts +++ b/src/app/pages/observation-list/image-list/image-list.component.ts @@ -12,7 +12,7 @@ import { import { tap, combineLatest, map, firstValueFrom } from 'rxjs'; import { SearchCriteriaService } from 'src/app/core/services/search-criteria/search-criteria.service'; import { SearchRegistrationService } from 'src/app/core/services/search-registration/search-registration.service'; -import { SearchRegistrationsWithAttachments } from 'src/app/modules/common-regobs-api/models/search-registrations-with-attachments'; +import { RegistrationsWithAttachments } from 'src/app/modules/common-regobs-api'; import { ErrorStateComponent } from '../error-state/error-state.component'; import { EmptyStateComponent } from '../empty-state/empty-state.component'; import { ListControlsComponent } from '../list-controls/list-controls.component'; @@ -84,7 +84,7 @@ export class ImageListComponent { this.checkAndLoadMoreImages(); }) ), - { initialValue: [] as SearchRegistrationsWithAttachments[] } + { initialValue: [] as RegistrationsWithAttachments[] } ); disableInfiniteScroll = toSignal( @@ -122,7 +122,7 @@ export class ImageListComponent { await loader.present(); const attachmentIndex = attachments.findIndex((attachment) => attachment.Url === attachmentUrl); - const registration = await firstValueFrom(this.searchService.SearchSearch({ RegId: regId })); + const registration = await firstValueFrom(this.searchService.searchSearch({ RegId: regId })); const modal = await this.modalController.create({ component: ObservationImageCarouselComponent, cssClass: 'fullscreen-modal', diff --git a/src/app/pages/view-observation/view-observation.page.ts b/src/app/pages/view-observation/view-observation.page.ts index 3c8b512a5..3dbb5cce3 100644 --- a/src/app/pages/view-observation/view-observation.page.ts +++ b/src/app/pages/view-observation/view-observation.page.ts @@ -29,7 +29,11 @@ import { PopupInfoService } from '../../core/services/popup-info/popup-info.serv import { NgDestoryBase } from '../../core/helpers/observable-helper'; import { takeUntil, map, catchError } from 'rxjs/operators'; import { Observable, Subject, merge } from 'rxjs'; -import { AttachmentViewModel, RegistrationService, RegistrationViewModel } from 'src/app/modules/common-regobs-api'; +import { + type AttachmentViewModel, + RegistrationService, + type RegistrationViewModel, +} from 'src/app/modules/common-regobs-api'; import { RegobsAuthService } from 'src/app/modules/auth/services/regobs-auth.service'; import { HeaderColorDirective } from '../../modules/shared/directives/header-color/header-color.directive'; import { AsyncPipe, DatePipe, DecimalPipe } from '@angular/common'; @@ -144,7 +148,7 @@ export class ViewObservationPage extends NgDestoryBase implements OnInit { registration = rxResource({ params: () => ({ regId: this.regId(), langKey: this.langKey() }), stream: ({ params }) => - this.registrationService.RegistrationGet({ regId: params.regId, langKey: params.langKey }).pipe( + this.registrationService.registrationGet({ regId: params.regId, langKey: params.langKey }).pipe( catchError((err) => { this.logger.log('Feil ved henting av observasjon', err, LogLevel.Warning, DEBUG_TAG); if (err.status != undefined) { diff --git a/src/main.ts b/src/main.ts index a3c930389..709b6109d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,7 +16,7 @@ import { provideTranslateService } from '@ngx-translate/core'; import { provideMarkdown } from 'ngx-markdown'; import { AngularSvgIconModule } from 'angular-svg-icon'; import { LeafletModule } from '@bluehalo/ngx-leaflet'; -import { RegobsApiModuleWithConfig } from './app/modules/common-regobs-api'; +import { provideApi } from './app/modules/common-regobs-api'; import { AppComponent } from './app/app.component'; import CordovaSQLiteDriver from 'localforage-cordovasqlitedriver'; import { provideRouter, RouteReuseStrategy, withComponentInputBinding } from '@angular/router'; @@ -86,10 +86,10 @@ function startApp() { storeName: settings.db.nanoSql.dbName, }), AngularSvgIconModule.forRoot(), - LeafletModule, - + LeafletModule // This module is auto generated using ng-swagger-gen - RegobsApiModuleWithConfig.forRoot() + //RegobsApiModuleWithConfig.forRoot() + //ApiModule.forRoot() ), provideMarkdown(), @@ -99,6 +99,7 @@ function startApp() { provideRouter(routes, withComponentInputBinding()), provideHttpClient(withInterceptorsFromDi()), + provideApi('https://test-api.regobs.no/v6'), ...APP_PROVIDERS, provideAnimations(), ],