From 1e2b04687f11314e8a551f372775d47feccbfcb3 Mon Sep 17 00:00:00 2001 From: Mathieu Meissonnier <173043140+mmeissonnier-pass@users.noreply.github.com> Date: Tue, 21 Jan 2025 11:15:59 +0100 Subject: [PATCH] (PC-33637) feat(offer): add chronicles section --- .../Venue/Venue.native.test.tsx.native-snap | 4 +- src/api/gen/api.ts | 2102 ++++++----------- .../offerChroniclesToChronicleCardData.ts | 4 +- .../api/useChronicles/useChronicles.test.ts | 42 +- .../api/useChronicles/useChronicles.tsx | 13 +- .../ChronicleCard/ChronicleCard.tsx | 7 +- .../ChronicleCardList/ChronicleCardList.tsx | 2 +- .../ChronicleCardList.web.test.tsx | 35 +- .../ChronicleCardList.web.tsx | 64 +- .../ChronicleCardListBase.native.test.tsx | 9 +- .../ChronicleCardListBase.tsx | 49 +- src/features/chronicle/constant.ts | 2 +- .../chronicle/pages/Chronicles/Chronicles.tsx | 12 +- ...hroniclePreviewToChronicleCardData.test.ts | 78 + .../chroniclePreviewToChronicleCardData.ts | 14 + .../OfferBody/OfferBody.native.test.tsx | 108 +- .../offer/components/OfferBody/OfferBody.tsx | 37 +- .../OfferContent/OfferContent.native.test.tsx | 44 + .../components/OfferContent/OfferContent.tsx | 2 + .../OfferContent/OfferContent.web.tsx | 2 + .../OfferContent/OfferContentBase.tsx | 55 + src/features/offer/fixtures/offerResponse.ts | 27 +- .../offer/pages/Offer/Offer.native.test.tsx | 14 +- src/features/offer/pages/Offer/Offer.tsx | 11 + src/features/offer/types.ts | 2 + .../getFormattedChronicleDate.test.ts} | 4 +- .../getFormattedChronicleDate.ts} | 2 +- src/ui/components/SectionWithDivider.tsx | 8 +- 28 files changed, 1140 insertions(+), 1613 deletions(-) rename src/features/chronicle/components/{ChronicleCardListBase => ChronicleCardList}/ChronicleCardListBase.native.test.tsx (75%) rename src/features/chronicle/components/{ChronicleCardListBase => ChronicleCardList}/ChronicleCardListBase.tsx (64%) create mode 100644 src/features/offer/adapters/chroniclePreviewToChronicleCardData.test.ts create mode 100644 src/features/offer/adapters/chroniclePreviewToChronicleCardData.ts rename src/shared/{date/getFormattedLongMonthYear/getFormattedLongMonthYear.test.ts => chronicle/getFormattedChronicleDate/getFormattedChronicleDate.test.ts} (54%) rename src/shared/{date/getFormattedLongMonthYear/getFormattedLongMonthYear.ts => chronicle/getFormattedChronicleDate/getFormattedChronicleDate.ts} (77%) diff --git a/__snapshots__/features/venue/pages/Venue/Venue.native.test.tsx.native-snap b/__snapshots__/features/venue/pages/Venue/Venue.native.test.tsx.native-snap index 4e8930d637a..08119a8a210 100644 --- a/__snapshots__/features/venue/pages/Venue/Venue.native.test.tsx.native-snap +++ b/__snapshots__/features/venue/pages/Venue/Venue.native.test.tsx.native-snap @@ -3817,7 +3817,7 @@ exports[` should match snapshot 1`] = ` style={ [ { - "marginHorizontal": 24, + "paddingHorizontal": 24, }, ] } @@ -7516,7 +7516,7 @@ exports[` should match snapshot with practical information 1`] = ` style={ [ { - "marginHorizontal": 24, + "paddingHorizontal": 24, }, ] } diff --git a/src/api/gen/api.ts b/src/api/gen/api.ts index 3c267485b0b..13d17aa62c0 100644 --- a/src/api/gen/api.ts +++ b/src/api/gen/api.ts @@ -42,10 +42,7 @@ export interface FetchArgs { */ export class BaseAPI { protected configuration?: Configuration - constructor( - configuration?: Configuration, - protected basePath: string = BASE_PATH - ) { + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH) { if (configuration) { this.configuration = configuration this.basePath = configuration.basePath || this.basePath @@ -64,10 +61,7 @@ export class BaseAPI { */ export class RequiredError extends Error { name = 'RequiredError' - constructor( - public field: string, - msg?: string - ) { + constructor(public field: string, msg?: string) { super(msg) } } @@ -184,7 +178,8 @@ export interface AchievementResponse { * @export * @interface AchievementsResponse */ -export interface AchievementsResponse extends Array {} +export interface AchievementsResponse extends Array { +} /** * An enumeration. * @export @@ -233,6 +228,22 @@ export interface ActivityTypesResponse { */ activities: Array } +/** + * @export + * @interface ArtistResponse + */ +export interface ArtistResponse { + /** + * @type {string} + * @memberof ArtistResponse + */ + id: string + /** + * @type {string} + * @memberof ArtistResponse + */ + name: string +} /** * @export * @interface AudioDisabilityModel @@ -460,6 +471,7 @@ export enum BookingCancellationReasons { 'BACKOFFICE_BENEFICIARY_REQUEST' = 'BACKOFFICE_BENEFICIARY_REQUEST', 'BACKOFFICE_OFFER_MODIFIED' = 'BACKOFFICE_OFFER_MODIFIED', 'BACKOFFICE_OFFER_WITH_WRONG_INFORMATION' = 'BACKOFFICE_OFFER_WITH_WRONG_INFORMATION', + 'BACKOFFICE_OFFERER_BUSINESS_CLOSED' = 'BACKOFFICE_OFFERER_BUSINESS_CLOSED', 'OFFERER_CONNECT_AS' = 'OFFERER_CONNECT_AS', } /** @@ -888,7 +900,7 @@ export interface CategoryResponseModel { * @type {{ [key: string]: number; }} * @memberof CategoryResponseModel */ - positions?: { [key: string]: number } | null + positions?: { [key: string]: number; } | null /** * @type {string} * @memberof CategoryResponseModel @@ -2030,7 +2042,7 @@ export interface NativeCategoryResponseModelv2 { * @type {{ [key: string]: number; }} * @memberof NativeCategoryResponseModelv2 */ - positions?: { [key: string]: number } | null + positions?: { [key: string]: number; } | null /** * @type {string} * @memberof NativeCategoryResponseModelv2 @@ -2316,6 +2328,22 @@ export interface OfferExtraDataResponse { */ visa?: string | null } +/** + * @export + * @interface OfferImage + */ +export interface OfferImage { + /** + * @type {string} + * @memberof OfferImage + */ + credit?: string + /** + * @type {string} + * @memberof OfferImage + */ + url: string +} /** * @export * @interface OfferImageResponse @@ -2393,7 +2421,7 @@ export interface OfferReportReasons { * @type {{ [key: string]: ReasonMeta; }} * @memberof OfferReportReasons */ - reasons: { [key: string]: ReasonMeta } + reasons: { [key: string]: ReasonMeta; } } /** * @export @@ -2591,7 +2619,7 @@ export interface OfferResponseV2 { * @type {{ [key: string]: OfferImageResponse; }} * @memberof OfferResponseV2 */ - images?: { [key: string]: OfferImageResponse } | null + images?: { [key: string]: OfferImageResponse; } | null /** * @type {boolean} * @memberof OfferResponseV2 @@ -2816,6 +2844,27 @@ export interface OfferVenueResponse { */ timezone: string } +/** + * @export + * @interface OffererHeadLineOfferResponseModel + */ +export interface OffererHeadLineOfferResponseModel { + /** + * @type {number} + * @memberof OffererHeadLineOfferResponseModel + */ + id: number + /** + * @type {OfferImage} + * @memberof OffererHeadLineOfferResponseModel + */ + image?: OfferImage | null + /** + * @type {string} + * @memberof OffererHeadLineOfferResponseModel + */ + name: string +} /** * @export * @interface OffersStocksRequest @@ -2930,7 +2979,7 @@ export interface PlaylistRequestBody { * @type {Array<{ [key: string]: string; }>} * @memberof PlaylistRequestBody */ - offerTypeList?: Array<{ [key: string]: string }> | null + offerTypeList?: Array<{ [key: string]: string; }> | null /** * @type {number} * @memberof PlaylistRequestBody @@ -4117,7 +4166,7 @@ export interface UserProfileResponse { * @type {{ [key: string]: number; }} * @memberof UserProfileResponse */ - bookedOffers: { [key: string]: number } + bookedOffers: { [key: string]: number; } /** * @type {string} * @memberof UserProfileResponse @@ -4348,7 +4397,8 @@ export interface ValidatePhoneNumberRequest { * @export * @interface ValidationError */ -export interface ValidationError extends Array {} +export interface ValidationError extends Array { +} /** * @export * @interface ValidationErrorElement @@ -4420,7 +4470,7 @@ export interface VenueContactModel { * @type {{ [key: string]: string; }} * @memberof VenueContactModel */ - socialMedias?: { [key: string]: string } | null + socialMedias?: { [key: string]: string; } | null /** * @type {string} * @memberof VenueContactModel @@ -4487,6 +4537,11 @@ export interface VenueResponse { * @memberof VenueResponse */ id: number + /** + * @type {boolean} + * @memberof VenueResponse + */ + isOpenToPublic?: boolean | null /** * @type {boolean} * @memberof VenueResponse @@ -4541,7 +4596,7 @@ export interface VenueResponse { * @type {VenueTypeCodeKey} * @memberof VenueResponse */ - venueTypeCode?: VenueTypeCodeKey | null + venueTypeCode?: VenueTypeCodeKey|null /** * @type {string} * @memberof VenueResponse @@ -4643,10 +4698,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteNativeV1MeFavoritesfavoriteId( - favorite_id: number, - options: any = {} - ): Promise { + async deleteNativeV1MeFavoritesfavoriteId(favorite_id: number, options: any = {}): Promise { // verify required parameter 'favorite_id' is not null or undefined if (favorite_id === null || favorite_id === undefined) { throw new RequiredError( @@ -4675,10 +4727,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1AccountSuspendTokenValidationtoken( - token: string, - options: any = {} - ): Promise { + async getNativeV1AccountSuspendTokenValidationtoken(token: string, options: any = {}): Promise { // verify required parameter 'token' is not null or undefined if (token === null || token === undefined) { throw new RequiredError( @@ -4735,6 +4784,33 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati options: localVarRequestOptions, } }, + /** + * @summary get_artist + * @param {string} artist_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNativeV1ArtistsartistId(artist_id: string, options: any = {}): Promise { + // verify required parameter 'artist_id' is not null or undefined + if (artist_id === null || artist_id === undefined) { + throw new RequiredError( + 'artist_id', + 'Required parameter artist_id was null or undefined when calling getNativeV1ArtistsartistId.' + ) + } + let pathname = `/native/v1/artists/{artist_id}`.replace( + `{${'artist_id'}}`, + encodeURIComponent(String(artist_id)) + ) + let secureOptions = Object.assign(options, { credentials: 'omit' }) + const localVarRequestOptions = Object.assign({ method: 'GET' }, secureOptions) + const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) + return { + url: pathname, + options: localVarRequestOptions, + } + }, /** * @summary get_banner * @param {boolean} [isGeolocated] @@ -4743,19 +4819,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati */ async getNativeV1Banner(isGeolocated?: boolean, options: any = {}): Promise { let pathname = `/native/v1/banner` - const queryParameters: any = {} + const queryParameters: any = {}; - if (isGeolocated != null) { - queryParameters['isGeolocated'] = isGeolocated - } + if (isGeolocated != null) { + queryParameters['isGeolocated'] = isGeolocated; + } - const encodedQueryParams = - '?' + - Object.keys(queryParameters) - .map((key) => { - return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` - }) - .join('&') + const encodedQueryParams = '?' + Object.keys(queryParameters).map((key) => { + return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` + }).join('&') pathname += encodedQueryParams let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -4826,10 +4898,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1EmailValidationRemainingResendsemail( - email: string, - options: any = {} - ): Promise { + async getNativeV1EmailValidationRemainingResendsemail(email: string, options: any = {}): Promise { // verify required parameter 'email' is not null or undefined if (email === null || email === undefined) { throw new RequiredError( @@ -4938,6 +5007,33 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati options: localVarRequestOptions, } }, + /** + * @summary get_offerer_headline_offer + * @param {number} offerer_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNativeV1OffereroffererIdHeadlineOffer(offerer_id: number, options: any = {}): Promise { + // verify required parameter 'offerer_id' is not null or undefined + if (offerer_id === null || offerer_id === undefined) { + throw new RequiredError( + 'offerer_id', + 'Required parameter offerer_id was null or undefined when calling getNativeV1OffereroffererIdHeadlineOffer.' + ) + } + let pathname = `/native/v1/offerer/{offerer_id}/headline-offer`.replace( + `{${'offerer_id'}}`, + encodeURIComponent(String(offerer_id)) + ) + let secureOptions = Object.assign(options, { credentials: 'omit' }) + const localVarRequestOptions = Object.assign({ method: 'GET' }, secureOptions) + const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) + localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) + return { + url: pathname, + options: localVarRequestOptions, + } + }, /** * @summary get_offer * @deprecated @@ -4968,14 +5064,11 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati }, /** * @summary offer_chronicles - * @param {number} offer_id + * @param {number} offer_id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1OfferofferIdChronicles( - offer_id: number, - options: any = {} - ): Promise { + async getNativeV1OfferofferIdChronicles(offer_id: number, options: any = {}): Promise { // verify required parameter 'offer_id' is not null or undefined if (offer_id === null || offer_id === undefined) { throw new RequiredError( @@ -5097,14 +5190,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1RecommendationSimilarOffersofferId( - offer_id: number, - longitude?: number, - latitude?: number, - categories?: Array, - subcategories?: Array, - options: any = {} - ): Promise { + async getNativeV1RecommendationSimilarOffersofferId(offer_id: number, longitude?: number, latitude?: number, categories?: Array, subcategories?: Array, options: any = {}): Promise { // verify required parameter 'offer_id' is not null or undefined if (offer_id === null || offer_id === undefined) { throw new RequiredError( @@ -5116,31 +5202,27 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati `{${'offer_id'}}`, encodeURIComponent(String(offer_id)) ) - const queryParameters: any = {} + const queryParameters: any = {}; - if (longitude != null) { - queryParameters['longitude'] = longitude - } + if (longitude != null) { + queryParameters['longitude'] = longitude; + } - if (latitude != null) { - queryParameters['latitude'] = latitude - } + if (latitude != null) { + queryParameters['latitude'] = latitude; + } - if (categories != null) { - queryParameters['categories'] = categories - } + if (categories != null) { + queryParameters['categories'] = categories; + } - if (subcategories != null) { - queryParameters['subcategories'] = subcategories - } + if (subcategories != null) { + queryParameters['subcategories'] = subcategories; + } - const encodedQueryParams = - '?' + - Object.keys(queryParameters) - .map((key) => { - return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` - }) - .join('&') + const encodedQueryParams = '?' + Object.keys(queryParameters).map((key) => { + return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` + }).join('&') pathname += encodedQueryParams let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'GET' }, secureOptions) @@ -5353,10 +5435,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchNativeV1Profile( - body?: UserProfilePatchRequest, - options: any = {} - ): Promise { + async patchNativeV1Profile(body?: UserProfilePatchRequest, options: any = {}): Promise { let pathname = `/native/v1/profile` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5365,10 +5444,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'UserProfilePatchRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("UserProfilePatchRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5387,10 +5464,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'AccountRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("AccountRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5456,20 +5531,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1AccountSuspendForSuspiciousLogin( - body?: SuspendAccountForSuspiciousLoginRequest, - options: any = {} - ): Promise { + async postNativeV1AccountSuspendForSuspiciousLogin(body?: SuspendAccountForSuspiciousLoginRequest, options: any = {}): Promise { let pathname = `/native/v1/account/suspend_for_suspicious_login` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'SuspendAccountForSuspiciousLoginRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("SuspendAccountForSuspiciousLoginRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5495,14 +5565,11 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati }, /** * @summary mark_achievements_as_seen - * @param {MarkAchievementsAsSeenRequest} [body] + * @param {MarkAchievementsAsSeenRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1AchievementsMarkAsSeen( - body?: MarkAchievementsAsSeenRequest, - options: any = {} - ): Promise { + async postNativeV1AchievementsMarkAsSeen(body?: MarkAchievementsAsSeenRequest, options: any = {}): Promise { let pathname = `/native/v1/achievements/mark_as_seen` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5511,10 +5578,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'MarkAchievementsAsSeenRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("MarkAchievementsAsSeenRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5535,10 +5600,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'BookOfferRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("BookOfferRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5550,10 +5613,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1BookingsbookingIdCancel( - booking_id: number, - options: any = {} - ): Promise { + async postNativeV1BookingsbookingIdCancel(booking_id: number, options: any = {}): Promise { // verify required parameter 'booking_id' is not null or undefined if (booking_id === null || booking_id === undefined) { throw new RequiredError( @@ -5583,11 +5643,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1BookingsbookingIdToggleDisplay( - booking_id: number, - body?: BookingDisplayStatusRequest, - options: any = {} - ): Promise { + async postNativeV1BookingsbookingIdToggleDisplay(booking_id: number, body?: BookingDisplayStatusRequest, options: any = {}): Promise { // verify required parameter 'booking_id' is not null or undefined if (booking_id === null || booking_id === undefined) { throw new RequiredError( @@ -5606,10 +5662,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'BookingDisplayStatusRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("BookingDisplayStatusRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5621,10 +5675,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ChangePassword( - body?: ChangePasswordRequest, - options: any = {} - ): Promise { + async postNativeV1ChangePassword(body?: ChangePasswordRequest, options: any = {}): Promise { let pathname = `/native/v1/change_password` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5633,10 +5684,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ChangePasswordRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ChangePasswordRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5648,20 +5697,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1CookiesConsent( - body?: CookieConsentRequest, - options: any = {} - ): Promise { + async postNativeV1CookiesConsent(body?: CookieConsentRequest, options: any = {}): Promise { let pathname = `/native/v1/cookies_consent` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'CookieConsentRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("CookieConsentRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5673,10 +5717,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1CulturalSurveyAnswers( - body?: CulturalSurveyAnswersRequest, - options: any = {} - ): Promise { + async postNativeV1CulturalSurveyAnswers(body?: CulturalSurveyAnswersRequest, options: any = {}): Promise { let pathname = `/native/v1/cultural_survey/answers` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5685,10 +5726,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'CulturalSurveyAnswersRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("CulturalSurveyAnswersRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5709,10 +5748,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'PostFeedbackBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("PostFeedbackBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5733,10 +5770,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'FavoriteRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("FavoriteRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5748,20 +5783,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OauthGoogleAccount( - body?: GoogleAccountRequest, - options: any = {} - ): Promise { + async postNativeV1OauthGoogleAccount(body?: GoogleAccountRequest, options: any = {}): Promise { let pathname = `/native/v1/oauth/google/account` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'GoogleAccountRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("GoogleAccountRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5773,20 +5803,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OauthGoogleAuthorize( - body?: GoogleSigninRequest, - options: any = {} - ): Promise { + async postNativeV1OauthGoogleAuthorize(body?: GoogleSigninRequest, options: any = {}): Promise { let pathname = `/native/v1/oauth/google/authorize` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'GoogleSigninRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("GoogleSigninRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5799,11 +5824,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OfferofferIdReport( - offer_id: number, - body?: OfferReportRequest, - options: any = {} - ): Promise { + async postNativeV1OfferofferIdReport(offer_id: number, body?: OfferReportRequest, options: any = {}): Promise { // verify required parameter 'offer_id' is not null or undefined if (offer_id === null || offer_id === undefined) { throw new RequiredError( @@ -5822,10 +5843,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'OfferReportRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("OfferReportRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5838,20 +5857,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OffersStocks( - body?: OffersStocksRequest, - options: any = {} - ): Promise { + async postNativeV1OffersStocks(body?: OffersStocksRequest, options: any = {}): Promise { let pathname = `/native/v1/offers/stocks` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'OffersStocksRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("OffersStocksRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5863,10 +5877,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1Profile( - body?: UserProfilePatchRequest, - options: any = {} - ): Promise { + async postNativeV1Profile(body?: UserProfilePatchRequest, options: any = {}): Promise { let pathname = `/native/v1/profile` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5875,10 +5886,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'UserProfilePatchRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("UserProfilePatchRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5890,20 +5899,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileEmailUpdateCancel( - body?: ChangeBeneficiaryEmailBody, - options: any = {} - ): Promise { + async postNativeV1ProfileEmailUpdateCancel(body?: ChangeBeneficiaryEmailBody, options: any = {}): Promise { let pathname = `/native/v1/profile/email_update/cancel` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ChangeBeneficiaryEmailBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ChangeBeneficiaryEmailBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5915,20 +5919,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options: any = {} - ): Promise { + async postNativeV1ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options: any = {}): Promise { let pathname = `/native/v1/profile/email_update/confirm` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ChangeBeneficiaryEmailBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ChangeBeneficiaryEmailBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5941,10 +5940,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileUpdateEmail( - body?: UserProfileEmailUpdate, - options: any = {} - ): Promise { + async postNativeV1ProfileUpdateEmail(body?: UserProfileEmailUpdate, options: any = {}): Promise { let pathname = `/native/v1/profile/update_email` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -5953,10 +5949,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'UserProfileEmailUpdate' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("UserProfileEmailUpdate" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5977,10 +5971,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'PostReactionRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("PostReactionRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -5995,35 +5987,25 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1RecommendationPlaylist( - body?: PlaylistRequestBody, - modelEndpoint?: string, - longitude?: number, - latitude?: number, - options: any = {} - ): Promise { + async postNativeV1RecommendationPlaylist(body?: PlaylistRequestBody, modelEndpoint?: string, longitude?: number, latitude?: number, options: any = {}): Promise { let pathname = `/native/v1/recommendation/playlist` - const queryParameters: any = {} + const queryParameters: any = {}; - if (modelEndpoint != null) { - queryParameters['modelEndpoint'] = modelEndpoint - } + if (modelEndpoint != null) { + queryParameters['modelEndpoint'] = modelEndpoint; + } - if (longitude != null) { - queryParameters['longitude'] = longitude - } + if (longitude != null) { + queryParameters['longitude'] = longitude; + } - if (latitude != null) { - queryParameters['latitude'] = latitude - } + if (latitude != null) { + queryParameters['latitude'] = latitude; + } - const encodedQueryParams = - '?' + - Object.keys(queryParameters) - .map((key) => { - return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` - }) - .join('&') + const encodedQueryParams = '?' + Object.keys(queryParameters).map((key) => { + return `${encodeURIComponent(key)}=${encodeURIComponent(queryParameters[key])}` + }).join('&') pathname += encodedQueryParams let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6032,10 +6014,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'PlaylistRequestBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("PlaylistRequestBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6063,20 +6043,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1RequestPasswordReset( - body?: RequestPasswordResetRequest, - options: any = {} - ): Promise { + async postNativeV1RequestPasswordReset(body?: RequestPasswordResetRequest, options: any = {}): Promise { let pathname = `/native/v1/request_password_reset` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'RequestPasswordResetRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("RequestPasswordResetRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6088,20 +6063,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ResendEmailValidation( - body?: ResendEmailValidationRequest, - options: any = {} - ): Promise { + async postNativeV1ResendEmailValidation(body?: ResendEmailValidationRequest, options: any = {}): Promise { let pathname = `/native/v1/resend_email_validation` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ResendEmailValidationRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ResendEmailValidationRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6113,20 +6083,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ResetPassword( - body?: ResetPasswordRequest, - options: any = {} - ): Promise { + async postNativeV1ResetPassword(body?: ResetPasswordRequest, options: any = {}): Promise { let pathname = `/native/v1/reset_password` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ResetPasswordRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ResetPasswordRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6156,10 +6121,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendOfferLinkByPushofferId( - offer_id: number, - options: any = {} - ): Promise { + async postNativeV1SendOfferLinkByPushofferId(offer_id: number, options: any = {}): Promise { // verify required parameter 'offer_id' is not null or undefined if (offer_id === null || offer_id === undefined) { throw new RequiredError( @@ -6188,10 +6150,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendOfferWebappLinkByEmailofferId( - offer_id: number, - options: any = {} - ): Promise { + async postNativeV1SendOfferWebappLinkByEmailofferId(offer_id: number, options: any = {}): Promise { // verify required parameter 'offer_id' is not null or undefined if (offer_id === null || offer_id === undefined) { throw new RequiredError( @@ -6220,10 +6179,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendPhoneValidationCode( - body?: SendPhoneValidationRequest, - options: any = {} - ): Promise { + async postNativeV1SendPhoneValidationCode(body?: SendPhoneValidationRequest, options: any = {}): Promise { let pathname = `/native/v1/send_phone_validation_code` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6232,10 +6188,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'SendPhoneValidationRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("SendPhoneValidationRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6254,10 +6208,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'SigninRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("SigninRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6287,10 +6239,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SubscriptionProfile( - body?: ProfileUpdateRequest, - options: any = {} - ): Promise { + async postNativeV1SubscriptionProfile(body?: ProfileUpdateRequest, options: any = {}): Promise { let pathname = `/native/v1/subscription/profile` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6299,10 +6248,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ProfileUpdateRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ProfileUpdateRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6314,10 +6261,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1UbbleIdentification( - body?: IdentificationSessionRequest, - options: any = {} - ): Promise { + async postNativeV1UbbleIdentification(body?: IdentificationSessionRequest, options: any = {}): Promise { let pathname = `/native/v1/ubble_identification` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6326,10 +6270,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'IdentificationSessionRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("IdentificationSessionRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6341,20 +6283,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ValidateEmail( - body?: ValidateEmailRequest, - options: any = {} - ): Promise { + async postNativeV1ValidateEmail(body?: ValidateEmailRequest, options: any = {}): Promise { let pathname = `/native/v1/validate_email` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ValidateEmailRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ValidateEmailRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6366,10 +6303,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ValidatePhoneNumber( - body?: ValidatePhoneNumberRequest, - options: any = {} - ): Promise { + async postNativeV1ValidatePhoneNumber(body?: ValidatePhoneNumberRequest, options: any = {}): Promise { let pathname = `/native/v1/validate_phone_number` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6378,10 +6312,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ValidatePhoneNumberRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ValidatePhoneNumberRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6393,20 +6325,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2OffersStocks( - body?: OffersStocksRequest, - options: any = {} - ): Promise { + async postNativeV2OffersStocks(body?: OffersStocksRequest, options: any = {}): Promise { let pathname = `/native/v2/offers/stocks` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'OffersStocksRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("OffersStocksRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6418,20 +6345,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options: any = {} - ): Promise { + async postNativeV2ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options: any = {}): Promise { let pathname = `/native/v2/profile/email_update/confirm` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ChangeBeneficiaryEmailBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ChangeBeneficiaryEmailBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6443,10 +6365,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateNewEmail( - body?: NewEmailSelectionRequest, - options: any = {} - ): Promise { + async postNativeV2ProfileEmailUpdateNewEmail(body?: NewEmailSelectionRequest, options: any = {}): Promise { let pathname = `/native/v2/profile/email_update/new_email` let secureOptions = Object.assign(options, { credentials: 'omit' }) // authentication JWTAuth required @@ -6455,10 +6374,8 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'NewEmailSelectionRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("NewEmailSelectionRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6470,20 +6387,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateNewPassword( - body?: ResetPasswordRequest, - options: any = {} - ): Promise { + async postNativeV2ProfileEmailUpdateNewPassword(body?: ResetPasswordRequest, options: any = {}): Promise { let pathname = `/native/v2/profile/email_update/new_password` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'POST' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ResetPasswordRequest' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ResetPasswordRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6513,20 +6425,15 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async putNativeV1ProfileEmailUpdateValidate( - body?: ChangeBeneficiaryEmailBody, - options: any = {} - ): Promise { + async putNativeV1ProfileEmailUpdateValidate(body?: ChangeBeneficiaryEmailBody, options: any = {}): Promise { let pathname = `/native/v1/profile/email_update/validate` let secureOptions = Object.assign(options, { credentials: 'omit' }) const localVarRequestOptions = Object.assign({ method: 'PUT' }, secureOptions) const localVarHeaderParameter = await getAuthenticationHeaders(secureOptions) localVarHeaderParameter['Content-Type'] = 'application/json' localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers) - const needsSerialization = - 'ChangeBeneficiaryEmailBody' !== 'string' || - localVarRequestOptions.headers['Content-Type'] === 'application/json' - localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || '' + const needsSerialization = ("ChangeBeneficiaryEmailBody" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json' + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "") return { url: pathname, options: localVarRequestOptions, @@ -6538,7 +6445,7 @@ export const DefaultApiFetchParamCreator = function (configuration?: Configurati /** * DefaultApi - functional programming interface */ -export const DefaultApiFp = function (api: DefaultApi, configuration?: Configuration) { +export const DefaultApiFp = function(api: DefaultApi, configuration?: Configuration) { return { /** * @@ -6547,18 +6454,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async deleteNativeV1MeFavoritesfavoriteId( - favorite_id: number, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).deleteNativeV1MeFavoritesfavoriteId(favorite_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async deleteNativeV1MeFavoritesfavoriteId(favorite_id: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).deleteNativeV1MeFavoritesfavoriteId(favorite_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6568,18 +6466,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1AccountSuspendTokenValidationtoken( - token: string, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV1AccountSuspendTokenValidationtoken(token, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async getNativeV1AccountSuspendTokenValidationtoken(token: string, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1AccountSuspendTokenValidationtoken(token, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6589,13 +6478,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1AccountSuspensionDate(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1AccountSuspensionDate(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1AccountSuspensionDate(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6605,13 +6489,20 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1AccountSuspensionStatus(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1AccountSuspensionStatus(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1AccountSuspensionStatus(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) + return handleGeneratedApiResponse(response) + }, + /** + * + * @summary get_artist + * @param {string} artist_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNativeV1ArtistsartistId(artist_id: string, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1ArtistsartistId(artist_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6622,15 +6513,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1Banner(isGeolocated?: boolean, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Banner( - isGeolocated, - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Banner(isGeolocated, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6640,13 +6524,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1Bookings(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1Bookings(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Bookings(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6656,13 +6535,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1Categories(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1Categories(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Categories(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6671,16 +6545,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1CulturalSurveyQuestions( - options?: any - ): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1CulturalSurveyQuestions(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async getNativeV1CulturalSurveyQuestions(options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1CulturalSurveyQuestions(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6690,18 +6557,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1EmailValidationRemainingResendsemail( - email: string, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV1EmailValidationRemainingResendsemail(email, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async getNativeV1EmailValidationRemainingResendsemail(email: string, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1EmailValidationRemainingResendsemail(email, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6711,13 +6569,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1Me(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1Me(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Me(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6727,13 +6580,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1MeFavorites(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1MeFavorites(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1MeFavorites(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6743,13 +6591,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1MeFavoritesCount(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1MeFavoritesCount(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1MeFavoritesCount(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6759,13 +6602,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1OauthState(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1OauthState(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1OauthState(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6775,13 +6613,20 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1OfferReportReasons(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1OfferReportReasons(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1OfferReportReasons(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) + return handleGeneratedApiResponse(response) + }, + /** + * + * @summary get_offerer_headline_offer + * @param {number} offerer_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNativeV1OffereroffererIdHeadlineOffer(offerer_id: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1OffereroffererIdHeadlineOffer(offerer_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6793,14 +6638,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1OfferofferId(offer_id: number, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV1OfferofferId(offer_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1OfferofferId(offer_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6831,13 +6670,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1OffersReports(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1OffersReports(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1OffersReports(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6846,18 +6680,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1PhoneValidationRemainingAttempts( - options?: any - ): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator( - configuration - ).getNativeV1PhoneValidationRemainingAttempts(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async getNativeV1PhoneValidationRemainingAttempts(options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1PhoneValidationRemainingAttempts(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6868,15 +6693,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1ProfileEmailUpdateStatus(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1ProfileEmailUpdateStatus( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1ProfileEmailUpdateStatus(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6886,13 +6704,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1ProfileTokenExpiration(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1ProfileTokenExpiration(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1ProfileTokenExpiration(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6902,13 +6715,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1ReactionAvailable(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1ReactionAvailable(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1ReactionAvailable(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6922,29 +6730,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getNativeV1RecommendationSimilarOffersofferId( - offer_id: number, - longitude?: number, - latitude?: number, - categories?: Array, - subcategories?: Array, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV1RecommendationSimilarOffersofferId( - offer_id, - longitude, - latitude, - categories, - subcategories, - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async getNativeV1RecommendationSimilarOffersofferId(offer_id: number, longitude?: number, latitude?: number, categories?: Array, subcategories?: Array, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1RecommendationSimilarOffersofferId(offer_id, longitude, latitude, categories, subcategories, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6954,13 +6742,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1Settings(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1Settings(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1Settings(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6970,13 +6753,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1SubcategoriesV2(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1SubcategoriesV2(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1SubcategoriesV2(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -6986,15 +6764,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1SubscriptionActivityTypes(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionActivityTypes( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionActivityTypes(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7005,13 +6776,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1SubscriptionNextStep(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionNextStep(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionNextStep(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7021,13 +6787,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1SubscriptionProfile(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionProfile(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionProfile(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7038,13 +6799,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1SubscriptionStepper(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionStepper(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1SubscriptionStepper(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7055,14 +6811,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV1VenuevenueId(venue_id: number, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV1VenuevenueId(venue_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV1VenuevenueId(venue_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7073,14 +6823,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV2OfferofferId(offer_id: number, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).getNativeV2OfferofferId(offer_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV2OfferofferId(offer_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7090,15 +6834,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV2ProfileEmailUpdateStatus(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV2ProfileEmailUpdateStatus( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV2ProfileEmailUpdateStatus(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7108,13 +6845,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async getNativeV2SubscriptionStepper(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).getNativeV2SubscriptionStepper(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).getNativeV2SubscriptionStepper(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7124,18 +6856,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async patchNativeV1Profile( - body?: UserProfilePatchRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).patchNativeV1Profile(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async patchNativeV1Profile(body?: UserProfilePatchRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).patchNativeV1Profile(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7146,14 +6869,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1Account(body?: AccountRequest, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1Account(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Account(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7163,13 +6880,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1AccountAnonymize(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1AccountAnonymize(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AccountAnonymize(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7179,13 +6891,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1AccountSuspend(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1AccountSuspend(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AccountSuspend(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7195,15 +6902,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1AccountSuspendForHackSuspicion(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1AccountSuspendForHackSuspicion( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AccountSuspendForHackSuspicion(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7213,18 +6913,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1AccountSuspendForSuspiciousLogin( - body?: SuspendAccountForSuspiciousLoginRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1AccountSuspendForSuspiciousLogin(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1AccountSuspendForSuspiciousLogin(body?: SuspendAccountForSuspiciousLoginRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AccountSuspendForSuspiciousLogin(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7234,52 +6925,32 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1AccountUnsuspend(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1AccountUnsuspend(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AccountUnsuspend(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** - * + * * @summary mark_achievements_as_seen - * @param {MarkAchievementsAsSeenRequest} [body] + * @param {MarkAchievementsAsSeenRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1AchievementsMarkAsSeen( - body?: MarkAchievementsAsSeenRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1AchievementsMarkAsSeen(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1AchievementsMarkAsSeen(body?: MarkAchievementsAsSeenRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1AchievementsMarkAsSeen(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** - * + * * @summary book_offer * @param {BookOfferRequest} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async postNativeV1Bookings(body?: BookOfferRequest, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1Bookings(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Bookings(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7289,18 +6960,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1BookingsbookingIdCancel( - booking_id: number, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1BookingsbookingIdCancel(booking_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1BookingsbookingIdCancel(booking_id: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1BookingsbookingIdCancel(booking_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7311,19 +6973,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1BookingsbookingIdToggleDisplay( - booking_id: number, - body?: BookingDisplayStatusRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1BookingsbookingIdToggleDisplay(booking_id, body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1BookingsbookingIdToggleDisplay(booking_id: number, body?: BookingDisplayStatusRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1BookingsbookingIdToggleDisplay(booking_id, body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7333,18 +6985,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ChangePassword( - body?: ChangePasswordRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ChangePassword(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ChangePassword(body?: ChangePasswordRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ChangePassword(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7354,18 +6997,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1CookiesConsent( - body?: CookieConsentRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1CookiesConsent(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1CookiesConsent(body?: CookieConsentRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1CookiesConsent(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7375,18 +7009,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1CulturalSurveyAnswers( - body?: CulturalSurveyAnswersRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1CulturalSurveyAnswers(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1CulturalSurveyAnswers(body?: CulturalSurveyAnswersRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1CulturalSurveyAnswers(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7397,14 +7022,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1Feedback(body?: PostFeedbackBody, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1Feedback(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Feedback(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7414,18 +7033,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1MeFavorites( - body?: FavoriteRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1MeFavorites(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1MeFavorites(body?: FavoriteRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1MeFavorites(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7435,18 +7045,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OauthGoogleAccount( - body?: GoogleAccountRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1OauthGoogleAccount(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1OauthGoogleAccount(body?: GoogleAccountRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1OauthGoogleAccount(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7456,18 +7057,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OauthGoogleAuthorize( - body?: GoogleSigninRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1OauthGoogleAuthorize(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1OauthGoogleAuthorize(body?: GoogleSigninRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1OauthGoogleAuthorize(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7478,19 +7070,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OfferofferIdReport( - offer_id: number, - body?: OfferReportRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1OfferofferIdReport(offer_id, body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1OfferofferIdReport(offer_id: number, body?: OfferReportRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1OfferofferIdReport(offer_id, body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7501,18 +7083,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1OffersStocks( - body?: OffersStocksRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1OffersStocks(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1OffersStocks(body?: OffersStocksRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1OffersStocks(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7522,18 +7095,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1Profile( - body?: UserProfilePatchRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1Profile(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1Profile(body?: UserProfilePatchRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Profile(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7543,18 +7107,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileEmailUpdateCancel( - body?: ChangeBeneficiaryEmailBody, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ProfileEmailUpdateCancel(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ProfileEmailUpdateCancel(body?: ChangeBeneficiaryEmailBody, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ProfileEmailUpdateCancel(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7564,18 +7119,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ProfileEmailUpdateConfirm(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ProfileEmailUpdateConfirm(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7586,18 +7132,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ProfileUpdateEmail( - body?: UserProfileEmailUpdate, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ProfileUpdateEmail(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ProfileUpdateEmail(body?: UserProfileEmailUpdate, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ProfileUpdateEmail(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7608,14 +7145,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1Reaction(body?: PostReactionRequest, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1Reaction(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Reaction(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7628,21 +7159,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1RecommendationPlaylist( - body?: PlaylistRequestBody, - modelEndpoint?: string, - longitude?: number, - latitude?: number, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1RecommendationPlaylist(body, modelEndpoint, longitude, latitude, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1RecommendationPlaylist(body?: PlaylistRequestBody, modelEndpoint?: string, longitude?: number, latitude?: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1RecommendationPlaylist(body, modelEndpoint, longitude, latitude, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7652,13 +7171,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1RefreshAccessToken(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1RefreshAccessToken(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1RefreshAccessToken(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7668,18 +7182,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1RequestPasswordReset( - body?: RequestPasswordResetRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1RequestPasswordReset(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1RequestPasswordReset(body?: RequestPasswordResetRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1RequestPasswordReset(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7689,18 +7194,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ResendEmailValidation( - body?: ResendEmailValidationRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ResendEmailValidation(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ResendEmailValidation(body?: ResendEmailValidationRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ResendEmailValidation(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7710,18 +7206,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ResetPassword( - body?: ResetPasswordRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ResetPassword(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ResetPassword(body?: ResetPasswordRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ResetPassword(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7731,15 +7218,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1ResetRecreditAmountToShow(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1ResetRecreditAmountToShow( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ResetRecreditAmountToShow(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7749,18 +7229,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendOfferLinkByPushofferId( - offer_id: number, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1SendOfferLinkByPushofferId(offer_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1SendOfferLinkByPushofferId(offer_id: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1SendOfferLinkByPushofferId(offer_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7770,18 +7241,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendOfferWebappLinkByEmailofferId( - offer_id: number, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1SendOfferWebappLinkByEmailofferId(offer_id, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1SendOfferWebappLinkByEmailofferId(offer_id: number, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1SendOfferWebappLinkByEmailofferId(offer_id, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7791,18 +7253,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SendPhoneValidationCode( - body?: SendPhoneValidationRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1SendPhoneValidationCode(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1SendPhoneValidationCode(body?: SendPhoneValidationRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1SendPhoneValidationCode(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7813,15 +7266,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1Signin(body?: SigninRequest, options?: any): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Signin( - body, - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1Signin(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7831,15 +7277,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV1SubscriptionHonorStatement(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV1SubscriptionHonorStatement( - options - ) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1SubscriptionHonorStatement(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7849,18 +7288,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1SubscriptionProfile( - body?: ProfileUpdateRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1SubscriptionProfile(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1SubscriptionProfile(body?: ProfileUpdateRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1SubscriptionProfile(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7870,18 +7300,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1UbbleIdentification( - body?: IdentificationSessionRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1UbbleIdentification(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1UbbleIdentification(body?: IdentificationSessionRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1UbbleIdentification(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7891,18 +7312,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ValidateEmail( - body?: ValidateEmailRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ValidateEmail(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ValidateEmail(body?: ValidateEmailRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ValidateEmail(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7912,18 +7324,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV1ValidatePhoneNumber( - body?: ValidatePhoneNumberRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV1ValidatePhoneNumber(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV1ValidatePhoneNumber(body?: ValidatePhoneNumberRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV1ValidatePhoneNumber(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7933,18 +7336,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2OffersStocks( - body?: OffersStocksRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV2OffersStocks(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV2OffersStocks(body?: OffersStocksRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV2OffersStocks(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7954,18 +7348,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV2ProfileEmailUpdateConfirm(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV2ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV2ProfileEmailUpdateConfirm(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7975,18 +7360,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateNewEmail( - body?: NewEmailSelectionRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV2ProfileEmailUpdateNewEmail(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV2ProfileEmailUpdateNewEmail(body?: NewEmailSelectionRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV2ProfileEmailUpdateNewEmail(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -7996,18 +7372,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async postNativeV2ProfileEmailUpdateNewPassword( - body?: ResetPasswordRequest, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).postNativeV2ProfileEmailUpdateNewPassword(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async postNativeV2ProfileEmailUpdateNewPassword(body?: ResetPasswordRequest, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV2ProfileEmailUpdateNewPassword(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -8017,13 +7384,8 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @throws {RequiredError} */ async postNativeV2ProfileUpdateEmail(options?: any): Promise { - const localVarFetchArgs = - await DefaultApiFetchParamCreator(configuration).postNativeV2ProfileUpdateEmail(options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).postNativeV2ProfileUpdateEmail(options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, /** @@ -8033,18 +7395,9 @@ export const DefaultApiFp = function (api: DefaultApi, configuration?: Configura * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async putNativeV1ProfileEmailUpdateValidate( - body?: ChangeBeneficiaryEmailBody, - options?: any - ): Promise { - const localVarFetchArgs = await DefaultApiFetchParamCreator( - configuration - ).putNativeV1ProfileEmailUpdateValidate(body, options) - const response = await safeFetch( - configuration?.basePath + localVarFetchArgs.url, - localVarFetchArgs.options, - api - ) + async putNativeV1ProfileEmailUpdateValidate(body?: ChangeBeneficiaryEmailBody, options?: any): Promise { + const localVarFetchArgs = await DefaultApiFetchParamCreator(configuration).putNativeV1ProfileEmailUpdateValidate(body, options) + const response = await safeFetch(configuration?.basePath + localVarFetchArgs.url, localVarFetchArgs.options, api) return handleGeneratedApiResponse(response) }, } @@ -8067,10 +7420,7 @@ export class DefaultApi extends BaseAPI { */ public async deleteNativeV1MeFavoritesfavoriteId(favorite_id: number, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).deleteNativeV1MeFavoritesfavoriteId( - favorite_id, - options - ) + return DefaultApiFp(this, configuration).deleteNativeV1MeFavoritesfavoriteId(favorite_id, options) } /** * @@ -8082,10 +7432,7 @@ export class DefaultApi extends BaseAPI { */ public async getNativeV1AccountSuspendTokenValidationtoken(token: string, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).getNativeV1AccountSuspendTokenValidationtoken( - token, - options - ) + return DefaultApiFp(this, configuration).getNativeV1AccountSuspendTokenValidationtoken(token, options) } /** * @@ -8110,13 +7457,25 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).getNativeV1AccountSuspensionStatus(options) } /** - * - * @summary get_banner - * @param {boolean} [isGeolocated] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ + * + * @summary get_artist + * @param {string} artist_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async getNativeV1ArtistsartistId(artist_id: string, options?: any) { + const configuration = this.getConfiguration() + return DefaultApiFp(this, configuration).getNativeV1ArtistsartistId(artist_id, options) + } + /** + * + * @summary get_banner + * @param {boolean} [isGeolocated] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ public async getNativeV1Banner(isGeolocated?: boolean, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).getNativeV1Banner(isGeolocated, options) @@ -8164,10 +7523,7 @@ export class DefaultApi extends BaseAPI { */ public async getNativeV1EmailValidationRemainingResendsemail(email: string, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).getNativeV1EmailValidationRemainingResendsemail( - email, - options - ) + return DefaultApiFp(this, configuration).getNativeV1EmailValidationRemainingResendsemail(email, options) } /** * @@ -8225,37 +7581,49 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).getNativeV1OfferReportReasons(options) } /** - * - * @summary get_offer - * @deprecated - * @param {number} offer_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ + * + * @summary get_offerer_headline_offer + * @param {number} offerer_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async getNativeV1OffereroffererIdHeadlineOffer(offerer_id: number, options?: any) { + const configuration = this.getConfiguration() + return DefaultApiFp(this, configuration).getNativeV1OffereroffererIdHeadlineOffer(offerer_id, options) + } + /** + * + * @summary get_offer + * @deprecated + * @param {number} offer_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ public async getNativeV1OfferofferId(offer_id: number, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).getNativeV1OfferofferId(offer_id, options) } /** - * - * @summary offer_chronicles - * @param {number} offer_id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ + * + * @summary offer_chronicles + * @param {number} offer_id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ public async getNativeV1OfferofferIdChronicles(offer_id: number, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).getNativeV1OfferofferIdChronicles(offer_id, options) } /** - * - * @summary user_reported_offers - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ + * + * @summary user_reported_offers + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ public async getNativeV1OffersReports(options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).getNativeV1OffersReports(options) @@ -8306,34 +7674,20 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).getNativeV1ReactionAvailable(options) } /** - * - * @summary similar_offers - * @param {number} offer_id - * @param {number} [longitude] - * @param {number} [latitude] - * @param {Array} [categories] - * @param {Array} [subcategories] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async getNativeV1RecommendationSimilarOffersofferId( - offer_id: number, - longitude?: number, - latitude?: number, - categories?: Array, - subcategories?: Array, - options?: any - ) { + * + * @summary similar_offers + * @param {number} offer_id + * @param {number} [longitude] + * @param {number} [latitude] + * @param {Array} [categories] + * @param {Array} [subcategories] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async getNativeV1RecommendationSimilarOffersofferId(offer_id: number, longitude?: number, latitude?: number, categories?: Array, subcategories?: Array, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).getNativeV1RecommendationSimilarOffersofferId( - offer_id, - longitude, - latitude, - categories, - subcategories, - options - ) + return DefaultApiFp(this, configuration).getNativeV1RecommendationSimilarOffersofferId(offer_id, longitude, latitude, categories, subcategories, options) } /** * @@ -8507,22 +7861,16 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1AccountSuspendForHackSuspicion(options) } /** - * - * @summary suspend_account_for_suspicious_login - * @param {SuspendAccountForSuspiciousLoginRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1AccountSuspendForSuspiciousLogin( - body?: SuspendAccountForSuspiciousLoginRequest, - options?: any - ) { + * + * @summary suspend_account_for_suspicious_login + * @param {SuspendAccountForSuspiciousLoginRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1AccountSuspendForSuspiciousLogin(body?: SuspendAccountForSuspiciousLoginRequest, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1AccountSuspendForSuspiciousLogin( - body, - options - ) + return DefaultApiFp(this, configuration).postNativeV1AccountSuspendForSuspiciousLogin(body, options) } /** * @@ -8536,28 +7884,25 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1AccountUnsuspend(options) } /** - * - * @summary mark_achievements_as_seen - * @param {MarkAchievementsAsSeenRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1AchievementsMarkAsSeen( - body?: MarkAchievementsAsSeenRequest, - options?: any - ) { + * + * @summary mark_achievements_as_seen + * @param {MarkAchievementsAsSeenRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1AchievementsMarkAsSeen(body?: MarkAchievementsAsSeenRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1AchievementsMarkAsSeen(body, options) } /** - * - * @summary book_offer - * @param {BookOfferRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ + * + * @summary book_offer + * @param {BookOfferRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ public async postNativeV1Bookings(body?: BookOfferRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1Bookings(body, options) @@ -8572,31 +7917,20 @@ export class DefaultApi extends BaseAPI { */ public async postNativeV1BookingsbookingIdCancel(booking_id: number, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1BookingsbookingIdCancel( - booking_id, - options - ) + return DefaultApiFp(this, configuration).postNativeV1BookingsbookingIdCancel(booking_id, options) } /** - * - * @summary flag_booking_as_used - * @param {number} booking_id - * @param {BookingDisplayStatusRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1BookingsbookingIdToggleDisplay( - booking_id: number, - body?: BookingDisplayStatusRequest, - options?: any - ) { + * + * @summary flag_booking_as_used + * @param {number} booking_id + * @param {BookingDisplayStatusRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1BookingsbookingIdToggleDisplay(booking_id: number, body?: BookingDisplayStatusRequest, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1BookingsbookingIdToggleDisplay( - booking_id, - body, - options - ) + return DefaultApiFp(this, configuration).postNativeV1BookingsbookingIdToggleDisplay(booking_id, body, options) } /** * @@ -8623,17 +7957,14 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1CookiesConsent(body, options) } /** - * - * @summary post_cultural_survey_answers - * @param {CulturalSurveyAnswersRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1CulturalSurveyAnswers( - body?: CulturalSurveyAnswersRequest, - options?: any - ) { + * + * @summary post_cultural_survey_answers + * @param {CulturalSurveyAnswersRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1CulturalSurveyAnswers(body?: CulturalSurveyAnswersRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1CulturalSurveyAnswers(body, options) } @@ -8686,19 +8017,15 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1OauthGoogleAuthorize(body, options) } /** - * - * @summary report_offer - * @param {number} offer_id - * @param {OfferReportRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1OfferofferIdReport( - offer_id: number, - body?: OfferReportRequest, - options?: any - ) { + * + * @summary report_offer + * @param {number} offer_id + * @param {OfferReportRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1OfferofferIdReport(offer_id: number, body?: OfferReportRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1OfferofferIdReport(offer_id, body, options) } @@ -8728,32 +8055,26 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1Profile(body, options) } /** - * - * @summary cancel_email_update - * @param {ChangeBeneficiaryEmailBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1ProfileEmailUpdateCancel( - body?: ChangeBeneficiaryEmailBody, - options?: any - ) { + * + * @summary cancel_email_update + * @param {ChangeBeneficiaryEmailBody} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1ProfileEmailUpdateCancel(body?: ChangeBeneficiaryEmailBody, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1ProfileEmailUpdateCancel(body, options) } /** - * - * @summary confirm_email_update - * @param {ChangeBeneficiaryEmailBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options?: any - ) { + * + * @summary confirm_email_update + * @param {ChangeBeneficiaryEmailBody} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1ProfileEmailUpdateConfirm(body, options) } @@ -8783,31 +8104,19 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1Reaction(body, options) } /** - * - * @summary playlist - * @param {PlaylistRequestBody} [body] - * @param {string} [modelEndpoint] - * @param {number} [longitude] - * @param {number} [latitude] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1RecommendationPlaylist( - body?: PlaylistRequestBody, - modelEndpoint?: string, - longitude?: number, - latitude?: number, - options?: any - ) { + * + * @summary playlist + * @param {PlaylistRequestBody} [body] + * @param {string} [modelEndpoint] + * @param {number} [longitude] + * @param {number} [latitude] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1RecommendationPlaylist(body?: PlaylistRequestBody, modelEndpoint?: string, longitude?: number, latitude?: number, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1RecommendationPlaylist( - body, - modelEndpoint, - longitude, - latitude, - options - ) + return DefaultApiFp(this, configuration).postNativeV1RecommendationPlaylist(body, modelEndpoint, longitude, latitude, options) } /** * @@ -8833,17 +8142,14 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV1RequestPasswordReset(body, options) } /** - * - * @summary resend_email_validation - * @param {ResendEmailValidationRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1ResendEmailValidation( - body?: ResendEmailValidationRequest, - options?: any - ) { + * + * @summary resend_email_validation + * @param {ResendEmailValidationRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1ResendEmailValidation(body?: ResendEmailValidationRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1ResendEmailValidation(body, options) } @@ -8880,10 +8186,7 @@ export class DefaultApi extends BaseAPI { */ public async postNativeV1SendOfferLinkByPushofferId(offer_id: number, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1SendOfferLinkByPushofferId( - offer_id, - options - ) + return DefaultApiFp(this, configuration).postNativeV1SendOfferLinkByPushofferId(offer_id, options) } /** * @@ -8895,23 +8198,17 @@ export class DefaultApi extends BaseAPI { */ public async postNativeV1SendOfferWebappLinkByEmailofferId(offer_id: number, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV1SendOfferWebappLinkByEmailofferId( - offer_id, - options - ) + return DefaultApiFp(this, configuration).postNativeV1SendOfferWebappLinkByEmailofferId(offer_id, options) } /** - * - * @summary send_phone_validation_code - * @param {SendPhoneValidationRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV1SendPhoneValidationCode( - body?: SendPhoneValidationRequest, - options?: any - ) { + * + * @summary send_phone_validation_code + * @param {SendPhoneValidationRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV1SendPhoneValidationCode(body?: SendPhoneValidationRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV1SendPhoneValidationCode(body, options) } @@ -8999,52 +8296,40 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV2OffersStocks(body, options) } /** - * - * @summary confirm_email_update - * @param {ChangeBeneficiaryEmailBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV2ProfileEmailUpdateConfirm( - body?: ChangeBeneficiaryEmailBody, - options?: any - ) { + * + * @summary confirm_email_update + * @param {ChangeBeneficiaryEmailBody} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV2ProfileEmailUpdateConfirm(body?: ChangeBeneficiaryEmailBody, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV2ProfileEmailUpdateConfirm(body, options) } /** - * - * @summary select_new_email - * @param {NewEmailSelectionRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV2ProfileEmailUpdateNewEmail( - body?: NewEmailSelectionRequest, - options?: any - ) { + * + * @summary select_new_email + * @param {NewEmailSelectionRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV2ProfileEmailUpdateNewEmail(body?: NewEmailSelectionRequest, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).postNativeV2ProfileEmailUpdateNewEmail(body, options) } /** - * - * @summary select_new_password - * @param {ResetPasswordRequest} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async postNativeV2ProfileEmailUpdateNewPassword( - body?: ResetPasswordRequest, - options?: any - ) { + * + * @summary select_new_password + * @param {ResetPasswordRequest} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async postNativeV2ProfileEmailUpdateNewPassword(body?: ResetPasswordRequest, options?: any) { const configuration = this.getConfiguration() - return DefaultApiFp(this, configuration).postNativeV2ProfileEmailUpdateNewPassword( - body, - options - ) + return DefaultApiFp(this, configuration).postNativeV2ProfileEmailUpdateNewPassword(body, options) } /** * @@ -9058,17 +8343,14 @@ export class DefaultApi extends BaseAPI { return DefaultApiFp(this, configuration).postNativeV2ProfileUpdateEmail(options) } /** - * - * @summary validate_user_email - * @param {ChangeBeneficiaryEmailBody} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof DefaultApi - */ - public async putNativeV1ProfileEmailUpdateValidate( - body?: ChangeBeneficiaryEmailBody, - options?: any - ) { + * + * @summary validate_user_email + * @param {ChangeBeneficiaryEmailBody} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public async putNativeV1ProfileEmailUpdateValidate(body?: ChangeBeneficiaryEmailBody, options?: any) { const configuration = this.getConfiguration() return DefaultApiFp(this, configuration).putNativeV1ProfileEmailUpdateValidate(body, options) } diff --git a/src/features/chronicle/adapters/offerChroniclesToChronicleCardData/offerChroniclesToChronicleCardData.ts b/src/features/chronicle/adapters/offerChroniclesToChronicleCardData/offerChroniclesToChronicleCardData.ts index 92d6dc80de6..f4a93f73b9c 100644 --- a/src/features/chronicle/adapters/offerChroniclesToChronicleCardData/offerChroniclesToChronicleCardData.ts +++ b/src/features/chronicle/adapters/offerChroniclesToChronicleCardData/offerChroniclesToChronicleCardData.ts @@ -1,7 +1,7 @@ import { OfferChronicle } from 'api/gen' import { ChronicleCardData } from 'features/chronicle/type' import { getChronicleCardTitle } from 'shared/chronicle/getChronicleCardTitle/getChronicleCardTitle' -import { getFormattedLongMonthYear } from 'shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear' +import { getFormattedChronicleDate } from 'shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate' export function offerChroniclesToChronicleCardData( chronicles: OfferChronicle[] @@ -11,6 +11,6 @@ export function offerChroniclesToChronicleCardData( title: getChronicleCardTitle(author), subtitle: author?.firstName ? 'Membre du Book Club' : '', description: content, - date: getFormattedLongMonthYear(dateCreated), + date: getFormattedChronicleDate(dateCreated), })) } diff --git a/src/features/chronicle/api/useChronicles/useChronicles.test.ts b/src/features/chronicle/api/useChronicles/useChronicles.test.ts index 54fefa5577f..0a57533e59e 100644 --- a/src/features/chronicle/api/useChronicles/useChronicles.test.ts +++ b/src/features/chronicle/api/useChronicles/useChronicles.test.ts @@ -1,9 +1,12 @@ +import { OfferChronicle } from 'api/gen' +import { offerChroniclesToChronicleCardData } from 'features/chronicle/adapters/offerChroniclesToChronicleCardData/offerChroniclesToChronicleCardData' import { useChronicles } from 'features/chronicle/api/useChronicles/useChronicles' import { offerChroniclesFixture } from 'features/chronicle/fixtures/offerChronicles.fixture' +import { ChronicleCardData } from 'features/chronicle/type' import { offerResponseSnap } from 'features/offer/fixtures/offerResponse' import { mockServer } from 'tests/mswServer' import { reactQueryProviderHOC } from 'tests/reactQueryProviderHOC' -import { act, renderHook } from 'tests/utils' +import { act, renderHook, waitFor } from 'tests/utils' describe('useChronicles', () => { beforeEach(() => @@ -11,12 +14,41 @@ describe('useChronicles', () => { ) it('should call API otherwise', async () => { - const { result } = renderHook(() => useChronicles({ offerId: offerResponseSnap.id }), { - wrapper: ({ children }) => reactQueryProviderHOC(children), - }) + const { result } = renderHook( + () => + useChronicles({ + offerId: offerResponseSnap.id, + }), + { + wrapper: ({ children }) => reactQueryProviderHOC(children), + } + ) + + await waitFor(() => + expect(JSON.stringify(result.current.data)).toEqual(JSON.stringify(offerChroniclesFixture)) + ) + }) + + it('should call API and format output data', async () => { + const { result } = renderHook( + () => + useChronicles({ + offerId: offerResponseSnap.id, + select: (data) => offerChroniclesToChronicleCardData(data.chronicles), + }), + { + wrapper: ({ children }) => reactQueryProviderHOC(children), + } + ) await act(async () => {}) - expect(JSON.stringify(result.current.data)).toEqual(JSON.stringify(offerChroniclesFixture)) + expect(JSON.stringify(result.current.data)).toEqual( + JSON.stringify( + offerChroniclesToChronicleCardData([ + ...offerChroniclesFixture.chronicles, + ] as OfferChronicle[]) + ) + ) }) }) diff --git a/src/features/chronicle/api/useChronicles/useChronicles.tsx b/src/features/chronicle/api/useChronicles/useChronicles.tsx index ce6808a1c54..ecc5e3d1707 100644 --- a/src/features/chronicle/api/useChronicles/useChronicles.tsx +++ b/src/features/chronicle/api/useChronicles/useChronicles.tsx @@ -4,8 +4,15 @@ import { api } from 'api/api' import { OfferChronicles } from 'api/gen' import { QueryKeys } from 'libs/queryKeys' -export const useChronicles = ({ offerId }: { offerId: number }) => { - return useQuery([QueryKeys.OFFER_CHRONICLES, offerId], () => - offerId ? api.getNativeV1OfferofferIdChronicles(offerId) : undefined +export function useChronicles< + TData = Awaited>, +>({ offerId, select }: { offerId: number; select?: (data: OfferChronicles) => TData }) { + return useQuery( + [QueryKeys.OFFER_CHRONICLES, offerId], + () => api.getNativeV1OfferofferIdChronicles(offerId), + { + enabled: !!offerId, + select, + } ) } diff --git a/src/features/chronicle/components/ChronicleCard/ChronicleCard.tsx b/src/features/chronicle/components/ChronicleCard/ChronicleCard.tsx index 6a015ffc680..961a4533681 100644 --- a/src/features/chronicle/components/ChronicleCard/ChronicleCard.tsx +++ b/src/features/chronicle/components/ChronicleCard/ChronicleCard.tsx @@ -23,7 +23,7 @@ export const ChronicleCard: FunctionComponent = ({ cardWidth, }) => { return ( - + = ({ ) } -const Container = styled(ViewGap)<{ maxWidth?: number }>(({ theme, maxWidth }) => ({ +const Container = styled(ViewGap)<{ width?: number }>(({ theme, width }) => ({ padding: getSpacing(6), borderRadius: getSpacing(2), border: 1, borderColor: theme.colors.greyMedium, - maxWidth, + ...(width === undefined ? undefined : { width }), backgroundColor: theme.colors.white, ...getShadow({ @@ -55,6 +55,7 @@ const Container = styled(ViewGap)<{ maxWidth?: number }>(({ theme, maxWidth }) = const Description = styled(TypoDS.BodyAccentS)(({ theme }) => ({ color: theme.colors.greyDark, + flexGrow: 1, })) const PublicationDate = styled(TypoDS.BodyAccentXs)(({ theme }) => ({ diff --git a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.tsx b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.tsx index b5828d755f9..8d596dd17b1 100644 --- a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.tsx +++ b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.tsx @@ -1,3 +1,3 @@ -import { ChronicleCardListBase } from 'features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase' +import { ChronicleCardListBase } from './ChronicleCardListBase' export const ChronicleCardList = ChronicleCardListBase diff --git a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.test.tsx b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.test.tsx index 0f07286f47a..4d310b0f188 100644 --- a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.test.tsx +++ b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.test.tsx @@ -1,8 +1,9 @@ import React from 'react' -import { ChronicleCardList } from 'features/chronicle/components/ChronicleCardList/ChronicleCardList.web' import { chroniclesSnap } from 'features/chronicle/fixtures/chroniclesSnap' -import { fireEvent, render, screen } from 'tests/utils/web' +import { fireEvent, render, screen, waitFor } from 'tests/utils/web' + +import { ChronicleCardList } from './ChronicleCardList' describe('ChronicleCardList', () => { it('should render the ChronicleCardList correctly', () => { @@ -36,12 +37,21 @@ describe('ChronicleCardList', () => { expect(screen.queryByText('L’Odyssée des Espèces')).not.toBeInTheDocument() }) - it('should go to previous page when left arrow is pressed', () => { + it('should go to previous page when left arrow is pressed', async () => { render() + const listElement = screen.getByTestId('chronicle-list') + Object.defineProperty(listElement, 'scrollWidth', { get: () => 900 }) + Object.defineProperty(listElement, 'offsetWidth', { get: () => 300 }) + fireEvent.click(screen.getByTestId('chronicle-list-right-arrow')) + // We have to force scroll event. onScroll is not triggered when using scrollToOffset via ref + fireEvent.scroll(listElement) + + await screen.findByTestId('chronicle-list-left-arrow') fireEvent.click(screen.getByTestId('chronicle-list-left-arrow')) + fireEvent.scroll(listElement) expect(screen.getByText('Le Voyage Extraordinaire')).toBeInTheDocument() expect(screen.getByText('Explorateur du monde')).toBeInTheDocument() @@ -54,16 +64,19 @@ describe('ChronicleCardList', () => { expect(screen.queryByTestId('chronicle-list-left-arrow')).not.toBeInTheDocument() }) - it('should disable the right arrow when on the last item', () => { - render() + it('should disable the right arrow when on the last item', async () => { + render() - const rightArrow = screen.getByTestId('chronicle-list-right-arrow') + const listElement = screen.getByTestId('chronicle-list') + Object.defineProperty(listElement, 'scrollWidth', { get: () => 900 }) + Object.defineProperty(listElement, 'offsetWidth', { get: () => 300 }) - // Simulate clicks until the right arrow button is no longer visible - while (rightArrow && rightArrow.isConnected) { - fireEvent.click(rightArrow) - } + fireEvent.scroll(listElement, { + target: { scrollLeft: 600 }, + }) - expect(screen.queryByTestId('chronicle-list-right-arrow')).not.toBeInTheDocument() + await waitFor(() => + expect(screen.queryByTestId('chronicle-list-right-arrow')).not.toBeInTheDocument() + ) }) }) diff --git a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.tsx b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.tsx index 6ed55c12112..71a0dfbd8f3 100644 --- a/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.tsx +++ b/src/features/chronicle/components/ChronicleCardList/ChronicleCardList.web.tsx @@ -1,31 +1,76 @@ import React, { FunctionComponent, useState } from 'react' +import { + LayoutChangeEvent, + LayoutRectangle, + NativeScrollEvent, + NativeSyntheticEvent, + StyleProp, + ViewStyle, +} from 'react-native' +import { useTheme } from 'styled-components' import styled from 'styled-components/native' -import { ChronicleCardListBase } from 'features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase' +import { CHRONICLE_CARD_WIDTH } from 'features/chronicle/constant' import { ChronicleCardData } from 'features/chronicle/type' import { PlaylistArrowButton } from 'ui/Playlist/PlaylistArrowButton' +import { ChronicleCardListBase } from './ChronicleCardListBase' + type ChronicleCardListProps = { data: ChronicleCardData[] horizontal?: boolean cardWidth?: number + contentContainerStyle?: StyleProp } export const ChronicleCardList: FunctionComponent = ({ data, horizontal = true, cardWidth, + contentContainerStyle, }) => { - const [indexItem, setIndexItem] = useState(0) + const [userOffset, setUserOffset] = useState(0) + const [scrollOffset, setScrollOffset] = useState(0) + const [layout, setLayout] = useState() + const [leftArrowVisible, setLeftArrowVisible] = useState(false) + const [rightArrowVisible, setRightArrowVisible] = useState(true) + + const { isDesktopViewport } = useTheme() + + const pageWidth = isDesktopViewport ? layout?.width ?? 0 : CHRONICLE_CARD_WIDTH + const goToPreviousPage = () => setUserOffset(Math.max(scrollOffset - pageWidth, 0)) + const goToNextPage = () => setUserOffset(scrollOffset + pageWidth) + + const handleLayout = (event: LayoutChangeEvent) => { + setLayout(event.nativeEvent.layout) + } + + const handleScroll = (event: NativeSyntheticEvent) => { + const { contentSize, layoutMeasurement, contentOffset } = event.nativeEvent + const progress = contentOffset.x / (contentSize.width - layoutMeasurement.width) + + setScrollOffset(contentOffset.x) - const goToPreviousPage = () => setIndexItem((prev) => Math.max(prev - 1, 0)) - const goToNextPage = () => setIndexItem((prev) => Math.min(prev + 1, data.length - 1)) + switch (progress) { + case 0: + setLeftArrowVisible(false) + setRightArrowVisible(true) + break + case 1: + setLeftArrowVisible(true) + setRightArrowVisible(false) + break + default: + setLeftArrowVisible(true) + setRightArrowVisible(true) + } + } return ( - + {horizontal ? ( - {indexItem > 0 ? ( + {leftArrowVisible ? ( = ({ /> ) : null} - {indexItem < data.length - 1 ? ( + {rightArrowVisible ? ( = ({ ) : null} ) diff --git a/src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.native.test.tsx b/src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.native.test.tsx similarity index 75% rename from src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.native.test.tsx rename to src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.native.test.tsx index 0ab8bb09ebb..4dd794d46f2 100644 --- a/src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.native.test.tsx +++ b/src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.native.test.tsx @@ -1,9 +1,11 @@ import React from 'react' -import { ChronicleCardListBase } from 'features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase' +import { CHRONICLE_CARD_WIDTH } from 'features/chronicle/constant' import { chroniclesSnap } from 'features/chronicle/fixtures/chroniclesSnap' import { render, screen } from 'tests/utils' +import { ChronicleCardListBase } from './ChronicleCardListBase' + describe('ChronicleCardListBase', () => { it('should display all chronicle cards in the list', () => { render() @@ -11,9 +13,8 @@ describe('ChronicleCardListBase', () => { expect(screen.getByText('Le Voyage Extraordinaire')).toBeOnTheScreen() }) - it('should scroll to the correct page when indexItem is provided', () => { - const indexItem = 3 - render() + it('should scroll to the correct page when offset is provided', () => { + render() expect(screen.getByText('La Nature Sauvage')).toBeOnTheScreen() }) diff --git a/src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.tsx b/src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.tsx similarity index 64% rename from src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.tsx rename to src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.tsx index 57405d622f1..d2853a89e55 100644 --- a/src/features/chronicle/components/ChronicleCardListBase/ChronicleCardListBase.tsx +++ b/src/features/chronicle/components/ChronicleCardList/ChronicleCardListBase.tsx @@ -1,19 +1,29 @@ import React, { FunctionComponent, useEffect, useRef } from 'react' -import { FlatList } from 'react-native' +import { + FlatList, + NativeScrollEvent, + NativeSyntheticEvent, + StyleProp, + ViewStyle, +} from 'react-native' -import { ChronicleCard } from 'features/chronicle/components/ChronicleCard/ChronicleCard' -import { CHRONICLE_ITEM_WIDTH } from 'features/chronicle/constant' import { ChronicleCardData } from 'features/chronicle/type' -import { Spacer, getSpacing } from 'ui/theme' +import { Spacer } from 'ui/theme' + +import { ChronicleCard } from '../ChronicleCard/ChronicleCard' const SEPARATOR_VALUE = 2 const keyExtractor = (item: ChronicleCardData) => item.id.toString() type ChronicleCardListProps = { data: ChronicleCardData[] - indexItem?: number + offset?: number horizontal?: boolean cardWidth?: number + contentContainerStyle?: StyleProp + snapToInterval?: number + scrollEnabled?: boolean + onScroll?: (event: NativeSyntheticEvent) => void } const renderItem = ({ item, cardWidth }: { item: ChronicleCardData; cardWidth?: number }) => { @@ -31,19 +41,21 @@ const renderItem = ({ item, cardWidth }: { item: ChronicleCardData; cardWidth?: export const ChronicleCardListBase: FunctionComponent = ({ data, - indexItem = 0, + offset, horizontal = true, cardWidth, + contentContainerStyle, + onScroll, + snapToInterval, + scrollEnabled, }) => { const listRef = useRef(null) - const snapToOffsets = data.map((_, index) => CHRONICLE_ITEM_WIDTH * (index + 1)) - useEffect(() => { - if (listRef.current && indexItem >= 0 && indexItem < data.length) { - listRef.current.scrollToIndex({ index: indexItem, animated: true }) + if (listRef.current && offset !== undefined) { + listRef.current.scrollToOffset({ offset, animated: true }) } - }, [data.length, indexItem]) + }, [offset]) return ( = ItemSeparatorComponent={horizontal ? RowSeparator : ColumnSeparator} contentContainerStyle={contentContainerStyle} showsHorizontalScrollIndicator={false} + onScroll={onScroll} + scrollEventThrottle={100} + scrollEnabled={scrollEnabled} horizontal={horizontal} decelerationRate="fast" - snapToOffsets={snapToOffsets} - getItemLayout={(_, index) => ({ - length: CHRONICLE_ITEM_WIDTH, - offset: CHRONICLE_ITEM_WIDTH * index, - index, - })} + snapToInterval={snapToInterval} + testID="chronicle-list" /> ) } -const contentContainerStyle = { - paddingVertical: getSpacing(12), -} - const RowSeparator = () => const ColumnSeparator = () => ( diff --git a/src/features/chronicle/constant.ts b/src/features/chronicle/constant.ts index 46b48d7c246..2b679621885 100644 --- a/src/features/chronicle/constant.ts +++ b/src/features/chronicle/constant.ts @@ -1 +1 @@ -export const CHRONICLE_ITEM_WIDTH = 327 +export const CHRONICLE_CARD_WIDTH = 327 diff --git a/src/features/chronicle/pages/Chronicles/Chronicles.tsx b/src/features/chronicle/pages/Chronicles/Chronicles.tsx index 22c6fb496c0..dc16d33b62f 100644 --- a/src/features/chronicle/pages/Chronicles/Chronicles.tsx +++ b/src/features/chronicle/pages/Chronicles/Chronicles.tsx @@ -21,7 +21,10 @@ export const Chronicles: FunctionComponent = () => { const offerId = route.params?.offerId const { goBack } = useGoBack('Offer', { id: offerId }) const { data: offer } = useOffer({ offerId }) - const { data: offerChronicles } = useChronicles({ offerId }) + const { data: chronicleCardsData } = useChronicles({ + offerId, + select: ({ chronicles }) => offerChroniclesToChronicleCardData(chronicles), + }) const { headerTransition, onScroll } = useOpacityTransition() const { appBarHeight } = useTheme() @@ -30,12 +33,9 @@ export const Chronicles: FunctionComponent = () => { const scrollViewRef = useRef(null) - if (!offer || !offerChronicles) return null + if (!offer || !chronicleCardsData) return null const title = `Tous les avis sur "${offer.name}"` - const transformedChronicles: ChronicleCardData[] = offerChroniclesToChronicleCardData( - offerChronicles.chronicles - ) return ( @@ -49,7 +49,7 @@ export const Chronicles: FunctionComponent = () => { contentContainerStyle={{ paddingTop: headerHeight, paddingBottom: getSpacing(10) }}> Tous les avis - + diff --git a/src/features/offer/adapters/chroniclePreviewToChronicleCardData.test.ts b/src/features/offer/adapters/chroniclePreviewToChronicleCardData.test.ts new file mode 100644 index 00000000000..7a53a3881c0 --- /dev/null +++ b/src/features/offer/adapters/chroniclePreviewToChronicleCardData.test.ts @@ -0,0 +1,78 @@ +import { ChroniclePreview } from 'api/gen' + +import { chroniclePreviewToChronicalCardData } from './chroniclePreviewToChronicleCardData' + +const CHRONICLE_PREVIEW: ChroniclePreview = { + id: 1, + contentPreview: 'lorem ipsum dolor', + dateCreated: '2025-01-20T23:32:13.978038Z', + author: { + firstName: 'John', + age: 13, + city: 'Paris', + }, +} + +describe('chroniclePreviewToChronicleCardData', () => { + it('should convert ChroniclePreview to ChronicleCardData with Author', () => { + expect(chroniclePreviewToChronicalCardData(CHRONICLE_PREVIEW)).toStrictEqual({ + date: 'Janvier 2025', + description: 'lorem ipsum dolor', + id: 1, + subtitle: 'Membre du Book Club', + title: 'John, 13 ans', + }) + }) + + it('should convert ChroniclePreview to ChronicleCardData with no Author', () => { + const data = { ...CHRONICLE_PREVIEW, author: null } + + expect(chroniclePreviewToChronicalCardData(data)).toStrictEqual({ + date: 'Janvier 2025', + description: 'lorem ipsum dolor', + id: 1, + subtitle: '', + title: 'Membre du Book Club', + }) + }) + + it('should convert ChroniclePreview to ChronicleCardData with partial Author', () => { + const dataWithoutName = { + ...CHRONICLE_PREVIEW, + author: { ...CHRONICLE_PREVIEW.author, firstName: null }, + } + const dataWithoutAge = { + ...CHRONICLE_PREVIEW, + author: { ...CHRONICLE_PREVIEW.author, age: null }, + } + + const dataWithEmptyAuthor = { + ...CHRONICLE_PREVIEW, + author: { ...CHRONICLE_PREVIEW.author, age: null, firstName: null }, + } + + expect(chroniclePreviewToChronicalCardData(dataWithoutName)).toStrictEqual({ + date: 'Janvier 2025', + description: 'lorem ipsum dolor', + id: 1, + subtitle: '', + title: 'Membre du Book Club', + }) + + expect(chroniclePreviewToChronicalCardData(dataWithoutAge)).toStrictEqual({ + date: 'Janvier 2025', + description: 'lorem ipsum dolor', + id: 1, + subtitle: 'Membre du Book Club', + title: 'John', + }) + + expect(chroniclePreviewToChronicalCardData(dataWithEmptyAuthor)).toStrictEqual({ + date: 'Janvier 2025', + description: 'lorem ipsum dolor', + id: 1, + subtitle: '', + title: 'Membre du Book Club', + }) + }) +}) diff --git a/src/features/offer/adapters/chroniclePreviewToChronicleCardData.ts b/src/features/offer/adapters/chroniclePreviewToChronicleCardData.ts new file mode 100644 index 00000000000..da47a622a12 --- /dev/null +++ b/src/features/offer/adapters/chroniclePreviewToChronicleCardData.ts @@ -0,0 +1,14 @@ +import { ChroniclePreview } from 'api/gen' +import { ChronicleCardData } from 'features/chronicle/type' +import { getChronicleCardTitle } from 'shared/chronicle/getChronicleCardTitle/getChronicleCardTitle' +import { getFormattedChronicleDate } from 'shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate' + +export const chroniclePreviewToChronicalCardData = (data: ChroniclePreview): ChronicleCardData => { + return { + date: getFormattedChronicleDate(data.dateCreated), + description: data.contentPreview, + id: data.id, + subtitle: data.author?.firstName ? 'Membre du Book Club' : '', + title: getChronicleCardTitle(data.author), + } +} diff --git a/src/features/offer/components/OfferBody/OfferBody.native.test.tsx b/src/features/offer/components/OfferBody/OfferBody.native.test.tsx index 1eb43c4f42b..5667b338575 100644 --- a/src/features/offer/components/OfferBody/OfferBody.native.test.tsx +++ b/src/features/offer/components/OfferBody/OfferBody.native.test.tsx @@ -403,46 +403,6 @@ describe('', () => { }) }) - it('should display social network section', async () => { - renderOfferBody({}) - - expect(await screen.findByText('Passe le bon plan\u00a0!')).toBeOnTheScreen() - }) - - it('should display container with divider on mobile', async () => { - renderOfferBody({}) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.getByTestId('messagingApp-container-with-divider')).toBeOnTheScreen() - }) - - it('should not display container with divider on desktop', async () => { - renderOfferBody({ isDesktopViewport: true }) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.queryByTestId('messagingApp-container-with-divider')).not.toBeOnTheScreen() - }) - - it('should display container without divider on desktop', async () => { - renderOfferBody({ - isDesktopViewport: true, - }) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.getByTestId('messagingApp-container-without-divider')).toBeOnTheScreen() - }) - - it('should not display container without divider on mobile', async () => { - renderOfferBody({}) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.queryByTestId('messagingApp-container-without-divider')).not.toBeOnTheScreen() - }) - it('should redirect to artist page when FF is enabled, artist not contain a comma or a semicolon, and artist name is not collectif/s', async () => { const offer: OfferResponseV2 = { ...offerResponseSnap, @@ -609,56 +569,22 @@ describe('', () => { expect(mockNavigate).not.toHaveBeenCalled() }) - describe('Chronicles section', () => { - it('should display "Voir tous les avis" button when wipOfferChronicleSection feature flag activated and viewport is not desktop', async () => { - renderOfferBody({}) - - expect(await screen.findByText('Voir tous les avis')).toBeOnTheScreen() - }) - - it('should not display "Voir tous les avis" button when wipOfferChronicleSection feature flag activated and viewport is desktop', async () => { - renderOfferBody({ isDesktopViewport: true }) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.queryByText('Voir tous les avis')).not.toBeOnTheScreen() - }) - - it('should not display "Voir tous les avis" button when wipOfferChronicleSection feature flag deactivated', async () => { - setFeatureFlags() - - renderOfferBody({}) - - await screen.findByText(offerResponseSnap.name) - - expect(screen.queryByText('Voir tous les avis')).not.toBeOnTheScreen() - }) - - it('should navigate to chronicles page when pressing "Voir tous les avis" button', async () => { - renderOfferBody({}) - - await user.press(await screen.findByText('Voir tous les avis')) + type RenderOfferBodyType = Partial> & { + isDesktopViewport?: boolean + } - expect(mockNavigate).toHaveBeenNthCalledWith(1, 'Chronicles', { offerId: 116656 }) - }) - }) + function renderOfferBody({ + offer = offerResponseSnap, + subcategory = mockSubcategory, + isDesktopViewport, + }: RenderOfferBodyType) { + render( + reactQueryProviderHOC( + + ), + { + theme: { isDesktopViewport: isDesktopViewport ?? false }, + } + ) + } }) - -type RenderOfferBodyType = Partial> & { - isDesktopViewport?: boolean -} - -function renderOfferBody({ - offer = offerResponseSnap, - subcategory = mockSubcategory, - isDesktopViewport, -}: RenderOfferBodyType) { - render( - reactQueryProviderHOC( - - ), - { - theme: { isDesktopViewport: isDesktopViewport ?? false }, - } - ) -} diff --git a/src/features/offer/components/OfferBody/OfferBody.tsx b/src/features/offer/components/OfferBody/OfferBody.tsx index 1e3a113d513..97b38fcf7fc 100644 --- a/src/features/offer/components/OfferBody/OfferBody.tsx +++ b/src/features/offer/components/OfferBody/OfferBody.tsx @@ -5,14 +5,10 @@ import styled, { useTheme } from 'styled-components/native' import { CategoryIdEnum, OfferResponseV2 } from 'api/gen' import { useAuthContext } from 'features/auth/context/AuthContext' -import { ChronicleCardList } from 'features/chronicle/components/ChronicleCardList/ChronicleCardList' -import { CHRONICLE_ITEM_WIDTH } from 'features/chronicle/constant' -import { chroniclesSnap } from 'features/chronicle/fixtures/chroniclesSnap' import { UseNavigationType } from 'features/navigation/RootNavigator/types' import { OfferAbout } from 'features/offer/components/OfferAbout/OfferAbout' import { OfferArtists } from 'features/offer/components/OfferArtists/OfferArtists' import { OfferCTAButton } from 'features/offer/components/OfferCTAButton/OfferCTAButton' -import { OfferMessagingApps } from 'features/offer/components/OfferMessagingApps/OfferMessagingApps' import { OfferPlace } from 'features/offer/components/OfferPlace/OfferPlace' import { OfferReactionSection } from 'features/offer/components/OfferReactionSection/OfferReactionSection' import { OfferSummaryInfoList } from 'features/offer/components/OfferSummaryInfoList/OfferSummaryInfoList' @@ -33,13 +29,10 @@ import { Subcategory } from 'libs/subcategories/types' import { useGetCurrencyToDisplay } from 'shared/currency/useGetCurrencyToDisplay' import { useGetPacificFrancToEuroRate } from 'shared/exchangeRates/useGetPacificFrancToEuroRate' import { isNullOrUndefined } from 'shared/isNullOrUndefined/isNullOrUndefined' -import { ButtonSecondaryBlack } from 'ui/components/buttons/ButtonSecondaryBlack' -import { SectionWithDivider } from 'ui/components/SectionWithDivider' import { Separator } from 'ui/components/Separator' -import { InternalTouchableLink } from 'ui/components/touchableLink/InternalTouchableLink' import { ViewGap } from 'ui/components/ViewGap/ViewGap' import { InformationTags } from 'ui/InformationTags/InformationTags' -import { getSpacing, Spacer, TypoDS } from 'ui/theme' +import { getSpacing, TypoDS } from 'ui/theme' import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' type Props = { @@ -57,9 +50,6 @@ export const OfferBody: FunctionComponent = ({ const { navigate } = useNavigation() const hasArtistPage = useFeatureFlag(RemoteStoreFeatureFlags.WIP_ARTIST_PAGE) - const hasOfferChronicleSection = useFeatureFlag( - RemoteStoreFeatureFlags.WIP_OFFER_CHRONICLE_SECTION - ) const { user } = useAuthContext() const currency = useGetCurrencyToDisplay() @@ -162,31 +152,7 @@ export const OfferBody: FunctionComponent = ({ /> ) : null} - - - {hasOfferChronicleSection && !isDesktopViewport ? ( - - {/* To remove with the data from the back */} - - - - ) : null} - - {isDesktopViewport ? ( - - - - ) : ( - - - - - )} ) } @@ -195,6 +161,7 @@ const Container = styled.View(({ theme }) => ({ flexShrink: 1, width: '100%', gap: theme.isDesktopViewport ? getSpacing(16) : getSpacing(8), + marginBottom: theme.isDesktopViewport ? 0 : getSpacing(8), })) const MarginContainer = styled(ViewGap)(({ theme }) => diff --git a/src/features/offer/components/OfferContent/OfferContent.native.test.tsx b/src/features/offer/components/OfferContent/OfferContent.native.test.tsx index 3ca9999d294..03ff8684248 100644 --- a/src/features/offer/components/OfferContent/OfferContent.native.test.tsx +++ b/src/features/offer/components/OfferContent/OfferContent.native.test.tsx @@ -9,6 +9,7 @@ import { SubcategoryIdEnumv2, } from 'api/gen' import * as useGoBack from 'features/navigation/useGoBack' +import { chroniclePreviewToChronicalCardData } from 'features/offer/adapters/chroniclePreviewToChronicleCardData' import * as useSimilarOffers from 'features/offer/api/useSimilarOffers' import { CineContentCTAID } from 'features/offer/components/OfferCine/CineContentCTA' import { PlaylistType } from 'features/offer/enums' @@ -612,6 +613,45 @@ describe('', () => { expect(screen.queryByTestId(CineContentCTAID)).not.toBeOnTheScreen() }) }) + + describe('Chronicles section', () => { + it('should not display chronicles section when there are no chronicles', async () => { + renderOfferContent({ + offer: { + ...offerResponseSnap, + subcategoryId: SubcategoryIdEnum.LIVRE_PAPIER, + chronicles: [], + }, + }) + + await waitFor(() => expect(screen.queryByText("L'avis du book club")).not.toBeOnTheScreen()) + }) + + it('should display "Voir tous les avis" button', async () => { + renderOfferContent({ + offer: { ...offerResponseSnap, subcategoryId: SubcategoryIdEnum.LIVRE_PAPIER }, + }) + await screen.findByText("L'avis du book club") + + expect(screen.getByText('Voir tous les avis')).toBeOnTheScreen() + }) + + it('should navigate to chronicles page when pressing "Voir tous les avis" button', async () => { + renderOfferContent({ + offer: { ...offerResponseSnap, subcategoryId: SubcategoryIdEnum.LIVRE_PAPIER }, + }) + + await user.press(await screen.findByText('Voir tous les avis')) + + expect(mockNavigate).toHaveBeenNthCalledWith(1, 'Chronicles', { offerId: 116656 }) + }) + }) + + it('should display social network section', async () => { + renderOfferContent({}) + + expect(await screen.findByText('Passe le bon plan\u00a0!')).toBeOnTheScreen() + }) }) }) @@ -623,7 +663,10 @@ function renderOfferContent({ offer = offerResponseSnap, subcategory = mockSubcategory, isDesktopViewport, + chronicles, }: RenderOfferContentType) { + const chroniclesData = + chronicles || offer.chronicles.map((data) => chroniclePreviewToChronicalCardData(data)) render( reactQueryProviderHOC( @@ -631,6 +674,7 @@ function renderOfferContent({ offer={offer} searchGroupList={subcategoriesDataTest.searchGroups} subcategory={subcategory} + chronicles={chroniclesData} /> ), diff --git a/src/features/offer/components/OfferContent/OfferContent.tsx b/src/features/offer/components/OfferContent/OfferContent.tsx index 097d45bdba8..1e6fdbfacc1 100644 --- a/src/features/offer/components/OfferContent/OfferContent.tsx +++ b/src/features/offer/components/OfferContent/OfferContent.tsx @@ -17,6 +17,7 @@ export const OfferContent: FunctionComponent = ({ offer, searchGroupList, subcategory, + chronicles, }) => { const { navigate } = useNavigation() const handlePress = (defaultIndex = 0) => { @@ -44,6 +45,7 @@ export const OfferContent: FunctionComponent = ({ onOfferPreviewPress={handlePress} BodyWrapper={BodyWrapper} footer={footer} + chronicles={chronicles} subcategory={subcategory} /> diff --git a/src/features/offer/components/OfferContent/OfferContent.web.tsx b/src/features/offer/components/OfferContent/OfferContent.web.tsx index 5d0abbea1eb..4fa19c81616 100644 --- a/src/features/offer/components/OfferContent/OfferContent.web.tsx +++ b/src/features/offer/components/OfferContent/OfferContent.web.tsx @@ -18,6 +18,7 @@ export const OfferContent: FunctionComponent = ({ offer, searchGroupList, subcategory, + chronicles, }) => { const { visible, showModal, hideModal } = useModal(false) const { isDesktopViewport } = useTheme() @@ -66,6 +67,7 @@ export const OfferContent: FunctionComponent = ({ offer={offer} searchGroupList={searchGroupList} subcategory={subcategory} + chronicles={chronicles} onOfferPreviewPress={handlePress} BodyWrapper={BodyWrapper} footer={footer} diff --git a/src/features/offer/components/OfferContent/OfferContentBase.tsx b/src/features/offer/components/OfferContent/OfferContentBase.tsx index 4e7de4c2f25..8a651ddc83e 100644 --- a/src/features/offer/components/OfferContent/OfferContentBase.tsx +++ b/src/features/offer/components/OfferContent/OfferContentBase.tsx @@ -18,11 +18,15 @@ import { useQueryClient } from 'react-query' import styled from 'styled-components/native' import { OfferImageResponse, OfferResponseV2 } from 'api/gen' +import { ChronicleCardList } from 'features/chronicle/components/ChronicleCardList/ChronicleCardList' +import { CHRONICLE_CARD_WIDTH } from 'features/chronicle/constant' +import { ChronicleCardData } from 'features/chronicle/type' import { OfferBody } from 'features/offer/components/OfferBody/OfferBody' import { CineContentCTA } from 'features/offer/components/OfferCine/CineContentCTA' import { useOfferCTA } from 'features/offer/components/OfferContent/OfferCTAProvider' import { OfferHeader } from 'features/offer/components/OfferHeader/OfferHeader' import { OfferImageContainer } from 'features/offer/components/OfferImageContainer/OfferImageContainer' +import { OfferMessagingApps } from 'features/offer/components/OfferMessagingApps/OfferMessagingApps' import { OfferPlaylistList } from 'features/offer/components/OfferPlaylistList/OfferPlaylistList' import { OfferWebMetaHeader } from 'features/offer/components/OfferWebMetaHeader' import { useOfferBatchTracking } from 'features/offer/helpers/useOfferBatchTracking/useOfferBatchTracking' @@ -35,11 +39,17 @@ import { QueryKeys } from 'libs/queryKeys' import { getImagesUrls } from 'shared/getImagesUrls/getImagesUrls' import { useOpacityTransition } from 'ui/animations/helpers/useOpacityTransition' import { AnchorProvider } from 'ui/components/anchor/AnchorContext' +import { ButtonSecondaryBlack } from 'ui/components/buttons/ButtonSecondaryBlack' +import { SectionWithDivider } from 'ui/components/SectionWithDivider' +import { InternalTouchableLink } from 'ui/components/touchableLink/InternalTouchableLink' +import { getSpacing, TypoDS } from 'ui/theme' +import { getHeadingAttrs } from 'ui/theme/typographyAttrs/getHeadingAttrs' type OfferContentBaseProps = OfferContentProps & { BodyWrapper: FunctionComponent onOfferPreviewPress: (index?: number) => void footer?: ReactElement | null + chronicles?: ChronicleCardData[] contentContainerStyle?: StyleProp } @@ -50,6 +60,7 @@ export const OfferContentBase: FunctionComponent = ({ searchGroupList, subcategory, footer, + chronicles, onOfferPreviewPress, contentContainerStyle, BodyWrapper = React.Fragment, @@ -149,6 +160,29 @@ export const OfferContentBase: FunctionComponent = ({ trackEventHasSeenOfferOnce={trackEventHasSeenOfferOnce} /> + {chronicles?.length ? ( + + {"L'avis du book club"} + + + + + + ) : null} + + + ({ + contentContainerStyle: { + paddingHorizontal: theme.contentPage.marginHorizontal, + paddingVertical: theme.contentPage.marginHorizontal, + }, + cardWidth: CHRONICLE_CARD_WIDTH, + snapToInterval: CHRONICLE_CARD_WIDTH, +}))`` + +const ChronciclesTitle = styled(TypoDS.Title3)(({ theme }) => ({ + paddingHorizontal: theme.contentPage.marginHorizontal, +})) + +const Gutter = styled.View(({ theme }) => ({ + paddingHorizontal: theme.contentPage.marginHorizontal, +})) + const ScrollViewContainer = React.memo( styled(IntersectionObserverScrollView)({ overflow: 'visible', }) ) + +const StyledSectionWithDivider = styled(SectionWithDivider)({ + paddingBottom: getSpacing(8), +}) diff --git a/src/features/offer/fixtures/offerResponse.ts b/src/features/offer/fixtures/offerResponse.ts index c50b2548bca..3761c365625 100644 --- a/src/features/offer/fixtures/offerResponse.ts +++ b/src/features/offer/fixtures/offerResponse.ts @@ -27,6 +27,32 @@ export const offerResponseSnap = toMutable({ reactionsCount: { likes: 1, }, + chronicles: [ + { + id: 1, + contentPreview: 'Le Voyage Extraordinaire', + dateCreated: '2025-01-20T23:32:13.978038Z', + author: { + firstName: 'John', + age: 14, + }, + }, + { + id: 2, + contentPreview: 'L’Art de la Cuisine', + dateCreated: '2025-02-20T23:32:13.978038Z', + author: { + firstName: 'Bob', + age: 12, + }, + }, + { + id: 3, + contentPreview: 'Le Futur de la Technologie', + dateCreated: '2025-03-20T23:32:13.978038Z', + author: null, + }, + ], stocks: [ { id: 118929, @@ -91,5 +117,4 @@ export const offerResponseSnap = toMutable({ }, }, isExternalBookingsDisabled: false, - chronicles: [], } as const satisfies ReadonlyDeep) diff --git a/src/features/offer/pages/Offer/Offer.native.test.tsx b/src/features/offer/pages/Offer/Offer.native.test.tsx index 9a9988cc3c3..4e2a57797e6 100644 --- a/src/features/offer/pages/Offer/Offer.native.test.tsx +++ b/src/features/offer/pages/Offer/Offer.native.test.tsx @@ -4,15 +4,14 @@ import { offerResponseSnap } from 'features/offer/fixtures/offerResponse' import { renderOfferPage } from 'features/offer/helpers/renderOfferPageTestUtil' import * as useArtistResults from 'features/offer/helpers/useArtistResults/useArtistResults' import { mockedAlgoliaOffersWithSameArtistResponse } from 'libs/algolia/fixtures/algoliaFixtures' -import * as useFeatureFlag from 'libs/firebase/firestore/featureFlags/useFeatureFlag' +import { setFeatureFlags } from 'libs/firebase/firestore/featureFlags/__tests__/setFeatureFlags' +import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types' import { PLACEHOLDER_DATA } from 'libs/subcategories/placeholderData' import { mockAuthContextWithoutUser } from 'tests/AuthContextUtils' import { screen, waitFor } from 'tests/utils' jest.unmock('react-native/Libraries/Animated/createAnimatedComponent') -jest.spyOn(useFeatureFlag, 'useFeatureFlag').mockReturnValue(false) - jest.mock('features/auth/context/AuthContext') jest @@ -41,6 +40,7 @@ jest.useFakeTimers() describe('', () => { beforeEach(() => { mockAuthContextWithoutUser({ persist: true }) + setFeatureFlags() }) afterEach(() => { @@ -85,6 +85,14 @@ describe('', () => { expect(await screen.findByText('Cinéma plein air')).toBeOnTheScreen() }) + it('should display chronicles section when FF activated', async () => { + setFeatureFlags([RemoteStoreFeatureFlags.WIP_OFFER_CHRONICLE_SECTION]) + + renderOfferPage({ mockOffer: offerResponseSnap }) + + expect(await screen.findByText("L'avis du book club")).toBeOnTheScreen() + }) + it('should display offer placeholder on init', async () => { renderOfferPage({ mockOffer: offerResponseSnap, mockIsLoading: true }) diff --git a/src/features/offer/pages/Offer/Offer.tsx b/src/features/offer/pages/Offer/Offer.tsx index 13eebd337c6..8233e40d801 100644 --- a/src/features/offer/pages/Offer/Offer.tsx +++ b/src/features/offer/pages/Offer/Offer.tsx @@ -2,9 +2,12 @@ import { useRoute } from '@react-navigation/native' import React from 'react' import { UseRouteType } from 'features/navigation/RootNavigator/types' +import { chroniclePreviewToChronicalCardData } from 'features/offer/adapters/chroniclePreviewToChronicleCardData' import { useOffer } from 'features/offer/api/useOffer' import { OfferContent } from 'features/offer/components/OfferContent/OfferContent' import { OfferContentPlaceholder } from 'features/offer/components/OfferContentPlaceholder/OfferContentPlaceholder' +import { useFeatureFlag } from 'libs/firebase/firestore/featureFlags/useFeatureFlag' +import { RemoteStoreFeatureFlags } from 'libs/firebase/firestore/types' import { useIsFalseWithDelay } from 'libs/hooks/useIsFalseWithDelay' import { useSubcategoriesMapping } from 'libs/subcategories/mappings' import { useSubcategories } from 'libs/subcategories/useSubcategories' @@ -19,14 +22,22 @@ export function Offer() { const showSkeleton = useIsFalseWithDelay(isLoading, ANIMATION_DURATION) const { data: subcategories } = useSubcategories() const subcategoriesMapping = useSubcategoriesMapping() + const hasOfferChronicleSection = useFeatureFlag( + RemoteStoreFeatureFlags.WIP_OFFER_CHRONICLE_SECTION + ) if (!offer || !subcategories) return null if (showSkeleton) return + const chronicles = hasOfferChronicleSection + ? offer.chronicles?.map((value) => chroniclePreviewToChronicalCardData(value)) + : undefined + return ( diff --git a/src/features/offer/types.ts b/src/features/offer/types.ts index 33404598ce3..014ac979a12 100644 --- a/src/features/offer/types.ts +++ b/src/features/offer/types.ts @@ -7,6 +7,7 @@ import { SearchGroupResponseModelv2, SubcategoryIdEnum, } from 'api/gen' +import { ChronicleCardData } from 'features/chronicle/type' import { Referrals } from 'features/navigation/RootNavigator/types' import { PlaylistType } from 'features/offer/enums' import { Subcategory } from 'libs/subcategories/types' @@ -61,4 +62,5 @@ export type OfferContentProps = { offer: OfferResponseV2 searchGroupList: SearchGroupResponseModelv2[] subcategory: Subcategory + chronicles?: ChronicleCardData[] } diff --git a/src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.test.ts b/src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.test.ts similarity index 54% rename from src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.test.ts rename to src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.test.ts index 33e892b2520..ac3bed53daa 100644 --- a/src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.test.ts +++ b/src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.test.ts @@ -1,8 +1,8 @@ -import { getFormattedLongMonthYear } from 'shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear' +import { getFormattedChronicleDate } from 'shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate' describe('getFormattedLongMonthYear', () => { it('should format chronicle date correctly in french and month first letter in capitals', () => { - const result = getFormattedLongMonthYear('2025-01-20T23:32:14.456451Z') + const result = getFormattedChronicleDate('2025-01-20T23:32:14.456451Z') expect(result).toEqual('Janvier 2025') }) diff --git a/src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.ts b/src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.ts similarity index 77% rename from src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.ts rename to src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.ts index 2e7e27052b4..78b8f52f47e 100644 --- a/src/shared/date/getFormattedLongMonthYear/getFormattedLongMonthYear.ts +++ b/src/shared/chronicle/getFormattedChronicleDate/getFormattedChronicleDate.ts @@ -1,4 +1,4 @@ -export function getFormattedLongMonthYear(dateString: string) { +export function getFormattedChronicleDate(dateString: string) { const date = new Date(dateString) const formattedDate = new Intl.DateTimeFormat('fr-FR', { month: 'long', diff --git a/src/ui/components/SectionWithDivider.tsx b/src/ui/components/SectionWithDivider.tsx index 4c804b59e4a..c1540e74ace 100644 --- a/src/ui/components/SectionWithDivider.tsx +++ b/src/ui/components/SectionWithDivider.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { LayoutChangeEvent } from 'react-native' +import { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native' import styled from 'styled-components/native' import { ViewGap } from 'ui/components/ViewGap/ViewGap' @@ -11,6 +11,7 @@ interface SectionProps { onLayout?: (event: LayoutChangeEvent) => void testID?: string gap: number + style?: StyleProp } export const SectionWithDivider = ({ @@ -19,12 +20,13 @@ export const SectionWithDivider = ({ margin = false, onLayout, testID, + style, gap, }: SectionProps) => { if (!visible) return null return ( - + {margin ? {children} : children} @@ -37,5 +39,5 @@ const Divider = styled.View(({ theme }) => ({ })) const MarginContainer = styled.View({ - marginHorizontal: getSpacing(6), + paddingHorizontal: getSpacing(6), })