Files
ISA-Frontend/generated/swagger/availability-api/src/base-service.ts
Lorenz Hilpert 8e4d4ff804 🔄 chore: sync swagger API clients with backend updates
- Regenerated all Swagger API clients (availability, checkout, crm, isa, print, wws)
- Updated CRM loyalty card API endpoints (removed interests, added booking/bon management)
- Temporarily disabled interests form block functionality due to API changes
- Removed deprecated models (check-loyalty-card-result, loyalty-card-status, entity-key-value)
- Added new loyalty booking and bon management models and services
2025-11-06 17:03:37 +01:00

64 lines
1.4 KiB
TypeScript

/* tslint:disable */
import { HttpClient, HttpParameterCodec, HttpParams } from '@angular/common/http';
import { AvConfiguration } from './av-configuration';
/**
* Custom parameter codec to correctly handle the plus sign in parameter
* values. See https://github.com/angular/angular/issues/18261
*/
class ParameterCodec implements HttpParameterCodec {
encodeKey(key: string): string {
return encodeURIComponent(key);
}
encodeValue(value: string): string {
return encodeURIComponent(value);
}
decodeKey(key: string): string {
return decodeURIComponent(key);
}
decodeValue(value: string): string {
return decodeURIComponent(value);
}
}
const PARAMETER_CODEC = new ParameterCodec();
/**
* Base class for API services
*/
export class BaseService {
constructor(
protected config: AvConfiguration,
protected http: HttpClient
) {
}
private _rootUrl: string = '';
/**
* Returns the root url for API operations. If not set directly in this
* service, will fallback to ApiConfiguration.rootUrl.
*/
get rootUrl(): string {
return this._rootUrl || this.config.rootUrl;
}
/**
* Sets the root URL for API operations in this service.
*/
set rootUrl(rootUrl: string) {
this._rootUrl = rootUrl;
}
/**
* Creates a new `HttpParams` with the correct codec
*/
protected newParams(): HttpParams {
return new HttpParams({
encoder: PARAMETER_CODEC
});
}
}