create booking
This commit is contained in:
16
admin/src/api/index.ts
Normal file
16
admin/src/api/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Entrypoint for the client
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
export * from "./models";
|
||||
export * from "./tokens";
|
||||
export * from "./providers";
|
||||
export * from "./services";
|
||||
export * from "./utils/file-download";
|
||||
export * from "./utils/http-params-builder";
|
||||
export * from "./utils/date-transformer";
|
||||
96
admin/src/api/models/index.ts
Normal file
96
admin/src/api/models/index.ts
Normal file
@@ -0,0 +1,96 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated TypeScript interfaces from Swagger specification
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpContext, HttpHeaders } from "@angular/common/http";
|
||||
export interface CreateUserDto {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserDto {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface LoginRequestDto {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface CreateEventTypeDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventTypeDto {
|
||||
}
|
||||
|
||||
export interface CreateProductDto {
|
||||
}
|
||||
|
||||
export interface UpdateProductDto {
|
||||
}
|
||||
|
||||
export interface CreateEventDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventDto {
|
||||
}
|
||||
|
||||
export interface CreateUserGroupDto {
|
||||
}
|
||||
|
||||
export interface UpdateUserGroupDto {
|
||||
}
|
||||
|
||||
export interface CreateUserRoleDto {
|
||||
}
|
||||
|
||||
export interface UpdateUserRoleDto {
|
||||
}
|
||||
|
||||
export interface CreateRecurrenceRuleDto {
|
||||
}
|
||||
|
||||
export interface UpdateRecurrenceRuleDto {
|
||||
}
|
||||
|
||||
export interface CreateEventExceptionDto {
|
||||
}
|
||||
|
||||
export interface UpdateEventExceptionDto {
|
||||
}
|
||||
|
||||
export interface CreateExceptionDto {
|
||||
}
|
||||
|
||||
export interface CalendarCreateBookingDto {
|
||||
occurrenceStartTime: Date;
|
||||
userId: number;
|
||||
reservedSeatsCount: number;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
export interface CancelBookingDto {
|
||||
}
|
||||
|
||||
export interface CreateBookingDto {
|
||||
}
|
||||
|
||||
export interface UpdateBookingDto {
|
||||
}
|
||||
|
||||
/** Request Options for Angular HttpClient requests */
|
||||
export interface RequestOptions<TResponseType extends 'arraybuffer' | 'blob' | 'json' | 'text'> {
|
||||
headers?: HttpHeaders;
|
||||
reportProgress?: boolean;
|
||||
responseType?: TResponseType;
|
||||
withCredentials?: boolean;
|
||||
context?: HttpContext;
|
||||
}
|
||||
93
admin/src/api/providers.ts
Normal file
93
admin/src/api/providers.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated provider functions for easy setup
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { EnvironmentProviders, Provider, makeEnvironmentProviders } from "@angular/core";
|
||||
import { HTTP_INTERCEPTORS, HttpInterceptor } from "@angular/common/http";
|
||||
import { BASE_PATH_DEFAULT, HTTP_INTERCEPTORS_DEFAULT } from "./tokens";
|
||||
import { DefaultBaseInterceptor } from "./utils/base-interceptor";
|
||||
import { DateInterceptor } from "./utils/date-transformer";
|
||||
|
||||
/** Configuration options for default client */
|
||||
export interface DefaultConfig {
|
||||
/** Base API URL */
|
||||
basePath: string;
|
||||
/** Enable automatic date transformation (default: true) */
|
||||
enableDateTransform?: boolean;
|
||||
/** Array of HTTP interceptor classes to apply to this client */
|
||||
interceptors?: (new (...args: HttpInterceptor[]) => HttpInterceptor)[];
|
||||
}
|
||||
|
||||
/** Provides configuration for default client */
|
||||
/** */
|
||||
/** @example */
|
||||
/** ```typescript */
|
||||
/** // In your app.config.ts */
|
||||
/** import { provideDefaultClient } from './api/providers'; */
|
||||
/** */
|
||||
/** export const appConfig: ApplicationConfig = { */
|
||||
/** providers: [ */
|
||||
/** provideDefaultClient({ */
|
||||
/** basePath: 'https://api.example.com', */
|
||||
/** interceptors: [AuthInterceptor, LoggingInterceptor] // Classes, not instances */
|
||||
/** }), */
|
||||
/** // other providers... */
|
||||
/** ] */
|
||||
/** }; */
|
||||
/** ``` */
|
||||
export function provideDefaultClient(config: DefaultConfig): EnvironmentProviders {
|
||||
|
||||
const providers: Provider[] = [
|
||||
// Base path token for this client
|
||||
{
|
||||
provide: BASE_PATH_DEFAULT,
|
||||
useValue: config.basePath
|
||||
},
|
||||
// Base interceptor that handles client-specific interceptors
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: DefaultBaseInterceptor,
|
||||
multi: true
|
||||
}
|
||||
];
|
||||
|
||||
// Add client-specific interceptor instances
|
||||
if (config.interceptors && config.interceptors.length > 0) {
|
||||
const interceptorInstances = config.interceptors.map(InterceptorClass => new InterceptorClass());
|
||||
|
||||
// Add date interceptor if enabled (default: true)
|
||||
if (config.enableDateTransform !== false) {
|
||||
interceptorInstances.unshift(new DateInterceptor());
|
||||
}
|
||||
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: interceptorInstances
|
||||
});
|
||||
} else if (config.enableDateTransform !== false) {
|
||||
// Only date interceptor enabled
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: [new DateInterceptor()]
|
||||
});
|
||||
} else {
|
||||
// No interceptors
|
||||
providers.push({
|
||||
provide: HTTP_INTERCEPTORS_DEFAULT,
|
||||
useValue: []
|
||||
});
|
||||
}
|
||||
|
||||
return makeEnvironmentProviders(providers);
|
||||
}
|
||||
|
||||
/** @deprecated Use provideDefaultClient instead for better clarity */
|
||||
/** Provides configuration for the default client */
|
||||
export function provideNgOpenapi(config: DefaultConfig): EnvironmentProviders {
|
||||
return provideDefaultClient(config);
|
||||
}
|
||||
43
admin/src/api/services/app.service.ts
Normal file
43
admin/src/api/services/app.service.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for App 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 } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class AppService {
|
||||
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');
|
||||
}
|
||||
|
||||
appControllerGetHello(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
appControllerGetHello(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
appControllerGetHello(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
appControllerGetHello(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
}
|
||||
75
admin/src/api/services/auth.service.ts
Normal file
75
admin/src/api/services/auth.service.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Auth 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 { LoginRequestDto, RequestOptions } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class AuthService {
|
||||
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');
|
||||
}
|
||||
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerLogin(loginRequestDto: LoginRequestDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/login`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, loginRequestDto, requestOptions);
|
||||
}
|
||||
|
||||
authControllerLogout(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerLogout(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerLogout(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerLogout(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/logout`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, null, requestOptions);
|
||||
}
|
||||
|
||||
authControllerRefresh(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
authControllerRefresh(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
authControllerRefresh(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
authControllerRefresh(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/auth/refresh`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, null, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/bookings.service.ts
Normal file
135
admin/src/api/services/bookings.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Bookings 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, CreateBookingDto, UpdateBookingDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class BookingsService {
|
||||
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');
|
||||
}
|
||||
|
||||
bookingsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerCreate(createBookingDto: CreateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createBookingDto, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${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);
|
||||
}
|
||||
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerUpdate(id: number, updateBookingDto: UpdateBookingDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateBookingDto, requestOptions);
|
||||
}
|
||||
|
||||
bookingsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
bookingsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
bookingsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
bookingsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/bookings/${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);
|
||||
}
|
||||
}
|
||||
155
admin/src/api/services/calendar.service.ts
Normal file
155
admin/src/api/services/calendar.service.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/eventExceptions.service.ts
Normal file
135
admin/src/api/services/eventExceptions.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for EventExceptions 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, CreateEventExceptionDto, UpdateEventExceptionDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventExceptionsService {
|
||||
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');
|
||||
}
|
||||
|
||||
eventExceptionsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerCreate(createEventExceptionDto: CreateEventExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventExceptionDto, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${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);
|
||||
}
|
||||
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerUpdate(id: number, updateEventExceptionDto: UpdateEventExceptionDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateEventExceptionDto, requestOptions);
|
||||
}
|
||||
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventExceptionsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-exceptions/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/eventTypes.service.ts
Normal file
135
admin/src/api/services/eventTypes.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for EventTypes 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, CreateEventTypeDto, UpdateEventTypeDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventTypesService {
|
||||
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');
|
||||
}
|
||||
|
||||
eventTypesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerCreate(createEventTypeDto: CreateEventTypeDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createEventTypeDto, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${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);
|
||||
}
|
||||
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerUpdate(id: number, updateEventTypeDto: UpdateEventTypeDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateEventTypeDto, requestOptions);
|
||||
}
|
||||
|
||||
eventTypesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventTypesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/event-type/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/events.service.ts
Normal file
135
admin/src/api/services/events.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Events 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, UpdateEventDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class EventsService {
|
||||
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');
|
||||
}
|
||||
|
||||
eventsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerCreate(createEventDto: CreateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/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);
|
||||
}
|
||||
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/events/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/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);
|
||||
}
|
||||
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerUpdate(id: number, updateEventDto: UpdateEventDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/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, updateEventDto, requestOptions);
|
||||
}
|
||||
|
||||
eventsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
eventsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
eventsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
eventsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/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);
|
||||
}
|
||||
}
|
||||
22
admin/src/api/services/index.ts
Normal file
22
admin/src/api/services/index.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated service exports
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
export { AppService } from "./app.service";
|
||||
export { AuthService } from "./auth.service";
|
||||
export { BookingsService } from "./bookings.service";
|
||||
export { CalendarService } from "./calendar.service";
|
||||
export { EventExceptionsService } from "./eventExceptions.service";
|
||||
export { EventTypesService } from "./eventTypes.service";
|
||||
export { EventsService } from "./events.service";
|
||||
export { PingService } from "./ping.service";
|
||||
export { ProductsService } from "./products.service";
|
||||
export { RecurrenceRulesService } from "./recurrenceRules.service";
|
||||
export { UserService } from "./user.service";
|
||||
export { UserGroupsService } from "./userGroups.service";
|
||||
export { UserRolesService } from "./userRoles.service";
|
||||
59
admin/src/api/services/ping.service.ts
Normal file
59
admin/src/api/services/ping.service.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Ping 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 } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class PingService {
|
||||
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');
|
||||
}
|
||||
|
||||
pingControllerPing(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
pingControllerPing(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
pingControllerPing(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
pingControllerPing(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/ping`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
pingControllerPingAuth(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
pingControllerPingAuth(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
pingControllerPingAuth(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
pingControllerPingAuth(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/ping/auth`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/products.service.ts
Normal file
135
admin/src/api/services/products.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for Products 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, CreateProductDto, UpdateProductDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class ProductsService {
|
||||
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');
|
||||
}
|
||||
|
||||
productsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerCreate(createProductDto: CreateProductDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createProductDto, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${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);
|
||||
}
|
||||
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerUpdate(id: number, updateProductDto: UpdateProductDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateProductDto, requestOptions);
|
||||
}
|
||||
|
||||
productsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
productsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
productsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
productsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/products/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/recurrenceRules.service.ts
Normal file
135
admin/src/api/services/recurrenceRules.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for RecurrenceRules 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, CreateRecurrenceRuleDto, UpdateRecurrenceRuleDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class RecurrenceRulesService {
|
||||
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');
|
||||
}
|
||||
|
||||
recurrenceRulesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerCreate(createRecurrenceRuleDto: CreateRecurrenceRuleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createRecurrenceRuleDto, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${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);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerUpdate(id: number, updateRecurrenceRuleDto: UpdateRecurrenceRuleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateRecurrenceRuleDto, requestOptions);
|
||||
}
|
||||
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
recurrenceRulesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/recurrence-rules/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/user.service.ts
Normal file
135
admin/src/api/services/user.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for User 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, CreateUserDto, UpdateUserDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserService {
|
||||
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');
|
||||
}
|
||||
|
||||
userControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerCreate(createUserDto: CreateUserDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserDto, requestOptions);
|
||||
}
|
||||
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userControllerFindOne(id: string, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerFindOne(id: string, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerFindOne(id: string, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerFindOne(id: string, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${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);
|
||||
}
|
||||
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerUpdate(id: string, updateUserDto: UpdateUserDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserDto, requestOptions);
|
||||
}
|
||||
|
||||
userControllerRemove(id: string, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userControllerRemove(id: string, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userControllerRemove(id: string, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userControllerRemove(id: string, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/userGroups.service.ts
Normal file
135
admin/src/api/services/userGroups.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for UserGroups 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, CreateUserGroupDto, UpdateUserGroupDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserGroupsService {
|
||||
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');
|
||||
}
|
||||
|
||||
userGroupsControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerCreate(createUserGroupDto: CreateUserGroupDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserGroupDto, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${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);
|
||||
}
|
||||
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerUpdate(id: number, updateUserGroupDto: UpdateUserGroupDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserGroupDto, requestOptions);
|
||||
}
|
||||
|
||||
userGroupsControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userGroupsControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-group/${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);
|
||||
}
|
||||
}
|
||||
135
admin/src/api/services/userRoles.service.ts
Normal file
135
admin/src/api/services/userRoles.service.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Angular service for UserRoles 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, CreateUserRoleDto, UpdateUserRoleDto } from "../models";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export class UserRolesService {
|
||||
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');
|
||||
}
|
||||
|
||||
userRolesControllerFindAll(observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerFindAll(observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerFindAll(observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerFindAll(observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerCreate(createUserRoleDto: CreateUserRoleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.post(url, createUserRoleDto, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerSearch(q: string, page: number, limit: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/search`;
|
||||
|
||||
let params = new HttpParams();
|
||||
if (q != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, q, 'q');
|
||||
}
|
||||
if (page != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, page, 'page');
|
||||
}
|
||||
if (limit != null) {
|
||||
params = HttpParamsBuilder.addToHttpParams(params, limit, 'limit');
|
||||
}
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
params,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.get(url, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerFindOne(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerFindOne(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${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);
|
||||
}
|
||||
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerUpdate(id: number, updateUserRoleDto: UpdateUserRoleDto, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${id}`;
|
||||
|
||||
const requestOptions: any = {
|
||||
observe: observe as any,
|
||||
reportProgress: options?.reportProgress,
|
||||
withCredentials: options?.withCredentials,
|
||||
context: this.createContextWithClientId(options?.context)
|
||||
};
|
||||
|
||||
return this.httpClient.patch(url, updateUserRoleDto, requestOptions);
|
||||
}
|
||||
|
||||
userRolesControllerRemove(id: number, observe?: 'body', options?: RequestOptions<'json'>): Observable<any>;
|
||||
userRolesControllerRemove(id: number, observe?: 'response', options?: RequestOptions<'json'>): Observable<HttpResponse<any>>;
|
||||
userRolesControllerRemove(id: number, observe?: 'events', options?: RequestOptions<'json'>): Observable<HttpEvent<any>>;
|
||||
userRolesControllerRemove(id: number, observe?: 'body' | 'events' | 'response', options?: RequestOptions<'arraybuffer' | 'blob' | 'json' | 'text'>): Observable<any> {
|
||||
const url = `${this.basePath}/api/user-role/${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);
|
||||
}
|
||||
}
|
||||
29
admin/src/api/tokens/index.ts
Normal file
29
admin/src/api/tokens/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { InjectionToken } from "@angular/core";
|
||||
import { HttpInterceptor, HttpContextToken } from "@angular/common/http";
|
||||
|
||||
/**
|
||||
* Injection token for the default client base API path
|
||||
*/
|
||||
export const BASE_PATH_DEFAULT = new InjectionToken<string>('BASE_PATH_DEFAULT', {
|
||||
providedIn: 'root',
|
||||
factory: () => '/api', // Default fallback
|
||||
});
|
||||
/**
|
||||
* Injection token for the default client HTTP interceptor instances
|
||||
*/
|
||||
export const HTTP_INTERCEPTORS_DEFAULT = new InjectionToken<HttpInterceptor[]>('HTTP_INTERCEPTORS_DEFAULT', {
|
||||
providedIn: 'root',
|
||||
factory: () => [], // Default empty array
|
||||
});
|
||||
/**
|
||||
* HttpContext token to identify requests belonging to the default client
|
||||
*/
|
||||
export const CLIENT_CONTEXT_TOKEN_DEFAULT = new HttpContextToken<string>(() => 'default');
|
||||
/**
|
||||
* @deprecated Use BASE_PATH_DEFAULT instead
|
||||
*/
|
||||
export const BASE_PATH = BASE_PATH_DEFAULT;
|
||||
/**
|
||||
* @deprecated Use CLIENT_CONTEXT_TOKEN_DEFAULT instead
|
||||
*/
|
||||
export const CLIENT_CONTEXT_TOKEN = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
40
admin/src/api/utils/base-interceptor.ts
Normal file
40
admin/src/api/utils/base-interceptor.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
/* @ts-nocheck */
|
||||
/* eslint-disable */
|
||||
/* @noformat */
|
||||
/* @formatter:off */
|
||||
/**
|
||||
* Generated by ng-openapi
|
||||
* Generated Base Interceptor for client default
|
||||
* Do not edit this file manually
|
||||
*/
|
||||
import { HttpContextToken, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from "@angular/common/http";
|
||||
import { inject, Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
import { CLIENT_CONTEXT_TOKEN_DEFAULT, HTTP_INTERCEPTORS_DEFAULT } from "../tokens";
|
||||
|
||||
@Injectable()
|
||||
export class DefaultBaseInterceptor implements HttpInterceptor {
|
||||
private readonly httpInterceptors: HttpInterceptor[] = inject(HTTP_INTERCEPTORS_DEFAULT);
|
||||
private readonly clientContextToken: HttpContextToken<string> = CLIENT_CONTEXT_TOKEN_DEFAULT;
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
// Check if this request belongs to this client using HttpContext
|
||||
if (!req.context.has(this.clientContextToken)) {
|
||||
// This request doesn't belong to this client, pass it through
|
||||
return next.handle(req);
|
||||
}
|
||||
|
||||
// Apply client-specific interceptors in reverse order
|
||||
let handler = next;
|
||||
|
||||
handler = this.httpInterceptors.reduceRight(
|
||||
(next, interceptor) => ({
|
||||
handle: (request: HttpRequest<any>) => interceptor.intercept(request, next)
|
||||
}),
|
||||
handler
|
||||
);
|
||||
|
||||
return handler.handle(req);
|
||||
}
|
||||
}
|
||||
50
admin/src/api/utils/date-transformer.ts
Normal file
50
admin/src/api/utils/date-transformer.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from "@angular/common/http";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { Observable, map } from "rxjs";
|
||||
|
||||
export const ISO_DATE_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/;
|
||||
|
||||
export function transformDates(obj: any): any {
|
||||
|
||||
if (obj === null || obj === undefined || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (obj instanceof Date) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(item => transformDates(item));
|
||||
}
|
||||
|
||||
if (typeof obj === 'object') {
|
||||
const transformed: any = {};
|
||||
for (const key of Object.keys(obj)) {
|
||||
const value = obj[key];
|
||||
if (typeof value === 'string' && ISO_DATE_REGEX.test(value)) {
|
||||
transformed[key] = new Date(value);
|
||||
} else {
|
||||
transformed[key] = transformDates(value);
|
||||
}
|
||||
}
|
||||
return transformed;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class DateInterceptor implements HttpInterceptor {
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
return next.handle(req).pipe(
|
||||
map(event => {
|
||||
if (event instanceof HttpResponse && event.body) {
|
||||
return event.clone({ body: transformDates(event.body) });
|
||||
}
|
||||
return event;
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
61
admin/src/api/utils/file-download.ts
Normal file
61
admin/src/api/utils/file-download.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { Observable, tap } from "rxjs";
|
||||
|
||||
export function downloadFile(blob: Blob, filename: string, mimeType?: string): void {
|
||||
|
||||
// Create a temporary URL for the blob
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
|
||||
// Create a temporary anchor element and trigger download
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = filename;
|
||||
|
||||
// Append to body, click, and remove
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
|
||||
// Clean up the URL
|
||||
window.URL.revokeObjectURL(url);
|
||||
}
|
||||
|
||||
export function downloadFileOperator<T extends Blob>(filename: string | ((blob: T) => string), mimeType?: string): (source: Observable<T>) => Observable<T> {
|
||||
|
||||
return (source: Observable<T>) => {
|
||||
return source.pipe(
|
||||
tap((blob: T) => {
|
||||
const actualFilename = typeof filename === 'function' ? filename(blob) : filename;
|
||||
downloadFile(blob, actualFilename, mimeType);
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function extractFilenameFromContentDisposition(contentDisposition: string | null, fallbackFilename: string = "download"): string {
|
||||
|
||||
if (!contentDisposition) {
|
||||
return fallbackFilename;
|
||||
}
|
||||
|
||||
// Try to extract filename from Content-Disposition header
|
||||
// Supports both "filename=" and "filename*=" formats
|
||||
const filenameMatch = contentDisposition.match(/filename\*?=['"]?([^'"\n;]+)['"]?/i);
|
||||
|
||||
if (filenameMatch && filenameMatch[1]) {
|
||||
// Decode if it's RFC 5987 encoded (filename*=UTF-8''...)
|
||||
const filename = filenameMatch[1];
|
||||
if (filename.includes("''")) {
|
||||
const parts = filename.split("''");
|
||||
if (parts.length === 2) {
|
||||
try {
|
||||
return decodeURIComponent(parts[1]);
|
||||
} catch {
|
||||
return parts[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return filename;
|
||||
}
|
||||
|
||||
return fallbackFilename;
|
||||
}
|
||||
65
admin/src/api/utils/http-params-builder.ts
Normal file
65
admin/src/api/utils/http-params-builder.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { HttpParams } from "@angular/common/http";
|
||||
|
||||
export class HttpParamsBuilder {
|
||||
/** Adds a value to HttpParams. Delegates to recursive handler for objects/arrays. */
|
||||
public static addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
|
||||
const isDate = value instanceof Date;
|
||||
const isArray = Array.isArray(value);
|
||||
const isObject = typeof value === "object" && !isDate && !isArray;
|
||||
|
||||
if (isObject) {
|
||||
return this.addToHttpParamsRecursive(httpParams, value);
|
||||
}
|
||||
|
||||
return this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
|
||||
private static addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
|
||||
if (value == null) {
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return this.handleArray(httpParams, value, key);
|
||||
}
|
||||
|
||||
if (value instanceof Date) {
|
||||
return this.handleDate(httpParams, value, key);
|
||||
}
|
||||
|
||||
if (typeof value === "object") {
|
||||
return this.handleObject(httpParams, value, key);
|
||||
}
|
||||
|
||||
return this.handlePrimitive(httpParams, value, key);
|
||||
}
|
||||
|
||||
private static handleArray(httpParams: HttpParams, arr: unknown[], key?: string): HttpParams {
|
||||
arr.forEach((element) => {
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, element, key);
|
||||
});
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
private static handleDate(httpParams: HttpParams, date: Date, key?: string): HttpParams {
|
||||
if (!key) {
|
||||
throw new Error("key may not be null if value is Date");
|
||||
}
|
||||
return httpParams.append(key, date.toISOString().substring(0, 10));
|
||||
}
|
||||
|
||||
private static handleObject(httpParams: HttpParams, obj: Record<string, any>, key?: string): HttpParams {
|
||||
Object.keys(obj).forEach((prop) => {
|
||||
const nestedKey = key ? `${key}.${prop}` : prop;
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, obj[prop], nestedKey);
|
||||
});
|
||||
return httpParams;
|
||||
}
|
||||
|
||||
private static handlePrimitive(httpParams: HttpParams, value: string | number | boolean, key?: string): HttpParams {
|
||||
if (!key) {
|
||||
throw new Error("key may not be null if value is primitive");
|
||||
}
|
||||
return httpParams.append(key, value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user