| @@ -137,6 +137,7 @@ export const postForm = new FormGroup({ | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []), | |||
| comments: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -145,7 +146,8 @@ export const postPostingCreateForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []) | |||
| }); | |||
| export const postPostingPatchForm = new FormGroup({ | |||
| @@ -161,6 +163,7 @@ export const postJsonhalForm = new FormGroup({ | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []), | |||
| comments: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -170,7 +173,8 @@ export const postJsonhalPostingCreateForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []) | |||
| }); | |||
| export const postJsonldForm = new FormGroup({ | |||
| @@ -180,6 +184,7 @@ export const postJsonldForm = new FormGroup({ | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []), | |||
| comments: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -188,7 +193,8 @@ export const postJsonldPostingCreateForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| message: new FormControl(null, [Validators.required]), | |||
| partner: new FormControl(null, []), | |||
| contact: new FormControl(null, []) | |||
| contact: new FormControl(null, []), | |||
| sale: new FormControl(null, []) | |||
| }); | |||
| export const productForm = new FormGroup({ | |||
| @@ -216,6 +222,71 @@ export const productJsonldForm = new FormGroup({ | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const saleForm = new FormGroup({ | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| partnerName: new FormControl(null, []), | |||
| product: new FormControl(null, []), | |||
| productName: new FormControl(null, []), | |||
| turnover: new FormControl(null, [Validators.required]), | |||
| profit: new FormControl(null, []), | |||
| comment: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []), | |||
| posts: new FormControl(null, []) | |||
| }); | |||
| export const saleJsonhalForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| partnerName: new FormControl(null, []), | |||
| product: new FormControl(null, []), | |||
| productName: new FormControl(null, []), | |||
| turnover: new FormControl(null, [Validators.required]), | |||
| profit: new FormControl(null, []), | |||
| comment: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []), | |||
| posts: new FormControl(null, []) | |||
| }); | |||
| export const saleJsonldForm = new FormGroup({ | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| partner: new FormControl(null, []), | |||
| partnerName: new FormControl(null, []), | |||
| product: new FormControl(null, []), | |||
| productName: new FormControl(null, []), | |||
| turnover: new FormControl(null, [Validators.required]), | |||
| profit: new FormControl(null, []), | |||
| comment: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []), | |||
| posts: new FormControl(null, []) | |||
| }); | |||
| export const saleSummaryForm = new FormGroup({ | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| turnover: new FormControl(null, []), | |||
| profit: new FormControl(null, []) | |||
| }); | |||
| export const saleSummaryJsonhalForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| turnover: new FormControl(null, []), | |||
| profit: new FormControl(null, []) | |||
| }); | |||
| export const saleSummaryJsonldForm = new FormGroup({ | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| turnover: new FormControl(null, []), | |||
| profit: new FormControl(null, []) | |||
| }); | |||
| export const taskForm = new FormGroup({ | |||
| headline: new FormControl(null, [Validators.required]), | |||
| description: new FormControl(null, [Validators.required]), | |||
| @@ -229,7 +300,8 @@ export const taskForm = new FormGroup({ | |||
| contact: new FormControl(null, []), | |||
| contactName: new FormControl(null, []), | |||
| prio: new FormControl(null, [Validators.required]), | |||
| completed: new FormControl(null, []), | |||
| completed: new FormControl(null, [Validators.required]), | |||
| taskNotes: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -247,7 +319,8 @@ export const taskJsonhalForm = new FormGroup({ | |||
| contact: new FormControl(null, []), | |||
| contactName: new FormControl(null, []), | |||
| prio: new FormControl(null, [Validators.required]), | |||
| completed: new FormControl(null, []), | |||
| completed: new FormControl(null, [Validators.required]), | |||
| taskNotes: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -264,7 +337,33 @@ export const taskJsonldForm = new FormGroup({ | |||
| contact: new FormControl(null, []), | |||
| contactName: new FormControl(null, []), | |||
| prio: new FormControl(null, [Validators.required]), | |||
| completed: new FormControl(null, []), | |||
| completed: new FormControl(null, [Validators.required]), | |||
| taskNotes: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const taskNoteForm = new FormGroup({ | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| task: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const taskNoteJsonhalForm = new FormGroup({ | |||
| _links: new FormControl(null, []), | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| task: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| export const taskNoteJsonldForm = new FormGroup({ | |||
| message: new FormControl(null, [Validators.required]), | |||
| owner: new FormControl(null, []), | |||
| ownerName: new FormControl(null, []), | |||
| task: new FormControl(null, []), | |||
| createdAt: new FormControl(null, []) | |||
| }); | |||
| @@ -9,7 +9,10 @@ api/media.service.ts | |||
| api/partner.service.ts | |||
| api/post.service.ts | |||
| api/product.service.ts | |||
| api/sale.service.ts | |||
| api/saleSummary.service.ts | |||
| api/task.service.ts | |||
| api/taskNote.service.ts | |||
| api/user.service.ts | |||
| configuration.ts | |||
| encoder.ts | |||
| @@ -32,6 +35,12 @@ model/apiPostsGetCollection200Response.ts | |||
| model/apiPostsGetCollection200Response1.ts | |||
| model/apiProductsGetCollection200Response.ts | |||
| model/apiProductsGetCollection200Response1.ts | |||
| model/apiSaleSummariesGetCollection200Response.ts | |||
| model/apiSaleSummariesGetCollection200Response1.ts | |||
| model/apiSalesGetCollection200Response.ts | |||
| model/apiSalesGetCollection200Response1.ts | |||
| model/apiTaskNotesGetCollection200Response.ts | |||
| model/apiTaskNotesGetCollection200Response1.ts | |||
| model/apiTasksGetCollection200Response.ts | |||
| model/apiTasksGetCollection200Response1.ts | |||
| model/apiUsersGetCollection200Response.ts | |||
| @@ -64,9 +73,18 @@ model/postPostingPatch.ts | |||
| model/product.ts | |||
| model/productJsonhal.ts | |||
| model/productJsonld.ts | |||
| model/sale.ts | |||
| model/saleJsonhal.ts | |||
| model/saleJsonld.ts | |||
| model/saleSummary.ts | |||
| model/saleSummaryJsonhal.ts | |||
| model/saleSummaryJsonld.ts | |||
| model/task.ts | |||
| model/taskJsonhal.ts | |||
| model/taskJsonld.ts | |||
| model/taskNote.ts | |||
| model/taskNoteJsonhal.ts | |||
| model/taskNoteJsonld.ts | |||
| model/user.ts | |||
| model/userJsonhal.ts | |||
| model/userJsonld.ts | |||
| @@ -12,8 +12,14 @@ export * from './post.service'; | |||
| import { PostService } from './post.service'; | |||
| export * from './product.service'; | |||
| import { ProductService } from './product.service'; | |||
| export * from './sale.service'; | |||
| import { SaleService } from './sale.service'; | |||
| export * from './saleSummary.service'; | |||
| import { SaleSummaryService } from './saleSummary.service'; | |||
| export * from './task.service'; | |||
| import { TaskService } from './task.service'; | |||
| export * from './taskNote.service'; | |||
| import { TaskNoteService } from './taskNote.service'; | |||
| export * from './user.service'; | |||
| import { UserService } from './user.service'; | |||
| export const APIS = [CommentService, ContactService, LoginCheckService, MediaService, PartnerService, PostService, ProductService, TaskService, UserService]; | |||
| export const APIS = [CommentService, ContactService, LoginCheckService, MediaService, PartnerService, PostService, ProductService, SaleService, SaleSummaryService, TaskService, TaskNoteService, UserService]; | |||
| @@ -0,0 +1,533 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 { ApiSalesGetCollection200Response } from '../model/apiSalesGetCollection200Response'; | |||
| // @ts-ignore | |||
| import { ApiSalesGetCollection200Response1 } from '../model/apiSalesGetCollection200Response1'; | |||
| // @ts-ignore | |||
| import { Sale } from '../model/sale'; | |||
| // @ts-ignore | |||
| import { SaleJsonhal } from '../model/saleJsonhal'; | |||
| // @ts-ignore | |||
| import { SaleJsonld } from '../model/saleJsonld'; | |||
| // @ts-ignore | |||
| import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | |||
| import { Configuration } from '../configuration'; | |||
| @Injectable({ | |||
| providedIn: 'root' | |||
| }) | |||
| export class SaleService { | |||
| protected basePath = 'http://localhost'; | |||
| public defaultHeaders = new HttpHeaders(); | |||
| public configuration = new Configuration(); | |||
| public encoder: HttpParameterCodec; | |||
| constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { | |||
| if (configuration) { | |||
| this.configuration = configuration; | |||
| } | |||
| if (typeof this.configuration.basePath !== 'string') { | |||
| if (Array.isArray(basePath) && basePath.length > 0) { | |||
| basePath = basePath[0]; | |||
| } | |||
| if (typeof basePath !== 'string') { | |||
| basePath = this.basePath; | |||
| } | |||
| this.configuration.basePath = basePath; | |||
| } | |||
| this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); | |||
| } | |||
| // @ts-ignore | |||
| private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { | |||
| if (typeof value === "object" && value instanceof Date === false) { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value); | |||
| } else { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value, key); | |||
| } | |||
| return httpParams; | |||
| } | |||
| private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { | |||
| if (value == null) { | |||
| return httpParams; | |||
| } | |||
| if (typeof value === "object") { | |||
| if (Array.isArray(value)) { | |||
| (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); | |||
| } else if (value instanceof Date) { | |||
| if (key != null) { | |||
| httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); | |||
| } else { | |||
| throw Error("key may not be null if value is Date"); | |||
| } | |||
| } else { | |||
| Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( | |||
| httpParams, value[k], key != null ? `${key}.${k}` : k)); | |||
| } | |||
| } else if (key != null) { | |||
| httpParams = httpParams.append(key, value); | |||
| } else { | |||
| throw Error("key may not be null if value is not object or array"); | |||
| } | |||
| return httpParams; | |||
| } | |||
| /** | |||
| * Retrieves the collection of Sale resources. | |||
| * Retrieves the collection of Sale resources. | |||
| * @param page The collection page number | |||
| * @param itemsPerPage The number of items per page | |||
| * @param owner | |||
| * @param owner2 | |||
| * @param partner | |||
| * @param partner2 | |||
| * @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 salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiSalesGetCollection200Response>; | |||
| public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiSalesGetCollection200Response>>; | |||
| public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiSalesGetCollection200Response>>; | |||
| public salesGetCollection(page?: number, itemsPerPage?: number, owner?: string, owner2?: Array<string>, partner?: string, partner2?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| let localVarQueryParameters = new HttpParams({encoder: this.encoder}); | |||
| if (page !== undefined && page !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>page, 'page'); | |||
| } | |||
| if (itemsPerPage !== undefined && itemsPerPage !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>itemsPerPage, 'itemsPerPage'); | |||
| } | |||
| if (owner !== undefined && owner !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>owner, 'owner'); | |||
| } | |||
| if (owner2) { | |||
| owner2.forEach((element) => { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>element, 'owner[]'); | |||
| }) | |||
| } | |||
| if (partner !== undefined && partner !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>partner, 'partner'); | |||
| } | |||
| if (partner2) { | |||
| partner2.forEach((element) => { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>element, 'partner[]'); | |||
| }) | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/sales`; | |||
| return this.httpClient.request<ApiSalesGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| params: localVarQueryParameters, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Removes the Sale resource. | |||
| * Removes the Sale resource. | |||
| * @param id SaleApi identifier | |||
| * @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 salesIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>; | |||
| public salesIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>; | |||
| public salesIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>; | |||
| public salesIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling salesIdDelete.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/sales/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Retrieves a Sale resource. | |||
| * Retrieves a Sale resource. | |||
| * @param id SaleApi identifier | |||
| * @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 salesIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<SaleJsonld>; | |||
| public salesIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<SaleJsonld>>; | |||
| public salesIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<SaleJsonld>>; | |||
| public salesIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling salesIdGet.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/sales/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<SaleJsonld>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Updates the Sale resource. | |||
| * Updates the Sale resource. | |||
| * @param id SaleApi identifier | |||
| * @param sale The updated Sale resource | |||
| * @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 salesIdPatch(id: string, sale: Sale, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<SaleJsonld>; | |||
| public salesIdPatch(id: string, sale: Sale, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<SaleJsonld>>; | |||
| public salesIdPatch(id: string, sale: Sale, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<SaleJsonld>>; | |||
| public salesIdPatch(id: string, sale: Sale, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling salesIdPatch.'); | |||
| } | |||
| if (sale === null || sale === undefined) { | |||
| throw new Error('Required parameter sale was null or undefined when calling salesIdPatch.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| // to determine the Content-Type header | |||
| const consumes: string[] = [ | |||
| 'application/merge-patch+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/sales/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<SaleJsonld>('patch', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: sale, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Creates a Sale resource. | |||
| * Creates a Sale resource. | |||
| * @param saleJsonld The new Sale resource | |||
| * @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 salesPost(saleJsonld: SaleJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<SaleJsonld>; | |||
| public salesPost(saleJsonld: SaleJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<SaleJsonld>>; | |||
| public salesPost(saleJsonld: SaleJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<SaleJsonld>>; | |||
| public salesPost(saleJsonld: SaleJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (saleJsonld === null || saleJsonld === undefined) { | |||
| throw new Error('Required parameter saleJsonld was null or undefined when calling salesPost.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| // to determine the Content-Type header | |||
| const consumes: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+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/sales`; | |||
| return this.httpClient.request<SaleJsonld>('post', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: saleJsonld, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| } | |||
| @@ -0,0 +1,182 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 { ApiSaleSummariesGetCollection200Response } from '../model/apiSaleSummariesGetCollection200Response'; | |||
| // @ts-ignore | |||
| import { ApiSaleSummariesGetCollection200Response1 } from '../model/apiSaleSummariesGetCollection200Response1'; | |||
| // @ts-ignore | |||
| import { SaleSummary } from '../model/saleSummary'; | |||
| // @ts-ignore | |||
| import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | |||
| import { Configuration } from '../configuration'; | |||
| @Injectable({ | |||
| providedIn: 'root' | |||
| }) | |||
| export class SaleSummaryService { | |||
| protected basePath = 'http://localhost'; | |||
| public defaultHeaders = new HttpHeaders(); | |||
| public configuration = new Configuration(); | |||
| public encoder: HttpParameterCodec; | |||
| constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { | |||
| if (configuration) { | |||
| this.configuration = configuration; | |||
| } | |||
| if (typeof this.configuration.basePath !== 'string') { | |||
| if (Array.isArray(basePath) && basePath.length > 0) { | |||
| basePath = basePath[0]; | |||
| } | |||
| if (typeof basePath !== 'string') { | |||
| basePath = this.basePath; | |||
| } | |||
| this.configuration.basePath = basePath; | |||
| } | |||
| this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); | |||
| } | |||
| // @ts-ignore | |||
| private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { | |||
| if (typeof value === "object" && value instanceof Date === false) { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value); | |||
| } else { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value, key); | |||
| } | |||
| return httpParams; | |||
| } | |||
| private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { | |||
| if (value == null) { | |||
| return httpParams; | |||
| } | |||
| if (typeof value === "object") { | |||
| if (Array.isArray(value)) { | |||
| (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); | |||
| } else if (value instanceof Date) { | |||
| if (key != null) { | |||
| httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); | |||
| } else { | |||
| throw Error("key may not be null if value is Date"); | |||
| } | |||
| } else { | |||
| Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( | |||
| httpParams, value[k], key != null ? `${key}.${k}` : k)); | |||
| } | |||
| } else if (key != null) { | |||
| httpParams = httpParams.append(key, value); | |||
| } else { | |||
| throw Error("key may not be null if value is not object or array"); | |||
| } | |||
| return httpParams; | |||
| } | |||
| /** | |||
| * Retrieves the collection of SaleSummary resources. | |||
| * Retrieves the collection of SaleSummary resources. | |||
| * @param page The collection page number | |||
| * @param itemsPerPage The number of items per page | |||
| * @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 saleSummariesGetCollection(page?: number, itemsPerPage?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiSaleSummariesGetCollection200Response>; | |||
| public saleSummariesGetCollection(page?: number, itemsPerPage?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiSaleSummariesGetCollection200Response>>; | |||
| public saleSummariesGetCollection(page?: number, itemsPerPage?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiSaleSummariesGetCollection200Response>>; | |||
| public saleSummariesGetCollection(page?: number, itemsPerPage?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| let localVarQueryParameters = new HttpParams({encoder: this.encoder}); | |||
| if (page !== undefined && page !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>page, 'page'); | |||
| } | |||
| if (itemsPerPage !== undefined && itemsPerPage !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>itemsPerPage, 'itemsPerPage'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/sale_summaries`; | |||
| return this.httpClient.request<ApiSaleSummariesGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| params: localVarQueryParameters, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| } | |||
| @@ -0,0 +1,521 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 { ApiTaskNotesGetCollection200Response } from '../model/apiTaskNotesGetCollection200Response'; | |||
| // @ts-ignore | |||
| import { ApiTaskNotesGetCollection200Response1 } from '../model/apiTaskNotesGetCollection200Response1'; | |||
| // @ts-ignore | |||
| import { TaskNote } from '../model/taskNote'; | |||
| // @ts-ignore | |||
| import { TaskNoteJsonhal } from '../model/taskNoteJsonhal'; | |||
| // @ts-ignore | |||
| import { TaskNoteJsonld } from '../model/taskNoteJsonld'; | |||
| // @ts-ignore | |||
| import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; | |||
| import { Configuration } from '../configuration'; | |||
| @Injectable({ | |||
| providedIn: 'root' | |||
| }) | |||
| export class TaskNoteService { | |||
| protected basePath = 'http://localhost'; | |||
| public defaultHeaders = new HttpHeaders(); | |||
| public configuration = new Configuration(); | |||
| public encoder: HttpParameterCodec; | |||
| constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { | |||
| if (configuration) { | |||
| this.configuration = configuration; | |||
| } | |||
| if (typeof this.configuration.basePath !== 'string') { | |||
| if (Array.isArray(basePath) && basePath.length > 0) { | |||
| basePath = basePath[0]; | |||
| } | |||
| if (typeof basePath !== 'string') { | |||
| basePath = this.basePath; | |||
| } | |||
| this.configuration.basePath = basePath; | |||
| } | |||
| this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); | |||
| } | |||
| // @ts-ignore | |||
| private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { | |||
| if (typeof value === "object" && value instanceof Date === false) { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value); | |||
| } else { | |||
| httpParams = this.addToHttpParamsRecursive(httpParams, value, key); | |||
| } | |||
| return httpParams; | |||
| } | |||
| private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { | |||
| if (value == null) { | |||
| return httpParams; | |||
| } | |||
| if (typeof value === "object") { | |||
| if (Array.isArray(value)) { | |||
| (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); | |||
| } else if (value instanceof Date) { | |||
| if (key != null) { | |||
| httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); | |||
| } else { | |||
| throw Error("key may not be null if value is Date"); | |||
| } | |||
| } else { | |||
| Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( | |||
| httpParams, value[k], key != null ? `${key}.${k}` : k)); | |||
| } | |||
| } else if (key != null) { | |||
| httpParams = httpParams.append(key, value); | |||
| } else { | |||
| throw Error("key may not be null if value is not object or array"); | |||
| } | |||
| return httpParams; | |||
| } | |||
| /** | |||
| * Retrieves the collection of TaskNote resources. | |||
| * Retrieves the collection of TaskNote resources. | |||
| * @param page The collection page number | |||
| * @param itemsPerPage The number of items per page | |||
| * @param task | |||
| * @param task2 | |||
| * @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 taskNotesGetCollection(page?: number, itemsPerPage?: number, task?: string, task2?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<ApiTaskNotesGetCollection200Response>; | |||
| public taskNotesGetCollection(page?: number, itemsPerPage?: number, task?: string, task2?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ApiTaskNotesGetCollection200Response>>; | |||
| public taskNotesGetCollection(page?: number, itemsPerPage?: number, task?: string, task2?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ApiTaskNotesGetCollection200Response>>; | |||
| public taskNotesGetCollection(page?: number, itemsPerPage?: number, task?: string, task2?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| let localVarQueryParameters = new HttpParams({encoder: this.encoder}); | |||
| if (page !== undefined && page !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>page, 'page'); | |||
| } | |||
| if (itemsPerPage !== undefined && itemsPerPage !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>itemsPerPage, 'itemsPerPage'); | |||
| } | |||
| if (task !== undefined && task !== null) { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>task, 'task'); | |||
| } | |||
| if (task2) { | |||
| task2.forEach((element) => { | |||
| localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, | |||
| <any>element, 'task[]'); | |||
| }) | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/task_notes`; | |||
| return this.httpClient.request<ApiTaskNotesGetCollection200Response>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| params: localVarQueryParameters, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Removes the TaskNote resource. | |||
| * Removes the TaskNote resource. | |||
| * @param id TaskNoteApi identifier | |||
| * @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 taskNotesIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>; | |||
| public taskNotesIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>; | |||
| public taskNotesIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>; | |||
| public taskNotesIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling taskNotesIdDelete.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/task_notes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<any>('delete', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Retrieves a TaskNote resource. | |||
| * Retrieves a TaskNote resource. | |||
| * @param id TaskNoteApi identifier | |||
| * @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 taskNotesIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskNoteJsonld>; | |||
| public taskNotesIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskNoteJsonld>>; | |||
| public taskNotesIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskNoteJsonld>>; | |||
| public taskNotesIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling taskNotesIdGet.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = 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/task_notes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<TaskNoteJsonld>('get', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Updates the TaskNote resource. | |||
| * Updates the TaskNote resource. | |||
| * @param id TaskNoteApi identifier | |||
| * @param taskNote The updated TaskNote resource | |||
| * @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 taskNotesIdPatch(id: string, taskNote: TaskNote, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskNoteJsonld>; | |||
| public taskNotesIdPatch(id: string, taskNote: TaskNote, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskNoteJsonld>>; | |||
| public taskNotesIdPatch(id: string, taskNote: TaskNote, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskNoteJsonld>>; | |||
| public taskNotesIdPatch(id: string, taskNote: TaskNote, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (id === null || id === undefined) { | |||
| throw new Error('Required parameter id was null or undefined when calling taskNotesIdPatch.'); | |||
| } | |||
| if (taskNote === null || taskNote === undefined) { | |||
| throw new Error('Required parameter taskNote was null or undefined when calling taskNotesIdPatch.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| // to determine the Content-Type header | |||
| const consumes: string[] = [ | |||
| 'application/merge-patch+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/task_notes/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; | |||
| return this.httpClient.request<TaskNoteJsonld>('patch', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: taskNote, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| /** | |||
| * Creates a TaskNote resource. | |||
| * Creates a TaskNote resource. | |||
| * @param taskNoteJsonld The new TaskNote resource | |||
| * @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 taskNotesPost(taskNoteJsonld: TaskNoteJsonld, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<TaskNoteJsonld>; | |||
| public taskNotesPost(taskNoteJsonld: TaskNoteJsonld, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<TaskNoteJsonld>>; | |||
| public taskNotesPost(taskNoteJsonld: TaskNoteJsonld, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<TaskNoteJsonld>>; | |||
| public taskNotesPost(taskNoteJsonld: TaskNoteJsonld, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/ld+json' | 'application/json' | 'text/html' | 'application/hal+json', context?: HttpContext, transferCache?: boolean}): Observable<any> { | |||
| if (taskNoteJsonld === null || taskNoteJsonld === undefined) { | |||
| throw new Error('Required parameter taskNoteJsonld was null or undefined when calling taskNotesPost.'); | |||
| } | |||
| let localVarHeaders = this.defaultHeaders; | |||
| let localVarCredential: string | undefined; | |||
| // authentication (JWT) required | |||
| localVarCredential = this.configuration.lookupCredential('JWT'); | |||
| if (localVarCredential) { | |||
| localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); | |||
| } | |||
| let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; | |||
| if (localVarHttpHeaderAcceptSelected === undefined) { | |||
| // to determine the Accept header | |||
| const httpHeaderAccepts: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+json' | |||
| ]; | |||
| localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); | |||
| } | |||
| if (localVarHttpHeaderAcceptSelected !== undefined) { | |||
| localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); | |||
| } | |||
| let localVarHttpContext: HttpContext | undefined = options && options.context; | |||
| if (localVarHttpContext === undefined) { | |||
| localVarHttpContext = new HttpContext(); | |||
| } | |||
| let localVarTransferCache: boolean | undefined = options && options.transferCache; | |||
| if (localVarTransferCache === undefined) { | |||
| localVarTransferCache = true; | |||
| } | |||
| // to determine the Content-Type header | |||
| const consumes: string[] = [ | |||
| 'application/ld+json', | |||
| 'application/json', | |||
| 'text/html', | |||
| 'application/hal+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/task_notes`; | |||
| return this.httpClient.request<TaskNoteJsonld>('post', `${this.configuration.basePath}${localVarPath}`, | |||
| { | |||
| context: localVarHttpContext, | |||
| body: taskNoteJsonld, | |||
| responseType: <any>responseType_, | |||
| withCredentials: this.configuration.withCredentials, | |||
| headers: localVarHeaders, | |||
| observe: observe, | |||
| transferCache: localVarTransferCache, | |||
| reportProgress: reportProgress | |||
| } | |||
| ); | |||
| } | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { SaleSummaryJsonld } from './saleSummaryJsonld'; | |||
| import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch'; | |||
| import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView'; | |||
| export interface ApiSaleSummariesGetCollection200Response { | |||
| 'hydra:member': Array<SaleSummaryJsonld>; | |||
| 'hydra:totalItems'?: number; | |||
| 'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView; | |||
| 'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch; | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links'; | |||
| import { SaleSummaryJsonhal } from './saleSummaryJsonhal'; | |||
| export interface ApiSaleSummariesGetCollection200Response1 { | |||
| _embedded: Array<SaleSummaryJsonhal>; | |||
| totalItems?: number; | |||
| itemsPerPage?: number; | |||
| _links: ApiCommentsGetCollection200Response1Links; | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { SaleJsonld } from './saleJsonld'; | |||
| import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch'; | |||
| import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView'; | |||
| export interface ApiSalesGetCollection200Response { | |||
| 'hydra:member': Array<SaleJsonld>; | |||
| 'hydra:totalItems'?: number; | |||
| 'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView; | |||
| 'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch; | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links'; | |||
| import { SaleJsonhal } from './saleJsonhal'; | |||
| export interface ApiSalesGetCollection200Response1 { | |||
| _embedded: Array<SaleJsonhal>; | |||
| totalItems?: number; | |||
| itemsPerPage?: number; | |||
| _links: ApiCommentsGetCollection200Response1Links; | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { ApiCommentsGetCollection200ResponseHydraSearch } from './apiCommentsGetCollection200ResponseHydraSearch'; | |||
| import { ApiCommentsGetCollection200ResponseHydraView } from './apiCommentsGetCollection200ResponseHydraView'; | |||
| import { TaskNoteJsonld } from './taskNoteJsonld'; | |||
| export interface ApiTaskNotesGetCollection200Response { | |||
| 'hydra:member': Array<TaskNoteJsonld>; | |||
| 'hydra:totalItems'?: number; | |||
| 'hydra:view'?: ApiCommentsGetCollection200ResponseHydraView; | |||
| 'hydra:search'?: ApiCommentsGetCollection200ResponseHydraSearch; | |||
| } | |||
| @@ -0,0 +1,22 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { ApiCommentsGetCollection200Response1Links } from './apiCommentsGetCollection200Response1Links'; | |||
| import { TaskNoteJsonhal } from './taskNoteJsonhal'; | |||
| export interface ApiTaskNotesGetCollection200Response1 { | |||
| _embedded: Array<TaskNoteJsonhal>; | |||
| totalItems?: number; | |||
| itemsPerPage?: number; | |||
| _links: ApiCommentsGetCollection200Response1Links; | |||
| } | |||
| @@ -16,7 +16,7 @@ | |||
| */ | |||
| export interface Comment { | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| @@ -18,7 +18,7 @@ import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| export interface CommentJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| @@ -20,7 +20,7 @@ export interface CommentJsonld { | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| post?: string | null; | |||
| readonly createdAt?: string | null; | |||
| @@ -15,6 +15,12 @@ export * from './apiPostsGetCollection200Response'; | |||
| export * from './apiPostsGetCollection200Response1'; | |||
| export * from './apiProductsGetCollection200Response'; | |||
| export * from './apiProductsGetCollection200Response1'; | |||
| export * from './apiSaleSummariesGetCollection200Response'; | |||
| export * from './apiSaleSummariesGetCollection200Response1'; | |||
| export * from './apiSalesGetCollection200Response'; | |||
| export * from './apiSalesGetCollection200Response1'; | |||
| export * from './apiTaskNotesGetCollection200Response'; | |||
| export * from './apiTaskNotesGetCollection200Response1'; | |||
| export * from './apiTasksGetCollection200Response'; | |||
| export * from './apiTasksGetCollection200Response1'; | |||
| export * from './apiUsersGetCollection200Response'; | |||
| @@ -46,9 +52,18 @@ export * from './postPostingPatch'; | |||
| export * from './product'; | |||
| export * from './productJsonhal'; | |||
| export * from './productJsonld'; | |||
| export * from './sale'; | |||
| export * from './saleJsonhal'; | |||
| export * from './saleJsonld'; | |||
| export * from './saleSummary'; | |||
| export * from './saleSummaryJsonhal'; | |||
| export * from './saleSummaryJsonld'; | |||
| export * from './task'; | |||
| export * from './taskJsonhal'; | |||
| export * from './taskJsonld'; | |||
| export * from './taskNote'; | |||
| export * from './taskNoteJsonhal'; | |||
| export * from './taskNoteJsonld'; | |||
| export * from './user'; | |||
| export * from './userJsonhal'; | |||
| export * from './userJsonld'; | |||
| @@ -26,6 +26,9 @@ export interface Partner { | |||
| logo?: string | null; | |||
| readonly logoUrl?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| contacts?: Array<string>; | |||
| } | |||
| @@ -28,6 +28,9 @@ export interface PartnerJsonhal { | |||
| logo?: string | null; | |||
| readonly logoUrl?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| contacts?: Array<string>; | |||
| } | |||
| @@ -30,6 +30,9 @@ export interface PartnerJsonld { | |||
| logo?: string | null; | |||
| readonly logoUrl?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| contacts?: Array<string>; | |||
| } | |||
| @@ -18,10 +18,11 @@ import { Comment } from './comment'; | |||
| export interface Post { | |||
| headline: string | null; | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| /** | |||
| * array<int, CommentApi> | |||
| */ | |||
| @@ -20,10 +20,11 @@ export interface PostJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| headline: string | null; | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| /** | |||
| * array<int, CommentApi> | |||
| */ | |||
| @@ -21,5 +21,6 @@ export interface PostJsonhalPostingCreate { | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| } | |||
| @@ -22,10 +22,11 @@ export interface PostJsonld { | |||
| readonly type?: string; | |||
| headline: string | null; | |||
| message: string | null; | |||
| readonly owner?: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| /** | |||
| * array<int, CommentApi> | |||
| */ | |||
| @@ -19,5 +19,6 @@ export interface PostJsonldPostingCreate { | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| } | |||
| @@ -19,5 +19,6 @@ export interface PostPostingCreate { | |||
| message: string | null; | |||
| partner?: string | null; | |||
| contact?: string | null; | |||
| sale?: string | null; | |||
| } | |||
| @@ -0,0 +1,33 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 Sale { | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| readonly partnerName?: string | null; | |||
| product?: string | null; | |||
| readonly productName?: string | null; | |||
| turnover: number | null; | |||
| profit?: number | null; | |||
| comment?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| } | |||
| @@ -0,0 +1,35 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface SaleJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| readonly partnerName?: string | null; | |||
| product?: string | null; | |||
| readonly productName?: string | null; | |||
| turnover: number | null; | |||
| profit?: number | null; | |||
| comment?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonldContext } from './commentJsonldContext'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface SaleJsonld { | |||
| context?: CommentJsonldContext; | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| partner?: string | null; | |||
| readonly partnerName?: string | null; | |||
| product?: string | null; | |||
| readonly productName?: string | null; | |||
| turnover: number | null; | |||
| profit?: number | null; | |||
| comment?: string | null; | |||
| readonly createdAt?: string | null; | |||
| /** | |||
| * array<int, PostingApi> | |||
| */ | |||
| posts?: Array<string>; | |||
| } | |||
| @@ -0,0 +1,23 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 SaleSummary { | |||
| owner?: string | null; | |||
| ownerName?: string | null; | |||
| turnover?: number | null; | |||
| profit?: number | null; | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface SaleSummaryJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| owner?: string | null; | |||
| ownerName?: string | null; | |||
| turnover?: number | null; | |||
| profit?: number | null; | |||
| } | |||
| @@ -0,0 +1,25 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 SaleSummaryJsonld { | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| owner?: string | null; | |||
| ownerName?: string | null; | |||
| turnover?: number | null; | |||
| profit?: number | null; | |||
| } | |||
| @@ -9,6 +9,7 @@ | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { TaskNote } from './taskNote'; | |||
| /** | |||
| @@ -27,7 +28,11 @@ export interface Task { | |||
| contact?: string | null; | |||
| readonly contactName?: string | null; | |||
| prio: Task.PrioEnum; | |||
| completed?: boolean | null; | |||
| completed: boolean | null; | |||
| /** | |||
| * array<int, TaskNoteApi> | |||
| */ | |||
| taskNotes?: Array<TaskNote>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| export namespace Task { | |||
| @@ -10,6 +10,7 @@ | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| import { TaskNoteJsonhal } from './taskNoteJsonhal'; | |||
| /** | |||
| @@ -29,7 +30,11 @@ export interface TaskJsonhal { | |||
| contact?: string | null; | |||
| readonly contactName?: string | null; | |||
| prio: TaskJsonhal.PrioEnum; | |||
| completed?: boolean | null; | |||
| completed: boolean | null; | |||
| /** | |||
| * array<int, TaskNoteApi> | |||
| */ | |||
| taskNotes?: Array<TaskNoteJsonhal>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| export namespace TaskJsonhal { | |||
| @@ -10,6 +10,7 @@ | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonldContext } from './commentJsonldContext'; | |||
| import { TaskNoteJsonld } from './taskNoteJsonld'; | |||
| /** | |||
| @@ -31,7 +32,11 @@ export interface TaskJsonld { | |||
| contact?: string | null; | |||
| readonly contactName?: string | null; | |||
| prio: TaskJsonld.PrioEnum; | |||
| completed?: boolean | null; | |||
| completed: boolean | null; | |||
| /** | |||
| * array<int, TaskNoteApi> | |||
| */ | |||
| taskNotes?: Array<TaskNoteJsonld>; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| export namespace TaskJsonld { | |||
| @@ -0,0 +1,24 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * 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 TaskNote { | |||
| message: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| task?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -0,0 +1,26 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonhalLinks } from './commentJsonhalLinks'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface TaskNoteJsonhal { | |||
| _links?: CommentJsonhalLinks; | |||
| message: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| task?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||
| @@ -0,0 +1,28 @@ | |||
| /** | |||
| * Matsen API Platform | |||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | |||
| * | |||
| * The version of the OpenAPI document: 1.0.0 | |||
| * | |||
| * | |||
| * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | |||
| * https://openapi-generator.tech | |||
| * Do not edit the class manually. | |||
| */ | |||
| import { CommentJsonldContext } from './commentJsonldContext'; | |||
| /** | |||
| * | |||
| */ | |||
| export interface TaskNoteJsonld { | |||
| context?: CommentJsonldContext; | |||
| readonly id?: string; | |||
| readonly type?: string; | |||
| message: string | null; | |||
| readonly owner?: string; | |||
| readonly ownerName?: string | null; | |||
| task?: string | null; | |||
| readonly createdAt?: string | null; | |||
| } | |||