Skip to content

Commit e422eab

Browse files
committed
feat: Sync with Seam API via b100487d7eda23c7d47509bc6cd5d81e6c5b7dd6
1 parent f357ade commit e422eab

4 files changed

Lines changed: 572 additions & 0 deletions

File tree

src/lib/seam/connect/models/customer/location-resources.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { z } from 'zod'
22

33
import { custom_metadata_input } from '../custom-metadata.js'
4+
import { space_customer_data, space_geolocation } from '../spaces/space.js'
45

56
// Base location resource with common fields
67
const base_location_resource = z.object({
@@ -32,6 +33,14 @@ export const neutral_resource = base_location_resource.extend({
3233
.describe(
3334
'Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space.',
3435
),
36+
customer_data: space_customer_data
37+
.optional()
38+
.describe(
39+
'Reservation/stay-related defaults for the space (time zone, default check-in/out times, address).',
40+
),
41+
geolocation: space_geolocation
42+
.optional()
43+
.describe('Geographic coordinates (latitude and longitude) of the space.'),
3544
})
3645

3746
export const property_resource = base_location_resource.extend({

src/lib/seam/connect/models/spaces/space.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,19 @@ export const space_customer_data = z
2222
.describe(
2323
'Default check-out time for reservations at the space, as HH:mm or HH:mm:ss.',
2424
),
25+
address: z.string().nullish().describe('Postal address for the space.'),
2526
})
2627
.describe('Reservation/stay-related defaults for the space.')
2728

29+
export const space_geolocation = z
30+
.object({
31+
latitude: z.number().describe('Latitude of the space, in decimal degrees.'),
32+
longitude: z
33+
.number()
34+
.describe('Longitude of the space, in decimal degrees.'),
35+
})
36+
.describe('Geographic coordinates of the space.')
37+
2838
export const space = z.object({
2939
space_id: z.string().uuid().describe('ID of the space.'),
3040
workspace_id: z
@@ -50,6 +60,9 @@ export const space = z.object({
5060
.optional()
5161
.describe('Customer key associated with the space.'),
5262
customer_data: space_customer_data.optional(),
63+
geolocation: space_geolocation
64+
.nullish()
65+
.describe('Geographic coordinates (latitude and longitude) of the space.'),
5366
parent_space_id: z.string().uuid().optional().describe(`
5467
---
5568
undocumented: Only used internally.

0 commit comments

Comments
 (0)