@seamapi/types 1.421.0 → 1.422.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/connect.cjs +1633 -583
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +2630 -1024
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/models/customer/access-grant-resources.d.ts +420 -0
  8. package/lib/seam/connect/models/customer/access-grant-resources.js +111 -0
  9. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -0
  10. package/lib/seam/connect/models/customer/business-vertical.d.ts +3 -0
  11. package/lib/seam/connect/models/customer/business-vertical.js +11 -0
  12. package/lib/seam/connect/models/customer/business-vertical.js.map +1 -0
  13. package/lib/seam/connect/models/customer/customer-data.d.ts +597 -0
  14. package/lib/seam/connect/models/customer/customer-data.js +67 -0
  15. package/lib/seam/connect/models/customer/customer-data.js.map +1 -0
  16. package/lib/seam/connect/models/customer/customer-portal.d.ts +71 -0
  17. package/lib/seam/connect/models/customer/customer-portal.js +34 -0
  18. package/lib/seam/connect/models/customer/customer-portal.js.map +1 -0
  19. package/lib/seam/connect/models/customer/index.d.ts +3 -0
  20. package/lib/seam/connect/models/customer/index.js +4 -0
  21. package/lib/seam/connect/models/customer/index.js.map +1 -0
  22. package/lib/seam/connect/models/customer/location-resources.d.ts +229 -0
  23. package/lib/seam/connect/models/customer/location-resources.js +55 -0
  24. package/lib/seam/connect/models/customer/location-resources.js.map +1 -0
  25. package/lib/seam/connect/models/customer/user-identity-resources.d.ts +205 -0
  26. package/lib/seam/connect/models/customer/user-identity-resources.js +50 -0
  27. package/lib/seam/connect/models/customer/user-identity-resources.js.map +1 -0
  28. package/lib/seam/connect/models/index.d.ts +4 -0
  29. package/lib/seam/connect/models/index.js +4 -0
  30. package/lib/seam/connect/models/index.js.map +1 -1
  31. package/lib/seam/connect/models/partner/index.d.ts +0 -1
  32. package/lib/seam/connect/models/partner/index.js +0 -1
  33. package/lib/seam/connect/models/partner/index.js.map +1 -1
  34. package/lib/seam/connect/models/partner/magic-link.d.ts +2 -2
  35. package/lib/seam/connect/openapi.d.ts +2246 -1080
  36. package/lib/seam/connect/openapi.js +1650 -600
  37. package/lib/seam/connect/openapi.js.map +1 -1
  38. package/lib/seam/connect/route-types.d.ts +552 -112
  39. package/package.json +1 -1
  40. package/src/lib/seam/connect/internal/schemas.ts +21 -3
  41. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +129 -0
  42. package/src/lib/seam/connect/models/customer/business-vertical.ts +13 -0
  43. package/src/lib/seam/connect/models/customer/customer-data.ts +93 -0
  44. package/src/lib/seam/connect/models/customer/customer-portal.ts +39 -0
  45. package/src/lib/seam/connect/models/customer/index.ts +3 -0
  46. package/src/lib/seam/connect/models/customer/location-resources.ts +77 -0
  47. package/src/lib/seam/connect/models/customer/user-identity-resources.ts +68 -0
  48. package/src/lib/seam/connect/models/index.ts +4 -0
  49. package/src/lib/seam/connect/models/partner/index.ts +0 -1
  50. package/src/lib/seam/connect/openapi.ts +1790 -591
  51. package/src/lib/seam/connect/route-types.ts +642 -114
  52. package/lib/seam/connect/models/partner/resources.d.ts +0 -76
  53. package/lib/seam/connect/models/partner/resources.js +0 -87
  54. package/lib/seam/connect/models/partner/resources.js.map +0 -1
  55. package/src/lib/seam/connect/models/partner/resources.ts +0 -112
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.421.0",
3
+ "version": "1.422.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,9 @@
1
1
  export {
2
2
  access_code_code_constraint,
3
3
  access_grant,
4
+ access_grant_key_aliases,
5
+ access_grant_resource,
6
+ access_grant_resource_union,
4
7
  access_method,
5
8
  acs_access_group,
6
9
  acs_access_group_external_type,
@@ -18,18 +21,22 @@ export {
18
21
  acs_user_external_type,
19
22
  any_device_type,
20
23
  battery_status,
24
+ booking_resource,
21
25
  bridge,
22
26
  bridge_client_session,
23
27
  bridge_connected_system,
24
28
  building_block_type,
29
+ building_resource,
25
30
  capabilities,
26
31
  climate_preset,
27
32
  climate_setting,
33
+ common_area_resource,
28
34
  common_device_properties,
29
35
  common_event,
30
36
  connect_webview_device_selection_mode,
31
37
  connected_account,
32
38
  custom_metadata_input,
39
+ customer_data,
33
40
  device_capability_flags,
34
41
  device_metadata,
35
42
  device_provider,
@@ -37,31 +44,42 @@ export {
37
44
  enrollment_automation,
38
45
  seam_event as event,
39
46
  seam_event_type as event_type,
47
+ facility_resource,
40
48
  fan_mode_setting,
41
49
  geolocation,
50
+ guest_resource,
42
51
  instant_key,
52
+ listing_resource,
43
53
  location,
44
54
  lock_device_type,
45
55
  magic_link,
46
56
  access_code as managed_access_code,
47
57
  device as managed_device,
58
+ neutral_resource,
48
59
  noise_sensor_device_type,
49
60
  noise_threshold,
50
61
  pagination,
51
- partner_resource,
52
62
  phone,
53
63
  phone_number,
54
64
  phone_registration,
55
65
  phone_session,
66
+ portal_configuration,
67
+ property_resource,
68
+ reservation_resource,
69
+ resident_resource,
70
+ room_resource,
56
71
  space,
57
- space_resource,
72
+ neutral_resource as space_resource,
73
+ tenant_resource,
58
74
  thermostat_capability_properties,
59
75
  thermostat_device_type,
60
76
  thermostat_schedule,
61
- typed_partner_resource,
77
+ unit_resource,
62
78
  unmanaged_access_code,
63
79
  unmanaged_device,
64
80
  user_identity,
81
+ user_identity_resource,
82
+ user_resource,
65
83
  webhook,
66
84
  } from '../models/index.js'
67
85
  export * from '../schemas.js'
@@ -0,0 +1,129 @@
1
+ import { z } from 'zod'
2
+
3
+ // Base access grant resource with common fields
4
+ const base_access_grant_resource = z.object({
5
+ name: z
6
+ .string()
7
+ .describe('Your display name for this access grant resource.'),
8
+ starts_at: z
9
+ .string()
10
+ .optional()
11
+ .describe('Starting date and time for the access grant.'),
12
+ ends_at: z
13
+ .string()
14
+ .optional()
15
+ .describe('Ending date and time for the access grant.'),
16
+ })
17
+
18
+ // User identity key reference - allows any user identity key alias
19
+ export const user_identity_reference = z.object({
20
+ // Allow any user identity key alias (only one should be present)
21
+ guest_key: z
22
+ .string()
23
+ .optional()
24
+ .describe('Guest key associated with the access grant.'),
25
+ tenant_key: z
26
+ .string()
27
+ .optional()
28
+ .describe('Tenant key associated with the access grant.'),
29
+ resident_key: z
30
+ .string()
31
+ .optional()
32
+ .describe('Resident key associated with the access grant.'),
33
+ user_key: z
34
+ .string()
35
+ .optional()
36
+ .describe('User key associated with the access grant.'),
37
+ user_identity_key: z
38
+ .string()
39
+ .optional()
40
+ .describe('User identity key associated with the access grant.'),
41
+ })
42
+
43
+ // Location key references - separate arrays for each location key alias
44
+ export const location_references = z.object({
45
+ // Allow arrays of strings for each location key alias
46
+ space_keys: z
47
+ .array(z.string())
48
+ .optional()
49
+ .describe('Space keys associated with the access grant.'),
50
+ property_keys: z
51
+ .array(z.string())
52
+ .optional()
53
+ .describe('Property keys associated with the access grant.'),
54
+ room_keys: z
55
+ .array(z.string())
56
+ .optional()
57
+ .describe('Room keys associated with the access grant.'),
58
+ common_area_keys: z
59
+ .array(z.string())
60
+ .optional()
61
+ .describe('Common area keys associated with the access grant.'),
62
+ unit_keys: z
63
+ .array(z.string())
64
+ .optional()
65
+ .describe('Unit keys associated with the access grant.'),
66
+ facility_keys: z
67
+ .array(z.string())
68
+ .optional()
69
+ .describe('Facility keys associated with the access grant.'),
70
+ building_keys: z
71
+ .array(z.string())
72
+ .optional()
73
+ .describe('Building keys associated with the access grant.'),
74
+ listing_keys: z
75
+ .array(z.string())
76
+ .optional()
77
+ .describe('Listing keys associated with the access grant.'),
78
+ })
79
+
80
+ // Access grant resource types with their key aliases
81
+ export const reservation_resource = base_access_grant_resource
82
+ .extend({
83
+ reservation_key: z
84
+ .string()
85
+ .describe('Your unique identifier for the reservation.'),
86
+ })
87
+ .merge(user_identity_reference)
88
+ .merge(location_references)
89
+
90
+ export const booking_resource = base_access_grant_resource
91
+ .extend({
92
+ booking_key: z.string().describe('Your unique identifier for the booking.'),
93
+ })
94
+ .merge(user_identity_reference)
95
+ .merge(location_references)
96
+
97
+ export const access_grant_resource = base_access_grant_resource
98
+ .extend({
99
+ access_grant_key: z
100
+ .string()
101
+ .describe('Your unique identifier for the access grant.'),
102
+ })
103
+ .merge(user_identity_reference)
104
+ .merge(location_references)
105
+
106
+ // Union of all access grant resource types
107
+ export const access_grant_resource_union = z.union([
108
+ reservation_resource,
109
+ booking_resource,
110
+ access_grant_resource,
111
+ ])
112
+
113
+ // All access grant key aliases for use in references
114
+ export const access_grant_key_aliases = z.union([
115
+ z.object({ reservation_key: z.string() }),
116
+ z.object({ booking_key: z.string() }),
117
+ z.object({ access_grant_key: z.string() }),
118
+ ])
119
+
120
+ // Export types
121
+ export type ReservationResource = z.infer<typeof reservation_resource>
122
+ export type BookingResource = z.infer<typeof booking_resource>
123
+ export type AccessGrantResource = z.infer<typeof access_grant_resource>
124
+ export type AccessGrantResourceUnion = z.infer<
125
+ typeof access_grant_resource_union
126
+ >
127
+ export type AccessGrantKeyAliases = z.infer<typeof access_grant_key_aliases>
128
+ export type UserIdentityReference = z.infer<typeof user_identity_reference>
129
+ export type LocationReferences = z.infer<typeof location_references>
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod'
2
+
3
+ export const business_vertical = z
4
+ .enum([
5
+ 'short_term_rental',
6
+ 'hospitality',
7
+ 'multi_family',
8
+ 'gym_management',
9
+ 'property_tours',
10
+ ])
11
+ .describe('Business vertical of the customer portal.')
12
+
13
+ export type BusinessVertical = z.infer<typeof business_vertical>
@@ -0,0 +1,93 @@
1
+ import { z } from 'zod'
2
+
3
+ import {
4
+ access_grant_resource,
5
+ booking_resource,
6
+ reservation_resource,
7
+ } from './access-grant-resources.js'
8
+ import {
9
+ building_resource,
10
+ common_area_resource,
11
+ facility_resource,
12
+ listing_resource,
13
+ neutral_resource,
14
+ property_resource,
15
+ room_resource,
16
+ unit_resource,
17
+ } from './location-resources.js'
18
+ import {
19
+ guest_resource,
20
+ resident_resource,
21
+ tenant_resource,
22
+ user_identity_resource,
23
+ user_resource,
24
+ } from './user-identity-resources.js'
25
+
26
+ export const customer_data = z.object({
27
+ customer_key: z.string().describe('Your unique identifier for the customer.'),
28
+
29
+ // Location resources
30
+ spaces: z
31
+ .array(neutral_resource)
32
+ .optional()
33
+ .describe('List of general spaces or areas.'),
34
+ properties: z
35
+ .array(property_resource)
36
+ .optional()
37
+ .describe('List of short-term rental properties.'),
38
+ rooms: z
39
+ .array(room_resource)
40
+ .optional()
41
+ .describe('List of hotel or hospitality rooms.'),
42
+ common_areas: z
43
+ .array(common_area_resource)
44
+ .optional()
45
+ .describe('List of shared common areas.'),
46
+ units: z
47
+ .array(unit_resource)
48
+ .optional()
49
+ .describe('List of multi-family residential units.'),
50
+ facilities: z
51
+ .array(facility_resource)
52
+ .optional()
53
+ .describe('List of gym or fitness facilities.'),
54
+ buildings: z
55
+ .array(building_resource)
56
+ .optional()
57
+ .describe('List of buildings.'),
58
+ listings: z
59
+ .array(listing_resource)
60
+ .optional()
61
+ .describe('List of property listings.'),
62
+
63
+ // User identity resources
64
+ guests: z.array(guest_resource).optional().describe('List of guests.'),
65
+ tenants: z.array(tenant_resource).optional().describe('List of tenants.'),
66
+ residents: z
67
+ .array(resident_resource)
68
+ .optional()
69
+ .describe('List of residents.'),
70
+ users: z.array(user_resource).optional().describe('List of users.'),
71
+ user_identities: z
72
+ .array(user_identity_resource)
73
+ .optional()
74
+ .describe('List of user identities.'),
75
+
76
+ // Access grant resources
77
+ reservations: z
78
+ .array(reservation_resource)
79
+ .optional()
80
+ .describe('List of reservations.'),
81
+ bookings: z.array(booking_resource).optional().describe('List of bookings.'),
82
+ access_grants: z
83
+ .array(access_grant_resource)
84
+ .optional()
85
+ .describe('List of access grants.'),
86
+ })
87
+
88
+ export type CustomerData = z.infer<typeof customer_data>
89
+
90
+ // Re-export all resource types for convenience
91
+ export * from './access-grant-resources.js'
92
+ export * from './location-resources.js'
93
+ export * from './user-identity-resources.js'
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod'
2
+
3
+ const base_feature = z.object({
4
+ exclude: z
5
+ .boolean()
6
+ .default(false)
7
+ .describe('Whether to exclude this feature from the portal.'),
8
+ })
9
+
10
+ const base_connect_feature = base_feature
11
+ const base_manage_devices_feature = base_feature
12
+ const base_organize_feature = base_feature
13
+
14
+ const base_features = z.object({
15
+ connect: base_connect_feature
16
+ .default({})
17
+ .describe('Configuration for the connect accounts feature.'),
18
+ manage_devices: base_manage_devices_feature
19
+ .default({})
20
+ .describe('Configuration for the manage devices feature.'),
21
+ organize: base_organize_feature
22
+ .default({})
23
+ .describe('Configuration for the organize feature.'),
24
+ })
25
+
26
+ export const portal_configuration = z
27
+ .object({
28
+ features: base_features.default({}),
29
+ })
30
+ .default({
31
+ features: {
32
+ connect: { exclude: false },
33
+ organize: { exclude: false },
34
+ manage_devices: { exclude: false },
35
+ },
36
+ })
37
+ .describe(`Configuration for a customer portal`)
38
+
39
+ export type PortalConfiguration = z.infer<typeof portal_configuration>
@@ -0,0 +1,3 @@
1
+ export * from './business-vertical.js'
2
+ export * from './customer-data.js'
3
+ export * from './customer-portal.js'
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod'
2
+
3
+ // Base location resource with common fields
4
+ const base_location_resource = z.object({
5
+ name: z.string().describe('Your display name for this location resource.'),
6
+ })
7
+
8
+ // Location resource types with their key aliases
9
+ export const neutral_resource = base_location_resource.extend({
10
+ space_key: z.string().describe('Your unique identifier for the space.'),
11
+ })
12
+
13
+ export const property_resource = base_location_resource.extend({
14
+ property_key: z.string().describe('Your unique identifier for the property.'),
15
+ })
16
+
17
+ export const room_resource = base_location_resource.extend({
18
+ room_key: z.string().describe('Your unique identifier for the room.'),
19
+ })
20
+
21
+ export const common_area_resource = base_location_resource.extend({
22
+ common_area_key: z
23
+ .string()
24
+ .describe('Your unique identifier for the common area.'),
25
+ })
26
+
27
+ export const unit_resource = base_location_resource.extend({
28
+ unit_key: z.string().describe('Your unique identifier for the unit.'),
29
+ })
30
+
31
+ export const facility_resource = base_location_resource.extend({
32
+ facility_key: z.string().describe('Your unique identifier for the facility.'),
33
+ })
34
+
35
+ export const building_resource = base_location_resource.extend({
36
+ building_key: z.string().describe('Your unique identifier for the building.'),
37
+ })
38
+
39
+ export const listing_resource = base_location_resource.extend({
40
+ listing_key: z.string().describe('Your unique identifier for the listing.'),
41
+ })
42
+
43
+ // Union of all location resource types
44
+ export const location_resource = z.union([
45
+ neutral_resource,
46
+ property_resource,
47
+ room_resource,
48
+ common_area_resource,
49
+ unit_resource,
50
+ facility_resource,
51
+ building_resource,
52
+ listing_resource,
53
+ ])
54
+
55
+ // All location key aliases for use in references
56
+ export const location_key_aliases = z.union([
57
+ z.object({ space_key: z.string() }),
58
+ z.object({ property_key: z.string() }),
59
+ z.object({ room_key: z.string() }),
60
+ z.object({ common_area_key: z.string() }),
61
+ z.object({ unit_key: z.string() }),
62
+ z.object({ facility_key: z.string() }),
63
+ z.object({ building_key: z.string() }),
64
+ z.object({ listing_key: z.string() }),
65
+ ])
66
+
67
+ // Export types
68
+ export type NeutralResource = z.infer<typeof neutral_resource>
69
+ export type PropertyResource = z.infer<typeof property_resource>
70
+ export type RoomResource = z.infer<typeof room_resource>
71
+ export type CommonAreaResource = z.infer<typeof common_area_resource>
72
+ export type UnitResource = z.infer<typeof unit_resource>
73
+ export type FacilityResource = z.infer<typeof facility_resource>
74
+ export type BuildingResource = z.infer<typeof building_resource>
75
+ export type ListingResource = z.infer<typeof listing_resource>
76
+ export type LocationResource = z.infer<typeof location_resource>
77
+ export type LocationKeyAliases = z.infer<typeof location_key_aliases>
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod'
2
+
3
+ // Base user identity resource with common fields
4
+ const base_user_identity_resource = z.object({
5
+ name: z
6
+ .string()
7
+ .describe('Your display name for this user identity resource.'),
8
+ email_address: z
9
+ .string()
10
+ .optional()
11
+ .describe('Email address associated with the user identity.'),
12
+ phone_number: z
13
+ .string()
14
+ .optional()
15
+ .describe('Phone number associated with the user identity.'),
16
+ })
17
+
18
+ // User identity resource types with their key aliases
19
+ export const guest_resource = base_user_identity_resource.extend({
20
+ guest_key: z.string().describe('Your unique identifier for the guest.'),
21
+ })
22
+
23
+ export const tenant_resource = base_user_identity_resource.extend({
24
+ tenant_key: z.string().describe('Your unique identifier for the tenant.'),
25
+ })
26
+
27
+ export const resident_resource = base_user_identity_resource.extend({
28
+ resident_key: z.string().describe('Your unique identifier for the resident.'),
29
+ })
30
+
31
+ export const user_resource = base_user_identity_resource.extend({
32
+ user_key: z.string().describe('Your unique identifier for the user.'),
33
+ })
34
+
35
+ export const user_identity_resource = base_user_identity_resource.extend({
36
+ user_identity_key: z
37
+ .string()
38
+ .describe('Your unique identifier for the user identity.'),
39
+ })
40
+
41
+ // Union of all user identity resource types
42
+ export const user_identity_resource_union = z.union([
43
+ guest_resource,
44
+ tenant_resource,
45
+ resident_resource,
46
+ user_resource,
47
+ user_identity_resource,
48
+ ])
49
+
50
+ // All user identity key aliases for use in references
51
+ export const user_identity_key_aliases = z.union([
52
+ z.object({ guest_key: z.string() }),
53
+ z.object({ tenant_key: z.string() }),
54
+ z.object({ resident_key: z.string() }),
55
+ z.object({ user_key: z.string() }),
56
+ z.object({ user_identity_key: z.string() }),
57
+ ])
58
+
59
+ // Export types
60
+ export type GuestResource = z.infer<typeof guest_resource>
61
+ export type TenantResource = z.infer<typeof tenant_resource>
62
+ export type ResidentResource = z.infer<typeof resident_resource>
63
+ export type UserResource = z.infer<typeof user_resource>
64
+ export type UserIdentityResource = z.infer<typeof user_identity_resource>
65
+ export type UserIdentityResourceUnion = z.infer<
66
+ typeof user_identity_resource_union
67
+ >
68
+ export type UserIdentityKeyAliases = z.infer<typeof user_identity_key_aliases>
@@ -8,6 +8,10 @@ export * from './client-sessions/index.js'
8
8
  export * from './connect-webviews/index.js'
9
9
  export * from './connected-accounts/index.js'
10
10
  export * from './custom-metadata.js'
11
+ export * from './customer/access-grant-resources.js'
12
+ export * from './customer/index.js'
13
+ export * from './customer/location-resources.js'
14
+ export * from './customer/user-identity-resources.js'
11
15
  export * from './devices/index.js'
12
16
  export * from './events/index.js'
13
17
  export * from './instant-keys/index.js'
@@ -1,2 +1 @@
1
1
  export * from './magic-link.js'
2
- export * from './resources.js'