Compare commits

...

2 Commits

Author SHA1 Message Date
db4a851a81 . 2025-12-04 17:54:31 +01:00
eb403c3aac avancement planning 2025-12-04 17:54:16 +01:00
56 changed files with 7264 additions and 598 deletions

1781
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
module.exports = {
printWidth: 160,
tabWidth: 4,
singleQuote: true,
endOfLine: 'lf',
trailingComma: 'none',
arrowParens: 'avoid'
};

25
node_modules/encoding/.travis.yml generated vendored
View File

@@ -1,25 +0,0 @@
language: node_js
sudo: false
node_js:
- "0.10"
- 0.12
- iojs
- 4
- 5
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
notifications:
email:
- andris@kreata.ee
webhooks:
urls:
- https://webhooks.gitter.im/e/0ed18fd9b3e529b3c2cc
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false

16
node_modules/encoding/LICENSE generated vendored
View File

@@ -1,16 +0,0 @@
Copyright (c) 2012-2014 Andris Reinman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

41
node_modules/encoding/README.md generated vendored
View File

@@ -1,41 +0,0 @@
# Encoding
**encoding** is a simple wrapper around [iconv-lite](https://github.com/ashtuchkin/iconv-lite/) to convert strings from one encoding to another.
[![Build Status](https://secure.travis-ci.org/andris9/encoding.svg)](http://travis-ci.org/andris9/Nodemailer)
[![npm version](https://badge.fury.io/js/encoding.svg)](http://badge.fury.io/js/encoding)
Initially _encoding_ was a wrapper around _node-iconv_ (main) and _iconv-lite_ (fallback) and was used as the encoding layer for Nodemailer/mailparser. Somehow it also ended up as a dependency for a bunch of other project, none of these actually using _node-iconv_. The loading mechanics caused issues for front-end projects and Nodemailer/malparser had moved on, so _node-iconv_ was removed.
## Install
Install through npm
npm install encoding
## Usage
Require the module
var encoding = require("encoding");
Convert with encoding.convert()
var resultBuffer = encoding.convert(text, toCharset, fromCharset);
Where
- **text** is either a Buffer or a String to be converted
- **toCharset** is the characterset to convert the string
- **fromCharset** (_optional_, defaults to UTF-8) is the source charset
Output of the conversion is always a Buffer object.
Example
var result = encoding.convert("ÕÄÖÜ", "Latin_1");
console.log(result); //<Buffer d5 c4 d6 dc>
## License
**MIT**

View File

@@ -1,83 +0,0 @@
'use strict';
var iconvLite = require('iconv-lite');
// Expose to the world
module.exports.convert = convert;
/**
* Convert encoding of an UTF-8 string or a buffer
*
* @param {String|Buffer} str String to be converted
* @param {String} to Encoding to be converted to
* @param {String} [from='UTF-8'] Encoding to be converted from
* @return {Buffer} Encoded string
*/
function convert(str, to, from) {
from = checkEncoding(from || 'UTF-8');
to = checkEncoding(to || 'UTF-8');
str = str || '';
var result;
if (from !== 'UTF-8' && typeof str === 'string') {
str = Buffer.from(str, 'binary');
}
if (from === to) {
if (typeof str === 'string') {
result = Buffer.from(str);
} else {
result = str;
}
} else {
try {
result = convertIconvLite(str, to, from);
} catch (E) {
console.error(E);
result = str;
}
}
if (typeof result === 'string') {
result = Buffer.from(result, 'utf-8');
}
return result;
}
/**
* Convert encoding of astring with iconv-lite
*
* @param {String|Buffer} str String to be converted
* @param {String} to Encoding to be converted to
* @param {String} [from='UTF-8'] Encoding to be converted from
* @return {Buffer} Encoded string
*/
function convertIconvLite(str, to, from) {
if (to === 'UTF-8') {
return iconvLite.decode(str, from);
} else if (from === 'UTF-8') {
return iconvLite.encode(str, to);
} else {
return iconvLite.encode(iconvLite.decode(str, from), to);
}
}
/**
* Converts charset name if needed
*
* @param {String} name Character set
* @return {String} Character set name
*/
function checkEncoding(name) {
return (name || '')
.toString()
.trim()
.replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1')
.replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1')
.replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1')
.replace(/^ks_c_5601\-1987$/i, 'CP949')
.replace(/^us[\-_]?ascii$/i, 'ASCII')
.toUpperCase();
}

18
node_modules/encoding/package.json generated vendored
View File

@@ -1,18 +0,0 @@
{
"name": "encoding",
"version": "0.1.13",
"description": "Convert encodings, uses iconv-lite",
"main": "lib/encoding.js",
"scripts": {
"test": "nodeunit test"
},
"repository": "https://github.com/andris9/encoding.git",
"author": "Andris Reinman",
"license": "MIT",
"dependencies": {
"iconv-lite": "^0.6.2"
},
"devDependencies": {
"nodeunit": "0.11.3"
}
}

49
node_modules/encoding/test/test.js generated vendored
View File

@@ -1,49 +0,0 @@
'use strict';
var encoding = require('../lib/encoding');
exports['General tests'] = {
'From UTF-8 to Latin_1': function (test) {
var input = 'ÕÄÖÜ',
expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]);
test.deepEqual(encoding.convert(input, 'latin1'), expected);
test.done();
},
'From Latin_1 to UTF-8': function (test) {
var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]),
expected = 'ÕÄÖÜ';
test.deepEqual(encoding.convert(input, 'utf-8', 'latin1').toString(), expected);
test.done();
},
'From UTF-8 to UTF-8': function (test) {
var input = 'ÕÄÖÜ',
expected = Buffer.from('ÕÄÖÜ');
test.deepEqual(encoding.convert(input, 'utf-8', 'utf-8'), expected);
test.done();
},
'From Latin_13 to Latin_15': function (test) {
var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]),
expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xa6]);
test.deepEqual(encoding.convert(input, 'latin_15', 'latin13'), expected);
test.done();
}
/*
// ISO-2022-JP is not supported by iconv-lite
"From ISO-2022-JP to UTF-8 with Iconv": function (test) {
var input = Buffer.from(
"GyRCM1g5OzU7PVEwdzgmPSQ4IUYkMnFKczlwGyhC",
"base64"
),
expected = Buffer.from(
"5a2m5qCh5oqA6KGT5ZOh56CU5L+u5qSc6KiO5Lya5aCx5ZGK",
"base64"
);
test.deepEqual(encoding.convert(input, "utf-8", "ISO-2022-JP"), expected);
test.done();
},
*/
};

3
openapi-generator.yaml Normal file
View File

@@ -0,0 +1,3 @@
additionalProperties:
fileNaming: kebab-case
modelPropertyNaming: camelCase

7
openapitools.json Normal file
View File

@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.17.0"
}
}

1783
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,8 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development"
"watch": "ng build --watch --configuration development",
"openapi": "rimraf src/app/services/api && openapi-generator-cli generate -i http://localhost:5298/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml"
},
"private": true,
"dependencies": {
@@ -15,6 +16,7 @@
"@angular/forms": "^20.2.0-next",
"@angular/platform-browser": "^20.2.0-next",
"@angular/router": "^20.2.0-next",
"@openapitools/openapi-generator-cli": "^2.25.2",
"ng-zorro-antd": "^20.4.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
@@ -26,6 +28,7 @@
"@angular/compiler-cli": "^20.2.0-next",
"@types/node": "^16.11.35",
"less": "^4.2.0",
"rimraf": "^6.1.2",
"ts-node": "~10.9.0",
"typescript": "~5.8.0"
}

View File

