contacts.delete
Delete a contact by id. Phones cascade via FK. Returns { ok: true } or throws if not found.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
contacts.get
Fetch a single contact by id for this tenant. Returns { contact } with phones embedded, or throws if not found. DRY: delegates to the shared getContact() query (same as the tRPC router).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
contact | object | yes | |
contact.id | string | yes | |
contact.displayName | string | yes | |
contact.category | string | yes | |
contact.company | string · nullable | yes | |
contact.email | string · nullable | yes | |
contact.notes | string · nullable | yes | |
contact.phones | array of object | yes | |
contact.updatedAt | string | yes |
contacts.guest
Get a single guest profile by id (name, email, phone, locale). DRY: delegates to getGuestById() (same as tRPC contacts.guests.byId).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
guestId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string · nullable | yes | |
email | string · nullable | yes | |
phone | string · nullable | yes | |
locale | string · nullable | yes | |
createdAt | string | yes |
contacts.guestBilling.delete
Delete a guest's billing/invoice address.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
contacts.guestBilling.list
Contacts: guest billing list. Read-only query. See the input schema for argument details.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
guestId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
addresses | array of object | yes | |
addresses.id | string | yes | |
addresses.tenantId | string | yes | |
addresses.guestId | string | yes | |
addresses.company | string · nullable | yes | |
addresses.name | string | yes | |
addresses.line1 | string · nullable | yes | |
addresses.line2 | string · nullable | yes | |
addresses.postalCode | string · nullable | yes | |
addresses.city | string · nullable | yes | |
addresses.country | string | yes | |
addresses.taxId | string · nullable | yes | |
addresses.reservationRef | string · nullable | yes | |
addresses.isBusiness | boolean | yes | |
addresses.isDefault | boolean | yes | |
addresses.createdAt | string | yes | |
addresses.updatedAt | string | yes |
contacts.guestBilling.upsert
Contacts: guest billing upsert. Mutation — changes data. See the input schema for argument details.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | no | |
guestId | string | yes | |
company | string | no | |
name | string | no | |
line1 | string | no | |
line2 | string | no | |
postalCode | string | no | |
city | string | no | |
country | string | no | |
taxId | string | no | |
reservationRef | string | no | |
isBusiness | boolean | no | |
isDefault | boolean | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
address | object | yes | |
address.id | string | yes | |
address.tenantId | string | yes | |
address.guestId | string | yes | |
address.company | string · nullable | yes | |
address.name | string | yes | |
address.line1 | string · nullable | yes | |
address.line2 | string · nullable | yes | |
address.postalCode | string · nullable | yes | |
address.city | string · nullable | yes | |
address.country | string | yes | |
address.taxId | string · nullable | yes | |
address.reservationRef | string · nullable | yes | |
address.isBusiness | boolean | yes | |
address.isDefault | boolean | yes | |
address.createdAt | string | yes | |
address.updatedAt | string | yes |
contacts.guests.byId
Contacts: guests by id. Read-only query. See the input schema for argument details.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
guestId | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string · nullable | yes | |
email | string · nullable | yes | |
phone | string · nullable | yes | |
locale | string · nullable | yes | |
createdAt | string | yes |
contacts.guests.setEmail
Contacts: guests set email. Mutation — changes data. See the input schema for argument details.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
guestId | string | yes | |
email | string | yes |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
ok | literal | yes | One of: true |
contacts.invoice-guests
List guests that have at least one billing address (the 'Rechnungsgäste'). Each guest carries its billing addresses including the reservation number (reservationRef). Optional search filters over guest name/email and billing company. Default limit 25, max 100. DRY: delegates to the shared invoiceGuests() query (same as the tRPC router).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
search | string | no | |
page | integer | no | Default: 1 |
limit | integer | no | Default: 25 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.name | string | yes | |
items.email | string · nullable | yes | |
items.phone | string · nullable | yes | |
items.locale | string · nullable | yes | |
items.billingAddresses | array of object | yes | |
pagination | object | yes | |
pagination.page | number | yes | |
pagination.limit | number | yes | |
pagination.total | number | yes | |
pagination.totalPages | number | yes |
contacts.list
List paginated contacts for this tenant. Supports category filter (reinigung/rezeption/hausmeister/dienstleister/sonstig) and free-text search across display name, company, email, and phone number. Ordered by display name ASC. DRY: delegates to the shared listContacts() query (same as the tRPC router).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
category | enum | no | One of: reinigung, rezeption, hausmeister, dienstleister, sonstig |
search | string | no | |
page | integer | no | Default: 1 |
limit | integer | no | Default: 25 |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.displayName | string | yes | |
items.category | string | yes | |
items.company | string · nullable | yes | |
items.email | string · nullable | yes | |
items.notes | string · nullable | yes | |
items.phones | array of object | yes | |
items.updatedAt | string | yes | |
pagination | object | yes | |
pagination.page | number | yes | |
pagination.limit | number | yes | |
pagination.total | number | yes | |
pagination.totalPages | number | yes |
contacts.search-guests
Search guests for linking to a contact. Searches over guest name, canonical email, and canonical phone number. Default limit: 25. Max: 100. DRY: delegates to the shared searchGuests() query (same as the tRPC router).
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
search | string | yes | |
limit | integer | no |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
items | array of object | yes | |
items.id | string | yes | |
items.name | string | yes | |
items.email | string · nullable | yes | |
items.phone | string · nullable | yes |
contacts.upsert
Create or update a contact with its full phones set. If id is provided, updates the existing contact; otherwise creates a new one. Transactional: diffs the phones set (delete removed, insert/update remaining). Enforces UNIQUE(tenant_id, phone_number) across contacts — throws CONFLICT if a phone number is already assigned to another contact. Returns { contact } with phones embedded.
Input parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | no | |
displayName | string | yes | |
category | enum | yes | One of: reinigung, rezeption, hausmeister, dienstleister, sonstig |
company | string | no | |
email | string | no | |
notes | string | no | |
phones | array of object | no | Default: [] |
phones.id | string | no | |
phones.phoneNumber | string | yes | |
phones.label | string | no | |
phones.isPrimary | boolean | no | Default: false |
Output fields
| Field | Type | Required | Notes |
|---|---|---|---|
contact | object | yes | |
contact.id | string | yes | |
contact.displayName | string | yes | |
contact.category | string | yes | |
contact.company | string · nullable | yes | |
contact.email | string · nullable | yes | |
contact.notes | string · nullable | yes | |
contact.phones | array of object | yes | |
contact.updatedAt | string | yes |