Initial settings service

Fastify API for storing third-party integration credentials (Newbook, Resos,
Nextcloud, Azure, SambaPOS) with AES-256-GCM encryption for sensitive fields.
Includes Newbook room sync endpoint and global_config store for shared app data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-01 18:56:19 +00:00
commit e7b08ccf31
13 changed files with 381 additions and 0 deletions

View file

@ -0,0 +1,32 @@
// Field definitions per integration.
// configFields — stored plaintext in the config JSONB column
// secretFields — encrypted in the secrets column (api keys, passwords)
export const INTEGRATIONS = {
newbook: {
name: 'Newbook PMS',
configFields: ['region', 'username'],
secretFields: ['api_key', 'password'],
},
resos: {
name: 'Resos Reservations',
configFields: [],
secretFields: ['api_key'],
},
nextcloud: {
name: 'Nextcloud',
configFields: ['base_url', 'username'],
secretFields: ['password'],
},
azure: {
name: 'Azure AD',
configFields: ['tenant_id', 'client_id'],
secretFields: ['client_secret'],
},
sambapos: {
name: 'SambaPOS',
configFields: ['host', 'port', 'database', 'graphql_endpoint', 'username'],
secretFields: ['password'],
},
}
export const MASKED = '••••••••'