@revolugo/booking-api-client
Advanced tools
Comparing version 1.6.6-beta.6 to 1.6.6-beta.7
@@ -114,5 +114,3 @@ "use strict"; | ||
Poller.instance = null; | ||
async function pollRequest(request, options, pollerCallback | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
) { | ||
async function pollRequest(request, options, pollerCallback) { | ||
const poller = Poller.getInstance(); | ||
@@ -119,0 +117,0 @@ poller.poll(request, options); |
@@ -80,3 +80,3 @@ /* eslint-disable no-console, import/no-extraneous-dependencies */ | ||
schema.validate( | ||
keysChangeCase(hotelOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(hotelOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -101,3 +101,3 @@ ) { | ||
schema.validate( | ||
keysChangeCase(hotelOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(hotelOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -145,7 +145,7 @@ ) { | ||
schema.validate( | ||
keysChangeCase(hotelRoomOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(hotelRoomOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
) { | ||
throw new Error( | ||
'Hotel Room Offer Request response does not match the schema' | ||
'Hotel Room Offer Request response does not match the schema', | ||
) | ||
@@ -168,7 +168,7 @@ } | ||
schema.validate( | ||
keysChangeCase(hotelRoomOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(hotelRoomOfferRequest, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
) { | ||
throw new Error( | ||
'Hotel Room Offer Request response does not match the schema' | ||
'Hotel Room Offer Request response does not match the schema', | ||
) | ||
@@ -191,3 +191,3 @@ } | ||
schema.validate( | ||
keysChangeCase(hotelRoomOffers, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(hotelRoomOffers, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -214,3 +214,3 @@ ) { | ||
schema.validate( | ||
keysChangeCase(bookingPolicy, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(bookingPolicy, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -236,3 +236,3 @@ ) { | ||
}, | ||
} | ||
}, | ||
) | ||
@@ -248,3 +248,3 @@ | ||
schema.validate( | ||
keysChangeCase(unconfirmedBooking, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(unconfirmedBooking, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -257,3 +257,3 @@ ) { | ||
throw new Error( | ||
'Unconfirmed Booking status does not match BookingApiStatusEnum.Created' | ||
'Unconfirmed Booking status does not match BookingApiStatusEnum.Created', | ||
) | ||
@@ -284,3 +284,3 @@ } | ||
}, | ||
} | ||
}, | ||
) | ||
@@ -311,3 +311,3 @@ } catch { | ||
}, | ||
} | ||
}, | ||
) | ||
@@ -323,3 +323,3 @@ | ||
schema.validate( | ||
keysChangeCase(inProgressBooking, CASE_TRANSFORMERS.SNAKE_CASE) | ||
keysChangeCase(inProgressBooking, CASE_TRANSFORMERS.SNAKE_CASE), | ||
).error | ||
@@ -332,3 +332,3 @@ ) { | ||
throw new Error( | ||
'inProgress Booking status does not match BookingApiStatusEnum.Ip' | ||
'inProgress Booking status does not match BookingApiStatusEnum.Ip', | ||
) | ||
@@ -349,3 +349,3 @@ } | ||
}, | ||
} | ||
}, | ||
) | ||
@@ -352,0 +352,0 @@ |
@@ -36,3 +36,3 @@ { | ||
"types": "build/index.d.ts", | ||
"version": "1.6.6-beta.6" | ||
"version": "1.6.6-beta.7" | ||
} |
@@ -15,3 +15,3 @@ /* eslint-disable max-classes-per-file */ | ||
export const v1ApiClient = ( | ||
apiConfig: Configuration | ||
apiConfig: Configuration, | ||
): { | ||
@@ -59,4 +59,4 @@ bookingPolicies: apis.BookingPoliciesInterface | ||
`Invalid Revolugo Api Version. Possible versions are : ${JSON.stringify( | ||
Object.values(ApiVersionEnum) | ||
)}` | ||
Object.values(ApiVersionEnum), | ||
)}`, | ||
) | ||
@@ -63,0 +63,0 @@ } |
@@ -79,3 +79,3 @@ import { v4 as uuidv4 } from 'uuid' | ||
eventName: TPollerEventName, | ||
payload?: TPollerEventCallbackArg | ||
payload?: TPollerEventCallbackArg, | ||
): void { | ||
@@ -88,7 +88,7 @@ this.events[eventName](payload) | ||
request: TRequest<V>, | ||
options: TOptions<V> | ||
options: TOptions<V>, | ||
): Promise<void> { | ||
const resultFormatted = keysChangeCase( | ||
result ?? {}, | ||
CASE_TRANSFORMERS.CAMEL_CASE | ||
CASE_TRANSFORMERS.CAMEL_CASE, | ||
) | ||
@@ -182,3 +182,3 @@ | ||
options: TOptions<R>, | ||
pollerCallback?: TPollerCallback | ||
pollerCallback?: TPollerCallback, | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type | ||
@@ -185,0 +185,0 @@ ): Promise<PollerReturn | void> { |
@@ -20,3 +20,3 @@ import { camelCase } from 'camel-case' | ||
input: string | string[], | ||
toCase: CASE_TRANSFORMERS | ||
toCase: CASE_TRANSFORMERS, | ||
): string | string[] => { | ||
@@ -43,3 +43,3 @@ if (Array.isArray(input)) { | ||
// eslint-disable-next-line unicorn/no-object-as-default-parameter | ||
options: { deep?: boolean; exclude?: (string | RegExp)[] } = { deep: true } | ||
options: { deep?: boolean; exclude?: (string | RegExp)[] } = { deep: true }, | ||
): any => { | ||
@@ -58,3 +58,3 @@ if (isObject(obj)) { | ||
}, | ||
<any>{} | ||
<any>{}, | ||
) | ||
@@ -61,0 +61,0 @@ } else if (Array.isArray(obj)) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1156227
22248