Skip to content

Commit aed3dd8

Browse files
committed
feat: Sync with Seam API via dae9335817789c898549f2debeaf0abefa393e6d
1 parent 83d4593 commit aed3dd8

File tree

4 files changed

+57
-9
lines changed

4 files changed

+57
-9
lines changed

src/lib/seam/connect/models/customer/customer-data.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ import {
2626
user_resource,
2727
} from './user-identity-resources.js'
2828

29-
export const customer_data = z.object({
30-
customer_key: z
31-
.string()
32-
.min(1)
33-
.refine((val) => val === val.trim(), {
34-
message: 'Must not have leading or trailing whitespace',
35-
})
36-
.describe('Your unique identifier for the customer.'),
37-
29+
export const external_resources = z.object({
3830
// Location resources
3931
spaces: z
4032
.array(neutral_resource)
@@ -106,6 +98,20 @@ export const customer_data = z.object({
10698
.describe('List of access grants.'),
10799
})
108100

101+
export type ExternalResources = z.infer<typeof external_resources>
102+
103+
export const customer_data = z
104+
.object({
105+
customer_key: z
106+
.string()
107+
.min(1)
108+
.refine((val) => val === val.trim(), {
109+
message: 'Must not have leading or trailing whitespace',
110+
})
111+
.describe('Your unique identifier for the customer.'),
112+
})
113+
.merge(external_resources)
114+
109115
export type CustomerData = z.infer<typeof customer_data>
110116

111117
// Re-export all resource types for convenience

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ export const neutral_resource = base_location_resource.extend({
1616
message: 'Must not have leading or trailing whitespace',
1717
})
1818
.describe('Your unique identifier for the space.'),
19+
parent_site_key: z
20+
.string()
21+
.min(1)
22+
.refine((val) => val === val.trim(), {
23+
message: 'Must not have leading or trailing whitespace',
24+
})
25+
.describe('Your unique identifier for the site.')
26+
.optional(),
1927
})
2028

2129
export const property_resource = base_location_resource.extend({

src/lib/seam/connect/openapi.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50691,6 +50691,12 @@ export default {
5069150691
'Your display name for this location resource.',
5069250692
type: 'string',
5069350693
},
50694+
parent_site_key: {
50695+
description:
50696+
'Your unique identifier for the site.',
50697+
minLength: 1,
50698+
type: 'string',
50699+
},
5069450700
space_key: {
5069550701
description:
5069650702
'Your unique identifier for the space.',
@@ -51928,6 +51934,11 @@ export default {
5192851934
'Your display name for this location resource.',
5192951935
type: 'string',
5193051936
},
51937+
parent_site_key: {
51938+
description: 'Your unique identifier for the site.',
51939+
minLength: 1,
51940+
type: 'string',
51941+
},
5193151942
space_key: {
5193251943
description: 'Your unique identifier for the space.',
5193351944
minLength: 1,
@@ -76832,6 +76843,11 @@ export default {
7683276843
'Your display name for this location resource.',
7683376844
type: 'string',
7683476845
},
76846+
parent_site_key: {
76847+
description: 'Your unique identifier for the site.',
76848+
minLength: 1,
76849+
type: 'string',
76850+
},
7683576851
space_key: {
7683676852
description: 'Your unique identifier for the space.',
7683776853
minLength: 1,
@@ -76913,6 +76929,11 @@ export default {
7691376929
'Your display name for this location resource.',
7691476930
type: 'string',
7691576931
},
76932+
parent_site_key: {
76933+
description: 'Your unique identifier for the site.',
76934+
minLength: 1,
76935+
type: 'string',
76936+
},
7691676937
space_key: {
7691776938
description: 'Your unique identifier for the space.',
7691876939
minLength: 1,
@@ -77048,6 +77069,11 @@ export default {
7704877069
'Your display name for this location resource.',
7704977070
type: 'string',
7705077071
},
77072+
parent_site_key: {
77073+
description: 'Your unique identifier for the site.',
77074+
minLength: 1,
77075+
type: 'string',
77076+
},
7705177077
space_key: {
7705277078
description: 'Your unique identifier for the space.',
7705377079
minLength: 1,

src/lib/seam/connect/route-types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35762,6 +35762,8 @@ export type Routes = {
3576235762
name: string
3576335763
/** Your unique identifier for the space. */
3576435764
space_key: string
35765+
/** Your unique identifier for the site. */
35766+
parent_site_key?: string | undefined
3576535767
}[]
3576635768
| undefined
3576735769
/** List of general sites or areas. */
@@ -36173,6 +36175,8 @@ export type Routes = {
3617336175
name: string
3617436176
/** Your unique identifier for the space. */
3617536177
space_key: string
36178+
/** Your unique identifier for the site. */
36179+
parent_site_key?: string | undefined
3617636180
}[]
3617736181
| undefined
3617836182
/** List of general sites or areas. */
@@ -102577,6 +102581,8 @@ export type Routes = {
102577102581
name: string
102578102582
/** Your unique identifier for the space. */
102579102583
space_key: string
102584+
/** Your unique identifier for the site. */
102585+
parent_site_key?: string | undefined
102580102586
}[]
102581102587
| undefined
102582102588
}
@@ -102648,6 +102654,8 @@ export type Routes = {
102648102654
name: string
102649102655
/** Your unique identifier for the space. */
102650102656
space_key: string
102657+
/** Your unique identifier for the site. */
102658+
parent_site_key?: string | undefined
102651102659
}[]
102652102660
| undefined
102653102661
}

0 commit comments

Comments
 (0)