create booking

This commit is contained in:
Schneider Roland
2025-12-14 22:11:42 +01:00
parent e86b356baf
commit 056b9f6c80
35 changed files with 2496 additions and 14 deletions

View File

@@ -0,0 +1,155 @@
/* @ts-nocheck */
/* eslint-disable */
/* @noformat */
/* @formatter:off */
/**
* Generated by ng-openapi
* Generated Angular service for Calendar controller
* Do not edit this file manually
*/
import { HttpClient, HttpContext, HttpContextToken, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from "@angular/common/http";
import { inject, Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { BASE_PATH_DEFAULT, CLIENT_CONTEXT_TOKEN_DEFAULT } from "../tokens";
import { HttpParamsBuilder } from "../utils/http-params-builder";
import { RequestOptions, CreateEventDto, CreateExceptionDto, CalendarCreateBookingDto, CancelBookingDto } from "../models";
@Injectable({ providedIn: "root" })
export class CalendarService {
private readonly httpClient: HttpClient = inject(HttpClient);
private readonly basePath: string = inject(BASE_PATH_DEFAULT);
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
private createContextWithClientId(existingContext?: HttpContext): HttpContext {
const context = existingContext || new HttpContext();
return context.set(this.clientContextToken, 'default');
}
calendarControllerGetCalendarEvents(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerGetCalendarEvents(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerGetCalendarEvents(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerGetCalendarEvents(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.get(url, requestOptions);
}
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerCreateEvent(createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.post(url, createEventDto, requestOptions);
}
calendarControllerGetEventById(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerGetEventById(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerGetEventById(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerGetEventById(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events/${id}`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.get(url, requestOptions);
}
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerUpdateEvent(id: number, createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events/${id}`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.patch(url, createEventDto, requestOptions);
}
calendarControllerDeleteEvent(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerDeleteEvent(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerDeleteEvent(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerDeleteEvent(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events/${id}`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.delete(url, requestOptions);
}
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerCreateException(id: number, createExceptionDto: CreateExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events/${id}/exceptions`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.post(url, createExceptionDto, requestOptions);
}
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerCreateBooking(id: number, calendarCreateBookingDto: CalendarCreateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/events/${id}/bookings`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.post(url, calendarCreateBookingDto, requestOptions);
}
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
calendarControllerCancelBooking(bookingId: number, cancelBookingDto: CancelBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
const url = `${this.basePath}/api/calendar/bookings/${bookingId}/cancel`;
const requestOptions: any = {
observe: observe as any,
reportProgress: options?.reportProgress,
withCredentials: options?.withCredentials,
context: this.createContextWithClientId(options?.context)
};
return this.httpClient.patch(url, cancelBookingDto, requestOptions);
}
}