Compare commits

...

23 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 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
128 changed files with 2306 additions and 3093 deletions
+112 -5
View File
@@ -18,8 +18,10 @@
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.17",
"browser-image-compression": "^2.0.2",
"jwt-decode": "^4.0.0",
"ng-zorro-antd": "^20.4.0",
"postcss": "^8.5.6",
"rimraf": "^6.1.3",
"rxjs": "~7.8.0",
"tailwindcss": "^4.1.17",
"tslib": "^2.3.0",
@@ -6911,6 +6913,15 @@
],
"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": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/less/-/less-4.4.2.tgz",
@@ -7594,10 +7605,10 @@
}
},
"node_modules/minipass": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
"integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
"license": "ISC",
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
"license": "BlueOak-1.0.0",
"engines": {
"node": ">=16 || 14 >=14.17"
}
@@ -8403,7 +8414,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
"integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
"dev": true,
"license": "BlueOak-1.0.0"
},
"node_modules/pacote": {
@@ -8938,6 +8948,103 @@
"dev": true,
"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": {
"version": "4.52.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz",
+2
View File
@@ -32,8 +32,10 @@
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/vite": "^4.1.17",
"browser-image-compression": "^2.0.2",
"jwt-decode": "^4.0.0",
"ng-zorro-antd": "^20.4.0",
"postcss": "^8.5.6",
"rimraf": "^6.1.3",
"rxjs": "~7.8.0",
"tailwindcss": "^4.1.17",
"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 fr from '@angular/common/locales/fr';
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);
@@ -14,6 +15,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
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">
<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>
<router-outlet></router-outlet>
+58 -29
View File
@@ -1,41 +1,70 @@
import {Routes} from '@angular/router';
import {authGuard} from "./guards/auth.guard";
export const routes: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: '/welcome'
redirectTo: '/login'
},
{
path: 'welcome',
loadComponent: () => import('./pages/welcome/welcome').then(x => x.Welcome)
path: 'login',
loadComponent: () => import('./pages/login/login').then(x => x.Login)
},
{
path: 'stock',
loadComponent: () => import('./pages/stock/stock').then(x => x.Stock)
},
{
path: 'supplier',
loadComponent: () => import('./pages/supplier/supplier').then(x => x.Supplier)
},
{
path: 'deliverer',
loadComponent: () => import('./pages/deliverer/deliverer').then(x => x.Deliverer)
},
{
path: 'quotation',
loadComponent: () => import('./pages/quotation/quotation').then(x => x.Quotation)
},
{
path: 'purchase-order',
loadComponent: () => import('./pages/purchase-order/purchase-order').then(x => x.PurchaseOrder)
},
{
path: 'delivery-note',
loadComponent: () => import('./pages/delivery-note/delivery-note').then(x => x.DeliveryNote)
},
{
path: 'user',
loadComponent: () => import('./pages/user/user').then(x => x.User)
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',
loadComponent: () => import('./pages/stock/stock').then(m => m.Stock),
canActivate: [authGuard]
},
{
path: 'supplier',
loadComponent: () => import('./pages/supplier/supplier').then(m => m.Supplier),
canActivate: [authGuard]
},
{
path: 'deliverer',
loadComponent: () => import('./pages/deliverer/deliverer').then(m => m.Deliverer),
canActivate: [authGuard]
},
{
path: 'quotation',
loadComponent: () => import('./pages/quotation/quotation').then(m => m.Quotation),
canActivate: [authGuard]
},
{
path: 'purchase-order',
loadComponent: () => import('./pages/purchase-order/purchase-order').then(m => m.PurchaseOrder),
canActivate: [authGuard]
},
{
path: 'delivery-note',
loadComponent: () => import('./pages/delivery-note/delivery-note').then(m => m.DeliveryNote),
canActivate: [authGuard]
},
{
path: '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 {RouterLink, RouterLinkActive, RouterOutlet} from '@angular/router';
import {RouterOutlet} from '@angular/router';
import {NzLayoutModule} from 'ng-zorro-antd/layout';
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({
selector: 'app-root',
imports: [RouterOutlet, NzLayoutModule, NzMenuModule, NzIconDirective, RouterLinkActive, RouterLink, ModalNav, Profil, SettingForm],
imports: [RouterOutlet, NzLayoutModule, NzMenuModule],
templateUrl: './app.html',
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 {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzFlexDirective} from "ng-zorro-antd/flex";
@@ -43,9 +43,11 @@
<div style="justify-content: center; display: flex">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(deliverer)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliverer.id)"
class="text-red-600 cursor-pointer"></nz-icon>
@if (admin()){
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliverer.id)"
class="text-red-600 cursor-pointer"></nz-icon>
}
</div>
</td>
</tr>
@@ -9,7 +9,7 @@ import {DelivererForm} from "../deliverer-form/deliverer-form";
import {DeliverersService, GetDelivererDto, GetSupplierDto} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {SupplierForm} from "../supplier-form/supplier-form";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-deliverer-table',
@@ -29,13 +29,17 @@ import {SupplierForm} from "../supplier-form/supplier-form";
export class DelivererTable implements OnInit {
private deliverersService = inject(DeliverersService);
private notificationService = inject(NzNotificationService)
private authService = inject(AuthService);
deliverers = signal<GetDelivererDto[]>([]);
deliverersLoading = signal<boolean>(false);
updateDeliverer = viewChild.required<DelivererForm>('delivererForm');
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav');
async ngOnInit() {
await this.fetchDeliverers();
this.admin.set(this.authService.isAdmin());
}
async fetchDeliverers() {
@@ -44,11 +48,8 @@ export class DelivererTable implements OnInit {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint())
this.deliverers.set(deliverers);
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
} catch {
this.notificationService.error('Erreur', 'Erreur lors du chargement des transporteurs');
}
this.deliverersLoading.set(false)
}
@@ -56,11 +57,8 @@ export class DelivererTable implements OnInit {
async delete(deliverer: number) {
try {
await firstValueFrom(this.deliverersService.deleteDelivererEndpoint(deliverer))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.success('Success', 'Suppression effectuée');
} catch {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
@@ -71,10 +69,7 @@ export class DelivererTable implements OnInit {
async edit(id: number, updateDelivererComponent: DelivererForm) {
if (updateDelivererComponent.delivererForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide');
return;
}
@@ -83,7 +78,7 @@ export class DelivererTable implements OnInit {
await firstValueFrom(this.deliverersService.updateDelivererEndpoint(id, deliverers))
this.notificationService.success('Success', 'Transporteur modifié')
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification')
}
}
@@ -100,7 +95,7 @@ export class DelivererTable implements OnInit {
await this.edit(supplierId, updateDelivererComponent);
updateDelivererComponent.delivererForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchDeliverers();
}
@@ -5,7 +5,7 @@
</nz-form-label>
<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) {
<nz-option [nzValue]="deliverer.id" [nzLabel]="deliverer.transporter"></nz-option>
}
@@ -46,7 +46,7 @@ export class DelivereryNoteForm implements OnInit {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliverers.set(deliverers);
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Impossible de récupérer les transporteurs');
}
}
@@ -38,9 +38,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(deliveryNote)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliveryNote.id)"
class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider>
@if (admin()){
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliveryNote.id)"
class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" nzTheme="outline" (click)="export(deliveryNote.id)"
class="cursor-pointer text-green-700"/>
</div>
@@ -10,6 +10,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {format} from "date-fns";
import {FileService} from "../../services/file.service";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-deliverery-note-table',
@@ -28,15 +29,19 @@ export class DelivereryNoteTable implements OnInit {
private deliveryNotesService = inject(DeliverynotesService);
private notificationService = inject(NzNotificationService);
private fileService = inject(FileService);
private authService = inject(AuthService);
deliveryNotes = signal<GetDeliveryNoteDto[]>([]);
deliveryNotesLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav');
date: string = "";
date = new Date().toISOString().split('T')[0]; // yyyy-mm-dd
async ngOnInit() {
await this.fetchDeliveryNotes();
this.date = new Date().toISOString().split('T')[0];
this.admin.set(this.authService.isAdmin());
}
async fetchDeliveryNotes() {
@@ -44,11 +49,8 @@ export class DelivereryNoteTable implements OnInit {
try {
const deliveryNotes = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNoteEndpoint());
this.deliveryNotes.set(deliveryNotes);
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
} catch {
this.notificationService.error('Erreur', 'Erreur lors du chargement des bons de livraison');
}
this.deliveryNotesLoading.set(false)
}
@@ -57,15 +59,9 @@ export class DelivereryNoteTable implements OnInit {
this.deliveryNotesLoading.set(true)
try {
await firstValueFrom(this.deliveryNotesService.deleteDeliveryNoteEndpoint(deliveryNote));
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée');
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne');
}
this.deliveryNotesLoading.set(false)
await this.fetchDeliveryNotes();
@@ -80,22 +76,12 @@ export class DelivereryNoteTable implements OnInit {
try {
await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(deliveryNote, PatchRealDate))
this.notificationService.success(
'Success',
'Date actualisée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'La date à déjà été actualisée'
)
this.notificationService.success('Success', 'Date actualisée');
} catch {
this.notificationService.error('Erreur', 'La date à déjà été actualisée');
}
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'actualisation de la date'
)
} catch {
this.notificationService.error('Erreur', 'Erreur d\'actualisation de la date');
}
this.deliveryNotesLoading.set(false)
await this.fetchDeliveryNotes()
@@ -104,15 +90,10 @@ export class DelivereryNoteTable implements OnInit {
async export(deliveryNoteId: number) {
this.deliveryNotesLoading.set(true)
try {
const pdf = await firstValueFrom(
this.deliveryNotesService.getDeliveryNotePdfEndpoint(deliveryNoteId, "response")
);
const pdf = await firstValueFrom(this.deliveryNotesService.getDeliveryNotePdfEndpoint(deliveryNoteId, "response"));
this.fileService.downloadBlob(pdf)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de générer un PDF'
);
} catch {
this.notificationService.error('Erreur', 'Impossible de générer un PDF');
}
this.deliveryNotesLoading.set(false)
}
@@ -139,7 +120,7 @@ export class DelivereryNoteTable implements OnInit {
await firstValueFrom(this.deliveryNotesService.updateDeliveryNoteEndpoint(id, deliveryNoteDto));
this.notificationService.success('Success', 'Bon de livraison modifié');
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification');
}
}
@@ -156,7 +137,7 @@ export class DelivereryNoteTable implements OnInit {
await this.edit(id, updateDelivereryNoteComponent);
updateDelivereryNoteComponent.deliveryNoteForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchDeliveryNotes();
}
@@ -43,10 +43,7 @@ export class DeliveryValidator implements OnInit {
const wareHouses = await firstValueFrom(this.warehousesService.getAllWarehouseEndpoint());
this.wareHouses.set(wareHouses);
} catch {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
this.notificationService.error('Erreur', 'Erreur lors du chargement des quantitées')
}
}
@@ -55,10 +52,7 @@ export class DeliveryValidator implements OnInit {
const deliveries = await firstValueFrom(this.deliveryNotesService.getAllDeliveryNotesNotArrivedEndpoint());
this.deliveryNotes.set(deliveries);
} catch {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
this.notificationService.error('Erreur', 'Erreur lors du chargement des bon de livraison')
}
}
@@ -76,11 +70,8 @@ export class DeliveryValidator implements OnInit {
realDeliveryDate: format(new Date(), 'yyyy-MM-dd')
};
await firstValueFrom(this.deliveryNotesService.patchRealDeliveryDateEndpoint(id, PatchRealDate));
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API',
)
} catch {
this.notificationService.error('Erreur', 'Impossible d\'actualiser la date')
}
}
@@ -98,18 +89,12 @@ export class DeliveryValidator implements OnInit {
));
}
this.notificationService.success(
'Succès',
'Les produits sont bien ajoutés au stock'
)
this.notificationService.success('Succès', 'Les produits sont bien ajoutés au stock')
modal.isVisible = false;
await this.fetchDeliveryNotes();
} catch {
this.notificationService.error(
'Erreur',
'Vous devez choisir un entrepôt',
)
this.notificationService.error('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 {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 {NzModalModule} from 'ng-zorro-antd/modal';
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 {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input";
import {GetPriceDto, GetSupplierDto} from "../../services/api";
import {GetPriceDto} from "../../services/api";
@Component({
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-select formControlName="fonction" [nzPlaceHolder]="'Choisir une fonction'">
<nz-option nzLabel="Admin" nzValue="Admin"></nz-option>
<nz-option nzLabel="Visiteur" nzValue="Visiteur"></nz-option>
<nz-option nzLabel="Partenaire" nzValue="Partenaire"></nz-option>
<nz-option nzLabel="Employé" nzValue="Employe"></nz-option>
</nz-select>
</nz-form-control>
</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">
{{ getInitial(data.name) }}
{{ getInitial(user().name) }}
</div>
<div class="mt-6">
<p class="text-3xl festive2 mx-auto flex items-center justify-center">{{ data.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">{{ data.fonction }}</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">{{ user().email }}</p>
<p class="text-xl festive2 mt-0 flex items-center justify-center">{{ user().fonction }}</p>
</div>
+19 -15
View File
@@ -1,24 +1,28 @@
import {Component} from '@angular/core';
import {UserInfo} from "../../interfaces/user.interface";
import {ProfilForm} from "../profil-form/profil-form";
import {ModalNav} from "../modal-nav/modal-nav";
import {Component, inject, OnInit, signal} from '@angular/core';
import {NzNotificationService} from "ng-zorro-antd/notification";
import {GetUserDto, UserService} from "../../services/api";
import {firstValueFrom} from "rxjs";
@Component({
selector: 'app-profil',
imports: [
ProfilForm,
ModalNav
],
imports: [],
templateUrl: './profil.html',
styleUrl: './profil.css',
})
export class Profil {
data: UserInfo =
{
name: 'Mathys Sanchez Vendé',
email: 'mathys.sanchez@vende.fr',
fonction: 'admin',
};
export class Profil implements OnInit {
private notificationService = inject(NzNotificationService);
private userService = inject(UserService);
user = signal<GetUserDto>({});
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 {
if (!name || name.trim() === '') return '?';
@@ -60,9 +60,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(purchaseOrder)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(purchaseOrder.id)"
class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider>
@if (admin()) {
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(purchaseOrder.id)"
class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" nzTheme="outline" (click)="export(purchaseOrder.id)"
class="cursor-pointer text-green-700"/>
<nz-divider nzType="vertical"></nz-divider>
@@ -17,6 +17,7 @@ import {firstValueFrom} from "rxjs";
import {FileService} from "../../services/file.service";
import {QuantityForm} from "../quantity-form/quantity-form";
import {DelivererChoice} from "../deliverer-choice/deliverer-choice";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-purchase-order-table',
@@ -38,9 +39,11 @@ export class PurchaseOrderTable implements OnInit {
private notificationService = inject(NzNotificationService);
private fileService = inject(FileService);
private deliveryNoteService = inject(DeliverynotesService);
private authService = inject(AuthService);
purchaseOrders = signal<GetPurchaseOrderDto[]>([]);
purchaseOrdersLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav');
modalQuantity = viewChild.required<ModalNav>('modalQuantity');
@@ -48,6 +51,7 @@ export class PurchaseOrderTable implements OnInit {
async ngOnInit() {
await this.fetchPurchaseOrder();
this.admin.set(this.authService.isAdmin());
}
async fetchPurchaseOrder() {
@@ -56,11 +60,8 @@ export class PurchaseOrderTable implements OnInit {
try {
const purchaseOrders = await firstValueFrom(this.purchaseOrdersService.getAllPurchaseOrderEndpoint())
this.purchaseOrders.set(purchaseOrders);
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
} catch {
this.notificationService.error('Erreur', 'Erreur lors du chargement des bons de commande')
}
this.purchaseOrdersLoading.set(false)
}
@@ -69,15 +70,9 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersLoading.set(true)
try {
await firstValueFrom(this.purchaseOrdersService.deletePurchaseOrderEndpoint(purchaseOrderId))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée')
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
}
this.purchaseOrdersLoading.set(false)
await this.fetchPurchaseOrder();
@@ -90,11 +85,8 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersService.getPurchaseOrderPdfEndpoint(purchaseOrderId, "response")
);
this.fileService.downloadBlob(pdf)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de générer un PDF'
);
} catch {
this.notificationService.error('Erreur', 'Impossible de générer un PDF');
}
this.purchaseOrdersLoading.set(false)
}
@@ -138,10 +130,7 @@ export class PurchaseOrderTable implements OnInit {
async edit(id: number, updatePurchaseOrderComponent: PurchaseOrderForm) {
if (updatePurchaseOrderComponent.purchaseOrderForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
return;
}
@@ -150,7 +139,7 @@ export class PurchaseOrderTable implements OnInit {
await firstValueFrom(this.purchaseOrdersService.patchPurchaseOrderPurchaseConditionsEndpoint(id, purchaseOrders))
this.notificationService.success('Success', 'Bon de commande modifié')
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification')
}
}
@@ -159,15 +148,9 @@ export class PurchaseOrderTable implements OnInit {
this.purchaseOrdersLoading.set(true)
try {
await firstValueFrom(this.purchaseOrdersService.deleteProductFromPurchaseOrderEndpoint(productId, purchaseOrderId))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée')
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
}
this.purchaseOrdersLoading.set(false)
await this.fetchPurchaseOrder();
@@ -175,10 +158,7 @@ export class PurchaseOrderTable implements OnInit {
async editQuantity(productId: number, purchaseOrderId: number, updateQuantityComponent: QuantityForm) {
if (updateQuantityComponent.quantityForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Erreur d\'écriture dans le formulaire')
return;
}
@@ -209,7 +189,7 @@ export class PurchaseOrderTable implements OnInit {
await this.edit(id, updatePurchaseOrderComponent);
updatePurchaseOrderComponent.purchaseOrderForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchPurchaseOrder();
}
@@ -229,7 +209,7 @@ export class PurchaseOrderTable implements OnInit {
await this.editQuantity(productId, purchaseOrderId, updateQuantityComponent);
updateQuantityComponent.quantityForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchPurchaseOrder();
}
}
@@ -4,7 +4,7 @@ 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";
import {GetDelivererDto, GetPurchaseProductDto} from "../../services/api";
import {GetPurchaseProductDto} from "../../services/api";
@Component({
selector: 'app-quantity-form',
@@ -60,9 +60,11 @@
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(quotation)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700"
(click)="delete(quotation.id)"/>
<nz-divider nzType="vertical"></nz-divider>
@if (admin()) {
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700"
(click)="delete(quotation.id)"/>
<nz-divider nzType="vertical"></nz-divider>
}
<nz-icon nzType="export" (click)="export(quotation.id)" nzTheme="outline"
class="cursor-pointer text-green-700"/>
</div>
@@ -14,6 +14,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification";
import {firstValueFrom} from "rxjs";
import {FileService} from "../../services/file.service";
import {QuantityForm} from "../quantity-form/quantity-form";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-quotation-table',
@@ -34,13 +35,18 @@ export class QuotationTable implements OnInit {
private quotationsService = inject(QuotationsService);
private notificationService = inject(NzNotificationService);
private fileService = inject(FileService);
private authService = inject(AuthService);
quotations = signal<GetQuotationDto[]>([]);
quotationsLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav');
modalQuantity = viewChild.required<ModalNav>('modalQuantity');
async ngOnInit() {
await this.fetchQuotations();
this.admin.set(this.authService.isAdmin());
}
async fetchQuotations() {
@@ -49,11 +55,8 @@ export class QuotationTable implements OnInit {
try {
const quotations = await firstValueFrom(this.quotationsService.getAllQuotationEndpoint())
this.quotations.set(quotations);
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
} catch {
this.notificationService.error('Erreur', 'Erreur lors du chargement des devis')
}
this.quotationsLoading.set(false)
}
@@ -62,15 +65,9 @@ export class QuotationTable implements OnInit {
this.quotationsLoading.set(true)
try {
await firstValueFrom(this.quotationsService.deleteQuotationEndpoint(quotation))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée')
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
}
this.quotationsLoading.set(false)
await this.fetchQuotations();
@@ -83,12 +80,8 @@ export class QuotationTable implements OnInit {
this.quotationsService.getQuotationPdfEndpoint(quotationId, "response")
);
this.fileService.downloadBlob(pdf)
} catch (e) {
console.error(e);
this.notificationService.error(
'Erreur',
'Impossible de générer un PDF'
);
} catch {
this.notificationService.error('Erreur', 'Impossible de générer un PDF');
}
this.quotationsLoading.set(false)
}
@@ -103,8 +96,7 @@ export class QuotationTable implements OnInit {
const quotations = updateQuotationComponent.quotationForm.getRawValue();
await firstValueFrom(this.quotationsService.updateQuotationEndpoint(id, quotations));
this.notificationService.success('Success', 'Devis modifié')
} catch (e) {
console.error(e)
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification')
}
}
@@ -113,15 +105,9 @@ export class QuotationTable implements OnInit {
this.quotationsLoading.set(true)
try {
await firstValueFrom(this.quotationsService.deleteProductFromQuotationEndpoint(productId, quotationId))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée')
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
}
this.quotationsLoading.set(false)
await this.fetchQuotations();
@@ -129,10 +115,7 @@ export class QuotationTable implements OnInit {
async editQuantity(productId: number, quotationId: number, updateQuantityComponent: QuantityForm) {
if (updateQuantityComponent.quantityForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
return;
}
@@ -141,7 +124,7 @@ export class QuotationTable implements OnInit {
await firstValueFrom(this.quotationsService.patchQuotationProductQuantityEndpoint(productId, quotationId, quantity))
this.notificationService.success('Success', 'Quantité modifiée')
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification')
}
}
@@ -158,7 +141,7 @@ export class QuotationTable implements OnInit {
await this.edit(id, updateQuotationComponent);
updateQuotationComponent.quotationForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchQuotations();
}
@@ -178,7 +161,7 @@ export class QuotationTable implements OnInit {
await this.editQuantity(productId, quotationId, updateQuantityComponent);
updateQuantityComponent.quantityForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchQuotations();
}
}
@@ -4,41 +4,57 @@
<div class="row">
<div class="row-left">
@if (settings().logo) {
<img [src]="'data:image/jpeg;base64,' + settings().logo" alt=""/>
<img [src]="settings().logo" alt=""/>
} @else {
<img [src]="setting.logo" alt="logo">
}
</div>
<div class="row-right">
<nz-form-item>
<nz-form-label nzSpan="9">Logo</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input #fileInputLogo nz-input type="file" placeholder="Déposer"
(change)="onFileChange('logo', fileInputLogo.files)">
</nz-form-control>
</nz-form-item>
</div>
@if (admin()){
<div class="row-right">
<nz-form-item>
<nz-form-label nzSpan="9">Logo</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input #fileInputLogo nz-input type="file" placeholder="Déposer"
(change)="onFileChange('logo', fileInputLogo.files)">
</nz-form-control>
</nz-form-item>
</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>
<!-- Signature -->
<div class="row">
<div class="row-left">
@if (settings().electronicSignature) {
<img [src]="'data:image/jpeg;base64,' + settings().electronicSignature" alt=""/>
<img [src]="settings().electronicSignature" alt=""/>
} @else {
<img [src]="setting.electronicSignature" alt="logo">
}
</div>
<div class="row-right">
<nz-form-item>
<nz-form-label nzSpan="9">Signature</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input #fileInputSignature nz-input type="file" placeholder="Déposer"
(change)="onFileChange('electronicSignature', fileInputSignature.files)">
</nz-form-control>
</nz-form-item>
</div>
@if (admin()) {
<div class="row-right">
<nz-form-item>
<nz-form-label nzSpan="9">Signature</nz-form-label>
<nz-form-control nzErrorTip="Ce champ est requis">
<input #fileInputSignature nz-input type="file" placeholder="Déposer"
(change)="onFileChange('electronicSignature', fileInputSignature.files)">
</nz-form-control>
</nz-form-item>
</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>
</form>
@@ -8,6 +8,7 @@ import {firstValueFrom} from "rxjs";
import {GetSettingDto, SettingsService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import imageCompression from "browser-image-compression";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-setting-form',
@@ -27,8 +28,10 @@ import imageCompression from "browser-image-compression";
export class SettingForm implements OnInit {
private settingsService = inject(SettingsService);
private notificationService = inject(NzNotificationService);
private authService = inject(AuthService);
settings = signal<GetSettingDto>({});
admin = signal<boolean>(false);
setting: SettingInfo = {
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() {
await this.fetchSettings();
this.admin.set(this.authService.isAdmin());
}
async fetchSettings() {
@@ -49,10 +53,7 @@ export class SettingForm implements OnInit {
const settingsPicture = await firstValueFrom(this.settingsService.getSettingEndpoint());
this.settings.set(settingsPicture);
} catch {
this.notificationService.error(
'Erreur',
'Aucun paramètre défini'
)
this.notificationService.error('Erreur', 'Aucun paramètre défini')
}
}
@@ -78,7 +79,7 @@ export class SettingForm implements OnInit {
}
await this.fetchSettings();
} 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();
@@ -6,7 +6,7 @@
</nz-form-label>
<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-item>
</form>
@@ -46,9 +46,11 @@
<div style="justify-content: center; display: flex">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(product)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(product.id)"
class="text-red-600 cursor-pointer"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(product.id)"
class="text-red-600 cursor-pointer"></nz-icon>
}
</div>
</td>
</tr>
@@ -7,8 +7,9 @@ import {NzDividerComponent} from "ng-zorro-antd/divider";
import {FormsModule} from "@angular/forms";
import {GetProductDto, ProductsService, WarehouseproductsService} from "../../services/api";
import {NzNotificationService} from "ng-zorro-antd/notification";
import {first, firstValueFrom} from "rxjs";
import {firstValueFrom} from "rxjs";
import {NzCheckboxComponent} from "ng-zorro-antd/checkbox";
import {AuthService} from "../../services/auth.service";
interface ProductWithQuantity extends GetProductDto {
totalQuantity?: number;
@@ -34,9 +35,11 @@ export class StockTable implements OnInit {
private productsService = inject(ProductsService);
private wareHousseProductsService = inject(WarehouseproductsService)
private notificationService = inject(NzNotificationService)
private authService = inject(AuthService);
products = signal<ProductWithQuantity[]>([]);
productsLoading = signal<boolean>(false);
admin = signal<boolean>(false);
modal = viewChild.required<ModalNav>('modalNav');
@@ -50,6 +53,7 @@ export class StockTable implements OnInit {
async ngOnInit() {
await this.fetchProducts();
this.admin.set(this.authService.isAdmin());
}
async fetchProducts() {
@@ -76,7 +80,7 @@ export class StockTable implements OnInit {
);
this.products.set(productsWithQuantity);
} catch {
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
this.notificationService.error('Erreur', 'Impossible de charger le catalogue');
}
this.productsLoading.set(false);
}
@@ -93,7 +97,7 @@ export class StockTable implements OnInit {
async edit(id: number, updateProductComponent: StockForm) {
if (updateProductComponent.stockForm.invalid) {
this.notificationService.error('Erreur', 'Erreur d\'écriture dans le formulaire')
this.notificationService.error('Erreur', 'Formulaire invalide')
return;
}
try {
@@ -115,7 +119,7 @@ export class StockTable implements OnInit {
if (!this.selectedProduct) return;
await this.edit(productId, updateProductComponent);
updateProductComponent.stockForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchProducts();
}
@@ -1,4 +1,4 @@
<nz-table [nzData]="filteredSuppliers()"
<nz-table [nzData]="suppliers()"
[nzLoading]="suppliersLoading()"
[nzFrontPagination]="false">
<thead>
@@ -15,7 +15,7 @@
</tr>
</thead>
<tbody style="text-align: center">
@for (supplier of filteredSuppliers(); track supplier.id) {
@for (supplier of suppliers(); track supplier.id) {
<tr>
<td>{{ supplier.name }}</td>
<td>{{ supplier.phone }}</td>
@@ -26,7 +26,7 @@
<td>{{ supplier.deliveryDelay }} jours</td>
<td>
<app-modal-button type="link" [name]="'Voir les produits'" size="45%">
<nz-table [nzData]="filteredSuppliers()" [nzFrontPagination]="false">
<nz-table [nzData]="suppliers()" [nzFrontPagination]="false">
<thead>
<tr class="text-center">
<th>Produit</th>
@@ -46,10 +46,12 @@
<nz-icon nzType="edit" nzTheme="outline"
class="cursor-pointer text-gray-600 hover:text-gray-900"
(click)="openEditProductModal(product, supplier.id)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline"
class="cursor-pointer text-red-600 hover:text-red-800"
(click)="deleteProduct(product.productId, supplier.id)"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline"
class="cursor-pointer text-red-600 hover:text-red-800"
(click)="deleteProduct(product.productId, supplier.id)"></nz-icon>
}
</div>
</td>
</tr>
@@ -62,9 +64,11 @@
<div style="display: flex; align-items: center;">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
(click)="openEditModal(supplier)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)"
class="text-red-600 cursor-pointer"></nz-icon>
@if (admin()) {
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)"
class="text-red-600 cursor-pointer"></nz-icon>
}
</div>
</td>
</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 {NzDividerComponent} from "ng-zorro-antd/divider";
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 {firstValueFrom} from "rxjs";
import {PriceForm} from "../price-form/price-form";
import {AuthService} from "../../services/auth.service";
@Component({
selector: 'app-supplier-table',
@@ -29,34 +30,22 @@ export class SupplierTable implements OnInit {
private suppliersService = inject(SuppliersService);
private pricesService = inject(PricesService);
private notificationService = inject(NzNotificationService);
private authService = inject(AuthService);
suppliers = signal<GetSupplierDto[]>([]);
suppliersLoading = signal<boolean>(false);
updateSupplier = viewChild.required<SupplierForm>('supplierForm');
admin = signal<boolean>(false);
supplierModal = viewChild.required<ModalNav>('supplierModal');
productModal = viewChild.required<ModalNav>('productModal');
selectedSupplier: GetSupplierDto | null = null;
selectedProduct: GetPriceDto | null = null;
selectedProductSupplierId: number | null = null;
async ngOnInit() {
await this.fetchSuppliers();
}
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);
this.admin.set(this.authService.isAdmin());
}
async fetchSuppliers() {
@@ -64,7 +53,7 @@ export class SupplierTable implements OnInit {
try {
const suppliers = await firstValueFrom(this.suppliersService.getAllSuppliersEndpoint());
this.suppliers.set(suppliers);
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Erreur de communication avec l\'API');
}
this.suppliersLoading.set(false);
@@ -79,8 +68,7 @@ export class SupplierTable implements OnInit {
const suppliers = updateSupplierComponent.supplierForm.getRawValue();
await firstValueFrom(this.suppliersService.updateSupplierEndpoint(id, suppliers));
this.notificationService.success('Success', 'Fournisseur modifié');
} catch (e) {
console.error(e);
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification');
}
}
@@ -90,7 +78,7 @@ export class SupplierTable implements OnInit {
await firstValueFrom(this.suppliersService.deleteSupplierEndpoint(supplier));
this.notificationService.success('Succès', 'Suppression effectuée');
await this.fetchSuppliers();
} catch (e) {
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne');
}
}
@@ -122,13 +110,13 @@ export class SupplierTable implements OnInit {
modal: ModalNav
) {
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;
}
await this.editPrice(productId, supplierId, updateProductComponent);
updateProductComponent.priceForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchSuppliers();
}
@@ -150,8 +138,7 @@ export class SupplierTable implements OnInit {
};
await firstValueFrom(this.pricesService.patchPriceEndpoint(productId, supplierId, body));
this.notificationService.success('Success', 'Prix modifié');
} catch (e) {
console.error(e);
} catch {
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));
this.notificationService.success('Succès', 'Produit supprimé');
await this.fetchSuppliers();
} catch (e) {
} catch {
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 {
private usersService = inject(UsersService);
private notificationService = inject(NzNotificationService)
users = signal<GetUserDto[]>([]);
usersLoading = signal<boolean>(false);
updateUser = viewChild.required<ProfilForm>('profilForm');
modal = viewChild.required<ModalNav>('modalNav');
async ngOnInit() {
@@ -38,11 +39,8 @@ export class UserTable implements OnInit {
try {
const users = await firstValueFrom(this.usersService.getAllUsersEndpoint())
this.users.set(users);
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur de communication avec l\'API'
)
} catch {
this.notificationService.error('Erreur', 'Impossible de charger les utilisateurs')
}
this.usersLoading.set(false)
}
@@ -50,25 +48,16 @@ export class UserTable implements OnInit {
async delete(user: number) {
try {
await firstValueFrom(this.usersService.deleteUserEndpoint(user))
this.notificationService.success(
'Success',
'Suppression effectuée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Impossible de supprimer la ligne'
)
this.notificationService.success('Success', 'Suppression effectuée')
} catch {
this.notificationService.error('Erreur', 'Impossible de supprimer la ligne')
}
await this.fetchUsers();
}
async edit(id: number, updateUserComponent: ProfilForm) {
if (updateUserComponent.profilForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
return;
}
@@ -76,15 +65,9 @@ export class UserTable implements OnInit {
const users = updateUserComponent.profilForm.getRawValue();
await firstValueFrom(this.usersService.updateUserEndpoint(id, users))
this.notificationService.success(
'Success',
'Utilisateur modifié'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur lors de la modification'
)
this.notificationService.success('Success', 'Utilisateur modifié')
} catch {
this.notificationService.error('Erreur', 'Erreur lors de la modification')
}
}
@@ -100,15 +83,11 @@ export class UserTable implements OnInit {
await this.edit(userId, updateUserComponent);
updateUserComponent.profilForm.reset();
modal.isVisible = false;
this.onModalCancel(modal);
await this.fetchUsers();
}
onModalCancel(modal: ModalNav) {
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";
@Component({
selector: 'app-welcome',
selector: 'app-dashboard',
imports: [
InfoCard,
DeliveryValidator,
],
templateUrl: './welcome.html',
styleUrl: './welcome.css'
templateUrl: './dashboard.html',
styleUrl: './dashboard.css'
})
export class Welcome {
export class Dashboard {
private productsService = inject(ProductsService);
private deliverersService = inject(DeliverersService);
private suppliersService = inject(SuppliersService);
@@ -32,8 +32,8 @@ export class Welcome {
try {
const deliverers = await firstValueFrom(this.deliverersService.getAllDelivererEndpoint());
this.deliversCount.set(deliverers.length);
} catch (e) {
this.notificationsService.error('Error', 'Error while getting deliverers.');
} catch {
this.notificationsService.error('Erreur', 'Impossible de charger les transporteurs');
}
}
@@ -43,7 +43,7 @@ export class Welcome {
this.suppliers.set(suppliers);
this.suppliersCount.set(suppliers.length);
} 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());
this.productsUnderLimitCount.set(products.length);
await this.stockAlertService.generatePurchaseOrder(products, this.suppliers());
} catch (e) {
this.notificationsService.error(
'Error',
'Error while getting products.',
)
} catch {
this.notificationsService.error('Error', 'Impossible de charger les produits.');
}
}
+5 -14
View File
@@ -26,7 +26,7 @@ export class Deliverer {
async onModalOk() {
await this.addDeliverer()
this.createDeliverer().delivererForm.reset();
this.modal().isVisible = false;
this.onModalCancel();
await this.delivererTable().fetchDeliverers()
}
@@ -36,24 +36,15 @@ export class Deliverer {
async addDeliverer() {
if (this.createDeliverer().delivererForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
}
try {
const deliverers = this.createDeliverer().delivererForm.getRawValue();
await firstValueFrom(this.deliverersService.createDelivererEndpoint(deliverers))
this.notificationService.success(
'Success',
'Transporteur enregistré'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
this.notificationService.success('Success', 'Transporteur enregistré')
} catch {
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());
this.suppliers.set(suppliers);
} 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;
}
const orderLines = this.createPurchaseOrder().lines.value.map(line => ({
const orderLines = this.createPurchaseOrder().lines.value.map((line: { productId: any; quantity: any; }) => ({
productId: line.productId,
quantity: line.quantity
}));
@@ -113,7 +113,7 @@ export class Stock implements OnInit {
return;
}
const orderLines = this.createQuotation().lines.value.map(line => ({
const orderLines = this.createQuotation().lines.value.map((line: { productId: any; quantity: any; }) => ({
productId: line.productId,
quantity: line.quantity
}));
+5 -14
View File
@@ -26,7 +26,7 @@ export class Supplier {
async onModalOk() {
await this.addSupplier()
this.createSupplier().supplierForm.reset();
this.modal().isVisible = false;
this.onModalCancel();
await this.supplierTable().fetchSuppliers()
}
@@ -36,24 +36,15 @@ export class Supplier {
async addSupplier() {
if (this.createSupplier().supplierForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
}
try {
const suppliers = this.createSupplier().supplierForm.getRawValue();
await firstValueFrom(this.suppliersService.createSupplierEndpoint(suppliers))
this.notificationService.success(
'Success',
'Fournisseur enregistré'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
this.notificationService.success('Success', 'Fournisseur enregistré')
} catch {
this.notificationService.error('Erreur', 'Erreur d\'enregistrement')
}
}
}
+10
View File
@@ -7,6 +7,16 @@
size="35%">
<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>
</div>
+6 -14
View File
@@ -20,13 +20,14 @@ export class User {
modal = viewChild.required<ModalButton>('modalButton');
createUser = viewChild.required<ProfilForm>('profilForm');
usersTable = viewChild.required<UserTable>('userTable');
private usersService = inject(UsersService);
private notificationService = inject(NzNotificationService)
async onModalOk() {
await this.addUser()
this.createUser().profilForm.reset();
this.modal().isVisible = false;
this.onModalCancel();
await this.usersTable().fetchUsers()
}
@@ -36,24 +37,15 @@ export class User {
async addUser() {
if (this.createUser().profilForm.invalid) {
this.notificationService.error(
'Erreur',
'Erreur d\'écriture dans le formulaire'
)
this.notificationService.error('Erreur', 'Formulaire invalide')
}
try {
const users = this.createUser().profilForm.getRawValue();
await firstValueFrom(this.usersService.createUserEndpoint(users))
this.notificationService.success(
'Success',
'Utilisateur crée'
)
} catch (e) {
this.notificationService.error(
'Erreur',
'Erreur d\'enregistrement'
)
this.notificationService.success('Success', 'Utilisateur crée')
} catch {
this.notificationService.error('Erreur', 'Email ou mot de passe invalide')
}
}
}
-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/purchaseorders.service.ts
api/quotations.service.ts
api/refresh.service.ts
api/settings.service.ts
api/suppliers.service.ts
api/user.service.ts
api/users.service.ts
api/warehouseproducts.service.ts
api/warehouses.service.ts
@@ -42,6 +44,7 @@ model/get-purchase-order-dto.ts
model/get-purchase-product-dto.ts
model/get-quotation-dto.ts
model/get-quotation-product-dto.ts
model/get-refresh-token-dto.ts
model/get-setting-dto.ts
model/get-supplier-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-user-password-dto.ts
model/patch-ware-house-product-quantity-dto.ts
model/refresh-token-dto.ts
model/update-deliverer-dto.ts
model/update-delivery-note-dto.ts
model/update-product-dto.ts
+1 -5
View File
@@ -73,9 +73,7 @@ export const appConfig: ApplicationConfig = {
```
**NOTE**
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you
can still import an Angular module:
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
```typescript
import { ApiModule } from '';
```
@@ -183,7 +181,5 @@ new Configuration({
```
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander
+5 -5
View File
@@ -1,15 +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.
*/
import {HttpHeaders, HttpParams, HttpParameterCodec} from '@angular/common/http';
import {CustomHttpParameterCodec} from './encoder';
import {Configuration} from './configuration';
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { CustomHttpParameterCodec } from './encoder';
import { Configuration } from './configuration';
export class BaseService {
protected basePath = 'http://localhost:5298';
@@ -17,7 +17,7 @@ export class BaseService {
public configuration: Configuration;
public encoder: HttpParameterCodec;
constructor(basePath?: string | string[], configuration?: Configuration) {
constructor(basePath?: string|string[], configuration?: Configuration) {
this.configuration = configuration || new Configuration();
if (typeof this.configuration.basePath !== 'string') {
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
+11 -11
View File
@@ -1,30 +1,30 @@
import {NgModule, ModuleWithProviders, SkipSelf, Optional} from '@angular/core';
import {Configuration} from './configuration';
import {HttpClient} from '@angular/common/http';
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';
@NgModule({
imports: [],
declarations: [],
exports: [],
providers: []
imports: [],
declarations: [],
exports: [],
providers: []
})
export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
return {
ngModule: ApiModule,
providers: [{provide: Configuration, useFactory: configurationFactory}]
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
};
}
constructor(@Optional() @SkipSelf() parentModule: ApiModule,
@Optional() http: HttpClient) {
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
@Optional() http: HttpClient) {
if (parentModule) {
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
}
if (!http) {
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
'See also https://github.com/angular/angular/issues/20575');
'See also https://github.com/angular/angular/issues/20575');
}
}
}
+17 -25
View File
@@ -1,37 +1,29 @@
export * from './customers.service';
import {CustomersService} from './customers.service';
import { CustomersService } from './customers.service';
export * from './deliverers.service';
import {DeliverersService} from './deliverers.service';
import { DeliverersService } from './deliverers.service';
export * from './deliverynotes.service';
import {DeliverynotesService} from './deliverynotes.service';
import { DeliverynotesService } from './deliverynotes.service';
export * from './prices.service';
import {PricesService} from './prices.service';
import { PricesService } from './prices.service';
export * from './products.service';
import {ProductsService} from './products.service';
import { ProductsService } from './products.service';
export * from './purchaseorders.service';
import {PurchaseordersService} from './purchaseorders.service';
import { PurchaseordersService } from './purchaseorders.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';
import {SettingsService} from './settings.service';
import { SettingsService } from './settings.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';
import {UsersService} from './users.service';
import { UsersService } from './users.service';
export * from './warehouseproducts.service';
import {WarehouseproductsService} from './warehouseproducts.service';
import { WarehouseproductsService } from './warehouseproducts.service';
export * from './warehouses.service';
import {WarehousesService} from './warehouses.service';
export const APIS = [CustomersService, DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, QuotationsService, SettingsService, SuppliersService, UsersService, WarehouseproductsService, WarehousesService];
import { WarehousesService } from './warehouses.service';
export const APIS = [CustomersService, DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, QuotationsService, RefreshService, SettingsService, SuppliersService, UserService, UsersService, WarehouseproductsService, WarehousesService];
+24 -37
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,29 +9,29 @@
*/
/* 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';
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 {GetCustomerDto} from '../model/get-customer-dto';
import { GetCustomerDto } from '../model/get-customer-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
@@ -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 reportProgress flag to report request and response progress.
*/
public getAllCustomersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllCustomersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -87,15 +74,15 @@ export class CustomersService extends BaseService {
}
let localVarPath = `/API/customers`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetCustomerDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+76 -164
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,68 +9,55 @@
*/
/* 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';
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 {CreateDelivererDto} from '../model/create-deliverer-dto';
import { CreateDelivererDto } from '../model/create-deliverer-dto';
// @ts-ignore
import {GetDelivererDto} from '../model/get-deliverer-dto';
import { GetDelivererDto } from '../model/get-deliverer-dto';
// @ts-ignore
import {UpdateDelivererDto} from '../model/update-deliverer-dto';
import { UpdateDelivererDto } from '../model/update-deliverer-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/deliverers
* @param createDelivererDto
* @param createDelivererDto
* @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 createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter createDelivererDto was null or undefined when calling createDelivererEndpoint.');
}
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'
]);
@@ -104,16 +91,16 @@ export class DeliverersService extends BaseService {
}
let localVarPath = `/API/deliverers`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetDelivererDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createDelivererDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -121,37 +108,25 @@ export class DeliverersService extends BaseService {
/**
* @endpoint delete /API/deliverers/{delivererId}
* @param delivererId
* @param delivererId
* @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 deleteDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter delivererId was null or undefined when calling deleteDelivererEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -172,24 +147,16 @@ export class DeliverersService extends BaseService {
}
}
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({
name: "delivererId",
value: delivererId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({name: "delivererId", 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}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllDelivererEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllDelivererEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -247,15 +201,15 @@ export class DeliverersService extends BaseService {
}
let localVarPath = `/API/deliverers`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDelivererDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -263,36 +217,23 @@ export class DeliverersService extends BaseService {
/**
* @endpoint get /API/deliverers/{delivererId}
* @param delivererId
* @param delivererId
* @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 getDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter delivererId was null or undefined when calling getDelivererEndpoint.');
}
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'
]);
@@ -316,24 +257,16 @@ export class DeliverersService extends BaseService {
}
}
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({
name: "delivererId",
value: delivererId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({name: "delivererId", 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}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -341,31 +274,15 @@ export class DeliverersService extends BaseService {
/**
* @endpoint put /API/deliverers/{id}
* @param id
* @param updateDelivererDto
* @param id
* @param updateDelivererDto
* @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 updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -407,25 +327,17 @@ export class DeliverersService extends BaseService {
}
}
let localVarPath = `/API/deliverers/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliverers/${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<GetDelivererDto>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateDelivererDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+118 -258
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,71 +9,59 @@
*/
/* 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';
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 {CreateDeliveryNoteDto} from '../model/create-delivery-note-dto';
import { CreateDeliveryNoteDto } from '../model/create-delivery-note-dto';
// @ts-ignore
import {GetDeliveryNoteDto} from '../model/get-delivery-note-dto';
import { GetDeliveryNoteDto } from '../model/get-delivery-note-dto';
// @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
import {UpdateDeliveryNoteDto} from '../model/update-delivery-note-dto';
import { UpdateDeliveryNoteDto } from '../model/update-delivery-note-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/deliveryNotes
* @param createDeliveryNoteDto
* @param createDeliveryNoteDto
* @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 createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter createDeliveryNoteDto was null or undefined when calling createDeliveryNoteEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -104,16 +92,16 @@ export class DeliverynotesService extends BaseService {
}
let localVarPath = `/API/deliveryNotes`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createDeliveryNoteDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -121,37 +109,25 @@ export class DeliverynotesService extends BaseService {
/**
* @endpoint delete /API/deliveryNotes/{id}
* @param 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 deleteDeliveryNoteEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteDeliveryNoteEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling deleteDeliveryNoteEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -172,24 +148,16 @@ export class DeliverynotesService extends BaseService {
}
}
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllDeliveryNoteEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllDeliveryNoteEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -247,15 +202,15 @@ export class DeliverynotesService extends BaseService {
}
let localVarPath = `/API/deliveryNotes`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllDeliveryNotesNotArrivedEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -313,15 +255,15 @@ export class DeliverynotesService extends BaseService {
}
let localVarPath = `/API/deliveryNotes/validation`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetDeliveryNoteDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -329,36 +271,23 @@ export class DeliverynotesService extends BaseService {
/**
* @endpoint get /API/deliveryNotes/{deliveryNoteId}
* @param deliveryNoteId
* @param deliveryNoteId
* @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 getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter deliveryNoteId was null or undefined when calling getDeliveryNoteEndpoint.');
}
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'
]);
@@ -382,24 +311,16 @@ export class DeliverynotesService extends BaseService {
}
}
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({
name: "deliveryNoteId",
value: deliveryNoteId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "deliveryNoteId", 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}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -407,36 +328,23 @@ export class DeliverynotesService extends BaseService {
/**
* @endpoint get /API/deliveryNotes/{id}/pdf
* @param 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 getDeliveryNotePdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getDeliveryNotePdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getDeliveryNotePdfEndpoint.');
}
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/pdf'
]);
@@ -449,24 +357,16 @@ export class DeliverynotesService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
responseType: "blob",
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -474,31 +374,15 @@ export class DeliverynotesService extends BaseService {
/**
* @endpoint patch /API/deliveryNotes/{id}
* @param id
* @param patchDeliveryNoteRealDeliveryDateDto
* @param id
* @param patchDeliveryNoteRealDeliveryDateDto
* @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 patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -538,25 +426,17 @@ export class DeliverynotesService extends BaseService {
}
}
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: patchDeliveryNoteRealDeliveryDateDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -564,31 +444,15 @@ export class DeliverynotesService extends BaseService {
/**
* @endpoint put /API/deliveryNotes/{id}
* @param id
* @param updateDeliveryNoteDto
* @param id
* @param updateDeliveryNoteDto
* @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 updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -628,25 +496,17 @@ export class DeliverynotesService extends BaseService {
}
}
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/deliveryNotes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateDeliveryNoteDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+30 -58
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,60 +9,44 @@
*/
/* 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';
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 {PatchPriceSellingPriceDto} from '../model/patch-price-selling-price-dto';
import { PatchPriceSellingPriceDto } from '../model/patch-price-selling-price-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint patch /API/prices/{productId}/{supplierId}/SellingPrice
* @param productId
* @param supplierId
* @param patchPriceSellingPriceDto
* @param productId
* @param supplierId
* @param patchPriceSellingPriceDto
* @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 patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -105,33 +93,17 @@ export class PricesService extends BaseService {
}
}
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`;
const {basePath, withCredentials} = this.configuration;
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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: patchPriceSellingPriceDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+92 -199
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,69 +9,57 @@
*/
/* 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';
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 {GetProductDto} from '../model/get-product-dto';
import { GetProductDto } from '../model/get-product-dto';
// @ts-ignore
import {PatchProductMinimalStockDto} from '../model/patch-product-minimal-stock-dto';
import { PatchProductMinimalStockDto } from '../model/patch-product-minimal-stock-dto';
// @ts-ignore
import {UpdateProductDto} from '../model/update-product-dto';
import { UpdateProductDto } from '../model/update-product-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint delete /API/products/{productId}
* @param productId
* @param productId
* @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 deleteProductEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteProductEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter productId was null or undefined when calling deleteProductEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -92,24 +80,16 @@ export class ProductsService extends BaseService {
}
}
let localVarPath = `/API/products/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/products/${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}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllProductsEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllProductsEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -167,15 +134,15 @@ export class ProductsService extends BaseService {
}
let localVarPath = `/API/products`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllProductsUnderLimitEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllProductsUnderLimitEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -233,15 +187,15 @@ export class ProductsService extends BaseService {
}
let localVarPath = `/API/products/underLimit`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetProductDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -249,36 +203,23 @@ export class ProductsService extends BaseService {
/**
* @endpoint get /API/products/{id}
* @param 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 getProductEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getProductEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getProductEndpoint.');
}
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'
]);
@@ -302,24 +243,16 @@ export class ProductsService extends BaseService {
}
}
let localVarPath = `/API/products/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/products/${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<GetProductDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -327,31 +260,15 @@ export class ProductsService extends BaseService {
/**
* @endpoint patch /API/products/{id}/MinimalStock
* @param id
* @param patchProductMinimalStockDto
* @param id
* @param patchProductMinimalStockDto
* @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 patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -391,25 +312,17 @@ export class ProductsService extends BaseService {
}
}
let localVarPath = `/API/products/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/MinimalStock`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/products/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchProductMinimalStockDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -417,31 +330,15 @@ export class ProductsService extends BaseService {
/**
* @endpoint put /API/products/{id}
* @param id
* @param updateProductDto
* @param id
* @param updateProductDto
* @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 updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -481,25 +382,17 @@ export class ProductsService extends BaseService {
}
}
let localVarPath = `/API/products/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/products/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateProductDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+143 -333
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,68 +9,52 @@
*/
/* 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';
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 {CreatePurchaseOrderDto} from '../model/create-purchase-order-dto';
import { CreatePurchaseOrderDto } from '../model/create-purchase-order-dto';
// @ts-ignore
import {CreatePurchaseProductDto} from '../model/create-purchase-product-dto';
import { CreatePurchaseProductDto } from '../model/create-purchase-product-dto';
// @ts-ignore
import {GetPurchaseOrderDto} from '../model/get-purchase-order-dto';
import { GetPurchaseOrderDto } from '../model/get-purchase-order-dto';
// @ts-ignore
import {PatchPurchaseOrderPurchaseConditionsDto} from '../model/patch-purchase-order-purchase-conditions-dto';
import { PatchPurchaseOrderPurchaseConditionsDto } from '../model/patch-purchase-order-purchase-conditions-dto';
// @ts-ignore
import {PatchPurchaseProductQuantityDto} from '../model/patch-purchase-product-quantity-dto';
import { PatchPurchaseProductQuantityDto } from '../model/patch-purchase-product-quantity-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/purchaseOrders/{purchaseOrderId}/{productId}
* @param purchaseOrderId
* @param productId
* @param createPurchaseProductDto
* @param purchaseOrderId
* @param productId
* @param createPurchaseProductDto
* @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 addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -113,33 +101,17 @@ export class PurchaseordersService extends BaseService {
}
}
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"
})}`;
const {basePath, withCredentials} = this.configuration;
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"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPurchaseProductDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -147,37 +119,26 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint post /API/purchaseOrders
* @param createPurchaseOrderDto
* @param createPurchaseOrderDto
* @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 createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<GetPurchaseOrderDto>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<GetPurchaseOrderDto>>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<GetPurchaseOrderDto>>;
public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createPurchaseOrderDto === null || createPurchaseOrderDto === undefined) {
throw new Error('Required parameter createPurchaseOrderDto was null or undefined when calling createPurchaseOrder.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -208,16 +169,16 @@ export class PurchaseordersService extends BaseService {
}
let localVarPath = `/API/purchaseOrders`;
const {basePath, withCredentials} = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetPurchaseOrderDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPurchaseOrderDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -225,31 +186,15 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint delete /API/purchaseOrders/{productId}/{purchaseOrderId}
* @param productId
* @param purchaseOrderId
* @param productId
* @param purchaseOrderId
* @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 deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -280,32 +229,16 @@ export class PurchaseordersService extends BaseService {
}
}
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"
})}`;
const {basePath, withCredentials} = this.configuration;
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"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -313,37 +246,25 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint delete /API/purchaseOrders/{id}
* @param 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 deletePurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deletePurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling deletePurchaseOrderEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -364,24 +285,16 @@ export class PurchaseordersService extends BaseService {
}
}
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllPurchaseOrderEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllPurchaseOrderEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -439,15 +339,15 @@ export class PurchaseordersService extends BaseService {
}
let localVarPath = `/API/purchaseOrders`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetPurchaseOrderDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -455,36 +355,23 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint get /API/purchaseOrders/{id}
* @param 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 getPurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getPurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderEndpoint.');
}
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'
]);
@@ -508,24 +395,16 @@ export class PurchaseordersService extends BaseService {
}
}
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/purchaseOrders/${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<GetPurchaseOrderDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -533,36 +412,23 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint get /API/purchaseOrders/{id}/pdf
* @param 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 getPurchaseOrderPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getPurchaseOrderPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderPdfEndpoint.');
}
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/pdf'
]);
@@ -575,24 +441,16 @@ export class PurchaseordersService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
responseType: "blob",
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -600,31 +458,15 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint patch /API/purchaseOrders/{id}/PurchaseConditions
* @param id
* @param patchPurchaseOrderPurchaseConditionsDto
* @param id
* @param patchPurchaseOrderPurchaseConditionsDto
* @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 patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -664,25 +510,17 @@ export class PurchaseordersService extends BaseService {
}
}
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/PurchaseConditions`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/purchaseOrders/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchPurchaseOrderPurchaseConditionsDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -690,32 +528,16 @@ export class PurchaseordersService extends BaseService {
/**
* @endpoint patch /API/purchaseOrders/{productId}/{purchaseOrderId}/Quantity
* @param productId
* @param purchaseOrderId
* @param patchPurchaseProductQuantityDto
* @param productId
* @param purchaseOrderId
* @param patchPurchaseProductQuantityDto
* @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 patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -758,33 +584,17 @@ export class PurchaseordersService extends BaseService {
}
}
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`;
const {basePath, withCredentials} = this.configuration;
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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: patchPurchaseProductQuantityDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+172 -395
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,71 +9,55 @@
*/
/* 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';
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 {AddQuotationProductDto} from '../model/add-quotation-product-dto';
import { AddQuotationProductDto } from '../model/add-quotation-product-dto';
// @ts-ignore
import {CreateQuotationDto} from '../model/create-quotation-dto';
import { CreateQuotationDto } from '../model/create-quotation-dto';
// @ts-ignore
import {GetQuotationDto} from '../model/get-quotation-dto';
import { GetQuotationDto } from '../model/get-quotation-dto';
// @ts-ignore
import {PatchQuotationConditionsSaleDto} from '../model/patch-quotation-conditions-sale-dto';
import { PatchQuotationConditionsSaleDto } from '../model/patch-quotation-conditions-sale-dto';
// @ts-ignore
import {PatchQuotationMessageDto} from '../model/patch-quotation-message-dto';
import { PatchQuotationMessageDto } from '../model/patch-quotation-message-dto';
// @ts-ignore
import {PatchQuotationProductQuantityDto} from '../model/patch-quotation-product-quantity-dto';
import { PatchQuotationProductQuantityDto } from '../model/patch-quotation-product-quantity-dto';
// @ts-ignore
import {UpdateQuotationDto} from '../model/update-quotation-dto';
import { UpdateQuotationDto } from '../model/update-quotation-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/quotations/{productId}/products
* @param productId
* @param addQuotationProductDto
* @param productId
* @param addQuotationProductDto
* @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 addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -113,25 +101,17 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/products`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "productId", 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}`,
{
context: localVarHttpContext,
body: addQuotationProductDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -139,37 +119,25 @@ export class QuotationsService extends BaseService {
/**
* @endpoint post /API/quotations
* @param createQuotationDto
* @param createQuotationDto
* @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 createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter createQuotationDto was null or undefined when calling createQuotationEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -200,16 +168,16 @@ export class QuotationsService extends BaseService {
}
let localVarPath = `/API/quotations`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createQuotationDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -217,31 +185,15 @@ export class QuotationsService extends BaseService {
/**
* @endpoint delete /API/quotations/{productId}/{quotationId}
* @param productId
* @param quotationId
* @param productId
* @param quotationId
* @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 deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -272,32 +228,16 @@ export class QuotationsService extends BaseService {
}
}
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"
})}`;
const {basePath, withCredentials} = this.configuration;
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"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -305,37 +245,25 @@ export class QuotationsService extends BaseService {
/**
* @endpoint delete /API/quotations/{id}
* @param 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 deleteQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling deleteQuotationEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -356,24 +284,16 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllQuotationEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllQuotationEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -431,15 +338,15 @@ export class QuotationsService extends BaseService {
}
let localVarPath = `/API/quotations`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetQuotationDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -447,36 +354,23 @@ export class QuotationsService extends BaseService {
/**
* @endpoint get /API/quotations/{id}
* @param 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 getQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getQuotationEndpoint.');
}
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'
]);
@@ -500,24 +394,16 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${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<GetQuotationDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -525,36 +411,23 @@ export class QuotationsService extends BaseService {
/**
* @endpoint get /API/quotations/{id}/pdf
* @param 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 getQuotationPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/pdf',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getQuotationPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getQuotationPdfEndpoint.');
}
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/pdf'
]);
@@ -567,24 +440,16 @@ export class QuotationsService extends BaseService {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/pdf`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
responseType: "blob",
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -592,31 +457,15 @@ export class QuotationsService extends BaseService {
/**
* @endpoint patch /API/quotations/{id}/saleConditions
* @param id
* @param patchQuotationConditionsSaleDto
* @param id
* @param patchQuotationConditionsSaleDto
* @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 patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -656,25 +509,17 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/saleConditions`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchQuotationConditionsSaleDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -682,31 +527,15 @@ export class QuotationsService extends BaseService {
/**
* @endpoint patch /API/quotations/{id}/message
* @param id
* @param patchQuotationMessageDto
* @param id
* @param patchQuotationMessageDto
* @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 patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -746,25 +579,17 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/message`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchQuotationMessageDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -772,32 +597,16 @@ export class QuotationsService extends BaseService {
/**
* @endpoint patch /API/quotations/{productId}/{quotationId}/Quantity
* @param productId
* @param quotationId
* @param patchQuotationProductQuantityDto
* @param productId
* @param quotationId
* @param patchQuotationProductQuantityDto
* @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 patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -840,33 +653,17 @@ export class QuotationsService extends BaseService {
}
}
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`;
const {basePath, withCredentials} = this.configuration;
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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: patchQuotationProductQuantityDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -874,31 +671,15 @@ export class QuotationsService extends BaseService {
/**
* @endpoint put /API/quotations/{id}
* @param id
* @param updateQuotationDto
* @param id
* @param updateQuotationDto
* @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 updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -938,25 +723,17 @@ export class QuotationsService extends BaseService {
}
}
let localVarPath = `/API/quotations/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/quotations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateQuotationDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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
}
);
}
}
+50 -87
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,29 +9,29 @@
*/
/* 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';
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 {GetSettingDto} from '../model/get-setting-dto';
import { GetSettingDto } from '../model/get-setting-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
@@ -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 reportProgress flag to report request and response progress.
*/
public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -87,15 +74,15 @@ export class SettingsService extends BaseService {
}
let localVarPath = `/API/settings`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetSettingDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -103,34 +90,22 @@ export class SettingsService extends BaseService {
/**
* @endpoint patch /API/settings/electronicSignature
* @param electronicSignature
* @param electronicSignature
* @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 patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -174,16 +149,16 @@ export class SettingsService extends BaseService {
}
let localVarPath = `/API/settings/electronicSignature`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -191,34 +166,22 @@ export class SettingsService extends BaseService {
/**
* @endpoint patch /API/settings/logo
* @param logo
* @param logo
* @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 patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -262,16 +225,16 @@ export class SettingsService extends BaseService {
}
let localVarPath = `/API/settings/logo`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+128 -290
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,68 +9,52 @@
*/
/* 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';
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 {CreatePriceDto} from '../model/create-price-dto';
import { CreatePriceDto } from '../model/create-price-dto';
// @ts-ignore
import {CreateSupplierDto} from '../model/create-supplier-dto';
import { CreateSupplierDto } from '../model/create-supplier-dto';
// @ts-ignore
import {GetSupplierDto} from '../model/get-supplier-dto';
import { GetSupplierDto } from '../model/get-supplier-dto';
// @ts-ignore
import {PatchSupplierDeliveryDelayDto} from '../model/patch-supplier-delivery-delay-dto';
import { PatchSupplierDeliveryDelayDto } from '../model/patch-supplier-delivery-delay-dto';
// @ts-ignore
import {UpdateSupplierDto} from '../model/update-supplier-dto';
import { UpdateSupplierDto } from '../model/update-supplier-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/suppliers/{supplierId}/{productId}
* @param supplierId
* @param productId
* @param createPriceDto
* @param supplierId
* @param productId
* @param createPriceDto
* @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 addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -113,33 +101,17 @@ export class SuppliersService extends BaseService {
}
}
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"
})}`;
const {basePath, withCredentials} = this.configuration;
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"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPriceDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -147,37 +119,25 @@ export class SuppliersService extends BaseService {
/**
* @endpoint post /API/suppliers
* @param createSupplierDto
* @param createSupplierDto
* @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 createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter createSupplierDto was null or undefined when calling createSupplierEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -208,16 +168,16 @@ export class SuppliersService extends BaseService {
}
let localVarPath = `/API/suppliers`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createSupplierDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -225,31 +185,15 @@ export class SuppliersService extends BaseService {
/**
* @endpoint delete /API/suppliers/{supplierId}/{productId}
* @param supplierId
* @param productId
* @param supplierId
* @param productId
* @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 deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -280,32 +228,16 @@ export class SuppliersService extends BaseService {
}
}
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"
})}`;
const {basePath, withCredentials} = this.configuration;
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"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -313,37 +245,25 @@ export class SuppliersService extends BaseService {
/**
* @endpoint delete /API/suppliers/{id}
* @param 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 deleteSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling deleteSupplierEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -364,24 +284,16 @@ export class SuppliersService extends BaseService {
}
}
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllSuppliersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllSuppliersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -439,15 +338,15 @@ export class SuppliersService extends BaseService {
}
let localVarPath = `/API/suppliers`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetSupplierDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -455,36 +354,23 @@ export class SuppliersService extends BaseService {
/**
* @endpoint get /API/suppliers/{id}
* @param 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 getSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling getSupplierEndpoint.');
}
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'
]);
@@ -508,24 +394,16 @@ export class SuppliersService extends BaseService {
}
}
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/suppliers/${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<GetSupplierDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -533,31 +411,15 @@ export class SuppliersService extends BaseService {
/**
* @endpoint patch /API/suppliers/{id}/deliveryDelay
* @param id
* @param patchSupplierDeliveryDelayDto
* @param id
* @param patchSupplierDeliveryDelayDto
* @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 patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -597,25 +463,17 @@ export class SuppliersService extends BaseService {
}
}
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/deliveryDelay`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchSupplierDeliveryDelayDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -623,31 +481,15 @@ export class SuppliersService extends BaseService {
/**
* @endpoint put /API/suppliers/{id}
* @param id
* @param updateSupplierDto
* @param id
* @param updateSupplierDto
* @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 updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
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;
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -687,25 +533,17 @@ export class SuppliersService extends BaseService {
}
}
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/suppliers/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateSupplierDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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
}
);
}
}
+88 -270
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,68 +9,52 @@
*/
/* 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';
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 {ConnectUserDto} from '../model/connect-user-dto';
import { ConnectUserDto } from '../model/connect-user-dto';
// @ts-ignore
import {CreateUserDto} from '../model/create-user-dto';
import { CreateUserDto } from '../model/create-user-dto';
// @ts-ignore
import {GetTokenDto} from '../model/get-token-dto';
import { GetTokenDto } from '../model/get-token-dto';
// @ts-ignore
import {GetUserDto} from '../model/get-user-dto';
import { GetUserDto } from '../model/get-user-dto';
// @ts-ignore
import {PatchUserPasswordDto} from '../model/patch-user-password-dto';
import { PatchUserPasswordDto } from '../model/patch-user-password-dto';
// @ts-ignore
import {UpdateUserDto} from '../model/update-user-dto';
import { UpdateUserDto } from '../model/update-user-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint post /API/users/connection
* @param connectUserDto
* @param connectUserDto
* @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 connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
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`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetTokenDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: connectUserDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -127,36 +111,23 @@ export class UsersService extends BaseService {
/**
* @endpoint post /API/users
* @param createUserDto
* @param createUserDto
* @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 createUserEndpoint(createUserDto: CreateUserDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter createUserDto was null or undefined when calling createUserEndpoint.');
}
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'
]);
@@ -190,16 +161,16 @@ export class UsersService extends BaseService {
}
let localVarPath = `/API/users`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetUserDto>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createUserDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -207,37 +178,25 @@ export class UsersService extends BaseService {
/**
* @endpoint delete /API/users/{id}
* @param 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 deleteUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: undefined,
context?: HttpContext,
transferCache?: boolean
}): 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> {
public deleteUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter id was null or undefined when calling deleteUserEndpoint.');
}
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) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
@@ -258,24 +217,16 @@ export class UsersService extends BaseService {
}
}
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;
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<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
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 reportProgress flag to report request and response progress.
*/
public getAllUsersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllUsersEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -333,93 +271,15 @@ export class UsersService extends BaseService {
}
let localVarPath = `/API/users`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetUserDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(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} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -427,31 +287,15 @@ export class UsersService extends BaseService {
/**
* @endpoint patch /API/users/{id}/password
* @param id
* @param patchUserPasswordDto
* @param id
* @param patchUserPasswordDto
* @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 patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -493,25 +340,17 @@ export class UsersService extends BaseService {
}
}
let localVarPath = `/API/users/${this.configuration.encodeParam({
name: "id",
value: id,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}/password`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/users/${this.configuration.encodeParam({name: "id", 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}`,
{
context: localVarHttpContext,
body: patchUserPasswordDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -519,31 +358,15 @@ export class UsersService extends BaseService {
/**
* @endpoint put /API/users/{id}
* @param id
* @param updateUserDto
* @param id
* @param updateUserDto
* @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 updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -585,25 +411,17 @@ export class UsersService extends BaseService {
}
}
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;
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>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateUserDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,68 +9,55 @@
*/
/* 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';
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 {GetTotalQuantityDto} from '../model/get-total-quantity-dto';
import { GetTotalQuantityDto } from '../model/get-total-quantity-dto';
// @ts-ignore
import {GetWareHouseProductDto} from '../model/get-ware-house-product-dto';
import { GetWareHouseProductDto } from '../model/get-ware-house-product-dto';
// @ts-ignore
import {PatchWareHouseProductQuantityDto} from '../model/patch-ware-house-product-quantity-dto';
import { PatchWareHouseProductQuantityDto } from '../model/patch-ware-house-product-quantity-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
/**
* @endpoint get /API/wareHouseProducts/{productId}
* @param productId
* @param productId
* @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 getTotalQuantityEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getTotalQuantityEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
throw new Error('Required parameter productId was null or undefined when calling getTotalQuantityEndpoint.');
}
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'
]);
@@ -94,24 +81,16 @@ export class WarehouseproductsService extends BaseService {
}
}
let localVarPath = `/API/wareHouseProducts/${this.configuration.encodeParam({
name: "productId",
value: productId,
in: "path",
style: "simple",
explode: false,
dataType: "number",
dataFormat: "int32"
})}`;
const {basePath, withCredentials} = this.configuration;
let localVarPath = `/API/wareHouseProducts/${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<GetTotalQuantityDto>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
@@ -119,32 +98,16 @@ export class WarehouseproductsService extends BaseService {
/**
* @endpoint patch /API/wareHouseProducts/{productId}/{wareHouseId}/quantity
* @param productId
* @param wareHouseId
* @param patchWareHouseProductQuantityDto
* @param productId
* @param wareHouseId
* @param patchWareHouseProductQuantityDto
* @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 patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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) {
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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -189,33 +155,17 @@ export class WarehouseproductsService extends BaseService {
}
}
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`;
const {basePath, withCredentials} = this.configuration;
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`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<GetWareHouseProductDto>('patch', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: patchWareHouseProductQuantityDto,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+24 -37
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,29 +9,29 @@
*/
/* 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';
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 {GetWareHouseDto} from '../model/get-ware-house-dto';
import { GetWareHouseDto } from '../model/get-ware-house-dto';
// @ts-ignore
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
import {Configuration} from '../configuration';
import {BaseService} from '../api.base.service';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
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);
}
@@ -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 reportProgress flag to report request and response progress.
*/
public getAllWarehouseEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json',
context?: HttpContext,
transferCache?: boolean
}): 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> {
public getAllWarehouseEndpoint(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): 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;
// authentication (JWTBearerAuth) required
localVarHeaders = this.configuration.addCredentialToHeaders('JWTBearerAuth', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
@@ -87,15 +74,15 @@ export class WarehousesService extends BaseService {
}
let localVarPath = `/API/wareHouses`;
const {basePath, withCredentials} = this.configuration;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<GetWareHouseDto>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? {withCredentials} : {}),
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
+8 -18
View File
@@ -1,11 +1,11 @@
import {HttpHeaders, HttpParams, HttpParameterCodec} from '@angular/common/http';
import {Param} from './param';
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
export interface ConfigurationParameters {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: { [key: string]: string };
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
@@ -31,14 +31,14 @@ export interface ConfigurationParameters {
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials?: { [key: string]: string | (() => string | undefined) };
credentials?: {[ key: string ]: string | (() => string | undefined)};
}
export class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: { [key: string]: string };
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
@@ -64,19 +64,9 @@ export class Configuration {
* document. They should map to the value used for authentication
* minus any standard prefixes such as 'Basic' or 'Bearer'.
*/
credentials: { [key: string]: string | (() => string | undefined) };
credentials: {[ key: string ]: string | (() => string | undefined)};
constructor({
accessToken,
apiKeys,
basePath,
credentials,
encodeParam,
encoder,
password,
username,
withCredentials
}: ConfigurationParameters = {}) {
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
if (apiKeys) {
this.apiKeys = apiKeys;
}
@@ -118,7 +108,7 @@ export class Configuration {
* @param contentTypes - the array of content types that are available for selection
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
*/
public selectHeaderContentType(contentTypes: string[]): string | undefined {
public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length === 0) {
return undefined;
}
+1 -4
View File
@@ -1,4 +1,4 @@
import {HttpParameterCodec} from '@angular/common/http';
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
@@ -8,15 +8,12 @@ export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);
}
encodeValue(v: string): string {
return encodeURIComponent(v);
}
decodeKey(k: string): string {
return decodeURIComponent(k);
}
decodeValue(v: string): string {
return decodeURIComponent(v);
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface AddQuotationProductDto {
export interface AddQuotationProductDto {
quantity?: number;
quotationId?: number;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface ConnectUserDto {
export interface ConnectUserDto {
name?: string | null;
password?: string | null;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreateDelivererDto {
export interface CreateDelivererDto {
transporter?: string | null;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreateDeliveryNoteDto {
export interface CreateDeliveryNoteDto {
trackingNumber?: string | null;
delivererId?: number;
supplierId?: number;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreatePriceDto {
export interface CreatePriceDto {
sellingPrice?: number;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreateProductQuotationDto {
export interface CreateProductQuotationDto {
productId?: number;
quantity?: number;
}
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {CreatePurchaseOrderProductDto} from './create-purchase-order-product-dto';
import { CreatePurchaseOrderProductDto } from './create-purchase-order-product-dto';
export interface CreatePurchaseOrderDto {
export interface CreatePurchaseOrderDto {
purchaseConditions?: string | null;
supplierId?: number;
products?: Array<CreatePurchaseOrderProductDto> | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreatePurchaseOrderProductDto {
export interface CreatePurchaseOrderProductDto {
productId?: number;
quantity?: number;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreatePurchaseProductDto {
export interface CreatePurchaseProductDto {
quantity?: number;
}
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {CreateProductQuotationDto} from './create-product-quotation-dto';
import { CreateProductQuotationDto } from './create-product-quotation-dto';
export interface CreateQuotationDto {
export interface CreateQuotationDto {
message?: string | null;
conditionsSale?: string | null;
customerId?: number;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreateSupplierDto {
export interface CreateSupplierDto {
name?: string | null;
email?: string | null;
phone?: string | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface CreateUserDto {
export interface CreateUserDto {
name?: string | null;
password?: string | null;
fonction?: string | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetCustomerDto {
export interface GetCustomerDto {
id?: number;
note?: string | null;
}
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {GetDeliveryNoteDto} from './get-delivery-note-dto';
import { GetDeliveryNoteDto } from './get-delivery-note-dto';
export interface GetDelivererDto {
export interface GetDelivererDto {
id?: number;
transporter?: string | null;
deliveryNotes?: Array<GetDeliveryNoteDto> | null;
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {GetProductDeliveryDto} from './get-product-delivery-dto';
import { GetProductDeliveryDto } from './get-product-delivery-dto';
export interface GetDeliveryNoteDto {
export interface GetDeliveryNoteDto {
id?: number;
trackingNumber?: string | null;
estimateDeliveryDate?: string;
+2 -2
View File
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetPriceDto {
export interface GetPriceDto {
sellingPrice?: number;
productId?: number;
productReference?: string | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetProductDeliveryDto {
export interface GetProductDeliveryDto {
productId?: number;
productReference?: string | null;
productName?: string | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetProductDto {
export interface GetProductDto {
id?: number;
references?: string | null;
name?: string | null;
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {GetPurchaseProductDto} from './get-purchase-product-dto';
import { GetPurchaseProductDto } from './get-purchase-product-dto';
export interface GetPurchaseOrderDto {
export interface GetPurchaseOrderDto {
id?: number;
purchaseConditions?: string | null;
supplierId?: number;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetPurchaseProductDto {
export interface GetPurchaseProductDto {
productId?: number;
productReference?: string | null;
productName?: string | null;
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {GetQuotationProductDto} from './get-quotation-product-dto';
import { GetQuotationProductDto } from './get-quotation-product-dto';
export interface GetQuotationDto {
export interface GetQuotationDto {
id?: number;
message?: string | null;
conditionsSale?: string | null;
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetQuotationProductDto {
export interface GetQuotationProductDto {
quantity?: number;
productId?: number;
productReference?: string | null;
@@ -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;
}
@@ -1,7 +1,7 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,7 +9,7 @@
*/
export interface GetSettingDto {
export interface GetSettingDto {
id?: number;
electronicSignature?: string | null;
logo?: string | null;
@@ -1,16 +1,16 @@
/**
* PyroFetes
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import {GetPriceDto} from './get-price-dto';
import { GetPriceDto } from './get-price-dto';
export interface GetSupplierDto {
export interface GetSupplierDto {
id?: number;
name?: string | null;
email?: string | null;

Some files were not shown because too many files have changed in this diff Show More