diff --git a/package-lock.json b/package-lock.json index 488f3a4..ce8b605 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@angular/build": "^20.3.9", "@angular/cli": "^20.3.9", "@angular/compiler-cli": "^20.3.0", + "baseline-browser-mapping": "^2.10.32", "less": "^4.2.0", "typescript": "~5.9.2" } @@ -4315,13 +4316,16 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.27", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.27.tgz", - "integrity": "sha512-2CXFpkjVnY2FT+B6GrSYxzYf65BJWEqz5tIRHCvNsZZ2F3CmsCB37h8SpYgKG7y9C4YAeTipIPWG7EmFmhAeXA==", + "version": "2.10.32", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.32.tgz", + "integrity": "sha512-wbPvpyjJPC0zdfdKXxqEL3Ea+bOMD/87X4lftiJkkaBiuG6ALQy1SLmEd7BSmVCuwCQsBrCamgBoLyfFDD1EPg==", "dev": true, "license": "Apache-2.0", "bin": { - "baseline-browser-mapping": "dist/cli.js" + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" } }, "node_modules/basic-ftp": { diff --git a/package.json b/package.json index 8328499..5b9e439 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "openapi": "rm -rf src/app/services/api && openapi-generator-cli generate -i http://localhost:5298/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml", - "openapiWin": "set JAVA_TOOL_OPTIONS=-Dcom.sun.net.ssl.checkRevocation=false -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT && openapi-generator-cli generate -i https://localhost:44379/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml\n" + "openapi": "rimraf src/app/services/api && openapi-generator-cli generate -i http://localhost:5298/swagger/v1/swagger.json -g typescript-angular -o src/app/services/api -c openapi-generator.yaml" }, "prettier": { "printWidth": 100, @@ -43,6 +42,7 @@ "@angular/build": "^20.3.9", "@angular/cli": "^20.3.9", "@angular/compiler-cli": "^20.3.0", + "baseline-browser-mapping": "^2.10.32", "less": "^4.2.0", "typescript": "~5.9.2" } diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 010986a..ee8ef76 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,19 +1,19 @@ -import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import {ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection} from '@angular/core'; +import {provideRouter} from '@angular/router'; -import { routes } from './app.routes'; -import { fr_FR, provideNzI18n } from 'ng-zorro-antd/i18n'; -import { registerLocaleData } from '@angular/common'; +import {routes} from './app.routes'; +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 {provideAnimationsAsync} from '@angular/platform-browser/animations/async'; +import {provideHttpClient} from '@angular/common/http'; registerLocaleData(fr); export const appConfig: ApplicationConfig = { - providers: [ - provideBrowserGlobalErrorListeners(), - provideZoneChangeDetection({ eventCoalescing: true }), - provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient() - ] + providers: [ + provideBrowserGlobalErrorListeners(), + provideZoneChangeDetection({eventCoalescing: true}), + provideRouter(routes), provideNzI18n(fr_FR), provideAnimationsAsync(), provideHttpClient() + ] }; diff --git a/src/app/app.html b/src/app/app.html index 413ed55..9087561 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -5,9 +5,9 @@ diff --git a/src/app/components/supplier-table/supplier-table.ts b/src/app/components/supplier-table/supplier-table.ts index fbf55ca..a60b085 100644 --- a/src/app/components/supplier-table/supplier-table.ts +++ b/src/app/components/supplier-table/supplier-table.ts @@ -96,12 +96,12 @@ export class SupplierTable implements OnInit { } openEditModal(supplier: GetSupplierDto) { - this.selectedSupplier = { ...supplier }; + this.selectedSupplier = {...supplier}; this.supplierModal().showModal(); } openEditProductModal(product: GetPriceDto, supplierId: number) { - this.selectedProduct = { ...product }; + this.selectedProduct = {...product}; this.selectedProductSupplierId = supplierId; this.productModal().showModal(); } diff --git a/src/app/components/user-table/user-table.css b/src/app/components/user-table/user-table.css index 7ae664f..c804da2 100644 --- a/src/app/components/user-table/user-table.css +++ b/src/app/components/user-table/user-table.css @@ -6,7 +6,7 @@ nz-table { background: #fff; border-radius: 8px; overflow: hidden; - box-shadow: 0 2px 6px rgba(0,0,0,0.1); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } @@ -66,18 +66,21 @@ nz-table tbody td p { nz-table thead { display: none; } + nz-table tbody tr { display: block; margin-bottom: 16px; - box-shadow: 0 1px 3px rgba(0,0,0,0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border-radius: 8px; padding: 12px; } + nz-table tbody td { display: flex; justify-content: space-between; padding: 6px 12px; } + nz-table tbody td::before { content: attr(data-label); font-weight: 600; diff --git a/src/app/components/user-table/user-table.html b/src/app/components/user-table/user-table.html index 074759b..dfbccb2 100644 --- a/src/app/components/user-table/user-table.html +++ b/src/app/components/user-table/user-table.html @@ -2,7 +2,7 @@ [nzLoading]="usersLoading()" [nzFrontPagination]="false" class="mr-7"> - + Prénom Email @@ -13,15 +13,17 @@ @for (user of users(); track user.id) { - {{user.name}} - {{user.email}} - {{user.fonction}} + {{ user.name }} + {{ user.email }} + {{ user.fonction }}
- +
- +
@@ -31,7 +33,8 @@ diff --git a/src/app/components/user-table/user-table.ts b/src/app/components/user-table/user-table.ts index 4c24792..1ec91b0 100644 --- a/src/app/components/user-table/user-table.ts +++ b/src/app/components/user-table/user-table.ts @@ -9,7 +9,7 @@ import {NzNotificationService} from "ng-zorro-antd/notification"; import {firstValueFrom} from "rxjs"; @Component({ - selector: 'app-user-table', + selector: 'app-user-table', imports: [ ModalNav, NzIconDirective, @@ -17,8 +17,8 @@ import {firstValueFrom} from "rxjs"; ProfilForm, NzDividerComponent ], - templateUrl: './user-table.html', - styleUrl: './user-table.css', + templateUrl: './user-table.html', + styleUrl: './user-table.css', }) export class UserTable implements OnInit { private usersService = inject(UsersService); @@ -47,7 +47,7 @@ export class UserTable implements OnInit { this.usersLoading.set(false) } - async delete(user:number) { + async delete(user: number) { try { await firstValueFrom(this.usersService.deleteUserEndpoint(user)) this.notificationService.success( @@ -89,8 +89,9 @@ export class UserTable implements OnInit { } selectedUser: GetUserDto | null = null; + openEditModal(user: GetUserDto) { - this.selectedUser = { ...user }; + this.selectedUser = {...user}; this.modal().showModal(); } @@ -102,9 +103,11 @@ export class UserTable implements OnInit { modal.isVisible = false; await this.fetchUsers(); } + onModalCancel(modal: ModalNav) { modal.isVisible = false; } + filterUser(input: string, option: any) { return option.nzLabel.toLowerCase().includes(input.toLowerCase()); } diff --git a/src/app/interfaces/notif.interface.ts b/src/app/interfaces/notif.interface.ts deleted file mode 100644 index ff5ce4f..0000000 --- a/src/app/interfaces/notif.interface.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface NotifInfo { - author: string; - title: string; - content: string; -} \ No newline at end of file diff --git a/src/app/pages/deliverer/deliverer.ts b/src/app/pages/deliverer/deliverer.ts index 2aba356..e2baf31 100644 --- a/src/app/pages/deliverer/deliverer.ts +++ b/src/app/pages/deliverer/deliverer.ts @@ -8,15 +8,15 @@ import {NzNotificationService} from "ng-zorro-antd/notification"; import {firstValueFrom} from "rxjs"; @Component({ - selector: 'app-deliverer', + selector: 'app-deliverer', imports: [ ModalButton, DelivererTable, DelivererForm, Search ], - templateUrl: './deliverer.html', - styleUrl: './deliverer.css', + templateUrl: './deliverer.html', + styleUrl: './deliverer.css', }) export class Deliverer { modal = viewChild.required('modalButton'); @@ -37,8 +37,7 @@ export class Deliverer { } async addDeliverer() { - if (this.createDeliverer().delivererForm.invalid) - { + if (this.createDeliverer().delivererForm.invalid) { this.notificationService.error( 'Erreur', 'Erreur d\'écriture dans le formulaire' diff --git a/src/app/pages/delivery-note/delivery-note.ts b/src/app/pages/delivery-note/delivery-note.ts index 26e00a0..df0ca0b 100644 --- a/src/app/pages/delivery-note/delivery-note.ts +++ b/src/app/pages/delivery-note/delivery-note.ts @@ -1,17 +1,17 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; import {DelivereryNoteTable} from "../../components/deliverery-note-table/deliverery-note-table"; import {ModalButton} from "../../components/modal-button/modal-button"; import {DelivereryNoteForm} from "../../components/deliverery-note-form/deliverery-note-form"; import {Search} from "../../components/search/search"; @Component({ - selector: 'app-delivery-note', + selector: 'app-delivery-note', imports: [ DelivereryNoteTable, Search ], - templateUrl: './delivery-note.html', - styleUrl: './delivery-note.css', + templateUrl: './delivery-note.html', + styleUrl: './delivery-note.css', }) export class DeliveryNote { diff --git a/src/app/pages/purchase-order/purchase-order.ts b/src/app/pages/purchase-order/purchase-order.ts index cdfd85b..c8f63bf 100644 --- a/src/app/pages/purchase-order/purchase-order.ts +++ b/src/app/pages/purchase-order/purchase-order.ts @@ -1,15 +1,15 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; import {Search} from "../../components/search/search"; import {PurchaseOrderTable} from "../../components/purchase-order-table/purchase-order-table"; @Component({ - selector: 'app-purchase-order', + selector: 'app-purchase-order', imports: [ Search, PurchaseOrderTable, ], - templateUrl: './purchase-order.html', - styleUrl: './purchase-order.css', + templateUrl: './purchase-order.html', + styleUrl: './purchase-order.css', }) export class PurchaseOrder { diff --git a/src/app/pages/quotation/quotation.ts b/src/app/pages/quotation/quotation.ts index 02508f9..07ba09c 100644 --- a/src/app/pages/quotation/quotation.ts +++ b/src/app/pages/quotation/quotation.ts @@ -1,15 +1,15 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; import {Search} from "../../components/search/search"; import {QuotationTable} from "../../components/quotation-table/quotation-table"; @Component({ - selector: 'app-quotation', + selector: 'app-quotation', imports: [ Search, QuotationTable ], - templateUrl: './quotation.html', - styleUrl: './quotation.css', + templateUrl: './quotation.html', + styleUrl: './quotation.css', }) export class Quotation { diff --git a/src/app/pages/stock/stock.ts b/src/app/pages/stock/stock.ts index 4b53257..0a0096b 100644 --- a/src/app/pages/stock/stock.ts +++ b/src/app/pages/stock/stock.ts @@ -10,7 +10,7 @@ import {CreatePurchaseorderForm} from "../../components/create-purchaseorder-for import {CreateQuotationForm} from "../../components/create-quotation-form/create-quotation-form"; @Component({ - selector: 'app-stock', + selector: 'app-stock', imports: [ StockTable, Search, @@ -18,8 +18,8 @@ import {CreateQuotationForm} from "../../components/create-quotation-form/create CreatePurchaseorderForm, CreateQuotationForm, ], - templateUrl: './stock.html', - styleUrl: './stock.css', + templateUrl: './stock.html', + styleUrl: './stock.css', }) export class Stock { diff --git a/src/app/pages/supplier/supplier.ts b/src/app/pages/supplier/supplier.ts index 858ddd8..0f8e443 100644 --- a/src/app/pages/supplier/supplier.ts +++ b/src/app/pages/supplier/supplier.ts @@ -8,15 +8,15 @@ import {NzNotificationService} from "ng-zorro-antd/notification"; import {firstValueFrom} from "rxjs"; @Component({ - selector: 'app-supplier', + selector: 'app-supplier', imports: [ Search, SupplierForm, SupplierTable, ModalButton ], - templateUrl: './supplier.html', - styleUrl: './supplier.css', + templateUrl: './supplier.html', + styleUrl: './supplier.css', }) export class Supplier { modal = viewChild.required('modalButton'); @@ -41,8 +41,7 @@ export class Supplier { } async addSupplier() { - if (this.createSupplier().supplierForm.invalid) - { + if (this.createSupplier().supplierForm.invalid) { this.notificationService.error( 'Erreur', 'Erreur d\'écriture dans le formulaire' diff --git a/src/app/pages/user/user.ts b/src/app/pages/user/user.ts index 9e09149..7b74ff6 100644 --- a/src/app/pages/user/user.ts +++ b/src/app/pages/user/user.ts @@ -8,15 +8,15 @@ import {NzNotificationService} from "ng-zorro-antd/notification"; import {firstValueFrom} from "rxjs"; @Component({ - selector: 'app-user', + selector: 'app-user', imports: [ UserTable, ModalButton, ProfilForm, Search ], - templateUrl: './user.html', - styleUrl: './user.css', + templateUrl: './user.html', + styleUrl: './user.css', }) export class User { modal = viewChild.required('modalButton'); @@ -37,8 +37,7 @@ export class User { } async addUser() { - if (this.createUser().profilForm.invalid) - { + if (this.createUser().profilForm.invalid) { this.notificationService.error( 'Erreur', 'Erreur d\'écriture dans le formulaire' diff --git a/src/app/pages/welcome/welcome.html b/src/app/pages/welcome/welcome.html index 9155041..9e9695c 100644 --- a/src/app/pages/welcome/welcome.html +++ b/src/app/pages/welcome/welcome.html @@ -1,8 +1,10 @@
- + - +
diff --git a/src/app/pages/welcome/welcome.routes.ts b/src/app/pages/welcome/welcome.routes.ts index b1857b5..5e0f846 100644 --- a/src/app/pages/welcome/welcome.routes.ts +++ b/src/app/pages/welcome/welcome.routes.ts @@ -1,6 +1,6 @@ -import { Routes } from '@angular/router'; -import { Welcome } from './welcome'; +import {Routes} from '@angular/router'; +import {Welcome} from './welcome'; export const WELCOME_ROUTES: Routes = [ - { path: '', component: Welcome }, + {path: '', component: Welcome}, ]; diff --git a/src/app/pages/welcome/welcome.ts b/src/app/pages/welcome/welcome.ts index 8d152d6..d73a531 100644 --- a/src/app/pages/welcome/welcome.ts +++ b/src/app/pages/welcome/welcome.ts @@ -1,17 +1,17 @@ -import { Component } from '@angular/core'; +import {Component} from '@angular/core'; import {InfoCard} from "../../components/info-card/info-card"; import {DeliveryValidator} from "../../components/delivery-validator/delivery-validator"; import {InfoTable} from "../../components/info-table/info-table"; @Component({ - selector: 'app-welcome', + selector: 'app-welcome', imports: [ InfoCard, DeliveryValidator, InfoTable, ], - templateUrl: './welcome.html', - styleUrl: './welcome.css' + templateUrl: './welcome.html', + styleUrl: './welcome.css' }) export class Welcome { diff --git a/src/app/services/api/.openapi-generator/FILES b/src/app/services/api/.openapi-generator/FILES index c32abf7..6103f04 100644 --- a/src/app/services/api/.openapi-generator/FILES +++ b/src/app/services/api/.openapi-generator/FILES @@ -1,4 +1,5 @@ .gitignore +.openapi-generator-ignore README.md api.base.service.ts api.module.ts @@ -8,8 +9,6 @@ api/deliverynotes.service.ts api/prices.service.ts api/products.service.ts api/purchaseorders.service.ts -api/purchaseproducts.service.ts -api/quotationproducts.service.ts api/quotations.service.ts api/settings.service.ts api/suppliers.service.ts @@ -19,6 +18,7 @@ configuration.ts encoder.ts git_push.sh index.ts +model/add-quotation-product-dto.ts model/connect-user-dto.ts model/create-deliverer-dto.ts model/create-delivery-note-dto.ts @@ -28,7 +28,6 @@ model/create-purchase-order-dto.ts model/create-purchase-order-product-dto.ts model/create-purchase-product-dto.ts model/create-quotation-dto.ts -model/create-quotation-product-dto.ts model/create-setting-dto.ts model/create-supplier-dto.ts model/create-user-dto.ts @@ -54,6 +53,7 @@ model/patch-product-minimal-stock-dto.ts model/patch-purchase-order-purchase-conditions-dto.ts model/patch-purchase-product-quantity-dto.ts model/patch-quotation-conditions-sale-dto.ts +model/patch-quotation-message-dto.ts model/patch-quotation-product-quantity-dto.ts model/patch-setting-electronic-signature-dto.ts model/patch-setting-logo-dto.ts diff --git a/src/app/services/api/README.md b/src/app/services/api/README.md index c2ba935..29f22fe 100644 --- a/src/app/services/api/README.md +++ b/src/app/services/api/README.md @@ -73,7 +73,9 @@ 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 ''; ``` @@ -181,5 +183,7 @@ 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 diff --git a/src/app/services/api/api.base.service.ts b/src/app/services/api/api.base.service.ts index 34531a6..ed63bc3 100644 --- a/src/app/services/api/api.base.service.ts +++ b/src/app/services/api/api.base.service.ts @@ -1,23 +1,23 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -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 = 'https://localhost:44379'; + protected basePath = 'http://localhost:5298'; public defaultHeaders = new HttpHeaders(); 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; diff --git a/src/app/services/api/api.module.ts b/src/app/services/api/api.module.ts index 58d341f..68ca8d7 100644 --- a/src/app/services/api/api.module.ts +++ b/src/app/services/api/api.module.ts @@ -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 { 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'); } } } diff --git a/src/app/services/api/api/api.ts b/src/app/services/api/api/api.ts index 1fb6648..58e0a7c 100644 --- a/src/app/services/api/api/api.ts +++ b/src/app/services/api/api/api.ts @@ -1,25 +1,31 @@ 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'; -export * from './purchaseproducts.service'; -import { PurchaseproductsService } from './purchaseproducts.service'; -export * from './quotationproducts.service'; -import { QuotationproductsService } from './quotationproducts.service'; +import {PurchaseordersService} from './purchaseorders.service'; + export * from './quotations.service'; -import { QuotationsService } from './quotations.service'; +import {QuotationsService} from './quotations.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 './users.service'; -import { UsersService } from './users.service'; +import {UsersService} from './users.service'; + export * from './warehouseproducts.service'; -import { WarehouseproductsService } from './warehouseproducts.service'; -export const APIS = [DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, PurchaseproductsService, QuotationproductsService, QuotationsService, SettingsService, SuppliersService, UsersService, WarehouseproductsService]; +import {WarehouseproductsService} from './warehouseproducts.service'; + +export const APIS = [DeliverersService, DeliverynotesService, PricesService, ProductsService, PurchaseordersService, QuotationsService, SettingsService, SuppliersService, UsersService, WarehouseproductsService]; diff --git a/src/app/services/api/api/deliverers.service.ts b/src/app/services/api/api/deliverers.service.ts index aac5dfe..f5c3839 100644 --- a/src/app/services/api/api/deliverers.service.ts +++ b/src/app/services/api/api/deliverers.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,46 +9,62 @@ */ /* 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; - public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createDelivererEndpoint(createDelivererDto: CreateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (createDelivererDto === null || createDelivererDto === undefined) { throw new Error('Required parameter createDelivererDto was null or undefined when calling createDelivererEndpoint.'); } @@ -88,16 +104,16 @@ export class DeliverersService extends BaseService { } let localVarPath = `/API/deliverers`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createDelivererDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -105,22 +121,37 @@ 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; - public deleteDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + public deleteDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -141,16 +172,24 @@ 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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -161,10 +200,26 @@ 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>; - public getAllDelivererEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllDelivererEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllDelivererEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllDelivererEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllDelivererEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllDelivererEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllDelivererEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -192,15 +247,15 @@ export class DeliverersService extends BaseService { } let localVarPath = `/API/deliverers`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -208,14 +263,30 @@ 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; - public getDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getDelivererEndpoint(delivererId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getDelivererEndpoint(delivererId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDelivererEndpoint(delivererId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDelivererEndpoint(delivererId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (delivererId === null || delivererId === undefined) { throw new Error('Required parameter delivererId was null or undefined when calling getDelivererEndpoint.'); } @@ -245,16 +316,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -262,15 +341,31 @@ 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; - public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateDelivererEndpoint(id: number, updateDelivererDto: UpdateDelivererDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateDelivererEndpoint.'); } @@ -312,17 +407,25 @@ 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateDelivererDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/deliverynotes.service.ts b/src/app/services/api/api/deliverynotes.service.ts index 3a69576..dcea385 100644 --- a/src/app/services/api/api/deliverynotes.service.ts +++ b/src/app/services/api/api/deliverynotes.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,57 +9,71 @@ */ /* 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createDeliveryNoteEndpoint(createDeliveryNoteDto: CreateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -90,16 +104,16 @@ export class DeliverynotesService extends BaseService { } let localVarPath = `/API/deliveryNotes`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createDeliveryNoteDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -107,22 +121,37 @@ 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; - public deleteDeliveryNoteEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteDeliveryNoteEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteDeliveryNoteEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + public deleteDeliveryNoteEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteDeliveryNoteEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteDeliveryNoteEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteDeliveryNoteEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -143,16 +172,24 @@ 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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -163,10 +200,26 @@ 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>; - public getAllDeliveryNoteEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllDeliveryNoteEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllDeliveryNoteEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllDeliveryNoteEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllDeliveryNoteEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllDeliveryNoteEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllDeliveryNoteEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -194,15 +247,15 @@ export class DeliverynotesService extends BaseService { } let localVarPath = `/API/deliveryNotes`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -210,14 +263,30 @@ 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; - public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDeliveryNoteEndpoint(deliveryNoteId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDeliveryNoteEndpoint(deliveryNoteId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDeliveryNoteEndpoint(deliveryNoteId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (deliveryNoteId === null || deliveryNoteId === undefined) { throw new Error('Required parameter deliveryNoteId was null or undefined when calling getDeliveryNoteEndpoint.'); } @@ -247,16 +316,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -264,14 +341,30 @@ 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; - public getDeliveryNotePdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDeliveryNotePdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDeliveryNotePdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable { + public getDeliveryNotePdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getDeliveryNotePdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDeliveryNotePdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getDeliveryNotePdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getDeliveryNotePdfEndpoint.'); } @@ -290,16 +383,24 @@ 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 } ); @@ -307,15 +408,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchRealDeliveryDateEndpoint(id: number, patchDeliveryNoteRealDeliveryDateDto: PatchDeliveryNoteRealDeliveryDateDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchRealDeliveryDateEndpoint.'); } @@ -325,9 +442,7 @@ export class DeliverynotesService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -357,17 +472,25 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchDeliveryNoteRealDeliveryDateDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -375,15 +498,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateDeliveryNoteEndpoint(id: number, updateDeliveryNoteDto: UpdateDeliveryNoteDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateDeliveryNoteEndpoint.'); } @@ -393,9 +532,7 @@ export class DeliverynotesService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -425,17 +562,25 @@ 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; - return this.httpClient.request('put', `${basePath}${localVarPath}`, + 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateDeliveryNoteDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/prices.service.ts b/src/app/services/api/api/prices.service.ts index 619d887..76d7a3f 100644 --- a/src/app/services/api/api/prices.service.ts +++ b/src/app/services/api/api/prices.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,169 +9,60 @@ */ /* 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'; -// @ts-ignore -import { GetPriceDto } from '../model/get-price-dto'; -// @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 post /API/prices - * @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 createPriceEndpoint(createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createPriceEndpoint(createPriceDto: CreatePriceDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPriceEndpoint(createPriceDto: CreatePriceDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPriceEndpoint(createPriceDto: CreatePriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (createPriceDto === null || createPriceDto === undefined) { - throw new Error('Required parameter createPriceDto was null or undefined when calling createPriceEndpoint.'); - } - - 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/prices`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createPriceDto, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint delete /API/prices/{productId}/{supplierId} - * @param productId - * @param supplierId - * @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 deletePriceEndpoint(productId: number, supplierId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deletePriceEndpoint(productId: number, supplierId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePriceEndpoint(productId: number, supplierId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePriceEndpoint(productId: number, supplierId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (productId === null || productId === undefined) { - throw new Error('Required parameter productId was null or undefined when calling deletePriceEndpoint.'); - } - if (supplierId === null || supplierId === undefined) { - throw new Error('Required parameter supplierId was null or undefined when calling deletePriceEndpoint.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/API/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"})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('delete', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - /** * @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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPriceEndpoint(productId: number, supplierId: number, patchPriceSellingPriceDto: PatchPriceSellingPriceDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (productId === null || productId === undefined) { throw new Error('Required parameter productId was null or undefined when calling patchPriceEndpoint.'); } @@ -184,9 +75,7 @@ export class PricesService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -216,17 +105,33 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchPriceSellingPriceDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/products.service.ts b/src/app/services/api/api/products.service.ts index a1e6451..f040cfd 100644 --- a/src/app/services/api/api/products.service.ts +++ b/src/app/services/api/api/products.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,54 +9,69 @@ */ /* 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; - public deleteProductEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteProductEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteProductEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + public deleteProductEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteProductEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -77,16 +92,24 @@ 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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -97,10 +120,26 @@ 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>; - public getAllProductsEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllProductsEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllProductsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllProductsEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllProductsEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllProductsEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllProductsEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -128,15 +167,15 @@ export class ProductsService extends BaseService { } let localVarPath = `/API/products`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -147,10 +186,26 @@ 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>; - public getAllProductsUnderLimitEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllProductsUnderLimitEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllProductsUnderLimitEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllProductsUnderLimitEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllProductsUnderLimitEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllProductsUnderLimitEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllProductsUnderLimitEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -178,15 +233,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>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -194,14 +249,30 @@ 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; - public getProductEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getProductEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getProductEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getProductEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getProductEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getProductEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getProductEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getProductEndpoint.'); } @@ -231,16 +302,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -248,15 +327,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchProductMinimalStockEndpoint(id: number, patchProductMinimalStockDto: PatchProductMinimalStockDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchProductMinimalStockEndpoint.'); } @@ -266,9 +361,7 @@ export class ProductsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -298,17 +391,25 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchProductMinimalStockDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -316,15 +417,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateProductEndpoint(id: number, updateProductDto: UpdateProductDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateProductEndpoint.'); } @@ -334,9 +451,7 @@ export class ProductsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -366,17 +481,25 @@ 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; - return this.httpClient.request('put', `${basePath}${localVarPath}`, + 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateProductDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/purchaseorders.service.ts b/src/app/services/api/api/purchaseorders.service.ts index 87a17a6..ed2a306 100644 --- a/src/app/services/api/api/purchaseorders.service.ts +++ b/src/app/services/api/api/purchaseorders.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,55 +9,175 @@ */ /* 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 { GetPurchaseOrderDto } from '../model/get-purchase-order-dto'; +import {CreatePurchaseProductDto} from '../model/create-purchase-product-dto'; // @ts-ignore -import { PatchPurchaseOrderPurchaseConditionsDto } from '../model/patch-purchase-order-purchase-conditions-dto'; +import {GetPurchaseOrderDto} from '../model/get-purchase-order-dto'; +// @ts-ignore +import {PatchPurchaseOrderPurchaseConditionsDto} from '../model/patch-purchase-order-purchase-conditions-dto'; +// @ts-ignore +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 - * @param createPurchaseOrderDto + * @endpoint post /API/purchaseOrders/{purchaseOrderId}/{productId} + * @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 createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductFromPurchaseOrderEndpoint(purchaseOrderId: number, productId: number, createPurchaseProductDto: CreatePurchaseProductDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (purchaseOrderId === null || purchaseOrderId === undefined) { + throw new Error('Required parameter purchaseOrderId was null or undefined when calling addProductFromPurchaseOrderEndpoint.'); + } + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling addProductFromPurchaseOrderEndpoint.'); + } + if (createPurchaseProductDto === null || createPurchaseProductDto === undefined) { + throw new Error('Required parameter createPurchaseProductDto was null or undefined when calling addProductFromPurchaseOrderEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createPurchaseProductDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint post /API/purchaseOrders + * @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; + public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createPurchaseOrder(createPurchaseOrderDto: CreatePurchaseOrderDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -88,39 +208,58 @@ export class PurchaseordersService extends BaseService { } let localVarPath = `/API/purchaseOrders`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createPurchaseOrderDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); } /** - * @endpoint delete /API/purchaseOrders/{id} - * @param id + * @endpoint delete /API/purchaseOrders/{productId}/{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 deletePurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deletePurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deletePurchaseOrderEndpoint.'); + public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductFromPurchaseOrderEndpoint(productId: number, purchaseOrderId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling deleteProductFromPurchaseOrderEndpoint.'); + } + if (purchaseOrderId === null || purchaseOrderId === undefined) { + throw new Error('Required parameter purchaseOrderId was null or undefined when calling deleteProductFromPurchaseOrderEndpoint.'); } let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -141,16 +280,108 @@ 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: "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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint delete /API/purchaseOrders/{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; + public deletePurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deletePurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deletePurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + 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([]); + 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/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('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -161,10 +392,26 @@ 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>; - public getAllPurchaseOrderEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllPurchaseOrderEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllPurchaseOrderEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllPurchaseOrderEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllPurchaseOrderEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllPurchaseOrderEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllPurchaseOrderEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -192,15 +439,15 @@ export class PurchaseordersService extends BaseService { } let localVarPath = `/API/purchaseOrders`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -208,14 +455,30 @@ 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; - public getPurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getPurchaseOrderEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getPurchaseOrderEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getPurchaseOrderEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getPurchaseOrderEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderEndpoint.'); } @@ -245,16 +508,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -262,14 +533,30 @@ 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; - public getPurchaseOrderPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPurchaseOrderPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPurchaseOrderPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable { + public getPurchaseOrderPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getPurchaseOrderPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getPurchaseOrderPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getPurchaseOrderPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getPurchaseOrderPdfEndpoint.'); } @@ -288,16 +575,24 @@ 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 } ); @@ -305,15 +600,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPurchaseOrderPurchaseConditionsEndpoint(id: number, patchPurchaseOrderPurchaseConditionsDto: PatchPurchaseOrderPurchaseConditionsDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchPurchaseOrderPurchaseConditionsEndpoint.'); } @@ -323,9 +634,7 @@ export class PurchaseordersService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -355,17 +664,127 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchPurchaseOrderPurchaseConditionsDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint patch /API/purchaseOrders/{productId}/{purchaseOrderId}/Quantity + * @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; + public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); + } + if (purchaseOrderId === null || purchaseOrderId === undefined) { + throw new Error('Required parameter purchaseOrderId was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); + } + if (patchPurchaseProductQuantityDto === null || patchPurchaseProductQuantityDto === undefined) { + throw new Error('Required parameter patchPurchaseProductQuantityDto was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('patch', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: patchPurchaseProductQuantityDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/purchaseproducts.service.ts b/src/app/services/api/api/purchaseproducts.service.ts deleted file mode 100644 index 22d4975..0000000 --- a/src/app/services/api/api/purchaseproducts.service.ts +++ /dev/null @@ -1,235 +0,0 @@ -/** - * 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 { CreatePurchaseProductDto } from '../model/create-purchase-product-dto'; -// @ts-ignore -import { GetPurchaseProductDto } from '../model/get-purchase-product-dto'; -// @ts-ignore -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'; - - - -@Injectable({ - providedIn: 'root' -}) -export class PurchaseproductsService extends BaseService { - - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); - } - - /** - * @endpoint post /API/purchaseProducts - * @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 createPurchaseProductEndpoint(createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createPurchaseProductEndpoint(createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPurchaseProductEndpoint(createPurchaseProductDto: CreatePurchaseProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createPurchaseProductEndpoint(createPurchaseProductDto: CreatePurchaseProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (createPurchaseProductDto === null || createPurchaseProductDto === undefined) { - throw new Error('Required parameter createPurchaseProductDto was null or undefined when calling createPurchaseProductEndpoint.'); - } - - 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/purchaseProducts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createPurchaseProductDto, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint delete /API/purchaseProducts/{productId}/{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 deletePurchaseProductEndpoint(productId: number, purchaseOrderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deletePurchaseProductEndpoint(productId: number, purchaseOrderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePurchaseProductEndpoint(productId: number, purchaseOrderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deletePurchaseProductEndpoint(productId: number, purchaseOrderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (productId === null || productId === undefined) { - throw new Error('Required parameter productId was null or undefined when calling deletePurchaseProductEndpoint.'); - } - if (purchaseOrderId === null || purchaseOrderId === undefined) { - throw new Error('Required parameter purchaseOrderId was null or undefined when calling deletePurchaseProductEndpoint.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/API/purchaseProducts/${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('delete', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint patch /API/purchaseProducts/{productId}/{purchaseOrderId}/Quantity - * @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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchPurchaseProductQuantityEndpoint(productId: number, purchaseOrderId: number, patchPurchaseProductQuantityDto: PatchPurchaseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (productId === null || productId === undefined) { - throw new Error('Required parameter productId was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); - } - if (purchaseOrderId === null || purchaseOrderId === undefined) { - throw new Error('Required parameter purchaseOrderId was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); - } - if (patchPurchaseProductQuantityDto === null || patchPurchaseProductQuantityDto === undefined) { - throw new Error('Required parameter patchPurchaseProductQuantityDto was null or undefined when calling patchPurchaseProductQuantityEndpoint.'); - } - - 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/purchaseProducts/${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('patch', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: patchPurchaseProductQuantityDto, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - -} diff --git a/src/app/services/api/api/quotationproducts.service.ts b/src/app/services/api/api/quotationproducts.service.ts deleted file mode 100644 index 622203d..0000000 --- a/src/app/services/api/api/quotationproducts.service.ts +++ /dev/null @@ -1,235 +0,0 @@ -/** - * 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 { CreateQuotationProductDto } from '../model/create-quotation-product-dto'; -// @ts-ignore -import { GetQuotationProductDto } from '../model/get-quotation-product-dto'; -// @ts-ignore -import { PatchQuotationProductQuantityDto } from '../model/patch-quotation-product-quantity-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 QuotationproductsService extends BaseService { - - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); - } - - /** - * @endpoint post /API/quotationProducts - * @param createQuotationProductDto - * @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 createQuotationProductEndpoint(createQuotationProductDto: CreateQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createQuotationProductEndpoint(createQuotationProductDto: CreateQuotationProductDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createQuotationProductEndpoint(createQuotationProductDto: CreateQuotationProductDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createQuotationProductEndpoint(createQuotationProductDto: CreateQuotationProductDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (createQuotationProductDto === null || createQuotationProductDto === undefined) { - throw new Error('Required parameter createQuotationProductDto was null or undefined when calling createQuotationProductEndpoint.'); - } - - 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/quotationProducts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createQuotationProductDto, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint delete /API/quotationProducts/{productId}/{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 deleteQuotationProductEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deleteQuotationProductEndpoint(productId: number, quotationId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteQuotationProductEndpoint(productId: number, quotationId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteQuotationProductEndpoint(productId: number, quotationId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (productId === null || productId === undefined) { - throw new Error('Required parameter productId was null or undefined when calling deleteQuotationProductEndpoint.'); - } - if (quotationId === null || quotationId === undefined) { - throw new Error('Required parameter quotationId was null or undefined when calling deleteQuotationProductEndpoint.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/API/quotationProducts/${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('delete', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * @endpoint patch /API/quotationProducts/{productId}/{quotationId}/Quantity - * @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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (productId === null || productId === undefined) { - throw new Error('Required parameter productId was null or undefined when calling patchQuotationProductQuantityEndpoint.'); - } - if (quotationId === null || quotationId === undefined) { - throw new Error('Required parameter quotationId was null or undefined when calling patchQuotationProductQuantityEndpoint.'); - } - if (patchQuotationProductQuantityDto === null || patchQuotationProductQuantityDto === undefined) { - throw new Error('Required parameter patchQuotationProductQuantityDto was null or undefined when calling patchQuotationProductQuantityEndpoint.'); - } - - 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/quotationProducts/${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('patch', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: patchQuotationProductQuantityDto, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - -} diff --git a/src/app/services/api/api/quotations.service.ts b/src/app/services/api/api/quotations.service.ts index 7c925c7..f18a669 100644 --- a/src/app/services/api/api/quotations.service.ts +++ b/src/app/services/api/api/quotations.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,57 +9,167 @@ */ /* 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 { CreateQuotationDto } from '../model/create-quotation-dto'; +import {AddQuotationProductDto} from '../model/add-quotation-product-dto'; // @ts-ignore -import { GetQuotationDto } from '../model/get-quotation-dto'; +import {CreateQuotationDto} from '../model/create-quotation-dto'; // @ts-ignore -import { PatchQuotationConditionsSaleDto } from '../model/patch-quotation-conditions-sale-dto'; +import {GetQuotationDto} from '../model/get-quotation-dto'; // @ts-ignore -import { UpdateQuotationDto } from '../model/update-quotation-dto'; +import {PatchQuotationConditionsSaleDto} from '../model/patch-quotation-conditions-sale-dto'; +// @ts-ignore +import {PatchQuotationMessageDto} from '../model/patch-quotation-message-dto'; +// @ts-ignore +import {PatchQuotationProductQuantityDto} from '../model/patch-quotation-product-quantity-dto'; +// @ts-ignore +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 - * @param createQuotationDto + * @endpoint post /API/quotations/{productId}/products + * @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 createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductoToQuotationEndpoint(productId: number, addQuotationProductDto: AddQuotationProductDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling addProductoToQuotationEndpoint.'); + } + if (addQuotationProductDto === null || addQuotationProductDto === undefined) { + throw new Error('Required parameter addQuotationProductDto was null or undefined when calling addProductoToQuotationEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: addQuotationProductDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint post /API/quotations + * @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; + public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createQuotationEndpoint(createQuotationDto: CreateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -90,39 +200,58 @@ export class QuotationsService extends BaseService { } let localVarPath = `/API/quotations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createQuotationDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); } /** - * @endpoint delete /API/quotations/{id} - * @param id + * @endpoint delete /API/quotations/{productId}/{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 deleteQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deleteQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteQuotationEndpoint.'); + public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductFromQuotationEndpoint(productId: number, quotationId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling deleteProductFromQuotationEndpoint.'); + } + if (quotationId === null || quotationId === undefined) { + throw new Error('Required parameter quotationId was null or undefined when calling deleteProductFromQuotationEndpoint.'); } let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -143,16 +272,108 @@ 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: "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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint delete /API/quotations/{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; + public deleteQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + 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([]); + 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/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('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -163,10 +384,26 @@ 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>; - public getAllQuotationEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllQuotationEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllQuotationEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllQuotationEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllQuotationEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllQuotationEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllQuotationEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -194,15 +431,15 @@ export class QuotationsService extends BaseService { } let localVarPath = `/API/quotations`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -210,14 +447,30 @@ 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; - public getQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getQuotationEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getQuotationEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getQuotationEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getQuotationEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getQuotationEndpoint.'); } @@ -247,16 +500,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -264,14 +525,30 @@ 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; - public getQuotationPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getQuotationPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable>; - public getQuotationPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/pdf', context?: HttpContext, transferCache?: boolean}): Observable { + public getQuotationPdfEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getQuotationPdfEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getQuotationPdfEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getQuotationPdfEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/pdf', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getQuotationPdfEndpoint.'); } @@ -290,16 +567,24 @@ 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 } ); @@ -307,15 +592,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationConditionsSaleEndpoint(id: number, patchQuotationConditionsSaleDto: PatchQuotationConditionsSaleDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchQuotationConditionsSaleEndpoint.'); } @@ -325,9 +626,7 @@ export class QuotationsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -357,17 +656,217 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchQuotationConditionsSaleDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint patch /API/quotations/{id}/message + * @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; + public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationMessageEndpoint(id: number, patchQuotationMessageDto: PatchQuotationMessageDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling patchQuotationMessageEndpoint.'); + } + if (patchQuotationMessageDto === null || patchQuotationMessageDto === undefined) { + throw new Error('Required parameter patchQuotationMessageDto was null or undefined when calling patchQuotationMessageEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('patch', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: patchQuotationMessageDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint patch /API/quotations/{productId}/{quotationId}/Quantity + * @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; + public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchQuotationProductQuantityEndpoint(productId: number, quotationId: number, patchQuotationProductQuantityDto: PatchQuotationProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling patchQuotationProductQuantityEndpoint.'); + } + if (quotationId === null || quotationId === undefined) { + throw new Error('Required parameter quotationId was null or undefined when calling patchQuotationProductQuantityEndpoint.'); + } + if (patchQuotationProductQuantityDto === null || patchQuotationProductQuantityDto === undefined) { + throw new Error('Required parameter patchQuotationProductQuantityDto was null or undefined when calling patchQuotationProductQuantityEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('patch', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: patchQuotationProductQuantityDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -375,15 +874,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateQuotationEndpoint.'); } @@ -393,9 +908,7 @@ export class QuotationsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -425,17 +938,25 @@ 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; - return this.httpClient.request('put', `${basePath}${localVarPath}`, + 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateQuotationDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/settings.service.ts b/src/app/services/api/api/settings.service.ts index b6a4951..1bbecf8 100644 --- a/src/app/services/api/api/settings.service.ts +++ b/src/app/services/api/api/settings.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,57 +9,71 @@ */ /* 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 { CreateSettingDto } from '../model/create-setting-dto'; +import {CreateSettingDto} from '../model/create-setting-dto'; // @ts-ignore -import { GetSettingDto } from '../model/get-setting-dto'; +import {GetSettingDto} from '../model/get-setting-dto'; // @ts-ignore -import { PatchSettingElectronicSignatureDto } from '../model/patch-setting-electronic-signature-dto'; +import {PatchSettingElectronicSignatureDto} from '../model/patch-setting-electronic-signature-dto'; // @ts-ignore -import { PatchSettingLogoDto } from '../model/patch-setting-logo-dto'; +import {PatchSettingLogoDto} from '../model/patch-setting-logo-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); } /** * @endpoint post /API/settings - * @param createSettingDto + * @param createSettingDto * @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 createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createSettingEndpoint(createSettingDto: CreateSettingDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createSettingEndpoint(createSettingDto: CreateSettingDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (createSettingDto === null || createSettingDto === undefined) { throw new Error('Required parameter createSettingDto was null or undefined when calling createSettingEndpoint.'); } let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -90,16 +104,16 @@ export class SettingsService extends BaseService { } let localVarPath = `/API/settings`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createSettingDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -107,22 +121,37 @@ export class SettingsService extends BaseService { /** * @endpoint delete /API/settings/{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 deleteSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deleteSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + public deleteSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling deleteSettingEndpoint.'); } let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -143,16 +172,24 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${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/settings/${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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -160,14 +197,30 @@ export class SettingsService extends BaseService { /** * @endpoint get /API/settings/{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 getSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getSettingEndpoint.'); } @@ -197,16 +250,24 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${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/settings/${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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -214,15 +275,31 @@ export class SettingsService extends BaseService { /** * @endpoint patch /API/settings/{id}/ElectronicSignature - * @param id - * @param patchSettingElectronicSignatureDto + * @param id + * @param patchSettingElectronicSignatureDto * @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(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchSettingElectronicSignatureEndpoint.'); } @@ -232,9 +309,7 @@ export class SettingsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -264,17 +339,25 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/ElectronicSignature`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + let localVarPath = `/API/settings/${this.configuration.encodeParam({ + name: "id", + value: id, + in: "path", + style: "simple", + explode: false, + dataType: "number", + dataFormat: "int32" + })}/ElectronicSignature`; + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchSettingElectronicSignatureDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -282,15 +365,31 @@ export class SettingsService extends BaseService { /** * @endpoint patch /API/settings/{id}/logo - * @param id - * @param patchSettingLogoDto + * @param id + * @param patchSettingLogoDto * @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(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchSettingLogoEndpoint.'); } @@ -300,9 +399,7 @@ export class SettingsService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -332,17 +429,25 @@ export class SettingsService extends BaseService { } } - let localVarPath = `/API/settings/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int32"})}/logo`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + let localVarPath = `/API/settings/${this.configuration.encodeParam({ + name: "id", + value: id, + in: "path", + style: "simple", + explode: false, + dataType: "number", + dataFormat: "int32" + })}/logo`; + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchSettingLogoDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/suppliers.service.ts b/src/app/services/api/api/suppliers.service.ts index 7c4b123..bb9a8c3 100644 --- a/src/app/services/api/api/suppliers.service.ts +++ b/src/app/services/api/api/suppliers.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,57 +9,175 @@ */ /* 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 { CreateSupplierDto } from '../model/create-supplier-dto'; +import {CreatePriceDto} from '../model/create-price-dto'; // @ts-ignore -import { GetSupplierDto } from '../model/get-supplier-dto'; +import {CreateSupplierDto} from '../model/create-supplier-dto'; // @ts-ignore -import { PatchSupplierDeliveryDelayDto } from '../model/patch-supplier-delivery-delay-dto'; +import {GetSupplierDto} from '../model/get-supplier-dto'; // @ts-ignore -import { UpdateSupplierDto } from '../model/update-supplier-dto'; +import {PatchSupplierDeliveryDelayDto} from '../model/patch-supplier-delivery-delay-dto'; +// @ts-ignore +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 - * @param createSupplierDto + * @endpoint post /API/suppliers/{supplierId}/{productId} + * @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 createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public addProductToSupplierEndpoint(supplierId: number, productId: number, createPriceDto: CreatePriceDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (supplierId === null || supplierId === undefined) { + throw new Error('Required parameter supplierId was null or undefined when calling addProductToSupplierEndpoint.'); + } + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling addProductToSupplierEndpoint.'); + } + if (createPriceDto === null || createPriceDto === undefined) { + throw new Error('Required parameter createPriceDto was null or undefined when calling addProductToSupplierEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/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('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createPriceDto, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint post /API/suppliers + * @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; + public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createSupplierEndpoint(createSupplierDto: CreateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -90,39 +208,58 @@ export class SuppliersService extends BaseService { } let localVarPath = `/API/suppliers`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createSupplierDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); } /** - * @endpoint delete /API/suppliers/{id} - * @param id + * @endpoint delete /API/suppliers/{supplierId}/{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 deleteSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable; - public deleteSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling deleteSupplierEndpoint.'); + public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteProductToSupplierEndpoint(supplierId: number, productId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + if (supplierId === null || supplierId === undefined) { + throw new Error('Required parameter supplierId was null or undefined when calling deleteProductToSupplierEndpoint.'); + } + if (productId === null || productId === undefined) { + throw new Error('Required parameter productId was null or undefined when calling deleteProductToSupplierEndpoint.'); } let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -143,16 +280,108 @@ 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: "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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + + /** + * @endpoint delete /API/suppliers/{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; + public deleteSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { + 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([]); + 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/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('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -163,10 +392,26 @@ 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>; - public getAllSuppliersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllSuppliersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllSuppliersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllSuppliersEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllSuppliersEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllSuppliersEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllSuppliersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -194,15 +439,15 @@ export class SuppliersService extends BaseService { } let localVarPath = `/API/suppliers`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -210,14 +455,30 @@ 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; - public getSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getSupplierEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getSupplierEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getSupplierEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getSupplierEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getSupplierEndpoint.'); } @@ -247,16 +508,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -264,15 +533,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchSupplierDeliveryDelayEndpoint(id: number, patchSupplierDeliveryDelayDto: PatchSupplierDeliveryDelayDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchSupplierDeliveryDelayEndpoint.'); } @@ -282,9 +567,7 @@ export class SuppliersService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -314,17 +597,25 @@ 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; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, + 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchSupplierDeliveryDelayDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -332,15 +623,31 @@ 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?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateSupplierEndpoint(id: number, updateSupplierDto: UpdateSupplierDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateSupplierEndpoint.'); } @@ -350,9 +657,7 @@ export class SuppliersService extends BaseService { let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -382,17 +687,25 @@ 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; - return this.httpClient.request('put', `${basePath}${localVarPath}`, + 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateSupplierDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/users.service.ts b/src/app/services/api/api/users.service.ts index 5e1e5d4..2de5e9a 100644 --- a/src/app/services/api/api/users.service.ts +++ b/src/app/services/api/api/users.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,52 +9,68 @@ */ /* 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; - public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public connectUserEndpoint(connectUserDto: ConnectUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public connectUserEndpoint(connectUserDto: ConnectUserDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public connectUserEndpoint(connectUserDto: ConnectUserDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (connectUserDto === null || connectUserDto === undefined) { throw new Error('Required parameter connectUserDto was null or undefined when calling connectUserEndpoint.'); } @@ -94,16 +110,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('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: connectUserDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -111,14 +127,30 @@ 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; - public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createUserEndpoint(createUserDto: CreateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createUserEndpoint(createUserDto: CreateUserDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public createUserEndpoint(createUserDto: CreateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (createUserDto === null || createUserDto === undefined) { throw new Error('Required parameter createUserDto was null or undefined when calling createUserEndpoint.'); } @@ -158,16 +190,16 @@ export class UsersService extends BaseService { } let localVarPath = `/API/users`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request('post', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: createUserDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -175,22 +207,37 @@ 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; - public deleteUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable { + public deleteUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable; + public deleteUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public deleteUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: undefined, + context?: HttpContext, + transferCache?: boolean + }): Observable { 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([ - ]); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]); if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } @@ -211,16 +258,24 @@ 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('delete', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -231,10 +286,26 @@ 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>; - public getAllUsersEndpoint(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllUsersEndpoint(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getAllUsersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getAllUsersEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllUsersEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllUsersEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllUsersEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { let localVarHeaders = this.defaultHeaders; @@ -262,15 +333,15 @@ export class UsersService extends BaseService { } let localVarPath = `/API/users`; - const { basePath, withCredentials } = this.configuration; + const {basePath, withCredentials} = this.configuration; return this.httpClient.request>('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -278,14 +349,30 @@ export class UsersService extends BaseService { /** * @endpoint get /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 getUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getUserEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getUserEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getUserEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getUserEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling getUserEndpoint.'); } @@ -315,16 +402,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -332,15 +427,31 @@ 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; - public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchUserPasswordEndpoint(id: number, patchUserPasswordDto: PatchUserPasswordDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchUserPasswordEndpoint.'); } @@ -382,17 +493,25 @@ 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchUserPasswordDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -400,15 +519,31 @@ 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; - public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public updateUserEndpoint(id: number, updateUserDto: UpdateUserDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling updateUserEndpoint.'); } @@ -450,17 +585,25 @@ 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('put', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: updateUserDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/api/warehouseproducts.service.ts b/src/app/services/api/api/warehouseproducts.service.ts index 532d7c7..89d1beb 100644 --- a/src/app/services/api/api/warehouseproducts.service.ts +++ b/src/app/services/api/api/warehouseproducts.service.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,46 +9,62 @@ */ /* 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; - public getTotalQuantityEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTotalQuantityEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTotalQuantityEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getTotalQuantityEndpoint(productId: number, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public getTotalQuantityEndpoint(productId: number, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getTotalQuantityEndpoint(productId: number, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getTotalQuantityEndpoint(productId: number, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (productId === null || productId === undefined) { throw new Error('Required parameter productId was null or undefined when calling getTotalQuantityEndpoint.'); } @@ -78,16 +94,24 @@ 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('get', `${basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); @@ -95,16 +119,32 @@ 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; - public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable; + public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public patchWareHouseProductQuantityEndpoint(productId: number, wareHouseId: number, patchWareHouseProductQuantityDto: PatchWareHouseProductQuantityDto, observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { if (productId === null || productId === undefined) { throw new Error('Required parameter productId was null or undefined when calling patchWareHouseProductQuantityEndpoint.'); } @@ -149,17 +189,33 @@ 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('patch', `${basePath}${localVarPath}`, { context: localVarHttpContext, body: patchWareHouseProductQuantityDto, responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), + ...(withCredentials ? {withCredentials} : {}), headers: localVarHeaders, observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), reportProgress: reportProgress } ); diff --git a/src/app/services/api/configuration.ts b/src/app/services/api/configuration.ts index 5ffdfbb..1dc1e57 100644 --- a/src/app/services/api/configuration.ts +++ b/src/app/services/api/configuration.ts @@ -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,9 +64,19 @@ 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; } @@ -108,7 +118,7 @@ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, * @param contentTypes - the array of content types that are available for selection * @returns the selected content-type or undefined if no selection could be made. */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { + public selectHeaderContentType(contentTypes: string[]): string | undefined { if (contentTypes.length === 0) { return undefined; } diff --git a/src/app/services/api/encoder.ts b/src/app/services/api/encoder.ts index 138c4d5..8e4032a 100644 --- a/src/app/services/api/encoder.ts +++ b/src/app/services/api/encoder.ts @@ -1,4 +1,4 @@ -import { HttpParameterCodec } from '@angular/common/http'; +import {HttpParameterCodec} from '@angular/common/http'; /** * Custom HttpParameterCodec @@ -8,12 +8,15 @@ 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); } diff --git a/src/app/services/api/model/add-quotation-product-dto.ts b/src/app/services/api/model/add-quotation-product-dto.ts new file mode 100644 index 0000000..0685086 --- /dev/null +++ b/src/app/services/api/model/add-quotation-product-dto.ts @@ -0,0 +1,16 @@ +/** + * PyroFetes + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AddQuotationProductDto { + quantity?: number; + quotationId?: number; +} + diff --git a/src/app/services/api/model/connect-user-dto.ts b/src/app/services/api/model/connect-user-dto.ts index 2ce7974..a2f2960 100644 --- a/src/app/services/api/model/connect-user-dto.ts +++ b/src/app/services/api/model/connect-user-dto.ts @@ -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; } diff --git a/src/app/services/api/model/create-deliverer-dto.ts b/src/app/services/api/model/create-deliverer-dto.ts index d7b5980..bf30aa5 100644 --- a/src/app/services/api/model/create-deliverer-dto.ts +++ b/src/app/services/api/model/create-deliverer-dto.ts @@ -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; } diff --git a/src/app/services/api/model/create-delivery-note-dto.ts b/src/app/services/api/model/create-delivery-note-dto.ts index 8635bf6..e3bbc2f 100644 --- a/src/app/services/api/model/create-delivery-note-dto.ts +++ b/src/app/services/api/model/create-delivery-note-dto.ts @@ -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; estimateDeliveryDate?: string; expeditionDate?: string; diff --git a/src/app/services/api/model/create-price-dto.ts b/src/app/services/api/model/create-price-dto.ts index d127766..b488dce 100644 --- a/src/app/services/api/model/create-price-dto.ts +++ b/src/app/services/api/model/create-price-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,7 @@ */ -export interface CreatePriceDto { +export interface CreatePriceDto { sellingPrice?: number; - supplierId?: number | null; - supplierName?: string | null; - supplierEmail?: string | null; - supplierPhone?: string | null; - supplierAddress?: string | null; - supplierZipCode?: string | null; - supplierCity?: string | null; - supplierDeliveryDelay?: number; - productId?: number | null; - productReferences?: string | null; - productName?: string | null; - productDuration?: number; - productCaliber?: number; - productApprovalNumber?: string | null; - productWeight?: number; - productNec?: number; - productImage?: string | null; - productLink?: string | null; - productMinimalQuantity?: number; } diff --git a/src/app/services/api/model/create-product-quotation-dto.ts b/src/app/services/api/model/create-product-quotation-dto.ts index 76033ca..a87e116 100644 --- a/src/app/services/api/model/create-product-quotation-dto.ts +++ b/src/app/services/api/model/create-product-quotation-dto.ts @@ -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; } diff --git a/src/app/services/api/model/create-purchase-order-dto.ts b/src/app/services/api/model/create-purchase-order-dto.ts index 0b3b3c5..8147c58 100644 --- a/src/app/services/api/model/create-purchase-order-dto.ts +++ b/src/app/services/api/model/create-purchase-order-dto.ts @@ -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; products?: Array | null; } diff --git a/src/app/services/api/model/create-purchase-order-product-dto.ts b/src/app/services/api/model/create-purchase-order-product-dto.ts index 256d725..2d74e61 100644 --- a/src/app/services/api/model/create-purchase-order-product-dto.ts +++ b/src/app/services/api/model/create-purchase-order-product-dto.ts @@ -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; } diff --git a/src/app/services/api/model/create-purchase-product-dto.ts b/src/app/services/api/model/create-purchase-product-dto.ts index 4e772d9..3593b4a 100644 --- a/src/app/services/api/model/create-purchase-product-dto.ts +++ b/src/app/services/api/model/create-purchase-product-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,10 +9,7 @@ */ -export interface CreatePurchaseProductDto { +export interface CreatePurchaseProductDto { quantity?: number; - productId?: number; - purchaseOrderId?: number; - purchaseOrderPurchaseConditions?: string | null; } diff --git a/src/app/services/api/model/create-quotation-dto.ts b/src/app/services/api/model/create-quotation-dto.ts index 7b6faaa..00cea1a 100644 --- a/src/app/services/api/model/create-quotation-dto.ts +++ b/src/app/services/api/model/create-quotation-dto.ts @@ -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; products?: Array | null; diff --git a/src/app/services/api/model/create-quotation-product-dto.ts b/src/app/services/api/model/create-quotation-product-dto.ts deleted file mode 100644 index b6ea6d3..0000000 --- a/src/app/services/api/model/create-quotation-product-dto.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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 CreateQuotationProductDto { - quantity?: number; - quotationId?: number; - quotationMessage?: string | null; - quotationConditionsSale?: string | null; - productId?: number; - productReferences?: number; - productName?: string | null; - productDuration?: number; - productCaliber?: number; - productApprovalNumber?: string | null; - productWeight?: number; - productNec?: number; - productImage?: string | null; - productLink?: string | null; - productMinimalQuantity?: number; -} - diff --git a/src/app/services/api/model/create-setting-dto.ts b/src/app/services/api/model/create-setting-dto.ts index 21f659e..22ab41f 100644 --- a/src/app/services/api/model/create-setting-dto.ts +++ b/src/app/services/api/model/create-setting-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,8 +9,8 @@ */ -export interface CreateSettingDto { - electronicSignature?: string | null; - logo?: string | null; +export interface CreateSettingDto { + electronicSignature?: Blob | null; + logo?: Blob | null; } diff --git a/src/app/services/api/model/create-supplier-dto.ts b/src/app/services/api/model/create-supplier-dto.ts index fc44016..395892b 100644 --- a/src/app/services/api/model/create-supplier-dto.ts +++ b/src/app/services/api/model/create-supplier-dto.ts @@ -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; diff --git a/src/app/services/api/model/create-user-dto.ts b/src/app/services/api/model/create-user-dto.ts index 1c7145c..b0ae0c0 100644 --- a/src/app/services/api/model/create-user-dto.ts +++ b/src/app/services/api/model/create-user-dto.ts @@ -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; diff --git a/src/app/services/api/model/get-deliverer-dto.ts b/src/app/services/api/model/get-deliverer-dto.ts index ee6e20d..56bbe33 100644 --- a/src/app/services/api/model/get-deliverer-dto.ts +++ b/src/app/services/api/model/get-deliverer-dto.ts @@ -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 | null; diff --git a/src/app/services/api/model/get-delivery-note-dto.ts b/src/app/services/api/model/get-delivery-note-dto.ts index d749a8a..56c4fea 100644 --- a/src/app/services/api/model/get-delivery-note-dto.ts +++ b/src/app/services/api/model/get-delivery-note-dto.ts @@ -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; diff --git a/src/app/services/api/model/get-price-dto.ts b/src/app/services/api/model/get-price-dto.ts index aecbf6e..e427bc2 100644 --- a/src/app/services/api/model/get-price-dto.ts +++ b/src/app/services/api/model/get-price-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,19 +9,10 @@ */ -export interface GetPriceDto { - id?: number; +export interface GetPriceDto { sellingPrice?: number; - supplierId?: number; - supplierName?: string | null; - supplierEmail?: string | null; - supplierPhone?: string | null; - supplierAddress?: string | null; - supplierZipCode?: string | null; - supplierCity?: string | null; - supplierDeliveryDelay?: number; productId?: number; - productReferences?: string | null; + productReference?: string | null; productName?: string | null; productDuration?: number; productCaliber?: number; diff --git a/src/app/services/api/model/get-product-delivery-dto.ts b/src/app/services/api/model/get-product-delivery-dto.ts index 3bcbb83..382ad9a 100644 --- a/src/app/services/api/model/get-product-delivery-dto.ts +++ b/src/app/services/api/model/get-product-delivery-dto.ts @@ -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; @@ -21,13 +21,6 @@ export interface GetProductDeliveryDto { productImage?: string | null; productLink?: string | null; productMinimalQuantity?: number; - deliveryNoteId?: number; - deliveryNoteTrackingNumber?: string | null; - deliveryNoteEstimateDeliveryDate?: string; - deliveryNoteExpeditionDate?: string; - deliveryNoteRealDeliveryDate?: string | null; - deliveryNoteDeliverId?: number; - deliveryNoteDeliverTransporter?: string | null; quantity?: number; } diff --git a/src/app/services/api/model/get-product-dto.ts b/src/app/services/api/model/get-product-dto.ts index 812aed6..c199b1a 100644 --- a/src/app/services/api/model/get-product-dto.ts +++ b/src/app/services/api/model/get-product-dto.ts @@ -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; diff --git a/src/app/services/api/model/get-purchase-order-dto.ts b/src/app/services/api/model/get-purchase-order-dto.ts index 96950b2..d10815a 100644 --- a/src/app/services/api/model/get-purchase-order-dto.ts +++ b/src/app/services/api/model/get-purchase-order-dto.ts @@ -1,18 +1,19 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -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; products?: Array | null; } diff --git a/src/app/services/api/model/get-purchase-product-dto.ts b/src/app/services/api/model/get-purchase-product-dto.ts index 75b09fe..deaff53 100644 --- a/src/app/services/api/model/get-purchase-product-dto.ts +++ b/src/app/services/api/model/get-purchase-product-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,9 @@ */ -export interface GetPurchaseProductDto { +export interface GetPurchaseProductDto { productId?: number; - productReferences?: string | null; + productReference?: string | null; productName?: string | null; productDuration?: number; productCaliber?: number; @@ -21,8 +21,7 @@ export interface GetPurchaseProductDto { productImage?: string | null; productLink?: string | null; productMinimalQuantity?: number; - purchaseOrderId?: number; - purchaseOrderPurchaseConditions?: string | null; + productPrice?: number; quantity?: number; } diff --git a/src/app/services/api/model/get-quotation-dto.ts b/src/app/services/api/model/get-quotation-dto.ts index a8d25be..75b859a 100644 --- a/src/app/services/api/model/get-quotation-dto.ts +++ b/src/app/services/api/model/get-quotation-dto.ts @@ -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; diff --git a/src/app/services/api/model/get-quotation-product-dto.ts b/src/app/services/api/model/get-quotation-product-dto.ts index 89eb74d..2641f2f 100644 --- a/src/app/services/api/model/get-quotation-product-dto.ts +++ b/src/app/services/api/model/get-quotation-product-dto.ts @@ -1,7 +1,7 @@ /** * PyroFetes * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,13 +9,10 @@ */ -export interface GetQuotationProductDto { +export interface GetQuotationProductDto { quantity?: number; - quotationId?: number; - quotationMessage?: string | null; - quotationConditionsSale?: string | null; productId?: number; - productReferences?: string | null; + productReference?: string | null; productName?: string | null; productDuration?: number; productCaliber?: number; diff --git a/src/app/services/api/model/get-setting-dto.ts b/src/app/services/api/model/get-setting-dto.ts index 8d73ba9..c6f3dbb 100644 --- a/src/app/services/api/model/get-setting-dto.ts +++ b/src/app/services/api/model/get-setting-dto.ts @@ -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; diff --git a/src/app/services/api/model/get-supplier-dto.ts b/src/app/services/api/model/get-supplier-dto.ts index a612c83..ae71fdc 100644 --- a/src/app/services/api/model/get-supplier-dto.ts +++ b/src/app/services/api/model/get-supplier-dto.ts @@ -1,17 +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 { GetProductDto } from './get-product-dto'; +import {GetPriceDto} from './get-price-dto'; -export interface GetSupplierDto { +export interface GetSupplierDto { id?: number; name?: string | null; email?: string | null; @@ -20,7 +19,6 @@ export interface GetSupplierDto { zipCode?: string | null; city?: string | null; deliveryDelay?: number; - products?: Array | null; prices?: Array | null; } diff --git a/src/app/services/api/model/get-token-dto.ts b/src/app/services/api/model/get-token-dto.ts index 1078bed..3419c33 100644 --- a/src/app/services/api/model/get-token-dto.ts +++ b/src/app/services/api/model/get-token-dto.ts @@ -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 GetTokenDto { +export interface GetTokenDto { token?: string | null; } diff --git a/src/app/services/api/model/get-total-quantity-dto.ts b/src/app/services/api/model/get-total-quantity-dto.ts index 6231f8e..c23620f 100644 --- a/src/app/services/api/model/get-total-quantity-dto.ts +++ b/src/app/services/api/model/get-total-quantity-dto.ts @@ -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 GetTotalQuantityDto { +export interface GetTotalQuantityDto { productId?: number; totalQuantity?: number; } diff --git a/src/app/services/api/model/get-user-dto.ts b/src/app/services/api/model/get-user-dto.ts index e4121b6..e66da7e 100644 --- a/src/app/services/api/model/get-user-dto.ts +++ b/src/app/services/api/model/get-user-dto.ts @@ -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 GetUserDto { +export interface GetUserDto { id?: number; name?: string | null; password?: string | null; diff --git a/src/app/services/api/model/get-ware-house-product-dto.ts b/src/app/services/api/model/get-ware-house-product-dto.ts index 8e4e0fb..8efc1de 100644 --- a/src/app/services/api/model/get-ware-house-product-dto.ts +++ b/src/app/services/api/model/get-ware-house-product-dto.ts @@ -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 GetWareHouseProductDto { +export interface GetWareHouseProductDto { quantity?: number; wareHouseId?: number; productId?: number; diff --git a/src/app/services/api/model/models.ts b/src/app/services/api/model/models.ts index f8ad444..ca69a14 100644 --- a/src/app/services/api/model/models.ts +++ b/src/app/services/api/model/models.ts @@ -1,3 +1,4 @@ +export * from './add-quotation-product-dto'; export * from './connect-user-dto'; export * from './create-deliverer-dto'; export * from './create-delivery-note-dto'; @@ -7,7 +8,6 @@ export * from './create-purchase-order-dto'; export * from './create-purchase-order-product-dto'; export * from './create-purchase-product-dto'; export * from './create-quotation-dto'; -export * from './create-quotation-product-dto'; export * from './create-setting-dto'; export * from './create-supplier-dto'; export * from './create-user-dto'; @@ -32,6 +32,7 @@ export * from './patch-product-minimal-stock-dto'; export * from './patch-purchase-order-purchase-conditions-dto'; export * from './patch-purchase-product-quantity-dto'; export * from './patch-quotation-conditions-sale-dto'; +export * from './patch-quotation-message-dto'; export * from './patch-quotation-product-quantity-dto'; export * from './patch-setting-electronic-signature-dto'; export * from './patch-setting-logo-dto'; diff --git a/src/app/services/api/model/patch-delivery-note-real-delivery-date-dto.ts b/src/app/services/api/model/patch-delivery-note-real-delivery-date-dto.ts index c851cdf..8095bf9 100644 --- a/src/app/services/api/model/patch-delivery-note-real-delivery-date-dto.ts +++ b/src/app/services/api/model/patch-delivery-note-real-delivery-date-dto.ts @@ -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 PatchDeliveryNoteRealDeliveryDateDto { +export interface PatchDeliveryNoteRealDeliveryDateDto { realDeliveryDate?: string; } diff --git a/src/app/services/api/model/patch-price-selling-price-dto.ts b/src/app/services/api/model/patch-price-selling-price-dto.ts index 29333df..89d4afb 100644 --- a/src/app/services/api/model/patch-price-selling-price-dto.ts +++ b/src/app/services/api/model/patch-price-selling-price-dto.ts @@ -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 PatchPriceSellingPriceDto { +export interface PatchPriceSellingPriceDto { sellingPrice?: number; } diff --git a/src/app/services/api/model/patch-product-minimal-stock-dto.ts b/src/app/services/api/model/patch-product-minimal-stock-dto.ts index b37e9db..94df8ec 100644 --- a/src/app/services/api/model/patch-product-minimal-stock-dto.ts +++ b/src/app/services/api/model/patch-product-minimal-stock-dto.ts @@ -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 PatchProductMinimalStockDto { +export interface PatchProductMinimalStockDto { minimalQuantity?: number; } diff --git a/src/app/services/api/model/patch-purchase-order-purchase-conditions-dto.ts b/src/app/services/api/model/patch-purchase-order-purchase-conditions-dto.ts index 710de0d..5826679 100644 --- a/src/app/services/api/model/patch-purchase-order-purchase-conditions-dto.ts +++ b/src/app/services/api/model/patch-purchase-order-purchase-conditions-dto.ts @@ -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 PatchPurchaseOrderPurchaseConditionsDto { +export interface PatchPurchaseOrderPurchaseConditionsDto { purchaseConditions?: string | null; } diff --git a/src/app/services/api/model/patch-purchase-product-quantity-dto.ts b/src/app/services/api/model/patch-purchase-product-quantity-dto.ts index d8355ee..f793a24 100644 --- a/src/app/services/api/model/patch-purchase-product-quantity-dto.ts +++ b/src/app/services/api/model/patch-purchase-product-quantity-dto.ts @@ -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 PatchPurchaseProductQuantityDto { +export interface PatchPurchaseProductQuantityDto { quantity?: number; } diff --git a/src/app/services/api/model/patch-quotation-conditions-sale-dto.ts b/src/app/services/api/model/patch-quotation-conditions-sale-dto.ts index 36fd3db..4a7921b 100644 --- a/src/app/services/api/model/patch-quotation-conditions-sale-dto.ts +++ b/src/app/services/api/model/patch-quotation-conditions-sale-dto.ts @@ -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 PatchQuotationConditionsSaleDto { +export interface PatchQuotationConditionsSaleDto { conditionsSale?: string | null; } diff --git a/src/app/services/api/model/patch-quotation-message-dto.ts b/src/app/services/api/model/patch-quotation-message-dto.ts new file mode 100644 index 0000000..7b281f6 --- /dev/null +++ b/src/app/services/api/model/patch-quotation-message-dto.ts @@ -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 PatchQuotationMessageDto { + message?: string | null; +} + diff --git a/src/app/services/api/model/patch-quotation-product-quantity-dto.ts b/src/app/services/api/model/patch-quotation-product-quantity-dto.ts index e32072a..67b5f1a 100644 --- a/src/app/services/api/model/patch-quotation-product-quantity-dto.ts +++ b/src/app/services/api/model/patch-quotation-product-quantity-dto.ts @@ -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 PatchQuotationProductQuantityDto { +export interface PatchQuotationProductQuantityDto { quantity?: number; } diff --git a/src/app/services/api/model/patch-setting-electronic-signature-dto.ts b/src/app/services/api/model/patch-setting-electronic-signature-dto.ts index 13bcdbd..4b352b5 100644 --- a/src/app/services/api/model/patch-setting-electronic-signature-dto.ts +++ b/src/app/services/api/model/patch-setting-electronic-signature-dto.ts @@ -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 PatchSettingElectronicSignatureDto { - electronicSignature?: string | null; +export interface PatchSettingElectronicSignatureDto { + electronicSignature?: Blob | null; } diff --git a/src/app/services/api/model/patch-setting-logo-dto.ts b/src/app/services/api/model/patch-setting-logo-dto.ts index 3257ca9..29f2ef8 100644 --- a/src/app/services/api/model/patch-setting-logo-dto.ts +++ b/src/app/services/api/model/patch-setting-logo-dto.ts @@ -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 PatchSettingLogoDto { - logo?: string | null; +export interface PatchSettingLogoDto { + logo?: Blob | null; } diff --git a/src/app/services/api/model/patch-supplier-delivery-delay-dto.ts b/src/app/services/api/model/patch-supplier-delivery-delay-dto.ts index 41585ec..de9555b 100644 --- a/src/app/services/api/model/patch-supplier-delivery-delay-dto.ts +++ b/src/app/services/api/model/patch-supplier-delivery-delay-dto.ts @@ -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 PatchSupplierDeliveryDelayDto { +export interface PatchSupplierDeliveryDelayDto { deliveryDelay?: number; } diff --git a/src/app/services/api/model/patch-user-password-dto.ts b/src/app/services/api/model/patch-user-password-dto.ts index c9ac320..f9dec43 100644 --- a/src/app/services/api/model/patch-user-password-dto.ts +++ b/src/app/services/api/model/patch-user-password-dto.ts @@ -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 PatchUserPasswordDto { +export interface PatchUserPasswordDto { password?: string | null; } diff --git a/src/app/services/api/model/patch-ware-house-product-quantity-dto.ts b/src/app/services/api/model/patch-ware-house-product-quantity-dto.ts index 4899b61..ccc0dad 100644 --- a/src/app/services/api/model/patch-ware-house-product-quantity-dto.ts +++ b/src/app/services/api/model/patch-ware-house-product-quantity-dto.ts @@ -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 PatchWareHouseProductQuantityDto { +export interface PatchWareHouseProductQuantityDto { quantity?: number; } diff --git a/src/app/services/api/model/update-deliverer-dto.ts b/src/app/services/api/model/update-deliverer-dto.ts index 68032be..843fe76 100644 --- a/src/app/services/api/model/update-deliverer-dto.ts +++ b/src/app/services/api/model/update-deliverer-dto.ts @@ -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 UpdateDelivererDto { +export interface UpdateDelivererDto { transporter?: string | null; } diff --git a/src/app/services/api/model/update-delivery-note-dto.ts b/src/app/services/api/model/update-delivery-note-dto.ts index 181449d..7d11f6a 100644 --- a/src/app/services/api/model/update-delivery-note-dto.ts +++ b/src/app/services/api/model/update-delivery-note-dto.ts @@ -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 UpdateDeliveryNoteDto { +export interface UpdateDeliveryNoteDto { trackingNumber?: string | null; estimateDeliveryDate?: string; expeditionDate?: string; diff --git a/src/app/services/api/model/update-product-dto.ts b/src/app/services/api/model/update-product-dto.ts index f191e22..c1aeeb2 100644 --- a/src/app/services/api/model/update-product-dto.ts +++ b/src/app/services/api/model/update-product-dto.ts @@ -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 UpdateProductDto { +export interface UpdateProductDto { references?: string | null; name?: string | null; duration?: number; diff --git a/src/app/services/api/model/update-quotation-dto.ts b/src/app/services/api/model/update-quotation-dto.ts index 5895594..8ddeab3 100644 --- a/src/app/services/api/model/update-quotation-dto.ts +++ b/src/app/services/api/model/update-quotation-dto.ts @@ -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 UpdateQuotationDto { +export interface UpdateQuotationDto { message?: string | null; conditionsSale?: string | null; } diff --git a/src/app/services/api/model/update-supplier-dto.ts b/src/app/services/api/model/update-supplier-dto.ts index d2c7c5a..d835318 100644 --- a/src/app/services/api/model/update-supplier-dto.ts +++ b/src/app/services/api/model/update-supplier-dto.ts @@ -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 UpdateSupplierDto { +export interface UpdateSupplierDto { name?: string | null; email?: string | null; phone?: string | null; diff --git a/src/app/services/api/model/update-user-dto.ts b/src/app/services/api/model/update-user-dto.ts index 672015b..d8d4d7c 100644 --- a/src/app/services/api/model/update-user-dto.ts +++ b/src/app/services/api/model/update-user-dto.ts @@ -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 UpdateUserDto { +export interface UpdateUserDto { name?: string | null; password?: string | null; fonction?: string | null; diff --git a/src/app/services/api/param.ts b/src/app/services/api/param.ts index 78a2d20..7f0592c 100644 --- a/src/app/services/api/param.ts +++ b/src/app/services/api/param.ts @@ -2,14 +2,14 @@ * Standard parameter styles defined by OpenAPI spec */ export type StandardParamStyle = - | 'matrix' - | 'label' - | 'form' - | 'simple' - | 'spaceDelimited' - | 'pipeDelimited' - | 'deepObject' - ; + | 'matrix' + | 'label' + | 'form' + | 'simple' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + ; /** * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. @@ -25,13 +25,13 @@ export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; * Standard types as defined in OpenAPI Specification: Data Types */ export type StandardDataType = - | "integer" - | "number" - | "boolean" - | "string" - | "object" - | "array" - ; + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; /** * Standard {@link DataType}s plus your own types/classes. @@ -42,16 +42,16 @@ export type DataType = StandardDataType | string; * Standard formats as defined in OpenAPI Specification: Data Types */ export type StandardDataFormat = - | "int32" - | "int64" - | "float" - | "double" - | "byte" - | "binary" - | "date" - | "date-time" - | "password" - ; + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; export type DataFormat = StandardDataFormat | string; @@ -59,11 +59,11 @@ export type DataFormat = StandardDataFormat | string; * The parameter to encode. */ export interface Param { - name: string; - value: unknown; - in: ParamLocation; - style: ParamStyle, - explode: boolean; - dataType: DataType; - dataFormat: DataFormat | undefined; + name: string; + value: unknown; + in: ParamLocation; + style: ParamStyle, + explode: boolean; + dataType: DataType; + dataFormat: DataFormat | undefined; } diff --git a/src/app/services/api/provide-api.ts b/src/app/services/api/provide-api.ts index 19c762a..b63aa71 100644 --- a/src/app/services/api/provide-api.ts +++ b/src/app/services/api/provide-api.ts @@ -1,15 +1,15 @@ -import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core"; -import { Configuration, ConfigurationParameters } from './configuration'; -import { BASE_PATH } from './variables'; +import {EnvironmentProviders, makeEnvironmentProviders} from "@angular/core"; +import {Configuration, ConfigurationParameters} from './configuration'; +import {BASE_PATH} from './variables'; // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig). export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders { return makeEnvironmentProviders([ typeof configOrBasePath === "string" - ? { provide: BASE_PATH, useValue: configOrBasePath } + ? {provide: BASE_PATH, useValue: configOrBasePath} : { provide: Configuration, - useValue: new Configuration({ ...configOrBasePath }), + useValue: new Configuration({...configOrBasePath}), }, ]); } \ No newline at end of file diff --git a/src/app/services/api/variables.ts b/src/app/services/api/variables.ts index 6fe5854..ac9262f 100644 --- a/src/app/services/api/variables.ts +++ b/src/app/services/api/variables.ts @@ -1,4 +1,4 @@ -import { InjectionToken } from '@angular/core'; +import {InjectionToken} from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { diff --git a/src/app/services/file.service.ts b/src/app/services/file.service.ts index 3828709..f9dc5fe 100644 --- a/src/app/services/file.service.ts +++ b/src/app/services/file.service.ts @@ -1,18 +1,14 @@ -import { Injectable } from '@angular/core'; +import {Injectable} from '@angular/core'; import {HttpResponse} from "@angular/common/http"; @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class FileService { getFilenameFromHttpResponse(httpResponse: HttpResponse) { const contentDispositionHeader = httpResponse.headers.get('Content-Disposition'); - // console.log(contentDispositionHeader); let result = contentDispositionHeader.split(';')[1].trim().split('=')[1]; - // Removing the " from the after trim operation result = result.replace(/"/g, ''); - // Removing . from filename - // return result.replace(/./g, '_'); return result; } diff --git a/src/index.html b/src/index.html index 4570243..b3cdbf9 100644 --- a/src/index.html +++ b/src/index.html @@ -1,13 +1,14 @@ - - PyrofetesFrontend - - - + + PyroFêtes + + + - + diff --git a/src/main.ts b/src/main.ts index 5df75f9..d25a841 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; -import { App } from './app/app'; +import {bootstrapApplication} from '@angular/platform-browser'; +import {appConfig} from './app/app.config'; +import {App} from './app/app'; bootstrapApplication(App, appConfig) - .catch((err) => console.error(err)); + .catch((err) => console.error(err)); diff --git a/src/theme.less b/src/theme.less index ecf2541..532bbd2 100644 --- a/src/theme.less +++ b/src/theme.less @@ -1,4 +1,3 @@ - // Custom Theming for NG-ZORRO // For more information: https://ng.ant.design/docs/customize-theme/en @import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";