create booking
This commit is contained in:
5
admin/generate.openapi.client.sh
Normal file
5
admin/generate.openapi.client.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "workdir ${pwd}"
|
||||
wget -O ./openapi/api.json localhost:4200/api-json
|
||||
npx ng-openapi -i ./openapi/api.json -o ./src/api
|
||||
1
admin/openapi/api.json
Normal file
1
admin/openapi/api.json
Normal file
File diff suppressed because one or more lines are too long
422
admin/package-lock.json
generated
422
admin/package-lock.json
generated
@@ -40,6 +40,7 @@
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "~2.1.0",
|
||||
"ng-openapi": "^0.2.10",
|
||||
"ng-packagr": "^20.3.0",
|
||||
"typescript": "~5.9.2"
|
||||
}
|
||||
@@ -923,6 +924,30 @@
|
||||
"node": ">=0.1.90"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
|
||||
"integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/trace-mapping": "0.3.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": {
|
||||
"version": "0.3.9",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
|
||||
"integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@jridgewell/resolve-uri": "^3.0.3",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz",
|
||||
@@ -2499,6 +2524,44 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.scandir": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "2.0.5",
|
||||
"run-parallel": "^1.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.stat": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
|
||||
"integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@nodelib/fs.walk": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
|
||||
"integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.scandir": "2.1.5",
|
||||
"fastq": "^1.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@npmcli/agent": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@npmcli/agent/-/agent-3.0.0.tgz",
|
||||
@@ -3879,6 +3942,62 @@
|
||||
"tailwindcss": "4.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@ts-morph/common": {
|
||||
"version": "0.27.0",
|
||||
"resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.27.0.tgz",
|
||||
"integrity": "sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-glob": "^3.3.3",
|
||||
"minimatch": "^10.0.1",
|
||||
"path-browserify": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@ts-morph/common/node_modules/minimatch": {
|
||||
"version": "10.1.1",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
|
||||
"integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/brace-expansion": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz",
|
||||
"integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node12": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz",
|
||||
"integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node14": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz",
|
||||
"integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node16": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz",
|
||||
"integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tufjs/canonical-json": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz",
|
||||
@@ -3963,6 +4082,13 @@
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/swagger-schema-official": {
|
||||
"version": "2.0.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/swagger-schema-official/-/swagger-schema-official-2.0.25.tgz",
|
||||
"integrity": "sha512-T92Xav+Gf/Ik1uPW581nA+JftmjWPgskw/WBf4TJzxRG/SJ+DfNnNE+WuZ4mrXuzflQMqMkm1LSYjzYW7MB1Cg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@vitejs/plugin-basic-ssl": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-2.1.0.tgz",
|
||||
@@ -4007,6 +4133,32 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.15.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
|
||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn-walk": {
|
||||
"version": "8.3.4",
|
||||
"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
|
||||
"integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"acorn": "^8.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "7.1.4",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
|
||||
@@ -4157,6 +4309,20 @@
|
||||
"url": "https://github.com/sponsors/jonschlinkert"
|
||||
}
|
||||
},
|
||||
"node_modules/arg": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
|
||||
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
|
||||
"dev": true,
|
||||
"license": "Python-2.0"
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@@ -4635,6 +4801,13 @@
|
||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/code-block-writer": {
|
||||
"version": "13.0.3",
|
||||
"resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz",
|
||||
"integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
@@ -4848,6 +5021,13 @@
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/create-require": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
|
||||
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
@@ -4994,6 +5174,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/dom-serialize": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz",
|
||||
@@ -5545,6 +5735,23 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
|
||||
"integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
"@nodelib/fs.walk": "^1.2.3",
|
||||
"glob-parent": "^5.1.2",
|
||||
"merge2": "^1.3.0",
|
||||
"micromatch": "^4.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
@@ -5569,6 +5776,16 @@
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
|
||||
"integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fdir": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
@@ -6508,6 +6725,19 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
|
||||
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/jsesc": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
|
||||
@@ -7613,6 +7843,13 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/make-error": {
|
||||
"version": "1.3.6",
|
||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
|
||||
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/make-fetch-happen": {
|
||||
"version": "14.0.3",
|
||||
"resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-14.0.3.tgz",
|
||||
@@ -7669,13 +7906,22 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/merge2": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
@@ -7690,7 +7936,6 @@
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
@@ -8057,6 +8302,44 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/ng-openapi": {
|
||||
"version": "0.2.10",
|
||||
"resolved": "https://registry.npmjs.org/ng-openapi/-/ng-openapi-0.2.10.tgz",
|
||||
"integrity": "sha512-QddaPUVh69Tb6pfBx/2odT3rA6/gBUYpUD0sLr4QaTkvazUGEzytqGcbX3hRkU9eaHuKjbq2yU7c+UOdbWYLjA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/swagger-schema-official": "^2.0.25",
|
||||
"commander": "^14.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"ts-morph": "^26.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"bin": {
|
||||
"ng-openapi": "cli.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0",
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "buymeacoffee",
|
||||
"url": "https://buymeacoffee.com/ngopenapi"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": ">=15",
|
||||
"@angular/core": ">=15"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@angular/common": {
|
||||
"optional": false
|
||||
},
|
||||
"@angular/core": {
|
||||
"optional": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/ng-packagr": {
|
||||
"version": "20.3.2",
|
||||
"resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-20.3.2.tgz",
|
||||
@@ -8718,6 +9001,13 @@
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/path-browserify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
||||
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
@@ -8973,6 +9263,27 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/range-parser": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||
@@ -9095,6 +9406,17 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/reusify": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
|
||||
"integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"iojs": ">=1.0.0",
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rfdc": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
|
||||
@@ -9201,6 +9523,30 @@
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
|
||||
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
||||
@@ -10114,6 +10460,61 @@
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-morph": {
|
||||
"version": "26.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-26.0.0.tgz",
|
||||
"integrity": "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@ts-morph/common": "~0.27.0",
|
||||
"code-block-writer": "^13.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-node": {
|
||||
"version": "10.9.2",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz",
|
||||
"integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@cspotcode/source-map-support": "^0.8.0",
|
||||
"@tsconfig/node10": "^1.0.7",
|
||||
"@tsconfig/node12": "^1.0.7",
|
||||
"@tsconfig/node14": "^1.0.0",
|
||||
"@tsconfig/node16": "^1.0.2",
|
||||
"acorn": "^8.4.1",
|
||||
"acorn-walk": "^8.1.1",
|
||||
"arg": "^4.1.0",
|
||||
"create-require": "^1.1.0",
|
||||
"diff": "^4.0.1",
|
||||
"make-error": "^1.1.1",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"yn": "3.1.1"
|
||||
},
|
||||
"bin": {
|
||||
"ts-node": "dist/bin.js",
|
||||
"ts-node-cwd": "dist/bin-cwd.js",
|
||||
"ts-node-esm": "dist/bin-esm.js",
|
||||
"ts-node-script": "dist/bin-script.js",
|
||||
"ts-node-transpile-only": "dist/bin-transpile.js",
|
||||
"ts-script": "dist/bin-script-deprecated.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@swc/core": ">=1.2.50",
|
||||
"@swc/wasm": ">=1.2.50",
|
||||
"@types/node": "*",
|
||||
"typescript": ">=2.7"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@swc/core": {
|
||||
"optional": true
|
||||
},
|
||||
"@swc/wasm": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
@@ -10305,6 +10706,13 @@
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-compile-cache-lib": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz",
|
||||
"integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
|
||||
@@ -10726,6 +11134,16 @@
|
||||
"node": "^20.19.0 || ^22.12.0 || >=23"
|
||||
}
|
||||
},
|
||||
"node_modules/yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/yoctocolors-cjs": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"start": "ng serve --proxy-config proxy.conf.json",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"generate.openapi.client": "bash ./generate.openapi.client.sh",
|
||||
"test": "ng test"
|
||||
},
|
||||
"prettier": {
|
||||
@@ -54,6 +55,7 @@
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "~2.1.0",
|
||||
"ng-openapi": "^0.2.10",
|
||||
"ng-packagr": "^20.3.0",
|
||||
"typescript": "~5.9.2"
|
||||
}
|
||||
|
||||
16
admin/src/api/index.ts
Normal file
16
admin/src/api/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Entrypoint for the client
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
export * from "./models";
|
||||
export * from "./tokens";
|
||||
export * from "./providers";
|
||||
export * from "./services";
|
||||
export * from "./utils/file-download";
|
||||
export * from "./utils/http-params-builder";
|
||||
export * from "./utils/date-transformer";
|
||||
96
admin/src/api/models/index.ts
Normal file
96
admin/src/api/models/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated TypeScript interfaces from Swagger specification
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpContext, HttpHeaders } from "@angular/common/http";
|
||||
export interface CreateUserDto {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserDto {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface LoginRequestDto {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface CreateEventTypeDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventTypeDto {
|
||||
}
|
||||
|
||||
export interface CreateProductDto {
|
||||
}
|
||||
|
||||
export interface UpdateProductDto {
|
||||
}
|
||||
|
||||
export interface CreateEventDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventDto {
|
||||
}
|
||||
|
||||
export interface CreateUserGroupDto {
|
||||
}
|
||||
|
||||
export interface UpdateUserGroupDto {
|
||||
}
|
||||
|
||||
export interface CreateUserRoleDto {
|
||||
}
|
||||
|
||||
export interface UpdateUserRoleDto {
|
||||
}
|
||||
|
||||
export interface CreateRecurrenceRuleDto {
|
||||
}
|
||||
|
||||
export interface UpdateRecurrenceRuleDto {
|
||||
}
|
||||
|
||||
export interface CreateEventExceptionDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventExceptionDto {
|
||||
}
|
||||
|
||||
export interface CreateExceptionDto {
|
||||
}
|
||||
|
||||
export interface CalendarCreateBookingDto {
|
||||
occurrenceStartTime: Date;
|
||||
userId: number;
|
||||
reservedSeatsCount: number;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
export interface CancelBookingDto {
|
||||
}
|
||||
|
||||
export interface CreateBookingDto {
|
||||
}
|
||||
|
||||
export interface UpdateBookingDto {
|
||||
}
|
||||
|
||||
/** Request Options for Angular HttpClient requests */
|
||||
export interface RequestOptions<TResponseType extends 'arraybuffer' | 'blob' | 'json' | 'text'> {
|
||||
headers?: HttpHeaders;
|
||||
reportProgress?: boolean;
|
||||
responseType?: TResponseType;
|
||||
withCredentials?: boolean;
|
||||
context?: HttpContext;
|
||||
}
|
||||
93
admin/src/api/providers.ts
Normal file
93
admin/src/api/providers.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated provider functions for easy setup
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { EnvironmentProviders, Provider, makeEnvironmentProviders } from "@angular/core";
|
||||
import { HTTP_INTERCEPTORS, HttpInterceptor } from "@angular/common/http";
|
||||
import { BASE_PATH_DEFAULT, HTTP_INTERCEPTORS_DEFAULT } from "./tokens";
|
||||
import { DefaultBaseInterceptor } from "./utils/base-interceptor";
|
||||
import { DateInterceptor } from "./utils/date-transformer";
|
||||
|
||||
/** Configuration options for default client */
|
||||
export interface DefaultConfig {
|
||||
/** Base API URL */
|
||||
basePath: string;
|
||||
/** Enable automatic date transformation (default: true) */
|
||||
enableDateTransform?: boolean;
|
||||
/** Array of HTTP interceptor classes to apply to this client */
|
||||
interceptors?: (new (...args: HttpInterceptor[]) => HttpInterceptor)[];
|
||||
}
|
||||
|
||||
/** Provides configuration for default client */
|
||||
/** */
|
||||
/** @example */
|
||||
/** ```typescript */
|
||||
/** // In your app.config.ts */
|
||||
/** import { provideDefaultClient } from './api/providers'; */
|
||||
/** */
|
||||
/** export const appConfig: ApplicationConfig = { */
|
||||
/** providers: [ */
|
||||
/** provideDefaultClient({ */
|
||||
/** basePath: 'https://api.example.com', */
|
||||
/** interceptors: [AuthInterceptor, LoggingInterceptor] // Classes, not instances */
|
||||
/** }), */
|
||||
/** // other providers... */
|
||||
/** ] */
|
||||
/** }; */
|
||||
/** ``` */
|
||||
export function provideDefaultClient(config: DefaultConfig): EnvironmentProviders {
|
||||
|
||||
const providers: Provider[] = [
|
||||
// Base path token for this client
|
||||
{
|
||||
provide: BASE_PATH_DEFAULT,
|
||||
useValue: config.basePath
|
||||
},
|
||||
// Base interceptor that handles client-specific interceptors
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: DefaultBaseInterceptor,
|
||||
multi: true
|
||||
}
|
||||
];
|
||||
|
||||
// Add client-specific interceptor instances
|
||||
if (config.interceptors && config.interceptors.length > 0) {
|
||||
const interceptorInstances = config.interceptors.map(InterceptorClass => new InterceptorClass());
|
||||
|
||||
// Add date interceptor if enabled (default: true)
|
||||
if (config.enableDateTransform !== false) {
|
||||
interceptorInstances.unshift(new DateInterceptor());
|
||||
}
|
||||
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: interceptorInstances
|
||||
});
|
||||
} else if (config.enableDateTransform !== false) {
|
||||
// Only date interceptor enabled
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: [new DateInterceptor()]
|
||||
});
|
||||
} else {
|
||||
// No interceptors
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: []
|
||||
});
|
||||
}
|
||||
|
||||
return makeEnvironmentProviders(providers);
|
||||
}
|
||||
|
||||
/** @deprecated Use provideDefaultClient instead for better clarity */
|
||||
/** Provides configuration for the default client */
|
||||
export function provideNgOpenapi(config: DefaultConfig): EnvironmentProviders {
|
||||
return provideDefaultClient(config);
|
||||
}
|
||||
43
admin/src/api/services/app.service.ts
Normal file
43
admin/src/api/services/app.service.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for App controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class AppService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
appControllerGetHello(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
appControllerGetHello(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
appControllerGetHello(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
appControllerGetHello(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
}
|
||||
75
admin/src/api/services/auth.service.ts
Normal file
75
admin/src/api/services/auth.service.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Auth controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { LoginRequestDto, RequestOptions } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class AuthService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/login`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, loginRequestDto, requestOptions);
|
||||
}
|
||||
|
||||
authControllerLogout(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerLogout(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerLogout(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerLogout(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/logout`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, null, requestOptions);
|
||||
}
|
||||
|
||||
authControllerRefresh(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerRefresh(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerRefresh(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerRefresh(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/refresh`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, null, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/bookings.service.ts
Normal file
135
admin/src/api/services/bookings.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Bookings controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateBookingDto, UpdateBookingDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class BookingsService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
bookingsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createBookingDto, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateBookingDto, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
155
admin/src/api/services/calendar.service.ts
Normal file
155
admin/src/api/services/calendar.service.ts
Normal file
@@ -0,0 +1,155 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Calendar controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateEventDto, CreateExceptionDto, CalendarCreateBookingDto, CancelBookingDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class CalendarService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
calendarControllerGetCalendarEvents(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerGetCalendarEvents(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerGetCalendarEvents(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerGetCalendarEvents(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventDto, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerGetEventById(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerGetEventById(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerGetEventById(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerGetEventById(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, createEventDto, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerDeleteEvent(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerDeleteEvent(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerDeleteEvent(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerDeleteEvent(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events/${id}/exceptions`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createExceptionDto, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/events/${id}/bookings`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, calendarCreateBookingDto, requestOptions);
|
||||
}
|
||||
|
||||
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/calendar/bookings/${bookingId}/cancel`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, cancelBookingDto, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/eventExceptions.service.ts
Normal file
135
admin/src/api/services/eventExceptions.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for EventExceptions controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateEventExceptionDto, UpdateEventExceptionDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventExceptionsService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
eventExceptionsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventExceptionDto, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateEventExceptionDto, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/eventTypes.service.ts
Normal file
135
admin/src/api/services/eventTypes.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for EventTypes controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateEventTypeDto, UpdateEventTypeDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventTypesService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
eventTypesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventTypeDto, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateEventTypeDto, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/events.service.ts
Normal file
135
admin/src/api/services/events.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Events controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateEventDto, UpdateEventDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventsService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
eventsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventDto, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateEventDto, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
22
admin/src/api/services/index.ts
Normal file
22
admin/src/api/services/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated service exports
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
export { AppService } from "./app.service";
|
||||
export { AuthService } from "./auth.service";
|
||||
export { BookingsService } from "./bookings.service";
|
||||
export { CalendarService } from "./calendar.service";
|
||||
export { EventExceptionsService } from "./eventExceptions.service";
|
||||
export { EventTypesService } from "./eventTypes.service";
|
||||
export { EventsService } from "./events.service";
|
||||
export { PingService } from "./ping.service";
|
||||
export { ProductsService } from "./products.service";
|
||||
export { RecurrenceRulesService } from "./recurrenceRules.service";
|
||||
export { UserService } from "./user.service";
|
||||
export { UserGroupsService } from "./userGroups.service";
|
||||
export { UserRolesService } from "./userRoles.service";
|
||||
59
admin/src/api/services/ping.service.ts
Normal file
59
admin/src/api/services/ping.service.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Ping controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class PingService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
pingControllerPing(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
pingControllerPing(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
pingControllerPing(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
pingControllerPing(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/ping`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
pingControllerPingAuth(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
pingControllerPingAuth(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
pingControllerPingAuth(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
pingControllerPingAuth(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/ping/auth`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/products.service.ts
Normal file
135
admin/src/api/services/products.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Products controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateProductDto, UpdateProductDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class ProductsService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
productsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createProductDto, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateProductDto, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/recurrenceRules.service.ts
Normal file
135
admin/src/api/services/recurrenceRules.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for RecurrenceRules controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateRecurrenceRuleDto, UpdateRecurrenceRuleDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class RecurrenceRulesService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
recurrenceRulesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createRecurrenceRuleDto, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateRecurrenceRuleDto, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/user.service.ts
Normal file
135
admin/src/api/services/user.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for User controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateUserDto, UpdateUserDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
userControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserDto, requestOptions);
|
||||
}
|
||||
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userControllerFindOne(id: string, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerFindOne(id: string, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerFindOne(id: string, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerFindOne(id: string, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserDto, requestOptions);
|
||||
}
|
||||
|
||||
userControllerRemove(id: string, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerRemove(id: string, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerRemove(id: string, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerRemove(id: string, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/userGroups.service.ts
Normal file
135
admin/src/api/services/userGroups.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for UserGroups controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateUserGroupDto, UpdateUserGroupDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserGroupsService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
userGroupsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserGroupDto, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserGroupDto, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/userRoles.service.ts
Normal file
135
admin/src/api/services/userRoles.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for UserRoles controller
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
|
||||
import { HttpParamsBuilder } from "../utils/http-params-builder";
|
||||
import { RequestOptions, CreateUserRoleDto, UpdateUserRoleDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserRolesService {
|
||||
private readonly httpClient: HttpClient = inject(HttpClient);
|
||||
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
|
||||
const context = existingContext || new HttpContext();
|
||||
return context.set(this.clientContextToken, 'default');
|
||||
}
|
||||
|
||||
userRolesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserRoleDto, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserRoleDto, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.delete(url, requestOptions);
|
||||
}
|
||||
}
|
||||
29
admin/src/api/tokens/index.ts
Normal file
29
admin/src/api/tokens/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { InjectionToken } from "@angular/core";
|
||||
import { HttpInterceptor, HttpContextToken } from "@angular/common/http";
|
||||
|
||||
/**
|
||||
* Injection token for the default client base API path
|
||||
*/
|
||||
export const BASE_PATH_DEFAULT = new InjectionToken<string>('BASE_PATH_DEFAULT', {
|
||||
providedIn: 'root',
|
||||
factory: () => '/api', // Default fallback
|
||||
});
|
||||
/**
|
||||
* Injection token for the default client HTTP interceptor instances
|
||||
*/
|
||||
export const HTTP_INTERCEPTORS_DEFAULT = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS_DEFAULT', {
|
||||
providedIn: 'root',
|
||||
factory: () => [], // Default empty array
|
||||
});
|
||||
/**
|
||||
* HttpContext token to identify requests belonging to the default client
|
||||
*/
|
||||
export const CLIENT_CONTEXT_TOKEN_DEFAULT = new HttpContextToken<string>(() => 'default');
|
||||
/**
|
||||
* @deprecated Use BASE_PATH_DEFAULT instead
|
||||
*/
|
||||
export const BASE_PATH = BASE_PATH_DEFAULT;
|
||||
/**
|
||||
* @deprecated Use CLIENT_CONTEXT_TOKEN_DEFAULT instead
|
||||
*/
|
||||
export const CLIENT_CONTEXT_TOKEN = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
40
admin/src/api/utils/base-interceptor.ts
Normal file
40
admin/src/api/utils/base-interceptor.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Base Interceptor for client default
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpContextToken, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { CLIENT_CONTEXT_TOKEN_DEFAULT, HTTP_INTERCEPTORS_DEFAULT } from "../tokens";
|
||||
|
||||
@Injectable()
|
||||
export class DefaultBaseInterceptor implements HttpInterceptor {
|
||||
private readonly httpInterceptors: HttpInterceptor[] = inject(HTTP_INTERCEPTORS_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
// Check if this request belongs to this client using HttpContext
|
||||
if (!req.context.has(this.clientContextToken)) {
|
||||
// This request doesn't belong to this client, pass it through
|
||||
return next.handle(req);
|
||||
}
|
||||
|
||||
// Apply client-specific interceptors in reverse order
|
||||
let handler = next;
|
||||
|
||||
handler = this.httpInterceptors.reduceRight(
|
||||
(next, interceptor) => ({
|
||||
handle: (request: HttpRequest<any>) => interceptor.intercept(request, next)
|
||||
}),
|
||||
handler
|
||||
);
|
||||
|
||||
return handler.handle(req);
|
||||
}
|
||||
}
|
||||
50
admin/src/api/utils/date-transformer.ts
Normal file
50
admin/src/api/utils/date-transformer.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from "@angular/common/http";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { Observable, map } from "rxjs";
|
||||
|
||||
export const ISO_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/;
|
||||
|
||||
export function transformDates(obj: any): any {
|
||||
|
||||
if (obj === null || obj === undefined || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (obj instanceof Date) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(item => transformDates(item));
|
||||
}
|
||||
|
||||
if (typeof obj === 'object') {
|
||||
const transformed: any = {};
|
||||
for (const key of Object.keys(obj)) {
|
||||
const value = obj[key];
|
||||
if (typeof value === 'string' && ISO_DATE_REGEX.test(value)) {
|
||||
transformed[key] = new Date(value);
|
||||
} else {
|
||||
transformed[key] = transformDates(value);
|
||||
}
|
||||
}
|
||||
return transformed;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class DateInterceptor implements HttpInterceptor {
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
return next.handle(req).pipe(
|
||||
map(event => {
|
||||
if (event instanceof HttpResponse && event.body) {
|
||||
return event.clone({ body: transformDates(event.body) });
|
||||
}
|
||||
return event;
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
61
admin/src/api/utils/file-download.ts
Normal file
61
admin/src/api/utils/file-download.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { Observable, tap } from "rxjs";
|
||||
|
||||
export function downloadFile(blob: Blob, filename: string, mimeType?: string): void {
|
||||
|
||||
// Create a temporary URL for the blob
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
|
||||
// Create a temporary anchor element and trigger download
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = filename;
|
||||
|
||||
// Append to body, click, and remove
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
|
||||
// Clean up the URL
|
||||
window.URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
export function downloadFileOperator<T extends Blob>(filename: string | ((blob: T) => string), mimeType?: string): (source: Observable<T>) => Observable<T> {
|
||||
|
||||
return (source: Observable<T>) => {
|
||||
return source.pipe(
|
||||
tap((blob: T) => {
|
||||
const actualFilename = typeof filename === 'function' ? filename(blob) : filename;
|
||||
downloadFile(blob, actualFilename, mimeType);
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function extractFilenameFromContentDisposition(contentDisposition: string | null, fallbackFilename: string = "download"): string {
|
||||
|
||||
if (!contentDisposition) {
|
||||
return fallbackFilename;
|
||||
}
|
||||
|
||||
// Try to extract filename from Content-Disposition header
|
||||
// Supports both "filename=" and "filename*=" formats
|
||||
const filenameMatch = contentDisposition.match(/filename\*?=['"]?([^'"\n;]+)['"]?/i);
|
||||
|
||||
if (filenameMatch && filenameMatch[1]) {
|
||||
// Decode if it's RFC 5987 encoded (filename*=UTF-8''...)
|
||||
const filename = filenameMatch[1];
|
||||
if (filename.includes("''")) {
|
||||
const parts = filename.split("''");
|
||||
if (parts.length === 2) {
|
||||
try {
|
||||
return decodeURIComponent(parts[1]);
|
||||
} catch {
|
||||
return parts[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
return fallbackFilename;
|
||||
}
|
||||
65
admin/src/api/utils/http-params-builder.ts
Normal file
65
admin/src/api/utils/http-params-builder.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { HttpParams } from "@angular/common/http";
|
||||
|
||||
export class HttpParamsBuilder {
|
||||
/** Adds a value to HttpParams. Delegates to recursive handler for objects/arrays. */
|
||||
public static addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
||||
const isDate = value instanceof Date;
|
||||
const isArray = Array.isArray(value);
|
||||
const isObject = typeof value === "object" && !isDate && !isArray;
|
||||
|
||||
if (isObject) {
|
||||
return this.addToHttpParamsRecursive(httpParams, value);
|
||||
}
|
||||
|
||||
return this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
|
||||
private static addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
||||
if (value == null) {
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return this.handleArray(httpParams, value, key);
|
||||
}
|
||||
|
||||
if (value instanceof Date) {
|
||||
return this.handleDate(httpParams, value, key);
|
||||
}
|
||||
|
||||
if (typeof value === "object") {
|
||||
return this.handleObject(httpParams, value, key);
|
||||
}
|
||||
|
||||
return this.handlePrimitive(httpParams, value, key);
|
||||
}
|
||||
|
||||
private static handleArray(httpParams: HttpParams, arr: unknown[], key?: string): HttpParams {
|
||||
arr.forEach((element) => {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, element, key);
|
||||
});
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
private static handleDate(httpParams: HttpParams, date: Date, key?: string): HttpParams {
|
||||
if (!key) {
|
||||
throw new Error("key may not be null if value is Date");
|
||||
}
|
||||
return httpParams.append(key, date.toISOString().substring(0, 10));
|
||||
}
|
||||
|
||||
private static handleObject(httpParams: HttpParams, obj: Record<string, any>, key?: string): HttpParams {
|
||||
Object.keys(obj).forEach((prop) => {
|
||||
const nestedKey = key ? `${key}.${prop}` : prop;
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, obj[prop], nestedKey);
|
||||
});
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
private static handlePrimitive(httpParams: HttpParams, value: string | number | boolean, key?: string): HttpParams {
|
||||
if (!key) {
|
||||
throw new Error("key may not be null if value is primitive");
|
||||
}
|
||||
return httpParams.append(key, value);
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import { routes } from './app.routes';
|
||||
import { JwtInterceptor } from './auth/jwt.interceptor';
|
||||
import { AuthService } from './auth/auth.service';
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { provideNgOpenapi } from '../api';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
@@ -16,6 +18,9 @@ export const appConfig: ApplicationConfig = {
|
||||
provideZonelessChangeDetection(),
|
||||
provideRouter(routes),
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideNgOpenapi({
|
||||
basePath: environment.apiBaseUrl
|
||||
}),
|
||||
AuthService,
|
||||
AuthGuard,
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Component, inject, input } from '@angular/core';
|
||||
import { CalendarEventDto } from '../../../models/events-in-range-dto.model';
|
||||
import { EventBusService } from '../../../../../services/event-bus.service';
|
||||
import { CalendarService, CalendarCreateBookingDto } from '../../../../../../api';
|
||||
import { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { EventType } from '../../../../../../types';
|
||||
import {
|
||||
SingleEventDashboardEventDetailsView
|
||||
} from '../single-event-dashboard-event-details-view/single-event-dashboard-event-details-view';
|
||||
import { CalendarService } from '../../../services/calendar.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-single-event-booking-create',
|
||||
@@ -22,7 +22,7 @@ export class SingleEventBookingCreate {
|
||||
calendarService = inject(CalendarService);
|
||||
eventBus = inject(EventBusService);
|
||||
fb = inject(FormBuilder);
|
||||
event = input<CalendarEventDto>();
|
||||
event = input.required<CalendarEventDto>();
|
||||
|
||||
form: FormGroup;
|
||||
constructor() {
|
||||
@@ -33,8 +33,20 @@ export class SingleEventBookingCreate {
|
||||
}
|
||||
|
||||
protected onSubmit() {
|
||||
// this.calendarService.b
|
||||
this.eventBus.emit(EventType.CALENDAR_VIEW_EVENT_SAVED,'');
|
||||
const formValue = this.form.value;
|
||||
console.log(formValue);
|
||||
return this.calendarService.calendarControllerCreateBooking(this.event().id!,{
|
||||
notes: formValue.notes,
|
||||
reservedSeatsCount: formValue.slotCount,
|
||||
occurrenceStartTime: new Date(this.event()?.startTime!)
|
||||
}as CalendarCreateBookingDto)
|
||||
.subscribe(
|
||||
{
|
||||
next: _ => {
|
||||
this.eventBus.emit(EventType.CALENDAR_VIEW_EVENT_SAVED,'');
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { AppConfig } from '../types';
|
||||
|
||||
export const environment: AppConfig = {
|
||||
apiUrl: 'http://localhost:4200/api'
|
||||
apiUrl: 'http://localhost:4200/api',
|
||||
apiBaseUrl: 'http://localhost:4200'
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { AppConfig } from '../types';
|
||||
|
||||
export const environment: AppConfig = {
|
||||
apiUrl: 'http://localhost:4200/api'
|
||||
apiUrl: 'http://localhost:4200/api',
|
||||
apiBaseUrl: 'http://localhost:4200'
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { AppConfig } from '../types';
|
||||
|
||||
export const environment: AppConfig = {
|
||||
apiUrl: 'http://localhost:4200/api'
|
||||
apiUrl: 'http://localhost:4200/api',
|
||||
apiBaseUrl: 'http://localhost:4200'
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
export interface AppConfig{
|
||||
apiUrl: string;
|
||||
apiBaseUrl: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,11 @@ export class CalendarController {
|
||||
@Body(new ValidationPipe()) createBookingDto: CalendarCreateBookingDto,
|
||||
) {
|
||||
console.info('user user', user);
|
||||
return this.calendarService.createBooking(eventId, createBookingDto);
|
||||
return this.calendarService.createBooking(
|
||||
user.user!.userId,
|
||||
eventId,
|
||||
createBookingDto,
|
||||
);
|
||||
}
|
||||
|
||||
// Cancel a specific booking (soft delete)
|
||||
|
||||
@@ -519,12 +519,18 @@ export class CalendarService {
|
||||
}
|
||||
|
||||
async createBooking(
|
||||
userId: number,
|
||||
eventId: number,
|
||||
createBookingDto: CalendarCreateBookingDto,
|
||||
): Promise<Booking> {
|
||||
const { occurrenceStartTime, userId } = createBookingDto;
|
||||
const { occurrenceStartTime } = createBookingDto;
|
||||
|
||||
const event = await this.eventRepository.findOneBy({ id: eventId });
|
||||
const event = await this.eventRepository.findOne({
|
||||
where: {
|
||||
id: eventId,
|
||||
},
|
||||
relations: ['bookings', 'exceptions', 'recurrenceRule'],
|
||||
});
|
||||
if (!event)
|
||||
throw new NotFoundException(`Event with ID ${eventId} not found.`);
|
||||
|
||||
@@ -585,8 +591,14 @@ export class CalendarService {
|
||||
}
|
||||
|
||||
private isValidOccurrence(event: Event, occurrenceTime: Date): boolean {
|
||||
console.info(
|
||||
'[CalendarService] isValidOccurrence called with event:',
|
||||
event,
|
||||
'occurrenceTime',
|
||||
occurrenceTime,
|
||||
);
|
||||
// Check if the occurrence has been explicitly cancelled
|
||||
const exception = event.exceptions.find(
|
||||
const exception = (event?.exceptions ?? []).find(
|
||||
(ex) => ex.originalStartTime.getTime() === occurrenceTime.getTime(),
|
||||
);
|
||||
if (exception && exception.isCancelled) {
|
||||
|
||||
@@ -20,7 +20,7 @@ export class CalendarCreateBookingDto {
|
||||
@IsNotEmpty()
|
||||
@IsInt()
|
||||
@ApiProperty()
|
||||
userId: number; // Replaces userName/userEmail
|
||||
userId?: number; // Replaces userName/userEmail
|
||||
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
|
||||
Reference in New Issue
Block a user