From 9deab6a0b4d59c9c2847c488c3b3149c0e1d786e Mon Sep 17 00:00:00 2001 From: Jekri Preclaro Orlina Date: Thu, 4 Jul 2024 09:39:22 +0100 Subject: [PATCH] feat: add metadata to JS SDK for Stays.Bookings --- package.json | 2 +- src/Stays/StaysTypes.ts | 5 +++++ src/Stays/mocks.ts | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b48f6a56..eb34e89a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@duffel/api", - "version": "2.12.1", + "version": "2.12.2", "description": "Javascript client library for the Duffel API", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/src/Stays/StaysTypes.ts b/src/Stays/StaysTypes.ts index 1c14f57f..c8b133ee 100644 --- a/src/Stays/StaysTypes.ts +++ b/src/Stays/StaysTypes.ts @@ -612,6 +612,11 @@ export interface StaysBooking { */ rooms: number + /** + * Metadata pertaining to this booking, generated by the Duffel API. + */ + metadata: Record | null + /** * Deprecated: Instructions to access the accommodation in the booking */ diff --git a/src/Stays/mocks.ts b/src/Stays/mocks.ts index c22768c5..d7058416 100644 --- a/src/Stays/mocks.ts +++ b/src/Stays/mocks.ts @@ -182,6 +182,9 @@ export const MOCK_BOOKING: StaysBooking = { key_collection: { instructions: 'Key is at the property. Collect from the lock box.', }, + metadata: { + checkout_reference: 'usr_0000AePJGl5G9ZYfmNllrs', + }, } export const MOCK_CREATE_BOOKING_PAYLOAD: StaysBookingPayload = {