Mograte from openapi-typescript-codegen to @hey-api/openapi-ts
Back to options using openapi (default of openapi-ts)
This commit is contained in:
parent
263defc7ba
commit
bba056105a
94 changed files with 3983 additions and 2096 deletions
146
package-lock.json
generated
146
package-lock.json
generated
|
@ -38,6 +38,7 @@
|
||||||
"@angular/cli": "^17.3.0",
|
"@angular/cli": "^17.3.0",
|
||||||
"@angular/compiler-cli": "^17.3.0",
|
"@angular/compiler-cli": "^17.3.0",
|
||||||
"@angular/language-service": "^17.3.0",
|
"@angular/language-service": "^17.3.0",
|
||||||
|
"@hey-api/openapi-ts": "^0.34.0",
|
||||||
"@types/geojson": "^7946.0.14",
|
"@types/geojson": "^7946.0.14",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "^2.0.2",
|
"@types/jasminewd2": "^2.0.2",
|
||||||
|
@ -52,7 +53,6 @@
|
||||||
"karma-cli": "^2.0.0",
|
"karma-cli": "^2.0.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"openapi-typescript-codegen": "^0.27.0",
|
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"source-map-explorer": "^2.5.3",
|
"source-map-explorer": "^2.5.3",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
@ -735,16 +735,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@apidevtools/json-schema-ref-parser": {
|
"node_modules/@apidevtools/json-schema-ref-parser": {
|
||||||
"version": "10.1.0",
|
"version": "11.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.4.tgz",
|
||||||
"integrity": "sha512-3e+viyMuXdrcK8v5pvP+SDoAQ77FH6OyRmuK48SZKmdHJRFm87RsSs8qm6kP39a/pOPURByJw+OXzQIqcfmKtA==",
|
"integrity": "sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jsdevtools/ono": "^7.1.3",
|
"@jsdevtools/ono": "^7.1.3",
|
||||||
"@types/json-schema": "^7.0.11",
|
"@types/json-schema": "^7.0.15",
|
||||||
"@types/lodash.clonedeep": "^4.5.7",
|
"js-yaml": "^4.1.0"
|
||||||
"js-yaml": "^4.1.0",
|
|
||||||
"lodash.clonedeep": "^4.5.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 16"
|
"node": ">= 16"
|
||||||
|
@ -2913,6 +2911,45 @@
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@hey-api/openapi-ts": {
|
||||||
|
"version": "0.34.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@hey-api/openapi-ts/-/openapi-ts-0.34.0.tgz",
|
||||||
|
"integrity": "sha512-Q/fgZ9moh7HRKlWbkVTjNez2QSgKbRgpwbAT8DXWl8XfUVRoEc3pAhRLJ4aZOOP3RYGQHIIbiU9lRrsLTf0NIg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@apidevtools/json-schema-ref-parser": "11.5.4",
|
||||||
|
"camelcase": "8.0.0",
|
||||||
|
"commander": "12.0.0",
|
||||||
|
"handlebars": "4.7.8"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"openapi-ts": "bin/index.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.0.0 || >=20.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@hey-api/openapi-ts/node_modules/camelcase": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@hey-api/openapi-ts/node_modules/commander": {
|
||||||
|
"version": "12.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz",
|
||||||
|
"integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@isaacs/cliui": {
|
"node_modules/@isaacs/cliui": {
|
||||||
"version": "8.0.2",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||||
|
@ -4814,21 +4851,6 @@
|
||||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/lodash": {
|
|
||||||
"version": "4.14.202",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.202.tgz",
|
|
||||||
"integrity": "sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/lodash.clonedeep": {
|
|
||||||
"version": "4.5.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz",
|
|
||||||
"integrity": "sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@types/lodash": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@types/mapbox__point-geometry": {
|
"node_modules/@types/mapbox__point-geometry": {
|
||||||
"version": "0.1.4",
|
"version": "0.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz",
|
||||||
|
@ -8170,20 +8192,6 @@
|
||||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fs-extra": {
|
|
||||||
"version": "11.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
|
||||||
"integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"graceful-fs": "^4.2.0",
|
|
||||||
"jsonfile": "^6.0.1",
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fs-minipass": {
|
"node_modules/fs-minipass": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz",
|
||||||
|
@ -9816,18 +9824,6 @@
|
||||||
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
"integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/jsonfile": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"universalify": "^2.0.0"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"graceful-fs": "^4.1.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/jsonparse": {
|
"node_modules/jsonparse": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
||||||
|
@ -10258,12 +10254,6 @@
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/lodash.clonedeep": {
|
|
||||||
"version": "4.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
|
||||||
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/lodash.debounce": {
|
"node_modules/lodash.debounce": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
|
||||||
|
@ -11373,43 +11363,6 @@
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/openapi-typescript-codegen": {
|
|
||||||
"version": "0.27.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/openapi-typescript-codegen/-/openapi-typescript-codegen-0.27.0.tgz",
|
|
||||||
"integrity": "sha512-QyQEod/vuel3zfnTRC3GgmYsqLPSBzB2OL4ojMYjO9hJmfYW02T+7tbQWEnuqWdhh2KSOBf3L8h59vLStr6vwA==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@apidevtools/json-schema-ref-parser": "^10.1.0",
|
|
||||||
"camelcase": "^6.3.0",
|
|
||||||
"commander": "^11.1.0",
|
|
||||||
"fs-extra": "^11.2.0",
|
|
||||||
"handlebars": "^4.7.8"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"openapi": "bin/index.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/openapi-typescript-codegen/node_modules/camelcase": {
|
|
||||||
"version": "6.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
|
|
||||||
"integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/openapi-typescript-codegen/node_modules/commander": {
|
|
||||||
"version": "11.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz",
|
|
||||||
"integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ora": {
|
"node_modules/ora": {
|
||||||
"version": "5.4.1",
|
"version": "5.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
|
||||||
|
@ -14992,15 +14945,6 @@
|
||||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/universalify": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
|
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 10.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/unpipe": {
|
"node_modules/unpipe": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
"generate-client": "openapi --input http://127.0.0.1:5000/openapi.json --output ./src/app/openapi --client angular --useUnionTypes",
|
"openapi-ts": "openapi-ts -i http://127.0.0.1:5000/openapi.json -o src/app/openapi --client angular",
|
||||||
"source-map-explorer": "source-map-explorer dist/*.js"
|
"source-map-explorer": "source-map-explorer dist/*.js"
|
||||||
},
|
},
|
||||||
"licenses": [
|
"licenses": [
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
"@angular/cli": "^17.3.0",
|
"@angular/cli": "^17.3.0",
|
||||||
"@angular/compiler-cli": "^17.3.0",
|
"@angular/compiler-cli": "^17.3.0",
|
||||||
"@angular/language-service": "^17.3.0",
|
"@angular/language-service": "^17.3.0",
|
||||||
|
"@hey-api/openapi-ts": "^0.34.0",
|
||||||
"@types/geojson": "^7946.0.14",
|
"@types/geojson": "^7946.0.14",
|
||||||
"@types/jasmine": "~3.6.0",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "^2.0.2",
|
"@types/jasminewd2": "^2.0.2",
|
||||||
|
@ -71,7 +72,6 @@
|
||||||
"karma-cli": "^2.0.0",
|
"karma-cli": "^2.0.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "~4.0.0",
|
||||||
"openapi-typescript-codegen": "^0.27.0",
|
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"source-map-explorer": "^2.5.3",
|
"source-map-explorer": "^2.5.3",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
|
|
|
@ -170,11 +170,13 @@ export class ActionsService {
|
||||||
formFields?: FormFieldInput[]
|
formFields?: FormFieldInput[]
|
||||||
): Observable<ActionsResults> {
|
): Observable<ActionsResults> {
|
||||||
return this.apiService.executeTagActionApiExecTagActionsPost({
|
return this.apiService.executeTagActionApiExecTagActionsPost({
|
||||||
|
"requestBody": {
|
||||||
"stores": stores,
|
"stores": stores,
|
||||||
"ids": ids,
|
"ids": ids,
|
||||||
"actionNames": actionNames,
|
"actionNames": actionNames,
|
||||||
"params": params,
|
"params": params,
|
||||||
"formFields": formFields
|
"formFields": formFields
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,10 @@ export class AuthenticationService {
|
||||||
// formData.set('username', userName)
|
// formData.set('username', userName)
|
||||||
// formData.set('password', password)
|
// formData.set('password', password)
|
||||||
return this.api.loginForAccessTokenApiTokenPost({
|
return this.api.loginForAccessTokenApiTokenPost({
|
||||||
|
"formData": {
|
||||||
username: username,
|
username: username,
|
||||||
password: password
|
password: password
|
||||||
|
}
|
||||||
}).pipe(map(
|
}).pipe(map(
|
||||||
token => {
|
token => {
|
||||||
localStorage.setItem('token', token.access_token)
|
localStorage.setItem('token', token.access_token)
|
||||||
|
|
|
@ -36,7 +36,7 @@ export class DataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getList(store: string): Observable<MeasuresItem[]> {
|
getList(store: string): Observable<MeasuresItem[]> {
|
||||||
return this.api.getModelListApiDataProviderStoreGet(store)
|
return this.api.getModelListApiDataProviderStoreGet({store: store})
|
||||||
}
|
}
|
||||||
|
|
||||||
getValues(
|
getValues(
|
||||||
|
@ -47,7 +47,7 @@ export class DataService {
|
||||||
format: string = 'json',
|
format: string = 'json',
|
||||||
rangeFrom?: string,
|
rangeFrom?: string,
|
||||||
rangeTo?: string
|
rangeTo?: string
|
||||||
): Observable<HttpResponse<Object>> {
|
): Observable<unknown> {
|
||||||
let p = {}
|
let p = {}
|
||||||
let s = {}
|
let s = {}
|
||||||
p[store] = id
|
p[store] = id
|
||||||
|
@ -62,7 +62,12 @@ export class DataService {
|
||||||
// .set('format', format)
|
// .set('format', format)
|
||||||
// FIXME: add the name of the value to fetch
|
// FIXME: add the name of the value to fetch
|
||||||
return this.api.getModelValuesApiStoreNameValuesValueGet(
|
return this.api.getModelValuesApiStoreNameValuesValueGet(
|
||||||
store, value, JSON.stringify(p), sampling
|
{
|
||||||
|
storeName: store,
|
||||||
|
value: value,
|
||||||
|
where: JSON.stringify(p),
|
||||||
|
resample: sampling
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ export class GeoJsonService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getStyle(store: string): Observable<MaplibreStyle> {
|
getStyle(store: string): Observable<MaplibreStyle> {
|
||||||
return this.mapService.getLayerStyleApiMapLayerStyleStoreGet(store)
|
return this.mapService.getLayerStyleApiMapLayerStyleStoreGet({store: store})
|
||||||
}
|
}
|
||||||
|
|
||||||
getAll(url: string, store: string, params?: object): Observable<MapboxDataAndStyle> {
|
getAll(url: string, store: string, params?: object): Observable<MapboxDataAndStyle> {
|
||||||
|
|
|
@ -151,7 +151,7 @@ export class AdminBasketDataService {
|
||||||
|
|
||||||
getBasket(name: string): Observable<AdminBasket> {
|
getBasket(name: string): Observable<AdminBasket> {
|
||||||
// Get all info and content of a basket
|
// Get all info and content of a basket
|
||||||
return this.adminService.getBasketApiAdminBasketNameGet(name)
|
return this.adminService.getBasketApiAdminBasketNameGet({name: name})
|
||||||
console.warn('Migrate Graphql')
|
console.warn('Migrate Graphql')
|
||||||
return observableOf()
|
return observableOf()
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
|
|
|
@ -21,11 +21,11 @@ import { ModelDataService } from './_services/apollo.service'
|
||||||
import { ActionsService } from './_services/actions.service'
|
import { ActionsService } from './_services/actions.service'
|
||||||
import { ConfigService } from './_services/config.service'
|
import { ConfigService } from './_services/config.service'
|
||||||
|
|
||||||
import { ApiService } from './openapi/services/ApiService'
|
import { ApiService } from './openapi/services'
|
||||||
import { AdminService } from './openapi/services/AdminService'
|
import { AdminService } from './openapi/services'
|
||||||
import { DashboardService } from './openapi/services/DashboardService'
|
import { DashboardService } from './openapi/services'
|
||||||
import { GeoapiService } from './openapi/services/GeoapiService'
|
import { GeoapiService } from './openapi/services'
|
||||||
import { MapService } from './openapi/services/MapService'
|
import { MapService } from './openapi/services'
|
||||||
import { httpInterceptorProviders } from './_helpers/http.interceptor'
|
import { httpInterceptorProviders } from './_helpers/http.interceptor'
|
||||||
|
|
||||||
import { HtmlSnackbarComponent } from './custom-snackbar/custom-snackbar.component'
|
import { HtmlSnackbarComponent } from './custom-snackbar/custom-snackbar.component'
|
||||||
|
|
|
@ -12,9 +12,9 @@ export class DashboardPageResolver {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Dashboard> {
|
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Dashboard> {
|
||||||
return this.dashboardService.getDashboardPageApiDashboardPageGroupNameGet(
|
return this.dashboardService.getDashboardPageApiDashboardPageGroupNameGet({
|
||||||
route.paramMap.get('group'),
|
group: route.paramMap.get('group'),
|
||||||
route.paramMap.get('name')
|
name: route.paramMap.get('name')
|
||||||
)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -466,7 +466,7 @@ export class InfoDataService {
|
||||||
public taggedLayers$ = this.taggedLayers.asObservable()
|
public taggedLayers$ = this.taggedLayers.asObservable()
|
||||||
|
|
||||||
getModelInfo(store: string): Observable<ModelInfo> {
|
getModelInfo(store: string): Observable<ModelInfo> {
|
||||||
return this.api.getModelInfoApiModelInfoStoreGet(store)
|
return this.api.getModelInfoApiModelInfoStoreGet({store: store})
|
||||||
console.warn('Migrate Graphql')
|
console.warn('Migrate Graphql')
|
||||||
return observableOf()
|
return observableOf()
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
|
@ -555,7 +555,7 @@ export class InfoDataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlotParams(store: string, id: string, value: string): Observable<PlotParams> {
|
getPlotParams(store: string, id: string, value: string): Observable<PlotParams> {
|
||||||
return this.api.getPlotParamsApiPlotParamsStoreGet(store, id, value)
|
return this.api.getPlotParamsApiPlotParamsStoreGet({store: store, id: id, value: value})
|
||||||
console.warn('Migrate Graphql')
|
console.warn('Migrate Graphql')
|
||||||
return observableOf()
|
return observableOf()
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
|
@ -588,7 +588,7 @@ export class InfoDataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getFeatureInfo(store: string, id: string): Observable<FeatureInfo> {
|
getFeatureInfo(store: string, id: string): Observable<FeatureInfo> {
|
||||||
return this.api.getFeatureInfoApiFeatureInfoStoreIdGet(store, id)
|
return this.api.getFeatureInfoApiFeatureInfoStoreIdGet({store: store, id: id})
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
// query: getFeatureInfoQuery,
|
// query: getFeatureInfoQuery,
|
||||||
// variables: {
|
// variables: {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { PlotlyComponent, PlotlyService } from 'angular-plotly.js'
|
||||||
|
|
||||||
import { DataService } from '../../_services/data.service'
|
import { DataService } from '../../_services/data.service'
|
||||||
import { FullInfo, InfoDataService, PlotDataParams } from '../info-data.service'
|
import { FullInfo, InfoDataService, PlotDataParams } from '../info-data.service'
|
||||||
import { PlotParams } from '../../openapi'
|
import { DownloadService, PlotParams } from '../../openapi'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'gisaf-info-plot',
|
selector: 'gisaf-info-plot',
|
||||||
|
@ -107,6 +107,7 @@ export class InfoPlotComponent implements OnInit, AfterViewInit {
|
||||||
public plotly: PlotlyService,
|
public plotly: PlotlyService,
|
||||||
public snackBar: MatSnackBar,
|
public snackBar: MatSnackBar,
|
||||||
private cdr: ChangeDetectorRef,
|
private cdr: ChangeDetectorRef,
|
||||||
|
public downloadService: DownloadService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -310,7 +311,20 @@ export class InfoPlotComponent implements OnInit, AfterViewInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
download() {
|
download() {
|
||||||
window.open('/download/csv/' + this.source.modelInfo.store +
|
// XXX: Ideally we should use openapi calls, but it's more simple to use window.open
|
||||||
|
// this.downloadService.downloadCsvApiDownloadCsvStoreModelIdValueResampleGet({
|
||||||
|
// store: this.source.modelInfo.store,
|
||||||
|
// modelId: +this.source.featureInfo.id,
|
||||||
|
// value: this.value,
|
||||||
|
// resample: this.resampling
|
||||||
|
// }).subscribe(
|
||||||
|
// data => {
|
||||||
|
// const blob = new Blob(data, { type: 'text/csv'})
|
||||||
|
// const blobUrl = URL.createObjectURL(blob)
|
||||||
|
// window.open(blobUrl)
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
window.open('/api/download/csv/' + this.source.modelInfo.store +
|
||||||
'/' + this.source.featureInfo.id +
|
'/' + this.source.featureInfo.id +
|
||||||
'/' + this.value +
|
'/' + this.value +
|
||||||
'/' + this.resampling)
|
'/' + this.resampling)
|
||||||
|
|
|
@ -89,7 +89,7 @@ export class MapDataService {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
getBaseStyle(styleName: string): Observable<BaseStyle> {
|
getBaseStyle(styleName: string): Observable<BaseStyle> {
|
||||||
return this.mapService.getBaseStyleApiMapBaseStyleNameGet(styleName).pipe(map(
|
return this.mapService.getBaseStyleApiMapBaseStyleNameGet({name: styleName}).pipe(map(
|
||||||
data => new BaseStyle(data.name, <any>data.style)
|
data => new BaseStyle(data.name, <any>data.style)
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||||
import type { ApiResult } from './ApiResult';
|
import type { ApiResult } from './ApiResult';
|
||||||
|
|
||||||
|
@ -9,7 +5,7 @@ export class ApiError extends Error {
|
||||||
public readonly url: string;
|
public readonly url: string;
|
||||||
public readonly status: number;
|
public readonly status: number;
|
||||||
public readonly statusText: string;
|
public readonly statusText: string;
|
||||||
public readonly body: any;
|
public readonly body: unknown;
|
||||||
public readonly request: ApiRequestOptions;
|
public readonly request: ApiRequestOptions;
|
||||||
|
|
||||||
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
|
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ApiRequestOptions = {
|
export type ApiRequestOptions = {
|
||||||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
||||||
readonly url: string;
|
readonly url: string;
|
||||||
readonly path?: Record<string, any>;
|
readonly path?: Record<string, unknown>;
|
||||||
readonly cookies?: Record<string, any>;
|
readonly cookies?: Record<string, unknown>;
|
||||||
readonly headers?: Record<string, any>;
|
readonly headers?: Record<string, unknown>;
|
||||||
readonly query?: Record<string, any>;
|
readonly query?: Record<string, unknown>;
|
||||||
readonly formData?: Record<string, any>;
|
readonly formData?: Record<string, unknown>;
|
||||||
readonly body?: any;
|
readonly body?: any;
|
||||||
readonly mediaType?: string;
|
readonly mediaType?: string;
|
||||||
readonly responseHeader?: string;
|
readonly responseHeader?: string;
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
export type ApiResult<TData = any> = {
|
||||||
/* istanbul ignore file */
|
readonly body: TData;
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ApiResult = {
|
|
||||||
readonly url: string;
|
|
||||||
readonly ok: boolean;
|
readonly ok: boolean;
|
||||||
readonly status: number;
|
readonly status: number;
|
||||||
readonly statusText: string;
|
readonly statusText: string;
|
||||||
readonly body: any;
|
readonly url: string;
|
||||||
};
|
};
|
|
@ -1,131 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export class CancelError extends Error {
|
|
||||||
|
|
||||||
constructor(message: string) {
|
|
||||||
super(message);
|
|
||||||
this.name = 'CancelError';
|
|
||||||
}
|
|
||||||
|
|
||||||
public get isCancelled(): boolean {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface OnCancel {
|
|
||||||
readonly isResolved: boolean;
|
|
||||||
readonly isRejected: boolean;
|
|
||||||
readonly isCancelled: boolean;
|
|
||||||
|
|
||||||
(cancelHandler: () => void): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CancelablePromise<T> implements Promise<T> {
|
|
||||||
#isResolved: boolean;
|
|
||||||
#isRejected: boolean;
|
|
||||||
#isCancelled: boolean;
|
|
||||||
readonly #cancelHandlers: (() => void)[];
|
|
||||||
readonly #promise: Promise<T>;
|
|
||||||
#resolve?: (value: T | PromiseLike<T>) => void;
|
|
||||||
#reject?: (reason?: any) => void;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
executor: (
|
|
||||||
resolve: (value: T | PromiseLike<T>) => void,
|
|
||||||
reject: (reason?: any) => void,
|
|
||||||
onCancel: OnCancel
|
|
||||||
) => void
|
|
||||||
) {
|
|
||||||
this.#isResolved = false;
|
|
||||||
this.#isRejected = false;
|
|
||||||
this.#isCancelled = false;
|
|
||||||
this.#cancelHandlers = [];
|
|
||||||
this.#promise = new Promise<T>((resolve, reject) => {
|
|
||||||
this.#resolve = resolve;
|
|
||||||
this.#reject = reject;
|
|
||||||
|
|
||||||
const onResolve = (value: T | PromiseLike<T>): void => {
|
|
||||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#isResolved = true;
|
|
||||||
if (this.#resolve) this.#resolve(value);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onReject = (reason?: any): void => {
|
|
||||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#isRejected = true;
|
|
||||||
if (this.#reject) this.#reject(reason);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onCancel = (cancelHandler: () => void): void => {
|
|
||||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#cancelHandlers.push(cancelHandler);
|
|
||||||
};
|
|
||||||
|
|
||||||
Object.defineProperty(onCancel, 'isResolved', {
|
|
||||||
get: (): boolean => this.#isResolved,
|
|
||||||
});
|
|
||||||
|
|
||||||
Object.defineProperty(onCancel, 'isRejected', {
|
|
||||||
get: (): boolean => this.#isRejected,
|
|
||||||
});
|
|
||||||
|
|
||||||
Object.defineProperty(onCancel, 'isCancelled', {
|
|
||||||
get: (): boolean => this.#isCancelled,
|
|
||||||
});
|
|
||||||
|
|
||||||
return executor(onResolve, onReject, onCancel as OnCancel);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
get [Symbol.toStringTag]() {
|
|
||||||
return "Cancellable Promise";
|
|
||||||
}
|
|
||||||
|
|
||||||
public then<TResult1 = T, TResult2 = never>(
|
|
||||||
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
|
|
||||||
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
|
|
||||||
): Promise<TResult1 | TResult2> {
|
|
||||||
return this.#promise.then(onFulfilled, onRejected);
|
|
||||||
}
|
|
||||||
|
|
||||||
public catch<TResult = never>(
|
|
||||||
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
|
|
||||||
): Promise<T | TResult> {
|
|
||||||
return this.#promise.catch(onRejected);
|
|
||||||
}
|
|
||||||
|
|
||||||
public finally(onFinally?: (() => void) | null): Promise<T> {
|
|
||||||
return this.#promise.finally(onFinally);
|
|
||||||
}
|
|
||||||
|
|
||||||
public cancel(): void {
|
|
||||||
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.#isCancelled = true;
|
|
||||||
if (this.#cancelHandlers.length) {
|
|
||||||
try {
|
|
||||||
for (const cancelHandler of this.#cancelHandlers) {
|
|
||||||
cancelHandler();
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.warn('Cancellation threw an error', error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.#cancelHandlers.length = 0;
|
|
||||||
if (this.#reject) this.#reject(new CancelError('Request aborted'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public get isCancelled(): boolean {
|
|
||||||
return this.#isCancelled;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,32 +1,57 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
import type { HttpResponse } from '@angular/common/http';import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||||
/* istanbul ignore file */
|
import type { TResult } from './types';
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
||||||
|
|
||||||
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
||||||
type Headers = Record<string, string>;
|
type Headers = Record<string, string>;
|
||||||
|
type Middleware<T> = (value: T) => T | Promise<T>;
|
||||||
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
||||||
|
|
||||||
|
export class Interceptors<T> {
|
||||||
|
_fns: Middleware<T>[];
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this._fns = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
eject(fn: Middleware<T>) {
|
||||||
|
const index = this._fns.indexOf(fn);
|
||||||
|
if (index !== -1) {
|
||||||
|
this._fns = [
|
||||||
|
...this._fns.slice(0, index),
|
||||||
|
...this._fns.slice(index + 1),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use(fn: Middleware<T>) {
|
||||||
|
this._fns = [...this._fns, fn];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export type OpenAPIConfig = {
|
export type OpenAPIConfig = {
|
||||||
BASE: string;
|
BASE: string;
|
||||||
VERSION: string;
|
|
||||||
WITH_CREDENTIALS: boolean;
|
|
||||||
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
||||||
|
ENCODE_PATH?: ((path: string) => string) | undefined;
|
||||||
|
HEADERS?: Headers | Resolver<Headers> | undefined;
|
||||||
|
PASSWORD?: string | Resolver<string> | undefined;
|
||||||
|
RESULT?: TResult;
|
||||||
TOKEN?: string | Resolver<string> | undefined;
|
TOKEN?: string | Resolver<string> | undefined;
|
||||||
USERNAME?: string | Resolver<string> | undefined;
|
USERNAME?: string | Resolver<string> | undefined;
|
||||||
PASSWORD?: string | Resolver<string> | undefined;
|
VERSION: string;
|
||||||
HEADERS?: Headers | Resolver<Headers> | undefined;
|
WITH_CREDENTIALS: boolean;
|
||||||
ENCODE_PATH?: ((path: string) => string) | undefined;
|
interceptors: {response: Interceptors<HttpResponse<any>>;};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OpenAPI: OpenAPIConfig = {
|
export const OpenAPI: OpenAPIConfig = {
|
||||||
BASE: '',
|
BASE: '',
|
||||||
VERSION: '2023.4.dev56+g775030d.d20240325',
|
|
||||||
WITH_CREDENTIALS: false,
|
|
||||||
CREDENTIALS: 'include',
|
CREDENTIALS: 'include',
|
||||||
|
ENCODE_PATH: undefined,
|
||||||
|
HEADERS: undefined,
|
||||||
|
PASSWORD: undefined,
|
||||||
|
RESULT: 'body',
|
||||||
TOKEN: undefined,
|
TOKEN: undefined,
|
||||||
USERNAME: undefined,
|
USERNAME: undefined,
|
||||||
PASSWORD: undefined,
|
VERSION: '2023.4.dev56+g775030d.d20240325',
|
||||||
HEADERS: undefined,
|
WITH_CREDENTIALS: false,
|
||||||
ENCODE_PATH: undefined,
|
interceptors: {response: new Interceptors(),
|
||||||
|
},
|
||||||
};
|
};
|
|
@ -1,7 +1,3 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
import type { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
import type { HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
||||||
import { forkJoin, of, throwError } from 'rxjs';
|
import { forkJoin, of, throwError } from 'rxjs';
|
||||||
|
@ -13,32 +9,19 @@ import type { ApiRequestOptions } from './ApiRequestOptions';
|
||||||
import type { ApiResult } from './ApiResult';
|
import type { ApiResult } from './ApiResult';
|
||||||
import type { OpenAPIConfig } from './OpenAPI';
|
import type { OpenAPIConfig } from './OpenAPI';
|
||||||
|
|
||||||
export const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
export const isString = (value: unknown): value is string => {
|
||||||
return value !== undefined && value !== null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isString = (value: any): value is string => {
|
|
||||||
return typeof value === 'string';
|
return typeof value === 'string';
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isStringWithValue = (value: any): value is string => {
|
export const isStringWithValue = (value: unknown): value is string => {
|
||||||
return isString(value) && value !== '';
|
return isString(value) && value !== '';
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isBlob = (value: any): value is Blob => {
|
export const isBlob = (value: any): value is Blob => {
|
||||||
return (
|
return value instanceof Blob;
|
||||||
typeof value === 'object' &&
|
|
||||||
typeof value.type === 'string' &&
|
|
||||||
typeof value.stream === 'function' &&
|
|
||||||
typeof value.arrayBuffer === 'function' &&
|
|
||||||
typeof value.constructor === 'function' &&
|
|
||||||
typeof value.constructor.name === 'string' &&
|
|
||||||
/^(Blob|File)$/.test(value.constructor.name) &&
|
|
||||||
/^(Blob|File)$/.test(value[Symbol.toStringTag])
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isFormData = (value: any): value is FormData => {
|
export const isFormData = (value: unknown): value is FormData => {
|
||||||
return value instanceof FormData;
|
return value instanceof FormData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,38 +34,30 @@ export const base64 = (str: string): string => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getQueryString = (params: Record<string, any>): string => {
|
export const getQueryString = (params: Record<string, unknown>): string => {
|
||||||
const qs: string[] = [];
|
const qs: string[] = [];
|
||||||
|
|
||||||
const append = (key: string, value: any) => {
|
const append = (key: string, value: unknown) => {
|
||||||
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const process = (key: string, value: any) => {
|
const encodePair = (key: string, value: unknown) => {
|
||||||
if (isDefined(value)) {
|
if (value === undefined || value === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
value.forEach(v => {
|
value.forEach(v => encodePair(key, v));
|
||||||
process(key, v);
|
|
||||||
});
|
|
||||||
} else if (typeof value === 'object') {
|
} else if (typeof value === 'object') {
|
||||||
Object.entries(value).forEach(([k, v]) => {
|
Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v));
|
||||||
process(`${key}[${k}]`, v);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
append(key, value);
|
append(key, value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.entries(params).forEach(([key, value]) => {
|
Object.entries(params).forEach(([key, value]) => encodePair(key, value));
|
||||||
process(key, value);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (qs.length > 0) {
|
return qs.length ? `?${qs.join('&')}` : '';
|
||||||
return `?${qs.join('&')}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return '';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
||||||
|
@ -97,18 +72,15 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
||||||
return substring;
|
return substring;
|
||||||
});
|
});
|
||||||
|
|
||||||
const url = `${config.BASE}${path}`;
|
const url = config.BASE + path;
|
||||||
if (options.query) {
|
return options.query ? url + getQueryString(options.query) : url;
|
||||||
return `${url}${getQueryString(options.query)}`;
|
|
||||||
}
|
|
||||||
return url;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
export const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
||||||
if (options.formData) {
|
if (options.formData) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
||||||
const process = (key: string, value: any) => {
|
const process = (key: string, value: unknown) => {
|
||||||
if (isString(value) || isBlob(value)) {
|
if (isString(value) || isBlob(value)) {
|
||||||
formData.append(key, value);
|
formData.append(key, value);
|
||||||
} else {
|
} else {
|
||||||
|
@ -117,7 +89,7 @@ export const getFormData = (options: ApiRequestOptions): FormData | undefined =>
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.entries(options.formData)
|
Object.entries(options.formData)
|
||||||
.filter(([_, value]) => isDefined(value))
|
.filter(([, value]) => value !== undefined && value !== null)
|
||||||
.forEach(([key, value]) => {
|
.forEach(([key, value]) => {
|
||||||
if (Array.isArray(value)) {
|
if (Array.isArray(value)) {
|
||||||
value.forEach(v => process(key, v));
|
value.forEach(v => process(key, v));
|
||||||
|
@ -153,7 +125,7 @@ export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): O
|
||||||
...additionalHeaders,
|
...additionalHeaders,
|
||||||
...options.headers,
|
...options.headers,
|
||||||
})
|
})
|
||||||
.filter(([_, value]) => isDefined(value))
|
.filter(([, value]) => value !== undefined && value !== null)
|
||||||
.reduce((headers, [key, value]) => ({
|
.reduce((headers, [key, value]) => ({
|
||||||
...headers,
|
...headers,
|
||||||
[key]: String(value),
|
[key]: String(value),
|
||||||
|
@ -168,7 +140,7 @@ export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): O
|
||||||
headers['Authorization'] = `Basic ${credentials}`;
|
headers['Authorization'] = `Basic ${credentials}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.body) {
|
if (options.body !== undefined) {
|
||||||
if (options.mediaType) {
|
if (options.mediaType) {
|
||||||
headers['Content-Type'] = options.mediaType;
|
headers['Content-Type'] = options.mediaType;
|
||||||
} else if (isBlob(options.body)) {
|
} else if (isBlob(options.body)) {
|
||||||
|
@ -185,9 +157,9 @@ export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): O
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getRequestBody = (options: ApiRequestOptions): any => {
|
export const getRequestBody = (options: ApiRequestOptions): unknown => {
|
||||||
if (options.body) {
|
if (options.body) {
|
||||||
if (options.mediaType?.includes('/json')) {
|
if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) {
|
||||||
return JSON.stringify(options.body)
|
return JSON.stringify(options.body)
|
||||||
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
||||||
return options.body;
|
return options.body;
|
||||||
|
@ -203,7 +175,7 @@ export const sendRequest = <T>(
|
||||||
options: ApiRequestOptions,
|
options: ApiRequestOptions,
|
||||||
http: HttpClient,
|
http: HttpClient,
|
||||||
url: string,
|
url: string,
|
||||||
body: any,
|
body: unknown,
|
||||||
formData: FormData | undefined,
|
formData: FormData | undefined,
|
||||||
headers: HttpHeaders
|
headers: HttpHeaders
|
||||||
): Observable<HttpResponse<T>> => {
|
): Observable<HttpResponse<T>> => {
|
||||||
|
@ -236,11 +208,44 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult):
|
||||||
const errors: Record<number, string> = {
|
const errors: Record<number, string> = {
|
||||||
400: 'Bad Request',
|
400: 'Bad Request',
|
||||||
401: 'Unauthorized',
|
401: 'Unauthorized',
|
||||||
|
402: 'Payment Required',
|
||||||
403: 'Forbidden',
|
403: 'Forbidden',
|
||||||
404: 'Not Found',
|
404: 'Not Found',
|
||||||
|
405: 'Method Not Allowed',
|
||||||
|
406: 'Not Acceptable',
|
||||||
|
407: 'Proxy Authentication Required',
|
||||||
|
408: 'Request Timeout',
|
||||||
|
409: 'Conflict',
|
||||||
|
410: 'Gone',
|
||||||
|
411: 'Length Required',
|
||||||
|
412: 'Precondition Failed',
|
||||||
|
413: 'Payload Too Large',
|
||||||
|
414: 'URI Too Long',
|
||||||
|
415: 'Unsupported Media Type',
|
||||||
|
416: 'Range Not Satisfiable',
|
||||||
|
417: 'Expectation Failed',
|
||||||
|
418: 'Im a teapot',
|
||||||
|
421: 'Misdirected Request',
|
||||||
|
422: 'Unprocessable Content',
|
||||||
|
423: 'Locked',
|
||||||
|
424: 'Failed Dependency',
|
||||||
|
425: 'Too Early',
|
||||||
|
426: 'Upgrade Required',
|
||||||
|
428: 'Precondition Required',
|
||||||
|
429: 'Too Many Requests',
|
||||||
|
431: 'Request Header Fields Too Large',
|
||||||
|
451: 'Unavailable For Legal Reasons',
|
||||||
500: 'Internal Server Error',
|
500: 'Internal Server Error',
|
||||||
|
501: 'Not Implemented',
|
||||||
502: 'Bad Gateway',
|
502: 'Bad Gateway',
|
||||||
503: 'Service Unavailable',
|
503: 'Service Unavailable',
|
||||||
|
504: 'Gateway Timeout',
|
||||||
|
505: 'HTTP Version Not Supported',
|
||||||
|
506: 'Variant Also Negotiates',
|
||||||
|
507: 'Insufficient Storage',
|
||||||
|
508: 'Loop Detected',
|
||||||
|
510: 'Not Extended',
|
||||||
|
511: 'Network Authentication Required',
|
||||||
...options.errors,
|
...options.errors,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,9 +286,12 @@ export const request = <T>(config: OpenAPIConfig, http: HttpClient, options: Api
|
||||||
|
|
||||||
return getHeaders(config, options).pipe(
|
return getHeaders(config, options).pipe(
|
||||||
switchMap(headers => {
|
switchMap(headers => {
|
||||||
return sendRequest<T>(config, options, http, url, formData, body, headers);
|
return sendRequest<T>(config, options, http, url, body, formData, headers);
|
||||||
}),
|
}),
|
||||||
map(response => {
|
switchMap(async response => {
|
||||||
|
for (const fn of config.interceptors.response._fns) {
|
||||||
|
response = await fn(response)
|
||||||
|
}
|
||||||
const responseBody = getResponseBody(response);
|
const responseBody = getResponseBody(response);
|
||||||
const responseHeader = getResponseHeader(response, options.responseHeader);
|
const responseHeader = getResponseHeader(response, options.responseHeader);
|
||||||
return {
|
return {
|
||||||
|
@ -296,7 +304,7 @@ export const request = <T>(config: OpenAPIConfig, http: HttpClient, options: Api
|
||||||
}),
|
}),
|
||||||
catchError((error: HttpErrorResponse) => {
|
catchError((error: HttpErrorResponse) => {
|
||||||
if (!error.status) {
|
if (!error.status) {
|
||||||
return throwError(error);
|
return throwError(() => error);
|
||||||
}
|
}
|
||||||
return of({
|
return of({
|
||||||
url,
|
url,
|
||||||
|
@ -311,7 +319,7 @@ export const request = <T>(config: OpenAPIConfig, http: HttpClient, options: Api
|
||||||
return result.body as T;
|
return result.body as T;
|
||||||
}),
|
}),
|
||||||
catchError((error: ApiError) => {
|
catchError((error: ApiError) => {
|
||||||
return throwError(error);
|
return throwError(() => error);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
};
|
};
|
12
src/app/openapi/core/types.ts
Normal file
12
src/app/openapi/core/types.ts
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import type { ApiResult } from './ApiResult';
|
||||||
|
|
||||||
|
export type TResult = 'body' | 'raw';
|
||||||
|
|
||||||
|
export type TApiResponse<T extends TResult, TData> =
|
||||||
|
Exclude<T, 'raw'> extends never
|
||||||
|
? ApiResult<TData>
|
||||||
|
: ApiResult<TData>['body'];
|
||||||
|
|
||||||
|
export type TConfig<T extends TResult> = {
|
||||||
|
_result?: T;
|
||||||
|
};
|
|
@ -1,81 +1,8 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export { ApiError } from './core/ApiError';
|
export { ApiError } from './core/ApiError';
|
||||||
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
||||||
export { OpenAPI } from './core/OpenAPI';
|
export { OpenAPI } from './core/OpenAPI';
|
||||||
export type { OpenAPIConfig } from './core/OpenAPI';
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
||||||
|
|
||||||
export type { Action } from './models/Action';
|
export * from './models'
|
||||||
export type { ActionParam } from './models/ActionParam';
|
export * from './schemas'
|
||||||
export type { ActionResult } from './models/ActionResult';
|
export * from './services'
|
||||||
export type { ActionResults } from './models/ActionResults';
|
|
||||||
export type { ActionsResults } from './models/ActionsResults';
|
|
||||||
export type { ActionsStore } from './models/ActionsStore';
|
|
||||||
export type { AdminBasket } from './models/AdminBasket';
|
|
||||||
export type { Attachment } from './models/Attachment';
|
|
||||||
export type { BaseMapWithStores } from './models/BaseMapWithStores';
|
|
||||||
export type { BaseStyle } from './models/BaseStyle';
|
|
||||||
export type { BasketDefault } from './models/BasketDefault';
|
|
||||||
export type { BasketNameOnly } from './models/BasketNameOnly';
|
|
||||||
export type { Body_execute_tag_action_api_execTagActions_post } from './models/Body_execute_tag_action_api_execTagActions_post';
|
|
||||||
export type { Body_login_for_access_token_api_token_post } from './models/Body_login_for_access_token_api_token_post';
|
|
||||||
export type { BootstrapData } from './models/BootstrapData';
|
|
||||||
export type { CategoryGroup } from './models/CategoryGroup';
|
|
||||||
export type { CategoryRead } from './models/CategoryRead';
|
|
||||||
export type { Dashboard } from './models/Dashboard';
|
|
||||||
export type { DashboardGroup } from './models/DashboardGroup';
|
|
||||||
export type { DashboardHome } from './models/DashboardHome';
|
|
||||||
export type { DashboardPageMetaData } from './models/DashboardPageMetaData';
|
|
||||||
export type { DashboardSection } from './models/DashboardSection';
|
|
||||||
export type { DataProvider } from './models/DataProvider';
|
|
||||||
export type { Downloader } from './models/Downloader';
|
|
||||||
export type { Equipment } from './models/Equipment';
|
|
||||||
export type { FeatureInfo } from './models/FeatureInfo';
|
|
||||||
export type { FileImport } from './models/FileImport';
|
|
||||||
export type { FormField } from './models/FormField';
|
|
||||||
export type { FormFieldInput } from './models/FormFieldInput';
|
|
||||||
export type { Geo } from './models/Geo';
|
|
||||||
export type { HTTPValidationError } from './models/HTTPValidationError';
|
|
||||||
export type { InfoCategory } from './models/InfoCategory';
|
|
||||||
export type { InfoItem } from './models/InfoItem';
|
|
||||||
export type { LegendItem } from './models/LegendItem';
|
|
||||||
export type { Map } from './models/Map';
|
|
||||||
export type { MapInitData } from './models/MapInitData';
|
|
||||||
export type { MaplibreStyle } from './models/MaplibreStyle';
|
|
||||||
export type { Measures } from './models/Measures';
|
|
||||||
export type { MeasuresItem } from './models/MeasuresItem';
|
|
||||||
export type { ModelAction } from './models/ModelAction';
|
|
||||||
export type { ModelInfo } from './models/ModelInfo';
|
|
||||||
export type { ModelValue } from './models/ModelValue';
|
|
||||||
export type { PlotBaseLine } from './models/PlotBaseLine';
|
|
||||||
export type { PlotBgShape } from './models/PlotBgShape';
|
|
||||||
export type { PlotParams } from './models/PlotParams';
|
|
||||||
export type { Project } from './models/Project';
|
|
||||||
export type { RawSurvey } from './models/RawSurvey';
|
|
||||||
export type { RoleRead } from './models/RoleRead';
|
|
||||||
export type { RoleReadNoUsers } from './models/RoleReadNoUsers';
|
|
||||||
export type { SpatialSysRef } from './models/SpatialSysRef';
|
|
||||||
export type { Store } from './models/Store';
|
|
||||||
export type { StoreNameOnly } from './models/StoreNameOnly';
|
|
||||||
export type { SurveyMeta } from './models/SurveyMeta';
|
|
||||||
export type { Surveyor } from './models/Surveyor';
|
|
||||||
export type { Tag } from './models/Tag';
|
|
||||||
export type { TagAction } from './models/TagAction';
|
|
||||||
export type { TagActions } from './models/TagActions';
|
|
||||||
export type { TaggedFeature } from './models/TaggedFeature';
|
|
||||||
export type { TaggedLayer } from './models/TaggedLayer';
|
|
||||||
export type { Tags } from './models/Tags';
|
|
||||||
export type { TileServer } from './models/TileServer';
|
|
||||||
export type { Token } from './models/Token';
|
|
||||||
export type { UserRead } from './models/UserRead';
|
|
||||||
export type { UserReadNoRoles } from './models/UserReadNoRoles';
|
|
||||||
export type { UserRoleLink } from './models/UserRoleLink';
|
|
||||||
export type { ValidationError } from './models/ValidationError';
|
|
||||||
|
|
||||||
export { AdminService } from './services/AdminService';
|
|
||||||
export { ApiService } from './services/ApiService';
|
|
||||||
export { DashboardService } from './services/DashboardService';
|
|
||||||
export { GeoapiService } from './services/GeoapiService';
|
|
||||||
export { MapService } from './services/MapService';
|
|
||||||
|
|
652
src/app/openapi/models.ts
Normal file
652
src/app/openapi/models.ts
Normal file
|
@ -0,0 +1,652 @@
|
||||||
|
export type Action = {
|
||||||
|
name: string;
|
||||||
|
roles: Array<string>;
|
||||||
|
params: Array<ActionParam>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ActionParam = {
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
dflt: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ActionResult = {
|
||||||
|
message?: string | null;
|
||||||
|
taggedLayers?: Array<TaggedLayer>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ActionResults = {
|
||||||
|
name?: string | null;
|
||||||
|
message?: string | null;
|
||||||
|
actionResults?: Array<ActionResult>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ActionsResults = {
|
||||||
|
message?: string | null;
|
||||||
|
actionResults?: Array<ActionResults>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ActionsStore = {
|
||||||
|
store: string;
|
||||||
|
actions: Array<Action>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type AdminBasket = {
|
||||||
|
name: string;
|
||||||
|
files: Array<FileImport>;
|
||||||
|
columns: Array<string>;
|
||||||
|
uploadFields: Array<string>;
|
||||||
|
projects?: Array<Project>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Attachment = {
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type BaseMapWithStores = {
|
||||||
|
name: string;
|
||||||
|
stores: Array<string>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type BaseStyle = {
|
||||||
|
id?: number | null;
|
||||||
|
name: string;
|
||||||
|
style: Record<string, unknown> | null;
|
||||||
|
mbtiles: string;
|
||||||
|
static_tiles_url: string;
|
||||||
|
enabled?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type BasketDefault = {
|
||||||
|
surveyor?: string;
|
||||||
|
equipment?: string;
|
||||||
|
project?: string;
|
||||||
|
status?: string;
|
||||||
|
store?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type BasketNameOnly = {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Body_execute_tag_action_api_execTagActions_post = {
|
||||||
|
stores: Array<string>;
|
||||||
|
ids: Array<Array<string>>;
|
||||||
|
actionNames: Array<string>;
|
||||||
|
params: Array<ActionParam | null>;
|
||||||
|
formFields: Array<FormFieldInput>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Body_login_for_access_token_api_token_post = {
|
||||||
|
grant_type?: string | null;
|
||||||
|
username: string;
|
||||||
|
password: string;
|
||||||
|
scope?: string;
|
||||||
|
client_id?: string | null;
|
||||||
|
client_secret?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type BootstrapData = {
|
||||||
|
version?: string;
|
||||||
|
title?: string;
|
||||||
|
windowTitle?: string;
|
||||||
|
map?: Map;
|
||||||
|
geo?: Geo;
|
||||||
|
measures?: Measures;
|
||||||
|
redirect?: string;
|
||||||
|
user?: UserRead | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type CategoryGroup = {
|
||||||
|
name?: string | null;
|
||||||
|
major: boolean;
|
||||||
|
long_name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type CategoryRead = {
|
||||||
|
name: string;
|
||||||
|
description: string | null;
|
||||||
|
group: string;
|
||||||
|
minor_group_1?: string;
|
||||||
|
minor_group_2?: string;
|
||||||
|
status: string;
|
||||||
|
custom: boolean | null;
|
||||||
|
auto_import?: boolean;
|
||||||
|
gis_type?: string;
|
||||||
|
long_name: string | null;
|
||||||
|
style: string | null;
|
||||||
|
symbol: string | null;
|
||||||
|
mapbox_type_custom: string | null;
|
||||||
|
mapbox_paint: Record<string, (Record<string, unknown> | Array<unknown> | number | string)> | null;
|
||||||
|
mapbox_layout: Record<string, (Record<string, unknown> | Array<unknown> | number | string)> | null;
|
||||||
|
viewable_role: string | null;
|
||||||
|
extra: Record<string, unknown> | null;
|
||||||
|
/**
|
||||||
|
* ISO compliant layer name (see ISO 13567)
|
||||||
|
* :return: str
|
||||||
|
*/
|
||||||
|
readonly layer_name: string;
|
||||||
|
/**
|
||||||
|
* Table name
|
||||||
|
* :return:
|
||||||
|
*/
|
||||||
|
readonly table_name: string;
|
||||||
|
/**
|
||||||
|
* Table name
|
||||||
|
* :return:
|
||||||
|
*/
|
||||||
|
readonly raw_survey_table_name: string;
|
||||||
|
readonly mapbox_type: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Dashboard = {
|
||||||
|
name: string;
|
||||||
|
group: string;
|
||||||
|
description: string;
|
||||||
|
time?: string | null;
|
||||||
|
html?: string | null;
|
||||||
|
attachment?: string | null;
|
||||||
|
dfData?: Array<unknown>;
|
||||||
|
plotData?: Array<Record<string, unknown>> | null;
|
||||||
|
plotLayout?: Record<string, unknown> | null;
|
||||||
|
notebook?: string | null;
|
||||||
|
expandedPanes?: Array<string> | null;
|
||||||
|
sections?: Array<DashboardSection> | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type DashboardGroup = {
|
||||||
|
name: string;
|
||||||
|
pages: Array<DashboardPageMetaData>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type DashboardHome = {
|
||||||
|
title: string;
|
||||||
|
content: string;
|
||||||
|
footer: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type DashboardPageMetaData = {
|
||||||
|
name: string;
|
||||||
|
group: string;
|
||||||
|
description: string;
|
||||||
|
viewable_role?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type DashboardSection = {
|
||||||
|
name: string;
|
||||||
|
plot: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type DataProvider = {
|
||||||
|
store: string;
|
||||||
|
name: string;
|
||||||
|
values: Array<string>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Downloader = {
|
||||||
|
roles?: Array<string>;
|
||||||
|
name: string;
|
||||||
|
icon?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Equipment = {
|
||||||
|
id?: number | null;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type FeatureInfo = {
|
||||||
|
id: string;
|
||||||
|
itemName: string;
|
||||||
|
geoInfoItems?: Array<InfoItem>;
|
||||||
|
surveyInfoItems?: Array<InfoItem>;
|
||||||
|
infoItems?: Array<InfoItem>;
|
||||||
|
categorizedInfoItems?: Array<InfoCategory> | null;
|
||||||
|
tags?: Array<Tag>;
|
||||||
|
graph?: string | null;
|
||||||
|
plotParams?: PlotParams | null;
|
||||||
|
files?: Array<Attachment>;
|
||||||
|
images?: Array<Attachment>;
|
||||||
|
externalRecordUrl?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Files to import or imported in the DB.
|
||||||
|
* Give either url or path.
|
||||||
|
*/
|
||||||
|
export type FileImport = {
|
||||||
|
id?: number | null;
|
||||||
|
url: string;
|
||||||
|
path: string;
|
||||||
|
dir: string;
|
||||||
|
name: string;
|
||||||
|
md5: string;
|
||||||
|
time: string;
|
||||||
|
comment: string;
|
||||||
|
status: string;
|
||||||
|
store: string;
|
||||||
|
basket: string;
|
||||||
|
project_id: number;
|
||||||
|
surveyor_id: number;
|
||||||
|
equipment_id: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type FormField = {
|
||||||
|
name: string;
|
||||||
|
type: string;
|
||||||
|
dflt?: string | null;
|
||||||
|
value?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type FormFieldInput = {
|
||||||
|
name: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Geo = {
|
||||||
|
raw_survey?: RawSurvey;
|
||||||
|
simplify_geom_factor?: number;
|
||||||
|
simplify_preserve_topology?: boolean;
|
||||||
|
srid?: number;
|
||||||
|
srid_for_proj?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type HTTPValidationError = {
|
||||||
|
detail?: Array<ValidationError>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type InfoCategory = {
|
||||||
|
name: string;
|
||||||
|
infoItems: Array<InfoItem>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type InfoItem = {
|
||||||
|
key: string;
|
||||||
|
value: (string | number);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type LegendItem = {
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Map = {
|
||||||
|
tileServer?: TileServer;
|
||||||
|
zoom?: number;
|
||||||
|
pitch?: number;
|
||||||
|
lat?: number;
|
||||||
|
lng?: number;
|
||||||
|
bearing?: number;
|
||||||
|
style?: string;
|
||||||
|
opacity?: number;
|
||||||
|
attribution?: string;
|
||||||
|
status?: Array<string>;
|
||||||
|
defaultStatus?: Array<string>;
|
||||||
|
tagKeys?: Array<string>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type MapInitData = {
|
||||||
|
baseStyles?: Array<BaseStyle>;
|
||||||
|
baseMaps?: Array<BaseMapWithStores>;
|
||||||
|
groups?: Array<CategoryGroup>;
|
||||||
|
stores?: Array<Store>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type MaplibreStyle = {
|
||||||
|
paint?: Record<string, (Record<string, unknown> | Array<unknown> | number | string)> | null;
|
||||||
|
layout?: Record<string, (Record<string, unknown> | Array<unknown> | number | string)> | null;
|
||||||
|
attribution?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Measures = {
|
||||||
|
defaultStore?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type MeasuresItem = {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ModelAction = {
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
roles?: Array<string> | null;
|
||||||
|
formFields: Array<FormField>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ModelInfo = {
|
||||||
|
store: string;
|
||||||
|
modelName: string;
|
||||||
|
symbol?: string | null;
|
||||||
|
values?: Array<ModelValue>;
|
||||||
|
actions?: Array<ModelAction>;
|
||||||
|
formName?: string | null;
|
||||||
|
formFields?: Array<FormField>;
|
||||||
|
tagPlugins?: Array<string>;
|
||||||
|
tagActions?: Array<TagActions>;
|
||||||
|
downloaders?: Array<Downloader>;
|
||||||
|
legend?: Array<LegendItem>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ModelValue = {
|
||||||
|
name: string;
|
||||||
|
title: string;
|
||||||
|
unit: string;
|
||||||
|
chartType?: string;
|
||||||
|
chartColor?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type PlotBaseLine = {
|
||||||
|
name: string;
|
||||||
|
value: number;
|
||||||
|
color: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type PlotBgShape = {
|
||||||
|
name: string;
|
||||||
|
valueTop: number;
|
||||||
|
valueBottom: number;
|
||||||
|
color: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type PlotParams = {
|
||||||
|
baseLines?: Array<PlotBaseLine>;
|
||||||
|
bgShapes?: Array<PlotBgShape>;
|
||||||
|
barBase?: number | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Project = {
|
||||||
|
id?: number | null;
|
||||||
|
name: string;
|
||||||
|
contact_person: string;
|
||||||
|
site: string;
|
||||||
|
date_approved: string;
|
||||||
|
start_date_planned: string;
|
||||||
|
start_date_effective: string;
|
||||||
|
end_date_planned: string;
|
||||||
|
end_date_effective: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type RawSurvey = {
|
||||||
|
spatial_sys_ref?: SpatialSysRef;
|
||||||
|
srid?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type RoleRead = {
|
||||||
|
name: string;
|
||||||
|
id: number;
|
||||||
|
users?: Array<UserReadNoRoles>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type RoleReadNoUsers = {
|
||||||
|
name: string;
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type SpatialSysRef = {
|
||||||
|
author?: string;
|
||||||
|
ellps?: string;
|
||||||
|
k?: number;
|
||||||
|
lat_0?: number;
|
||||||
|
lon_0?: number;
|
||||||
|
no_defs?: boolean;
|
||||||
|
proj?: string;
|
||||||
|
towgs84?: string;
|
||||||
|
units?: string;
|
||||||
|
x_0?: number;
|
||||||
|
y_0?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Store = {
|
||||||
|
name: string;
|
||||||
|
category?: string | null;
|
||||||
|
auto_import: boolean;
|
||||||
|
count?: number | null;
|
||||||
|
custom: boolean;
|
||||||
|
description: string;
|
||||||
|
gis_type: string;
|
||||||
|
group: string;
|
||||||
|
in_menu: boolean;
|
||||||
|
is_db: boolean;
|
||||||
|
is_line_work: boolean;
|
||||||
|
is_live: boolean;
|
||||||
|
long_name: string | null;
|
||||||
|
type: string;
|
||||||
|
minor_group_1: string | null;
|
||||||
|
minor_group_2: string | null;
|
||||||
|
status: string;
|
||||||
|
style: string | null;
|
||||||
|
symbol: string | null;
|
||||||
|
title: string;
|
||||||
|
viewable_role: string | null;
|
||||||
|
z_index: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type StoreNameOnly = {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type SurveyMeta = {
|
||||||
|
projects: Array<Project>;
|
||||||
|
surveyors: Array<Surveyor>;
|
||||||
|
equipments: Array<Equipment>;
|
||||||
|
statuses: Array<string>;
|
||||||
|
stores_misc: Array<StoreNameOnly>;
|
||||||
|
stores_line_work: Array<StoreNameOnly>;
|
||||||
|
default: BasketDefault;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Surveyor = {
|
||||||
|
id?: number | null;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Tag = {
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type TagAction = {
|
||||||
|
name: string;
|
||||||
|
action: string;
|
||||||
|
roles?: Array<string> | null;
|
||||||
|
link?: string | null;
|
||||||
|
save?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type TagActions = {
|
||||||
|
domain: string;
|
||||||
|
key: string;
|
||||||
|
actions: Array<TagAction>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type TaggedFeature = {
|
||||||
|
id: string;
|
||||||
|
tags: Tags;
|
||||||
|
lat: number;
|
||||||
|
lon: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type TaggedLayer = {
|
||||||
|
store: string;
|
||||||
|
taggedFeatures: Array<TaggedFeature>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Tags = {
|
||||||
|
id?: number | null;
|
||||||
|
geom: string;
|
||||||
|
store: string;
|
||||||
|
ref_id: number;
|
||||||
|
tags: Record<string, unknown>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type TileServer = {
|
||||||
|
baseDir?: string;
|
||||||
|
useRequestUrl?: boolean;
|
||||||
|
spriteBaseDir?: string;
|
||||||
|
spriteUrl?: string;
|
||||||
|
spriteBaseUrl?: string;
|
||||||
|
openMapTilesKey?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type Token = {
|
||||||
|
access_token: string;
|
||||||
|
token_type: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type UserRead = {
|
||||||
|
username: string;
|
||||||
|
email: string | null;
|
||||||
|
disabled?: boolean | null;
|
||||||
|
id: number;
|
||||||
|
roles?: Array<RoleReadNoUsers>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type UserReadNoRoles = {
|
||||||
|
username: string;
|
||||||
|
email: string | null;
|
||||||
|
disabled?: boolean | null;
|
||||||
|
id: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type UserRoleLink = {
|
||||||
|
user_id?: number | null;
|
||||||
|
role_id?: number | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export type ValidationError = {
|
||||||
|
loc: Array<string | number>;
|
||||||
|
msg: string;
|
||||||
|
type: string;
|
||||||
|
};
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ActionParam } from './ActionParam';
|
|
||||||
export type Action = {
|
|
||||||
name: string;
|
|
||||||
roles: Array<string>;
|
|
||||||
params: Array<ActionParam>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ActionParam = {
|
|
||||||
name: string;
|
|
||||||
type: string;
|
|
||||||
dflt: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { TaggedLayer } from './TaggedLayer';
|
|
||||||
export type ActionResult = {
|
|
||||||
message?: (string | null);
|
|
||||||
taggedLayers?: Array<TaggedLayer>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ActionResult } from './ActionResult';
|
|
||||||
export type ActionResults = {
|
|
||||||
name?: (string | null);
|
|
||||||
message?: (string | null);
|
|
||||||
actionResults?: Array<ActionResult>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ActionResults } from './ActionResults';
|
|
||||||
export type ActionsResults = {
|
|
||||||
message?: (string | null);
|
|
||||||
actionResults?: Array<ActionResults>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { Action } from './Action';
|
|
||||||
export type ActionsStore = {
|
|
||||||
store: string;
|
|
||||||
actions: Array<Action>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { FileImport } from './FileImport';
|
|
||||||
import type { Project } from './Project';
|
|
||||||
export type AdminBasket = {
|
|
||||||
name: string;
|
|
||||||
files: Array<FileImport>;
|
|
||||||
columns: Array<string>;
|
|
||||||
uploadFields: Array<string>;
|
|
||||||
projects?: Array<Project>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Attachment = {
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type BaseMapWithStores = {
|
|
||||||
name: string;
|
|
||||||
stores: Array<string>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type BaseStyle = {
|
|
||||||
id?: (number | null);
|
|
||||||
name: string;
|
|
||||||
style: (Record<string, any> | null);
|
|
||||||
mbtiles: string;
|
|
||||||
static_tiles_url: string;
|
|
||||||
enabled?: boolean;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type BasketDefault = {
|
|
||||||
surveyor?: string;
|
|
||||||
equipment?: string;
|
|
||||||
project?: string;
|
|
||||||
status?: string;
|
|
||||||
store?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type BasketNameOnly = {
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ActionParam } from './ActionParam';
|
|
||||||
import type { FormFieldInput } from './FormFieldInput';
|
|
||||||
export type Body_execute_tag_action_api_execTagActions_post = {
|
|
||||||
stores: Array<string>;
|
|
||||||
ids: Array<Array<string>>;
|
|
||||||
actionNames: Array<string>;
|
|
||||||
params: Array<(ActionParam | null)>;
|
|
||||||
formFields: Array<FormFieldInput>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Body_login_for_access_token_api_token_post = {
|
|
||||||
grant_type?: (string | null);
|
|
||||||
username: string;
|
|
||||||
password: string;
|
|
||||||
scope?: string;
|
|
||||||
client_id?: (string | null);
|
|
||||||
client_secret?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { Geo } from './Geo';
|
|
||||||
import type { Map } from './Map';
|
|
||||||
import type { Measures } from './Measures';
|
|
||||||
import type { UserRead } from './UserRead';
|
|
||||||
export type BootstrapData = {
|
|
||||||
version?: string;
|
|
||||||
title?: string;
|
|
||||||
windowTitle?: string;
|
|
||||||
map?: Map;
|
|
||||||
geo?: Geo;
|
|
||||||
measures?: Measures;
|
|
||||||
redirect?: string;
|
|
||||||
user?: (UserRead | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type CategoryGroup = {
|
|
||||||
name?: (string | null);
|
|
||||||
major: boolean;
|
|
||||||
long_name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type CategoryRead = {
|
|
||||||
name: string;
|
|
||||||
description: (string | null);
|
|
||||||
group: string;
|
|
||||||
minor_group_1?: string;
|
|
||||||
minor_group_2?: string;
|
|
||||||
status: string;
|
|
||||||
custom: (boolean | null);
|
|
||||||
auto_import?: boolean;
|
|
||||||
gis_type?: string;
|
|
||||||
long_name: (string | null);
|
|
||||||
style: (string | null);
|
|
||||||
symbol: (string | null);
|
|
||||||
mapbox_type_custom: (string | null);
|
|
||||||
mapbox_paint: (Record<string, (Record<string, any> | number | string)> | null);
|
|
||||||
mapbox_layout: (Record<string, (Record<string, any> | number | string)> | null);
|
|
||||||
viewable_role: (string | null);
|
|
||||||
extra: (Record<string, any> | null);
|
|
||||||
/**
|
|
||||||
* ISO compliant layer name (see ISO 13567)
|
|
||||||
* :return: str
|
|
||||||
*/
|
|
||||||
readonly layer_name: string;
|
|
||||||
/**
|
|
||||||
* Table name
|
|
||||||
* :return:
|
|
||||||
*/
|
|
||||||
readonly table_name: string;
|
|
||||||
/**
|
|
||||||
* Table name
|
|
||||||
* :return:
|
|
||||||
*/
|
|
||||||
readonly raw_survey_table_name: string;
|
|
||||||
readonly mapbox_type: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { DashboardSection } from './DashboardSection';
|
|
||||||
export type Dashboard = {
|
|
||||||
name: string;
|
|
||||||
group: string;
|
|
||||||
description: string;
|
|
||||||
time?: (string | null);
|
|
||||||
html?: (string | null);
|
|
||||||
attachment?: (string | null);
|
|
||||||
dfData?: Array<any>;
|
|
||||||
plotData?: null;
|
|
||||||
plotLayout?: (Record<string, any> | null);
|
|
||||||
notebook?: (string | null);
|
|
||||||
expandedPanes?: (Array<string> | null);
|
|
||||||
sections?: (Array<DashboardSection> | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { DashboardPageMetaData } from './DashboardPageMetaData';
|
|
||||||
export type DashboardGroup = {
|
|
||||||
name: string;
|
|
||||||
pages: Array<DashboardPageMetaData>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type DashboardHome = {
|
|
||||||
title: string;
|
|
||||||
content: string;
|
|
||||||
footer: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type DashboardPageMetaData = {
|
|
||||||
name: string;
|
|
||||||
group: string;
|
|
||||||
description: string;
|
|
||||||
viewable_role?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type DashboardSection = {
|
|
||||||
name: string;
|
|
||||||
plot: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type DataProvider = {
|
|
||||||
store: string;
|
|
||||||
name: string;
|
|
||||||
values: Array<string>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Downloader = {
|
|
||||||
roles?: Array<string>;
|
|
||||||
name: string;
|
|
||||||
icon?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Equipment = {
|
|
||||||
id?: (number | null);
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { Attachment } from './Attachment';
|
|
||||||
import type { InfoCategory } from './InfoCategory';
|
|
||||||
import type { InfoItem } from './InfoItem';
|
|
||||||
import type { PlotParams } from './PlotParams';
|
|
||||||
import type { Tag } from './Tag';
|
|
||||||
export type FeatureInfo = {
|
|
||||||
id: string;
|
|
||||||
itemName: string;
|
|
||||||
geoInfoItems?: Array<InfoItem>;
|
|
||||||
surveyInfoItems?: Array<InfoItem>;
|
|
||||||
infoItems?: Array<InfoItem>;
|
|
||||||
categorizedInfoItems?: (Array<InfoCategory> | null);
|
|
||||||
tags?: Array<Tag>;
|
|
||||||
graph?: (string | null);
|
|
||||||
plotParams?: (PlotParams | null);
|
|
||||||
files?: Array<Attachment>;
|
|
||||||
images?: Array<Attachment>;
|
|
||||||
externalRecordUrl?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* Files to import or imported in the DB.
|
|
||||||
* Give either url or path.
|
|
||||||
*/
|
|
||||||
export type FileImport = {
|
|
||||||
id?: (number | null);
|
|
||||||
url: string;
|
|
||||||
path: string;
|
|
||||||
dir: string;
|
|
||||||
name: string;
|
|
||||||
md5: string;
|
|
||||||
time: string;
|
|
||||||
comment: string;
|
|
||||||
status: string;
|
|
||||||
store: string;
|
|
||||||
basket: string;
|
|
||||||
project_id: number;
|
|
||||||
surveyor_id: number;
|
|
||||||
equipment_id: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type FormField = {
|
|
||||||
name: string;
|
|
||||||
type: string;
|
|
||||||
dflt?: (string | null);
|
|
||||||
value?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type FormFieldInput = {
|
|
||||||
name: string;
|
|
||||||
value: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { RawSurvey } from './RawSurvey';
|
|
||||||
export type Geo = {
|
|
||||||
raw_survey?: RawSurvey;
|
|
||||||
simplify_geom_factor?: number;
|
|
||||||
simplify_preserve_topology?: boolean;
|
|
||||||
srid?: number;
|
|
||||||
srid_for_proj?: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { ValidationError } from './ValidationError';
|
|
||||||
export type HTTPValidationError = {
|
|
||||||
detail?: Array<ValidationError>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { InfoItem } from './InfoItem';
|
|
||||||
export type InfoCategory = {
|
|
||||||
name: string;
|
|
||||||
infoItems: Array<InfoItem>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type InfoItem = {
|
|
||||||
key: string;
|
|
||||||
value: (string | number);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type LegendItem = {
|
|
||||||
key: string;
|
|
||||||
value: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { TileServer } from './TileServer';
|
|
||||||
export type Map = {
|
|
||||||
tileServer?: TileServer;
|
|
||||||
zoom?: number;
|
|
||||||
pitch?: number;
|
|
||||||
lat?: number;
|
|
||||||
lng?: number;
|
|
||||||
bearing?: number;
|
|
||||||
style?: string;
|
|
||||||
opacity?: number;
|
|
||||||
attribution?: string;
|
|
||||||
status?: Array<string>;
|
|
||||||
defaultStatus?: Array<string>;
|
|
||||||
tagKeys?: Array<string>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { BaseMapWithStores } from './BaseMapWithStores';
|
|
||||||
import type { BaseStyle } from './BaseStyle';
|
|
||||||
import type { CategoryGroup } from './CategoryGroup';
|
|
||||||
import type { Store } from './Store';
|
|
||||||
export type MapInitData = {
|
|
||||||
baseStyles?: Array<BaseStyle>;
|
|
||||||
baseMaps?: Array<BaseMapWithStores>;
|
|
||||||
groups?: Array<CategoryGroup>;
|
|
||||||
stores?: Array<Store>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type MaplibreStyle = {
|
|
||||||
paint?: (Record<string, (Record<string, any> | number | string)> | null);
|
|
||||||
layout?: (Record<string, (Record<string, any> | number | string)> | null);
|
|
||||||
attribution?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Measures = {
|
|
||||||
defaultStore?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type MeasuresItem = {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { FormField } from './FormField';
|
|
||||||
export type ModelAction = {
|
|
||||||
name: string;
|
|
||||||
icon: string;
|
|
||||||
roles?: (Array<string> | null);
|
|
||||||
formFields: Array<FormField>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { Downloader } from './Downloader';
|
|
||||||
import type { FormField } from './FormField';
|
|
||||||
import type { LegendItem } from './LegendItem';
|
|
||||||
import type { ModelAction } from './ModelAction';
|
|
||||||
import type { ModelValue } from './ModelValue';
|
|
||||||
import type { TagActions } from './TagActions';
|
|
||||||
export type ModelInfo = {
|
|
||||||
store: string;
|
|
||||||
modelName: string;
|
|
||||||
symbol?: (string | null);
|
|
||||||
values?: Array<ModelValue>;
|
|
||||||
actions?: Array<ModelAction>;
|
|
||||||
formName?: (string | null);
|
|
||||||
formFields?: Array<FormField>;
|
|
||||||
tagPlugins?: Array<string>;
|
|
||||||
tagActions?: Array<TagActions>;
|
|
||||||
downloaders?: Array<Downloader>;
|
|
||||||
legend?: Array<LegendItem>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ModelValue = {
|
|
||||||
name: string;
|
|
||||||
title: string;
|
|
||||||
unit: string;
|
|
||||||
chartType?: string;
|
|
||||||
chartColor?: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type PlotBaseLine = {
|
|
||||||
name: string;
|
|
||||||
value: number;
|
|
||||||
color: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type PlotBgShape = {
|
|
||||||
name: string;
|
|
||||||
valueTop: number;
|
|
||||||
valueBottom: number;
|
|
||||||
color: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { PlotBaseLine } from './PlotBaseLine';
|
|
||||||
import type { PlotBgShape } from './PlotBgShape';
|
|
||||||
export type PlotParams = {
|
|
||||||
baseLines?: Array<PlotBaseLine>;
|
|
||||||
bgShapes?: Array<PlotBgShape>;
|
|
||||||
barBase?: (number | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Project = {
|
|
||||||
id?: (number | null);
|
|
||||||
name: string;
|
|
||||||
contact_person: string;
|
|
||||||
site: string;
|
|
||||||
date_approved: string;
|
|
||||||
start_date_planned: string;
|
|
||||||
start_date_effective: string;
|
|
||||||
end_date_planned: string;
|
|
||||||
end_date_effective: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { SpatialSysRef } from './SpatialSysRef';
|
|
||||||
export type RawSurvey = {
|
|
||||||
spatial_sys_ref?: SpatialSysRef;
|
|
||||||
srid?: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { UserReadNoRoles } from './UserReadNoRoles';
|
|
||||||
export type RoleRead = {
|
|
||||||
name: string;
|
|
||||||
id: number;
|
|
||||||
users?: Array<UserReadNoRoles>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type RoleReadNoUsers = {
|
|
||||||
name: string;
|
|
||||||
id: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type SpatialSysRef = {
|
|
||||||
author?: string;
|
|
||||||
ellps?: string;
|
|
||||||
'k'?: number;
|
|
||||||
lat_0?: number;
|
|
||||||
lon_0?: number;
|
|
||||||
no_defs?: boolean;
|
|
||||||
proj?: string;
|
|
||||||
towgs84?: string;
|
|
||||||
units?: string;
|
|
||||||
x_0?: number;
|
|
||||||
y_0?: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Store = {
|
|
||||||
name: string;
|
|
||||||
category?: (string | null);
|
|
||||||
auto_import: boolean;
|
|
||||||
count?: (number | null);
|
|
||||||
custom: boolean;
|
|
||||||
description: string;
|
|
||||||
gis_type: string;
|
|
||||||
group: string;
|
|
||||||
in_menu: boolean;
|
|
||||||
is_db: boolean;
|
|
||||||
is_line_work: boolean;
|
|
||||||
is_live: boolean;
|
|
||||||
long_name: (string | null);
|
|
||||||
type: string;
|
|
||||||
minor_group_1: (string | null);
|
|
||||||
minor_group_2: (string | null);
|
|
||||||
status: string;
|
|
||||||
style: (string | null);
|
|
||||||
symbol: (string | null);
|
|
||||||
title: string;
|
|
||||||
viewable_role: (string | null);
|
|
||||||
z_index: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type StoreNameOnly = {
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { BasketDefault } from './BasketDefault';
|
|
||||||
import type { Equipment } from './Equipment';
|
|
||||||
import type { Project } from './Project';
|
|
||||||
import type { StoreNameOnly } from './StoreNameOnly';
|
|
||||||
import type { Surveyor } from './Surveyor';
|
|
||||||
export type SurveyMeta = {
|
|
||||||
projects: Array<Project>;
|
|
||||||
surveyors: Array<Surveyor>;
|
|
||||||
equipments: Array<Equipment>;
|
|
||||||
statuses: Array<string>;
|
|
||||||
stores_misc: Array<StoreNameOnly>;
|
|
||||||
stores_line_work: Array<StoreNameOnly>;
|
|
||||||
default: BasketDefault;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Surveyor = {
|
|
||||||
id?: (number | null);
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Tag = {
|
|
||||||
key: string;
|
|
||||||
value: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type TagAction = {
|
|
||||||
name: string;
|
|
||||||
action: string;
|
|
||||||
roles?: (Array<string> | null);
|
|
||||||
link?: (string | null);
|
|
||||||
save?: boolean;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { TagAction } from './TagAction';
|
|
||||||
export type TagActions = {
|
|
||||||
domain: string;
|
|
||||||
key: string;
|
|
||||||
actions: Array<TagAction>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { Tags } from './Tags';
|
|
||||||
export type TaggedFeature = {
|
|
||||||
id: string;
|
|
||||||
tags: Tags;
|
|
||||||
lat: number;
|
|
||||||
lon: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { TaggedFeature } from './TaggedFeature';
|
|
||||||
export type TaggedLayer = {
|
|
||||||
store: string;
|
|
||||||
taggedFeatures: Array<TaggedFeature>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Tags = {
|
|
||||||
id?: (number | null);
|
|
||||||
geom: string;
|
|
||||||
store: string;
|
|
||||||
ref_id: number;
|
|
||||||
tags: Record<string, any>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type TileServer = {
|
|
||||||
baseDir?: string;
|
|
||||||
useRequestUrl?: boolean;
|
|
||||||
spriteBaseDir?: string;
|
|
||||||
spriteUrl?: string;
|
|
||||||
spriteBaseUrl?: string;
|
|
||||||
openMapTilesKey?: (string | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type Token = {
|
|
||||||
access_token: string;
|
|
||||||
token_type: string;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import type { RoleReadNoUsers } from './RoleReadNoUsers';
|
|
||||||
export type UserRead = {
|
|
||||||
username: string;
|
|
||||||
email: (string | null);
|
|
||||||
disabled?: (boolean | null);
|
|
||||||
id: number;
|
|
||||||
roles?: Array<RoleReadNoUsers>;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type UserReadNoRoles = {
|
|
||||||
username: string;
|
|
||||||
email: (string | null);
|
|
||||||
disabled?: (boolean | null);
|
|
||||||
id: number;
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type UserRoleLink = {
|
|
||||||
user_id?: (number | null);
|
|
||||||
role_id?: (number | null);
|
|
||||||
};
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
export type ValidationError = {
|
|
||||||
loc: Array<(string | number)>;
|
|
||||||
msg: string;
|
|
||||||
type: string;
|
|
||||||
};
|
|
||||||
|
|
2206
src/app/openapi/schemas.ts
Normal file
2206
src/app/openapi/schemas.ts
Normal file
File diff suppressed because it is too large
Load diff
683
src/app/openapi/services.ts
Normal file
683
src/app/openapi/services.ts
Normal file
|
@ -0,0 +1,683 @@
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import type { Observable } from 'rxjs';
|
||||||
|
import { OpenAPI } from './core/OpenAPI';
|
||||||
|
import { request as __request } from './core/request';
|
||||||
|
|
||||||
|
import type { ActionsResults,ActionsStore,Body_execute_tag_action_api_execTagActions_post,Body_login_for_access_token_api_token_post,BootstrapData,CategoryRead,DataProvider,FeatureInfo,MeasuresItem,ModelInfo,PlotParams,Project,RoleRead,Store,SurveyMeta,Token,UserRead,UserRoleLink,AdminBasket,BasketNameOnly,Dashboard,DashboardGroup,DashboardHome,BaseStyle,MapInitData,MaplibreStyle } from './models';
|
||||||
|
|
||||||
|
export type TDataLoginForAccessTokenApiTokenPost = {
|
||||||
|
formData: Body_login_for_access_token_api_token_post
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetModelListApiDataProviderStoreGet = {
|
||||||
|
store: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetModelValuesApiStoreNameValuesValueGet = {
|
||||||
|
resample?: string | null
|
||||||
|
storeName: string
|
||||||
|
value: string
|
||||||
|
where: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetFeatureInfoApiFeatureInfoStoreIdGet = {
|
||||||
|
id: string
|
||||||
|
store: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetModelInfoApiModelInfoStoreGet = {
|
||||||
|
store: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetPlotParamsApiPlotParamsStoreGet = {
|
||||||
|
id: string
|
||||||
|
store: string
|
||||||
|
value: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataExecuteTagActionApiExecTagActionsPost = {
|
||||||
|
requestBody: Body_execute_tag_action_api_execTagActions_post
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class ApiService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bootstrap
|
||||||
|
* @returns BootstrapData Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public bootstrapApiBootstrapGet(): Observable<BootstrapData> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/bootstrap',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Login For Access Token
|
||||||
|
* @returns Token Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public loginForAccessTokenApiTokenPost(data: TDataLoginForAccessTokenApiTokenPost): Observable<Token> {
|
||||||
|
const {
|
||||||
|
formData,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/token',
|
||||||
|
formData: formData,
|
||||||
|
mediaType: 'application/x-www-form-urlencoded',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logout
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public logoutApiLogoutGet(): Observable<unknown> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/logout',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Users
|
||||||
|
* @returns UserRead Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getUsersApiUsersGet(): Observable<Array<UserRead>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/users',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Roles
|
||||||
|
* @returns RoleRead Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getRolesApiRolesGet(): Observable<Array<RoleRead>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/roles',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Acls
|
||||||
|
* New: ACLs returned as UserRoleLink
|
||||||
|
* @returns UserRoleLink Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getAclsApiAclsGet(): Observable<Array<UserRoleLink>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/acls',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Categories
|
||||||
|
* @returns CategoryRead Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getCategoriesApiCategoriesGet(): Observable<Array<CategoryRead>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/categories',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Categories P
|
||||||
|
* @returns CategoryRead Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getCategoriesPApiCategoriesPandasGet(): Observable<Array<CategoryRead>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/categories_pandas',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List Data Providers
|
||||||
|
* Return a list of data providers, for use with the api (graphs, etc)
|
||||||
|
* :return:
|
||||||
|
* @returns DataProvider Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public listDataProvidersApiDataProvidersGet(): Observable<Array<DataProvider>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/data-providers',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Model List
|
||||||
|
* Json REST store API compatible with Flask Potion and Angular
|
||||||
|
* Get the list of items (used for making the list of items in measures)
|
||||||
|
* Filter only items with at least one measure
|
||||||
|
* @returns MeasuresItem Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getModelListApiDataProviderStoreGet(data: TDataGetModelListApiDataProviderStoreGet): Observable<Array<MeasuresItem>> {
|
||||||
|
const {
|
||||||
|
store,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/data-provider/{store}',
|
||||||
|
path: {
|
||||||
|
store
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Model Values
|
||||||
|
* Get values
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getModelValuesApiStoreNameValuesValueGet(data: TDataGetModelValuesApiStoreNameValuesValueGet): Observable<unknown> {
|
||||||
|
const {
|
||||||
|
resample,
|
||||||
|
storeName,
|
||||||
|
value,
|
||||||
|
where,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/{store_name}/values/{value}',
|
||||||
|
path: {
|
||||||
|
store_name: storeName, value
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
where, resample
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Stores
|
||||||
|
* @returns Store Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getStoresApiStoresGet(): Observable<Array<Store>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/stores',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Projects
|
||||||
|
* @returns Project Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getProjectsApiProjectsGet(): Observable<Array<Project>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/projects',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Survey Meta
|
||||||
|
* @returns SurveyMeta Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getSurveyMetaApiSurveyMetaGet(): Observable<SurveyMeta> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/survey_meta',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Feature Info
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getFeatureInfoApiFeatureInfoStoreIdGet(data: TDataGetFeatureInfoApiFeatureInfoStoreIdGet): Observable<FeatureInfo | null> {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
store,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/feature-info/{store}/{id}',
|
||||||
|
path: {
|
||||||
|
store, id
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Model Info
|
||||||
|
* @returns ModelInfo Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getModelInfoApiModelInfoStoreGet(data: TDataGetModelInfoApiModelInfoStoreGet): Observable<ModelInfo> {
|
||||||
|
const {
|
||||||
|
store,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/model-info/{store}',
|
||||||
|
path: {
|
||||||
|
store
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Plot Params
|
||||||
|
* @returns PlotParams Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getPlotParamsApiPlotParamsStoreGet(data: TDataGetPlotParamsApiPlotParamsStoreGet): Observable<PlotParams> {
|
||||||
|
const {
|
||||||
|
id,
|
||||||
|
store,
|
||||||
|
value,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/plot-params/{store}',
|
||||||
|
path: {
|
||||||
|
store
|
||||||
|
},
|
||||||
|
query: {
|
||||||
|
id, value
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Actions
|
||||||
|
* @returns ActionsStore Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getActionsApiActionsGet(): Observable<Array<ActionsStore>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/actions',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute Tag Action
|
||||||
|
* @returns ActionsResults Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public executeTagActionApiExecTagActionsPost(data: TDataExecuteTagActionApiExecTagActionsPost): Observable<ActionsResults> {
|
||||||
|
const {
|
||||||
|
requestBody,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'POST',
|
||||||
|
url: '/api/execTagActions',
|
||||||
|
body: requestBody,
|
||||||
|
mediaType: 'application/json',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TDataGetGeojsonApiGjStoreNameGet = {
|
||||||
|
ifNoneMatch?: string | null
|
||||||
|
preserveTopology?: boolean | null
|
||||||
|
simplify?: number | null
|
||||||
|
storeName: unknown
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class GeoapiService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Geojson
|
||||||
|
* Some REST stores coded manually (route prefixed with "gj": geojson).
|
||||||
|
* :param store_name: name of the model
|
||||||
|
* :return: json
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getGeojsonApiGjStoreNameGet(data: TDataGetGeojsonApiGjStoreNameGet): Observable<unknown> {
|
||||||
|
const {
|
||||||
|
ifNoneMatch,
|
||||||
|
preserveTopology,
|
||||||
|
simplify,
|
||||||
|
storeName,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/gj/{store_name}',
|
||||||
|
path: {
|
||||||
|
store_name: storeName
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
'If-None-Match': ifNoneMatch, simplify, preserveTopology
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TDataGetBasketApiAdminBasketNameGet = {
|
||||||
|
name: string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class AdminService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Baskets
|
||||||
|
* @returns BasketNameOnly Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getBasketsApiAdminBasketGet(): Observable<Array<BasketNameOnly>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/admin/basket',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Basket
|
||||||
|
* @returns AdminBasket Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getBasketApiAdminBasketNameGet(data: TDataGetBasketApiAdminBasketNameGet): Observable<AdminBasket> {
|
||||||
|
const {
|
||||||
|
name,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/admin/basket/{name}',
|
||||||
|
path: {
|
||||||
|
name
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TDataGetDashboardPageApiDashboardPageGroupNameGet = {
|
||||||
|
group: string
|
||||||
|
name: string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class DashboardService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Groups
|
||||||
|
* @returns DashboardGroup Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getGroupsApiDashboardGroupsGet(): Observable<Array<DashboardGroup>> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/dashboard/groups',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Home
|
||||||
|
* @returns DashboardHome Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getHomeApiDashboardHomeGet(): Observable<DashboardHome> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/dashboard/home',
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Dashboard Page
|
||||||
|
* @returns Dashboard Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getDashboardPageApiDashboardPageGroupNameGet(data: TDataGetDashboardPageApiDashboardPageGroupNameGet): Observable<Dashboard> {
|
||||||
|
const {
|
||||||
|
group,
|
||||||
|
name,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/dashboard/page/{group}/{name}',
|
||||||
|
path: {
|
||||||
|
group, name
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TDataGetBaseStyleApiMapBaseStyleNameGet = {
|
||||||
|
name: string
|
||||||
|
|
||||||
|
}
|
||||||
|
export type TDataGetLayerStyleApiMapLayerStyleStoreGet = {
|
||||||
|
store: string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class MapService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Init Data
|
||||||
|
* @returns MapInitData Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getInitDataApiMapInitDataGet(): Observable<MapInitData> {
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/map/init-data',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Base Style
|
||||||
|
* @returns BaseStyle Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getBaseStyleApiMapBaseStyleNameGet(data: TDataGetBaseStyleApiMapBaseStyleNameGet): Observable<BaseStyle> {
|
||||||
|
const {
|
||||||
|
name,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/map/base_style/{name}',
|
||||||
|
path: {
|
||||||
|
name
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Layer Style
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public getLayerStyleApiMapLayerStyleStoreGet(data: TDataGetLayerStyleApiMapLayerStyleStoreGet): Observable<MaplibreStyle | null> {
|
||||||
|
const {
|
||||||
|
store,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/map/layer_style/{store}',
|
||||||
|
path: {
|
||||||
|
store
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export type TDataDownloadCsvApiDownloadCsvStoreModelIdValueResampleGet = {
|
||||||
|
modelId: number
|
||||||
|
resample: string
|
||||||
|
store: string
|
||||||
|
value: string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root',
|
||||||
|
})
|
||||||
|
export class DownloadService {
|
||||||
|
|
||||||
|
constructor(public readonly http: HttpClient) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Download Csv
|
||||||
|
* @returns unknown Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public downloadCsvApiDownloadCsvStoreModelIdValueResampleGet(data: TDataDownloadCsvApiDownloadCsvStoreModelIdValueResampleGet): Observable<unknown> {
|
||||||
|
const {
|
||||||
|
modelId,
|
||||||
|
resample,
|
||||||
|
store,
|
||||||
|
value,
|
||||||
|
} = data;
|
||||||
|
return __request(OpenAPI, this.http, {
|
||||||
|
method: 'GET',
|
||||||
|
url: '/api/download/csv/{store}/{model_id}/{value}/{resample}',
|
||||||
|
path: {
|
||||||
|
store, model_id: modelId, value, resample
|
||||||
|
},
|
||||||
|
errors: {
|
||||||
|
404: `Not found`,
|
||||||
|
422: `Validation Error`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,52 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { AdminBasket } from '../models/AdminBasket';
|
|
||||||
import type { BasketNameOnly } from '../models/BasketNameOnly';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class AdminService {
|
|
||||||
constructor(public readonly http: HttpClient) {}
|
|
||||||
/**
|
|
||||||
* Get Baskets
|
|
||||||
* @returns BasketNameOnly Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getBasketsApiAdminBasketGet(): Observable<Array<BasketNameOnly>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/admin/basket',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Basket
|
|
||||||
* @param name
|
|
||||||
* @returns AdminBasket Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getBasketApiAdminBasketNameGet(
|
|
||||||
name: string,
|
|
||||||
): Observable<AdminBasket> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/admin/basket/{name}',
|
|
||||||
path: {
|
|
||||||
'name': name,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,375 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { ActionsResults } from '../models/ActionsResults';
|
|
||||||
import type { ActionsStore } from '../models/ActionsStore';
|
|
||||||
import type { Body_execute_tag_action_api_execTagActions_post } from '../models/Body_execute_tag_action_api_execTagActions_post';
|
|
||||||
import type { Body_login_for_access_token_api_token_post } from '../models/Body_login_for_access_token_api_token_post';
|
|
||||||
import type { BootstrapData } from '../models/BootstrapData';
|
|
||||||
import type { CategoryRead } from '../models/CategoryRead';
|
|
||||||
import type { DataProvider } from '../models/DataProvider';
|
|
||||||
import type { FeatureInfo } from '../models/FeatureInfo';
|
|
||||||
import type { MeasuresItem } from '../models/MeasuresItem';
|
|
||||||
import type { ModelInfo } from '../models/ModelInfo';
|
|
||||||
import type { PlotParams } from '../models/PlotParams';
|
|
||||||
import type { Project } from '../models/Project';
|
|
||||||
import type { RoleRead } from '../models/RoleRead';
|
|
||||||
import type { Store } from '../models/Store';
|
|
||||||
import type { SurveyMeta } from '../models/SurveyMeta';
|
|
||||||
import type { Token } from '../models/Token';
|
|
||||||
import type { UserRead } from '../models/UserRead';
|
|
||||||
import type { UserRoleLink } from '../models/UserRoleLink';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class ApiService {
|
|
||||||
constructor(public readonly http: HttpClient) {}
|
|
||||||
/**
|
|
||||||
* Bootstrap
|
|
||||||
* @returns BootstrapData Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public bootstrapApiBootstrapGet(): Observable<BootstrapData> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/bootstrap',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Login For Access Token
|
|
||||||
* @param formData
|
|
||||||
* @returns Token Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public loginForAccessTokenApiTokenPost(
|
|
||||||
formData: Body_login_for_access_token_api_token_post,
|
|
||||||
): Observable<Token> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/token',
|
|
||||||
formData: formData,
|
|
||||||
mediaType: 'application/x-www-form-urlencoded',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Logout
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public logoutApiLogoutGet(): Observable<any> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/logout',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Users
|
|
||||||
* @returns UserRead Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getUsersApiUsersGet(): Observable<Array<UserRead>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/users',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Roles
|
|
||||||
* @returns RoleRead Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getRolesApiRolesGet(): Observable<Array<RoleRead>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/roles',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Acls
|
|
||||||
* New: ACLs returned as UserRoleLink
|
|
||||||
* @returns UserRoleLink Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getAclsApiAclsGet(): Observable<Array<UserRoleLink>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/acls',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Categories
|
|
||||||
* @returns CategoryRead Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getCategoriesApiCategoriesGet(): Observable<Array<CategoryRead>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/categories',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Categories P
|
|
||||||
* @returns CategoryRead Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getCategoriesPApiCategoriesPandasGet(): Observable<Array<CategoryRead>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/categories_pandas',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* List Data Providers
|
|
||||||
* Return a list of data providers, for use with the api (graphs, etc)
|
|
||||||
* :return:
|
|
||||||
* @returns DataProvider Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public listDataProvidersApiDataProvidersGet(): Observable<Array<DataProvider>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/data-providers',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Model List
|
|
||||||
* Json REST store API compatible with Flask Potion and Angular
|
|
||||||
* Get the list of items (used for making the list of items in measures)
|
|
||||||
* Filter only items with at least one measure
|
|
||||||
* @param store
|
|
||||||
* @returns MeasuresItem Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getModelListApiDataProviderStoreGet(
|
|
||||||
store: string,
|
|
||||||
): Observable<Array<MeasuresItem>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/data-provider/{store}',
|
|
||||||
path: {
|
|
||||||
'store': store,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Model Values
|
|
||||||
* Get values
|
|
||||||
* @param storeName
|
|
||||||
* @param value
|
|
||||||
* @param where
|
|
||||||
* @param resample
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getModelValuesApiStoreNameValuesValueGet(
|
|
||||||
storeName: string,
|
|
||||||
value: string,
|
|
||||||
where: string,
|
|
||||||
resample?: (string | null),
|
|
||||||
): Observable<any> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/{store_name}/values/{value}',
|
|
||||||
path: {
|
|
||||||
'store_name': storeName,
|
|
||||||
'value': value,
|
|
||||||
},
|
|
||||||
query: {
|
|
||||||
'where': where,
|
|
||||||
'resample': resample,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Stores
|
|
||||||
* @returns Store Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getStoresApiStoresGet(): Observable<Array<Store>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/stores',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Projects
|
|
||||||
* @returns Project Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getProjectsApiProjectsGet(): Observable<Array<Project>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/projects',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Survey Meta
|
|
||||||
* @returns SurveyMeta Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getSurveyMetaApiSurveyMetaGet(): Observable<SurveyMeta> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/survey_meta',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Feature Info
|
|
||||||
* @param store
|
|
||||||
* @param id
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getFeatureInfoApiFeatureInfoStoreIdGet(
|
|
||||||
store: string,
|
|
||||||
id: string,
|
|
||||||
): Observable<(FeatureInfo | null)> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/feature-info/{store}/{id}',
|
|
||||||
path: {
|
|
||||||
'store': store,
|
|
||||||
'id': id,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Model Info
|
|
||||||
* @param store
|
|
||||||
* @returns ModelInfo Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getModelInfoApiModelInfoStoreGet(
|
|
||||||
store: string,
|
|
||||||
): Observable<ModelInfo> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/model-info/{store}',
|
|
||||||
path: {
|
|
||||||
'store': store,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Plot Params
|
|
||||||
* @param store
|
|
||||||
* @param id
|
|
||||||
* @param value
|
|
||||||
* @returns PlotParams Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getPlotParamsApiPlotParamsStoreGet(
|
|
||||||
store: string,
|
|
||||||
id: string,
|
|
||||||
value: string,
|
|
||||||
): Observable<PlotParams> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/plot-params/{store}',
|
|
||||||
path: {
|
|
||||||
'store': store,
|
|
||||||
},
|
|
||||||
query: {
|
|
||||||
'id': id,
|
|
||||||
'value': value,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Actions
|
|
||||||
* @returns ActionsStore Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getActionsApiActionsGet(): Observable<Array<ActionsStore>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/actions',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Execute Tag Action
|
|
||||||
* @param requestBody
|
|
||||||
* @returns ActionsResults Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public executeTagActionApiExecTagActionsPost(
|
|
||||||
requestBody: Body_execute_tag_action_api_execTagActions_post,
|
|
||||||
): Observable<ActionsResults> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'POST',
|
|
||||||
url: '/api/execTagActions',
|
|
||||||
body: requestBody,
|
|
||||||
mediaType: 'application/json',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { Dashboard } from '../models/Dashboard';
|
|
||||||
import type { DashboardGroup } from '../models/DashboardGroup';
|
|
||||||
import type { DashboardHome } from '../models/DashboardHome';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class DashboardService {
|
|
||||||
constructor(public readonly http: HttpClient) {}
|
|
||||||
/**
|
|
||||||
* Get Groups
|
|
||||||
* @returns DashboardGroup Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getGroupsApiDashboardGroupsGet(): Observable<Array<DashboardGroup>> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/dashboard/groups',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Home
|
|
||||||
* @returns DashboardHome Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getHomeApiDashboardHomeGet(): Observable<DashboardHome> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/dashboard/home',
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Dashboard Page
|
|
||||||
* @param group
|
|
||||||
* @param name
|
|
||||||
* @returns Dashboard Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getDashboardPageApiDashboardPageGroupNameGet(
|
|
||||||
group: string,
|
|
||||||
name: string,
|
|
||||||
): Observable<Dashboard> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/dashboard/page/{group}/{name}',
|
|
||||||
path: {
|
|
||||||
'group': group,
|
|
||||||
'name': name,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class GeoapiService {
|
|
||||||
constructor(public readonly http: HttpClient) {}
|
|
||||||
/**
|
|
||||||
* Get Geojson
|
|
||||||
* Some REST stores coded manually (route prefixed with "gj": geojson).
|
|
||||||
* :param store_name: name of the model
|
|
||||||
* :return: json
|
|
||||||
* @param storeName
|
|
||||||
* @param ifNoneMatch
|
|
||||||
* @param simplify
|
|
||||||
* @param preserveTopology
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getGeojsonApiGjStoreNameGet(
|
|
||||||
storeName: any,
|
|
||||||
ifNoneMatch?: (string | null),
|
|
||||||
simplify?: (number | null),
|
|
||||||
preserveTopology?: (boolean | null),
|
|
||||||
): Observable<any> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/gj/{store_name}',
|
|
||||||
path: {
|
|
||||||
'store_name': storeName,
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
'If-None-Match': ifNoneMatch,
|
|
||||||
'simplify': simplify,
|
|
||||||
'preserveTopology': preserveTopology,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
404: `Not found`,
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
/* generated using openapi-typescript-codegen -- do no edit */
|
|
||||||
/* istanbul ignore file */
|
|
||||||
/* tslint:disable */
|
|
||||||
/* eslint-disable */
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { HttpClient } from '@angular/common/http';
|
|
||||||
import type { Observable } from 'rxjs';
|
|
||||||
import type { BaseStyle } from '../models/BaseStyle';
|
|
||||||
import type { MapInitData } from '../models/MapInitData';
|
|
||||||
import type { MaplibreStyle } from '../models/MaplibreStyle';
|
|
||||||
import { OpenAPI } from '../core/OpenAPI';
|
|
||||||
import { request as __request } from '../core/request';
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class MapService {
|
|
||||||
constructor(public readonly http: HttpClient) {}
|
|
||||||
/**
|
|
||||||
* Get Init Data
|
|
||||||
* @returns MapInitData Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getInitDataApiMapInitDataGet(): Observable<MapInitData> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/map/init-data',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Base Style
|
|
||||||
* @param name
|
|
||||||
* @returns BaseStyle Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getBaseStyleApiMapBaseStyleNameGet(
|
|
||||||
name: string,
|
|
||||||
): Observable<BaseStyle> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/map/base_style/{name}',
|
|
||||||
path: {
|
|
||||||
'name': name,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get Layer Style
|
|
||||||
* @param store
|
|
||||||
* @returns any Successful Response
|
|
||||||
* @throws ApiError
|
|
||||||
*/
|
|
||||||
public getLayerStyleApiMapLayerStyleStoreGet(
|
|
||||||
store: string,
|
|
||||||
): Observable<(MaplibreStyle | null)> {
|
|
||||||
return __request(OpenAPI, this.http, {
|
|
||||||
method: 'GET',
|
|
||||||
url: '/api/map/layer_style/{store}',
|
|
||||||
path: {
|
|
||||||
'store': store,
|
|
||||||
},
|
|
||||||
errors: {
|
|
||||||
422: `Validation Error`,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue