Compare commits

...

25 Commits

Author SHA1 Message Date
sanchezvem 675ca4ea09 Merge remote-tracking branch 'origin/develop' 2026-06-08 12:26:10 +01:00
sanchezvem 47b8765906 Changed method to see settings pictures 2026-06-05 11:55:31 +01:00
sanchezvem 3c8d8c5825 Merge branch 'develop' 2026-06-01 11:10:58 +01:00
sanchezvem 09763ea730 Added password rules 2026-06-01 11:07:43 +01:00
sanchezvem e29de8e167 deleted unused import 2026-06-01 10:42:55 +01:00
sanchezvem 80b4726004 Added conditions to check role after connexion and changed guards 2026-06-01 10:41:50 +01:00
Cristiano cf53e4c8ef Merge remote-tracking branch 'origin/develop' into develop 2026-05-30 15:00:14 +02:00
sanchezvem 670dd561cc Fixed form error with status in delivery note table 2026-05-30 13:57:11 +01:00
Cristiano 9b898432c0 Mask user for employee on navbar 2026-05-29 14:17:45 +02:00
Cristiano d0e98482b9 Added guards for auth and role 2026-05-29 14:07:42 +02:00
sanchezvem 04b08e76c4 Fixed form error in update profil page 2026-05-28 16:38:26 +01:00
Cristiano d8d36d5c1e OpenAPI with updated backend 2026-05-28 16:23:30 +02:00
sanchezvem fdb728cd25 Fixed interceptor error 2026-05-28 16:17:19 +01:00
sanchezvem 7f56bb4cf8 Fixed error with redirect of login page 2026-05-28 15:54:05 +01:00
sanchezvem 24f82742f7 Fixed error with redirect of login page 2026-05-28 15:09:20 +01:00
sanchezvem caff8aa312 Added disconnect button 2026-05-28 14:35:57 +01:00
sanchezvem 82aef7da0a Added login page 2026-05-28 14:27:46 +01:00
sanchezvem 4de58d6f6e Declare type for line in map of orderlines 2026-05-28 10:53:48 +01:00
sanchezvem d37ff4ace4 Refactor code 2026-05-28 10:52:46 +01:00
sanchezvem 7041c5335b Cleaned code 2026-05-27 18:00:55 +01:00
sanchezvem c20a0c5daf Added automatic generation in dashboard when employees start application to generate product under limit during absence 2026-05-27 17:59:41 +01:00
sanchezvem 39a831b99b revert dcaf85a316
revert first commit of the day
2025-11-20 14:31:18 +01:00
sanchezvem 0d26ac2457 fix audit error 2025-11-20 14:20:33 +01:00
sanchezvem dcaf85a316 first commit of the day 2025-11-17 10:19:47 +01:00
sanchezvem df651fd052 first commit 2025-11-15 13:23:51 +01:00
129 changed files with 2340 additions and 3108 deletions
+112 -5
View File
@@ -18,8 +18,10 @@
"@tailwindcss/postcss": "^4.1.17", "@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",
"browser-image-compression": "^2.0.2", "browser-image-compression": "^2.0.2",
"jwt-decode": "^4.0.0",
"ng-zorro-antd": "^20.4.0", "ng-zorro-antd": "^20.4.0",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"rimraf": "^6.1.3",
"rxjs": "~7.8.0", "rxjs": "~7.8.0",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"tslib": "^2.3.0", "tslib": "^2.3.0",
@@ -6911,6 +6913,15 @@
], ],
"license": "MIT" "license": "MIT"
}, },
"node_modules/jwt-decode": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz",
"integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/less": { "node_modules/less": {
"version": "4.4.2", "version": "4.4.2",
"resolved": "https://registry.npmjs.org/less/-/less-4.4.2.tgz", "resolved": "https://registry.npmjs.org/less/-/less-4.4.2.tgz",
@@ -7594,10 +7605,10 @@
} }
}, },
"node_modules/minipass": { "node_modules/minipass": {
"version": "7.1.2", "version": "7.1.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
"license": "ISC", "license": "BlueOak-1.0.0",
"engines": { "engines": {
"node": ">=16 || 14 >=14.17" "node": ">=16 || 14 >=14.17"
} }
@@ -8403,7 +8414,6 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
"dev": true,
"license": "BlueOak-1.0.0" "license": "BlueOak-1.0.0"
}, },
"node_modules/pacote": { "node_modules/pacote": {
@@ -8938,6 +8948,103 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/rimraf": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz",
"integrity": "sha512-LKg+Cr2ZF61fkcaK1UdkH2yEBBKnYjTyWzTJT6KNPcSPaiT7HSdhtMXQuN5wkTX0Xu72KQ1l8S42rlmexS2hSA==",
"license": "BlueOak-1.0.0",
"dependencies": {
"glob": "^13.0.3",
"package-json-from-dist": "^1.0.1"
},
"bin": {
"rimraf": "dist/esm/bin.mjs"
},
"engines": {
"node": "20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/rimraf/node_modules/brace-expansion": {
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
"integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "13.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"license": "BlueOak-1.0.0",
"dependencies": {
"minimatch": "^10.2.2",
"minipass": "^7.1.3",
"path-scurry": "^2.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/lru-cache": {
"version": "11.5.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
"integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/rimraf/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"license": "BlueOak-1.0.0",
"dependencies": {
"brace-expansion": "^5.0.5"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/path-scurry": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rollup": { "node_modules/rollup": {
"version": "4.52.3", "version": "4.52.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz",
+2
View File
@@ -32,8 +32,10 @@
"@tailwindcss/postcss": "^4.1.17", "@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",
"browser-image-compression": "^2.0.2", "browser-image-compression": "^2.0.2",
"jwt-decode": "^4.0.0",
"ng-zorro-antd": "^20.4.0", "ng-zorro-antd": "^20.4.0",
"postcss": "^8.5.6", "postcss": "^8.5.6",
"rimraf": "^6.1.3",
"rxjs": "~7.8.0", "rxjs": "~7.8.0",
"tailwindcss": "^4.1.17", "tailwindcss": "^4.1.17",
"tslib": "^2.3.0", "tslib": "^2.3.0",
+4 -2
View File
@@ -6,7 +6,8 @@ import {fr_FR, provideNzI18n} from 'ng-zorro-antd/i18n';
import {registerLocaleData} from '@angular/common'; import {registerLocaleData} from '@angular/common';
import fr from '@angular/common/locales/fr'; import fr from '@angular/common/locales/fr';
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async'; import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
import {provideHttpClient} from '@angular/common/http'; import {provideHttpClient, withInterceptors} from '@angular/common/http';
import {authInterceptor} from "./interceptors/auth-interceptor";
registerLocaleData(fr); registerLocaleData(fr);
@@ -14,6 +15,7 @@ export const appConfig: ApplicationConfig = {
providers: [ providers: [
provideBrowserGlobalErrorListeners(), provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({eventCoalescing: true}), provideZoneChangeDetection({eventCoalescing: true}),
provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient() provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient(),
provideHttpClient(withInterceptors([authInterceptor]))
] ]
}; };
-113
View File
@@ -1,113 +0,0 @@
:host {
display: flex;
}
.app-layout {
height: 100vh;
}
nz-header {
display: flex;
align-items: center;
background: #001529;
padding: 0 24px;
}
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
/* --- LOGO + TITRE --- */
.logo {
display: flex;
align-items: center;
}
.logo a {
display: flex;
align-items: center;
text-decoration: none;
}
.logo img {
height: 40px;
width: auto;
}
.logo h1 {
margin: 0 0 0 10px;
color: #fff;
font-weight: 600;
font-size: 20px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
}
/* --- MENU PRINCIPAL --- */
.top-nav {
flex: 1;
margin: 0 40px;
line-height: 64px;
background: #001529;
border: none;
}
/* Couleur grise par défaut + effet blanc et zoom au survol */
.top-nav li {
transition: transform 0.2s ease, color 0.2s ease;
}
.top-nav li a {
color: #bfbfbf !important; /* gris clair par défaut */
transition: transform 0.2s ease, color 0.2s ease;
}
/* Au survol → zoom + blanc pur */
.top-nav li:hover {
transform: scale(1.08);
background: transparent !important;
color: #fff !important;
}
.top-nav li:hover a {
color: #ffffff !important;
}
/* Supprime toute coloration bleue ou fond par défaut NG-ZORRO */
.top-nav li.ant-menu-item-active,
.top-nav li.ant-menu-item-selected {
background: transparent !important;
color: #fff !important;
}
/* --- ICONES DROITES --- */
.right-icons {
display: flex;
align-items: center;
gap: 20px;
color: #fff;
font-size: 18px;
cursor: pointer;
}
.right-icons app-modal-nav {
transition: transform 0.2s ease, color 0.2s ease;
}
.right-icons app-modal-nav:hover {
color: #40a9ff;
transform: scale(1.2);
}
/* --- CONTENU --- */
nz-content {
padding: 24px 50px;
}
.inner-content {
padding: 24px;
background: #fff;
height: 100%;
}
+1 -87
View File
@@ -1,87 +1 @@
<nz-layout class="app-layout"> <router-outlet></router-outlet>
<nz-header>
<div class="header-container">
<!-- LOGO -->
<div class="logo">
<a routerLink="/welcome">
<img
src="https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png"
alt="logo"
style="width: 100px; height: auto"
/>
<h1 class="text-amber-300">PYRO FÊTES</h1>
</a>
</div>
<!-- MENU PRINCIPAL -->
<ul nz-menu class="top-nav" nzTheme="dark" nzMode="horizontal">
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/stock">
<nz-icon nzType="stock"></nz-icon>
<span>Stock</span>
</a>
</li>
<li nz-submenu nzTitle="Partenaires" nzIcon="team">
<ul>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/supplier">
<nz-icon nzType="shop"></nz-icon>
<span>Fournisseurs</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/deliverer">
<nz-icon nzType="car"></nz-icon>
<span>Livreurs</span>
</a>
</li>
</ul>
</li>
<li nz-submenu nzTitle="Recettes" nzIcon="euro-circle">
<ul>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/quotation">
<nz-icon nzType="file"></nz-icon>
<span>Devis</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/purchase-order">
<nz-icon nzType="file"></nz-icon>
<span>Bon de commande</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/delivery-note">
<nz-icon nzType="file"></nz-icon>
<span>Bon de livraison</span>
</a>
</li>
</ul>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/user">
<nz-icon nzType="user"></nz-icon>
<span>Utilisateur</span>
</a>
</li>
</ul>
<!-- ICONES À DROITE -->
<div class="right-icons">
<app-modal-nav nameIcon="user" name="Profil">
<app-profil></app-profil>
</app-modal-nav>
<app-modal-nav nameIcon="setting" name="Paramètres">
<app-setting-form></app-setting-form>
</app-modal-nav>
</div>
</div>
</nz-header>
<nz-content>
<div class="inner-content overflow-auto">
<router-outlet></router-outlet>
</div>
</nz-content>
</nz-layout>
+39 -10
View File
@@ -1,41 +1,70 @@
import {Routes} from '@angular/router'; import {Routes} from '@angular/router';
import {authGuard} from "./guards/auth.guard";
export const routes: Routes = [ export const routes: Routes = [
{ {
path: '', path: '',
pathMatch: 'full', pathMatch: 'full',
redirectTo: '/welcome' redirectTo: '/login'
}, },
{ {
path: 'welcome', path: 'login',
loadComponent: () => import('./pages/welcome/welcome').then(x => x.Welcome) loadComponent: () => import('./pages/login/login').then(x => x.Login)
},
{
path: '',
loadComponent: () =>
import('./components/layout/layout').then(m => m.Layout),
children: [
{
path: '',
pathMatch: 'full',
redirectTo: '/dashboard'
},
{
path: 'dashboard',
loadComponent: () => import('./pages/dashboard/dashboard').then(m => m.Dashboard),
canActivate: [authGuard]
}, },
{ {
path: 'stock', path: 'stock',
loadComponent: () => import('./pages/stock/stock').then(x => x.Stock) loadComponent: () => import('./pages/stock/stock').then(m => m.Stock),
canActivate: [authGuard]
}, },
{ {
path: 'supplier', path: 'supplier',
loadComponent: () => import('./pages/supplier/supplier').then(x => x.Supplier) loadComponent: () => import('./pages/supplier/supplier').then(m => m.Supplier),
canActivate: [authGuard]
}, },
{ {
path: 'deliverer', path: 'deliverer',
loadComponent: () => import('./pages/deliverer/deliverer').then(x => x.Deliverer) loadComponent: () => import('./pages/deliverer/deliverer').then(m => m.Deliverer),
canActivate: [authGuard]
}, },
{ {
path: 'quotation', path: 'quotation',
loadComponent: () => import('./pages/quotation/quotation').then(x => x.Quotation) loadComponent: () => import('./pages/quotation/quotation').then(m => m.Quotation),
canActivate: [authGuard]
}, },
{ {
path: 'purchase-order', path: 'purchase-order',
loadComponent: () => import('./pages/purchase-order/purchase-order').then(x => x.PurchaseOrder) loadComponent: () => import('./pages/purchase-order/purchase-order').then(m => m.PurchaseOrder),
canActivate: [authGuard]
}, },
{ {
path: 'delivery-note', path: 'delivery-note',
loadComponent: () => import('./pages/delivery-note/delivery-note').then(x => x.DeliveryNote) loadComponent: () => import('./pages/delivery-note/delivery-note').then(m => m.DeliveryNote),
canActivate: [authGuard]
}, },
{ {
path: 'user', path: 'user',
loadComponent: () => import('./pages/user/user').then(x => x.User) loadComponent: () => import('./pages/user/user').then(m => m.User),
canActivate: [authGuard],
},
{
path: '**',
redirectTo: 'dashboard'
}
]
} }
]; ];
+2 -6
View File
@@ -1,15 +1,11 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {RouterLink, RouterLinkActive, RouterOutlet} from '@angular/router'; import {RouterOutlet} from '@angular/router';
import {NzLayoutModule} from 'ng-zorro-antd/layout'; import {NzLayoutModule} from 'ng-zorro-antd/layout';
import {NzMenuModule} from 'ng-zorro-antd/menu'; import {NzMenuModule} from 'ng-zorro-antd/menu';
import {NzIconDirective} from "ng-zorro-antd/icon";
import {ModalNav} from "./components/modal-nav/modal-nav";
import {Profil} from "./components/profil/profil";
import {SettingForm} from "./components/setting-form/setting-form";
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
imports: [RouterOutlet, NzLayoutModule, NzMenuModule, NzIconDirective, RouterLinkActive, RouterLink, ModalNav, Profil, SettingForm], imports: [RouterOutlet, NzLayoutModule, NzMenuModule],
templateUrl: './app.html', templateUrl: './app.html',
styleUrl: './app.css' styleUrl: './app.css'
}) })
@@ -1,4 +1,4 @@
import {Component, inject, OnInit, output, signal} from '@angular/core'; import {Component, inject, OnInit, signal} from '@angular/core';
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms"; import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid"; import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzFlexDirective} from "ng-zorro-antd/flex"; import {NzFlexDirective} from "ng-zorro-antd/flex";
@@ -43,9 +43,11 @@
<div style="justify-content: center; display: flex"> <div style="justify-content: center; display: flex">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(deliverer)"></nz-icon> (click)="openEditModal(deliverer)"></nz-icon>
@if (admin()){
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliverer.id)" <nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliverer.id)"
class="text-red-600 cursor-pointer"></nz-icon> class="text-red-600 cursor-pointer"></nz-icon>
}
</div> </div>
</td> </td>
</tr> </tr>
@@ -9,7 +9,7 @@ import {DelivererForm} from "../deliverer-form/deliverer-form";
import {DeliverersService, GetDelivererDto, GetSupplierDto} from "../../services/api"; import {DeliverersService, GetDelivererDto, GetSupplierDto} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
import {SupplierForm} from "../supplier-form/supplier-form"; import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-deliverer-table', selector: 'app-deliverer-table',
@@ -29,13 +29,17 @@ import {SupplierForm} from "../supplier-form/supplier-form";
export class DelivererTable implements OnInit { export class DelivererTable implements OnInit {
private deliverersService = inject(DeliverersService); private deliverersService = inject(DeliverersService);
private notificationService = inject(NzNotificationService) private notificationService = inject(NzNotificationService)
private authService = inject(AuthService);
deliverers = signal<GetDelivererDto[]>([]); deliverers = signal<GetDelivererDto[]>([]);
deliverersLoading = signal<boolean>(false); deliverersLoading = signal<boolean>(false);
updateDeliverer = viewChild.required<DelivererForm>('delivererForm'); admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
async ngOnInit() { async ngOnInit() {
await this.fetchDeliverers(); await this.fetchDeliverers();
this.admin.set(this.authService.isAdmin());
} }
async fetchDeliverers() { async fetchDeliverers() {
@@ -44,11 +48,8 @@ export class DelivererTable implements OnInit {
try { try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint()) const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint())
this.deliverers.set(deliverers); this.deliverers.set(deliverers);
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des transporteurs');
'Erreur',
'Erreur de communication avec l\'API'
)
} }
this.deliverersLoading.set(false) this.deliverersLoading.set(false)
} }
@@ -56,11 +57,8 @@ export class DelivererTable implements OnInit {
async delete(deliverer: number) { async delete(deliverer: number) {
try { try {
await firstValueFrom(this.deliverersService.deleteDelivererEndpoint(deliverer)) await firstValueFrom(this.deliverersService.deleteDelivererEndpoint(deliverer))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée');
'Success', } catch {
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error( this.notificationService.error(
'Erreur', 'Erreur',
'Impossible de supprimer la ligne' 'Impossible de supprimer la ligne'
@@ -71,10 +69,7 @@ export class DelivererTable implements OnInit {
async edit(id: number, updateDelivererComponent: DelivererForm) { async edit(id: number, updateDelivererComponent: DelivererForm) {
if (updateDelivererComponent.delivererForm.invalid) { if (updateDelivererComponent.delivererForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide');
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
return; return;
} }
@@ -83,7 +78,7 @@ export class DelivererTable implements OnInit {
await firstValueFrom(this.deliverersService.updateDelivererEndpoint(id, deliverers)) await firstValueFrom(this.deliverersService.updateDelivererEndpoint(id, deliverers))
this.notificationService.success('Success', 'Transporteur modifié') this.notificationService.success('Success', 'Transporteur modifié')
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification') this.notificationService.error('Erreur', 'Erreur lors de la modification')
} }
} }
@@ -100,7 +95,7 @@ export class DelivererTable implements OnInit {
await this.edit(supplierId, updateDelivererComponent); await this.edit(supplierId, updateDelivererComponent);
updateDelivererComponent.delivererForm.reset(); updateDelivererComponent.delivererForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchDeliverers(); await this.fetchDeliverers();
} }
@@ -5,7 +5,7 @@
</nz-form-label> </nz-form-label>
<nz-form-control nzSpan="9" nzErrorTip="Ce champ est requis"> <nz-form-control nzSpan="9" nzErrorTip="Ce champ est requis">
<nz-select formControlName="delivererId" [nzPlaceHolder]="'Choisir un transporteur'" nzShowSearch> <nz-select formControlName="delivererId" nzPlaceHolder="Choisir un transporteur" nzShowSearch>
@for (deliverer of deliverers(); track deliverer.id) { @for (deliverer of deliverers(); track deliverer.id) {
<nz-option [nzValue]="deliverer.id" [nzLabel]="deliverer.transporter"></nz-option> <nz-option [nzValue]="deliverer.id" [nzLabel]="deliverer.transporter"></nz-option>
} }
@@ -46,7 +46,7 @@ export class DelivereryNoteForm implements OnInit {
try { try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint()); const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliverers.set(deliverers); this.deliverers.set(deliverers);
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Impossible de récupérer les transporteurs'); this.notificationService.error('Erreur', 'Impossible de récupérer les transporteurs');
} }
} }
@@ -38,9 +38,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(deliveryNote)"></nz-icon> (click)="openEditModal(deliveryNote)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
@if (admin()){
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliveryNote.id)" <nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliveryNote.id)"
class="cursor-pointer text-red-700"/> class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" nzTheme="outline" (click)="export(deliveryNote.id)" <nz-icon nzType="export" nzTheme="outline" (click)="export(deliveryNote.id)"
class="cursor-pointer text-green-700"/> class="cursor-pointer text-green-700"/>
</div> </div>
@@ -10,6 +10,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
import {format} from "date-fns"; import {format} from "date-fns";
import {FileService} from "../../services/file.service"; import {FileService} from "../../services/file.service";
import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-deliverery-note-table', selector: 'app-deliverery-note-table',
@@ -28,15 +29,19 @@ export class DelivereryNoteTable implements OnInit {
private deliveryNotesService = inject(DeliverynotesService); private deliveryNotesService = inject(DeliverynotesService);
private notificationService = inject(NzNotificationService); private notificationService = inject(NzNotificationService);
private fileService = inject(FileService); private fileService = inject(FileService);
private authService = inject(AuthService);
deliveryNotes = signal<GetDeliveryNoteDto[]>([]); deliveryNotes = signal<GetDeliveryNoteDto[]>([]);
deliveryNotesLoading = signal<boolean>(false); deliveryNotesLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
date: string = ""; date = new Date().toISOString().split('T')[0]; // yyyy-mm-dd
async ngOnInit() { async ngOnInit() {
await this.fetchDeliveryNotes(); await this.fetchDeliveryNotes();
this.date = new Date().toISOString().split('T')[0]; this.admin.set(this.authService.isAdmin());
} }
async fetchDeliveryNotes() { async fetchDeliveryNotes() {
@@ -44,11 +49,8 @@ export class DelivereryNoteTable implements OnInit {
try { try {
const deliveryNotes = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNoteEndpoint()); const deliveryNotes = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNoteEndpoint());
this.deliveryNotes.set(deliveryNotes); this.deliveryNotes.set(deliveryNotes);
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des bons de livraison');
'Erreur',
'Erreur de communication avec l\'API'
)
} }
this.deliveryNotesLoading.set(false) this.deliveryNotesLoading.set(false)
} }
@@ -57,15 +59,9 @@ export class DelivereryNoteTable implements OnInit {
this.deliveryNotesLoading.set(true) this.deliveryNotesLoading.set(true)
try { try {
await firstValueFrom(this.deliveryNotesService.deleteDeliveryNoteEndpoint(deliveryNote)); await firstValueFrom(this.deliveryNotesService.deleteDeliveryNoteEndpoint(deliveryNote));
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée');
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne');
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
this.deliveryNotesLoading.set(false) this.deliveryNotesLoading.set(false)
await this.fetchDeliveryNotes(); await this.fetchDeliveryNotes();
@@ -80,22 +76,12 @@ export class DelivereryNoteTable implements OnInit {
try { try {
await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(deliveryNote, PatchRealDate)) await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(deliveryNote, PatchRealDate))
this.notificationService.success('Success', 'Date actualisée');
this.notificationService.success( } catch {
'Success', this.notificationService.error('Erreur', 'La date à déjà été actualisée');
'Date actualisée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'La date à déjà été actualisée'
)
} }
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur d\'actualisation de la date');
'Erreur',
'Erreur d\'actualisation de la date'
)
} }
this.deliveryNotesLoading.set(false) this.deliveryNotesLoading.set(false)
await this.fetchDeliveryNotes() await this.fetchDeliveryNotes()
@@ -104,15 +90,10 @@ export class DelivereryNoteTable implements OnInit {
async export(deliveryNoteId: number) { async export(deliveryNoteId: number) {
this.deliveryNotesLoading.set(true) this.deliveryNotesLoading.set(true)
try { try {
const pdf = await firstValueFrom( const pdf = await firstValueFrom(this.deliveryNotesService.getDeliveryNotePdfEndpoint(deliveryNoteId, "response"));
this.deliveryNotesService.getDeliveryNotePdfEndpoint(deliveryNoteId, "response")
);
this.fileService.downloadBlob(pdf) this.fileService.downloadBlob(pdf)
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Impossible de générer un PDF');
'Erreur',
'Impossible de générer un PDF'
);
} }
this.deliveryNotesLoading.set(false) this.deliveryNotesLoading.set(false)
} }
@@ -139,7 +120,7 @@ export class DelivereryNoteTable implements OnInit {
await firstValueFrom(this.deliveryNotesService.updateDeliveryNoteEndpoint(id, deliveryNoteDto)); await firstValueFrom(this.deliveryNotesService.updateDeliveryNoteEndpoint(id, deliveryNoteDto));
this.notificationService.success('Success', 'Bon de livraison modifié'); this.notificationService.success('Success', 'Bon de livraison modifié');
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification'); this.notificationService.error('Erreur', 'Erreur lors de la modification');
} }
} }
@@ -156,7 +137,7 @@ export class DelivereryNoteTable implements OnInit {
await this.edit(id, updateDelivereryNoteComponent); await this.edit(id, updateDelivereryNoteComponent);
updateDelivereryNoteComponent.deliveryNoteForm.reset(); updateDelivereryNoteComponent.deliveryNoteForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchDeliveryNotes(); await this.fetchDeliveryNotes();
} }
@@ -43,10 +43,7 @@ export class DeliveryValidator implements OnInit {
const wareHouses = await firstValueFrom(this.warehousesService.getAllWarehouseEndpoint()); const wareHouses = await firstValueFrom(this.warehousesService.getAllWarehouseEndpoint());
this.wareHouses.set(wareHouses); this.wareHouses.set(wareHouses);
} catch { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des quantitées')
'Erreur',
'Erreur de communication avec l\'API'
)
} }
} }
@@ -55,10 +52,7 @@ export class DeliveryValidator implements OnInit {
const deliveries = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNotesNotArrivedEndpoint()); const deliveries = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNotesNotArrivedEndpoint());
this.deliveryNotes.set(deliveries); this.deliveryNotes.set(deliveries);
} catch { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des bon de livraison')
'Erreur',
'Erreur de communication avec l\'API'
)
} }
} }
@@ -76,11 +70,8 @@ export class DeliveryValidator implements OnInit {
realDeliveryDate: format(new Date(), 'yyyy-MM-dd') realDeliveryDate: format(new Date(), 'yyyy-MM-dd')
}; };
await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(id, PatchRealDate)); await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(id, PatchRealDate));
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Impossible d\'actualiser la date')
'Erreur',
'Erreur de communication avec l\'API',
)
} }
} }
@@ -98,18 +89,12 @@ export class DeliveryValidator implements OnInit {
)); ));
} }
this.notificationService.success( this.notificationService.success('Succès', 'Les produits sont bien ajoutés au stock')
'Succès',
'Les produits sont bien ajoutés au stock'
)
modal.isVisible = false; modal.isVisible = false;
await this.fetchDeliveryNotes(); await this.fetchDeliveryNotes();
} catch { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Vous devez choisir un entrepôt')
'Erreur',
'Vous devez choisir un entrepôt',
)
} }
} }
+122
View File
@@ -0,0 +1,122 @@
:host {
display: flex;
}
.app-layout {
height: 100vh;
}
nz-header {
display: flex;
align-items: center;
background: #001529;
padding: 0 24px;
}
.header-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
/* --- LOGO + TITRE --- */
.logo {
display: flex;
align-items: center;
}
.logo a {
display: flex;
align-items: center;
text-decoration: none;
}
.logo img {
height: 40px;
width: auto;
}
.logo h1 {
margin: 0 0 0 10px;
color: #fff;
font-weight: 600;
font-size: 20px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
}
/* --- MENU PRINCIPAL --- */
.top-nav {
flex: 1;
margin: 0 40px;
line-height: 64px;
background: #001529;
border: none;
}
/* Couleur grise par défaut + effet blanc et zoom au survol */
.top-nav li {
transition: transform 0.2s ease, color 0.2s ease;
}
.top-nav li a {
color: #bfbfbf !important; /* gris clair par défaut */
transition: transform 0.2s ease, color 0.2s ease;
}
/* Au survol → zoom + blanc pur */
.top-nav li:hover {
transform: scale(1.08);
background: transparent !important;
color: #fff !important;
}
.top-nav li:hover a {
color: #ffffff !important;
}
/* Supprime toute coloration bleue ou fond par défaut NG-ZORRO */
.top-nav li.ant-menu-item-active,
.top-nav li.ant-menu-item-selected {
background: transparent !important;
color: #fff !important;
}
/* --- ICONES DROITES --- */
.right-icons {
display: flex;
align-items: center;
gap: 20px;
color: #fff;
font-size: 18px;
cursor: pointer;
}
.right-icons app-modal-nav {
transition: transform 0.2s ease, color 0.2s ease;
}
.disconnect {
transition: transform 0.2s ease, color 0.2s ease;
}
.disconnect:hover {
color: #40a9ff;
transform: scale(1.2);
}
.right-icons app-modal-nav:hover {
color: #40a9ff;
transform: scale(1.2);
}
/* --- CONTENU --- */
nz-content {
padding: 24px 50px;
}
.inner-content {
padding: 24px;
background: #fff;
height: 100%;
}
+90
View File
@@ -0,0 +1,90 @@
<nz-layout class="app-layout">
<nz-header>
<div class="header-container">
<!-- LOGO -->
<div class="logo">
<a routerLink="/dashboard">
<img
src="https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png"
alt="logo"
style="width: 100px; height: auto"
/>
<h1 class="text-amber-300">PYRO FÊTES</h1>
</a>
</div>
<!-- MENU PRINCIPAL -->
<ul nz-menu class="top-nav" nzTheme="dark" nzMode="horizontal">
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/stock">
<nz-icon nzType="stock"></nz-icon>
<span>Stock</span>
</a>
</li>
<li nz-submenu nzTitle="Partenaires" nzIcon="team">
<ul>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/supplier">
<nz-icon nzType="shop"></nz-icon>
<span>Fournisseurs</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/deliverer">
<nz-icon nzType="car"></nz-icon>
<span>Livreurs</span>
</a>
</li>
</ul>
</li>
<li nz-submenu nzTitle="Recettes" nzIcon="euro-circle">
<ul>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/quotation">
<nz-icon nzType="file"></nz-icon>
<span>Devis</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/purchase-order">
<nz-icon nzType="file"></nz-icon>
<span>Bon de commande</span>
</a>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/delivery-note">
<nz-icon nzType="file"></nz-icon>
<span>Bon de livraison</span>
</a>
</li>
</ul>
</li>
@if (admin()) {
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/user">
<nz-icon nzType="user"></nz-icon>
<span>Utilisateur</span>
</a>
</li>
}
</ul>
<!-- ICONES À DROITE -->
<div class="right-icons">
<nz-icon nzType="logout" nzTheme="outline" class="disconnect" (click)="disconnect()"/>
<app-modal-nav nameIcon="user" name="Profil">
<app-profil></app-profil>
</app-modal-nav>
<app-modal-nav nameIcon="setting" name="Paramètres">
<app-setting-form></app-setting-form>
</app-modal-nav>
</div>
</div>
</nz-header>
<nz-content>
<div class="inner-content overflow-auto">
<router-outlet></router-outlet>
</div>
</nz-content>
</nz-layout>
+45
View File
@@ -0,0 +1,45 @@
import {Component, inject, OnInit, signal} from '@angular/core';
import {ModalNav} from "../modal-nav/modal-nav";
import {NzContentComponent, NzHeaderComponent, NzLayoutComponent} from "ng-zorro-antd/layout";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzMenuDirective, NzMenuItemComponent, NzSubMenuComponent} from "ng-zorro-antd/menu";
import {Profil} from "../profil/profil";
import {Router, RouterLink, RouterLinkActive, RouterOutlet} from "@angular/router";
import {SettingForm} from "../setting-form/setting-form";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-layout',
imports: [
ModalNav,
NzContentComponent,
NzHeaderComponent,
NzIconDirective,
NzLayoutComponent,
NzMenuDirective,
NzMenuItemComponent,
NzSubMenuComponent,
Profil,
RouterLink,
RouterLinkActive,
RouterOutlet,
SettingForm
],
templateUrl: './layout.html',
styleUrl: './layout.css',
})
export class Layout implements OnInit {
private authService = inject(AuthService);
private router = inject(Router);
admin = signal<boolean>(false);
ngOnInit() {
this.admin.set(this.authService.isAdmin());
}
async disconnect() {
this.authService.logout();
await this.router.navigate(['/login']);
}
}
@@ -1,4 +1,4 @@
import {Component, input, Input, output} from '@angular/core'; import {Component, input, output} from '@angular/core';
import {NzModalComponent} from "ng-zorro-antd/modal"; import {NzModalComponent} from "ng-zorro-antd/modal";
import {NzButtonComponent} from "ng-zorro-antd/button"; import {NzButtonComponent} from "ng-zorro-antd/button";
+1 -1
View File
@@ -1,4 +1,4 @@
import {Component, Input, input, output} from '@angular/core'; import {Component, input, output} from '@angular/core';
import {NzButtonModule} from 'ng-zorro-antd/button'; import {NzButtonModule} from 'ng-zorro-antd/button';
import {NzModalModule} from 'ng-zorro-antd/modal'; import {NzModalModule} from 'ng-zorro-antd/modal';
import {NzIconDirective} from "ng-zorro-antd/icon"; import {NzIconDirective} from "ng-zorro-antd/icon";
+1 -1
View File
@@ -4,7 +4,7 @@ import {NzColDirective} from "ng-zorro-antd/grid";
import {NzFlexDirective} from "ng-zorro-antd/flex"; import {NzFlexDirective} from "ng-zorro-antd/flex";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input"; import {NzInputDirective} from "ng-zorro-antd/input";
import {GetPriceDto, GetSupplierDto} from "../../services/api"; import {GetPriceDto} from "../../services/api";
@Component({ @Component({
selector: 'app-price-form', selector: 'app-price-form',
@@ -1,21 +0,0 @@
<form nz-form nzLayout="horizontal" [formGroup]="productForm">
<nz-form-item nz-flex>
<nz-form-label nzSpan="9" nzRequired>
Prix
</nz-form-label>
<nz-form-control nzSpan="8" nzErrorTip="Ce champ est requis">
<input nz-input placeholder="Prix" formControlName="price">
</nz-form-control>
</nz-form-item>
<nz-form-item nz-flex>
<nz-form-label nzSpan="9" nzRequired>
Quantité
</nz-form-label>
<nz-form-control nzSpan="8" nzErrorTip="Ce champ est requis">
<input nz-input placeholder="Quantité" formControlName="quantity">
</nz-form-control>
</nz-form-item>
</form>
@@ -1,29 +0,0 @@
import {Component} from '@angular/core';
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from "@angular/forms";
import {NzColDirective} from "ng-zorro-antd/grid";
import {NzFlexDirective} from "ng-zorro-antd/flex";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input";
@Component({
selector: 'app-product-form',
imports: [
FormsModule,
NzColDirective,
NzFlexDirective,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
ReactiveFormsModule
],
templateUrl: './product-form.html',
styleUrl: './product-form.css',
})
export class ProductForm {
productForm: FormGroup = new FormGroup({
price: new FormControl<string>(null, [Validators.required]),
quantity: new FormControl<string>(null, [Validators.required])
})
}
@@ -26,8 +26,7 @@
<nz-form-control nzSpan="12" nzErrorTip="Ce champ est requis"> <nz-form-control nzSpan="12" nzErrorTip="Ce champ est requis">
<nz-select formControlName="fonction" [nzPlaceHolder]="'Choisir une fonction'"> <nz-select formControlName="fonction" [nzPlaceHolder]="'Choisir une fonction'">
<nz-option nzLabel="Admin" nzValue="Admin"></nz-option> <nz-option nzLabel="Admin" nzValue="Admin"></nz-option>
<nz-option nzLabel="Visiteur" nzValue="Visiteur"></nz-option> <nz-option nzLabel="Employé" nzValue="Employe"></nz-option>
<nz-option nzLabel="Partenaire" nzValue="Partenaire"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
+4 -10
View File
@@ -1,15 +1,9 @@
<div class="ml-110 cursor-pointer">
<app-modal-nav nameIcon="edit" name="Modification du profil">
<app-profil-form [user]=""></app-profil-form>
</app-modal-nav>
</div>
<div class="mx-auto flex items-center justify-center w-30 h-30 rounded-full bg-blue-900 text-white text-6xl fontProfil"> <div class="mx-auto flex items-center justify-center w-30 h-30 rounded-full bg-blue-900 text-white text-6xl fontProfil">
{{ getInitial(data.name) }} {{ getInitial(user().name) }}
</div> </div>
<div class="mt-6"> <div class="mt-6">
<p class="text-3xl festive2 mx-auto flex items-center justify-center">{{ data.name }}</p> <p class="text-3xl festive2 mx-auto flex items-center justify-center">{{ user().name }}</p>
<p class="text-xl festive2 mt-0 flex items-center justify-center">{{ data.email }}</p> <p class="text-xl festive2 mt-0 flex items-center justify-center">{{ user().email }}</p>
<p class="text-xl festive2 mt-0 flex items-center justify-center">{{ data.fonction }}</p> <p class="text-xl festive2 mt-0 flex items-center justify-center">{{ user().fonction }}</p>
</div> </div>
+19 -15
View File
@@ -1,24 +1,28 @@
import {Component} from '@angular/core'; import {Component, inject, OnInit, signal} from '@angular/core';
import {UserInfo} from "../../interfaces/user.interface"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {ProfilForm} from "../profil-form/profil-form"; import {GetUserDto, UserService} from "../../services/api";
import {ModalNav} from "../modal-nav/modal-nav"; import {firstValueFrom} from "rxjs";
@Component({ @Component({
selector: 'app-profil', selector: 'app-profil',
imports: [ imports: [],
ProfilForm,
ModalNav
],
templateUrl: './profil.html', templateUrl: './profil.html',
styleUrl: './profil.css', styleUrl: './profil.css',
}) })
export class Profil { export class Profil implements OnInit {
data: UserInfo = private notificationService = inject(NzNotificationService);
{ private userService = inject(UserService);
name: 'Mathys Sanchez Vendé',
email: 'mathys.sanchez@vende.fr', user = signal<GetUserDto>({});
fonction: 'admin',
}; async ngOnInit() {
try {
const user = await firstValueFrom(this.userService.getUserEndpoint());
this.user.set(user);
} catch {
this.notificationService.error('Erreur', 'Impossible de charger l\'utilisateur');
}
}
getInitial(name: string): string { getInitial(name: string): string {
if (!name || name.trim() === '') return '?'; if (!name || name.trim() === '') return '?';
@@ -60,9 +60,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(purchaseOrder)"></nz-icon> (click)="openEditModal(purchaseOrder)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
@if (admin()) {
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(purchaseOrder.id)" <nz-icon nzType="delete" nzTheme="outline" (click)="delete(purchaseOrder.id)"
class="cursor-pointer text-red-700"/> class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" nzTheme="outline" (click)="export(purchaseOrder.id)" <nz-icon nzType="export" nzTheme="outline" (click)="export(purchaseOrder.id)"
class="cursor-pointer text-green-700"/> class="cursor-pointer text-green-700"/>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
@@ -17,6 +17,7 @@ import {firstValueFrom} from "rxjs";
import {FileService} from "../../services/file.service"; import {FileService} from "../../services/file.service";
import {QuantityForm} from "../quantity-form/quantity-form"; import {QuantityForm} from "../quantity-form/quantity-form";
import {DelivererChoice} from "../deliverer-choice/deliverer-choice"; import {DelivererChoice} from "../deliverer-choice/deliverer-choice";
import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-purchase-order-table', selector: 'app-purchase-order-table',
@@ -38,9 +39,11 @@ export class PurchaseOrderTable implements OnInit {
private notificationService = inject(NzNotificationService); private notificationService = inject(NzNotificationService);
private fileService = inject(FileService); private fileService = inject(FileService);
private deliveryNoteService = inject(DeliverynotesService); private deliveryNoteService = inject(DeliverynotesService);
private authService = inject(AuthService);
purchaseOrders = signal<GetPurchaseOrderDto[]>([]); purchaseOrders = signal<GetPurchaseOrderDto[]>([]);
purchaseOrdersLoading = signal<boolean>(false); purchaseOrdersLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
modalQuantity = viewChild.required<ModalNav>('modalQuantity'); modalQuantity = viewChild.required<ModalNav>('modalQuantity');
@@ -48,6 +51,7 @@ export class PurchaseOrderTable implements OnInit {
async ngOnInit() { async ngOnInit() {
await this.fetchPurchaseOrder(); await this.fetchPurchaseOrder();
this.admin.set(this.authService.isAdmin());
} }
async fetchPurchaseOrder() { async fetchPurchaseOrder() {
@@ -56,11 +60,8 @@ export class PurchaseOrderTable implements OnInit {
try { try {
const purchaseOrders = await firstValueFrom(this.purchaseOrdersService.getAllPurchaseOrderEndpoint()) const purchaseOrders = await firstValueFrom(this.purchaseOrdersService.getAllPurchaseOrderEndpoint())
this.purchaseOrders.set(purchaseOrders); this.purchaseOrders.set(purchaseOrders);
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des bons de commande')
'Erreur',
'Erreur de communication avec l\'API'
)
} }
this.purchaseOrdersLoading.set(false) this.purchaseOrdersLoading.set(false)
} }
@@ -69,15 +70,9 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersLoading.set(true) this.purchaseOrdersLoading.set(true)
try { try {
await firstValueFrom(this.purchaseOrdersService.deletePurchaseOrderEndpoint(purchaseOrderId)) await firstValueFrom(this.purchaseOrdersService.deletePurchaseOrderEndpoint(purchaseOrderId))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée')
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
this.purchaseOrdersLoading.set(false) this.purchaseOrdersLoading.set(false)
await this.fetchPurchaseOrder(); await this.fetchPurchaseOrder();
@@ -90,11 +85,8 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersService.getPurchaseOrderPdfEndpoint(purchaseOrderId, "response") this.purchaseOrdersService.getPurchaseOrderPdfEndpoint(purchaseOrderId, "response")
); );
this.fileService.downloadBlob(pdf) this.fileService.downloadBlob(pdf)
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Impossible de générer un PDF');
'Erreur',
'Impossible de générer un PDF'
);
} }
this.purchaseOrdersLoading.set(false) this.purchaseOrdersLoading.set(false)
} }
@@ -104,15 +96,7 @@ export class PurchaseOrderTable implements OnInit {
try { try {
const deliverer = delivererForm.choiceDelivererForm.getRawValue(); const deliverer = delivererForm.choiceDelivererForm.getRawValue();
const today = new Date(); const date = new Date().toISOString().split('T')[0]; // yyyy-mm-dd
const date = today.toISOString().split('T')[0]; // yyyy-mm-dd
const futureDate = new Date(today);
futureDate.setMonth(today.getMonth() + 2);
const yyyy = futureDate.getFullYear();
const mm = (futureDate.getMonth() + 1).toString().padStart(2, '0');
const dd = futureDate.getDate().toString().padStart(2, '0');
const estimateDate = `${yyyy}-${mm}-${dd}`;
let trackingValue = 'TRK-'; let trackingValue = 'TRK-';
const idStr = purchaseOrder.id?.toString() ?? ''; const idStr = purchaseOrder.id?.toString() ?? '';
@@ -129,8 +113,6 @@ export class PurchaseOrderTable implements OnInit {
const deliveryNoteDto: CreateDeliveryNoteDto = { const deliveryNoteDto: CreateDeliveryNoteDto = {
trackingNumber: trackingValue, trackingNumber: trackingValue,
expeditionDate: date,
estimateDeliveryDate: estimateDate,
delivererId: deliverer.delivererId, delivererId: deliverer.delivererId,
productQuantities: productQuantities, productQuantities: productQuantities,
supplierId: purchaseOrder.supplierId supplierId: purchaseOrder.supplierId
@@ -141,16 +123,14 @@ export class PurchaseOrderTable implements OnInit {
} catch { } catch {
this.notificationService.error('Erreur', 'Erreur lors du transfert'); this.notificationService.error('Erreur', 'Erreur lors du transfert');
} }
this.onModalCancel(this.modalDeliverer());
this.purchaseOrdersLoading.set(false); this.purchaseOrdersLoading.set(false);
} }
async edit(id: number, updatePurchaseOrderComponent: PurchaseOrderForm) { async edit(id: number, updatePurchaseOrderComponent: PurchaseOrderForm) {
if (updatePurchaseOrderComponent.purchaseOrderForm.invalid) { if (updatePurchaseOrderComponent.purchaseOrderForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
return; return;
} }
@@ -159,7 +139,7 @@ export class PurchaseOrderTable implements OnInit {
await firstValueFrom(this.purchaseOrdersService.patchPurchaseOrderPurchaseConditionsEndpoint(id, purchaseOrders)) await firstValueFrom(this.purchaseOrdersService.patchPurchaseOrderPurchaseConditionsEndpoint(id, purchaseOrders))
this.notificationService.success('Success', 'Bon de commande modifié') this.notificationService.success('Success', 'Bon de commande modifié')
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification') this.notificationService.error('Erreur', 'Erreur lors de la modification')
} }
} }
@@ -168,15 +148,9 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersLoading.set(true) this.purchaseOrdersLoading.set(true)
try { try {
await firstValueFrom(this.purchaseOrdersService.deleteProductFromPurchaseOrderEndpoint(productId, purchaseOrderId)) await firstValueFrom(this.purchaseOrdersService.deleteProductFromPurchaseOrderEndpoint(productId, purchaseOrderId))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée')
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
this.purchaseOrdersLoading.set(false) this.purchaseOrdersLoading.set(false)
await this.fetchPurchaseOrder(); await this.fetchPurchaseOrder();
@@ -184,10 +158,7 @@ export class PurchaseOrderTable implements OnInit {
async editQuantity(productId: number, purchaseOrderId: number, updateQuantityComponent: QuantityForm) { async editQuantity(productId: number, purchaseOrderId: number, updateQuantityComponent: QuantityForm) {
if (updateQuantityComponent.quantityForm.invalid) { if (updateQuantityComponent.quantityForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur d\'écriture dans le formulaire')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
return; return;
} }
@@ -218,7 +189,7 @@ export class PurchaseOrderTable implements OnInit {
await this.edit(id, updatePurchaseOrderComponent); await this.edit(id, updatePurchaseOrderComponent);
updatePurchaseOrderComponent.purchaseOrderForm.reset(); updatePurchaseOrderComponent.purchaseOrderForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchPurchaseOrder(); await this.fetchPurchaseOrder();
} }
@@ -238,7 +209,7 @@ export class PurchaseOrderTable implements OnInit {
await this.editQuantity(productId, purchaseOrderId, updateQuantityComponent); await this.editQuantity(productId, purchaseOrderId, updateQuantityComponent);
updateQuantityComponent.quantityForm.reset(); updateQuantityComponent.quantityForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchPurchaseOrder(); await this.fetchPurchaseOrder();
} }
} }
@@ -4,7 +4,7 @@ import {NzColDirective} from "ng-zorro-antd/grid";
import {NzFlexDirective} from "ng-zorro-antd/flex"; import {NzFlexDirective} from "ng-zorro-antd/flex";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form"; import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input"; import {NzInputDirective} from "ng-zorro-antd/input";
import {GetDelivererDto, GetPurchaseProductDto} from "../../services/api"; import {GetPurchaseProductDto} from "../../services/api";
@Component({ @Component({
selector: 'app-quantity-form', selector: 'app-quantity-form',
@@ -60,9 +60,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(quotation)"></nz-icon> (click)="openEditModal(quotation)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
@if (admin()) {
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700" <nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700"
(click)="delete(quotation.id)"/> (click)="delete(quotation.id)"/>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" (click)="export(quotation.id)" nzTheme="outline" <nz-icon nzType="export" (click)="export(quotation.id)" nzTheme="outline"
class="cursor-pointer text-green-700"/> class="cursor-pointer text-green-700"/>
</div> </div>
@@ -14,6 +14,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
import {FileService} from "../../services/file.service"; import {FileService} from "../../services/file.service";
import {QuantityForm} from "../quantity-form/quantity-form"; import {QuantityForm} from "../quantity-form/quantity-form";
import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-quotation-table', selector: 'app-quotation-table',
@@ -34,13 +35,18 @@ export class QuotationTable implements OnInit {
private quotationsService = inject(QuotationsService); private quotationsService = inject(QuotationsService);
private notificationService = inject(NzNotificationService); private notificationService = inject(NzNotificationService);
private fileService = inject(FileService); private fileService = inject(FileService);
private authService = inject(AuthService);
quotations = signal<GetQuotationDto[]>([]); quotations = signal<GetQuotationDto[]>([]);
quotationsLoading = signal<boolean>(false); quotationsLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
modalQuantity = viewChild.required<ModalNav>('modalQuantity'); modalQuantity = viewChild.required<ModalNav>('modalQuantity');
async ngOnInit() { async ngOnInit() {
await this.fetchQuotations(); await this.fetchQuotations();
this.admin.set(this.authService.isAdmin());
} }
async fetchQuotations() { async fetchQuotations() {
@@ -49,11 +55,8 @@ export class QuotationTable implements OnInit {
try { try {
const quotations = await firstValueFrom(this.quotationsService.getAllQuotationEndpoint()) const quotations = await firstValueFrom(this.quotationsService.getAllQuotationEndpoint())
this.quotations.set(quotations); this.quotations.set(quotations);
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Erreur lors du chargement des devis')
'Erreur',
'Erreur de communication avec l\'API'
)
} }
this.quotationsLoading.set(false) this.quotationsLoading.set(false)
} }
@@ -62,15 +65,9 @@ export class QuotationTable implements OnInit {
this.quotationsLoading.set(true) this.quotationsLoading.set(true)
try { try {
await firstValueFrom(this.quotationsService.deleteQuotationEndpoint(quotation)) await firstValueFrom(this.quotationsService.deleteQuotationEndpoint(quotation))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée')
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
this.quotationsLoading.set(false) this.quotationsLoading.set(false)
await this.fetchQuotations(); await this.fetchQuotations();
@@ -83,12 +80,8 @@ export class QuotationTable implements OnInit {
this.quotationsService.getQuotationPdfEndpoint(quotationId, "response") this.quotationsService.getQuotationPdfEndpoint(quotationId, "response")
); );
this.fileService.downloadBlob(pdf) this.fileService.downloadBlob(pdf)
} catch (e) { } catch {
console.error(e); this.notificationService.error('Erreur', 'Impossible de générer un PDF');
this.notificationService.error(
'Erreur',
'Impossible de générer un PDF'
);
} }
this.quotationsLoading.set(false) this.quotationsLoading.set(false)
} }
@@ -103,8 +96,7 @@ export class QuotationTable implements OnInit {
const quotations = updateQuotationComponent.quotationForm.getRawValue(); const quotations = updateQuotationComponent.quotationForm.getRawValue();
await firstValueFrom(this.quotationsService.updateQuotationEndpoint(id, quotations)); await firstValueFrom(this.quotationsService.updateQuotationEndpoint(id, quotations));
this.notificationService.success('Success', 'Devis modifié') this.notificationService.success('Success', 'Devis modifié')
} catch (e) { } catch {
console.error(e)
this.notificationService.error('Erreur', 'Erreur lors de la modification') this.notificationService.error('Erreur', 'Erreur lors de la modification')
} }
} }
@@ -113,15 +105,9 @@ export class QuotationTable implements OnInit {
this.quotationsLoading.set(true) this.quotationsLoading.set(true)
try { try {
await firstValueFrom(this.quotationsService.deleteProductFromQuotationEndpoint(productId, quotationId)) await firstValueFrom(this.quotationsService.deleteProductFromQuotationEndpoint(productId, quotationId))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée')
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
this.quotationsLoading.set(false) this.quotationsLoading.set(false)
await this.fetchQuotations(); await this.fetchQuotations();
@@ -129,10 +115,7 @@ export class QuotationTable implements OnInit {
async editQuantity(productId: number, quotationId: number, updateQuantityComponent: QuantityForm) { async editQuantity(productId: number, quotationId: number, updateQuantityComponent: QuantityForm) {
if (updateQuantityComponent.quantityForm.invalid) { if (updateQuantityComponent.quantityForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
return; return;
} }
@@ -141,7 +124,7 @@ export class QuotationTable implements OnInit {
await firstValueFrom(this.quotationsService.patchQuotationProductQuantityEndpoint(productId, quotationId, quantity)) await firstValueFrom(this.quotationsService.patchQuotationProductQuantityEndpoint(productId, quotationId, quantity))
this.notificationService.success('Success', 'Quantité modifiée') this.notificationService.success('Success', 'Quantité modifiée')
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification') this.notificationService.error('Erreur', 'Erreur lors de la modification')
} }
} }
@@ -158,7 +141,7 @@ export class QuotationTable implements OnInit {
await this.edit(id, updateQuotationComponent); await this.edit(id, updateQuotationComponent);
updateQuotationComponent.quotationForm.reset(); updateQuotationComponent.quotationForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchQuotations(); await this.fetchQuotations();
} }
@@ -178,7 +161,7 @@ export class QuotationTable implements OnInit {
await this.editQuantity(productId, quotationId, updateQuantityComponent); await this.editQuantity(productId, quotationId, updateQuantityComponent);
updateQuantityComponent.quantityForm.reset(); updateQuantityComponent.quantityForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchQuotations(); await this.fetchQuotations();
} }
} }
@@ -4,12 +4,13 @@
<div class="row"> <div class="row">
<div class="row-left"> <div class="row-left">
@if (settings().logo) { @if (settings().logo) {
<img [src]="'data:image/jpeg;base64,' + settings().logo" alt=""/> <img [src]="settings().logo" alt=""/>
} @else { } @else {
<img [src]="setting.logo" alt="logo"> <img [src]="setting.logo" alt="logo">
} }
</div> </div>
@if (admin()){
<div class="row-right"> <div class="row-right">
<nz-form-item> <nz-form-item>
<nz-form-label nzSpan="9">Logo</nz-form-label> <nz-form-label nzSpan="9">Logo</nz-form-label>
@@ -19,18 +20,26 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
} @else {
<div class="row-right">
<nz-form-item>
<p class="text-red-600">Vous ne pouvez pas modifier le logo</p>
</nz-form-item>
</div>
}
</div> </div>
<!-- Signature --> <!-- Signature -->
<div class="row"> <div class="row">
<div class="row-left"> <div class="row-left">
@if (settings().electronicSignature) { @if (settings().electronicSignature) {
<img [src]="'data:image/jpeg;base64,' + settings().electronicSignature" alt=""/> <img [src]="settings().electronicSignature" alt=""/>
} @else { } @else {
<img [src]="setting.electronicSignature" alt="logo"> <img [src]="setting.electronicSignature" alt="logo">
} }
</div> </div>
@if (admin()) {
<div class="row-right"> <div class="row-right">
<nz-form-item> <nz-form-item>
<nz-form-label nzSpan="9">Signature</nz-form-label> <nz-form-label nzSpan="9">Signature</nz-form-label>
@@ -40,5 +49,12 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
} @else {
<div class="row-right">
<nz-form-item>
<p class="text-red-600">Vous ne pouvez pas modifier la signature</p>
</nz-form-item>
</div>
}
</div> </div>
</form> </form>
@@ -8,6 +8,7 @@ import {firstValueFrom} from "rxjs";
import {GetSettingDto, SettingsService} from "../../services/api"; import {GetSettingDto, SettingsService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import imageCompression from "browser-image-compression"; import imageCompression from "browser-image-compression";
import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-setting-form', selector: 'app-setting-form',
@@ -27,8 +28,10 @@ import imageCompression from "browser-image-compression";
export class SettingForm implements OnInit { export class SettingForm implements OnInit {
private settingsService = inject(SettingsService); private settingsService = inject(SettingsService);
private notificationService = inject(NzNotificationService); private notificationService = inject(NzNotificationService);
private authService = inject(AuthService);
settings = signal<GetSettingDto>({}); settings = signal<GetSettingDto>({});
admin = signal<boolean>(false);
setting: SettingInfo = { setting: SettingInfo = {
logo: 'https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png', logo: 'https://www.pyro-fetes.com/wp-content/themes/pcptheme/img/logo-pyro-fetes-OR-top.png',
@@ -42,6 +45,7 @@ export class SettingForm implements OnInit {
async ngOnInit() { async ngOnInit() {
await this.fetchSettings(); await this.fetchSettings();
this.admin.set(this.authService.isAdmin());
} }
async fetchSettings() { async fetchSettings() {
@@ -49,10 +53,7 @@ export class SettingForm implements OnInit {
const settingsPicture = await firstValueFrom(this.settingsService.getSettingEndpoint()); const settingsPicture = await firstValueFrom(this.settingsService.getSettingEndpoint());
this.settings.set(settingsPicture); this.settings.set(settingsPicture);
} catch { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Aucun paramètre défini')
'Erreur',
'Aucun paramètre défini'
)
} }
} }
@@ -78,7 +79,7 @@ export class SettingForm implements OnInit {
} }
await this.fetchSettings(); await this.fetchSettings();
} catch { } catch {
this.notificationService.error('Erreur', "Erreur de communication avec l'API"); this.notificationService.error('Erreur', 'Impossible de changer les paramètres actuellement');
} }
this.settingForm.reset(); this.settingForm.reset();
@@ -6,7 +6,7 @@
</nz-form-label> </nz-form-label>
<nz-form-control nzSpan="4" nzErrorTip="Requis"> <nz-form-control nzSpan="4" nzErrorTip="Requis">
<input nz-input type="number" placeholder="12345" formControlName="minimalQuantity"> <input nz-input type="number" placeholder="0" formControlName="minimalQuantity">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</form> </form>
@@ -46,9 +46,11 @@
<div style="justify-content: center; display: flex"> <div style="justify-content: center; display: flex">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(product)"></nz-icon> (click)="openEditModal(product)"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(product.id)" <nz-icon nzType="delete" nzTheme="outline" (click)="delete(product.id)"
class="text-red-600 cursor-pointer"></nz-icon> class="text-red-600 cursor-pointer"></nz-icon>
}
</div> </div>
</td> </td>
</tr> </tr>
@@ -7,8 +7,9 @@ import {NzDividerComponent} from "ng-zorro-antd/divider";
import {FormsModule} from "@angular/forms"; import {FormsModule} from "@angular/forms";
import {GetProductDto, ProductsService, WarehouseproductsService} from "../../services/api"; import {GetProductDto, ProductsService, WarehouseproductsService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {first, firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
import {NzCheckboxComponent} from "ng-zorro-antd/checkbox"; import {NzCheckboxComponent} from "ng-zorro-antd/checkbox";
import {AuthService} from "../../services/auth.service";
interface ProductWithQuantity extends GetProductDto { interface ProductWithQuantity extends GetProductDto {
totalQuantity?: number; totalQuantity?: number;
@@ -34,9 +35,11 @@ export class StockTable implements OnInit {
private productsService = inject(ProductsService); private productsService = inject(ProductsService);
private wareHousseProductsService = inject(WarehouseproductsService) private wareHousseProductsService = inject(WarehouseproductsService)
private notificationService = inject(NzNotificationService) private notificationService = inject(NzNotificationService)
private authService = inject(AuthService);
products = signal<ProductWithQuantity[]>([]); products = signal<ProductWithQuantity[]>([]);
productsLoading = signal<boolean>(false); productsLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
@@ -50,6 +53,7 @@ export class StockTable implements OnInit {
async ngOnInit() { async ngOnInit() {
await this.fetchProducts(); await this.fetchProducts();
this.admin.set(this.authService.isAdmin());
} }
async fetchProducts() { async fetchProducts() {
@@ -76,7 +80,7 @@ export class StockTable implements OnInit {
); );
this.products.set(productsWithQuantity); this.products.set(productsWithQuantity);
} catch { } catch {
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API'); this.notificationService.error('Erreur', 'Impossible de charger le catalogue');
} }
this.productsLoading.set(false); this.productsLoading.set(false);
} }
@@ -93,7 +97,7 @@ export class StockTable implements OnInit {
async edit(id: number, updateProductComponent: StockForm) { async edit(id: number, updateProductComponent: StockForm) {
if (updateProductComponent.stockForm.invalid) { if (updateProductComponent.stockForm.invalid) {
this.notificationService.error('Erreur', 'Erreur d\'écriture dans le formulaire') this.notificationService.error('Erreur', 'Formulaire invalide')
return; return;
} }
try { try {
@@ -115,7 +119,7 @@ export class StockTable implements OnInit {
if (!this.selectedProduct) return; if (!this.selectedProduct) return;
await this.edit(productId, updateProductComponent); await this.edit(productId, updateProductComponent);
updateProductComponent.stockForm.reset(); updateProductComponent.stockForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchProducts(); await this.fetchProducts();
} }
@@ -1,4 +1,4 @@
<nz-table [nzData]="filteredSuppliers()" <nz-table [nzData]="suppliers()"
[nzLoading]="suppliersLoading()" [nzLoading]="suppliersLoading()"
[nzFrontPagination]="false"> [nzFrontPagination]="false">
<thead> <thead>
@@ -15,7 +15,7 @@
</tr> </tr>
</thead> </thead>
<tbody style="text-align: center"> <tbody style="text-align: center">
@for (supplier of filteredSuppliers(); track supplier.id) { @for (supplier of suppliers(); track supplier.id) {
<tr> <tr>
<td>{{ supplier.name }}</td> <td>{{ supplier.name }}</td>
<td>{{ supplier.phone }}</td> <td>{{ supplier.phone }}</td>
@@ -26,7 +26,7 @@
<td>{{ supplier.deliveryDelay }} jours</td> <td>{{ supplier.deliveryDelay }} jours</td>
<td> <td>
<app-modal-button type="link" [name]="'Voir les produits'" size="45%"> <app-modal-button type="link" [name]="'Voir les produits'" size="45%">
<nz-table [nzData]="filteredSuppliers()" [nzFrontPagination]="false"> <nz-table [nzData]="suppliers()" [nzFrontPagination]="false">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th>Produit</th> <th>Produit</th>
@@ -46,10 +46,12 @@
<nz-icon nzType="edit" nzTheme="outline" <nz-icon nzType="edit" nzTheme="outline"
class="cursor-pointer text-gray-600 hover:text-gray-900" class="cursor-pointer text-gray-600 hover:text-gray-900"
(click)="openEditProductModal(product, supplier.id)"></nz-icon> (click)="openEditProductModal(product, supplier.id)"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" <nz-icon nzType="delete" nzTheme="outline"
class="cursor-pointer text-red-600 hover:text-red-800" class="cursor-pointer text-red-600 hover:text-red-800"
(click)="deleteProduct(product.productId, supplier.id)"></nz-icon> (click)="deleteProduct(product.productId, supplier.id)"></nz-icon>
}
</div> </div>
</td> </td>
</tr> </tr>
@@ -62,9 +64,11 @@
<div style="display: flex; align-items: center;"> <div style="display: flex; align-items: center;">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" <nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(supplier)"></nz-icon> (click)="openEditModal(supplier)"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)" <nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)"
class="text-red-600 cursor-pointer"></nz-icon> class="text-red-600 cursor-pointer"></nz-icon>
}
</div> </div>
</td> </td>
</tr> </tr>
@@ -1,4 +1,4 @@
import {Component, computed, inject, OnInit, signal, viewChild} from '@angular/core'; import {Component, inject, OnInit, signal, viewChild} from '@angular/core';
import {ModalNav} from "../modal-nav/modal-nav"; import {ModalNav} from "../modal-nav/modal-nav";
import {NzDividerComponent} from "ng-zorro-antd/divider"; import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzIconDirective} from "ng-zorro-antd/icon"; import {NzIconDirective} from "ng-zorro-antd/icon";
@@ -9,6 +9,7 @@ import {GetPriceDto, GetSupplierDto, PricesService, SuppliersService} from "../.
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
import {PriceForm} from "../price-form/price-form"; import {PriceForm} from "../price-form/price-form";
import {AuthService} from "../../services/auth.service";
@Component({ @Component({
selector: 'app-supplier-table', selector: 'app-supplier-table',
@@ -29,34 +30,22 @@ export class SupplierTable implements OnInit {
private suppliersService = inject(SuppliersService); private suppliersService = inject(SuppliersService);
private pricesService = inject(PricesService); private pricesService = inject(PricesService);
private notificationService = inject(NzNotificationService); private notificationService = inject(NzNotificationService);
private authService = inject(AuthService);
suppliers = signal<GetSupplierDto[]>([]); suppliers = signal<GetSupplierDto[]>([]);
suppliersLoading = signal<boolean>(false); suppliersLoading = signal<boolean>(false);
updateSupplier = viewChild.required<SupplierForm>('supplierForm'); admin = signal<boolean>(false);
supplierModal = viewChild.required<ModalNav>('supplierModal'); supplierModal = viewChild.required<ModalNav>('supplierModal');
productModal = viewChild.required<ModalNav>('productModal'); productModal = viewChild.required<ModalNav>('productModal');
selectedSupplier: GetSupplierDto | null = null; selectedSupplier: GetSupplierDto | null = null;
selectedProduct: GetPriceDto | null = null; selectedProduct: GetPriceDto | null = null;
selectedProductSupplierId: number | null = null; selectedProductSupplierId: number | null = null;
async ngOnInit() { async ngOnInit() {
await this.fetchSuppliers(); await this.fetchSuppliers();
} this.admin.set(this.authService.isAdmin());
private searchQuery = signal<string>('');
filteredSuppliers = computed(() => {
const q = this.searchQuery().toLowerCase().trim();
if (!q) return this.suppliers();
return this.suppliers().filter(s => {
const name = (s.name ?? '').toLowerCase();
return name.includes(q);
});
});
applySearch(query: string) {
this.searchQuery.set(query);
} }
async fetchSuppliers() { async fetchSuppliers() {
@@ -64,7 +53,7 @@ export class SupplierTable implements OnInit {
try { try {
const suppliers = await firstValueFrom(this.suppliersService.getAllSuppliersEndpoint()); const suppliers = await firstValueFrom(this.suppliersService.getAllSuppliersEndpoint());
this.suppliers.set(suppliers); this.suppliers.set(suppliers);
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API'); this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
} }
this.suppliersLoading.set(false); this.suppliersLoading.set(false);
@@ -79,8 +68,7 @@ export class SupplierTable implements OnInit {
const suppliers = updateSupplierComponent.supplierForm.getRawValue(); const suppliers = updateSupplierComponent.supplierForm.getRawValue();
await firstValueFrom(this.suppliersService.updateSupplierEndpoint(id, suppliers)); await firstValueFrom(this.suppliersService.updateSupplierEndpoint(id, suppliers));
this.notificationService.success('Success', 'Fournisseur modifié'); this.notificationService.success('Success', 'Fournisseur modifié');
} catch (e) { } catch {
console.error(e);
this.notificationService.error('Erreur', 'Erreur lors de la modification'); this.notificationService.error('Erreur', 'Erreur lors de la modification');
} }
} }
@@ -90,7 +78,7 @@ export class SupplierTable implements OnInit {
await firstValueFrom(this.suppliersService.deleteSupplierEndpoint(supplier)); await firstValueFrom(this.suppliersService.deleteSupplierEndpoint(supplier));
this.notificationService.success('Succès', 'Suppression effectuée'); this.notificationService.success('Succès', 'Suppression effectuée');
await this.fetchSuppliers(); await this.fetchSuppliers();
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne'); this.notificationService.error('Erreur', 'Impossible de supprimer la ligne');
} }
} }
@@ -122,13 +110,13 @@ export class SupplierTable implements OnInit {
modal: ModalNav modal: ModalNav
) { ) {
if (productId == null || supplierId == null || !this.selectedProduct) { if (productId == null || supplierId == null || !this.selectedProduct) {
this.notificationService.error('Erreur', 'Identifiants produit/fournisseur manquants'); this.notificationService.error('Erreur', 'Identifiants produit ou fournisseur manquants');
return; return;
} }
await this.editPrice(productId, supplierId, updateProductComponent); await this.editPrice(productId, supplierId, updateProductComponent);
updateProductComponent.priceForm.reset(); updateProductComponent.priceForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchSuppliers(); await this.fetchSuppliers();
} }
@@ -150,8 +138,7 @@ export class SupplierTable implements OnInit {
}; };
await firstValueFrom(this.pricesService.patchPriceEndpoint(productId, supplierId, body)); await firstValueFrom(this.pricesService.patchPriceEndpoint(productId, supplierId, body));
this.notificationService.success('Success', 'Prix modifié'); this.notificationService.success('Success', 'Prix modifié');
} catch (e) { } catch {
console.error(e);
this.notificationService.error('Erreur', 'Erreur lors de la modification'); this.notificationService.error('Erreur', 'Erreur lors de la modification');
} }
} }
@@ -162,7 +149,7 @@ export class SupplierTable implements OnInit {
await firstValueFrom(this.suppliersService.deleteProductToSupplierEndpoint(idSupplier, idProduct)); await firstValueFrom(this.suppliersService.deleteProductToSupplierEndpoint(idSupplier, idProduct));
this.notificationService.success('Succès', 'Produit supprimé'); this.notificationService.success('Succès', 'Produit supprimé');
await this.fetchSuppliers(); await this.fetchSuppliers();
} catch (e) { } catch {
this.notificationService.error('Erreur', 'Impossible de supprimer le produit'); this.notificationService.error('Erreur', 'Impossible de supprimer le produit');
} }
} }
+12 -33
View File
@@ -23,9 +23,10 @@ import {firstValueFrom} from "rxjs";
export class UserTable implements OnInit { export class UserTable implements OnInit {
private usersService = inject(UsersService); private usersService = inject(UsersService);
private notificationService = inject(NzNotificationService) private notificationService = inject(NzNotificationService)
users = signal<GetUserDto[]>([]); users = signal<GetUserDto[]>([]);
usersLoading = signal<boolean>(false); usersLoading = signal<boolean>(false);
updateUser = viewChild.required<ProfilForm>('profilForm');
modal = viewChild.required<ModalNav>('modalNav'); modal = viewChild.required<ModalNav>('modalNav');
async ngOnInit() { async ngOnInit() {
@@ -38,11 +39,8 @@ export class UserTable implements OnInit {
try { try {
const users = await firstValueFrom(this.usersService.getAllUsersEndpoint()) const users = await firstValueFrom(this.usersService.getAllUsersEndpoint())
this.users.set(users); this.users.set(users);
} catch (e) { } catch {
this.notificationService.error( this.notificationService.error('Erreur', 'Impossible de charger les utilisateurs')
'Erreur',
'Erreur de communication avec l\'API'
)
} }
this.usersLoading.set(false) this.usersLoading.set(false)
} }
@@ -50,25 +48,16 @@ export class UserTable implements OnInit {
async delete(user: number) { async delete(user: number) {
try { try {
await firstValueFrom(this.usersService.deleteUserEndpoint(user)) await firstValueFrom(this.usersService.deleteUserEndpoint(user))
this.notificationService.success( this.notificationService.success('Success', 'Suppression effectuée')
'Success', } catch {
'Suppression effectuée' this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
} }
await this.fetchUsers(); await this.fetchUsers();
} }
async edit(id: number, updateUserComponent: ProfilForm) { async edit(id: number, updateUserComponent: ProfilForm) {
if (updateUserComponent.profilForm.invalid) { if (updateUserComponent.profilForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
return; return;
} }
@@ -76,15 +65,9 @@ export class UserTable implements OnInit {
const users = updateUserComponent.profilForm.getRawValue(); const users = updateUserComponent.profilForm.getRawValue();
await firstValueFrom(this.usersService.updateUserEndpoint(id, users)) await firstValueFrom(this.usersService.updateUserEndpoint(id, users))
this.notificationService.success( this.notificationService.success('Success', 'Utilisateur modifié')
'Success', } catch {
'Utilisateur modifié' this.notificationService.error('Erreur', 'Erreur lors de la modification')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur lors de la modification'
)
} }
} }
@@ -100,15 +83,11 @@ export class UserTable implements OnInit {
await this.edit(userId, updateUserComponent); await this.edit(userId, updateUserComponent);
updateUserComponent.profilForm.reset(); updateUserComponent.profilForm.reset();
modal.isVisible = false; this.onModalCancel(modal);
await this.fetchUsers(); await this.fetchUsers();
} }
onModalCancel(modal: ModalNav) { onModalCancel(modal: ModalNav) {
modal.isVisible = false; modal.isVisible = false;
} }
filterUser(input: string, option: any) {
return option.nzLabel.toLowerCase().includes(input.toLowerCase());
}
} }
+14
View File
@@ -0,0 +1,14 @@
import { inject } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService} from "../services/auth.service";
export const authGuard = async () => {
const auth = inject(AuthService);
const router = inject(Router);
if(!auth.userAuthenticated()) {
await router.navigateByUrl('/login');
return false;
}
return true
};
+48
View File
@@ -0,0 +1,48 @@
import {HttpInterceptorFn, HttpErrorResponse, HttpRequest, HttpHandlerFn} from '@angular/common/http';
import {inject} from '@angular/core';
import {AuthService} from '../services/auth.service';
import {RefreshService} from '../services/api';
import {NzNotificationService} from 'ng-zorro-antd/notification';
import {catchError, switchMap, throwError} from 'rxjs';
export const authInterceptor: HttpInterceptorFn = (req: HttpRequest<any>, next: HttpHandlerFn) => {
const authService = inject(AuthService);
const refreshService = inject(RefreshService);
const notification = inject(NzNotificationService);
const token = authService.getToken();
let authReq = req;
if (token) {
authReq = req.clone({
setHeaders: {Authorization: `Bearer ${token}`}
});
}
return next(authReq).pipe(
catchError((error: HttpErrorResponse) => {
if (error.status === 401 && token) {
return refreshService.refreshTokenEndpoint({token})
.pipe(
switchMap((res: any) => {
authService.setToken(res.token);
const newReq = req.clone({
setHeaders: {Authorization: `Bearer ${res.token}`}
});
return next(newReq);
}),
catchError((refreshErr) => {
authService.logout();
notification.error('Session expirée', 'Veuillez vous reconnecter.');
return throwError(() => refreshErr);
})
);
}
if (error.status === 403) {
notification.error('Accès refusé', 'Vous navez pas les droits pour cette action.');
}
return throwError(() => error);
})
);
};
-5
View File
@@ -1,5 +0,0 @@
export interface UserInfo {
name: string;
email: string;
fonction: string;
}
@@ -7,16 +7,16 @@ import {firstValueFrom} from "rxjs";
import {StockAlert} from "../../services/stock.alert"; import {StockAlert} from "../../services/stock.alert";
@Component({ @Component({
selector: 'app-welcome', selector: 'app-dashboard',
imports: [ imports: [
InfoCard, InfoCard,
DeliveryValidator, DeliveryValidator,
], ],
templateUrl: './welcome.html', templateUrl: './dashboard.html',
styleUrl: './welcome.css' styleUrl: './dashboard.css'
}) })
export class Welcome { export class Dashboard {
private productsService = inject(ProductsService); private productsService = inject(ProductsService);
private deliverersService = inject(DeliverersService); private deliverersService = inject(DeliverersService);
private suppliersService = inject(SuppliersService); private suppliersService = inject(SuppliersService);
@@ -32,8 +32,8 @@ export class Welcome {
try { try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint()); const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliversCount.set(deliverers.length); this.deliversCount.set(deliverers.length);
} catch (e) { } catch {
this.notificationsService.error('Error', 'Error while getting deliverers.'); this.notificationsService.error('Erreur', 'Impossible de charger les transporteurs');
} }
} }
@@ -43,7 +43,7 @@ export class Welcome {
this.suppliers.set(suppliers); this.suppliers.set(suppliers);
this.suppliersCount.set(suppliers.length); this.suppliersCount.set(suppliers.length);
} catch { } catch {
this.notificationsService.error('Error', 'Error while getting suppliers.'); this.notificationsService.error('Erreur', 'Impossible de charger les fournisseurs');
} }
} }
@@ -52,11 +52,8 @@ export class Welcome {
const products = await firstValueFrom(this.productsService.getAllProductsUnderLimitEndpoint()); const products = await firstValueFrom(this.productsService.getAllProductsUnderLimitEndpoint());
this.productsUnderLimitCount.set(products.length); this.productsUnderLimitCount.set(products.length);
await this.stockAlertService.generatePurchaseOrder(products, this.suppliers()); await this.stockAlertService.generatePurchaseOrder(products, this.suppliers());
} catch (e) { } catch {
this.notificationsService.error( this.notificationsService.error('Error', 'Impossible de charger les produits.');
'Error',
'Error while getting products.',
)
} }
} }
+5 -14
View File
@@ -26,7 +26,7 @@ export class Deliverer {
async onModalOk() { async onModalOk() {
await this.addDeliverer() await this.addDeliverer()
this.createDeliverer().delivererForm.reset(); this.createDeliverer().delivererForm.reset();
this.modal().isVisible = false; this.onModalCancel();
await this.delivererTable().fetchDeliverers() await this.delivererTable().fetchDeliverers()
} }
@@ -36,24 +36,15 @@ export class Deliverer {
async addDeliverer() { async addDeliverer() {
if (this.createDeliverer().delivererForm.invalid) { if (this.createDeliverer().delivererForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
} }
try { try {
const deliverers = this.createDeliverer().delivererForm.getRawValue(); const deliverers = this.createDeliverer().delivererForm.getRawValue();
await firstValueFrom(this.deliverersService.createDelivererEndpoint(deliverers)) await firstValueFrom(this.deliverersService.createDelivererEndpoint(deliverers))
this.notificationService.success( this.notificationService.success('Success', 'Transporteur enregistré')
'Success', } catch {
'Transporteur enregistré' this.notificationService.error('Erreur', 'Erreur d\'enregistrement')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
} }
} }
} }
+46
View File
@@ -0,0 +1,46 @@
<div class="grid grid-cols-9 min-h-screen bg-blue-950">
<div class="col-span-6 w-full h-full border rounded-r-4xl overflow-hidden">
<img src="https://www.pyro-fetes.com/wp-content/uploads/2023/03/5I9A3180-scaled.jpg"
class="w-full h-full object-cover"
alt=""
/>
</div>
<div class="col-span-3 w-full flex items-center justify-center">
<div class="flex flex-col items-center">
<img src="https://www.pyro-fetes.com/wp-content/uploads/2020/10/PyroFetes-logo-OR.png"
class="w-9/12 mb-10"
alt=""
/>
<div class="bg-white border rounded-2xl p-8 w-80 shadow-lg">
<form nz-form nzLayout="vertical" [formGroup]="loginForm">
<nz-form-item>
<nz-form-label nzRequired>
Nom d'utilisateur
</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input nz-input placeholder="Nom d'utilisateur" formControlName="name">
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired class="mt-3">
Mot de passe
</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input nz-input type="password" placeholder="Mot de passe" formControlName="password">
</nz-form-control>
</nz-form-item>
<button class="mt-4 rounded-xl w-full" nz-button nzType="primary" (click)="connectUser()">
Connexion
</button>
</form>
</div>
</div>
</div>
</div>
+43
View File
@@ -0,0 +1,43 @@
import {Component, inject, OnInit} from '@angular/core';
import {NzColDirective} from "ng-zorro-antd/grid";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input";
import {FormControl, FormGroup, ReactiveFormsModule, Validators} from "@angular/forms";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {AuthService} from "../../services/auth.service";
import {Router} from "@angular/router";
@Component({
selector: 'app-login',
imports: [
NzColDirective,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
ReactiveFormsModule,
NzButtonComponent
],
templateUrl: './login.html',
styleUrl: './login.css',
})
export class Login implements OnInit {
private authService = inject(AuthService);
private router = inject(Router);
ngOnInit() {
this.authService.logout();
}
loginForm: FormGroup = new FormGroup({
name: new FormControl<string>(null, [Validators.required]),
password: new FormControl<string>(null, [Validators.required])
})
async connectUser() {
if (this.loginForm.invalid) return;
const ok = await this.authService.connectUser(this.loginForm.value.name, this.loginForm.value.password);
if (ok) await this.router.navigate(['/dashboard']);
}
}
+3 -3
View File
@@ -52,7 +52,7 @@ export class Stock implements OnInit {
const suppliers = await firstValueFrom(this.suppliersService.getAllSuppliersEndpoint()); const suppliers = await firstValueFrom(this.suppliersService.getAllSuppliersEndpoint());
this.suppliers.set(suppliers); this.suppliers.set(suppliers);
} catch { } catch {
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API'); this.notificationService.error('Erreur', 'Impossible de charger les fournisseurs');
} }
} }
@@ -81,7 +81,7 @@ export class Stock implements OnInit {
return; return;
} }
const orderLines = this.createPurchaseOrder().lines.value.map(line => ({ const orderLines = this.createPurchaseOrder().lines.value.map((line: { productId: any; quantity: any; }) => ({
productId: line.productId, productId: line.productId,
quantity: line.quantity quantity: line.quantity
})); }));
@@ -113,7 +113,7 @@ export class Stock implements OnInit {
return; return;
} }
const orderLines = this.createQuotation().lines.value.map(line => ({ const orderLines = this.createQuotation().lines.value.map((line: { productId: any; quantity: any; }) => ({
productId: line.productId, productId: line.productId,
quantity: line.quantity quantity: line.quantity
})); }));
+5 -14
View File
@@ -26,7 +26,7 @@ export class Supplier {
async onModalOk() { async onModalOk() {
await this.addSupplier() await this.addSupplier()
this.createSupplier().supplierForm.reset(); this.createSupplier().supplierForm.reset();
this.modal().isVisible = false; this.onModalCancel();
await this.supplierTable().fetchSuppliers() await this.supplierTable().fetchSuppliers()
} }
@@ -36,24 +36,15 @@ export class Supplier {
async addSupplier() { async addSupplier() {
if (this.createSupplier().supplierForm.invalid) { if (this.createSupplier().supplierForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
} }
try { try {
const suppliers = this.createSupplier().supplierForm.getRawValue(); const suppliers = this.createSupplier().supplierForm.getRawValue();
await firstValueFrom(this.suppliersService.createSupplierEndpoint(suppliers)) await firstValueFrom(this.suppliersService.createSupplierEndpoint(suppliers))
this.notificationService.success( this.notificationService.success('Success', 'Fournisseur enregistré')
'Success', } catch {
'Fournisseur enregistré' this.notificationService.error('Erreur', 'Erreur d\'enregistrement')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
} }
} }
} }
+10
View File
@@ -7,6 +7,16 @@
size="35%"> size="35%">
<app-profil-form #profilForm></app-profil-form> <app-profil-form #profilForm></app-profil-form>
<div class="text-[12px] text-gray-400 flex justify-center items-center flex-col">
<p>Consignes du mot de passe :</p>
<ul class="ml-10">
<li>12 caractères</li>
<li>Au moins une majuscule</li>
<li>Au moins une minuscule</li>
<li>Au moins un chiffre</li>
<li>Au moins un caractère spécial</li>
</ul>
</div>
</app-modal-button> </app-modal-button>
</div> </div>
+6 -14
View File
@@ -20,13 +20,14 @@ export class User {
modal = viewChild.required<ModalButton>('modalButton'); modal = viewChild.required<ModalButton>('modalButton');
createUser = viewChild.required<ProfilForm>('profilForm'); createUser = viewChild.required<ProfilForm>('profilForm');
usersTable = viewChild.required<UserTable>('userTable'); usersTable = viewChild.required<UserTable>('userTable');
private usersService = inject(UsersService); private usersService = inject(UsersService);
private notificationService = inject(NzNotificationService) private notificationService = inject(NzNotificationService)
async onModalOk() { async onModalOk() {
await this.addUser() await this.addUser()
this.createUser().profilForm.reset(); this.createUser().profilForm.reset();
this.modal().isVisible = false; this.onModalCancel();
await this.usersTable().fetchUsers() await this.usersTable().fetchUsers()
} }
@@ -36,24 +37,15 @@ export class User {
async addUser() { async addUser() {
if (this.createUser().profilForm.invalid) { if (this.createUser().profilForm.invalid) {
this.notificationService.error( this.notificationService.error('Erreur', 'Formulaire invalide')
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
} }
try { try {
const users = this.createUser().profilForm.getRawValue(); const users = this.createUser().profilForm.getRawValue();
await firstValueFrom(this.usersService.createUserEndpoint(users)) await firstValueFrom(this.usersService.createUserEndpoint(users))
this.notificationService.success( this.notificationService.success('Success', 'Utilisateur crée')
'Success', } catch {
'Utilisateur crée' this.notificationService.error('Erreur', 'Email ou mot de passe invalide')
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
} }
} }
} }
-6
View File
@@ -1,6 +0,0 @@
import {Routes} from '@angular/router';
import {Welcome} from './welcome';
export const WELCOME_ROUTES: Routes = [
{path: '', component: Welcome},
];
@@ -11,8 +11,10 @@ api/prices.service.ts
api/products.service.ts api/products.service.ts
api/purchaseorders.service.ts api/purchaseorders.service.ts
api/quotations.service.ts api/quotations.service.ts
api/refresh.service.ts
api/settings.service.ts api/settings.service.ts
api/suppliers.service.ts api/suppliers.service.ts
api/user.service.ts
api/users.service.ts api/users.service.ts
api/warehouseproducts.service.ts api/warehouseproducts.service.ts
api/warehouses.service.ts api/warehouses.service.ts
@@ -42,6 +44,7 @@ model/get-purchase-order-dto.ts
model/get-purchase-product-dto.ts model/get-purchase-product-dto.ts
model/get-quotation-dto.ts model/get-quotation-dto.ts
model/get-quotation-product-dto.ts model/get-quotation-product-dto.ts
model/get-refresh-token-dto.ts
model/get-setting-dto.ts model/get-setting-dto.ts
model/get-supplier-dto.ts model/get-supplier-dto.ts
model/get-token-dto.ts model/get-token-dto.ts
@@ -61,6 +64,7 @@ model/patch-quotation-product-quantity-dto.ts
model/patch-supplier-delivery-delay-dto.ts model/patch-supplier-delivery-delay-dto.ts
model/patch-user-password-dto.ts model/patch-user-password-dto.ts
model/patch-ware-house-product-quantity-dto.ts model/patch-ware-house-product-quantity-dto.ts
model/refresh-token-dto.ts
model/update-deliverer-dto.ts model/update-deliverer-dto.ts
model/update-delivery-note-dto.ts model/update-delivery-note-dto.ts
model/update-product-dto.ts model/update-product-dto.ts
+1 -5
View File
@@ -73,9 +73,7 @@ export const appConfig: ApplicationConfig = {
``` ```
**NOTE** **NOTE**
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
can still import an Angular module:
```typescript ```typescript
import { ApiModule } from ''; import { ApiModule } from '';
``` ```
@@ -183,7 +181,5 @@ new Configuration({
``` ```
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations [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 [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 [@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander
+4 -4
View File
@@ -7,9 +7,9 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {HttpHeaders, HttpParams, HttpParameterCodec} from '@angular/common/http'; import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import {CustomHttpParameterCodec} from './encoder'; import { CustomHttpParameterCodec } from './encoder';
import {Configuration} from './configuration'; import { Configuration } from './configuration';
export class BaseService { export class BaseService {
protected basePath = 'http://localhost:5298'; protected basePath = 'http://localhost:5298';
@@ -17,7 +17,7 @@ export class BaseService {
public configuration: Configuration; public configuration: Configuration;
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
constructor(basePath?: string | string[], configuration?: Configuration) { constructor(basePath?: string|string[], configuration?: Configuration) {
this.configuration = configuration || new Configuration(); this.configuration = configuration || new Configuration();
if (typeof this.configuration.basePath !== 'string') { if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined; const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+5 -5
View File
@@ -1,6 +1,6 @@
import {NgModule, ModuleWithProviders, SkipSelf, Optional} from '@angular/core'; import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
import {Configuration} from './configuration'; import { Configuration } from './configuration';
import {HttpClient} from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
@NgModule({ @NgModule({
@@ -13,11 +13,11 @@ export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> { public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
return { return {
ngModule: ApiModule, ngModule: ApiModule,
providers: [{provide: Configuration, useFactory: configurationFactory}] providers: [ { provide: Configuration, useFactory: configurationFactory } ]
}; };
} }
constructor(@Optional() @SkipSelf() parentModule: ApiModule, constructor( @Optional() @SkipSelf() parentModule: ApiModule,
@Optional() http: HttpClient) { @Optional() http: HttpClient) {
if (parentModule) { if (parentModule) {
throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
+17 -25
View File
@@ -1,37 +1,29 @@
export * from './customers.service'; export * from './customers.service';
import {CustomersService} from './customers.service'; import { CustomersService } from './customers.service';
export * from './deliverers.service'; export * from './deliverers.service';
import {DeliverersService} from './deliverers.service'; import { DeliverersService } from './deliverers.service';
export * from './deliverynotes.service'; export * from './deliverynotes.service';
import {DeliverynotesService} from './deliverynotes.service'; import { DeliverynotesService } from './deliverynotes.service';
export * from './prices.service'; export * from './prices.service';
import {PricesService} from './prices.service'; import { PricesService } from './prices.service';
export * from './products.service'; export * from './products.service';
import {ProductsService} from './products.service'; import { ProductsService } from './products.service';
export * from './purchaseorders.service'; export * from './purchaseorders.service';
import {PurchaseordersService} from './purchaseorders.service'; import { PurchaseordersService } from './purchaseorders.service';
export * from './quotations.service'; export * from './quotations.service';
import {QuotationsService} from './quotations.service'; import { QuotationsService } from './quotations.service';
export * from './refresh.service';
import { RefreshService } from './refresh.service';
export * from './settings.service'; export * from './settings.service';
import {SettingsService} from './settings.service'; import { SettingsService } from './settings.service';
export * from './suppliers.service'; export * from './suppliers.service';
import {SuppliersService} from './suppliers.service'; import { SuppliersService } from './suppliers.service';
export * from './user.service';
import { UserService } from './user.service';
export * from './users.service'; export * from './users.service';
import {UsersService} from './users.service'; import { UsersService } from './users.service';
export * from './warehouseproducts.service'; export * from './warehouseproducts.service';
import {WarehouseproductsService} from './warehouseproducts.service'; import { WarehouseproductsService } from './warehouseproducts.service';
export * from './warehouses.service'; export * from './warehouses.service';
import {WarehousesService} from './warehouses.service'; import { WarehousesService } from './warehouses.service';
export const APIS = [CustomersService, DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, QuotationsService, RefreshService, SettingsService, SuppliersService, UserService, UsersService, WarehouseproductsService, WarehousesService];
export const APIS = [CustomersService, DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, QuotationsService, SettingsService, SuppliersService, UsersService, WarehouseproductsService, WarehousesService];
+21 -34
View File
@@ -9,21 +9,21 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {GetCustomerDto} from '../model/get-customer-dto'; import { GetCustomerDto } from '../model/get-customer-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -31,7 +31,7 @@ import {BaseService} from '../api.base.service';
}) })
export class CustomersService extends BaseService { export class CustomersService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -40,29 +40,16 @@ export class CustomersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllCustomersEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllCustomersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetCustomerDto>>;
httpHeaderAccept?: 'application/json', public getAllCustomersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetCustomerDto>>>;
context?: HttpContext, public getAllCustomersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetCustomerDto>>>;
transferCache?: boolean public getAllCustomersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetCustomerDto>>;
public getAllCustomersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetCustomerDto>>>;
public getAllCustomersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetCustomerDto>>>;
public getAllCustomersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -87,15 +74,15 @@ export class CustomersService extends BaseService {
} }
let localVarPath = `/API/customers`; let localVarPath = `/API/customers`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetCustomerDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetCustomerDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+68 -156
View File
@@ -9,25 +9,25 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {CreateDelivererDto} from '../model/create-deliverer-dto'; import { CreateDelivererDto } from '../model/create-deliverer-dto';
// @ts-ignore // @ts-ignore
import {GetDelivererDto} from '../model/get-deliverer-dto'; import { GetDelivererDto } from '../model/get-deliverer-dto';
// @ts-ignore // @ts-ignore
import {UpdateDelivererDto} from '../model/update-deliverer-dto'; import { UpdateDelivererDto } from '../model/update-deliverer-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -35,7 +35,7 @@ import {BaseService} from '../api.base.service';
}) })
export class DeliverersService extends BaseService { export class DeliverersService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -45,32 +45,19 @@ export class DeliverersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: { public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetDelivererDto>;
httpHeaderAccept?: 'application/json', public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetDelivererDto>>;
context?: HttpContext, public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetDelivererDto>>;
transferCache?: boolean public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetDelivererDto>;
public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetDelivererDto>>;
public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetDelivererDto>>;
public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createDelivererDto === null || createDelivererDto === undefined) { if (createDelivererDto === null || createDelivererDto === undefined) {
throw new Error('Required parameter createDelivererDto was null or undefined when calling createDelivererEndpoint.'); throw new Error('Required parameter createDelivererDto was null or undefined when calling createDelivererEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -104,16 +91,16 @@ export class DeliverersService extends BaseService {
} }
let localVarPath = `/API/deliverers`; let localVarPath = `/API/deliverers`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetDelivererDto>('post', `${basePath}${localVarPath}`, return this.httpClient.request<GetDelivererDto>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createDelivererDto, body: createDelivererDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -125,33 +112,21 @@ export class DeliverersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (delivererId === null || delivererId === undefined) { if (delivererId === null || delivererId === undefined) {
throw new Error('Required parameter delivererId was null or undefined when calling deleteDelivererEndpoint.'); throw new Error('Required parameter delivererId was null or undefined when calling deleteDelivererEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -172,24 +147,16 @@ export class DeliverersService extends BaseService {
} }
} }
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({ let localVarPath = `/API/deliverers/${this.configuration.encodeParam({name: "delivererId", value: delivererId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "delivererId", const { basePath, withCredentials } = this.configuration;
value: delivererId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -200,29 +167,16 @@ export class DeliverersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllDelivererEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllDelivererEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetDelivererDto>>;
httpHeaderAccept?: 'application/json', public getAllDelivererEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetDelivererDto>>>;
context?: HttpContext, public getAllDelivererEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetDelivererDto>>>;
transferCache?: boolean public getAllDelivererEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetDelivererDto>>;
public getAllDelivererEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetDelivererDto>>>;
public getAllDelivererEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetDelivererDto>>>;
public getAllDelivererEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -247,15 +201,15 @@ export class DeliverersService extends BaseService {
} }
let localVarPath = `/API/deliverers`; let localVarPath = `/API/deliverers`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDelivererDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetDelivererDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -267,32 +221,19 @@ export class DeliverersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: { public getDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetDelivererDto>;
httpHeaderAccept?: 'application/json', public getDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetDelivererDto>>;
context?: HttpContext, public getDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetDelivererDto>>;
transferCache?: boolean public getDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetDelivererDto>;
public getDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetDelivererDto>>;
public getDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetDelivererDto>>;
public getDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (delivererId === null || delivererId === undefined) { if (delivererId === null || delivererId === undefined) {
throw new Error('Required parameter delivererId was null or undefined when calling getDelivererEndpoint.'); throw new Error('Required parameter delivererId was null or undefined when calling getDelivererEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -316,24 +257,16 @@ export class DeliverersService extends BaseService {
} }
} }
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({ let localVarPath = `/API/deliverers/${this.configuration.encodeParam({name: "delivererId", value: delivererId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "delivererId", const { basePath, withCredentials } = this.configuration;
value: delivererId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetDelivererDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetDelivererDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -346,26 +279,10 @@ export class DeliverersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: { public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetDelivererDto>;
httpHeaderAccept?: 'application/json', public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetDelivererDto>>;
context?: HttpContext, public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetDelivererDto>>;
transferCache?: boolean public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetDelivererDto>;
public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetDelivererDto>>;
public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetDelivererDto>>;
public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateDelivererEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateDelivererEndpoint.');
} }
@@ -375,6 +292,9 @@ export class DeliverersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -407,25 +327,17 @@ export class DeliverersService extends BaseService {
} }
} }
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({ let localVarPath = `/API/deliverers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetDelivererDto>('put', `${basePath}${localVarPath}`, return this.httpClient.request<GetDelivererDto>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateDelivererDto, body: updateDelivererDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+107 -247
View File
@@ -9,27 +9,27 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {CreateDeliveryNoteDto} from '../model/create-delivery-note-dto'; import { CreateDeliveryNoteDto } from '../model/create-delivery-note-dto';
// @ts-ignore // @ts-ignore
import {GetDeliveryNoteDto} from '../model/get-delivery-note-dto'; import { GetDeliveryNoteDto } from '../model/get-delivery-note-dto';
// @ts-ignore // @ts-ignore
import {PatchDeliveryNoteRealDeliveryDateDto} from '../model/patch-delivery-note-real-delivery-date-dto'; import { PatchDeliveryNoteRealDeliveryDateDto } from '../model/patch-delivery-note-real-delivery-date-dto';
// @ts-ignore // @ts-ignore
import {UpdateDeliveryNoteDto} from '../model/update-delivery-note-dto'; import { UpdateDeliveryNoteDto } from '../model/update-delivery-note-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -37,7 +37,7 @@ import {BaseService} from '../api.base.service';
}) })
export class DeliverynotesService extends BaseService { export class DeliverynotesService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -47,33 +47,21 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: { public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createDeliveryNoteDto === null || createDeliveryNoteDto === undefined) { if (createDeliveryNoteDto === null || createDeliveryNoteDto === undefined) {
throw new Error('Required parameter createDeliveryNoteDto was null or undefined when calling createDeliveryNoteEndpoint.'); throw new Error('Required parameter createDeliveryNoteDto was null or undefined when calling createDeliveryNoteEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -104,16 +92,16 @@ export class DeliverynotesService extends BaseService {
} }
let localVarPath = `/API/deliveryNotes`; let localVarPath = `/API/deliveryNotes`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createDeliveryNoteDto, body: createDeliveryNoteDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -125,33 +113,21 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteDeliveryNoteEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteDeliveryNoteEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteDeliveryNoteEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteDeliveryNoteEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteDeliveryNoteEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteDeliveryNoteEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteDeliveryNoteEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteDeliveryNoteEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteDeliveryNoteEndpoint.'); throw new Error('Required parameter id was null or undefined when calling deleteDeliveryNoteEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -172,24 +148,16 @@ export class DeliverynotesService extends BaseService {
} }
} }
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({ let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
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}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -200,29 +168,16 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllDeliveryNoteEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllDeliveryNoteEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetDeliveryNoteDto>>;
httpHeaderAccept?: 'application/json', public getAllDeliveryNoteEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetDeliveryNoteDto>>>;
context?: HttpContext, public getAllDeliveryNoteEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetDeliveryNoteDto>>>;
transferCache?: boolean public getAllDeliveryNoteEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetDeliveryNoteDto>>;
public getAllDeliveryNoteEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetDeliveryNoteDto>>>;
public getAllDeliveryNoteEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetDeliveryNoteDto>>>;
public getAllDeliveryNoteEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -247,15 +202,15 @@ export class DeliverynotesService extends BaseService {
} }
let localVarPath = `/API/deliveryNotes`; let localVarPath = `/API/deliveryNotes`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -266,29 +221,16 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetDeliveryNoteDto>>;
httpHeaderAccept?: 'application/json', public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetDeliveryNoteDto>>>;
context?: HttpContext, public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetDeliveryNoteDto>>>;
transferCache?: boolean public getAllDeliveryNotesNotArrivedEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetDeliveryNoteDto>>;
public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetDeliveryNoteDto>>>;
public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetDeliveryNoteDto>>>;
public getAllDeliveryNotesNotArrivedEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -313,15 +255,15 @@ export class DeliverynotesService extends BaseService {
} }
let localVarPath = `/API/deliveryNotes/validation`; let localVarPath = `/API/deliveryNotes/validation`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -333,32 +275,19 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'body', reportProgress?: boolean, options?: { public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetDeliveryNoteDto>;
httpHeaderAccept?: 'application/json', public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetDeliveryNoteDto>>;
context?: HttpContext, public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetDeliveryNoteDto>>;
transferCache?: boolean public getDeliveryNoteEndpoint(deliveryNoteId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetDeliveryNoteDto>;
public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetDeliveryNoteDto>>;
public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetDeliveryNoteDto>>;
public getDeliveryNoteEndpoint(deliveryNoteId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (deliveryNoteId === null || deliveryNoteId === undefined) { if (deliveryNoteId === null || deliveryNoteId === undefined) {
throw new Error('Required parameter deliveryNoteId was null or undefined when calling getDeliveryNoteEndpoint.'); throw new Error('Required parameter deliveryNoteId was null or undefined when calling getDeliveryNoteEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -382,24 +311,16 @@ export class DeliverynotesService extends BaseService {
} }
} }
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({ let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "deliveryNoteId", value: deliveryNoteId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "deliveryNoteId", const { basePath, withCredentials } = this.configuration;
value: deliveryNoteId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetDeliveryNoteDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetDeliveryNoteDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -411,32 +332,19 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getDeliveryNotePdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getDeliveryNotePdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<Blob>;
httpHeaderAccept?: 'application/pdf', public getDeliveryNotePdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Blob>>;
context?: HttpContext, public getDeliveryNotePdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Blob>>;
transferCache?: boolean public getDeliveryNotePdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Blob>;
public getDeliveryNotePdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Blob>>;
public getDeliveryNotePdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Blob>>;
public getDeliveryNotePdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getDeliveryNotePdfEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getDeliveryNotePdfEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/pdf' 'application/pdf'
]); ]);
@@ -449,24 +357,16 @@ export class DeliverynotesService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true; const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({ let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/pdf`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request('get', `${basePath}${localVarPath}`, return this.httpClient.request('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: "blob", responseType: "blob",
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -479,26 +379,10 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'body', reportProgress?: boolean, options?: { public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchRealDeliveryDateEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchRealDeliveryDateEndpoint.');
} }
@@ -508,7 +392,11 @@ export class DeliverynotesService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -538,25 +426,17 @@ export class DeliverynotesService extends BaseService {
} }
} }
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({ let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchDeliveryNoteRealDeliveryDateDto, body: patchDeliveryNoteRealDeliveryDateDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -569,26 +449,10 @@ export class DeliverynotesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: { public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateDeliveryNoteEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateDeliveryNoteEndpoint.');
} }
@@ -598,7 +462,11 @@ export class DeliverynotesService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -628,25 +496,17 @@ export class DeliverynotesService extends BaseService {
} }
} }
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({ let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`, return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateDeliveryNoteDto, body: updateDeliveryNoteDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+24 -52
View File
@@ -9,21 +9,21 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {PatchPriceSellingPriceDto} from '../model/patch-price-selling-price-dto'; import { PatchPriceSellingPriceDto } from '../model/patch-price-selling-price-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -31,7 +31,7 @@ import {BaseService} from '../api.base.service';
}) })
export class PricesService extends BaseService { export class PricesService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -43,26 +43,10 @@ export class PricesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'body', reportProgress?: boolean, options?: { public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling patchPriceEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling patchPriceEndpoint.');
} }
@@ -75,7 +59,11 @@ export class PricesService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -105,33 +93,17 @@ export class PricesService extends BaseService {
} }
} }
let localVarPath = `/API/prices/${this.configuration.encodeParam({ let localVarPath = `/API/prices/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "supplierId", value: supplierId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/SellingPrice`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "supplierId",
value: supplierId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/SellingPrice`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchPriceSellingPriceDto, body: patchPriceSellingPriceDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+83 -190
View File
@@ -9,25 +9,25 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {GetProductDto} from '../model/get-product-dto'; import { GetProductDto } from '../model/get-product-dto';
// @ts-ignore // @ts-ignore
import {PatchProductMinimalStockDto} from '../model/patch-product-minimal-stock-dto'; import { PatchProductMinimalStockDto } from '../model/patch-product-minimal-stock-dto';
// @ts-ignore // @ts-ignore
import {UpdateProductDto} from '../model/update-product-dto'; import { UpdateProductDto } from '../model/update-product-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -35,7 +35,7 @@ import {BaseService} from '../api.base.service';
}) })
export class ProductsService extends BaseService { export class ProductsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -45,33 +45,21 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteProductEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteProductEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteProductEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteProductEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteProductEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteProductEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteProductEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteProductEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling deleteProductEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling deleteProductEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -92,24 +80,16 @@ export class ProductsService extends BaseService {
} }
} }
let localVarPath = `/API/products/${this.configuration.encodeParam({ let localVarPath = `/API/products/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -120,29 +100,16 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllProductsEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllProductsEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProductDto>>;
httpHeaderAccept?: 'application/json', public getAllProductsEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProductDto>>>;
context?: HttpContext, public getAllProductsEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProductDto>>>;
transferCache?: boolean public getAllProductsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetProductDto>>;
public getAllProductsEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetProductDto>>>;
public getAllProductsEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetProductDto>>>;
public getAllProductsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -167,15 +134,15 @@ export class ProductsService extends BaseService {
} }
let localVarPath = `/API/products`; let localVarPath = `/API/products`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -186,29 +153,16 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllProductsUnderLimitEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllProductsUnderLimitEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetProductDto>>;
httpHeaderAccept?: 'application/json', public getAllProductsUnderLimitEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetProductDto>>>;
context?: HttpContext, public getAllProductsUnderLimitEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetProductDto>>>;
transferCache?: boolean public getAllProductsUnderLimitEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetProductDto>>;
public getAllProductsUnderLimitEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetProductDto>>>;
public getAllProductsUnderLimitEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetProductDto>>>;
public getAllProductsUnderLimitEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -233,15 +187,15 @@ export class ProductsService extends BaseService {
} }
let localVarPath = `/API/products/underLimit`; let localVarPath = `/API/products/underLimit`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -253,32 +207,19 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getProductEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getProductEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetProductDto>;
httpHeaderAccept?: 'application/json', public getProductEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetProductDto>>;
context?: HttpContext, public getProductEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetProductDto>>;
transferCache?: boolean public getProductEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetProductDto>;
public getProductEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetProductDto>>;
public getProductEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetProductDto>>;
public getProductEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getProductEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getProductEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -302,24 +243,16 @@ export class ProductsService extends BaseService {
} }
} }
let localVarPath = `/API/products/${this.configuration.encodeParam({ let localVarPath = `/API/products/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetProductDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetProductDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -332,26 +265,10 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'body', reportProgress?: boolean, options?: { public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchProductMinimalStockEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchProductMinimalStockEndpoint.');
} }
@@ -361,7 +278,11 @@ export class ProductsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -391,25 +312,17 @@ export class ProductsService extends BaseService {
} }
} }
let localVarPath = `/API/products/${this.configuration.encodeParam({ let localVarPath = `/API/products/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/MinimalStock`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/MinimalStock`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchProductMinimalStockDto, body: patchProductMinimalStockDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -422,26 +335,10 @@ export class ProductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'body', reportProgress?: boolean, options?: { public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateProductEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateProductEndpoint.');
} }
@@ -451,7 +348,11 @@ export class ProductsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -481,25 +382,17 @@ export class ProductsService extends BaseService {
} }
} }
let localVarPath = `/API/products/${this.configuration.encodeParam({ let localVarPath = `/API/products/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`, return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateProductDto, body: updateProductDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+126 -316
View File
@@ -9,29 +9,29 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {CreatePurchaseOrderDto} from '../model/create-purchase-order-dto'; import { CreatePurchaseOrderDto } from '../model/create-purchase-order-dto';
// @ts-ignore // @ts-ignore
import {CreatePurchaseProductDto} from '../model/create-purchase-product-dto'; import { CreatePurchaseProductDto } from '../model/create-purchase-product-dto';
// @ts-ignore // @ts-ignore
import {GetPurchaseOrderDto} from '../model/get-purchase-order-dto'; import { GetPurchaseOrderDto } from '../model/get-purchase-order-dto';
// @ts-ignore // @ts-ignore
import {PatchPurchaseOrderPurchaseConditionsDto} from '../model/patch-purchase-order-purchase-conditions-dto'; import { PatchPurchaseOrderPurchaseConditionsDto } from '../model/patch-purchase-order-purchase-conditions-dto';
// @ts-ignore // @ts-ignore
import {PatchPurchaseProductQuantityDto} from '../model/patch-purchase-product-quantity-dto'; import { PatchPurchaseProductQuantityDto } from '../model/patch-purchase-product-quantity-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -39,7 +39,7 @@ import {BaseService} from '../api.base.service';
}) })
export class PurchaseordersService extends BaseService { export class PurchaseordersService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -51,26 +51,10 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: { public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (purchaseOrderId === null || purchaseOrderId === undefined) { if (purchaseOrderId === null || purchaseOrderId === undefined) {
throw new Error('Required parameter purchaseOrderId was null or undefined when calling addProductFromPurchaseOrderEndpoint.'); throw new Error('Required parameter purchaseOrderId was null or undefined when calling addProductFromPurchaseOrderEndpoint.');
} }
@@ -83,7 +67,11 @@ export class PurchaseordersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -113,33 +101,17 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "purchaseOrderId", value: purchaseOrderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "purchaseOrderId", const { basePath, withCredentials } = this.configuration;
value: purchaseOrderId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createPurchaseProductDto, body: createPurchaseProductDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -151,33 +123,22 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: { public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetPurchaseOrderDto>;
httpHeaderAccept?: undefined, public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetPurchaseOrderDto>>;
context?: HttpContext, public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetPurchaseOrderDto>>;
transferCache?: boolean public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createPurchaseOrderDto === null || createPurchaseOrderDto === undefined) { if (createPurchaseOrderDto === null || createPurchaseOrderDto === undefined) {
throw new Error('Required parameter createPurchaseOrderDto was null or undefined when calling createPurchaseOrder.'); throw new Error('Required parameter createPurchaseOrderDto was null or undefined when calling createPurchaseOrder.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -208,16 +169,16 @@ export class PurchaseordersService extends BaseService {
} }
let localVarPath = `/API/purchaseOrders`; let localVarPath = `/API/purchaseOrders`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<GetPurchaseOrderDto>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createPurchaseOrderDto, body: createPurchaseOrderDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -230,26 +191,10 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling deleteProductFromPurchaseOrderEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling deleteProductFromPurchaseOrderEndpoint.');
} }
@@ -259,7 +204,11 @@ export class PurchaseordersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -280,32 +229,16 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "purchaseOrderId", value: purchaseOrderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "purchaseOrderId",
value: purchaseOrderId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -317,33 +250,21 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deletePurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public deletePurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deletePurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deletePurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deletePurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deletePurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deletePurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deletePurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deletePurchaseOrderEndpoint.'); throw new Error('Required parameter id was null or undefined when calling deletePurchaseOrderEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -364,24 +285,16 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
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}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -392,29 +305,16 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllPurchaseOrderEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllPurchaseOrderEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetPurchaseOrderDto>>;
httpHeaderAccept?: 'application/json', public getAllPurchaseOrderEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetPurchaseOrderDto>>>;
context?: HttpContext, public getAllPurchaseOrderEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetPurchaseOrderDto>>>;
transferCache?: boolean public getAllPurchaseOrderEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetPurchaseOrderDto>>;
public getAllPurchaseOrderEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetPurchaseOrderDto>>>;
public getAllPurchaseOrderEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetPurchaseOrderDto>>>;
public getAllPurchaseOrderEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -439,15 +339,15 @@ export class PurchaseordersService extends BaseService {
} }
let localVarPath = `/API/purchaseOrders`; let localVarPath = `/API/purchaseOrders`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetPurchaseOrderDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetPurchaseOrderDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -459,32 +359,19 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getPurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getPurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetPurchaseOrderDto>;
httpHeaderAccept?: 'application/json', public getPurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetPurchaseOrderDto>>;
context?: HttpContext, public getPurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetPurchaseOrderDto>>;
transferCache?: boolean public getPurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetPurchaseOrderDto>;
public getPurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetPurchaseOrderDto>>;
public getPurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetPurchaseOrderDto>>;
public getPurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -508,24 +395,16 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetPurchaseOrderDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetPurchaseOrderDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -537,32 +416,19 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getPurchaseOrderPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getPurchaseOrderPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<Blob>;
httpHeaderAccept?: 'application/pdf', public getPurchaseOrderPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Blob>>;
context?: HttpContext, public getPurchaseOrderPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Blob>>;
transferCache?: boolean public getPurchaseOrderPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Blob>;
public getPurchaseOrderPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Blob>>;
public getPurchaseOrderPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Blob>>;
public getPurchaseOrderPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderPdfEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderPdfEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/pdf' 'application/pdf'
]); ]);
@@ -575,24 +441,16 @@ export class PurchaseordersService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true; const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/pdf`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request('get', `${basePath}${localVarPath}`, return this.httpClient.request('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: "blob", responseType: "blob",
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -605,26 +463,10 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'body', reportProgress?: boolean, options?: { public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchPurchaseOrderPurchaseConditionsEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchPurchaseOrderPurchaseConditionsEndpoint.');
} }
@@ -634,7 +476,11 @@ export class PurchaseordersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -664,25 +510,17 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/PurchaseConditions`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/PurchaseConditions`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchPurchaseOrderPurchaseConditionsDto, body: patchPurchaseOrderPurchaseConditionsDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -696,26 +534,10 @@ export class PurchaseordersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: { public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling patchPurchaseProductQuantityEndpoint.');
} }
@@ -728,7 +550,11 @@ export class PurchaseordersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -758,33 +584,17 @@ export class PurchaseordersService extends BaseService {
} }
} }
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({ let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "purchaseOrderId", value: purchaseOrderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/Quantity`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "purchaseOrderId",
value: purchaseOrderId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/Quantity`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchPurchaseProductQuantityDto, body: patchPurchaseProductQuantityDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+152 -375
View File
@@ -9,33 +9,33 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {AddQuotationProductDto} from '../model/add-quotation-product-dto'; import { AddQuotationProductDto } from '../model/add-quotation-product-dto';
// @ts-ignore // @ts-ignore
import {CreateQuotationDto} from '../model/create-quotation-dto'; import { CreateQuotationDto } from '../model/create-quotation-dto';
// @ts-ignore // @ts-ignore
import {GetQuotationDto} from '../model/get-quotation-dto'; import { GetQuotationDto } from '../model/get-quotation-dto';
// @ts-ignore // @ts-ignore
import {PatchQuotationConditionsSaleDto} from '../model/patch-quotation-conditions-sale-dto'; import { PatchQuotationConditionsSaleDto } from '../model/patch-quotation-conditions-sale-dto';
// @ts-ignore // @ts-ignore
import {PatchQuotationMessageDto} from '../model/patch-quotation-message-dto'; import { PatchQuotationMessageDto } from '../model/patch-quotation-message-dto';
// @ts-ignore // @ts-ignore
import {PatchQuotationProductQuantityDto} from '../model/patch-quotation-product-quantity-dto'; import { PatchQuotationProductQuantityDto } from '../model/patch-quotation-product-quantity-dto';
// @ts-ignore // @ts-ignore
import {UpdateQuotationDto} from '../model/update-quotation-dto'; import { UpdateQuotationDto } from '../model/update-quotation-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -43,7 +43,7 @@ import {BaseService} from '../api.base.service';
}) })
export class QuotationsService extends BaseService { export class QuotationsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -54,26 +54,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: { public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling addProductoToQuotationEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling addProductoToQuotationEndpoint.');
} }
@@ -83,7 +67,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -113,25 +101,17 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/products`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/products`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: addQuotationProductDto, body: addQuotationProductDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -143,33 +123,21 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: { public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createQuotationDto === null || createQuotationDto === undefined) { if (createQuotationDto === null || createQuotationDto === undefined) {
throw new Error('Required parameter createQuotationDto was null or undefined when calling createQuotationEndpoint.'); throw new Error('Required parameter createQuotationDto was null or undefined when calling createQuotationEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -200,16 +168,16 @@ export class QuotationsService extends BaseService {
} }
let localVarPath = `/API/quotations`; let localVarPath = `/API/quotations`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createQuotationDto, body: createQuotationDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -222,26 +190,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling deleteProductFromQuotationEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling deleteProductFromQuotationEndpoint.');
} }
@@ -251,7 +203,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -272,32 +228,16 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "quotationId", value: quotationId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "quotationId",
value: quotationId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -309,33 +249,21 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteQuotationEndpoint.'); throw new Error('Required parameter id was null or undefined when calling deleteQuotationEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -356,24 +284,16 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
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}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -384,29 +304,16 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllQuotationEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllQuotationEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetQuotationDto>>;
httpHeaderAccept?: 'application/json', public getAllQuotationEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetQuotationDto>>>;
context?: HttpContext, public getAllQuotationEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetQuotationDto>>>;
transferCache?: boolean public getAllQuotationEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetQuotationDto>>;
public getAllQuotationEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetQuotationDto>>>;
public getAllQuotationEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetQuotationDto>>>;
public getAllQuotationEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -431,15 +338,15 @@ export class QuotationsService extends BaseService {
} }
let localVarPath = `/API/quotations`; let localVarPath = `/API/quotations`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetQuotationDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetQuotationDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -451,32 +358,19 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetQuotationDto>;
httpHeaderAccept?: 'application/json', public getQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetQuotationDto>>;
context?: HttpContext, public getQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetQuotationDto>>;
transferCache?: boolean public getQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetQuotationDto>;
public getQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetQuotationDto>>;
public getQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetQuotationDto>>;
public getQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getQuotationEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getQuotationEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -500,24 +394,16 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetQuotationDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetQuotationDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -529,32 +415,19 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getQuotationPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getQuotationPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<Blob>;
httpHeaderAccept?: 'application/pdf', public getQuotationPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Blob>>;
context?: HttpContext, public getQuotationPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Blob>>;
transferCache?: boolean public getQuotationPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Blob>;
public getQuotationPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Blob>>;
public getQuotationPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Blob>>;
public getQuotationPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getQuotationPdfEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getQuotationPdfEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/pdf' 'application/pdf'
]); ]);
@@ -567,24 +440,16 @@ export class QuotationsService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true; const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/pdf`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request('get', `${basePath}${localVarPath}`, return this.httpClient.request('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: "blob", responseType: "blob",
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -597,26 +462,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'body', reportProgress?: boolean, options?: { public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchQuotationConditionsSaleEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchQuotationConditionsSaleEndpoint.');
} }
@@ -626,7 +475,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -656,25 +509,17 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/saleConditions`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/saleConditions`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchQuotationConditionsSaleDto, body: patchQuotationConditionsSaleDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -687,26 +532,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'body', reportProgress?: boolean, options?: { public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchQuotationMessageEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchQuotationMessageEndpoint.');
} }
@@ -716,7 +545,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -746,25 +579,17 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/message`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/message`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchQuotationMessageDto, body: patchQuotationMessageDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -778,26 +603,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: { public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling patchQuotationProductQuantityEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling patchQuotationProductQuantityEndpoint.');
} }
@@ -810,7 +619,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -840,33 +653,17 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "quotationId", value: quotationId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/Quantity`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "quotationId",
value: quotationId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/Quantity`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchQuotationProductQuantityDto, body: patchQuotationProductQuantityDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -879,26 +676,10 @@ export class QuotationsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: { public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateQuotationEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateQuotationEndpoint.');
} }
@@ -908,7 +689,11 @@ export class QuotationsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -938,25 +723,17 @@ export class QuotationsService extends BaseService {
} }
} }
let localVarPath = `/API/quotations/${this.configuration.encodeParam({ let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`, return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateQuotationDto, body: updateQuotationDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+104
View File
@@ -0,0 +1,104 @@
/**
* 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 { GetRefreshTokenDto } from '../model/get-refresh-token-dto';
// @ts-ignore
import { RefreshTokenDto } from '../model/refresh-token-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 RefreshService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint post /API/refresh
* @param refreshTokenDto
* @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 refreshTokenEndpoint(refreshTokenDto: RefreshTokenDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetRefreshTokenDto>;
public refreshTokenEndpoint(refreshTokenDto: RefreshTokenDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetRefreshTokenDto>>;
public refreshTokenEndpoint(refreshTokenDto: RefreshTokenDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetRefreshTokenDto>>;
public refreshTokenEndpoint(refreshTokenDto: RefreshTokenDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (refreshTokenDto === null || refreshTokenDto === undefined) {
throw new Error('Required parameter refreshTokenDto was null or undefined when calling refreshTokenEndpoint.');
}
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/refresh`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetRefreshTokenDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: refreshTokenDto,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}
+45 -82
View File
@@ -9,21 +9,21 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {GetSettingDto} from '../model/get-setting-dto'; import { GetSettingDto } from '../model/get-setting-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -31,7 +31,7 @@ import {BaseService} from '../api.base.service';
}) })
export class SettingsService extends BaseService { export class SettingsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -40,29 +40,16 @@ export class SettingsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetSettingDto>;
httpHeaderAccept?: 'application/json', public getSettingEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetSettingDto>>;
context?: HttpContext, public getSettingEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetSettingDto>>;
transferCache?: boolean public getSettingEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetSettingDto>;
public getSettingEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetSettingDto>>;
public getSettingEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetSettingDto>>;
public getSettingEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -87,15 +74,15 @@ export class SettingsService extends BaseService {
} }
let localVarPath = `/API/settings`; let localVarPath = `/API/settings`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetSettingDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetSettingDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -107,30 +94,18 @@ export class SettingsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: { public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -174,16 +149,16 @@ export class SettingsService extends BaseService {
} }
let localVarPath = `/API/settings/electronicSignature`; let localVarPath = `/API/settings/electronicSignature`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -195,30 +170,18 @@ export class SettingsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: { public patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchSettingLogoEndpoint(logo?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchSettingLogoEndpoint(logo?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchSettingLogoEndpoint(logo?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchSettingLogoEndpoint(logo?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -262,16 +225,16 @@ export class SettingsService extends BaseService {
} }
let localVarPath = `/API/settings/logo`; let localVarPath = `/API/settings/logo`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+113 -275
View File
@@ -9,29 +9,29 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {CreatePriceDto} from '../model/create-price-dto'; import { CreatePriceDto } from '../model/create-price-dto';
// @ts-ignore // @ts-ignore
import {CreateSupplierDto} from '../model/create-supplier-dto'; import { CreateSupplierDto } from '../model/create-supplier-dto';
// @ts-ignore // @ts-ignore
import {GetSupplierDto} from '../model/get-supplier-dto'; import { GetSupplierDto } from '../model/get-supplier-dto';
// @ts-ignore // @ts-ignore
import {PatchSupplierDeliveryDelayDto} from '../model/patch-supplier-delivery-delay-dto'; import { PatchSupplierDeliveryDelayDto } from '../model/patch-supplier-delivery-delay-dto';
// @ts-ignore // @ts-ignore
import {UpdateSupplierDto} from '../model/update-supplier-dto'; import { UpdateSupplierDto } from '../model/update-supplier-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -39,7 +39,7 @@ import {BaseService} from '../api.base.service';
}) })
export class SuppliersService extends BaseService { export class SuppliersService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -51,26 +51,10 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: { public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (supplierId === null || supplierId === undefined) { if (supplierId === null || supplierId === undefined) {
throw new Error('Required parameter supplierId was null or undefined when calling addProductToSupplierEndpoint.'); throw new Error('Required parameter supplierId was null or undefined when calling addProductToSupplierEndpoint.');
} }
@@ -83,7 +67,11 @@ export class SuppliersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -113,33 +101,17 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "supplierId", value: supplierId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "supplierId", const { basePath, withCredentials } = this.configuration;
value: supplierId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createPriceDto, body: createPriceDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -151,33 +123,21 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: { public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createSupplierDto === null || createSupplierDto === undefined) { if (createSupplierDto === null || createSupplierDto === undefined) {
throw new Error('Required parameter createSupplierDto was null or undefined when calling createSupplierEndpoint.'); throw new Error('Required parameter createSupplierDto was null or undefined when calling createSupplierEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -208,16 +168,16 @@ export class SuppliersService extends BaseService {
} }
let localVarPath = `/API/suppliers`; let localVarPath = `/API/suppliers`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createSupplierDto, body: createSupplierDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -230,26 +190,10 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (supplierId === null || supplierId === undefined) { if (supplierId === null || supplierId === undefined) {
throw new Error('Required parameter supplierId was null or undefined when calling deleteProductToSupplierEndpoint.'); throw new Error('Required parameter supplierId was null or undefined when calling deleteProductToSupplierEndpoint.');
} }
@@ -259,7 +203,11 @@ export class SuppliersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -280,32 +228,16 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "supplierId", value: supplierId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "supplierId", const { basePath, withCredentials } = this.configuration;
value: supplierId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -317,33 +249,21 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteSupplierEndpoint.'); throw new Error('Required parameter id was null or undefined when calling deleteSupplierEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -364,24 +284,16 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
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}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -392,29 +304,16 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllSuppliersEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllSuppliersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetSupplierDto>>;
httpHeaderAccept?: 'application/json', public getAllSuppliersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetSupplierDto>>>;
context?: HttpContext, public getAllSuppliersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetSupplierDto>>>;
transferCache?: boolean public getAllSuppliersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetSupplierDto>>;
public getAllSuppliersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetSupplierDto>>>;
public getAllSuppliersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetSupplierDto>>>;
public getAllSuppliersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -439,15 +338,15 @@ export class SuppliersService extends BaseService {
} }
let localVarPath = `/API/suppliers`; let localVarPath = `/API/suppliers`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetSupplierDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetSupplierDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -459,32 +358,19 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public getSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetSupplierDto>;
httpHeaderAccept?: 'application/json', public getSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetSupplierDto>>;
context?: HttpContext, public getSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetSupplierDto>>;
transferCache?: boolean public getSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetSupplierDto>;
public getSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetSupplierDto>>;
public getSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetSupplierDto>>;
public getSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling getSupplierEndpoint.'); throw new Error('Required parameter id was null or undefined when calling getSupplierEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -508,24 +394,16 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetSupplierDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetSupplierDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -538,26 +416,10 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'body', reportProgress?: boolean, options?: { public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchSupplierDeliveryDelayEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchSupplierDeliveryDelayEndpoint.');
} }
@@ -567,7 +429,11 @@ export class SuppliersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -597,25 +463,17 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/deliveryDelay`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/deliveryDelay`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchSupplierDeliveryDelayDto, body: patchSupplierDeliveryDelayDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -628,26 +486,10 @@ export class SuppliersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: { public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateSupplierEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateSupplierEndpoint.');
} }
@@ -657,7 +499,11 @@ export class SuppliersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -687,25 +533,17 @@ export class SuppliersService extends BaseService {
} }
} }
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({ let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`, return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateSupplierDto, body: updateSupplierDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+91
View File
@@ -0,0 +1,91 @@
/**
* 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 { GetUserDto } from '../model/get-user-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 UserService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
/**
* @endpoint get /API/user
* @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 getUserEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetUserDto>;
public getUserEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetUserDto>>;
public getUserEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetUserDto>>;
public getUserEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/API/user`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetUserDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
}
+78 -260
View File
@@ -9,31 +9,31 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {ConnectUserDto} from '../model/connect-user-dto'; import { ConnectUserDto } from '../model/connect-user-dto';
// @ts-ignore // @ts-ignore
import {CreateUserDto} from '../model/create-user-dto'; import { CreateUserDto } from '../model/create-user-dto';
// @ts-ignore // @ts-ignore
import {GetTokenDto} from '../model/get-token-dto'; import { GetTokenDto } from '../model/get-token-dto';
// @ts-ignore // @ts-ignore
import {GetUserDto} from '../model/get-user-dto'; import { GetUserDto } from '../model/get-user-dto';
// @ts-ignore // @ts-ignore
import {PatchUserPasswordDto} from '../model/patch-user-password-dto'; import { PatchUserPasswordDto } from '../model/patch-user-password-dto';
// @ts-ignore // @ts-ignore
import {UpdateUserDto} from '../model/update-user-dto'; import { UpdateUserDto } from '../model/update-user-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -41,7 +41,7 @@ import {BaseService} from '../api.base.service';
}) })
export class UsersService extends BaseService { export class UsersService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -51,26 +51,10 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'body', reportProgress?: boolean, options?: { public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetTokenDto>;
httpHeaderAccept?: 'application/json', public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetTokenDto>>;
context?: HttpContext, public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetTokenDto>>;
transferCache?: boolean public connectUserEndpoint(connectUserDto: ConnectUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetTokenDto>;
public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetTokenDto>>;
public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetTokenDto>>;
public connectUserEndpoint(connectUserDto: ConnectUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (connectUserDto === null || connectUserDto === undefined) { if (connectUserDto === null || connectUserDto === undefined) {
throw new Error('Required parameter connectUserDto was null or undefined when calling connectUserEndpoint.'); throw new Error('Required parameter connectUserDto was null or undefined when calling connectUserEndpoint.');
} }
@@ -110,16 +94,16 @@ export class UsersService extends BaseService {
} }
let localVarPath = `/API/users/connection`; let localVarPath = `/API/users/connection`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetTokenDto>('post', `${basePath}${localVarPath}`, return this.httpClient.request<GetTokenDto>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: connectUserDto, body: connectUserDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -131,32 +115,19 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'body', reportProgress?: boolean, options?: { public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetUserDto>;
httpHeaderAccept?: 'application/json', public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetUserDto>>;
context?: HttpContext, public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetUserDto>>;
transferCache?: boolean public createUserEndpoint(createUserDto: CreateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetUserDto>;
public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetUserDto>>;
public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetUserDto>>;
public createUserEndpoint(createUserDto: CreateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (createUserDto === null || createUserDto === undefined) { if (createUserDto === null || createUserDto === undefined) {
throw new Error('Required parameter createUserDto was null or undefined when calling createUserEndpoint.'); throw new Error('Required parameter createUserDto was null or undefined when calling createUserEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -190,16 +161,16 @@ export class UsersService extends BaseService {
} }
let localVarPath = `/API/users`; let localVarPath = `/API/users`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetUserDto>('post', `${basePath}${localVarPath}`, return this.httpClient.request<GetUserDto>('post', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: createUserDto, body: createUserDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -211,33 +182,21 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { public deleteUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
httpHeaderAccept?: undefined, public deleteUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
context?: HttpContext, public deleteUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
transferCache?: boolean public deleteUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<any>;
public deleteUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<any>>;
public deleteUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<any>>;
public deleteUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling deleteUserEndpoint.'); throw new Error('Required parameter id was null or undefined when calling deleteUserEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); // authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
]);
if (localVarHttpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
} }
@@ -258,24 +217,16 @@ export class UsersService extends BaseService {
} }
} }
let localVarPath = `/API/users/${this.configuration.encodeParam({ let localVarPath = `/API/users/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
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}`, return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -286,29 +237,16 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllUsersEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllUsersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetUserDto>>;
httpHeaderAccept?: 'application/json', public getAllUsersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetUserDto>>>;
context?: HttpContext, public getAllUsersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetUserDto>>>;
transferCache?: boolean public getAllUsersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetUserDto>>;
public getAllUsersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetUserDto>>>;
public getAllUsersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetUserDto>>>;
public getAllUsersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -333,93 +271,15 @@ export class UsersService extends BaseService {
} }
let localVarPath = `/API/users`; let localVarPath = `/API/users`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetUserDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetUserDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
/**
* @endpoint get /API/users/{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 getUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<GetUserDto>;
public getUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetUserDto>>;
public getUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetUserDto>>;
public getUserEndpoint(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 getUserEndpoint.');
}
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/users/${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<GetUserDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -432,26 +292,10 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'body', reportProgress?: boolean, options?: { public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetUserDto>;
httpHeaderAccept?: 'application/json', public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetUserDto>>;
context?: HttpContext, public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetUserDto>>;
transferCache?: boolean public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetUserDto>;
public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetUserDto>>;
public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetUserDto>>;
public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling patchUserPasswordEndpoint.'); throw new Error('Required parameter id was null or undefined when calling patchUserPasswordEndpoint.');
} }
@@ -461,6 +305,9 @@ export class UsersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -493,25 +340,17 @@ export class UsersService extends BaseService {
} }
} }
let localVarPath = `/API/users/${this.configuration.encodeParam({ let localVarPath = `/API/users/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/password`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/password`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetUserDto>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<GetUserDto>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchUserPasswordDto, body: patchUserPasswordDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -524,26 +363,10 @@ export class UsersService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'body', reportProgress?: boolean, options?: { public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetUserDto>;
httpHeaderAccept?: 'application/json', public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetUserDto>>;
context?: HttpContext, public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetUserDto>>;
transferCache?: boolean public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetUserDto>;
public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetUserDto>>;
public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetUserDto>>;
public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (id === null || id === undefined) { if (id === null || id === undefined) {
throw new Error('Required parameter id was null or undefined when calling updateUserEndpoint.'); throw new Error('Required parameter id was null or undefined when calling updateUserEndpoint.');
} }
@@ -553,6 +376,9 @@ export class UsersService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -585,25 +411,17 @@ export class UsersService extends BaseService {
} }
} }
let localVarPath = `/API/users/${this.configuration.encodeParam({ let localVarPath = `/API/users/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "id", const { basePath, withCredentials } = this.configuration;
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetUserDto>('put', `${basePath}${localVarPath}`, return this.httpClient.request<GetUserDto>('put', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: updateUserDto, body: updateUserDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -9,25 +9,25 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {GetTotalQuantityDto} from '../model/get-total-quantity-dto'; import { GetTotalQuantityDto } from '../model/get-total-quantity-dto';
// @ts-ignore // @ts-ignore
import {GetWareHouseProductDto} from '../model/get-ware-house-product-dto'; import { GetWareHouseProductDto } from '../model/get-ware-house-product-dto';
// @ts-ignore // @ts-ignore
import {PatchWareHouseProductQuantityDto} from '../model/patch-ware-house-product-quantity-dto'; import { PatchWareHouseProductQuantityDto } from '../model/patch-ware-house-product-quantity-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -35,7 +35,7 @@ import {BaseService} from '../api.base.service';
}) })
export class WarehouseproductsService extends BaseService { export class WarehouseproductsService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -45,32 +45,19 @@ export class WarehouseproductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getTotalQuantityEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: { public getTotalQuantityEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetTotalQuantityDto>;
httpHeaderAccept?: 'application/json', public getTotalQuantityEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetTotalQuantityDto>>;
context?: HttpContext, public getTotalQuantityEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetTotalQuantityDto>>;
transferCache?: boolean public getTotalQuantityEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetTotalQuantityDto>;
public getTotalQuantityEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetTotalQuantityDto>>;
public getTotalQuantityEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetTotalQuantityDto>>;
public getTotalQuantityEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling getTotalQuantityEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling getTotalQuantityEndpoint.');
} }
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -94,24 +81,16 @@ export class WarehouseproductsService extends BaseService {
} }
} }
let localVarPath = `/API/wareHouseProducts/${this.configuration.encodeParam({ let localVarPath = `/API/wareHouseProducts/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetTotalQuantityDto>('get', `${basePath}${localVarPath}`, return this.httpClient.request<GetTotalQuantityDto>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
@@ -125,26 +104,10 @@ export class WarehouseproductsService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: { public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetWareHouseProductDto>;
httpHeaderAccept?: 'application/json', public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetWareHouseProductDto>>;
context?: HttpContext, public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetWareHouseProductDto>>;
transferCache?: boolean public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<GetWareHouseProductDto>;
public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<GetWareHouseProductDto>>;
public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<GetWareHouseProductDto>>;
public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
if (productId === null || productId === undefined) { if (productId === null || productId === undefined) {
throw new Error('Required parameter productId was null or undefined when calling patchWareHouseProductQuantityEndpoint.'); throw new Error('Required parameter productId was null or undefined when calling patchWareHouseProductQuantityEndpoint.');
} }
@@ -157,6 +120,9 @@ export class WarehouseproductsService extends BaseService {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -189,33 +155,17 @@ export class WarehouseproductsService extends BaseService {
} }
} }
let localVarPath = `/API/wareHouseProducts/${this.configuration.encodeParam({ let localVarPath = `/API/wareHouseProducts/${this.configuration.encodeParam({name: "productId", value: productId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/${this.configuration.encodeParam({name: "wareHouseId", value: wareHouseId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/quantity`;
name: "productId", const { basePath, withCredentials } = this.configuration;
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/${this.configuration.encodeParam({
name: "wareHouseId",
value: wareHouseId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/quantity`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<GetWareHouseProductDto>('patch', `${basePath}${localVarPath}`, return this.httpClient.request<GetWareHouseProductDto>('patch', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
body: patchWareHouseProductQuantityDto, body: patchWareHouseProductQuantityDto,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+21 -34
View File
@@ -9,21 +9,21 @@
*/ */
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { import { HttpClient, HttpHeaders, HttpParams,
HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http'; } from '@angular/common/http';
import {CustomHttpParameterCodec} from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import {Observable} from 'rxjs'; import { Observable } from 'rxjs';
// @ts-ignore // @ts-ignore
import {GetWareHouseDto} from '../model/get-ware-house-dto'; import { GetWareHouseDto } from '../model/get-ware-house-dto';
// @ts-ignore // @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import {Configuration} from '../configuration'; import { Configuration } from '../configuration';
import {BaseService} from '../api.base.service'; import { BaseService } from '../api.base.service';
@Injectable({ @Injectable({
@@ -31,7 +31,7 @@ import {BaseService} from '../api.base.service';
}) })
export class WarehousesService extends BaseService { export class WarehousesService extends BaseService {
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration); super(basePath, configuration);
} }
@@ -40,29 +40,16 @@ export class WarehousesService extends BaseService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getAllWarehouseEndpoint(observe?: 'body', reportProgress?: boolean, options?: { public getAllWarehouseEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<GetWareHouseDto>>;
httpHeaderAccept?: 'application/json', public getAllWarehouseEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<GetWareHouseDto>>>;
context?: HttpContext, public getAllWarehouseEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<GetWareHouseDto>>>;
transferCache?: boolean public getAllWarehouseEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
}): Observable<Array<GetWareHouseDto>>;
public getAllWarehouseEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpResponse<Array<GetWareHouseDto>>>;
public getAllWarehouseEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<HttpEvent<Array<GetWareHouseDto>>>;
public getAllWarehouseEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): Observable<any> {
let localVarHeaders = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json' 'application/json'
]); ]);
@@ -87,15 +74,15 @@ export class WarehousesService extends BaseService {
} }
let localVarPath = `/API/wareHouses`; let localVarPath = `/API/wareHouses`;
const {basePath, withCredentials} = this.configuration; const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetWareHouseDto>>('get', `${basePath}${localVarPath}`, return this.httpClient.request<Array<GetWareHouseDto>>('get', `${basePath}${localVarPath}`,
{ {
context: localVarHttpContext, context: localVarHttpContext,
responseType: <any>responseType_, responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}), ...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders, headers: localVarHeaders,
observe: observe, observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress reportProgress: reportProgress
} }
); );
+8 -18
View File
@@ -1,11 +1,11 @@
import {HttpHeaders, HttpParams, HttpParameterCodec} from '@angular/common/http'; import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import {Param} from './param'; import { Param } from './param';
export interface ConfigurationParameters { export interface ConfigurationParameters {
/** /**
* @deprecated Since 5.0. Use credentials instead * @deprecated Since 5.0. Use credentials instead
*/ */
apiKeys?: { [key: string]: string }; apiKeys?: {[ key: string ]: string};
username?: string; username?: string;
password?: string; password?: string;
/** /**
@@ -31,14 +31,14 @@ export interface ConfigurationParameters {
* document. They should map to the value used for authentication * document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'. * minus any standard prefixes such as 'Basic' or 'Bearer'.
*/ */
credentials?: { [key: string]: string | (() => string | undefined) }; credentials?: {[ key: string ]: string | (() => string | undefined)};
} }
export class Configuration { export class Configuration {
/** /**
* @deprecated Since 5.0. Use credentials instead * @deprecated Since 5.0. Use credentials instead
*/ */
apiKeys?: { [key: string]: string }; apiKeys?: {[ key: string ]: string};
username?: string; username?: string;
password?: string; password?: string;
/** /**
@@ -64,19 +64,9 @@ export class Configuration {
* document. They should map to the value used for authentication * document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'. * minus any standard prefixes such as 'Basic' or 'Bearer'.
*/ */
credentials: { [key: string]: string | (() => string | undefined) }; credentials: {[ key: string ]: string | (() => string | undefined)};
constructor({ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
accessToken,
apiKeys,
basePath,
credentials,
encodeParam,
encoder,
password,
username,
withCredentials
}: ConfigurationParameters = {}) {
if (apiKeys) { if (apiKeys) {
this.apiKeys = apiKeys; this.apiKeys = apiKeys;
} }
@@ -118,7 +108,7 @@ export class Configuration {
* @param contentTypes - the array of content types that are available for selection * @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. * @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/ */
public selectHeaderContentType(contentTypes: string[]): string | undefined { public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length === 0) { if (contentTypes.length === 0) {
return undefined; return undefined;
} }
+1 -4
View File
@@ -1,4 +1,4 @@
import {HttpParameterCodec} from '@angular/common/http'; import { HttpParameterCodec } from '@angular/common/http';
/** /**
* Custom HttpParameterCodec * Custom HttpParameterCodec
@@ -8,15 +8,12 @@ export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string { encodeKey(k: string): string {
return encodeURIComponent(k); return encodeURIComponent(k);
} }
encodeValue(v: string): string { encodeValue(v: string): string {
return encodeURIComponent(v); return encodeURIComponent(v);
} }
decodeKey(k: string): string { decodeKey(k: string): string {
return decodeURIComponent(k); return decodeURIComponent(k);
} }
decodeValue(v: string): string { decodeValue(v: string): string {
return decodeURIComponent(v); return decodeURIComponent(v);
} }
@@ -11,8 +11,6 @@
export interface CreateDeliveryNoteDto { export interface CreateDeliveryNoteDto {
trackingNumber?: string | null; trackingNumber?: string | null;
estimateDeliveryDate?: string;
expeditionDate?: string;
delivererId?: number; delivererId?: number;
supplierId?: number; supplierId?: number;
productQuantities?: { [key: string]: number; } | null; productQuantities?: { [key: string]: number; } | null;
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {CreatePurchaseOrderProductDto} from './create-purchase-order-product-dto'; import { CreatePurchaseOrderProductDto } from './create-purchase-order-product-dto';
export interface CreatePurchaseOrderDto { export interface CreatePurchaseOrderDto {
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {CreateProductQuotationDto} from './create-product-quotation-dto'; import { CreateProductQuotationDto } from './create-product-quotation-dto';
export interface CreateQuotationDto { export interface CreateQuotationDto {
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {GetDeliveryNoteDto} from './get-delivery-note-dto'; import { GetDeliveryNoteDto } from './get-delivery-note-dto';
export interface GetDelivererDto { export interface GetDelivererDto {
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {GetProductDeliveryDto} from './get-product-delivery-dto'; import { GetProductDeliveryDto } from './get-product-delivery-dto';
export interface GetDeliveryNoteDto { export interface GetDeliveryNoteDto {
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {GetPurchaseProductDto} from './get-purchase-product-dto'; import { GetPurchaseProductDto } from './get-purchase-product-dto';
export interface GetPurchaseOrderDto { export interface GetPurchaseOrderDto {
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {GetQuotationProductDto} from './get-quotation-product-dto'; import { GetQuotationProductDto } from './get-quotation-product-dto';
export interface GetQuotationDto { export interface GetQuotationDto {
@@ -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 GetRefreshTokenDto {
token?: string | null;
}
@@ -7,7 +7,7 @@
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
import {GetPriceDto} from './get-price-dto'; import { GetPriceDto } from './get-price-dto';
export interface GetSupplierDto { export interface GetSupplierDto {
@@ -13,7 +13,6 @@ export interface GetUserDto {
id?: number; id?: number;
name?: string | null; name?: string | null;
password?: string | null; password?: string | null;
salt?: string | null;
fonction?: string | null; fonction?: string | null;
email?: string | null; email?: string | null;
} }
+2
View File
@@ -20,6 +20,7 @@ export * from './get-purchase-order-dto';
export * from './get-purchase-product-dto'; export * from './get-purchase-product-dto';
export * from './get-quotation-dto'; export * from './get-quotation-dto';
export * from './get-quotation-product-dto'; export * from './get-quotation-product-dto';
export * from './get-refresh-token-dto';
export * from './get-setting-dto'; export * from './get-setting-dto';
export * from './get-supplier-dto'; export * from './get-supplier-dto';
export * from './get-token-dto'; export * from './get-token-dto';
@@ -38,6 +39,7 @@ export * from './patch-quotation-product-quantity-dto';
export * from './patch-supplier-delivery-delay-dto'; export * from './patch-supplier-delivery-delay-dto';
export * from './patch-user-password-dto'; export * from './patch-user-password-dto';
export * from './patch-ware-house-product-quantity-dto'; export * from './patch-ware-house-product-quantity-dto';
export * from './refresh-token-dto';
export * from './update-deliverer-dto'; export * from './update-deliverer-dto';
export * from './update-delivery-note-dto'; export * from './update-delivery-note-dto';
export * from './update-product-dto'; export * from './update-product-dto';
@@ -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 RefreshTokenDto {
token?: string | null;
}
+5 -5
View File
@@ -1,15 +1,15 @@
import {EnvironmentProviders, makeEnvironmentProviders} from "@angular/core"; import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core";
import {Configuration, ConfigurationParameters} from './configuration'; import { Configuration, ConfigurationParameters } from './configuration';
import {BASE_PATH} from './variables'; import { BASE_PATH } from './variables';
// Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig). // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig).
export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders { export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders {
return makeEnvironmentProviders([ return makeEnvironmentProviders([
typeof configOrBasePath === "string" typeof configOrBasePath === "string"
? {provide: BASE_PATH, useValue: configOrBasePath} ? { provide: BASE_PATH, useValue: configOrBasePath }
: { : {
provide: Configuration, provide: Configuration,
useValue: new Configuration({...configOrBasePath}), useValue: new Configuration({ ...configOrBasePath }),
}, },
]); ]);
} }
+1 -1
View File
@@ -1,4 +1,4 @@
import {InjectionToken} from '@angular/core'; import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken<string>('basePath'); export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = { export const COLLECTION_FORMATS = {
+54
View File
@@ -0,0 +1,54 @@
import {inject, Injectable} from '@angular/core';
import {firstValueFrom} from 'rxjs';
import {NzNotificationService} from 'ng-zorro-antd/notification';
import {UsersService} from "./api";
import { jwtDecode } from "jwt-decode" ;
@Injectable({
providedIn: 'root',
})
export class AuthService {
private usersService = inject(UsersService);
private notificationService = inject(NzNotificationService);
private isAuthenticated: boolean = false;
async connectUser(name: string, password: string) {
try {
const loginDto = {name, password};
const res = await firstValueFrom(this.usersService.connectUserEndpoint(loginDto));
localStorage.setItem('jwt', res.token);
this.isAuthenticated = true;
return this.isAuthenticated;
} catch {
this.notificationService.error('Erreur', 'Identifiant invalide');
return false;
}
}
getToken(): string | null {
return localStorage.getItem('jwt');
}
setToken(token: string) {
localStorage.setItem('jwt', token);
}
logout() {
this.isAuthenticated = false;
localStorage.removeItem('jwt');
}
userAuthenticated() {
return this.isAuthenticated
}
getRole() {
const jwtDecoded = jwtDecode(this.getToken());
return jwtDecoded['role'];
}
isAdmin(){
return this.getRole() === 'Admin';
}
}
+32 -2
View File
@@ -1,5 +1,12 @@
import {inject, Injectable} from '@angular/core'; import {inject, Injectable} from '@angular/core';
import {GetProductDto, GetSupplierDto, PurchaseordersService, WarehouseproductsService} from "./api"; import {
CreateDeliveryNoteDto,
DeliverynotesService,
GetProductDto, GetPurchaseOrderDto,
GetSupplierDto,
PurchaseordersService,
WarehouseproductsService
} from "./api";
import {NzNotificationService} from "ng-zorro-antd/notification"; import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs"; import {firstValueFrom} from "rxjs";
@@ -8,6 +15,7 @@ import {firstValueFrom} from "rxjs";
}) })
export class StockAlert { export class StockAlert {
private purchaseOrdersService = inject(PurchaseordersService); private purchaseOrdersService = inject(PurchaseordersService);
private deliveryNotesService = inject(DeliverynotesService);
private notificationsService = inject(NzNotificationService); private notificationsService = inject(NzNotificationService);
private wareHousseProductsService = inject(WarehouseproductsService); private wareHousseProductsService = inject(WarehouseproductsService);
@@ -50,7 +58,7 @@ export class StockAlert {
); );
try { try {
await firstValueFrom(this.purchaseOrdersService.createPurchaseOrder({ const purchaseOrder: GetPurchaseOrderDto = await firstValueFrom(this.purchaseOrdersService.createPurchaseOrder({
purchaseConditions: "Non précisée - Commande automatique pour réapprovisionnement", purchaseConditions: "Non précisée - Commande automatique pour réapprovisionnement",
supplierId: supplier.id, supplierId: supplier.id,
products: productsWithQuantity.map(x => { products: productsWithQuantity.map(x => {
@@ -61,6 +69,28 @@ export class StockAlert {
}; };
}) })
})); }));
const date = new Date().toISOString().split('T')[0];
let trackingValue = 'TRK-AUTO-';
const idStr = purchaseOrder.id?.toString() ?? '';
if (idStr.length < 2) trackingValue += '00' + idStr + '-' + date;
else if (idStr.length < 3) trackingValue += '0' + idStr + '-' + date;
else trackingValue += idStr.substring(0, 3) + date.replace(/-/g, '');
const productQuantities: Record<number, number> = {};
purchaseOrder.products?.forEach(p => {
if (p.productId != null && p.quantity != null) {
productQuantities[p.productId] = p.quantity;
}
});
await firstValueFrom(this.deliveryNotesService.createDeliveryNoteEndpoint({
trackingNumber: trackingValue,
supplierId: supplier.id,
delivererId: 1,
productQuantities: productQuantities
}));
} catch { } catch {
this.notificationsService.error('Erreur', 'Erreur lors de la génération du bon de commande.'); this.notificationsService.error('Erreur', 'Erreur lors de la génération du bon de commande.');
} }