Compare commits
23 Commits
05ee858f04
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d26572073 | |||
| 0b69eee16b | |||
| d43b6b746d | |||
| dccc2a5e4d | |||
| 673269e2b8 | |||
| 6ffcece3fa | |||
| 1c663913a7 | |||
| e386897dc9 | |||
| 79cb219a38 | |||
| aec268fbce | |||
| fd8d33642e | |||
| 127023fd7f | |||
| 96dfc905f9 | |||
| baee754ee8 | |||
| 7ceafb61f8 | |||
| 95de4cca9e | |||
| a5c8a83281 | |||
| 3e58f8026f | |||
| d7e3a93c04 | |||
| cc87ceeacd | |||
| 18a8ecb351 | |||
| dcb715703e | |||
| e5044c8940 |
@@ -115,6 +115,8 @@
|
|||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"proxyConfig": "proxy.conf.json"},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"buildTarget": "Knots-Front:build:production"
|
"buildTarget": "Knots-Front:build:production"
|
||||||
|
|||||||
Generated
+31
-26
@@ -247,6 +247,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.23.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.23.tgz",
|
||||||
"integrity": "sha512-RazHPQkUEsNU/OZ75w9UeHxGFMthRiuAW2B/uA7eXExBj/1meHrrBfoCA56ujW2GUxVjRtSrMjylKh4R4meiYA==",
|
"integrity": "sha512-RazHPQkUEsNU/OZ75w9UeHxGFMthRiuAW2B/uA7eXExBj/1meHrrBfoCA56ujW2GUxVjRtSrMjylKh4R4meiYA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ajv": "8.18.0",
|
"ajv": "8.18.0",
|
||||||
"ajv-formats": "3.0.1",
|
"ajv-formats": "3.0.1",
|
||||||
@@ -283,6 +284,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.2.23.tgz",
|
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.2.23.tgz",
|
||||||
"integrity": "sha512-Jzs7YM4X6azmHU7Mw5tQSPMuvaqYS8SLnZOJbtiXCy1JyuW9bm/WBBecNHMiuZ8LHXKhvQ6AVX1tKrzF6uiDmw==",
|
"integrity": "sha512-Jzs7YM4X6azmHU7Mw5tQSPMuvaqYS8SLnZOJbtiXCy1JyuW9bm/WBBecNHMiuZ8LHXKhvQ6AVX1tKrzF6uiDmw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "19.2.23",
|
"@angular-devkit/core": "19.2.23",
|
||||||
"jsonc-parser": "3.3.1",
|
"jsonc-parser": "3.3.1",
|
||||||
@@ -430,6 +432,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/common/-/common-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/common/-/common-19.2.20.tgz",
|
||||||
"integrity": "sha512-1M3W3FjUUbVKXDMs+yQpBhnkD/pCe0Jn79rPE5W+EGWWxFoLSyGX+fhnRO5m4c9k66p3nvYrikWQ0ZzMv3M5tw==",
|
"integrity": "sha512-1M3W3FjUUbVKXDMs+yQpBhnkD/pCe0Jn79rPE5W+EGWWxFoLSyGX+fhnRO5m4c9k66p3nvYrikWQ0ZzMv3M5tw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -446,6 +449,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-19.2.20.tgz",
|
||||||
"integrity": "sha512-LvjE8W58EACgTFaAoqmNe7FRsbvoQ0GvCB/rmm6AEMWx/0W/JBvWkQTrOQlwpoeYOHcMZRGdmPcZoUDwU3JySQ==",
|
"integrity": "sha512-LvjE8W58EACgTFaAoqmNe7FRsbvoQ0GvCB/rmm6AEMWx/0W/JBvWkQTrOQlwpoeYOHcMZRGdmPcZoUDwU3JySQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -459,6 +463,7 @@
|
|||||||
"integrity": "sha512-tYYQk8AUz2sEkVl0a3uebduDUXPuKiGEKl2Jryrbn0xh9i1EsxoCjt1VvHnGnksGp3mz4DQihFVEnte0KeVQ5g==",
|
"integrity": "sha512-tYYQk8AUz2sEkVl0a3uebduDUXPuKiGEKl2Jryrbn0xh9i1EsxoCjt1VvHnGnksGp3mz4DQihFVEnte0KeVQ5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "7.26.9",
|
"@babel/core": "7.26.9",
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||||
@@ -535,6 +540,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/core/-/core-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/core/-/core-19.2.20.tgz",
|
||||||
"integrity": "sha512-pxzQh8ouqfE57lJlXjIzXFuRETwkfMVwS+NFCfv2yh01Qtx+vymO8ZClcJMgLPfBYinhBYX+hrRYVSa1nzlkRQ==",
|
"integrity": "sha512-pxzQh8ouqfE57lJlXjIzXFuRETwkfMVwS+NFCfv2yh01Qtx+vymO8ZClcJMgLPfBYinhBYX+hrRYVSa1nzlkRQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -551,6 +557,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-19.2.20.tgz",
|
||||||
"integrity": "sha512-agi7InbMzop1jrud6L7SlNwnZk3iNolORcFIwBQMvKxLkcJ+ttbSYuM0KAw56IundWHf4dL9GP4cSygm4kUeFA==",
|
"integrity": "sha512-agi7InbMzop1jrud6L7SlNwnZk3iNolORcFIwBQMvKxLkcJ+ttbSYuM0KAw56IundWHf4dL9GP4cSygm4kUeFA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -569,6 +576,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-19.2.20.tgz",
|
||||||
"integrity": "sha512-O9ZoQKILPC1T2c64OASS75XlOLBxY81m5AAgsBKhwiFWq+V28RsO0cnwpi1YSh/z4ryH8Fe7IUFz8jGrsJi3hQ==",
|
"integrity": "sha512-O9ZoQKILPC1T2c64OASS75XlOLBxY81m5AAgsBKhwiFWq+V28RsO0cnwpi1YSh/z4ryH8Fe7IUFz8jGrsJi3hQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -609,6 +617,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@angular/router/-/router-19.2.20.tgz",
|
"resolved": "https://registry.npmjs.org/@angular/router/-/router-19.2.20.tgz",
|
||||||
"integrity": "sha512-y0fyKycxJHr82kxXKE50Vac5hPn5Kx3gw9CfqyEuwJ9VQzEixDljU+chrQK4Wods14jJn9Tt2ncNPGH1rLya3Q==",
|
"integrity": "sha512-y0fyKycxJHr82kxXKE50Vac5hPn5Kx3gw9CfqyEuwJ9VQzEixDljU+chrQK4Wods14jJn9Tt2ncNPGH1rLya3Q==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
},
|
},
|
||||||
@@ -653,6 +662,7 @@
|
|||||||
"integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==",
|
"integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ampproject/remapping": "^2.2.0",
|
"@ampproject/remapping": "^2.2.0",
|
||||||
"@babel/code-frame": "^7.26.2",
|
"@babel/code-frame": "^7.26.2",
|
||||||
@@ -2509,6 +2519,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.3.1.tgz",
|
||||||
"integrity": "sha512-UF8ItlHguU1Z6GXfPTeT2gakf+ctNI8pAS1kwSBQlsJMlfD4OPoto/SmKnOxKCQvnF4WRcdWeg6C0zREUNaAQg==",
|
"integrity": "sha512-UF8ItlHguU1Z6GXfPTeT2gakf+ctNI8pAS1kwSBQlsJMlfD4OPoto/SmKnOxKCQvnF4WRcdWeg6C0zREUNaAQg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
@@ -3202,6 +3213,7 @@
|
|||||||
"integrity": "sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==",
|
"integrity": "sha512-G1ytyOoHh5BphmEBxSwALin3n1KGNYB6yImbICcRQdzXfOGbuJ9Jske/Of5Sebk339NSGGNfUshnzK8YWkTPsQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@inquirer/checkbox": "^4.1.2",
|
"@inquirer/checkbox": "^4.1.2",
|
||||||
"@inquirer/confirm": "^5.1.6",
|
"@inquirer/confirm": "^5.1.6",
|
||||||
@@ -4953,6 +4965,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz",
|
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz",
|
||||||
"integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==",
|
"integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"file-type": "21.3.2",
|
"file-type": "21.3.2",
|
||||||
"iterare": "1.2.1",
|
"iterare": "1.2.1",
|
||||||
@@ -7001,6 +7014,7 @@
|
|||||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"acorn": "bin/acorn"
|
"acorn": "bin/acorn"
|
||||||
},
|
},
|
||||||
@@ -7064,6 +7078,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz",
|
||||||
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
"integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"fast-uri": "^3.0.1",
|
"fast-uri": "^3.0.1",
|
||||||
@@ -7294,6 +7309,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
|
||||||
"integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
|
"integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.16.0",
|
"follow-redirects": "^1.16.0",
|
||||||
"form-data": "^4.0.5",
|
"form-data": "^4.0.5",
|
||||||
@@ -7619,6 +7635,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.10.12",
|
"baseline-browser-mapping": "^2.10.12",
|
||||||
"caniuse-lite": "^1.0.30001782",
|
"caniuse-lite": "^1.0.30001782",
|
||||||
@@ -8802,29 +8819,6 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/encoding": {
|
|
||||||
"version": "0.1.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
|
|
||||||
"integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"iconv-lite": "^0.6.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/encoding/node_modules/iconv-lite": {
|
|
||||||
"version": "0.6.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
|
||||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"optional": true,
|
|
||||||
"dependencies": {
|
|
||||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/enhanced-resolve": {
|
"node_modules/enhanced-resolve": {
|
||||||
"version": "5.20.1",
|
"version": "5.20.1",
|
||||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz",
|
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.20.1.tgz",
|
||||||
@@ -10569,6 +10563,7 @@
|
|||||||
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
"integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"jiti": "bin/jiti.js"
|
"jiti": "bin/jiti.js"
|
||||||
}
|
}
|
||||||
@@ -10710,6 +10705,7 @@
|
|||||||
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
|
"integrity": "sha512-tkuLHQlvWUTeQ3doAqnHbNn8T6WX1KA8yvbKG9x4VtKtIjHsVKQZCH11zRgAfbDAXC2UNIg/K9BYAAcEzUIrNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"copy-anything": "^2.0.1",
|
"copy-anything": "^2.0.1",
|
||||||
"parse-node-version": "^1.0.1",
|
"parse-node-version": "^1.0.1",
|
||||||
@@ -12551,6 +12547,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanoid": "^3.3.8",
|
"nanoid": "^3.3.8",
|
||||||
"picocolors": "^1.1.1",
|
"picocolors": "^1.1.1",
|
||||||
@@ -12958,7 +12955,8 @@
|
|||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz",
|
||||||
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
|
"integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==",
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0",
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/regenerate": {
|
"node_modules/regenerate": {
|
||||||
"version": "1.4.2",
|
"version": "1.4.2",
|
||||||
@@ -13374,6 +13372,7 @@
|
|||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz",
|
||||||
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
"integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
@@ -14432,6 +14431,7 @@
|
|||||||
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
|
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/source-map": "^0.3.3",
|
"@jridgewell/source-map": "^0.3.3",
|
||||||
"acorn": "^8.8.2",
|
"acorn": "^8.8.2",
|
||||||
@@ -14631,7 +14631,8 @@
|
|||||||
"version": "2.8.1",
|
"version": "2.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
"license": "0BSD"
|
"license": "0BSD",
|
||||||
|
"peer": true
|
||||||
},
|
},
|
||||||
"node_modules/tuf-js": {
|
"node_modules/tuf-js": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
@@ -14687,6 +14688,7 @@
|
|||||||
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
"integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
@@ -15092,6 +15094,7 @@
|
|||||||
"integrity": "sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw==",
|
"integrity": "sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/eslint-scope": "^3.7.7",
|
"@types/eslint-scope": "^3.7.7",
|
||||||
"@types/estree": "^1.0.8",
|
"@types/estree": "^1.0.8",
|
||||||
@@ -15171,6 +15174,7 @@
|
|||||||
"integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==",
|
"integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"peer": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/bonjour": "^3.5.13",
|
"@types/bonjour": "^3.5.13",
|
||||||
"@types/connect-history-api-fallback": "^1.5.4",
|
"@types/connect-history-api-fallback": "^1.5.4",
|
||||||
@@ -15766,7 +15770,8 @@
|
|||||||
"version": "0.15.1",
|
"version": "0.15.1",
|
||||||
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.15.1.tgz",
|
||||||
"integrity": "sha512-XE96n56IQpJM7NAoXswY3XRLcWFW83xe0BiAOeMD7K5k5xecOeul3Qcpx6GqEeeHNkW5DWL5zOyTbEfB4eti8w==",
|
"integrity": "sha512-XE96n56IQpJM7NAoXswY3XRLcWFW83xe0BiAOeMD7K5k5xecOeul3Qcpx6GqEeeHNkW5DWL5zOyTbEfB4eti8w==",
|
||||||
"license": "MIT"
|
"license": "MIT",
|
||||||
|
"peer": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"/API": {
|
||||||
|
"target": "http://localhost:5250",
|
||||||
|
"secure": false,
|
||||||
|
"changeOrigin": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -64,12 +64,25 @@ export class AuthService {
|
|||||||
await this.router.navigate(['/main/menu']);
|
await this.router.navigate(['/main/menu']);
|
||||||
}
|
}
|
||||||
|
|
||||||
async register(username: string, password: string): Promise<void> {
|
async register(
|
||||||
|
username: string,
|
||||||
|
password: string,
|
||||||
|
email: string,
|
||||||
|
tel: string,
|
||||||
|
description: string | null = null
|
||||||
|
): Promise<void> {
|
||||||
await firstValueFrom(
|
await firstValueFrom(
|
||||||
this.http.post<void>('/API/users/register', { username, password } as RegisterRequest)
|
this.http.post<void>('/API/users', {
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
email,
|
||||||
|
tel,
|
||||||
|
description,
|
||||||
|
profilePicture: null
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.login(username, password);
|
await this.router.navigate(['/login']);
|
||||||
}
|
}
|
||||||
|
|
||||||
logout(): void {
|
logout(): void {
|
||||||
@@ -78,4 +91,20 @@ export class AuthService {
|
|||||||
this.currentUser.set(null);
|
this.currentUser.set(null);
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateCurrentUser(partial: Partial<LoggedUser>): void {
|
||||||
|
const user = this.currentUser();
|
||||||
|
if (!user) return;
|
||||||
|
const updated = { ...user, ...partial };
|
||||||
|
localStorage.setItem(this.USER_KEY, JSON.stringify(updated));
|
||||||
|
this.currentUser.set(updated);
|
||||||
|
}
|
||||||
|
|
||||||
|
getCurrentUserId(): number {
|
||||||
|
const user = this.currentUser();
|
||||||
|
if (!user) {
|
||||||
|
throw new Error('Aucun utilisateur connecté');
|
||||||
|
}
|
||||||
|
return Number(user.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import {inject, Injectable} from '@angular/core';
|
||||||
import { HubConnection, HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';
|
import { HubConnectionBuilder, HubConnectionState } from '@microsoft/signalr';
|
||||||
|
import * as signalR from '@microsoft/signalr';
|
||||||
|
import { AuthService } from "../auth/auth.service";
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class ChatService {
|
export class ChatService {
|
||||||
|
|
||||||
private hub: HubConnection;
|
private authService = inject(AuthService);
|
||||||
|
private hub: signalR.HubConnection;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.hub = new HubConnectionBuilder()
|
this.hub = new HubConnectionBuilder()
|
||||||
.withUrl('https://localhost:5001/hubs/chat')
|
.withUrl('http://localhost:5250/hubs/chat', {
|
||||||
|
accessTokenFactory: () => this.authService.getToken() ?? ''
|
||||||
|
})
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@@ -27,4 +32,9 @@ export class ChatService {
|
|||||||
onMessage(callback: (message: any) => void) {
|
onMessage(callback: (message: any) => void) {
|
||||||
this.hub.on('ReceiveMessage', callback);
|
this.hub.on('ReceiveMessage', callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async joinConversation(discussionId: string) {
|
||||||
|
await this.connect();
|
||||||
|
await this.hub.invoke('JoinConversation', discussionId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,65 @@
|
|||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
import {Discussion} from "../../pages/menu/menu-users/menu-users.component";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { inject, Injectable } from "@angular/core";
|
import { inject, Injectable } from "@angular/core";
|
||||||
|
|
||||||
|
export interface Message {
|
||||||
|
id: number;
|
||||||
|
contenu: string;
|
||||||
|
date: string;
|
||||||
|
userId: number;
|
||||||
|
authorName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MemberWithRole {
|
||||||
|
userId: number;
|
||||||
|
username: string;
|
||||||
|
roleId: number | null;
|
||||||
|
roleLibelle: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Discussion {
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
isGroup: boolean;
|
||||||
|
membersCount?: number;
|
||||||
|
groupId?: number;
|
||||||
|
}
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class discussionsService {
|
export class discussionsService {
|
||||||
|
|
||||||
private http = inject(HttpClient);
|
private http = inject(HttpClient);
|
||||||
private apiUrl = 'https://localhost:5001/API';
|
private apiUrl = 'http://localhost:5250/API';
|
||||||
|
|
||||||
getDiscussions(): Observable<Discussion[]> {
|
getDiscussions(): Observable<Discussion[]> {
|
||||||
return this.http.get<Discussion[]>(`${this.apiUrl}/discussions`);
|
return this.http.get<Discussion[]>(`${this.apiUrl}/discussions/my`);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMessages(discussionId: string): Observable<Message[]> {
|
||||||
|
return this.http.get<Message[]>(`${this.apiUrl}/discussions/${discussionId}/messages`);
|
||||||
|
}
|
||||||
|
|
||||||
|
createPrivateDiscussion(username: string): Observable<Discussion> {
|
||||||
|
return this.http.post<Discussion>(`${this.apiUrl}/discussions/private`, { username });
|
||||||
|
}
|
||||||
|
|
||||||
|
createGroupDiscussion(groupName: string, usernames: string[]): Observable<Discussion> {
|
||||||
|
return this.http.post<Discussion>(`${this.apiUrl}/discussions/group`, { groupName, usernames });
|
||||||
|
}
|
||||||
|
|
||||||
|
getDiscussionMembers(discussionId: string): Observable<string[]> {
|
||||||
|
return this.http.get<string[]>(`${this.apiUrl}/discussions/${discussionId}/members`);
|
||||||
|
}
|
||||||
|
|
||||||
|
getMembersWithRoles(discussionId: string): Observable<MemberWithRole[]> {
|
||||||
|
return this.http.get<MemberWithRole[]>(`${this.apiUrl}/discussions/${discussionId}/members/roles`);
|
||||||
|
}
|
||||||
|
|
||||||
|
createRole(libelle: string): Observable<{ id: number, libelle: string }> {
|
||||||
|
return this.http.post<{ id: number, libelle: string }>(`${this.apiUrl}/roles`, { libelle });
|
||||||
|
}
|
||||||
|
|
||||||
|
assignRole(groupId: number, userId: number, roleId: number): Observable<void> {
|
||||||
|
return this.http.post<void>(`${this.apiUrl}/groups/${groupId}/members/${userId}/role`, { roleId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,16 +8,16 @@
|
|||||||
|
|
||||||
<h1>Knots</h1>
|
<h1>Knots</h1>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card" [formGroup]="loginForm">
|
||||||
|
|
||||||
<h3>Connectez-vous à Knots !</h3>
|
<h3>Connectez-vous à Knots !</h3>
|
||||||
|
|
||||||
<ion-item lines="none" class="input">
|
<ion-item lines="none" class="input">
|
||||||
<ion-input placeholder="Login..."></ion-input>
|
<ion-input formControlName="name" placeholder="Login..."></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-item lines="none" class="input">
|
<ion-item lines="none" class="input">
|
||||||
<ion-input type="password" placeholder="Password..."></ion-input>
|
<ion-input formControlName="password" type="password" placeholder="Password..."></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-button expand="block" class="btn" (click)="submitForm()">
|
<ion-button expand="block" class="btn" (click)="submitForm()">
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ export class LoginFormComponent {
|
|||||||
});
|
});
|
||||||
|
|
||||||
async submitForm(): Promise<void> {
|
async submitForm(): Promise<void> {
|
||||||
|
console.log('submitForm appelé');
|
||||||
|
console.log('form valid:', this.loginForm.valid);
|
||||||
|
console.log('form values:', this.loginForm.value);
|
||||||
if (this.loginForm.valid) {
|
if (this.loginForm.valid) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@ export class LoginFormComponent {
|
|||||||
this.loginForm.value.password!
|
this.loginForm.value.password!
|
||||||
);
|
);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
console.error('Erreur complète:', err);
|
||||||
if (err.status === 401) {
|
if (err.status === 401) {
|
||||||
console.error('Identifiant ou mot de passe incorrect.');
|
console.error('Identifiant ou mot de passe incorrect.');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -108,3 +108,158 @@
|
|||||||
box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1);
|
box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mode-switch {
|
||||||
|
margin-top: auto;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
padding: 14px 16px;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 16px;
|
||||||
|
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
box-shadow: 0 2px 12px rgba(122, 46, 46, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch-label {
|
||||||
|
color: #7a2e2e;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SWITCH */
|
||||||
|
|
||||||
|
.switch {
|
||||||
|
position: relative;
|
||||||
|
width: 58px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.6);
|
||||||
|
border-radius: 999px;
|
||||||
|
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
|
||||||
|
box-shadow:
|
||||||
|
inset 0 1px 3px rgba(0,0,0,0.08),
|
||||||
|
0 2px 8px rgba(0,0,0,0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider::before {
|
||||||
|
content: "";
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
left: 4px;
|
||||||
|
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
|
||||||
|
border-radius: 50%;
|
||||||
|
background: white;
|
||||||
|
|
||||||
|
transition: all 0.25s ease;
|
||||||
|
|
||||||
|
box-shadow:
|
||||||
|
0 2px 8px rgba(0,0,0,0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch input:checked + .slider {
|
||||||
|
background: #bd5a5a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.switch input:checked + .slider::before {
|
||||||
|
transform: translateX(26px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch:hover .slider {
|
||||||
|
transform: scale(1.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-member-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
padding: 12px 16px;
|
||||||
|
|
||||||
|
border: 2px dashed rgba(189, 90, 90, 0.35);
|
||||||
|
border-radius: 14px;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.55);
|
||||||
|
|
||||||
|
color: #bd5a5a;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
border-color: #bd5a5a;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.remove-btn {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
background: white;
|
||||||
|
color: #bd5a5a;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
box-shadow: 0 2px 8px rgba(180, 80, 80, 0.12);
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 4px 12px rgba(180, 80, 80, 0.18);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.92);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,30 +11,91 @@
|
|||||||
<div class="modal-layout">
|
<div class="modal-layout">
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h2 class="modal-title">Nouvelle conversation</h2>
|
<h2 class="modal-title">{{ isGroup() ? 'Nouveau groupe' : 'Nouvelle conversation' }}</h2>
|
||||||
|
<div class="header-actions">
|
||||||
<button class="modal-close-btn" (click)="closeNav()">
|
<button class="modal-close-btn" (click)="closeNav()">
|
||||||
<ion-icon name="close-outline" />
|
<ion-icon name="close-outline" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<!-- Mode privé -->
|
||||||
|
<ng-container *ngIf="!isGroup()">
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<ion-item class="custom-item">
|
<ion-item class="custom-item">
|
||||||
<ion-input
|
<ion-input
|
||||||
|
[formControl]="username"
|
||||||
label="Nom d'utilisateur"
|
label="Nom d'utilisateur"
|
||||||
labelPlacement="floating"
|
labelPlacement="floating"
|
||||||
placeholder="ex: jean_dupont"
|
placeholder="ex: jean_dupont"
|
||||||
/>
|
/>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<!-- message d'erreur — affiché plus tard via logique -->
|
<p class="error-msg" *ngIf="errorMsg()">{{ errorMsg() }}</p>
|
||||||
<!-- <p class="error-msg">Utilisateur introuvable.</p> -->
|
</div>
|
||||||
|
<button class="submit-btn" (click)="startConversation()" [disabled]="isLoading()">
|
||||||
|
{{ isLoading() ? 'Création...' : 'Démarrer la conversation' }}
|
||||||
|
</button>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<!-- Mode groupe -->
|
||||||
|
<ng-container *ngIf="isGroup()">
|
||||||
|
<div class="input-wrapper">
|
||||||
|
<ion-item class="custom-item">
|
||||||
|
<ion-input
|
||||||
|
[formControl]="groupName"
|
||||||
|
label="Nom du groupe"
|
||||||
|
labelPlacement="floating"
|
||||||
|
placeholder="ex: Les amis"
|
||||||
|
/>
|
||||||
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="submit-btn">
|
<div class="members-list">
|
||||||
Démarrer la conversation
|
<div class="member-row" *ngFor="let ctrl of groupMembers; let i = index">
|
||||||
|
<ion-item class="custom-item member-item">
|
||||||
|
<ion-input
|
||||||
|
[formControl]="ctrl"
|
||||||
|
label="Membre {{ i + 1 }}"
|
||||||
|
labelPlacement="floating"
|
||||||
|
placeholder="ex: jean_dupont"
|
||||||
|
/>
|
||||||
|
</ion-item>
|
||||||
|
<button class="remove-btn" (click)="removeMember(i)" *ngIf="groupMembers.length > 1">
|
||||||
|
<ion-icon name="close-outline" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="add-member-btn" (click)="addMember()" *ngIf="groupMembers.length < 10">
|
||||||
|
<ion-icon name="add-outline" />
|
||||||
|
Ajouter un membre
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<p class="error-msg" *ngIf="errorMsg()">{{ errorMsg() }}</p>
|
||||||
|
|
||||||
|
<button class="submit-btn" (click)="startGroupConversation()" [disabled]="isLoading()">
|
||||||
|
{{ isLoading() ? 'Création...' : 'Créer le groupe' }}
|
||||||
|
</button>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
|
<div class="mode-switch">
|
||||||
|
<span class="switch-label">
|
||||||
|
{{ isGroup() ? 'Mode groupe' : 'Conversation privée' }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<label class="switch">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
[checked]="isGroup()"
|
||||||
|
(change)="toggleMode()"
|
||||||
|
>
|
||||||
|
<span class="slider"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ion-modal>
|
</ion-modal>
|
||||||
@@ -1,31 +1,110 @@
|
|||||||
import { Component, inject, signal } from '@angular/core';
|
import { Component, inject, signal } from '@angular/core';
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
|
import { ReactiveFormsModule, FormControl } from "@angular/forms";
|
||||||
import { addIcons } from "ionicons";
|
import { addIcons } from "ionicons";
|
||||||
import {closeOutline} from "ionicons/icons";
|
import { IonIcon, IonInput, IonItem, IonModal } from "@ionic/angular/standalone";
|
||||||
import {
|
import { closeOutline, addOutline } from "ionicons/icons";
|
||||||
IonButton,
|
import { discussionsService } from "../../../core/chat/discussion.service";
|
||||||
IonButtons,
|
import {CommonModule} from "@angular/common";
|
||||||
IonContent,
|
|
||||||
IonHeader, IonIcon, IonInput,
|
|
||||||
IonItem,
|
|
||||||
IonModal,
|
|
||||||
IonTitle,
|
|
||||||
IonToolbar
|
|
||||||
} from "@ionic/angular/standalone";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-menu-nav',
|
selector: 'app-menu-nav',
|
||||||
imports: [IonModal, IonHeader, IonToolbar, IonTitle, IonButtons, IonButton, IonContent, IonItem, IonInput, IonIcon],
|
imports: [IonModal, IonItem, IonInput, IonIcon, ReactiveFormsModule, CommonModule],
|
||||||
templateUrl: './menu-nav.component.html',
|
templateUrl: './menu-nav.component.html',
|
||||||
styleUrl: './menu-nav.component.css'
|
styleUrl: './menu-nav.component.css'
|
||||||
})
|
})
|
||||||
export class MenuNav {
|
export class MenuNav {
|
||||||
|
|
||||||
|
private router = inject(Router);
|
||||||
|
private discussionService = inject(discussionsService);
|
||||||
|
|
||||||
isModalOpen = signal(false);
|
isModalOpen = signal(false);
|
||||||
|
isLoading = signal(false);
|
||||||
|
errorMsg = signal<string | null>(null);
|
||||||
|
isGroup = signal(false);
|
||||||
|
|
||||||
|
// Mode privé
|
||||||
|
username = new FormControl('');
|
||||||
|
|
||||||
|
// Mode groupe
|
||||||
|
groupName = new FormControl('');
|
||||||
|
groupMembers: FormControl[] = [new FormControl('')];
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
addIcons({ closeOutline });
|
addIcons({ closeOutline, addOutline });
|
||||||
}
|
}
|
||||||
|
|
||||||
openNav() { this.isModalOpen.set(true); }
|
openNav() { this.isModalOpen.set(true); }
|
||||||
closeNav() { this.isModalOpen.set(false); }
|
|
||||||
|
closeNav() {
|
||||||
|
this.isModalOpen.set(false);
|
||||||
|
this.username.reset();
|
||||||
|
this.groupName.reset();
|
||||||
|
this.groupMembers = [new FormControl('')];
|
||||||
|
this.errorMsg.set(null);
|
||||||
|
this.isGroup.set(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleMode() {
|
||||||
|
this.isGroup.update(v => !v);
|
||||||
|
this.errorMsg.set(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
addMember() {
|
||||||
|
if (this.groupMembers.length < 10) {
|
||||||
|
this.groupMembers.push(new FormControl(''));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
removeMember(index: number) {
|
||||||
|
this.groupMembers.splice(index, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
startConversation() {
|
||||||
|
const name = this.username.value?.trim();
|
||||||
|
if (!name || this.isLoading()) return;
|
||||||
|
|
||||||
|
this.isLoading.set(true);
|
||||||
|
this.errorMsg.set(null);
|
||||||
|
|
||||||
|
this.discussionService.createPrivateDiscussion(name).subscribe({
|
||||||
|
next: (discussion) => {
|
||||||
|
this.isLoading.set(false);
|
||||||
|
this.closeNav();
|
||||||
|
this.router.navigate(['/main/messages', discussion.id]);
|
||||||
|
},
|
||||||
|
error: (err) => {
|
||||||
|
this.isLoading.set(false);
|
||||||
|
this.errorMsg.set(
|
||||||
|
err.status === 404 ? 'Utilisateur introuvable.' : 'Une erreur est survenue.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
startGroupConversation() {
|
||||||
|
const name = this.groupName.value?.trim();
|
||||||
|
const usernames = this.groupMembers
|
||||||
|
.map(c => c.value?.trim())
|
||||||
|
.filter(v => !!v);
|
||||||
|
|
||||||
|
if (!name || usernames.length === 0 || this.isLoading()) return;
|
||||||
|
|
||||||
|
this.isLoading.set(true);
|
||||||
|
this.errorMsg.set(null);
|
||||||
|
|
||||||
|
this.discussionService.createGroupDiscussion(name, usernames).subscribe({
|
||||||
|
next: (discussion) => {
|
||||||
|
this.isLoading.set(false);
|
||||||
|
this.closeNav();
|
||||||
|
this.router.navigate(['/main/messages', discussion.id]);
|
||||||
|
},
|
||||||
|
error: (err) => {
|
||||||
|
this.isLoading.set(false);
|
||||||
|
this.errorMsg.set(
|
||||||
|
err.status === 404 ? 'Un ou plusieurs utilisateurs introuvables.' : 'Une erreur est survenue.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,9 +13,7 @@
|
|||||||
|
|
||||||
<div class="discussion-info">
|
<div class="discussion-info">
|
||||||
<span class="username">{{ disc.name }}</span>
|
<span class="username">{{ disc.name }}</span>
|
||||||
<span class="members" *ngIf="disc.isGroup">
|
<span class="members" *ngIf="disc.isGroup"> {{ disc.membersCount }} membres </span>
|
||||||
{{ disc.membersCount }} membres
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Component, inject } from '@angular/core';
|
import {Component, inject, OnInit} from '@angular/core';
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
|
import {discussionsService} from "../../../core/chat/discussion.service";
|
||||||
|
|
||||||
export interface Discussion {
|
export interface Discussion {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -15,18 +16,19 @@ export interface Discussion {
|
|||||||
templateUrl: './menu-users.component.html',
|
templateUrl: './menu-users.component.html',
|
||||||
styleUrl: './menu-users.component.css'
|
styleUrl: './menu-users.component.css'
|
||||||
})
|
})
|
||||||
export class MenuUsersComponent {
|
export class MenuUsersComponent implements OnInit {
|
||||||
|
|
||||||
private router = inject(Router);
|
private router = inject(Router);
|
||||||
|
private discussionService = inject(discussionsService);
|
||||||
|
|
||||||
discussions: Discussion[] = [
|
discussions: Discussion[] = [];
|
||||||
{ id: 1, name: 'Um-Bro', isGroup: false },
|
|
||||||
{ id: 2, name: 'Doggeybag', isGroup: false },
|
ngOnInit() {
|
||||||
{ id: 3, name: '', isGroup: false },
|
this.discussionService.getDiscussions().subscribe({
|
||||||
{ id: 4, name: 'Abel Paradigm', isGroup: false },
|
next: (discussions) => this.discussions = discussions,
|
||||||
{ id: 5, name: 'Um-Brothers', isGroup: true, membersCount: 7 },
|
error: (err) => console.error('Impossible de charger les discussions', err)
|
||||||
{ id: 6, name: 'Hoodie G', isGroup: false },
|
});
|
||||||
];
|
}
|
||||||
|
|
||||||
openDiscussion(discussionId: number) {
|
openDiscussion(discussionId: number) {
|
||||||
this.router.navigate(['/main/messages', discussionId]);
|
this.router.navigate(['/main/messages', discussionId]);
|
||||||
|
|||||||
@@ -41,3 +41,215 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #c07070;
|
color: #c07070;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ion-modal {
|
||||||
|
--background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MODALE */
|
||||||
|
.modal-layout {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
background: radial-gradient(
|
||||||
|
ellipse at top,
|
||||||
|
#fff 0%,
|
||||||
|
#f9ece9 45%,
|
||||||
|
#f3d4cc 100%
|
||||||
|
);
|
||||||
|
|
||||||
|
border-radius: 22px 22px 0 0;
|
||||||
|
|
||||||
|
box-shadow: 0 -12px 45px rgba(200, 120, 100, 0.25);
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* HEADER */
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
padding: 18px;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.6);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
|
||||||
|
border-bottom: 1px solid rgba(192, 112, 112, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #c07070;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* CLOSE */
|
||||||
|
|
||||||
|
.modal-close-btn {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
background: #fff;
|
||||||
|
color: #c07070;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
box-shadow: 0 3px 12px rgba(200, 120, 100, 0.15);
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
ion-icon {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 6px 18px rgba(200, 120, 100, 0.22);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.92);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BODY */
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
padding: 18px;
|
||||||
|
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MEMBER CARD */
|
||||||
|
|
||||||
|
.member-card {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
padding: 14px;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.75);
|
||||||
|
border-radius: 16px;
|
||||||
|
|
||||||
|
box-shadow: 0 2px 12px rgba(200, 120, 100, 0.12);
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
background: rgba(255, 255, 255, 0.92);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MEMBER INFO */
|
||||||
|
|
||||||
|
.member-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-info img {
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-name {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #7a3a3a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.member-role {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: rgba(122, 58, 58, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ROLE ASSIGN */
|
||||||
|
|
||||||
|
.role-assign {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* INPUT */
|
||||||
|
|
||||||
|
.role-input {
|
||||||
|
width: 120px;
|
||||||
|
|
||||||
|
padding: 8px 10px;
|
||||||
|
|
||||||
|
border: 1px solid rgba(192, 112, 112, 0.25);
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
background: rgba(255, 255, 255, 0.8);
|
||||||
|
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: #7a3a3a;
|
||||||
|
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: #c07070;
|
||||||
|
box-shadow: 0 0 0 3px rgba(192, 112, 112, 0.15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BUTTON + */
|
||||||
|
|
||||||
|
.role-btn {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
background: #c07070;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
box-shadow: 0 2px 10px rgba(192, 112, 112, 0.25);
|
||||||
|
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-1px);
|
||||||
|
box-shadow: 0 6px 16px rgba(192, 112, 112, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.92);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,40 @@
|
|||||||
<button class="profile-btn">
|
<button class="profile-btn" (click)="openModal()">
|
||||||
<div class="icon-wrapper">
|
<div class="icon-wrapper">
|
||||||
<img width="50" height="50" src="https://img.icons8.com/ios/50/user-male-circle--v1.png" alt="user"/>
|
<img width="50" height="50" src="https://img.icons8.com/ios/50/user-male-circle--v1.png" alt="user"/>
|
||||||
</div>
|
</div>
|
||||||
<span class="username">Nom User</span>
|
<span class="username">{{ name || 'Utilisateur' }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<ion-modal [isOpen]="isModalOpen()" (didDismiss)="closeModal()">
|
||||||
|
<ng-template>
|
||||||
|
<div class="modal-layout">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h2 class="modal-title">Membres</h2>
|
||||||
|
<button class="modal-close-btn" (click)="closeModal()">
|
||||||
|
<ion-icon name="close-outline"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="member-card" *ngFor="let member of members()">
|
||||||
|
<div class="member-info">
|
||||||
|
<img width="36" height="36" src="https://img.icons8.com/ios/50/user-male-circle--v1.png" alt="user"/>
|
||||||
|
<div class="member-text">
|
||||||
|
<span class="member-name">{{ member.username }}</span>
|
||||||
|
<span class="member-role" *ngIf="member.roleLibelle">{{ member.roleLibelle }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="role-assign" *ngIf="groupId">
|
||||||
|
<input
|
||||||
|
class="role-input"
|
||||||
|
[(ngModel)]="newRoleInput[member.userId]"
|
||||||
|
placeholder="Nouveau rôle..."
|
||||||
|
/>
|
||||||
|
<button class="role-btn" (click)="assignRole(member.userId)">+</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</ion-modal>
|
||||||
@@ -1,11 +1,63 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, Input, inject, signal } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { IonModal, IonIcon } from '@ionic/angular/standalone';
|
||||||
|
import { addIcons } from 'ionicons';
|
||||||
|
import { closeOutline } from 'ionicons/icons';
|
||||||
|
import { discussionsService, MemberWithRole } from '../../../core/chat/discussion.service';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-messages-infouser',
|
selector: 'app-messages-infouser',
|
||||||
imports: [],
|
imports: [CommonModule, IonModal, IonIcon, FormsModule],
|
||||||
templateUrl: './messages-infouser.component.html',
|
templateUrl: './messages-infouser.component.html',
|
||||||
styleUrl: './messages-infouser.component.css'
|
styleUrl: './messages-infouser.component.css'
|
||||||
})
|
})
|
||||||
export class MessagesInfoUser {
|
export class MessagesInfoUser {
|
||||||
|
@Input() name: string = '';
|
||||||
|
@Input() groupId: number | null = null;
|
||||||
|
|
||||||
|
private discussionService = inject(discussionsService);
|
||||||
|
private route = inject(ActivatedRoute);
|
||||||
|
|
||||||
|
isModalOpen = signal(false);
|
||||||
|
members = signal<MemberWithRole[]>([]);
|
||||||
|
newRoleInput: { [userId: number]: string } = {};
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
addIcons({ closeOutline });
|
||||||
|
}
|
||||||
|
|
||||||
|
openModal() {
|
||||||
|
const discussionId = this.route.snapshot.paramMap.get('discussionId')!;
|
||||||
|
this.discussionService.getMembersWithRoles(discussionId).subscribe({
|
||||||
|
next: (members) => {
|
||||||
|
this.members.set(members);
|
||||||
|
this.isModalOpen.set(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
closeModal() { this.isModalOpen.set(false); }
|
||||||
|
|
||||||
|
assignRole(userId: number) {
|
||||||
|
const libelle = this.newRoleInput[userId]?.trim();
|
||||||
|
if (!libelle || !this.groupId) return;
|
||||||
|
|
||||||
|
this.discussionService.createRole(libelle).subscribe({
|
||||||
|
next: (role) => {
|
||||||
|
this.discussionService.assignRole(this.groupId!, userId, role.id).subscribe({
|
||||||
|
next: () => {
|
||||||
|
this.members.update(members =>
|
||||||
|
members.map(m => m.userId === userId
|
||||||
|
? { ...m, roleId: role.id, roleLibelle: libelle }
|
||||||
|
: m
|
||||||
|
)
|
||||||
|
);
|
||||||
|
this.newRoleInput[userId] = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,22 +2,21 @@
|
|||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<app-messages-menu/>
|
<app-messages-menu/>
|
||||||
<app-messages-infouser/>
|
<app-messages-infouser [name]="discussionName" [groupId]="groupId"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="messages">
|
<div class="messages">
|
||||||
<div class="message received">
|
<div *ngFor="let message of messages"
|
||||||
<p>Salut, comment tu vas ?</p>
|
class="message"
|
||||||
<span class="timestamp">15:33, Hier.</span>
|
[class.sent]="isSent(message)"
|
||||||
</div>
|
[class.received]="!isSent(message)">
|
||||||
<div class="message sent">
|
<p>{{ message.contenu }}</p>
|
||||||
<p>ça va</p>
|
<span class="timestamp">{{ message.date | date:'HH:mm' }}</span>
|
||||||
<span class="timestamp">11:25, Aujd.</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottombar">
|
<div class="bottombar">
|
||||||
<app-messages-send [discussionId]="currentdiscussionId" />
|
<app-messages-send [discussionId]="currentDiscussionId" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,22 +1,62 @@
|
|||||||
import { Component, inject, OnInit } from '@angular/core';
|
import { Component, inject, OnInit } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
import { MessagesMenu } from "../messages-menu/messages-menu.component";
|
import { MessagesMenu } from "../messages-menu/messages-menu.component";
|
||||||
import { MessagesInfoUser } from "../messages-infouser/messages-infouser.component";
|
import { MessagesInfoUser } from "../messages-infouser/messages-infouser.component";
|
||||||
import { MessagesSend } from "../messages-send/messages-send.component";
|
import { MessagesSend } from "../messages-send/messages-send.component";
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { discussionsService, Message } from "../../../core/chat/discussion.service";
|
||||||
|
import { AuthService } from "../../../core/auth/auth.service";
|
||||||
|
import {ChatService} from "../../../core/chat/chat.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-messages-main',
|
selector: 'app-messages-main',
|
||||||
imports: [MessagesMenu, MessagesInfoUser, MessagesSend],
|
imports: [CommonModule, MessagesMenu, MessagesInfoUser, MessagesSend],
|
||||||
templateUrl: './messages-main.component.html',
|
templateUrl: './messages-main.component.html',
|
||||||
styleUrl: './messages-main.component.css'
|
styleUrl: './messages-main.component.css'
|
||||||
})
|
})
|
||||||
export class MessagesMain implements OnInit {
|
export class MessagesMain implements OnInit {
|
||||||
|
|
||||||
private route = inject(ActivatedRoute);
|
private route = inject(ActivatedRoute);
|
||||||
|
private discussionService = inject(discussionsService);
|
||||||
|
private authService = inject(AuthService);
|
||||||
|
private chatService = inject(ChatService);
|
||||||
|
|
||||||
currentdiscussionId!: string;
|
currentDiscussionId!: string;
|
||||||
|
currentUserId!: number;
|
||||||
|
messages: Message[] = [];
|
||||||
|
discussionName: string = '';
|
||||||
|
groupId: number | null = null;
|
||||||
|
|
||||||
ngOnInit() {
|
async ngOnInit() {
|
||||||
this.currentdiscussionId = this.route.snapshot.paramMap.get('discussionId')!;
|
this.currentDiscussionId = this.route.snapshot.paramMap.get('discussionId')!;
|
||||||
|
this.currentUserId = this.authService.getCurrentUserId();
|
||||||
|
|
||||||
|
this.discussionService.getDiscussions().subscribe({
|
||||||
|
next: (discussions) => {
|
||||||
|
const discussion = discussions.find(d => d.id === +this.currentDiscussionId);
|
||||||
|
console.log('discussion:', discussion);
|
||||||
|
this.discussionName = discussion?.name ?? '';
|
||||||
|
this.groupId = discussion?.groupId ?? null;
|
||||||
|
console.log('groupId:', this.groupId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.discussionService.getMessages(this.currentDiscussionId).subscribe({
|
||||||
|
next: (messages) => this.messages = messages,
|
||||||
|
error: (err) => console.error('Impossible de charger les messages', err)
|
||||||
|
});
|
||||||
|
|
||||||
|
// réception temps réel
|
||||||
|
this.chatService.onMessage((message: Message) => {
|
||||||
|
this.messages = [...this.messages, message];
|
||||||
|
});
|
||||||
|
|
||||||
|
// rejoindre la room pour ne recevoir que cette conversation
|
||||||
|
await this.chatService.connect();
|
||||||
|
await this.chatService.joinConversation(this.currentDiscussionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
isSent(message: Message): boolean {
|
||||||
|
return message.userId === this.currentUserId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
.logout-btn {
|
||||||
|
align-self: flex-start;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 14px;
|
||||||
|
background: white;
|
||||||
|
border: none;
|
||||||
|
box-shadow: 0 2px 10px rgba(180, 80, 80, 0.12);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: rosybrown;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
transition: box-shadow 0.2s, transform 0.15s;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.94);
|
||||||
|
box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<button class="logout-btn" (click)="logout()">
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<polyline points="16 17 21 12 16 7" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<line x1="21" y1="12" x2="9" y2="12" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import {Component, inject} from '@angular/core';
|
||||||
|
import {AuthService} from "../../../core/auth/auth.service";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-disconnect',
|
||||||
|
imports: [],
|
||||||
|
templateUrl: './disconnect.component.html',
|
||||||
|
styleUrl: './disconnect.component.css'
|
||||||
|
})
|
||||||
|
export class DisconnectComponent {
|
||||||
|
|
||||||
|
private authService = inject(AuthService);
|
||||||
|
logout() {
|
||||||
|
this.authService.logout();
|
||||||
|
}
|
||||||
|
}
|
||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
.modal-layout {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(160deg, #f9e8e8 0%, #f2c4c4 35%, #e89898 70%, #d97070 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px 20px 12px;
|
||||||
|
border-bottom: 1px solid rgba(189, 90, 90, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-title {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #7a2e2e;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-close-btn {
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: white;
|
||||||
|
border: none;
|
||||||
|
box-shadow: 0 2px 8px rgba(180, 80, 80, 0.12);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #bd5a5a;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
transition: transform 0.15s;
|
||||||
|
|
||||||
|
&:active { transform: scale(0.92); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 24px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-item {
|
||||||
|
--background: white;
|
||||||
|
--border-radius: 12px;
|
||||||
|
--padding-start: 14px;
|
||||||
|
--inner-padding-end: 14px;
|
||||||
|
--color: #7a2e2e;
|
||||||
|
--highlight-color-focused: #bd5a5a;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 2px 10px rgba(180, 80, 80, 0.1);
|
||||||
|
|
||||||
|
&.invalid {
|
||||||
|
--border-color: #d97070;
|
||||||
|
box-shadow: 0 2px 10px rgba(180, 80, 80, 0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-msg {
|
||||||
|
color: #7a2e2e;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
padding-left: 4px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submit-btn {
|
||||||
|
width: 100%;
|
||||||
|
background: white;
|
||||||
|
color: #bd5a5a;
|
||||||
|
border: none;
|
||||||
|
border-radius: 14px;
|
||||||
|
padding: 14px;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-weight: 600;
|
||||||
|
box-shadow: 0 2px 10px rgba(180, 80, 80, 0.15);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.15s, box-shadow 0.2s;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: scale(0.97);
|
||||||
|
box-shadow: 0 1px 5px rgba(180, 80, 80, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
+29
-26
@@ -1,18 +1,17 @@
|
|||||||
<ion-header>
|
<div class="modal-layout">
|
||||||
<ion-toolbar>
|
|
||||||
<ion-title>Modifier les coordonnées</ion-title>
|
|
||||||
<ion-buttons slot="end">
|
|
||||||
<ion-button (click)="close.emit()">
|
|
||||||
<ion-icon name="close-outline" />
|
|
||||||
</ion-button>
|
|
||||||
</ion-buttons>
|
|
||||||
</ion-toolbar>
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
<ion-content class="ion-padding">
|
<div class="modal-header">
|
||||||
|
<h2 class="modal-title">Modifier les coordonnées</h2>
|
||||||
|
<button class="modal-close-btn" (click)="close.emit()">
|
||||||
|
<ion-icon name="close-outline" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
<form [formGroup]="coordinatesForm" (ngSubmit)="submitForm()">
|
<form [formGroup]="coordinatesForm" (ngSubmit)="submitForm()">
|
||||||
|
|
||||||
<ion-item [class.invalid]="email.invalid && email.touched">
|
<div class="input-wrapper">
|
||||||
|
<ion-item class="custom-item" [class.invalid]="email.invalid && email.touched">
|
||||||
<ion-input
|
<ion-input
|
||||||
label="Email"
|
label="Email"
|
||||||
labelPlacement="floating"
|
labelPlacement="floating"
|
||||||
@@ -21,11 +20,13 @@
|
|||||||
placeholder="exemple@email.com"
|
placeholder="exemple@email.com"
|
||||||
/>
|
/>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-note *ngIf="email.invalid && email.touched" color="danger">
|
@if (email.invalid && email.touched) {
|
||||||
Adresse email invalide
|
<p class="error-msg">Adresse email invalide</p>
|
||||||
</ion-note>
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ion-item [class.invalid]="tel.invalid && tel.touched" class="ion-margin-top">
|
<div class="input-wrapper">
|
||||||
|
<ion-item class="custom-item" [class.invalid]="tel.invalid && tel.touched">
|
||||||
<ion-input
|
<ion-input
|
||||||
label="Téléphone"
|
label="Téléphone"
|
||||||
labelPlacement="floating"
|
labelPlacement="floating"
|
||||||
@@ -34,18 +35,20 @@
|
|||||||
placeholder="0612345678"
|
placeholder="0612345678"
|
||||||
/>
|
/>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-note *ngIf="tel.invalid && tel.touched" color="danger">
|
@if (tel.invalid && tel.touched) {
|
||||||
Numéro à 10 chiffres requis
|
<p class="error-msg">Numéro à 10 chiffres requis</p>
|
||||||
</ion-note>
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
<ion-button
|
<button
|
||||||
expand="block"
|
class="submit-btn"
|
||||||
class="ion-margin-top"
|
|
||||||
type="submit"
|
type="submit"
|
||||||
[disabled]="coordinatesForm.invalid"
|
[disabled]="coordinatesForm.invalid || loading()"
|
||||||
>
|
>
|
||||||
Valider
|
{{ loading() ? 'Enregistrement...' : 'Valider' }}
|
||||||
</ion-button>
|
</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</ion-content>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
+1
-1
@@ -18,7 +18,7 @@ import {AuthService} from "../../../core/auth/auth.service";
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-parameters-coordinates-form',
|
selector: 'app-parameters-coordinates-form',
|
||||||
imports: [IonHeader, IonToolbar, IonTitle, IonButtons, IonButton, IonIcon, IonContent, ReactiveFormsModule, IonItem, IonInput, IonNote],
|
imports: [IonIcon,ReactiveFormsModule, IonItem, IonInput],
|
||||||
templateUrl: './parameters-coordinates-form.component.html',
|
templateUrl: './parameters-coordinates-form.component.html',
|
||||||
styleUrl: './parameters-coordinates-form.component.css'
|
styleUrl: './parameters-coordinates-form.component.css'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
import { IonModal, IonButton } from '@ionic/angular/standalone';
|
import { IonModal, IonButton } from '@ionic/angular/standalone';
|
||||||
import {FormsModule} from "@angular/forms";
|
import {FormsModule} from "@angular/forms";
|
||||||
import {ParametersCoordinatesFormComponent} from "../parameters-coordinates-form/parameters-coordinates-form.component";
|
import {ParametersCoordinatesFormComponent} from "../parameters-coordinates-form/parameters-coordinates-form.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-parameters-coordinates',
|
selector: 'app-parameters-coordinates',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
imports: [IonModal, FormsModule, ParametersCoordinatesFormComponent],
|
imports: [IonModal, FormsModule, ParametersCoordinatesFormComponent],
|
||||||
templateUrl: './parameters-coordinates.component.html',
|
templateUrl: './parameters-coordinates.component.html',
|
||||||
styleUrl: './parameters-coordinates.component.css'
|
styleUrl: './parameters-coordinates.component.css'
|
||||||
|
|||||||
@@ -12,3 +12,10 @@
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 16px;
|
||||||
|
}
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
<div class="page-param" >
|
<div class="page-param" >
|
||||||
|
<div class="header">
|
||||||
<app-parameters-exit/>
|
<app-parameters-exit/>
|
||||||
|
<app-disconnect/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<app-parameters-coordinates/>
|
<app-parameters-coordinates/>
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ParametersExit} from "../parameters-exit/parameters-exit.component";
|
import {ParametersExit} from "../parameters-exit/parameters-exit.component";
|
||||||
|
import {DisconnectComponent} from "../disconnect/disconnect.component";
|
||||||
import {ParametersCoordinatesComponent} from "../parameters-coordinates/parameters-coordinates.component";
|
import {ParametersCoordinatesComponent} from "../parameters-coordinates/parameters-coordinates.component";
|
||||||
import {ParametersProfileComponent} from "../parameters-profile/parameters-profile.component";
|
import {ParametersProfileComponent} from "../parameters-profile/parameters-profile.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-parameters-main',
|
selector: 'app-parameters-main',
|
||||||
|
templateUrl: './parameters-main.component.html',
|
||||||
imports: [
|
imports: [
|
||||||
ParametersExit,
|
ParametersExit,
|
||||||
|
DisconnectComponent,
|
||||||
ParametersCoordinatesComponent,
|
ParametersCoordinatesComponent,
|
||||||
ParametersProfileComponent
|
ParametersProfileComponent
|
||||||
],
|
],
|
||||||
templateUrl: './parameters-main.component.html',
|
|
||||||
styleUrl: './parameters-main.component.css'
|
styleUrl: './parameters-main.component.css'
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ParametersMain {
|
export class ParametersMain {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,10 +34,13 @@
|
|||||||
/>
|
/>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<button class="edit-btn" (click)="toggleEditUsername()" title="Modifier">
|
<button class="edit-btn" (click)="toggleEditUsername()" title="Modifier">
|
||||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg *ngIf="!editingUsername()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M13.5 3.5L16.5 6.5L7 16H4V13L13.5 3.5Z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
<path d="M13.5 3.5L16.5 6.5L7 16H4V13L13.5 3.5Z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
||||||
<path d="M11.5 5.5L14.5 8.5" stroke="currentColor" stroke-width="1.6"/>
|
<path d="M11.5 5.5L14.5 8.5" stroke="currentColor" stroke-width="1.6"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
<svg *ngIf="editingUsername()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M4 10L8 14L16 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -50,22 +53,27 @@
|
|||||||
<span class="field-value bio-value">{{ bio() }}</span>
|
<span class="field-value bio-value">{{ bio() }}</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #editBioBlock>
|
<ng-template #editBioBlock>
|
||||||
<textarea
|
<input
|
||||||
class="field-input bio-textarea"
|
class="field-input"
|
||||||
[value]="bio()"
|
[(ngModel)]="bio"
|
||||||
(input)="bio.set($any($event.target).value)"
|
[ngModel]="bio()"
|
||||||
|
(ngModelChange)="bio.set($event)"
|
||||||
(blur)="toggleEditBio()"
|
(blur)="toggleEditBio()"
|
||||||
|
(keydown.enter)="toggleEditBio()"
|
||||||
autofocus
|
autofocus
|
||||||
></textarea>
|
/>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
<textarea class="field-input bio-textarea" [value]="bio()" (input)="bio.set($any($event.target).value)" (blur)="toggleEditBio()" autofocus></textarea>
|
||||||
<button class="edit-btn" (click)="toggleEditBio()" title="Modifier">
|
<button class="edit-btn" (click)="toggleEditBio()" title="Modifier">
|
||||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg *ngIf="!editingBio()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M13.5 3.5L16.5 6.5L7 16H4V13L13.5 3.5Z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
<path d="M13.5 3.5L16.5 6.5L7 16H4V13L13.5 3.5Z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
||||||
<path d="M11.5 5.5L14.5 8.5" stroke="currentColor" stroke-width="1.6"/>
|
<path d="M11.5 5.5L14.5 8.5" stroke="currentColor" stroke-width="1.6"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
<svg *ngIf="editingBio()" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M4 10L8 14L16 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Component, inject, signal} from '@angular/core';
|
import {Component, inject, OnInit, signal} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import {firstValueFrom} from "rxjs";
|
import {firstValueFrom} from "rxjs";
|
||||||
@@ -10,9 +10,10 @@ import {AuthService} from "../../../core/auth/auth.service";
|
|||||||
selector: 'app-parameters-profile',
|
selector: 'app-parameters-profile',
|
||||||
imports: [FormsModule, CommonModule],
|
imports: [FormsModule, CommonModule],
|
||||||
templateUrl: './parameters-profile.component.html',
|
templateUrl: './parameters-profile.component.html',
|
||||||
|
standalone: true,
|
||||||
styleUrl: './parameters-profile.component.css'
|
styleUrl: './parameters-profile.component.css'
|
||||||
})
|
})
|
||||||
export class ParametersProfileComponent {
|
export class ParametersProfileComponent implements OnInit {
|
||||||
private usersService = inject(UsersService);
|
private usersService = inject(UsersService);
|
||||||
private authService = inject(AuthService);
|
private authService = inject(AuthService);
|
||||||
|
|
||||||
@@ -33,6 +34,7 @@ export class ParametersProfileComponent {
|
|||||||
this.bio.set(user?.description ?? null);
|
this.bio.set(user?.description ?? null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Username ---
|
||||||
|
|
||||||
toggleEditUsername() {
|
toggleEditUsername() {
|
||||||
if (this.editingUsername()) {
|
if (this.editingUsername()) {
|
||||||
@@ -57,9 +59,13 @@ export class ParametersProfileComponent {
|
|||||||
|
|
||||||
this.loading.set(true);
|
this.loading.set(true);
|
||||||
const user = this.authService.currentUser();
|
const user = this.authService.currentUser();
|
||||||
|
if (!user) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await firstValueFrom(this.usersService.patchUsernameEndpoint(user.id, { username: value }));
|
await firstValueFrom(this.usersService.patchUsernameEndpoint(
|
||||||
|
String(user.id), { username: value }
|
||||||
|
));
|
||||||
|
this.authService.updateCurrentUser({ username: value }); // 👈 maj locale
|
||||||
this.usernameError.set(null);
|
this.usernameError.set(null);
|
||||||
this.editingUsername.set(false);
|
this.editingUsername.set(false);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
@@ -73,7 +79,7 @@ export class ParametersProfileComponent {
|
|||||||
this.loading.set(false);
|
this.loading.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Bio ---
|
||||||
|
|
||||||
toggleEditBio() {
|
toggleEditBio() {
|
||||||
if (this.editingBio()) {
|
if (this.editingBio()) {
|
||||||
@@ -86,9 +92,13 @@ export class ParametersProfileComponent {
|
|||||||
async submitBio() {
|
async submitBio() {
|
||||||
this.loading.set(true);
|
this.loading.set(true);
|
||||||
const user = this.authService.currentUser();
|
const user = this.authService.currentUser();
|
||||||
|
if (!user) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await firstValueFrom(this.usersService.patchUserDescriptionEndpoint(user.id, { description: this.bio() }));
|
await firstValueFrom(this.usersService.patchUserDescriptionEndpoint(
|
||||||
|
String(user.id), { description: this.bio() }
|
||||||
|
));
|
||||||
|
this.authService.updateCurrentUser({ description: this.bio() }); // 👈 maj locale
|
||||||
this.editingBio.set(false);
|
this.editingBio.set(false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Erreur lors de la mise à jour de la bio', e);
|
console.error('Erreur lors de la mise à jour de la bio', e);
|
||||||
@@ -97,6 +107,7 @@ export class ParametersProfileComponent {
|
|||||||
this.loading.set(false);
|
this.loading.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- Photo ---
|
||||||
|
|
||||||
triggerFileInput() {
|
triggerFileInput() {
|
||||||
document.getElementById('photoInput')?.click();
|
document.getElementById('photoInput')?.click();
|
||||||
@@ -113,9 +124,13 @@ export class ParametersProfileComponent {
|
|||||||
|
|
||||||
this.loading.set(true);
|
this.loading.set(true);
|
||||||
const user = this.authService.currentUser();
|
const user = this.authService.currentUser();
|
||||||
|
if (!user) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await firstValueFrom(this.usersService.patchUserProfilePictureEndpoint(user.id, { profilePicture: base64 }));
|
await firstValueFrom(this.usersService.patchUserProfilePictureEndpoint(
|
||||||
|
String(user.id), { profilePicture: base64 }
|
||||||
|
));
|
||||||
|
this.authService.updateCurrentUser({ profilePicture: base64 }); // 👈 maj locale
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Erreur lors de la mise à jour de la photo', e);
|
console.error('Erreur lors de la mise à jour de la photo', e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
<ion-input placeholder="Nom d'utilisateur..." formControlName="username"></ion-input>
|
<ion-input placeholder="Nom d'utilisateur..." formControlName="username"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item lines="none" class="input">
|
||||||
|
<ion-input type="email" placeholder="Email..." formControlName="email"></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
|
<ion-item lines="none" class="input">
|
||||||
|
<ion-input type="tel" placeholder="Téléphone (10 chiffres)..." formControlName="tel"></ion-input>
|
||||||
|
</ion-item>
|
||||||
|
|
||||||
<ion-item lines="none" class="input">
|
<ion-item lines="none" class="input">
|
||||||
<ion-input type="password" placeholder="Mot de passe..." formControlName="password"></ion-input>
|
<ion-input type="password" placeholder="Mot de passe..." formControlName="password"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
@@ -24,7 +32,8 @@
|
|||||||
<ion-input type="password" placeholder="Confirmez votre mot de passe..." formControlName="confirmPassword"></ion-input>
|
<ion-input type="password" placeholder="Confirmez votre mot de passe..." formControlName="confirmPassword"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<p *ngIf="registerForm.hasError('passwordMismatch')" style="color:#d97070; font-size:13px; text-align:center; margin:0;">
|
<p *ngIf="registerForm.hasError('passwordMismatch')"
|
||||||
|
style="color:#d97070; font-size:13px; text-align:center; margin:0;">
|
||||||
Les mots de passe ne correspondent pas.
|
Les mots de passe ne correspondent pas.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { Component, inject } from '@angular/core';
|
import { Component, inject } from '@angular/core';
|
||||||
import {
|
import { IonButton, IonContent, IonInput, IonItem } from "@ionic/angular/standalone";
|
||||||
IonButton, IonContent, IonInput, IonItem
|
|
||||||
} from "@ionic/angular/standalone";
|
|
||||||
import { Router } from "@angular/router";
|
import { Router } from "@angular/router";
|
||||||
import { FormBuilder, ReactiveFormsModule, Validators } from "@angular/forms";
|
import { FormBuilder, ReactiveFormsModule, Validators } from "@angular/forms";
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
@@ -23,8 +21,11 @@ export class RegisterFormComponent {
|
|||||||
|
|
||||||
registerForm = this.fb.group({
|
registerForm = this.fb.group({
|
||||||
username: ['', [Validators.required, Validators.maxLength(50)]],
|
username: ['', [Validators.required, Validators.maxLength(50)]],
|
||||||
|
email: ['', [Validators.required, Validators.email, Validators.maxLength(70)]],
|
||||||
|
tel: ['', [Validators.required, Validators.minLength(10), Validators.maxLength(10)]],
|
||||||
password: ['', [Validators.required, Validators.minLength(12), Validators.maxLength(50)]],
|
password: ['', [Validators.required, Validators.minLength(12), Validators.maxLength(50)]],
|
||||||
confirmPassword: ['', [Validators.required]]
|
confirmPassword: ['', [Validators.required]],
|
||||||
|
description: ['', [Validators.maxLength(200)]],
|
||||||
}, { validators: this.passwordMatchValidator });
|
}, { validators: this.passwordMatchValidator });
|
||||||
|
|
||||||
passwordMatchValidator(form: any) {
|
passwordMatchValidator(form: any) {
|
||||||
@@ -38,12 +39,18 @@ export class RegisterFormComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async submitForm() {
|
async submitForm() {
|
||||||
|
console.log('form valid:', this.registerForm.valid);
|
||||||
|
console.log('form errors:', this.registerForm.errors);
|
||||||
|
console.log('form values:', this.registerForm.value);
|
||||||
if (this.registerForm.valid) {
|
if (this.registerForm.valid) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
try {
|
try {
|
||||||
await this.authService.register(
|
await this.authService.register(
|
||||||
this.registerForm.value.username!,
|
this.registerForm.value.username!,
|
||||||
this.registerForm.value.password!
|
this.registerForm.value.password!,
|
||||||
|
this.registerForm.value.email!,
|
||||||
|
this.registerForm.value.tel!,
|
||||||
|
this.registerForm.value.description ?? null,
|
||||||
);
|
);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
if (err.status === 409) {
|
if (err.status === 409) {
|
||||||
@@ -54,6 +61,13 @@ export class RegisterFormComponent {
|
|||||||
} finally {
|
} finally {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Object.values(this.registerForm.controls).forEach(control => {
|
||||||
|
if (control.invalid) {
|
||||||
|
control.markAsDirty();
|
||||||
|
control.updateValueAndValidity({ onlySelf: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ model/knots-dto-key-create-key-dto.ts
|
|||||||
model/knots-dto-key-delete-key-dto.ts
|
model/knots-dto-key-delete-key-dto.ts
|
||||||
model/knots-dto-message-create-message-dto.ts
|
model/knots-dto-message-create-message-dto.ts
|
||||||
model/knots-dto-message-delete-message-dto.ts
|
model/knots-dto-message-delete-message-dto.ts
|
||||||
model/knots-dto-role-create-role-dto.ts
|
model/knots-dto-message-get-message-details-dto.ts
|
||||||
model/knots-dto-role-delete-role-dto.ts
|
model/knots-dto-role-delete-role-dto.ts
|
||||||
model/knots-dto-user-create-user-dto.ts
|
model/knots-dto-user-create-user-dto.ts
|
||||||
model/knots-dto-user-delete-user-dto.ts
|
model/knots-dto-user-delete-user-dto.ts
|
||||||
@@ -38,6 +38,12 @@ model/knots-dto-user-update-user-description-dto.ts
|
|||||||
model/knots-dto-user-update-user-password-dto.ts
|
model/knots-dto-user-update-user-password-dto.ts
|
||||||
model/knots-dto-user-update-user-profile-picture-dto.ts
|
model/knots-dto-user-update-user-profile-picture-dto.ts
|
||||||
model/knots-dto-user-update-username-dto.ts
|
model/knots-dto-user-update-username-dto.ts
|
||||||
|
model/knots-endpoints-discussion-create-group-discussion-request.ts
|
||||||
|
model/knots-endpoints-discussion-create-private-discussion-request.ts
|
||||||
|
model/knots-endpoints-discussion-member-with-role-dto.ts
|
||||||
|
model/knots-endpoints-role-assign-role-request.ts
|
||||||
|
model/knots-endpoints-role-create-role-request.ts
|
||||||
|
model/knots-endpoints-role-role-dto.ts
|
||||||
model/models.ts
|
model/models.ts
|
||||||
param.ts
|
param.ts
|
||||||
provide-api.ts
|
provide-api.ts
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ import { FastEndpointsErrorResponse } from '../model/fast-endpoints-error-respon
|
|||||||
import { KnotsDTODiscussionCreateDiscussionDto } from '../model/knots-dto-discussion-create-discussion-dto';
|
import { KnotsDTODiscussionCreateDiscussionDto } from '../model/knots-dto-discussion-create-discussion-dto';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { KnotsDTODiscussionDeleteDiscussionDto } from '../model/knots-dto-discussion-delete-discussion-dto';
|
import { KnotsDTODiscussionDeleteDiscussionDto } from '../model/knots-dto-discussion-delete-discussion-dto';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsDTOMessageGetMessageDetailsDto } from '../model/knots-dto-message-get-message-details-dto';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsDiscussionCreateGroupDiscussionRequest } from '../model/knots-endpoints-discussion-create-group-discussion-request';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsDiscussionCreatePrivateDiscussionRequest } from '../model/knots-endpoints-discussion-create-private-discussion-request';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsDiscussionMemberWithRoleDto } from '../model/knots-endpoints-discussion-member-with-role-dto';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
@@ -104,6 +112,142 @@ export class DiscussionsService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint post /API/discussions/group
|
||||||
|
* @param knotsEndpointsDiscussionCreateGroupDiscussionRequest
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public createGroupDiscussionEndpoint(knotsEndpointsDiscussionCreateGroupDiscussionRequest: KnotsEndpointsDiscussionCreateGroupDiscussionRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<object>;
|
||||||
|
public createGroupDiscussionEndpoint(knotsEndpointsDiscussionCreateGroupDiscussionRequest: KnotsEndpointsDiscussionCreateGroupDiscussionRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<object>>;
|
||||||
|
public createGroupDiscussionEndpoint(knotsEndpointsDiscussionCreateGroupDiscussionRequest: KnotsEndpointsDiscussionCreateGroupDiscussionRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<object>>;
|
||||||
|
public createGroupDiscussionEndpoint(knotsEndpointsDiscussionCreateGroupDiscussionRequest: KnotsEndpointsDiscussionCreateGroupDiscussionRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (knotsEndpointsDiscussionCreateGroupDiscussionRequest === null || knotsEndpointsDiscussionCreateGroupDiscussionRequest === undefined) {
|
||||||
|
throw new Error('Required parameter knotsEndpointsDiscussionCreateGroupDiscussionRequest was null or undefined when calling createGroupDiscussionEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [
|
||||||
|
'application/json'
|
||||||
|
];
|
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/group`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<object>('post', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
body: knotsEndpointsDiscussionCreateGroupDiscussionRequest,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint post /API/discussions/private
|
||||||
|
* @param knotsEndpointsDiscussionCreatePrivateDiscussionRequest
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public createPrivateDiscussionEndpoint(knotsEndpointsDiscussionCreatePrivateDiscussionRequest: KnotsEndpointsDiscussionCreatePrivateDiscussionRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<object>;
|
||||||
|
public createPrivateDiscussionEndpoint(knotsEndpointsDiscussionCreatePrivateDiscussionRequest: KnotsEndpointsDiscussionCreatePrivateDiscussionRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<object>>;
|
||||||
|
public createPrivateDiscussionEndpoint(knotsEndpointsDiscussionCreatePrivateDiscussionRequest: KnotsEndpointsDiscussionCreatePrivateDiscussionRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<object>>;
|
||||||
|
public createPrivateDiscussionEndpoint(knotsEndpointsDiscussionCreatePrivateDiscussionRequest: KnotsEndpointsDiscussionCreatePrivateDiscussionRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (knotsEndpointsDiscussionCreatePrivateDiscussionRequest === null || knotsEndpointsDiscussionCreatePrivateDiscussionRequest === undefined) {
|
||||||
|
throw new Error('Required parameter knotsEndpointsDiscussionCreatePrivateDiscussionRequest was null or undefined when calling createPrivateDiscussionEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [
|
||||||
|
'application/json'
|
||||||
|
];
|
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/private`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<object>('post', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
body: knotsEndpointsDiscussionCreatePrivateDiscussionRequest,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint delete /API/discussions
|
* @endpoint delete /API/discussions
|
||||||
* @param knotsDTODiscussionDeleteDiscussionDto
|
* @param knotsDTODiscussionDeleteDiscussionDto
|
||||||
@@ -175,14 +319,15 @@ export class DiscussionsService extends BaseService {
|
|||||||
* @param name
|
* @param name
|
||||||
* @param isGroup
|
* @param isGroup
|
||||||
* @param membersCount
|
* @param membersCount
|
||||||
|
* @param groupId
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
* @param reportProgress flag to report request and response progress.
|
* @param reportProgress flag to report request and response progress.
|
||||||
* @param options additional options
|
* @param options additional options
|
||||||
*/
|
*/
|
||||||
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount?: number, groupId?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
||||||
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount?: number, groupId?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
||||||
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount?: number, groupId?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
||||||
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
public getDiscussionEndpoint(id: number, name: string, isGroup: boolean, membersCount?: number, groupId?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
if (id === null || id === undefined) {
|
if (id === null || id === undefined) {
|
||||||
throw new Error('Required parameter id was null or undefined when calling getDiscussionEndpoint.');
|
throw new Error('Required parameter id was null or undefined when calling getDiscussionEndpoint.');
|
||||||
}
|
}
|
||||||
@@ -192,15 +337,12 @@ export class DiscussionsService extends BaseService {
|
|||||||
if (isGroup === null || isGroup === undefined) {
|
if (isGroup === null || isGroup === undefined) {
|
||||||
throw new Error('Required parameter isGroup was null or undefined when calling getDiscussionEndpoint.');
|
throw new Error('Required parameter isGroup was null or undefined when calling getDiscussionEndpoint.');
|
||||||
}
|
}
|
||||||
if (membersCount === null || membersCount === undefined) {
|
|
||||||
throw new Error('Required parameter membersCount was null or undefined when calling getDiscussionEndpoint.');
|
|
||||||
}
|
|
||||||
|
|
||||||
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Id',
|
'id',
|
||||||
<any>id,
|
<any>id,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -209,7 +351,7 @@ export class DiscussionsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Name',
|
'name',
|
||||||
<any>name,
|
<any>name,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -218,7 +360,7 @@ export class DiscussionsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'IsGroup',
|
'isGroup',
|
||||||
<any>isGroup,
|
<any>isGroup,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -227,13 +369,22 @@ export class DiscussionsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'MembersCount',
|
'membersCount',
|
||||||
<any>membersCount,
|
<any>membersCount,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
|
localVarQueryParameters,
|
||||||
|
'groupId',
|
||||||
|
<any>groupId,
|
||||||
|
QueryParamStyle.Form,
|
||||||
|
true,
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
let localVarHeaders = this.defaultHeaders;
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
@@ -274,4 +425,229 @@ export class DiscussionsService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint get /API/discussions/{discussionId}/members
|
||||||
|
* @param discussionId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public getDiscussionMembersEndpoint(discussionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<string>>;
|
||||||
|
public getDiscussionMembersEndpoint(discussionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<string>>>;
|
||||||
|
public getDiscussionMembersEndpoint(discussionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<string>>>;
|
||||||
|
public getDiscussionMembersEndpoint(discussionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (discussionId === null || discussionId === undefined) {
|
||||||
|
throw new Error('Required parameter discussionId was null or undefined when calling getDiscussionMembersEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/${this.configuration.encodeParam({name: "discussionId", value: discussionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/members`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<string>>('get', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint get /API/discussions/{discussionId}/members/roles
|
||||||
|
* @param discussionId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public getDiscussionMembersWithRolesEndpoint(discussionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<KnotsEndpointsDiscussionMemberWithRoleDto>>;
|
||||||
|
public getDiscussionMembersWithRolesEndpoint(discussionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<KnotsEndpointsDiscussionMemberWithRoleDto>>>;
|
||||||
|
public getDiscussionMembersWithRolesEndpoint(discussionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<KnotsEndpointsDiscussionMemberWithRoleDto>>>;
|
||||||
|
public getDiscussionMembersWithRolesEndpoint(discussionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (discussionId === null || discussionId === undefined) {
|
||||||
|
throw new Error('Required parameter discussionId was null or undefined when calling getDiscussionMembersWithRolesEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/${this.configuration.encodeParam({name: "discussionId", value: discussionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/members/roles`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<KnotsEndpointsDiscussionMemberWithRoleDto>>('get', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint get /API/discussions/{discussionId}/messages
|
||||||
|
* @param discussionId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<KnotsDTOMessageGetMessageDetailsDto>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<KnotsDTOMessageGetMessageDetailsDto>>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<KnotsDTOMessageGetMessageDetailsDto>>>;
|
||||||
|
public getMessageEndpoint(discussionId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (discussionId === null || discussionId === undefined) {
|
||||||
|
throw new Error('Required parameter discussionId was null or undefined when calling getMessageEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/${this.configuration.encodeParam({name: "discussionId", value: discussionId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/messages`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<KnotsDTOMessageGetMessageDetailsDto>>('get', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint get /API/discussions/my
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public getMyDiscussionEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<object>>;
|
||||||
|
public getMyDiscussionEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<object>>>;
|
||||||
|
public getMyDiscussionEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<object>>>;
|
||||||
|
public getMyDiscussionEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
'application/json'
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/discussions/my`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<Array<object>>('get', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import { KnotsDTOGroupUpdateGroupMembersAmountDto } from '../model/knots-dto-gro
|
|||||||
import { KnotsDTOGroupUpdateGroupNameDto } from '../model/knots-dto-group-update-group-name-dto';
|
import { KnotsDTOGroupUpdateGroupNameDto } from '../model/knots-dto-group-update-group-name-dto';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { KnotsDTOGroupUpdateGroupProfilePictureDto } from '../model/knots-dto-group-update-group-profile-picture-dto';
|
import { KnotsDTOGroupUpdateGroupProfilePictureDto } from '../model/knots-dto-group-update-group-profile-picture-dto';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsRoleAssignRoleRequest } from '../model/knots-endpoints-role-assign-role-request';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
@@ -45,6 +47,81 @@ export class GroupsService extends BaseService {
|
|||||||
super(basePath, configuration);
|
super(basePath, configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @endpoint post /API/groups/{groupId}/members/{userId}/role
|
||||||
|
* @param groupId
|
||||||
|
* @param userId
|
||||||
|
* @param knotsEndpointsRoleAssignRoleRequest
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
* @param options additional options
|
||||||
|
*/
|
||||||
|
public assignRoleEndpoint(groupId: string, userId: string, knotsEndpointsRoleAssignRoleRequest: KnotsEndpointsRoleAssignRoleRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
||||||
|
public assignRoleEndpoint(groupId: string, userId: string, knotsEndpointsRoleAssignRoleRequest: KnotsEndpointsRoleAssignRoleRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
||||||
|
public assignRoleEndpoint(groupId: string, userId: string, knotsEndpointsRoleAssignRoleRequest: KnotsEndpointsRoleAssignRoleRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
||||||
|
public assignRoleEndpoint(groupId: string, userId: string, knotsEndpointsRoleAssignRoleRequest: KnotsEndpointsRoleAssignRoleRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
|
if (groupId === null || groupId === undefined) {
|
||||||
|
throw new Error('Required parameter groupId was null or undefined when calling assignRoleEndpoint.');
|
||||||
|
}
|
||||||
|
if (userId === null || userId === undefined) {
|
||||||
|
throw new Error('Required parameter userId was null or undefined when calling assignRoleEndpoint.');
|
||||||
|
}
|
||||||
|
if (knotsEndpointsRoleAssignRoleRequest === null || knotsEndpointsRoleAssignRoleRequest === undefined) {
|
||||||
|
throw new Error('Required parameter knotsEndpointsRoleAssignRoleRequest was null or undefined when calling assignRoleEndpoint.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
|
]);
|
||||||
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||||
|
|
||||||
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||||
|
|
||||||
|
|
||||||
|
// to determine the Content-Type header
|
||||||
|
const consumes: string[] = [
|
||||||
|
'application/json'
|
||||||
|
];
|
||||||
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected !== undefined) {
|
||||||
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||||
|
if (localVarHttpHeaderAcceptSelected) {
|
||||||
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||||
|
responseType_ = 'text';
|
||||||
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||||
|
responseType_ = 'json';
|
||||||
|
} else {
|
||||||
|
responseType_ = 'blob';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let localVarPath = `/API/groups/${this.configuration.encodeParam({name: "groupId", value: groupId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/members/${this.configuration.encodeParam({name: "userId", value: userId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/role`;
|
||||||
|
const { basePath, withCredentials } = this.configuration;
|
||||||
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
||||||
|
{
|
||||||
|
context: localVarHttpContext,
|
||||||
|
body: knotsEndpointsRoleAssignRoleRequest,
|
||||||
|
responseType: <any>responseType_,
|
||||||
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
|
headers: localVarHeaders,
|
||||||
|
observe: observe,
|
||||||
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint post /API/groups
|
* @endpoint post /API/groups
|
||||||
* @param knotsDTOGroupCreateGroupDto
|
* @param knotsDTOGroupCreateGroupDto
|
||||||
@@ -200,7 +277,7 @@ export class GroupsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Id',
|
'id',
|
||||||
<any>id,
|
<any>id,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -209,7 +286,7 @@ export class GroupsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Nom',
|
'nom',
|
||||||
<any>nom,
|
<any>nom,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -218,7 +295,7 @@ export class GroupsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'NombreMembres',
|
'nombreMembres',
|
||||||
<any>nombreMembres,
|
<any>nombreMembres,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -227,7 +304,7 @@ export class GroupsService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'ProfilePicture',
|
'profilePicture',
|
||||||
<any>profilePicture,
|
<any>profilePicture,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -275,7 +352,7 @@ export class GroupsService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint patch /API/groups/{Id}/membersAmount
|
* @endpoint patch /API/groups/{id}/membersAmount
|
||||||
* @param id
|
* @param id
|
||||||
* @param knotsDTOGroupUpdateGroupMembersAmountDto
|
* @param knotsDTOGroupUpdateGroupMembersAmountDto
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
@@ -344,7 +421,7 @@ export class GroupsService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint patch /API/groups/{Id}/name
|
* @endpoint patch /API/groups/{id}/name
|
||||||
* @param id
|
* @param id
|
||||||
* @param knotsDTOGroupUpdateGroupNameDto
|
* @param knotsDTOGroupUpdateGroupNameDto
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
@@ -413,7 +490,7 @@ export class GroupsService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint patch /API/groups/{Id}/profilePicture
|
* @endpoint patch /API/groups/{id}/profilePicture
|
||||||
* @param id
|
* @param id
|
||||||
* @param knotsDTOGroupUpdateGroupProfilePictureDto
|
* @param knotsDTOGroupUpdateGroupProfilePictureDto
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ export class KeysService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Id',
|
'id',
|
||||||
<any>id2,
|
<any>id2,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -202,7 +202,7 @@ export class KeysService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'EnKey',
|
'enKey',
|
||||||
<any>enKey,
|
<any>enKey,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -168,110 +168,4 @@ export class MessagesService extends BaseService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @endpoint get /API/messages/{@Id}
|
|
||||||
* @param id
|
|
||||||
* @param id2
|
|
||||||
* @param date
|
|
||||||
* @param type
|
|
||||||
* @param contenu
|
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
||||||
* @param reportProgress flag to report request and response progress.
|
|
||||||
* @param options additional options
|
|
||||||
*/
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
|
||||||
public getMessageEndpoint(id: string, id2: number, date: string, type: boolean, contenu?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
||||||
if (id === null || id === undefined) {
|
|
||||||
throw new Error('Required parameter id was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (id2 === null || id2 === undefined) {
|
|
||||||
throw new Error('Required parameter id2 was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (date === null || date === undefined) {
|
|
||||||
throw new Error('Required parameter date was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
if (type === null || type === undefined) {
|
|
||||||
throw new Error('Required parameter type was null or undefined when calling getMessageEndpoint.');
|
|
||||||
}
|
|
||||||
|
|
||||||
let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'Id',
|
|
||||||
<any>id2,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'Contenu',
|
|
||||||
<any>contenu,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'Date',
|
|
||||||
<any>date,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
|
||||||
localVarQueryParameters,
|
|
||||||
'Type',
|
|
||||||
<any>type,
|
|
||||||
QueryParamStyle.Form,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
let localVarHeaders = this.defaultHeaders;
|
|
||||||
|
|
||||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
||||||
]);
|
|
||||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
||||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
||||||
}
|
|
||||||
|
|
||||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
||||||
|
|
||||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
||||||
|
|
||||||
|
|
||||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
||||||
if (localVarHttpHeaderAcceptSelected) {
|
|
||||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
||||||
responseType_ = 'text';
|
|
||||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
||||||
responseType_ = 'json';
|
|
||||||
} else {
|
|
||||||
responseType_ = 'blob';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let localVarPath = `/API/messages/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
|
||||||
const { basePath, withCredentials } = this.configuration;
|
|
||||||
return this.httpClient.request<any>('get', `${basePath}${localVarPath}`,
|
|
||||||
{
|
|
||||||
context: localVarHttpContext,
|
|
||||||
params: localVarQueryParameters.toHttpParams(),
|
|
||||||
responseType: <any>responseType_,
|
|
||||||
...(withCredentials ? { withCredentials } : {}),
|
|
||||||
headers: localVarHeaders,
|
|
||||||
observe: observe,
|
|
||||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
||||||
reportProgress: reportProgress
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,11 @@ import { OpenApiHttpParams, QueryParamStyle } from '../query.params';
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { FastEndpointsErrorResponse } from '../model/fast-endpoints-error-response';
|
import { FastEndpointsErrorResponse } from '../model/fast-endpoints-error-response';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { KnotsDTORoleCreateRoleDto } from '../model/knots-dto-role-create-role-dto';
|
|
||||||
// @ts-ignore
|
|
||||||
import { KnotsDTORoleDeleteRoleDto } from '../model/knots-dto-role-delete-role-dto';
|
import { KnotsDTORoleDeleteRoleDto } from '../model/knots-dto-role-delete-role-dto';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsRoleCreateRoleRequest } from '../model/knots-endpoints-role-create-role-request';
|
||||||
|
// @ts-ignore
|
||||||
|
import { KnotsEndpointsRoleRoleDto } from '../model/knots-endpoints-role-role-dto';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
@@ -41,23 +43,26 @@ export class RolesService extends BaseService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint post /API/roles
|
* @endpoint post /API/roles
|
||||||
* @param knotsDTORoleCreateRoleDto
|
* @param knotsEndpointsRoleCreateRoleRequest
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
* @param reportProgress flag to report request and response progress.
|
* @param reportProgress flag to report request and response progress.
|
||||||
* @param options additional options
|
* @param options additional options
|
||||||
*/
|
*/
|
||||||
public createRoleEndpoint(knotsDTORoleCreateRoleDto: KnotsDTORoleCreateRoleDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/problem+json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
public createRoleEndpoint(knotsEndpointsRoleCreateRoleRequest: KnotsEndpointsRoleCreateRoleRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<KnotsEndpointsRoleRoleDto>;
|
||||||
public createRoleEndpoint(knotsDTORoleCreateRoleDto: KnotsDTORoleCreateRoleDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/problem+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
public createRoleEndpoint(knotsEndpointsRoleCreateRoleRequest: KnotsEndpointsRoleCreateRoleRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<KnotsEndpointsRoleRoleDto>>;
|
||||||
public createRoleEndpoint(knotsDTORoleCreateRoleDto: KnotsDTORoleCreateRoleDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/problem+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
public createRoleEndpoint(knotsEndpointsRoleCreateRoleRequest: KnotsEndpointsRoleCreateRoleRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<KnotsEndpointsRoleRoleDto>>;
|
||||||
public createRoleEndpoint(knotsDTORoleCreateRoleDto: KnotsDTORoleCreateRoleDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/problem+json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
public createRoleEndpoint(knotsEndpointsRoleCreateRoleRequest: KnotsEndpointsRoleCreateRoleRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||||
if (knotsDTORoleCreateRoleDto === null || knotsDTORoleCreateRoleDto === undefined) {
|
if (knotsEndpointsRoleCreateRoleRequest === null || knotsEndpointsRoleCreateRoleRequest === undefined) {
|
||||||
throw new Error('Required parameter knotsDTORoleCreateRoleDto was null or undefined when calling createRoleEndpoint.');
|
throw new Error('Required parameter knotsEndpointsRoleCreateRoleRequest was null or undefined when calling createRoleEndpoint.');
|
||||||
}
|
}
|
||||||
|
|
||||||
let localVarHeaders = this.defaultHeaders;
|
let localVarHeaders = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (JWTBearerAuth) required
|
||||||
|
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
|
||||||
|
|
||||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||||
'application/problem+json'
|
'application/json'
|
||||||
]);
|
]);
|
||||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||||
@@ -90,10 +95,10 @@ export class RolesService extends BaseService {
|
|||||||
|
|
||||||
let localVarPath = `/API/roles`;
|
let localVarPath = `/API/roles`;
|
||||||
const { basePath, withCredentials } = this.configuration;
|
const { basePath, withCredentials } = this.configuration;
|
||||||
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
return this.httpClient.request<KnotsEndpointsRoleRoleDto>('post', `${basePath}${localVarPath}`,
|
||||||
{
|
{
|
||||||
context: localVarHttpContext,
|
context: localVarHttpContext,
|
||||||
body: knotsDTORoleCreateRoleDto,
|
body: knotsEndpointsRoleCreateRoleRequest,
|
||||||
responseType: <any>responseType_,
|
responseType: <any>responseType_,
|
||||||
...(withCredentials ? { withCredentials } : {}),
|
...(withCredentials ? { withCredentials } : {}),
|
||||||
headers: localVarHeaders,
|
headers: localVarHeaders,
|
||||||
@@ -170,7 +175,7 @@ export class RolesService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint get /API/roles/{Libelle}
|
* @endpoint get /API/roles/{libelle}
|
||||||
* @param libelle
|
* @param libelle
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
* @param reportProgress flag to report request and response progress.
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ export class UsersService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint get /API/users/{Username}
|
* @endpoint get /API/users/{username}
|
||||||
* @param username
|
* @param username
|
||||||
* @param description
|
* @param description
|
||||||
* @param password
|
* @param password
|
||||||
@@ -266,7 +266,7 @@ export class UsersService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Description',
|
'description',
|
||||||
<any>description,
|
<any>description,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -275,7 +275,7 @@ export class UsersService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Password',
|
'password',
|
||||||
<any>password,
|
<any>password,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -284,7 +284,7 @@ export class UsersService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Email',
|
'email',
|
||||||
<any>email,
|
<any>email,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -293,7 +293,7 @@ export class UsersService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'Tel',
|
'tel',
|
||||||
<any>tel,
|
<any>tel,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -302,7 +302,7 @@ export class UsersService extends BaseService {
|
|||||||
|
|
||||||
localVarQueryParameters = this.addToHttpParams(
|
localVarQueryParameters = this.addToHttpParams(
|
||||||
localVarQueryParameters,
|
localVarQueryParameters,
|
||||||
'ProfilePicture',
|
'profilePicture',
|
||||||
<any>profilePicture,
|
<any>profilePicture,
|
||||||
QueryParamStyle.Form,
|
QueryParamStyle.Form,
|
||||||
true,
|
true,
|
||||||
@@ -415,7 +415,7 @@ export class UsersService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint patch /API/users/{Id}/contact
|
* @endpoint patch /API/users/{id}/contact
|
||||||
* @param id
|
* @param id
|
||||||
* @param knotsDTOUserUpdateUserContactDto
|
* @param knotsDTOUserUpdateUserContactDto
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
@@ -553,7 +553,7 @@ export class UsersService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @endpoint patch /API/users/{Id}/password
|
* @endpoint patch /API/users/{id}/password
|
||||||
* @param id
|
* @param id
|
||||||
* @param knotsDTOUserUpdateUserPasswordDto
|
* @param knotsDTOUserUpdateUserPasswordDto
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTODiscussionCreateDiscussionDto {
|
export interface KnotsDTODiscussionCreateDiscussionDto {
|
||||||
id?: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTODiscussionDeleteDiscussionDto {
|
export interface KnotsDTODiscussionDeleteDiscussionDto {
|
||||||
id?: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOGroupCreateGroupDto {
|
export interface KnotsDTOGroupCreateGroupDto {
|
||||||
nom?: string | null;
|
nom: string;
|
||||||
nombreMembres?: number;
|
nombreMembres: number;
|
||||||
profilePicture?: string | null;
|
profilePicture?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOGroupDeleteGroupDto {
|
export interface KnotsDTOGroupDeleteGroupDto {
|
||||||
id?: number | null;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOGroupUpdateGroupMembersAmountDto {
|
export interface KnotsDTOGroupUpdateGroupMembersAmountDto {
|
||||||
membersAmount?: number;
|
membersAmount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOGroupUpdateGroupNameDto {
|
export interface KnotsDTOGroupUpdateGroupNameDto {
|
||||||
name?: string | null;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOKeyCreateKeyDto {
|
export interface KnotsDTOKeyCreateKeyDto {
|
||||||
enKey?: string | null;
|
enKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOKeyDeleteKeyDto {
|
export interface KnotsDTOKeyDeleteKeyDto {
|
||||||
id?: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOMessageCreateMessageDto {
|
export interface KnotsDTOMessageCreateMessageDto {
|
||||||
contenu?: string | null;
|
contenu: string;
|
||||||
date?: string;
|
date: string;
|
||||||
type?: boolean;
|
type: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsDTOMessageGetMessageDetailsDto {
|
||||||
|
id?: number;
|
||||||
|
contenu?: string | null;
|
||||||
|
date?: string;
|
||||||
|
type?: boolean;
|
||||||
|
userId?: number;
|
||||||
|
authorName?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTORoleDeleteRoleDto {
|
export interface KnotsDTORoleDeleteRoleDto {
|
||||||
id?: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
export interface KnotsDTOUserUpdateUserContactDto {
|
export interface KnotsDTOUserUpdateUserContactDto {
|
||||||
email?: string | null;
|
email: string;
|
||||||
tel?: string | null;
|
tel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,6 @@
|
|||||||
|
|
||||||
export interface KnotsDTOUserUpdateUserProfilePictureDto {
|
export interface KnotsDTOUserUpdateUserProfilePictureDto {
|
||||||
id?: number;
|
id?: number;
|
||||||
profilePicture?: string | null;
|
profilePicture: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,6 @@
|
|||||||
|
|
||||||
export interface KnotsDTOUserUpdateUsernameDto {
|
export interface KnotsDTOUserUpdateUsernameDto {
|
||||||
id?: number;
|
id?: number;
|
||||||
username?: string | null;
|
username: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsEndpointsDiscussionCreateGroupDiscussionRequest {
|
||||||
|
groupName?: string;
|
||||||
|
usernames?: Array<string>;
|
||||||
|
}
|
||||||
|
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsEndpointsDiscussionCreatePrivateDiscussionRequest {
|
||||||
|
username?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsEndpointsDiscussionMemberWithRoleDto {
|
||||||
|
userId?: number;
|
||||||
|
username?: string;
|
||||||
|
roleId?: number | null;
|
||||||
|
roleLibelle?: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
+2
-2
@@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
export interface KnotsDTORoleCreateRoleDto {
|
export interface KnotsEndpointsRoleAssignRoleRequest {
|
||||||
libelle?: string | null;
|
roleId?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsEndpointsRoleCreateRoleRequest {
|
||||||
|
libelle?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* Knots
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* https://openapi-generator.tech
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
export interface KnotsEndpointsRoleRoleDto {
|
||||||
|
id?: number;
|
||||||
|
libelle?: string;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ export * from './knots-dto-key-create-key-dto';
|
|||||||
export * from './knots-dto-key-delete-key-dto';
|
export * from './knots-dto-key-delete-key-dto';
|
||||||
export * from './knots-dto-message-create-message-dto';
|
export * from './knots-dto-message-create-message-dto';
|
||||||
export * from './knots-dto-message-delete-message-dto';
|
export * from './knots-dto-message-delete-message-dto';
|
||||||
export * from './knots-dto-role-create-role-dto';
|
export * from './knots-dto-message-get-message-details-dto';
|
||||||
export * from './knots-dto-role-delete-role-dto';
|
export * from './knots-dto-role-delete-role-dto';
|
||||||
export * from './knots-dto-user-create-user-dto';
|
export * from './knots-dto-user-create-user-dto';
|
||||||
export * from './knots-dto-user-delete-user-dto';
|
export * from './knots-dto-user-delete-user-dto';
|
||||||
@@ -22,3 +22,9 @@ export * from './knots-dto-user-update-user-description-dto';
|
|||||||
export * from './knots-dto-user-update-user-password-dto';
|
export * from './knots-dto-user-update-user-password-dto';
|
||||||
export * from './knots-dto-user-update-user-profile-picture-dto';
|
export * from './knots-dto-user-update-user-profile-picture-dto';
|
||||||
export * from './knots-dto-user-update-username-dto';
|
export * from './knots-dto-user-update-username-dto';
|
||||||
|
export * from './knots-endpoints-discussion-create-group-discussion-request';
|
||||||
|
export * from './knots-endpoints-discussion-create-private-discussion-request';
|
||||||
|
export * from './knots-endpoints-discussion-member-with-role-dto';
|
||||||
|
export * from './knots-endpoints-role-assign-role-request';
|
||||||
|
export * from './knots-endpoints-role-create-role-request';
|
||||||
|
export * from './knots-endpoints-role-role-dto';
|
||||||
|
|||||||
Reference in New Issue
Block a user