Skip to content

Commit 2a1bbe6

Browse files
authored
Merge pull request #932 from duffelhq/STAYS-1786/metadata-on-read
feat: add metadata to JS SDK for Stays.Bookings
2 parents 920405a + 9deab6a commit 2a1bbe6

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@duffel/api",
3-
"version": "2.12.1",
3+
"version": "2.12.2",
44
"description": "Javascript client library for the Duffel API",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",

src/Stays/StaysTypes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,11 @@ export interface StaysBooking {
612612
*/
613613
rooms: number
614614

615+
/**
616+
* Metadata pertaining to this booking, generated by the Duffel API.
617+
*/
618+
metadata: Record<string, string> | null
619+
615620
/**
616621
* Deprecated: Instructions to access the accommodation in the booking
617622
*/

src/Stays/mocks.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ export const MOCK_BOOKING: StaysBooking = {
182182
key_collection: {
183183
instructions: 'Key is at the property. Collect from the lock box.',
184184
},
185+
metadata: {
186+
checkout_reference: 'usr_0000AePJGl5G9ZYfmNllrs',
187+
},
185188
}
186189

187190
export const MOCK_CREATE_BOOKING_PAYLOAD: StaysBookingPayload = {

0 commit comments

Comments
 (0)