538 lines
28 KiB
TypeScript
538 lines
28 KiB
TypeScript
/**
|
|
* API Title
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 1.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';
|
|
|
|
import { InlineResponse403 } from '../model/models';
|
|
import { SimpleStatusResponse } from '../model/models';
|
|
import { TaskEntityInfo } from '../model/models';
|
|
import { TaskFieldInfo } from '../model/models';
|
|
import { TaskShortInfo } from '../model/models';
|
|
import { TaskTaskgroupInfo } from '../model/models';
|
|
|
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
import { Configuration } from '../configuration';
|
|
|
|
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class TaskService {
|
|
|
|
protected basePath = 'http://127.0.0.1:8080/api';
|
|
public defaultHeaders = new HttpHeaders();
|
|
public configuration = new Configuration();
|
|
public encoder: HttpParameterCodec;
|
|
|
|
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
|
if (configuration) {
|
|
this.configuration = configuration;
|
|
}
|
|
if (typeof this.configuration.basePath !== 'string') {
|
|
if (typeof basePath !== 'string') {
|
|
basePath = this.basePath;
|
|
}
|
|
this.configuration.basePath = basePath;
|
|
}
|
|
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
}
|
|
|
|
|
|
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().substr(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;
|
|
}
|
|
|
|
/**
|
|
* edits an existing task
|
|
* edits an existing task
|
|
* @param scope defines scope of fetched tasks
|
|
* @param detailed determines whether an detailed response is required or not
|
|
* @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 tasksAllScopeDetailedGet(scope: 'FINISHED' | 'UNFINISHED' | 'OVERDUE' | 'UPCOMING' | 'ACTIVE', detailed: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<Array<TaskShortInfo> | Array<TaskTaskgroupInfo>>;
|
|
public tasksAllScopeDetailedGet(scope: 'FINISHED' | 'UNFINISHED' | 'OVERDUE' | 'UPCOMING' | 'ACTIVE', detailed: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<Array<TaskShortInfo> | Array<TaskTaskgroupInfo>>>;
|
|
public tasksAllScopeDetailedGet(scope: 'FINISHED' | 'UNFINISHED' | 'OVERDUE' | 'UPCOMING' | 'ACTIVE', detailed: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<Array<TaskShortInfo> | Array<TaskTaskgroupInfo>>>;
|
|
public tasksAllScopeDetailedGet(scope: 'FINISHED' | 'UNFINISHED' | 'OVERDUE' | 'UPCOMING' | 'ACTIVE', detailed: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (scope === null || scope === undefined) {
|
|
throw new Error('Required parameter scope was null or undefined when calling tasksAllScopeDetailedGet.');
|
|
}
|
|
if (detailed === null || detailed === undefined) {
|
|
throw new Error('Required parameter detailed was null or undefined when calling tasksAllScopeDetailedGet.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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 responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.get<Array<TaskShortInfo> | Array<TaskTaskgroupInfo>>(`${this.configuration.basePath}/tasks/all/${encodeURIComponent(String(scope))}/${encodeURIComponent(String(detailed))}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* edits an existing task
|
|
* edits an existing task
|
|
* @param taskID internal id of task
|
|
* @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 tasksTaskIDDelete(taskID: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SimpleStatusResponse>;
|
|
public tasksTaskIDDelete(taskID: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SimpleStatusResponse>>;
|
|
public tasksTaskIDDelete(taskID: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SimpleStatusResponse>>;
|
|
public tasksTaskIDDelete(taskID: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskID === null || taskID === undefined) {
|
|
throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDDelete.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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 responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.delete<SimpleStatusResponse>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskID))}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* finishs task
|
|
* finish tasks
|
|
* @param taskID internal id of task
|
|
* @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 tasksTaskIDFinishPost(taskID: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<SimpleStatusResponse>;
|
|
public tasksTaskIDFinishPost(taskID: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<SimpleStatusResponse>>;
|
|
public tasksTaskIDFinishPost(taskID: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<SimpleStatusResponse>>;
|
|
public tasksTaskIDFinishPost(taskID: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskID === null || taskID === undefined) {
|
|
throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDFinishPost.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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 responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.post<SimpleStatusResponse>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskID))}/finish`,
|
|
null,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* gets taskdetails
|
|
* loads information about a given task
|
|
* @param taskID internal id of task
|
|
* @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 tasksTaskIDGet(taskID: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<TaskEntityInfo>;
|
|
public tasksTaskIDGet(taskID: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<TaskEntityInfo>>;
|
|
public tasksTaskIDGet(taskID: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<TaskEntityInfo>>;
|
|
public tasksTaskIDGet(taskID: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskID === null || taskID === undefined) {
|
|
throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDGet.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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 responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.get<TaskEntityInfo>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskID))}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* edits an existing task
|
|
* edits an existing task
|
|
* @param taskID internal id of task
|
|
* @param taskFieldInfo
|
|
* @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 tasksTaskIDPost(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<TaskEntityInfo>;
|
|
public tasksTaskIDPost(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<TaskEntityInfo>>;
|
|
public tasksTaskIDPost(taskID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<TaskEntityInfo>>;
|
|
public tasksTaskIDPost(taskID: number, taskFieldInfo?: TaskFieldInfo, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskID === null || taskID === undefined) {
|
|
throw new Error('Required parameter taskID was null or undefined when calling tasksTaskIDPost.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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();
|
|
}
|
|
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = [
|
|
'application/json'
|
|
];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
let responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.post<TaskEntityInfo>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskID))}`,
|
|
taskFieldInfo,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* creates a new task
|
|
* creates tasks
|
|
* @param taskgroupID internal id of taskgroup
|
|
* @param taskFieldInfo
|
|
* @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 tasksTaskgroupIDPut(taskgroupID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<TaskEntityInfo>;
|
|
public tasksTaskgroupIDPut(taskgroupID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<TaskEntityInfo>>;
|
|
public tasksTaskgroupIDPut(taskgroupID: number, taskFieldInfo?: TaskFieldInfo, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<TaskEntityInfo>>;
|
|
public tasksTaskgroupIDPut(taskgroupID: number, taskFieldInfo?: TaskFieldInfo, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskgroupID === null || taskgroupID === undefined) {
|
|
throw new Error('Required parameter taskgroupID was null or undefined when calling tasksTaskgroupIDPut.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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();
|
|
}
|
|
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = [
|
|
'application/json'
|
|
];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
let responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.put<TaskEntityInfo>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskgroupID))}`,
|
|
taskFieldInfo,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* list tasks
|
|
* list tasks
|
|
* @param taskgroupID internal id of taskgroup
|
|
* @param status scope of listed tasks
|
|
* @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 tasksTaskgroupIDStatusGet(taskgroupID: number, status: 'all' | 'overdue' | 'upcoming', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<Array<TaskEntityInfo>>;
|
|
public tasksTaskgroupIDStatusGet(taskgroupID: number, status: 'all' | 'overdue' | 'upcoming', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<Array<TaskEntityInfo>>>;
|
|
public tasksTaskgroupIDStatusGet(taskgroupID: number, status: 'all' | 'overdue' | 'upcoming', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<Array<TaskEntityInfo>>>;
|
|
public tasksTaskgroupIDStatusGet(taskgroupID: number, status: 'all' | 'overdue' | 'upcoming', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
|
|
if (taskgroupID === null || taskgroupID === undefined) {
|
|
throw new Error('Required parameter taskgroupID was null or undefined when calling tasksTaskgroupIDStatusGet.');
|
|
}
|
|
if (status === null || status === undefined) {
|
|
throw new Error('Required parameter status was null or undefined when calling tasksTaskgroupIDStatusGet.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
let localVarCredential: string | undefined;
|
|
// authentication (API_TOKEN) required
|
|
localVarCredential = this.configuration.lookupCredential('API_TOKEN');
|
|
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/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 responseType_: 'text' | 'json' = 'json';
|
|
if(localVarHttpHeaderAcceptSelected && localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
}
|
|
|
|
return this.httpClient.get<Array<TaskEntityInfo>>(`${this.configuration.basePath}/tasks/${encodeURIComponent(String(taskgroupID))}/${encodeURIComponent(String(status))}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|