feat(swagger-crm-api): Swagger CRM Api Update, Refs: #5333

This commit is contained in:
Nino
2025-11-17 16:56:16 +01:00
parent e654a4d95e
commit 442707774b
15 changed files with 176 additions and 11 deletions

View File

@@ -76,6 +76,15 @@ export { EntityDTOBaseOfCustomerInfoDTOAndICustomer } from './models/entity-dtob
export { QueryTokenDTO } from './models/query-token-dto';
export { QueryTokenDTO2 } from './models/query-token-dto2';
export { ResponseArgsOfCustomerDTO } from './models/response-args-of-customer-dto';
export { ResponseArgsOfAccountDetailsDTO } from './models/response-args-of-account-details-dto';
export { AccountDetailsDTO } from './models/account-details-dto';
export { AccountBalanceDTO } from './models/account-balance-dto';
export { IdentifierDTO } from './models/identifier-dto';
export { StateLevelDTO } from './models/state-level-dto';
export { MembershipDetailsDTO } from './models/membership-details-dto';
export { CustomPropertyDTO } from './models/custom-property-dto';
export { OptinDTO } from './models/optin-dto';
export { AddLoyaltyCardValues } from './models/add-loyalty-card-values';
export { SaveCustomerValues } from './models/save-customer-values';
export { ResponseArgsOfAssignedPayerDTO } from './models/response-args-of-assigned-payer-dto';
export { ResponseArgsOfBoolean } from './models/response-args-of-boolean';
@@ -92,7 +101,8 @@ export { DiffDTO } from './models/diff-dto';
export { ResponseArgsOfIQueryResultOfLoyaltyBookingInfoDTO } from './models/response-args-of-iquery-result-of-loyalty-booking-info-dto';
export { IQueryResultOfLoyaltyBookingInfoDTO } from './models/iquery-result-of-loyalty-booking-info-dto';
export { LoyaltyBookingInfoDTO } from './models/loyalty-booking-info-dto';
export { ResponseArgsOfIEnumerableOfString } from './models/response-args-of-ienumerable-of-string';
export { ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger } from './models/response-args-of-ienumerable-of-key-value-dtoof-string-and-integer';
export { KeyValueDTOOfStringAndInteger } from './models/key-value-dtoof-string-and-integer';
export { ResponseArgsOfKeyValueDTOOfStringAndString } from './models/response-args-of-key-value-dtoof-string-and-string';
export { ResponseArgsOfLoyaltyBookingInfoDTO } from './models/response-args-of-loyalty-booking-info-dto';
export { LoyaltyBookingValues } from './models/loyalty-booking-values';

View File

@@ -0,0 +1,5 @@
/* tslint:disable */
export interface AccountBalanceDTO {
lockedPoints: number;
points: number;
}

View File

@@ -0,0 +1,14 @@
/* tslint:disable */
import { AccountBalanceDTO } from './account-balance-dto';
import { IdentifierDTO } from './identifier-dto';
import { StateLevelDTO } from './state-level-dto';
import { MembershipDetailsDTO } from './membership-details-dto';
export interface AccountDetailsDTO {
accountBalance?: AccountBalanceDTO;
accountId?: string;
createdAt?: string;
identifiers?: Array<IdentifierDTO>;
level?: StateLevelDTO;
memberships?: Array<MembershipDetailsDTO>;
status?: string;
}

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
export interface AddLoyaltyCardValues {
/**
* Card code
*/
cardCode?: string;
}

View File

@@ -0,0 +1,5 @@
/* tslint:disable */
export interface CustomPropertyDTO {
name?: string;
value?: string;
}

View File

@@ -0,0 +1,8 @@
/* tslint:disable */
export interface IdentifierDTO {
code?: string;
displayCode?: string;
identifierId?: string;
status?: string;
type?: string;
}

View File

@@ -0,0 +1,12 @@
/* tslint:disable */
export interface KeyValueDTOOfStringAndInteger {
command?: string;
description?: string;
enabled?: boolean;
group?: string;
key?: string;
label?: string;
selected?: boolean;
sort?: number;
value: number;
}

View File

@@ -0,0 +1,19 @@
/* tslint:disable */
import { CustomPropertyDTO } from './custom-property-dto';
import { OptinDTO } from './optin-dto';
export interface MembershipDetailsDTO {
birthDate?: string;
city?: string;
countryCode?: string;
customProperties?: Array<CustomPropertyDTO>;
emailAddress?: string;
familyName?: string;
genderCode?: string;
givenName?: string;
memberRole?: string;
membershipId?: string;
optins?: Array<OptinDTO>;
streetHouseNo?: string;
userId?: string;
zipCode?: string;
}

View File