@@ -1,14 +1,17 @@
.background {
padding: 20px;
min-height: 100vh;
background: #f5f5f0;
height: 100vh;
overflow: hidden;
background: linear-gradient(135deg, #f5f5f0 0%, #faf8f5 100%);
padding: 15px;
box-sizing: border-box;
}
.planning-container {
.planning {
height: 100%;
display: grid;
grid-template-columns: 300px 1fr;
gap: 20px;
max-width: 1400px;
grid-template-columns: 280px 1fr 240px;
gap: 15px;
max-width: 100%;
margin: 0 auto;
}
@@ -16,80 +19,98 @@
.calendar-section {
display: flex;
flex-direction: column;
gap: 15px;
gap: 12px;
overflow: hidden;
}
.calendar-title {
font-size: 18px;
font-weight: 600;
font-size: 16px;
font-weight: 700;
color: #333;
letter-spacing: 1px;
letter-spacing: 1.5px;
padding-left: 5px;
}
.calendar-date-info {
display: flex;
align-items: center;
gap: 15px;
padding: 15px;
gap: 12px;
padding: 14px;
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
border-radius: 14px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
transition: transform 0.2s ease;
}
.calendar-date-info:hover {
transform: translateY(-2px);
}
.date-badge {
background: #8b7b8b;
background: linear-gradient(135deg, var(--mauve) 0%, #8b7ba8 100%);
color: white;
padding: 10px;
border-radius: 8px;
border-radius: 10px;
text-align: center;
min-width: 60px;
min-width: 55px;
box-shadow: 0 3px 10px rgba(106, 90, 139, 0.3);
}
.month-abbr {
font-size: 12px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.day-number {
font-size: 24px;
font-weight: 700;
line-height: 1;
margin-top: 2px;
}
.date-full {
display: flex;
flex-direction: column;
gap: 2px;
}
.date-text {
font-size: 14px;
font-size: 13px;
font-weight: 600;
color: #333;
}
.day-text {
font-size: 13px;
font-size: 12px;
color: #999;
font-weight: 500;
}
.card {
background: #fefdfb;
border: 2px solid #d4a574;
border-radius: 20px;
padding: 15px;
box-shadow: 0 4px 12px rgba(212, 165, 116, 0.1);
background: white;
border: 2px solid var(--ugly-yellow);
border-radius: 16px;
padding: 16px;
box-shadow: 0 3px 12px rgba(212, 165, 116, 0.15);
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.calendar-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 5px 0 15px;
padding: 0 0 14px;
}
.month-title {
font-size: 18px;
font-weight: 600;
color: #d4a574;
font-size: 16px;
font-weight: 700;
color: var(--ugly-yellow);
margin: 0;
}
@@ -103,16 +124,20 @@
justify-content: center;
transition: all 0.2s ease;
opacity: 0.7;
border-radius: 6px;
}
.nav-button:hover {
opacity: 1;
background: rgba(212, 165, 116, 0.1);
transform: scale(1.1);
}
/* Styles pour le calendrier NG-ZORRO */
::ng-deep .card nz-calendar {
background: transparent;
flex: 1;
overflow: hidden;
}
::ng-deep .card .ant-picker-calendar {
@@ -134,43 +159,40 @@
::ng-deep .card thead th {
color: #8b6f47;
font-weight: 600;
font-size: 11px;
font-size: 10px;
padding: 8px 0;
text-align: center;
border-bottom: none;
text-transform: uppercase;
}
::ng-deep .card .ant-picker-cell {
padding: 4px 0;
padding: 2px 0;
text-align: center;
}
::ng-deep .card .ant-picker-cell-inner {
width: 32px;
height: 32px;
line-height: 32px;
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 8px;
margin: 0 auto;
color: #d4a574;
font-size: 13px;
font-weight: 500;
color: var(--ugly-yellow);
font-size: 12px;
font-weight: 600;
transition: all 0.2s ease;
background: transparent;
}
::ng-deep .card .ant-picker-cell:hover .ant-picker-cell-inner {
background: #f9f3ec;
background: rgba(212, 165, 116, 0.15);
transform: scale(1.05);
}
::ng-deep .card .ant-picker-cell-inner.in-selection {
background: #d4a574 !important;
background: linear-gradient(135deg, var(--ugly-yellow) 0%, #c49563 100%) !important;
color: white !important;
box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}
::ng-deep .card .ant-picker-cell-inner.in-selection:hover {
background: #c49563 !important;
box-shadow: 0 2px 8px rgba(212, 165, 116, 0.4);
}
::ng-deep .card .ant-picker-cell-disabled .ant-picker-cell-inner {
@@ -178,127 +200,107 @@
}
::ng-deep .card tbody tr {
height: 40px;
height: 36px;
}
/* Section Planning (droite) */
/* Section Planning (centre) */
.week-section {
background: white;
border-radius: 20px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
padding: 20px;
border-radius: 16px;
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
padding: 18px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.empty-state {
display: flex;
align-items: center;
justify-content: center;
min-height: 500px;
}
.empty-message {
text-align: center;
color: #999;
font-size: 14px;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
.week-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
padding-bottom: 14px;
border-bottom: 2px solid #f0f0f0;
margin-bottom: 15px;
margin-bottom: 14px;
}
.week-actions {
display: flex;
gap: 10px;
gap: 8px;
}
.action-btn {
padding: 8px 16px;
border: 1px solid #d9d9d9;
display: flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border: 2px solid #e0e0e0;
background: white;
border-radius: 6px;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
font-size: 12px;
font-weight: 600;
transition: all 0.2s ease;
color: #666;
}
.action-btn:hover {
border-color: #d4a574;
border-color: var(--ugly-yellow);
background: rgba(212, 165, 116, 0.05);
transform: translateY(-1px);
}
.action-btn.active {
background: #d4a574;
background: linear-gradient(135deg, var(--ugly-yellow) 0%, #c49563 100%);
color: white;
border-color: #d4a574;
border-color: var(--ugly-yellow);
box-shadow: 0 3px 10px rgba(212, 165, 116, 0.3);
}
.week-nav {
display: flex;
align-items: center;
gap: 15px;
}
.today-label {
font-weight: 600;
color: #999;
font-size: 14px;
gap: 10px;
}
.today-btn {
padding: 8px 16px;
padding: 8px 14px;
background: white;
border: 1px solid #d9d9d9;
border-radius: 6px;
border: 2px solid #e0e0e0;
border-radius: 8px;
cursor: pointer;
font-size: 13px;
font-size: 12px;
font-weight: 600;
transition: all 0.2s ease;
color: #666;
}
.today-btn:hover {
border-color: #8b7b8b;
}
.new-project-btn {
padding: 8px 20px;
background: #8b7b8b;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
font-size: 13px;
transition: all 0.2s ease;
}
.new-project-btn:hover {
background: #7a6a7a;
border-color: var(--mauve);
background: rgba(106, 90, 139, 0.05);
transform: translateY(-1px);
}
.week-calendar {
overflow-x: auto;
position: relative;
}
.week-nav-header {
position: absolute;
top: 8px;
right: 20px;
display: flex;
gap: 8px;
z-index: 10;
}
.nav-button-week {
background: white;
border: 1px solid #e0e0e0;
border-radius: 4px;
padding: 4px 8px;
border: 2px solid #e0e0e0;
border-radius: 6px;
padding: 6px 8px;
cursor: pointer;
display: flex;
align-items: center;
@@ -308,37 +310,47 @@
.nav-button-week:hover {
border-color: #999;
background: #f9f9f9;
transform: scale(1.05);
}
.week-calendar {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
}
.week-grid {
display: grid;
grid-template-columns: 70px repeat(7, 1fr);
grid-template-columns: 50px repeat(7, 1fr);
gap: 0;
min-width: 900px;
height: 100%;
overflow: hidden;
}
.time-column {
border-right: 1px solid #e8e8e8;
border-right: 2px solid #f0f0f0;
}
.time-header {
height: 70px;
height: 50px;
border-bottom: 2px solid #e8e8e8;
}
.time-slot {
height: 70px;
height: 60px;
display: flex;
align-items: flex-start;
justify-content: center;
padding-top: 5px;
font-size: 11px;
font-size: 10px;
color: #999;
border-bottom: 1px solid #f0f0f0;
font-weight: 600;
border-bottom: 1px solid #f5f5f5;
}
.day-column {
border-right: 1px solid #e8e8e8;
border-right: 1px solid #f0f0f0;
}
.day-column:last-child {
@@ -346,34 +358,37 @@
}
.day-header {
height: 70px;
height: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-bottom: 2px solid #e8e8e8;
background: #fafafa;
transition: all 0.2s ease;
transition: all 0.3s ease;
gap: 2px;
}
.day-header.today {
background: #8b7b8b;
background: linear-gradient(135deg, var(--mauve) 0%, #8b7ba8 100%);
color: white;
box-shadow: 0 3px 10px rgba(106, 90, 139, 0.3);
}
.day-name {
font-size: 13px;
font-weight: 600;
margin-bottom: 3px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.5px;
}
.day-date {
font-size: 11px;
color: #999;
font-size: 16px;
font-weight: 700;
color: var(--ugly-yellow);
}
.day-header.today .day-date {
color: rgba(255, 255, 255, 0.8);
color: white;
}
.day-slots {
@@ -382,14 +397,203 @@
}
.hour-slot {
height: 70px;
border-bottom: 1px solid #f0f0f0;
height: 60px;
border-bottom: 1px solid #f5f5f5;
padding: 3px;
position: relative;
transition: background 0.2s ease;
transition: all 0.2s ease;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.hour-slot:hover {
background: #f9f9f9;
cursor: pointer;
background: rgba(212, 165, 116, 0.08);
}
.hour-slot.selected {
background: rgba(212, 165, 116, 0.2);
border-left: 3px solid var(--ugly-yellow);
}
.slot-indicator {
width: 10px;
height: 10px;
background: var(--ugly-yellow);
border-radius: 50%;
box-shadow: 0 2px 6px rgba(212, 165, 116, 0.4);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.2);
opacity: 0.8;
}
}
/* Sidebar (droite) */
.sidebar-section {
background: white;
border-radius: 16px;
box-shadow: 0 3px 16px rgba(0, 0, 0, 0.08);
padding: 18px;
overflow-y: auto;
max-height: 100%;
}
.sidebar-section::-webkit-scrollbar {
width: 6px;
}
.sidebar-section::-webkit-scrollbar-track {
background: #f0f0f0;
border-radius: 10px;
}
.sidebar-section::-webkit-scrollbar-thumb {
background: var(--ugly-yellow);
border-radius: 10px;
}
.sidebar-header {
padding-bottom: 14px;
border-bottom: 2px solid #f0f0f0;
margin-bottom: 14px;
}
.sidebar-title {
font-size: 16px;
font-weight: 700;
color: #333;
margin: 0;
}
.sidebar-content {
display: flex;
flex-direction: column;
gap: 14px;
}
.sidebar-block {
padding: 14px;
background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
border-radius: 12px;
border-left: 3px solid var(--ugly-yellow);
transition: all 0.2s ease;
}
.sidebar-block:hover {
transform: translateX(3px);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.sidebar-block h4 {
font-size: 12px;
font-weight: 700;
color: #333;
margin: 0 0 10px 0;
display: flex;
align-items: center;
gap: 6px;
}
.sidebar-block p {
font-size: 12px;
color: #666;
margin: 0;
line-height: 1.4;
}
.slot-info {
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 10px;
}
.slot-info p {
padding: 8px 10px;
background: white;
border-radius: 6px;
border-left: 3px solid var(--ugly-yellow);
}
.sidebar-btn {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
padding: 10px 12px;
margin-bottom: 8px;
background: white;
border: 2px solid #e0e0e0;
border-radius: 8px;
cursor: pointer;
font-size: 11px;
font-weight: 600;
transition: all 0.2s ease;
color: #666;
}
.sidebar-btn:hover {
background: rgba(212, 165, 116, 0.05);
border-color: var(--ugly-yellow);
transform: translateY(-1px);
}
.sidebar-btn.primary {
background: linear-gradient(135deg, var(--ugly-yellow) 0%, #c49563 100%);
color: white;
border-color: var(--ugly-yellow);
box-shadow: 0 3px 10px rgba(212, 165, 116, 0.3);
}
.sidebar-btn.primary:hover {
box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}
.sidebar-btn:last-child {
margin-bottom: 0;
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
margin-top: 10px;
}
.stat-item {
background: white;
padding: 12px;
border-radius: 8px;
text-align: center;
border: 2px solid #f0f0f0;
transition: all 0.2s ease;
}
.stat-item:hover {
border-color: var(--ugly-yellow);
transform: translateY(-1px);
}
.stat-value {
font-size: 20px;
font-weight: 700;
color: var(--ugly-yellow);
margin-bottom: 3px;
}
.stat-label {
font-size: 9px;
color: #999;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}

View File

@@ -1,41 +1,40 @@
<div class="background">
<div class="planning-container">
<div class="planning">
<!-- Calendrier à gauche -->
<div class="calendar-section">
<div class="calendar-title">CALENDAR</div>
<div class="calendar-title">CALENDRIER</div>
<div class="calendar-date-info">
<div class="date-badge">
<div class="month-abbr">JAN</div>
<div class="day-number">21</div>
<div class="month-abbr">{{ getCurrentMonth() }}</div>
<div class="day-number">{{ getCurrentDay() }}</div>
</div>
<div class="date-full">
<div class="date-text">21 janvier 2026</div>
<div class="day-text">Mercredi</div>
<div class="date-text">{{ getCurrentDate() }}</div>
<div class="day-text">{{ getDayWeek() }}</div>
</div>
</div>
<div class="card">
<div class="calendar-header">
<button class="nav-button" (click)="previousMonth()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
<path d="M15 18L9 12L15 6" stroke="#d4a574" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<h2 class="month-title">{{ currentMonthYear }}</h2>
<button class="nav-button" (click)="nextMonth()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none">
<path d="M9 18L15 12L9 6" stroke="#d4a574" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
<nz-calendar
[nzFullscreen]="false"
[ngModel]="currentDate"
(nzSelectChange)="onValueChange($event)"
(nzPanelChange)="onPanelChange($event)"
[nzDateFullCell]="dateCellTemplate"
[nzFullscreen]="false"
[ngModel]="currentDate"
(nzSelectChange)="onValueChange($event)"
(nzPanelChange)="onPanelChange($event)"
[nzDateFullCell]="dateCellTemplate"
></nz-calendar>
<ng-template #dateCellTemplate let-date>
<div class="ant-picker-cell-inner" [class.in-selection]="isDateSelected(date)">
{{ date.getDate() }}
@@ -44,37 +43,45 @@
</div>
</div>
<!-- Planning de la semaine à droite -->
<!-- Planning de la semaine au centre -->
<div class="week-section" *ngIf="selectedDates.length > 0">
<div class="week-toolbar">
<div class="week-actions">
<button class="action-btn">Lorem</button>
<button class="action-btn active">Camion</button>
<button class="action-btn">Show</button>
<button [class]="isCamionFilterActive ? 'action-btn active' : 'action-btn'" (click)="camionFilter()">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<rect x="1" y="3" width="15" height="13" rx="2" ry="2" stroke-width="2"/>
<path d="M16 8h5l3 3v5h-4" stroke-width="2"/>
<circle cx="5.5" cy="18.5" r="2.5" stroke-width="2"/>
<circle cx="18.5" cy="18.5" r="2.5" stroke-width="2"/>
</svg>
Camion
</button>
<button [class]="isShowFilterActive ? 'action-btn active' : 'action-btn'" (click)="showFilter()">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<circle cx="11" cy="11" r="8" stroke-width="2"/>
<path d="M21 21l-4.35-4.35" stroke-width="2" stroke-linecap="round"/>
</svg>
Show
</button>
</div>
<div class="week-nav">
<span class="today-label">LOREM</span>
<button class="today-btn" (click)="goToToday()">
< TODAY >
<button class="nav-button-week" (click)="previousWeek()">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<path d="M15 18L9 12L15 6" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<button class="today-btn" (click)="goToToday()">
Aujourd'hui
</button>
<button class="nav-button-week" (click)="nextWeek()">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none">
<path d="M9 18L15 12L9 6" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<button class="new-project-btn">NEW PROJECT</button>
</div>
</div>
<div class="week-calendar">
<div class="week-nav-header">
<button class="nav-button-week" (click)="previousWeek()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M15 18L9 12L15 6" stroke="#999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<button class="nav-button-week" (click)="nextWeek()">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M9 18L15 12L9 6" stroke="#999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
<div class="week-grid">
<!-- Colonne des heures -->
<div class="time-column">
@@ -88,11 +95,14 @@
<div class="day-column" *ngFor="let date of selectedDates">
<div class="day-header" [class.today]="isToday(date)">
<div class="day-name">{{ getDayName(date) }}</div>
<div class="day-date">{{ formatDate(date) }}</div>
<div class="day-date">{{ date.getDate() }}</div>
</div>
<div class="day-slots">
<div class="hour-slot" *ngFor="let hour of getHours()">
<!-- Ici on peut ajouter des événements plus tard -->
<div class="hour-slot"
*ngFor="let hour of getHours()"
(click)="selectSlot(date, hour)"
[class.selected]="isSlotSelected(date, hour)">
<div class="slot-indicator" *ngIf="isSlotSelected(date, hour)"></div>
</div>
</div>
</div>
@@ -103,8 +113,90 @@
<!-- Message si aucune semaine sélectionnée -->
<div class="week-section empty-state" *ngIf="selectedDates.length === 0">
<div class="empty-message">
<p>Sélectionnez une date dans le calendrier pour voir le planning de la semaine</p>
<p>Sélectionnez une date dans le calendrier</p>
</div>
</div>
<!-- Sidebar à droite -->
<div class="sidebar-section">
<div class="sidebar-header">
<h3 class="sidebar-title">Détails</h3>
</div>
<div class="sidebar-content">
<div class="sidebar-block" *ngIf="selectedSlot">
<h4>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<circle cx="12" cy="12" r="10" stroke-width="2"/>
<polyline points="12 6 12 12 16 14" stroke-width="2" stroke-linecap="round"/>
</svg>
Spéctacle sélectionné :
</h4>
<div class="slot-info">
@for (show of shows(); track show.id) {
<p><strong>{{ show.name }}</strong></p>
<p>{{ show.place }}</p>
<p>{{ show.date }}</p>
<p>{{ show.description }}</p>
}
</div>
</div>
<div class="sidebar-block">
<h4>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
Statistiques
</h4>
<div class="stats-grid">
<div class="stat-item">
<div class="stat-value">{{ getTotalEvents() }}</div>
<div class="stat-label">Événements</div>
</div>
<div class="stat-item">
<div class="stat-value">S{{ getWeekNumber() }}</div>
<div class="stat-label">Semaine</div>
</div>
</div>
</div>
<div class="sidebar-block">
<h4>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<circle cx="12" cy="12" r="3" stroke-width="2"/>
<path d="M12 1v6m0 6v6M1 12h6m6 0h6" stroke-width="2" stroke-linecap="round"/>
</svg>
Actions rapides
</h4>
<button class="sidebar-btn" nzType="default" (click)="showModal()">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M12 5v14M5 12h14" stroke-width="2" stroke-linecap="round"/>
</svg>
<span>Créer événement</span>
</button>
<nz-modal
(nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()"
[(nzVisible)]="isVisible"
nzCentered
nzDraggable
nzTitle="Création d'évènement"
>
<ng-container *nzModalContent>
<p>Just don't learn physics at school and your life will be full of magic and miracles.</p>
<p>Day before yesterday I saw a rabbit, and yesterday a deer, and today, you.</p>
</ng-container>
</nz-modal>
<button class="sidebar-btn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" stroke-width="2"/>
<polyline points="14 2 14 8 20 8" stroke-width="2"/>
</svg>
Voir rapports
</button>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@@ -1,106 +1,234 @@
import { Component } from '@angular/core';
import {Component, inject, OnInit, signal} from '@angular/core';
import { NzCalendarMode, NzCalendarModule } from 'ng-zorro-antd/calendar';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {ReadShowDto, ShowsService} from "../../../services/api";
import {firstValueFrom} from "rxjs";
import {NzTableComponent} from "ng-zorro-antd/table";
import {NzModalComponent, NzModalModule} from "ng-zorro-antd/modal";
import {NzButtonModule} from "ng-zorro-antd/button";
@Component({
selector: 'app-planning',
imports: [NzCalendarModule, CommonModule, FormsModule],
templateUrl: './planning.html',
styleUrl: './planning.css',
selector: 'app-planning',
imports: [NzCalendarModule, CommonModule, FormsModule, NzModalComponent, NzButtonModule, NzModalModule],
templateUrl: './planning.html',
styleUrl: './planning.css',
})
export class Planning {
currentDate: Date = new Date();
selectedDates: Date[] = [];
monthNames = ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'];
mode: NzCalendarMode = 'month';
export class Planning implements OnInit{
private showsServices = inject(ShowsService)
get currentMonthYear(): string {
return `${this.monthNames[this.currentDate.getMonth()]} ${this.currentDate.getFullYear()}`;
}
shows = signal<ReadShowDto[]>([]);
onValueChange(value: Date): void {
console.log(`Current value: ${value}`);
this.currentDate = value;
// Sélectionner la date cliquée + les 6 jours suivants (7 jours au total)
this.selectedDates = [];
for (let i = 0; i < 7; i++) {
const date = new Date(value);
date.setDate(date.getDate() + i);
this.selectedDates.push(date);
async ngOnInit(){
await this.fetchShows();
}
console.log('Selected dates:', this.selectedDates);
}
onPanelChange(change: { date: Date; mode: string }): void {
console.log(`Current value: ${change.date}`);
console.log(`Current mode: ${change.mode}`);
this.currentDate = change.date;
}
previousMonth(): void {
const newDate = new Date(this.currentDate);
newDate.setMonth(newDate.getMonth() - 1);
this.currentDate = newDate;
}
nextMonth(): void {
const newDate = new Date(this.currentDate);
newDate.setMonth(newDate.getMonth() + 1);
this.currentDate = newDate;
}
previousWeek(): void {
if (this.selectedDates.length > 0) {
const newDate = new Date(this.selectedDates[0]);
newDate.setDate(newDate.getDate() - 7);
this.onValueChange(newDate);
async fetchShows() {
const shows = await firstValueFrom(this.showsServices.getAllShowsEndpoint());
this.shows.set(shows);
}
}
nextWeek(): void {
if (this.selectedDates.length > 0) {
const newDate = new Date(this.selectedDates[0]);
newDate.setDate(newDate.getDate() + 7);
this.onValueChange(newDate);
isVisible = false;
showModal(): void {
if (!this.isVisible) {
this.isVisible = true;
}
else {
this.isVisible = false;
}
}
}
goToToday(): void {
const today = new Date();
this.onValueChange(today);
}
handleOk(): void {
console.log('Button ok clicked!');
this.isVisible = false;
}
isDateSelected(date: Date): boolean {
return this.selectedDates.some(selectedDate =>
selectedDate.getFullYear() === date.getFullYear() &&
selectedDate.getMonth() === date.getMonth() &&
selectedDate.getDate() === date.getDate()
);
}
handleCancel(): void {
console.log('Button cancel clicked!');
this.isVisible = false;
}
isToday(date: Date): boolean {
const today = new Date();
return date.getDate() === today.getDate() &&
date.getMonth() === today.getMonth() &&
date.getFullYear() === today.getFullYear();
}
getDayName(date: Date): string {
const days = ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'];
return days[date.getDay()];
}
selectSlot(date: Date, hour: string): void {
this.selectedSlot = { date, hour };
console.log('Slot sélectionné:', date, hour);
}
formatDate(date: Date): string {
const days = ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'];
return `${days[date.getDay()]} ${date.getDate()} ${date.getFullYear()}`;
}
getHours(): string[] {
return ['8 AM', '10 AM', '11 AM', '12 PM', '14 PM', '16 PM', '18 PM'];
}
}
currentDate: Date = new Date();
selectedDates: Date[] = [];
monthNames = ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'];
mode: NzCalendarMode = 'month';
get currentMonthYear(): string {
return `${this.monthNames[this.currentDate.getMonth()]} ${this.currentDate.getFullYear()}`;
}
getCurrentMonth(): string {
const today = new Date();
const mois = ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jul', 'aoû', 'sep', 'oct', 'nov', 'déc'];
return mois[today.getMonth()];
}
getCurrentDay(): string {
const today = new Date();
return String(today.getDate());
}
getCurrentDate(): string {
const today = new Date();
const mois = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'];
return `${today.getDate()} ${mois[today.getMonth()]} ${today.getFullYear()}`;
}
getDayWeek(): string {
const today = new Date();
const days = ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'];
return days[today.getDay()];
}
onValueChange(value: Date): void {
console.log(`Current value: ${value}`);
this.currentDate = value;
// Sélectionner la date cliquée + les 6 jours suivants (7 jours au total)
this.selectedDates = [];
for (let i = 0; i < 7; i++) {
const date = new Date(value);
date.setDate(date.getDate() + i);
this.selectedDates.push(date);
}
console.log('Selected dates:', this.selectedDates);
}
onPanelChange(change: { date: Date; mode: string }): void {
console.log(`Current value: ${change.date}`);
console.log(`Current mode: ${change.mode}`);
this.currentDate = change.date;
}
previousMonth(): void {
const newDate = new Date(this.currentDate);
newDate.setMonth(newDate.getMonth() - 1);
this.currentDate = newDate;
}
nextMonth(): void {
const newDate = new Date(this.currentDate);
newDate.setMonth(newDate.getMonth() + 1);
this.currentDate = newDate;
}
previousWeek(): void {
if (this.selectedDates.length > 0) {
const newDate = new Date(this.selectedDates[0]);
newDate.setDate(newDate.getDate() - 7);
this.onValueChange(newDate);
}
}
nextWeek(): void {
if (this.selectedDates.length > 0) {
const newDate = new Date(this.selectedDates[0]);
newDate.setDate(newDate.getDate() + 7);
this.onValueChange(newDate);
}
}
goToToday(): void {
const today = new Date();
this.onValueChange(today);
}
isDateSelected(date: Date): boolean {
return this.selectedDates.some(selectedDate =>
selectedDate.getFullYear() === date.getFullYear() &&
selectedDate.getMonth() === date.getMonth() &&
selectedDate.getDate() === date.getDate()
);
}
isToday(date: Date): boolean {
const today = new Date();
return date.getDate() === today.getDate() &&
date.getMonth() === today.getMonth() &&
date.getFullYear() === today.getFullYear();
}
getDayName(date: Date): string {
const days = ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'];
return days[date.getDay()];
}
formatDate(date: Date): string {
const days = ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'];
return `${days[date.getDay()]} ${date.getDate()} ${date.getFullYear()}`;
}
getHours(): string[] {
return ['8h', '10h', '11h', '12h', '14h', '16h', '18h', '20h', '22h'];
}
// Filtres
isCamionFilterActive = false;
camionFilter(): void {
this.isCamionFilterActive = !this.isCamionFilterActive;
console.log('Filtre Camion:', this.isCamionFilterActive);
}
isShowFilterActive = false;
showFilter(): void {
this.isShowFilterActive = !this.isShowFilterActive;
console.log('Filtre Show:', this.isShowFilterActive);
}
// Sélection de créneaux
selectedSlot: { date: Date; hour: string } | null = null;
isSlotSelected(date: Date, hour: string): boolean {
if (!this.selectedSlot) return false;
return this.selectedSlot.date.getTime() === date.getTime() &&
this.selectedSlot.hour === hour;
}
formatSelectedDate(date: Date): string {
const days = ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'];
const months = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'];
return `${days[date.getDay()]} ${date.getDate()} ${months[date.getMonth()]}`;
}
createNewProject(): void {
console.log('Création d\'un nouveau projet');
alert('Fonctionnalité à venir : Créer un nouveau projet');
}
getTotalEvents(): number {
// À implémenter avec de vraies données
return 0;
}
getWeekNumber(): number {
if (this.selectedDates.length === 0) return 0;
const date = new Date(this.selectedDates[0]);
const firstDayOfYear = new Date(date.getFullYear(), 0, 1);
const pastDaysOfYear = (date.getTime() - firstDayOfYear.getTime()) / 86400000;
return Math.ceil((pastDaysOfYear + firstDayOfYear.getDay() + 1) / 7);
}
}

4
src/app/services/api/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist

View File

@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -0,0 +1,38 @@
.gitignore
.openapi-generator-ignore
README.md
api.base.service.ts
api.module.ts
api/api.ts
api/shows.service.ts
api/soundcategorys.service.ts
api/sounds.service.ts
api/soundtimecodes.service.ts
api/staff.service.ts
api/trucks.service.ts
configuration.ts
encoder.ts
git_push.sh
index.ts
model/create-show-dto.ts
model/create-sound-category-dto.ts
model/create-sound-dto.ts
model/create-sound-timecode-dto.ts
model/create-staff-dto.ts
model/create-truck-dto.ts
model/models.ts
model/read-show-dto.ts
model/read-sound-category-dto.ts
model/read-sound-dto.ts
model/read-sound-timecode-dto.ts
model/read-staff-dto.ts
model/read-truck-dto.ts
model/update-show-dto.ts
model/update-sound-category-dto.ts
model/update-sound-dto.ts
model/update-sound-timecode-request.ts
model/update-staff-dto.ts
model/update-truck-dto.ts
param.ts
provide-api.ts
variables.ts

View File

@@ -0,0 +1 @@
7.17.0

View File

@@ -0,0 +1,185 @@
# @
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 1.0.0
## Building
To install the required dependencies and to build the typescript sources run:
```console
npm install
npm run build
```
## Publishing
First build the package then run `npm publish dist` (don't forget to specify the `dist` folder!)
## Consuming
Navigate to the folder of your consuming project and run one of next commands.
_published:_
```console
npm install @ --save
```
_without publishing (not recommended):_
```console
npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save
```
_It's important to take the tgz file, otherwise you'll get trouble with links on windows_
_using `npm link`:_
In PATH_TO_GENERATED_PACKAGE/dist:
```console
npm link
```
In your project:
```console
npm link
```
__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
Please refer to this issue <https://github.com/angular/angular-cli/issues/8284> for a solution / workaround.
Published packages are not effected by this issue.
### General usage
In your Angular project:
```typescript
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideApi()
],
};
```
**NOTE**
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
```typescript
import { ApiModule } from '';
```
If different from the generated base path, during app bootstrap, you can provide the base path to your service.
```typescript
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideApi('http://localhost:9999')
],
};
```
```typescript
// with a custom configuration
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideApi({
withCredentials: true,
username: 'user',
password: 'password'
})
],
};
```
```typescript
// with factory building a custom configuration
import { ApplicationConfig } from '@angular/core';
import { provideHttpClient } from '@angular/common/http';
import { provideApi, Configuration } from '';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
{
provide: Configuration,
useFactory: (authService: AuthService) => new Configuration({
basePath: 'http://localhost:9999',
withCredentials: true,
username: authService.getUsername(),
password: authService.getPassword(),
}),
deps: [AuthService],
multi: false
}
],
};
```
### Using multiple OpenAPI files / APIs
In order to use multiple APIs generated from different OpenAPI files,
you can create an alias name when importing the modules
in order to avoid naming conflicts:
```typescript
import { provideApi as provideUserApi } from 'my-user-api-path';
import { provideApi as provideAdminApi } from 'my-admin-api-path';
import { HttpClientModule } from '@angular/common/http';
import { environment } from '../environments/environment';
export const appConfig: ApplicationConfig = {
providers: [
// ...
provideHttpClient(),
provideUserApi(environment.basePath),
provideAdminApi(environment.basePath),
],
};
```
### Customizing path parameter encoding
Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple'
and Dates for format 'date-time' are encoded correctly.
Other styles (e.g. "matrix") are not that easy to encode
and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]).
To implement your own parameter encoding (or call another library),
pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object
(see [General Usage](#general-usage) above).
Example value for use in your Configuration-Provider:
```typescript
new Configuration({
encodeParam: (param: Param) => myFancyParamEncoder(param),
})
```
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander

View File

@@ -0,0 +1,83 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { CustomHttpParameterCodec } from './encoder';
import { Configuration } from './configuration';
export class BaseService {
protected basePath = 'http://localhost:5298';
public defaultHeaders = new HttpHeaders();
public configuration: Configuration;
public encoder: HttpParameterCodec;
constructor(basePath?: string|string[], configuration?: Configuration) {
this.configuration = configuration || new Configuration();
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
if (firstBasePath != undefined) {
basePath = firstBasePath;
}
if (typeof basePath !== 'string') {
basePath = this.basePath;
}
this.configuration.basePath = basePath;
}
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
protected canConsumeForm(consumes: string[]): boolean {
return consumes.indexOf('multipart/form-data') !== -1;
}
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
// If the value is an object (but not a Date), recursively add its keys.
if (typeof value === 'object' && !(value instanceof Date)) {
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
}
return this.addToHttpParamsRecursive(httpParams, value, key);
}
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
if (value === null || value === undefined) {
return httpParams;
}
if (typeof value === 'object') {
// If JSON format is preferred, key must be provided.
if (key != null) {
return isDeep
? Object.keys(value as Record<string, any>).reduce(
(hp, k) => hp.append(`${key}[${k}]`, value[k]),
httpParams,
)
: httpParams.append(key, JSON.stringify(value));
}
// Otherwise, if it's an array, add each element.
if (Array.isArray(value)) {
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, value.toISOString());
} else {
throw Error("key may not be null if value is Date");
}
} else {
Object.keys(value).forEach(k => {
const paramKey = key ? `${key}.${k}` : k;
httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);
});
}
return httpParams;
} else if (key != null) {
return httpParams.append(key, value);
}
throw Error("key may not be null if value is not object or array");
}
}

View File

@@ -0,0 +1,30 @@
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';
@NgModule({
imports: [],
declarations: [],
exports: [],
providers: []
})
export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
return {
ngModule: ApiModule,
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
};
}
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
@Optional() http: HttpClient) {
if (parentModule) {
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
}
if (!http) {
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
'See also https://github.com/angular/angular/issues/20575');
}
}
}

View File

@@ -0,0 +1,13 @@
export * from './shows.service';
import { ShowsService } from './shows.service';
export * from './soundcategorys.service';
import { SoundcategorysService } from './soundcategorys.service';
export * from './sounds.service';
import { SoundsService } from './sounds.service';
export * from './soundtimecodes.service';
import { SoundtimecodesService } from './soundtimecodes.service';
export * from './staff.service';
import { StaffService } from './staff.service';
export * from './trucks.service';
import { TrucksService } from './trucks.service';
export const APIS = [ShowsService, SoundcategorysService, SoundsService, SoundtimecodesService, StaffService, TrucksService];

View File

@@ -0,0 +1,331 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateShowDto } from '../model/create-show-dto';
// @ts-ignore
import { ReadShowDto } from '../model/read-show-dto';
// @ts-ignore
import { UpdateShowDto } from '../model/update-show-dto';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class ShowsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/shows
* @param createShowDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createShowEndpoint(createShowDto: CreateShowDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadShowDto>;
public createShowEndpoint(createShowDto: CreateShowDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadShowDto>>;
public createShowEndpoint(createShowDto: CreateShowDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadShowDto>>;
public createShowEndpoint(createShowDto: CreateShowDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createShowDto === null || createShowDto === undefined) {
throw new Error('Required parameter createShowDto was null or undefined when calling createShowEndpoint.');
}
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;
// 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/shows`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadShowDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createShowDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/shows/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteShowEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteShowEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteShowEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteShowEndpoint(id: number, 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 deleteShowEndpoint.');
}
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/shows/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/shows
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllShowsEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadShowDto>>;
public getAllShowsEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadShowDto>>>;
public getAllShowsEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadShowDto>>>;
public getAllShowsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/shows`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadShowDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/shows/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getShowEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadShowDto>;
public getShowEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadShowDto>>;
public getShowEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadShowDto>>;
public getShowEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getShowEndpoint.');
}
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/shows/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadShowDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint put /API/shows/{id}
* @param id
* @param updateShowDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateShowEndpoint(id: number, updateShowDto: UpdateShowDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadShowDto>;
public updateShowEndpoint(id: number, updateShowDto: UpdateShowDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadShowDto>>;
public updateShowEndpoint(id: number, updateShowDto: UpdateShowDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadShowDto>>;
public updateShowEndpoint(id: number, updateShowDto: UpdateShowDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateShowEndpoint.');
}
if (updateShowDto === null || updateShowDto === undefined) {
throw new Error('Required parameter updateShowDto was null or undefined when calling updateShowEndpoint.');
}
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;
// 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/shows/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadShowDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateShowDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,331 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateSoundCategoryDto } from '../model/create-sound-category-dto';
// @ts-ignore
import { ReadSoundCategoryDto } from '../model/read-sound-category-dto';
// @ts-ignore
import { UpdateSoundCategoryDto } from '../model/update-sound-category-dto';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class SoundcategorysService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/soundcategorys
* @param createSoundCategoryDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createSoundCategoryEndpoint(createSoundCategoryDto: CreateSoundCategoryDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundCategoryDto>;
public createSoundCategoryEndpoint(createSoundCategoryDto: CreateSoundCategoryDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundCategoryDto>>;
public createSoundCategoryEndpoint(createSoundCategoryDto: CreateSoundCategoryDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundCategoryDto>>;
public createSoundCategoryEndpoint(createSoundCategoryDto: CreateSoundCategoryDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createSoundCategoryDto === null || createSoundCategoryDto === undefined) {
throw new Error('Required parameter createSoundCategoryDto was null or undefined when calling createSoundCategoryEndpoint.');
}
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;
// 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/soundcategorys`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundCategoryDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createSoundCategoryDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/soundcategorys/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteSoundCategoryEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteSoundCategoryEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteSoundCategoryEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteSoundCategoryEndpoint(id: number, 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 deleteSoundCategoryEndpoint.');
}
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/soundcategorys/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/soundcategorys
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllSoundCategorysEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadSoundCategoryDto>>;
public getAllSoundCategorysEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadSoundCategoryDto>>>;
public getAllSoundCategorysEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadSoundCategoryDto>>>;
public getAllSoundCategorysEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/soundcategorys`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadSoundCategoryDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/soundcategorys/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getSoundCategoryEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundCategoryDto>;
public getSoundCategoryEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundCategoryDto>>;
public getSoundCategoryEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundCategoryDto>>;
public getSoundCategoryEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSoundCategoryEndpoint.');
}
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/soundcategorys/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundCategoryDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint patch /API/soundcategorys/{id}/name
* @param id
* @param updateSoundCategoryDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateSoundCategoryEndpoint(id: number, updateSoundCategoryDto: UpdateSoundCategoryDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundCategoryDto>;
public updateSoundCategoryEndpoint(id: number, updateSoundCategoryDto: UpdateSoundCategoryDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundCategoryDto>>;
public updateSoundCategoryEndpoint(id: number, updateSoundCategoryDto: UpdateSoundCategoryDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundCategoryDto>>;
public updateSoundCategoryEndpoint(id: number, updateSoundCategoryDto: UpdateSoundCategoryDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateSoundCategoryEndpoint.');
}
if (updateSoundCategoryDto === null || updateSoundCategoryDto === undefined) {
throw new Error('Required parameter updateSoundCategoryDto was null or undefined when calling updateSoundCategoryEndpoint.');
}
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;
// 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/soundcategorys/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/name`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundCategoryDto>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateSoundCategoryDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,331 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateSoundDto } from '../model/create-sound-dto';
// @ts-ignore
import { ReadSoundDto } from '../model/read-sound-dto';
// @ts-ignore
import { UpdateSoundDto } from '../model/update-sound-dto';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class SoundsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/sounds
* @param createSoundDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createSoundEndpoint(createSoundDto: CreateSoundDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundDto>;
public createSoundEndpoint(createSoundDto: CreateSoundDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundDto>>;
public createSoundEndpoint(createSoundDto: CreateSoundDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundDto>>;
public createSoundEndpoint(createSoundDto: CreateSoundDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createSoundDto === null || createSoundDto === undefined) {
throw new Error('Required parameter createSoundDto was null or undefined when calling createSoundEndpoint.');
}
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;
// 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/sounds`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createSoundDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/sounds/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteSoundEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteSoundEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteSoundEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteSoundEndpoint(id: number, 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 deleteSoundEndpoint.');
}
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/sounds/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/sounds
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllSoundsEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadSoundDto>>;
public getAllSoundsEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadSoundDto>>>;
public getAllSoundsEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadSoundDto>>>;
public getAllSoundsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/sounds`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadSoundDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/sounds/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getSoundEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundDto>;
public getSoundEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundDto>>;
public getSoundEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundDto>>;
public getSoundEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSoundEndpoint.');
}
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/sounds/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint put /API/sounds/{id}
* @param id
* @param updateSoundDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateSoundEndpoint(id: number, updateSoundDto: UpdateSoundDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundDto>;
public updateSoundEndpoint(id: number, updateSoundDto: UpdateSoundDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundDto>>;
public updateSoundEndpoint(id: number, updateSoundDto: UpdateSoundDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundDto>>;
public updateSoundEndpoint(id: number, updateSoundDto: UpdateSoundDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateSoundEndpoint.');
}
if (updateSoundDto === null || updateSoundDto === undefined) {
throw new Error('Required parameter updateSoundDto was null or undefined when calling updateSoundEndpoint.');
}
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;
// 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/sounds/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateSoundDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,343 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateSoundTimecodeDto } from '../model/create-sound-timecode-dto';
// @ts-ignore
import { ReadSoundTimecodeDto } from '../model/read-sound-timecode-dto';
// @ts-ignore
import { UpdateSoundTimecodeRequest } from '../model/update-sound-timecode-request';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class SoundtimecodesService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/soundtimecodes
* @param createSoundTimecodeDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createSoundTimecodeEndpoint(createSoundTimecodeDto: CreateSoundTimecodeDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundTimecodeDto>;
public createSoundTimecodeEndpoint(createSoundTimecodeDto: CreateSoundTimecodeDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundTimecodeDto>>;
public createSoundTimecodeEndpoint(createSoundTimecodeDto: CreateSoundTimecodeDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundTimecodeDto>>;
public createSoundTimecodeEndpoint(createSoundTimecodeDto: CreateSoundTimecodeDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createSoundTimecodeDto === null || createSoundTimecodeDto === undefined) {
throw new Error('Required parameter createSoundTimecodeDto was null or undefined when calling createSoundTimecodeEndpoint.');
}
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;
// 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/soundtimecodes`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundTimecodeDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createSoundTimecodeDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/soundtimecodes/{showId}/{soundId}
* @param showId
* @param soundId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteSoundTimecodeEndpoint(showId: number, soundId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (showId === null || showId === undefined) {
throw new Error('Required parameter showId was null or undefined when calling deleteSoundTimecodeEndpoint.');
}
if (soundId === null || soundId === undefined) {
throw new Error('Required parameter soundId was null or undefined when calling deleteSoundTimecodeEndpoint.');
}
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/soundtimecodes/${this.configuration.encodeParam({name: "showId", value: showId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "soundId", value: soundId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/soundtimecodes
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllSoundTimecodesEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadSoundTimecodeDto>>;
public getAllSoundTimecodesEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadSoundTimecodeDto>>>;
public getAllSoundTimecodesEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadSoundTimecodeDto>>>;
public getAllSoundTimecodesEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/soundtimecodes`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadSoundTimecodeDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/soundtimecodes/{showId}/{soundId}
* @param showId
* @param soundId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundTimecodeDto>;
public getSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundTimecodeDto>>;
public getSoundTimecodeEndpoint(showId: number, soundId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundTimecodeDto>>;
public getSoundTimecodeEndpoint(showId: number, soundId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (showId === null || showId === undefined) {
throw new Error('Required parameter showId was null or undefined when calling getSoundTimecodeEndpoint.');
}
if (soundId === null || soundId === undefined) {
throw new Error('Required parameter soundId was null or undefined when calling getSoundTimecodeEndpoint.');
}
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/soundtimecodes/${this.configuration.encodeParam({name: "showId", value: showId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "soundId", value: soundId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundTimecodeDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint put /API/soundtimecodes/{showId}/{soundId}
* @param showId
* @param soundId
* @param updateSoundTimecodeRequest
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateSoundTimecodeEndpoint(showId: number, soundId: number, updateSoundTimecodeRequest: UpdateSoundTimecodeRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadSoundTimecodeDto>;
public updateSoundTimecodeEndpoint(showId: number, soundId: number, updateSoundTimecodeRequest: UpdateSoundTimecodeRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadSoundTimecodeDto>>;
public updateSoundTimecodeEndpoint(showId: number, soundId: number, updateSoundTimecodeRequest: UpdateSoundTimecodeRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadSoundTimecodeDto>>;
public updateSoundTimecodeEndpoint(showId: number, soundId: number, updateSoundTimecodeRequest: UpdateSoundTimecodeRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (showId === null || showId === undefined) {
throw new Error('Required parameter showId was null or undefined when calling updateSoundTimecodeEndpoint.');
}
if (soundId === null || soundId === undefined) {
throw new Error('Required parameter soundId was null or undefined when calling updateSoundTimecodeEndpoint.');
}
if (updateSoundTimecodeRequest === null || updateSoundTimecodeRequest === undefined) {
throw new Error('Required parameter updateSoundTimecodeRequest was null or undefined when calling updateSoundTimecodeEndpoint.');
}
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;
// 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/soundtimecodes/${this.configuration.encodeParam({name: "showId", value: showId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "soundId", value: soundId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadSoundTimecodeDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateSoundTimecodeRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,331 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateStaffDto } from '../model/create-staff-dto';
// @ts-ignore
import { ReadStaffDto } from '../model/read-staff-dto';
// @ts-ignore
import { UpdateStaffDto } from '../model/update-staff-dto';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class StaffService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/staff
* @param createStaffDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createStaffEndpoint(createStaffDto: CreateStaffDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadStaffDto>;
public createStaffEndpoint(createStaffDto: CreateStaffDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadStaffDto>>;
public createStaffEndpoint(createStaffDto: CreateStaffDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadStaffDto>>;
public createStaffEndpoint(createStaffDto: CreateStaffDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createStaffDto === null || createStaffDto === undefined) {
throw new Error('Required parameter createStaffDto was null or undefined when calling createStaffEndpoint.');
}
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;
// 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/staff`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadStaffDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createStaffDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/staff/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteStaffEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteStaffEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteStaffEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteStaffEndpoint(id: number, 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 deleteStaffEndpoint.');
}
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/staff/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/staff
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllStaffEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadStaffDto>>;
public getAllStaffEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadStaffDto>>>;
public getAllStaffEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadStaffDto>>>;
public getAllStaffEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/staff`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadStaffDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/staff/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getStaffEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadStaffDto>;
public getStaffEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadStaffDto>>;
public getStaffEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadStaffDto>>;
public getStaffEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getStaffEndpoint.');
}
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/staff/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadStaffDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint put /API/staff/{id}
* @param id
* @param updateStaffDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadStaffDto>;
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadStaffDto>>;
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadStaffDto>>;
public updateStaffEndpoint(id: number, updateStaffDto: UpdateStaffDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateStaffEndpoint.');
}
if (updateStaffDto === null || updateStaffDto === undefined) {
throw new Error('Required parameter updateStaffDto was null or undefined when calling updateStaffEndpoint.');
}
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;
// 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/staff/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadStaffDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateStaffDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,331 @@
/**
* PyroFetes
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreateTruckDto } from '../model/create-truck-dto';
// @ts-ignore
import { ReadTruckDto } from '../model/read-truck-dto';
// @ts-ignore
import { UpdateTruckDto } from '../model/update-truck-dto';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
})
export class TrucksService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/trucks
* @param createTruckDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createTruckEndpoint(createTruckDto: CreateTruckDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadTruckDto>;
public createTruckEndpoint(createTruckDto: CreateTruckDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadTruckDto>>;
public createTruckEndpoint(createTruckDto: CreateTruckDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadTruckDto>>;
public createTruckEndpoint(createTruckDto: CreateTruckDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createTruckDto === null || createTruckDto === undefined) {
throw new Error('Required parameter createTruckDto was null or undefined when calling createTruckEndpoint.');
}
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;
// 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/trucks`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadTruckDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createTruckDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint delete /API/trucks/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteTruckEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteTruckEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteTruckEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteTruckEndpoint(id: number, 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 deleteTruckEndpoint.');
}
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/trucks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/trucks
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllTrucksEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<ReadTruckDto>>;
public getAllTrucksEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<ReadTruckDto>>>;
public getAllTrucksEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<ReadTruckDto>>>;
public getAllTrucksEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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/trucks`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<ReadTruckDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/trucks/{id}
* @param id
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getTruckEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadTruckDto>;
public getTruckEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadTruckDto>>;
public getTruckEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadTruckDto>>;
public getTruckEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getTruckEndpoint.');
}
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/trucks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadTruckDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint put /API/trucks/{id}
* @param id
* @param updateTruckDto
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateTruckEndpoint(id: number, updateTruckDto: UpdateTruckDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ReadTruckDto>;
public updateTruckEndpoint(id: number, updateTruckDto: UpdateTruckDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ReadTruckDto>>;
public updateTruckEndpoint(id: number, updateTruckDto: UpdateTruckDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ReadTruckDto>>;
public updateTruckEndpoint(id: number, updateTruckDto: UpdateTruckDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateTruckEndpoint.');
}
if (updateTruckDto === null || updateTruckDto === undefined) {
throw new Error('Required parameter updateTruckDto was null or undefined when calling updateTruckEndpoint.');
}
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;
// 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/trucks/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ReadTruckDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateTruckDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}

View File

@@ -0,0 +1,193 @@
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
export interface ConfigurationParameters {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Override the default method for encoding path parameters in various
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam?: (param: Param) => string;
/**
* The keys are the names in the securitySchemes section of the OpenAPI
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials?: {[ key: string ]: string | (() => string | undefined)};
}
export class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Encoding of various path parameter
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam: (param: Param) => string;
/**
* The keys are the names in the securitySchemes section of the OpenAPI
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials: {[ key: string ]: string | (() => string | undefined)};
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
if (apiKeys) {
this.apiKeys = apiKeys;
}
if (username !== undefined) {
this.username = username;
}
if (password !== undefined) {
this.password = password;
}
if (accessToken !== undefined) {
this.accessToken = accessToken;
}
if (basePath !== undefined) {
this.basePath = basePath;
}
if (withCredentials !== undefined) {
this.withCredentials = withCredentials;
}
if (encoder) {
this.encoder = encoder;
}
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
this.credentials = credentials ?? {};
// init default JWTBearerAuth credential
if (!this.credentials['JWTBearerAuth']) {
this.credentials['JWTBearerAuth'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
};
}
}
/**
* Select the correct content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length === 0) {
return undefined;
}
const type = contentTypes.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
return type;
}
/**
* Select the correct accept content-type to use for a request.
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
* If no content type is found return the first found type if the contentTypes is not empty
* @param accepts - the array of content types that are available for selection.
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length === 0) {
return undefined;
}
const type = accepts.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return accepts[0];
}
return type;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
public lookupCredential(key: string): string | undefined {
const value = this.credentials[key];
return typeof value === 'function'
? value()
: value;
}
public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders {
const value = this.lookupCredential(credentialKey);
return value
? headers.set(headerName, (prefix ?? '') + value)
: headers;
}
public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams {
const value = this.lookupCredential(credentialKey);
return value
? query.set(paramName, value)
: query;
}
private defaultEncodeParam(param: Param): string {
// This implementation exists as fallback for missing configuration
// and for backwards compatibility to older typescript-angular generator versions.
// It only works for the 'simple' parameter style.
// Date-handling only works for the 'date-time' format.
// All other styles and Date-formats are probably handled incorrectly.
//
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
const value = param.dataFormat === 'date-time' && param.value instanceof Date
? (param.value as Date).toISOString()
: param.value;
return encodeURIComponent(String(value));
}
}

View File

@@ -0,0 +1,20 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);
}
encodeValue(v: string): string {
return encodeURIComponent(v);
}
decodeKey(k: string): string {
return decodeURIComponent(k);
}
decodeValue(v: string): string {
return decodeURIComponent(v);
}
}

View File

@@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@@ -0,0 +1,7 @@
export * from './api/api';
export * from './model/models';
export * from './variables';
export * from './configuration';
export * from './api.module';
export * from './provide-api';
export * from './param';

View File

@@ -0,0 +1,20 @@
/**
* PyroFetes
*
*
*
* 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 CreateShowDto {
name?: string | null;
place?: string | null;
description?: string | null;
pyrotechnicImplementationPlan?: string | null;
date?: string | null;
cityId?: number;
}

View File

@@ -0,0 +1,15 @@
/**
* PyroFetes
*
*
*
* 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 CreateSoundCategoryDto {
name?: string | null;
}

View File

@@ -0,0 +1,22 @@
/**
* PyroFetes
*
*
*
* 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 CreateSoundDto {
name?: string | null;
type?: string | null;
artist?: string | null;
duration?: string | null;
kind?: string | null;
format?: string | null;
creationDate?: string | null;
soundCategoryId?: string | null;
}

View File

@@ -0,0 +1,18 @@
/**
* PyroFetes
*
*
*
* 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 CreateSoundTimecodeDto {
showId?: number;
soundId?: number;
start?: number;
end?: number;
}

View File

@@ -0,0 +1,18 @@
/**
* PyroFetes
*
*
*
* 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 CreateStaffDto {
firstName?: string | null;
lastName?: string | null;
profession?: string | null;
email?: string | null;
}

View File

@@ -0,0 +1,19 @@
/**
* PyroFetes
*
*
*
* 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 CreateTruckDto {
type?: string | null;
maxExplosiveCapacity?: number | null;
sizes?: string | null;
status?: string | null;
showId?: number | null;
}

View File

@@ -0,0 +1,18 @@
export * from './create-show-dto';
export * from './create-sound-category-dto';
export * from './create-sound-dto';
export * from './create-sound-timecode-dto';
export * from './create-staff-dto';
export * from './create-truck-dto';
export * from './read-show-dto';
export * from './read-sound-category-dto';
export * from './read-sound-dto';
export * from './read-sound-timecode-dto';
export * from './read-staff-dto';
export * from './read-truck-dto';
export * from './update-show-dto';
export * from './update-sound-category-dto';
export * from './update-sound-dto';
export * from './update-sound-timecode-request';
export * from './update-staff-dto';
export * from './update-truck-dto';

View File

@@ -0,0 +1,20 @@
/**
* PyroFetes
*
*
*
* 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 ReadShowDto {
id?: number | null;
name?: string | null;
place?: string | null;
description?: string | null;
pyrotechnicImplementationPlan?: string | null;
date?: string | null;
}

View File

@@ -0,0 +1,16 @@
/**
* PyroFetes
*
*
*
* 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 ReadSoundCategoryDto {
id?: number | null;
name?: string | null;
}

View File

@@ -0,0 +1,23 @@
/**
* PyroFetes
*
*
*
* 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 ReadSoundDto {
id?: number | null;
name?: string | null;
type?: string | null;
artist?: string | null;
duration?: string | null;
kind?: string | null;
format?: string | null;
creationDate?: string | null;
soundCategoryId?: string | null;
}

View File

@@ -0,0 +1,19 @@
/**
* PyroFetes
*
*
*
* 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 ReadSoundTimecodeDto {
id?: number | null;
showId?: number | null;
soundId?: number | null;
start?: number;
end?: number;
}

View File

@@ -0,0 +1,19 @@
/**
* PyroFetes
*
*
*
* 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 ReadStaffDto {
id?: number | null;
firstName?: string | null;
lastName?: string | null;
profession?: string | null;
email?: string | null;
}

View File

@@ -0,0 +1,20 @@
/**
* PyroFetes
*
*
*
* 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 ReadTruckDto {
id?: number | null;
type?: string | null;
maxExplosiveCapacity?: number | null;
sizes?: string | null;
statut?: string | null;
showId?: number | null;
}

View File

@@ -0,0 +1,19 @@
/**
* PyroFetes
*
*
*
* 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 UpdateShowDto {
name?: string | null;
place?: string | null;
description?: string | null;
pyrotechnicImplementationPlan?: string | null;
date?: string | null;
}

View File

@@ -0,0 +1,15 @@
/**
* PyroFetes
*
*
*
* 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 UpdateSoundCategoryDto {
name?: string | null;
}

View File

@@ -0,0 +1,22 @@
/**
* PyroFetes
*
*
*
* 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 UpdateSoundDto {
name?: string | null;
type?: string | null;
artist?: string | null;
duration?: string | null;
kind?: string | null;
format?: string | null;
creationDate?: string | null;
soundCategoryId?: string | null;
}

View File

@@ -0,0 +1,16 @@
/**
* PyroFetes
*
*
*
* 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 UpdateSoundTimecodeRequest {
start?: number;
end?: number;
}

View File

@@ -0,0 +1,18 @@
/**
* PyroFetes
*
*
*
* 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 UpdateStaffDto {
firstName?: string | null;
lastName?: string | null;
profession?: string | null;
email?: string | null;
}

View File

@@ -0,0 +1,19 @@
/**
* PyroFetes
*
*
*
* 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 UpdateTruckDto {
type?: string | null;
maxExplosiveCapacity?: string | null;
sizes?: string | null;
statut?: string | null;
showId?: number | null;
}

View File

@@ -0,0 +1,69 @@
/**
* Standard parameter styles defined by OpenAPI spec
*/
export type StandardParamStyle =
| 'matrix'
| 'label'
| 'form'
| 'simple'
| 'spaceDelimited'
| 'pipeDelimited'
| 'deepObject'
;
/**
* The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user.
*/
export type ParamStyle = StandardParamStyle | string;
/**
* Standard parameter locations defined by OpenAPI spec
*/
export type ParamLocation = 'query' | 'header' | 'path' | 'cookie';
/**
* Standard types as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
*/
export type StandardDataType =
| "integer"
| "number"
| "boolean"
| "string"
| "object"
| "array"
;
/**
* Standard {@link DataType}s plus your own types/classes.
*/
export type DataType = StandardDataType | string;
/**
* Standard formats as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
*/
export type StandardDataFormat =
| "int32"
| "int64"
| "float"
| "double"
| "byte"
| "binary"
| "date"
| "date-time"
| "password"
;
export type DataFormat = StandardDataFormat | string;
/**
* The parameter to encode.
*/
export interface Param {
name: string;
value: unknown;
in: ParamLocation;
style: ParamStyle,
explode: boolean;
dataType: DataType;
dataFormat: DataFormat | undefined;
}

View File

@@ -0,0 +1,15 @@
import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core";
import { Configuration, ConfigurationParameters } from './configuration';
import { BASE_PATH } from './variables';
// Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig).
export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders {
return makeEnvironmentProviders([
typeof configOrBasePath === "string"
? { provide: BASE_PATH, useValue: configOrBasePath }
: {
provide: Configuration,
useValue: new Configuration({ ...configOrBasePath }),
},
]);
}

View File

@@ -0,0 +1,9 @@
import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
}

View File

@@ -1,4 +1,9 @@
/* You can add global styles to this file, and also import other style files */
:root {
--mauve: #8b7b8b;
--ugly-yellow: #d4a574;
}
* {
margin: 0;
padding: 0;
@@ -21,3 +26,6 @@ button.primary {
color: white;
border-radius: 8px;
}