FoyerDevelopers

Generated · Live registry

hospitable tools

3 tools in this domain, generated from the running registry.

All tool domains

hospitable.heal_messages

writesconfirm

Recover this tenant's Hospitable MESSAGE backlog — messages the 15-min poll-reconcile can no longer reach because their reservation aged past its rolling 14-day lookback window (e.g. messages created between the historical backfill snapshot and live-capture go-live). Walks hospitable_property_mappings, pages reservations over a WIDE lookbackDays window, and — comparing each reservation's Hospitable last_message_at against the latest message Foyer has stored — re-ingests ONLY the drifted ones through the idempotent shared path (no AI replay, no duplicates). Pass dryRun=true to count drifted reservations without writing. Returns { ok:true, reservationsScanned, drifted, messagesRecovered, sample } or { ok:false, reason, message }. Mutating (unless dryRun) — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
lookbackDaysintegernoDefault: 60
dryRunbooleannoDefault: false

Output fields

One of 2 shapes, depending on the outcome:

Shape 1

FieldTypeRequiredNotes
okliteralyesOne of: true
reservationsScannedintegeryes
driftedintegeryes
messagesRecoveredintegeryes
samplearray of objectyes
sample.reservationUuidstringyes
sample.hospitableLastMessageAtstringyes
sample.foyerLastMessageAtstring · nullableyes
sample.recoveredintegeryes
dryRunbooleanyes

Shape 2

FieldTypeRequiredNotes
okliteralyesOne of: false
reasonenumyesOne of: no_api_key, auth_failed, api_error, internal
messagestringyes

hospitable.import_reservations

writesconfirm

Backfill this tenant's Hospitable reservations into Foyer stays (+ minimal guests), so a newly connected hotel doesn't start with an empty calendar. Walks the tenant's hospitable_property_mappings and queries reservations per mapped property; unmapped properties are never imported. Idempotent on (tenant, ota_source='hospitable', reservation.code) — re-running updates rather than duplicates. Pass dryRun=true to count would-create/would-update without writing. Returns either { ok: true, ...counts, sample } or { ok: false, reason, message }. Mutating action (unless dryRun) — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
lookbackDaysintegernoDefault: 365
dryRunbooleannoDefault: false

Output fields

One of 2 shapes, depending on the outcome:

Shape 1

FieldTypeRequiredNotes
okliteralyesOne of: true
propertiesQueriedintegeryes
reservationsFetchedintegeryes
staysCreatedintegeryes
staysUpdatedintegeryes
guestsCreatedintegeryes
skippedarray of objectyes
skipped.codestringyes
skipped.reasonstringyes
samplearray of objectyes
sample.codestringyes
sample.roomstringyes
sample.actionstringyes
sample.statusstringyes
dryRunbooleanyes

Shape 2

FieldTypeRequiredNotes
okliteralyesOne of: false
reasonenumyesOne of: no_api_key, auth_failed, api_error, internal
messagestringyes

hospitable.resync_reservation

writesconfirm

Re-pull ONE Hospitable reservation's messages into Foyer on demand — the targeted fix for a reservation the 15-min poll-reconcile can no longer reach (it aged past the rolling 14-day lookback). Fetches every message on the reservation and re-ingests through the idempotent shared path (no AI replay, no duplicates), so re-running is a no-op. Takes the reservation UUID (NOT the reservation code). Returns { ok:true, messagesSeen, messagesInserted, skipped } or { ok:false, reason, message }. Mutating — requires _confirm: true.

Input parameters

FieldTypeRequiredNotes
reservationUuidstringyes

Output fields

One of 2 shapes, depending on the outcome:

Shape 1

FieldTypeRequiredNotes
okliteralyesOne of: true
messagesSeenintegeryes
messagesInsertedintegeryes
skippedintegeryes

Shape 2

FieldTypeRequiredNotes
okliteralyesOne of: false
reasonenumyesOne of: no_api_key, auth_failed, api_error, internal
messagestringyes