@@ -0,0 +1,5 @@
/* tslint:disable */
export interface OptinDTO {
flag: boolean;
type?: string;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { AccountDetailsDTO } from './account-details-dto';
export interface ResponseArgsOfAccountDetailsDTO extends ResponseArgs{
result?: AccountDetailsDTO;
}

View File

@@ -0,0 +1,6 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
import { KeyValueDTOOfStringAndInteger } from './key-value-dtoof-string-and-integer';
export interface ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger extends ResponseArgs{
result?: Array<KeyValueDTOOfStringAndInteger>;
}

View File

@@ -1,5 +0,0 @@
/* tslint:disable */
import { ResponseArgs } from './response-args';
export interface ResponseArgsOfIEnumerableOfString extends ResponseArgs{
result?: Array<string>;
}

View File

@@ -0,0 +1,10 @@
/* tslint:disable */
export interface StateLevelDTO {
currentStatePoints?: number;
name?: string;
neededStatePoints?: number;
neededStatePointsNextLevel?: number;
requiredPointsToMaintainLevel?: number;
requiredPointsToReachNextLevel?: number;
validTo?: string;
}

View File

@@ -17,6 +17,8 @@ import { ResponseArgsOfCustomerDTO } from '../models/response-args-of-customer-d
import { SaveCustomerValues } from '../models/save-customer-values';
import { CustomerDTO } from '../models/customer-dto';
import { ResponseArgsOfBoolean } from '../models/response-args-of-boolean';
import { ResponseArgsOfAccountDetailsDTO } from '../models/response-args-of-account-details-dto';
import { AddLoyaltyCardValues } from '../models/add-loyalty-card-values';
import { ResponseArgsOfAssignedPayerDTO } from '../models/response-args-of-assigned-payer-dto';
import { ResponseArgsOfIEnumerableOfCustomerInfoDTO } from '../models/response-args-of-ienumerable-of-customer-info-dto';
import { ResponseArgsOfIEnumerableOfBonusCardInfoDTO } from '../models/response-args-of-ienumerable-of-bonus-card-info-dto';
@@ -35,6 +37,7 @@ class CustomerService extends __BaseService {
static readonly CustomerUpdateCustomerPath = '/customer/{customerId}';
static readonly CustomerPatchCustomerPath = '/customer/{customerId}';
static readonly CustomerDeleteCustomerPath = '/customer/{customerId}';
static readonly CustomerAddLoyaltyCardPath = '/customer/{customerId}/loyalty/add-card';
static readonly CustomerCreateCustomerPath = '/customer';
static readonly CustomerAddPayerReferencePath = '/customer/{customerId}/payer';
static readonly CustomerDeactivateCustomerPath = '/customer/{customerId}/deactivate';
@@ -389,6 +392,56 @@ class CustomerService extends __BaseService {
);
}
/**
* Kundenkarte hinzufügen
* @param params The `CustomerService.CustomerAddLoyaltyCardParams` containing the following parameters:
*
* - `loyaltyCardValues`:
*
* - `customerId`:
*
* - `locale`:
*/
CustomerAddLoyaltyCardResponse(params: CustomerService.CustomerAddLoyaltyCardParams): __Observable<__StrictHttpResponse<ResponseArgsOfAccountDetailsDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = params.loyaltyCardValues;
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/customer/${encodeURIComponent(String(params.customerId))}/loyalty/add-card`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfAccountDetailsDTO>;
})
);
}
/**
* Kundenkarte hinzufügen
* @param params The `CustomerService.CustomerAddLoyaltyCardParams` containing the following parameters:
*
* - `loyaltyCardValues`:
*
* - `customerId`:
*
* - `locale`:
*/
CustomerAddLoyaltyCard(params: CustomerService.CustomerAddLoyaltyCardParams): __Observable<ResponseArgsOfAccountDetailsDTO> {
return this.CustomerAddLoyaltyCardResponse(params).pipe(
__map(_r => _r.body as ResponseArgsOfAccountDetailsDTO)
);
}
/**
* Anlage eines neuen Kunden
* @param payload Kundendaten
@@ -861,6 +914,15 @@ module CustomerService {
deletionComment?: null | string;
}
/**
* Parameters for CustomerAddLoyaltyCard
*/
export interface CustomerAddLoyaltyCardParams {
loyaltyCardValues: AddLoyaltyCardValues;
customerId: number;
locale?: null | string;
}
/**
* Parameters for CustomerAddPayerReference
*/

View File

@@ -10,7 +10,7 @@ import { map as __map, filter as __filter } from 'rxjs/operators';
import { ResponseArgsOfIQueryResultOfLoyaltyBookingInfoDTO } from '../models/response-args-of-iquery-result-of-loyalty-booking-info-dto';
import { ResponseArgsOfLoyaltyBookingInfoDTO } from '../models/response-args-of-loyalty-booking-info-dto';
import { LoyaltyBookingValues } from '../models/loyalty-booking-values';
import { ResponseArgsOfIEnumerableOfString } from '../models/response-args-of-ienumerable-of-string';
import { ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger } from '../models/response-args-of-ienumerable-of-key-value-dtoof-string-and-integer';
import { ResponseArgsOfKeyValueDTOOfStringAndString } from '../models/response-args-of-key-value-dtoof-string-and-string';
import { ResponseArgsOfBoolean } from '../models/response-args-of-boolean';
import { LoyaltyBonValues } from '../models/loyalty-bon-values';
@@ -133,7 +133,7 @@ class LoyaltyCardService extends __BaseService {
/**
* Booking reason / Buchungsgründe
*/
LoyaltyCardBookingReasonResponse(): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfString>> {
LoyaltyCardBookingReasonResponse(): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
@@ -150,16 +150,16 @@ class LoyaltyCardService extends __BaseService {
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfString>;
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger>;
})
);
}
/**
* Booking reason / Buchungsgründe
*/
LoyaltyCardBookingReason(): __Observable<ResponseArgsOfIEnumerableOfString> {
LoyaltyCardBookingReason(): __Observable<ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger> {
return this.LoyaltyCardBookingReasonResponse().pipe(
__map(_r => _r.body as ResponseArgsOfIEnumerableOfString)
__map(_r => _r.body as ResponseArgsOfIEnumerableOfKeyValueDTOOfStringAndInteger)
);
}