@seamapi/types 1.1045.0 → 1.1046.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 (88) hide show
  1. package/lib/seam/connect/index.js +0 -1
  2. package/lib/seam/connect/index.js.map +1 -1
  3. package/lib/seam/connect/models/access-codes/pending-mutations.js +0 -3
  4. package/lib/seam/connect/models/access-codes/pending-mutations.js.map +1 -1
  5. package/lib/seam/connect/models/access-grants/access-grant.js +0 -3
  6. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
  7. package/lib/seam/connect/models/access-grants/access-method.js +0 -4
  8. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  9. package/lib/seam/connect/models/acs/acs-access-group.js +0 -1
  10. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  11. package/lib/seam/connect/models/acs/acs-credential.js +0 -1
  12. package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
  13. package/lib/seam/connect/models/acs/acs-encoder.js +1 -4
  14. package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
  15. package/lib/seam/connect/models/acs/acs-system.js +1 -5
  16. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  17. package/lib/seam/connect/models/acs/metadata/assa-abloy-vostio.js +0 -1
  18. package/lib/seam/connect/models/acs/metadata/assa-abloy-vostio.js.map +1 -1
  19. package/lib/seam/connect/models/action-attempts/deprecated.js +0 -2
  20. package/lib/seam/connect/models/action-attempts/deprecated.js.map +1 -1
  21. package/lib/seam/connect/models/batch.js.map +1 -1
  22. package/lib/seam/connect/models/custom-metadata.js +0 -8
  23. package/lib/seam/connect/models/custom-metadata.js.map +1 -1
  24. package/lib/seam/connect/models/customer/access-grant-resources.js +0 -8
  25. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
  26. package/lib/seam/connect/models/customer/customer-data.js +0 -4
  27. package/lib/seam/connect/models/customer/customer-data.js.map +1 -1
  28. package/lib/seam/connect/models/customer/customer-delete-data.js +0 -4
  29. package/lib/seam/connect/models/customer/customer-delete-data.js.map +1 -1
  30. package/lib/seam/connect/models/customer/customer-portal.js +4 -7
  31. package/lib/seam/connect/models/customer/customer-portal.js.map +1 -1
  32. package/lib/seam/connect/models/customer/location-resources.js +0 -4
  33. package/lib/seam/connect/models/customer/location-resources.js.map +1 -1
  34. package/lib/seam/connect/models/customer/user-identity-resources.js +0 -5
  35. package/lib/seam/connect/models/customer/user-identity-resources.js.map +1 -1
  36. package/lib/seam/connect/models/customization-profiles/customization-profile.js +0 -3
  37. package/lib/seam/connect/models/customization-profiles/customization-profile.js.map +1 -1
  38. package/lib/seam/connect/models/devices/capability-properties/access-code.js +14 -13
  39. package/lib/seam/connect/models/devices/capability-properties/access-code.js.map +1 -1
  40. package/lib/seam/connect/models/devices/capability-properties/thermostat.js +0 -6
  41. package/lib/seam/connect/models/devices/capability-properties/thermostat.js.map +1 -1
  42. package/lib/seam/connect/models/devices/device-metadata.js +4 -8
  43. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  44. package/lib/seam/connect/models/devices/device-type.d.ts +0 -6
  45. package/lib/seam/connect/models/devices/device-type.js +0 -6
  46. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  47. package/lib/seam/connect/models/devices/device.js +2 -1
  48. package/lib/seam/connect/models/devices/device.js.map +1 -1
  49. package/lib/seam/connect/models/phone-number.js +0 -11
  50. package/lib/seam/connect/models/phone-number.js.map +1 -1
  51. package/lib/seam/connect/models/resource-key.d.ts +0 -8
  52. package/lib/seam/connect/models/resource-key.js +0 -8
  53. package/lib/seam/connect/models/resource-key.js.map +1 -1
  54. package/lib/seam/connect/models/schedule.js +0 -5
  55. package/lib/seam/connect/models/schedule.js.map +1 -1
  56. package/lib/seam/connect/models/user-identities/user-identity.js +0 -1
  57. package/lib/seam/connect/models/user-identities/user-identity.js.map +1 -1
  58. package/lib/seam/connect/openapi.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/lib/seam/connect/index.ts +0 -1
  61. package/src/lib/seam/connect/models/access-codes/pending-mutations.ts +0 -3
  62. package/src/lib/seam/connect/models/access-grants/access-grant.ts +0 -3
  63. package/src/lib/seam/connect/models/access-grants/access-method.ts +0 -4
  64. package/src/lib/seam/connect/models/acs/acs-access-group.ts +0 -1
  65. package/src/lib/seam/connect/models/acs/acs-credential.ts +0 -2
  66. package/src/lib/seam/connect/models/acs/acs-encoder.ts +1 -4
  67. package/src/lib/seam/connect/models/acs/acs-system.ts +1 -5
  68. package/src/lib/seam/connect/models/acs/metadata/assa-abloy-vostio.ts +0 -1
  69. package/src/lib/seam/connect/models/action-attempts/deprecated.ts +0 -2
  70. package/src/lib/seam/connect/models/batch.ts +0 -2
  71. package/src/lib/seam/connect/models/custom-metadata.ts +0 -8
  72. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +0 -9
  73. package/src/lib/seam/connect/models/customer/customer-data.ts +0 -4
  74. package/src/lib/seam/connect/models/customer/customer-delete-data.ts +0 -4
  75. package/src/lib/seam/connect/models/customer/customer-portal.ts +4 -7
  76. package/src/lib/seam/connect/models/customer/location-resources.ts +0 -5
  77. package/src/lib/seam/connect/models/customer/user-identity-resources.ts +0 -6
  78. package/src/lib/seam/connect/models/customization-profiles/customization-profile.ts +0 -3
  79. package/src/lib/seam/connect/models/devices/capability-properties/access-code.ts +14 -13
  80. package/src/lib/seam/connect/models/devices/capability-properties/thermostat.ts +0 -6
  81. package/src/lib/seam/connect/models/devices/device-metadata.ts +4 -8
  82. package/src/lib/seam/connect/models/devices/device-type.ts +0 -6
  83. package/src/lib/seam/connect/models/devices/device.ts +2 -1
  84. package/src/lib/seam/connect/models/phone-number.ts +0 -11
  85. package/src/lib/seam/connect/models/resource-key.ts +0 -8
  86. package/src/lib/seam/connect/models/schedule.ts +0 -5
  87. package/src/lib/seam/connect/models/user-identities/user-identity.ts +0 -1
  88. package/src/lib/seam/connect/openapi.ts +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1045.0",
3
+ "version": "1.1046.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -6,5 +6,4 @@ export type * from './model-types.js'
6
6
  export { default as openapi } from './openapi.js'
7
7
  export type * from './route-types.js'
8
8
 
9
- // UPSTREAM: Reserve this named export until nextlove is able to generate this.
10
9
  export const routes = {}
@@ -138,9 +138,6 @@ export type AccessCodePendingMutation = z.infer<
138
138
  typeof access_code_pending_mutations
139
139
  >
140
140
 
141
- // Internal fields stored in the DB but stripped from public API responses.
142
- // Used to track the delete+recreate flow for providers that don't support
143
- // in-place updates (e.g. Schlage, August).
144
141
  const internal_recreate_fields = z.object({
145
142
  must_be_recreated_on_device: z.boolean().optional(),
146
143
  is_being_removed: z.boolean().optional(),
@@ -317,7 +317,6 @@ export const access_grant = z.object({
317
317
 
318
318
  export type AccessGrant = z.infer<typeof access_grant>
319
319
 
320
- // Unmanaged access grant schema - excludes client sessions, instant keys, customization profiles, and keys
321
320
  export const unmanaged_access_grant = access_grant
322
321
  .omit({
323
322
  client_session_token: true,
@@ -325,8 +324,6 @@ export const unmanaged_access_grant = access_grant
325
324
  customization_profile_id: true,
326
325
  access_grant_key: true,
327
326
  user_identity_id: true,
328
- // Seam does not provision these grants, so it has no basis for saying
329
- // whether access works — any verdict would be a claim about another system.
330
327
  display_status: true,
331
328
  })
332
329
  .extend({
@@ -118,7 +118,6 @@ const _access_method_error_map = z.object({
118
118
 
119
119
  export type AccessMethodErrorMap = z.infer<typeof _access_method_error_map>
120
120
 
121
- // Pending mutations for access methods
122
121
  const common_pending_mutation = z.object({
123
122
  created_at: datetime.describe(
124
123
  'Date and time at which the mutation was created.',
@@ -211,8 +210,6 @@ const notifying_connector_mutation = common_pending_mutation
211
210
  .describe(
212
211
  "Mutation code to indicate that Seam is in the process of notifying the connector about this access method's issuance.",
213
212
  ),
214
- // Intentionally generic — each connector type has its own provider_data shape
215
- // (e.g., Cloudbeds uses { keyId: string, keyType: string })
216
213
  provider_data: z
217
214
  .record(z.any())
218
215
  .describe('Provider-specific data needed to notify the connector.'),
@@ -341,7 +338,6 @@ export const access_method = z.object({
341
338
 
342
339
  export type AccessMethod = z.infer<typeof access_method>
343
340
 
344
- // Unmanaged access method schema - excludes client sessions, instant keys, customization profiles, and keys
345
341
  export const unmanaged_access_method = access_method.omit({
346
342
  instant_key_url: true,
347
343
  client_session_token: true,
@@ -4,7 +4,6 @@ import { datetime } from '../datetime.js'
4
4
  import { schedule } from '../schedule.js'
5
5
  import { acs_access_group_pending_mutations } from './acs-access-groups/pending-mutations.js'
6
6
 
7
- // If changed, update seam.acs_access_group.external_type generated column
8
7
  export const acs_access_group_external_type = z.enum([
9
8
  'pti_unit',
10
9
  'pti_access_level',
@@ -7,7 +7,6 @@ import {
7
7
  acs_credential_vostio_metadata,
8
8
  } from './metadata/index.js'
9
9
 
10
- // If changed, update seam.acs_credential.external_type generated column
11
10
  export const acs_credential_external_type = z.enum([
12
11
  'pti_card',
13
12
  'brivo_credential',
@@ -398,7 +397,6 @@ export const acs_credential_on_encoder = z.object({
398
397
  'Card ID for the Visionline card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).',
399
398
  ),
400
399
  // TODO card_function_type: z.enum(["guest", "staff"]), // computed, looks at door ops, and checks is guest op is present.
401
-
402
400
  cancelled: z
403
401
  .boolean()
404
402
  .optional()
@@ -20,10 +20,7 @@ const acs_encoder_removed = common_acs_encoder_error.extend({
20
20
  error_code: z.literal('acs_encoder_removed').describe(error_code_description),
21
21
  })
22
22
 
23
- const acs_encoder_error =
24
- // z.union([
25
- // ])
26
- acs_encoder_removed.describe(`
23
+ const acs_encoder_error = acs_encoder_removed.describe(`
27
24
  ---
28
25
  resource_type: acs_encoder
29
26
  ---
@@ -2,10 +2,7 @@ import { z } from 'zod'
2
2
 
3
3
  import { datetime } from '../datetime.js'
4
4
 
5
- export const acs_system_capability_flags = z.object({
6
- // Access method type capability flags are not publicly exposed for ACS systems
7
- // They are only available for ACS entrances
8
- })
5
+ export const acs_system_capability_flags = z.object({})
9
6
 
10
7
  export const acs_location = z.object({
11
8
  time_zone: z
@@ -16,7 +13,6 @@ export const acs_location = z.object({
16
13
  ),
17
14
  })
18
15
 
19
- // If changed, update seam.acs_system.external_type generated column
20
16
  export const acs_system_external_type = z.enum([
21
17
  'pti_site',
22
18
  'avigilon_alta_org',
@@ -34,7 +34,6 @@ export type AcsEntranceAssaAbloyVostioMetadata = z.infer<
34
34
 
35
35
  export const acs_credential_vostio_metadata = z
36
36
  .object({
37
- // auto_join does not exist in the Vostio API and is an abstraction made by Seam
38
37
  auto_join: z
39
38
  .boolean()
40
39
  .optional()
@@ -102,8 +102,6 @@ const update_access_code_action_attempt = z
102
102
  .describe('Updating an access code succeeded.'),
103
103
  result: z
104
104
  .object({
105
- // Omitted when the update was a no-op, that is, when every
106
- // requested value already matched the access code.
107
105
  access_code: z
108
106
  .record(z.any())
109
107
  .optional()
@@ -62,8 +62,6 @@ type BatchKey =
62
62
  | 'noise_thresholds'
63
63
  | 'customization_profiles'
64
64
 
65
- // Explicit annotation prevents tsgo TS7056 — the device/access-code
66
- // discriminated unions push the inferred literal past the serialization cap.
67
65
  type BatchShape = z.ZodObject<
68
66
  Record<BatchKey, z.ZodOptional<z.ZodArray<ZodTypeAny>>>
69
67
  >
@@ -11,10 +11,6 @@ const custom_metadata_key = z
11
11
  .max(40)
12
12
  .refine(doesNotContainPeriod, PERIOD_IN_KEY_ERROR)
13
13
 
14
- // Periods are rejected because a dotted key breaks the pagination query hash
15
- // serializer. The .max(40) of custom_metadata_key is deliberately not carried
16
- // over: rows written before that limit can hold longer keys, and a filter that
17
- // cannot name them would be a regression.
18
14
  const custom_metadata_has_key = z
19
15
  .string()
20
16
  .refine(doesNotContainPeriod, PERIOD_IN_KEY_ERROR)
@@ -31,10 +27,6 @@ export const custom_metadata_input = z
31
27
  'Set of up to 50 key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Accepts string or Boolean values. Strings are limited to 500 characters. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. Set a key to `null` or to an empty string to remove that key from the custom metadata.',
32
28
  )
33
29
 
34
- // A query string can only carry `null` for an unset value — the serializer drops
35
- // an empty string — so `""` is dropped here rather than given a meaning it could
36
- // not keep on a GET. It has to be the schema and not a handler: lib/api/pagination.ts
37
- // serializes req.commonParams for next_page_url and the cursor hash.
38
30
  export const custom_metadata_has = z
39
31
  .record(custom_metadata_has_key, z.union([z.string(), z.boolean(), z.null()]))
40
32
  .transform((custom_metadata_has_filter) =>
@@ -3,7 +3,6 @@ import { z } from 'zod'
3
3
  import { custom_metadata_input } from '../custom-metadata.js'
4
4
  import { datetime } from '../datetime.js'
5
5
 
6
- // Base access grant resource with common fields
7
6
  const base_access_grant_resource = z.object({
8
7
  name: z
9
8
  .string()
@@ -23,9 +22,7 @@ const base_access_grant_resource = z.object({
23
22
  ),
24
23
  })
25
24
 
26
- // User identity key reference - allows any user identity key alias
27
25
  export const user_identity_reference = z.object({
28
- // Allow any user identity key alias (only one should be present)
29
26
  guest_key: z
30
27
  .string()
31
28
  .optional()
@@ -48,9 +45,7 @@ export const user_identity_reference = z.object({
48
45
  .describe('User identity key associated with the access grant.'),
49
46
  })
50
47
 
51
- // Location key references - separate arrays for each location key alias
52
48
  export const location_references = z.object({
53
- // Allow arrays of strings for each location key alias
54
49
  space_keys: z
55
50
  .array(z.string())
56
51
  .optional()
@@ -85,7 +80,6 @@ export const location_references = z.object({
85
80
  .describe('Listing keys associated with the access grant.'),
86
81
  })
87
82
 
88
- // Access grant resource types with their key aliases
89
83
  export const reservation_resource = base_access_grant_resource
90
84
  .extend({
91
85
  reservation_key: z
@@ -130,21 +124,18 @@ export const access_grant_resource = base_access_grant_resource
130
124
  .merge(user_identity_reference)
131
125
  .merge(location_references)
132
126
 
133
- // Union of all access grant resource types
134
127
  export const access_grant_resource_union = z.union([
135
128
  reservation_resource,
136
129
  booking_resource,
137
130
  access_grant_resource,
138
131
  ])
139
132
 
140
- // All access grant key aliases for use in references
141
133
  export const access_grant_key_aliases = z.union([
142
134
  z.object({ reservation_key: z.string() }),
143
135
  z.object({ booking_key: z.string() }),
144
136
  z.object({ access_grant_key: z.string() }),
145
137
  ])
146
138
 
147
- // Export types
148
139
  export type ReservationResource = z.infer<typeof reservation_resource>
149
140
  export type BookingResource = z.infer<typeof booking_resource>
150
141
  export type AccessGrantResource = z.infer<typeof access_grant_resource>
@@ -27,7 +27,6 @@ import {
27
27
  } from './user-identity-resources.js'
28
28
 
29
29
  export const external_resources = z.object({
30
- // Location resources
31
30
  spaces: z
32
31
  .array(neutral_resource)
33
32
  .optional()
@@ -69,7 +68,6 @@ export const external_resources = z.object({
69
68
  .optional()
70
69
  .describe('List of property listings.'),
71
70
 
72
- // User identity resources
73
71
  guests: z.array(guest_resource).optional().describe('List of guests.'),
74
72
  tenants: z.array(tenant_resource).optional().describe('List of tenants.'),
75
73
  residents: z
@@ -86,7 +84,6 @@ export const external_resources = z.object({
86
84
  .optional()
87
85
  .describe('List of staff members.'),
88
86
 
89
- // Access grant resources
90
87
  reservations: z
91
88
  .array(reservation_resource)
92
89
  .optional()
@@ -114,7 +111,6 @@ export const customer_data = z
114
111
 
115
112
  export type CustomerData = z.infer<typeof customer_data>
116
113
 
117
- // Re-export all resource types for convenience
118
114
  export * from './access-grant-resources.js'
119
115
  export * from './location-resources.js'
120
116
  export * from './user-identity-resources.js'
@@ -3,13 +3,11 @@ import { z } from 'zod'
3
3
  import { resource_key } from '../../models/resource-key.js'
4
4
 
5
5
  export const customer_delete_data = z.object({
6
- // Customer keys to delete all data for
7
6
  customer_keys: z
8
7
  .array(resource_key)
9
8
  .optional()
10
9
  .describe('List of customer keys to delete all data for.'),
11
10
 
12
- // Location resources to delete
13
11
  space_keys: z
14
12
  .array(resource_key)
15
13
  .optional()
@@ -47,7 +45,6 @@ export const customer_delete_data = z.object({
47
45
  .optional()
48
46
  .describe('List of property listing keys to delete.'),
49
47
 
50
- // User identity resources to delete
51
48
  guest_keys: z
52
49
  .array(resource_key)
53
50
  .optional()
@@ -69,7 +66,6 @@ export const customer_delete_data = z.object({
69
66
  .optional()
70
67
  .describe('List of user identity keys to delete.'),
71
68
 
72
- // Access grant resources to delete
73
69
  reservation_keys: z
74
70
  .array(resource_key)
75
71
  .optional()
@@ -210,7 +210,6 @@ export const portal_configuration_base = z.object({
210
210
  ),
211
211
  deep_link: z
212
212
  .discriminatedUnion('resource_type', [
213
- // Customer-keyed resources: resolved to an internal id via a lookup.
214
213
  z.object({
215
214
  resource_type: z.literal('reservation'),
216
215
  resource_key: z.string(),
@@ -219,9 +218,6 @@ export const portal_configuration_base = z.object({
219
218
  resource_type: z.literal('space'),
220
219
  resource_key: z.string(),
221
220
  }),
222
- // Seam-id resource: a device is addressed by its Seam device_id directly
223
- // (there is no customer-facing device_key), so it carries resource_id
224
- // rather than resource_key.
225
221
  z.object({
226
222
  resource_type: z.literal('device'),
227
223
  resource_id: z.string(),
@@ -237,6 +233,7 @@ export const portal_configuration_base = z.object({
237
233
 
238
234
  export const portal_configuration = portal_configuration_base
239
235
  .extend({
236
+ // TODO: Remove _ prop
240
237
  _dev: z.boolean().default(false).describe(`
241
238
  ---
242
239
  undocumented: Internal developer mode flag.
@@ -259,9 +256,9 @@ export const portal_configuration = portal_configuration_base
259
256
  },
260
257
  configure: {
261
258
  exclude: false,
262
- allow_instant_key_customization: false, // default
263
- allow_access_automation_rule_customization: false, // default
264
- allow_climate_automation_rule_customization: false, // default
259
+ allow_instant_key_customization: false,
260
+ allow_access_automation_rule_customization: false,
261
+ allow_climate_automation_rule_customization: false,
265
262
  },
266
263
  },
267
264
  is_embedded: false,
@@ -3,12 +3,10 @@ import { z } from 'zod'
3
3
  import { custom_metadata_input } from '../custom-metadata.js'
4
4
  import { space_customer_data, space_geolocation } from '../spaces/space.js'
5
5
 
6
- // Base location resource with common fields
7
6
  const base_location_resource = z.object({
8
7
  name: z.string().describe('Your display name for this location resource.'),
9
8
  })
10
9
 
11
- // Location resource types with their key aliases
12
10
  export const neutral_resource = base_location_resource.extend({
13
11
  space_key: z
14
12
  .string()
@@ -162,7 +160,6 @@ export const site_resource = base_location_resource.extend({
162
160
  .describe('Your unique identifier for the site.'),
163
161
  })
164
162
 
165
- // Union of all location resource types
166
163
  export const location_resource = z.union([
167
164
  neutral_resource,
168
165
  property_resource,
@@ -176,7 +173,6 @@ export const location_resource = z.union([
176
173
  site_resource,
177
174
  ])
178
175
 
179
- // All location key aliases for use in references
180
176
  export const location_key_aliases = z.union([
181
177
  z.object({ space_key: z.string() }),
182
178
  z.object({ property_key: z.string() }),
@@ -190,7 +186,6 @@ export const location_key_aliases = z.union([
190
186
  z.object({ site_key: z.string() }),
191
187
  ])
192
188
 
193
- // Export types
194
189
  export type NeutralResource = z.infer<typeof neutral_resource>
195
190
  export type PropertyResource = z.infer<typeof property_resource>
196
191
  export type RoomResource = z.infer<typeof room_resource>
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod'
2
2
 
3
- // Base user identity resource with common fields
4
3
  const base_user_identity_resource = z.object({
5
4
  name: z
6
5
  .string()
@@ -15,7 +14,6 @@ const base_user_identity_resource = z.object({
15
14
  .describe('Phone number associated with the user identity.'),
16
15
  })
17
16
 
18
- // User identity resource types with their key aliases
19
17
  export const guest_resource = base_user_identity_resource.extend({
20
18
  guest_key: z
21
19
  .string()
@@ -56,7 +54,6 @@ export const user_resource = base_user_identity_resource.extend({
56
54
  .describe('Your unique identifier for the user.'),
57
55
  })
58
56
 
59
- // staff resource
60
57
  export const staff_member_resource = base_user_identity_resource.extend({
61
58
  staff_member_key: z
62
59
  .string()
@@ -139,7 +136,6 @@ export const user_identity_resource = base_user_identity_resource.extend({
139
136
  .describe('Your unique identifier for the user identity.'),
140
137
  })
141
138
 
142
- // Union of all user identity resource types
143
139
  export const user_identity_resource_union = z.union([
144
140
  guest_resource,
145
141
  tenant_resource,
@@ -149,7 +145,6 @@ export const user_identity_resource_union = z.union([
149
145
  staff_member_resource,
150
146
  ])
151
147
 
152
- // All user identity key aliases for use in references
153
148
  export const user_identity_key_aliases = z.union([
154
149
  z.object({ guest_key: z.string() }),
155
150
  z.object({ tenant_key: z.string() }),
@@ -158,7 +153,6 @@ export const user_identity_key_aliases = z.union([
158
153
  z.object({ user_identity_key: z.string() }),
159
154
  ])
160
155
 
161
- // Export types
162
156
  export type GuestResource = z.infer<typeof guest_resource>
163
157
  export type TenantResource = z.infer<typeof tenant_resource>
164
158
  export type ResidentResource = z.infer<typeof resident_resource>
@@ -12,9 +12,6 @@ export const customer_portal_theme = z.object({
12
12
  mono_font_family: z.string().optional(),
13
13
  })
14
14
 
15
- // Per-locale portal label/terminology overrides:
16
- // { [locale]: { ["Namespace.key"]: "Override string" } }
17
- // e.g. { "en-US": { "Reservations.reservation": "Booking" } }
18
15
  export const message_overrides = z.record(
19
16
  z.string(),
20
17
  z.record(z.string(), z.string()),
@@ -4,18 +4,18 @@ export const access_code_code_constraint = z
4
4
  .object({
5
5
  constraint_type: z
6
6
  .enum([
7
- 'no_zeros', // Nuki
8
- 'cannot_start_with_12', // Nuki
9
- 'no_triple_consecutive_ints', // Brivo
10
- 'cannot_specify_pin_code', // Dormakaba?
11
- 'pin_code_matches_existing_set', // Salto
12
- 'start_date_in_future', // Kwikset
13
- 'no_ascending_or_descending_sequence', // Tedee, Korelock
14
- 'at_least_three_unique_digits', // Tedee
15
- 'cannot_contain_089', // TTLock
16
- 'cannot_contain_0789', // TTLock (for some cylinder devices only)
17
- 'unique_first_four_digits', // Schlage
18
- 'no_all_same_digits', // Korelock
7
+ 'no_zeros',
8
+ 'cannot_start_with_12',
9
+ 'no_triple_consecutive_ints',
10
+ 'cannot_specify_pin_code',
11
+ 'pin_code_matches_existing_set',
12
+ 'start_date_in_future',
13
+ 'no_ascending_or_descending_sequence',
14
+ 'at_least_three_unique_digits',
15
+ 'cannot_contain_089',
16
+ 'cannot_contain_0789',
17
+ 'unique_first_four_digits',
18
+ 'no_all_same_digits',
19
19
  ])
20
20
  .describe(`Code constraint type for access codes.`),
21
21
  })
@@ -23,7 +23,7 @@ export const access_code_code_constraint = z
23
23
 
24
24
  export const access_code_name_constraint = z
25
25
  .object({
26
- constraint_type: z.enum(['name_length', 'name_must_be_unique']), // Nuki, Kwikset
26
+ constraint_type: z.enum(['name_length', 'name_must_be_unique']),
27
27
  min_length: z
28
28
  .number()
29
29
  .optional()
@@ -116,6 +116,7 @@ export const time_frame_option = z
116
116
  export type TimeFrameOption = z.infer<typeof time_frame_option>
117
117
 
118
118
  export const access_code_capability_properties = z.object({
119
+ // TODO: Remove _ prop
119
120
  _experimental_supported_code_from_access_codes_lengths: z
120
121
  .array(z.number())
121
122
  .optional().describe(`
@@ -75,9 +75,6 @@ export const thermostat_capability_properties = z
75
75
  ---
76
76
  `),
77
77
 
78
- /**
79
- * this is true if the current thermostat settings differ that what is on seam, and `current_climate_setting.manual_override_allowed: true`
80
- */
81
78
  is_temporary_manual_override_active: z.boolean().describe(`
82
79
  ---
83
80
  property_group_key: thermostats
@@ -85,9 +82,6 @@ export const thermostat_capability_properties = z
85
82
  Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, \`current_climate_setting.manual_override_allowed\` must also be \`true\`.
86
83
  `),
87
84
 
88
- /**
89
- * can be derived from `fallback_climate_preset_key`, or `active_thermostat_schedule` if one is active
90
- */
91
85
  current_climate_setting: climate_setting.describe(`
92
86
  ---
93
87
  property_group_key: thermostats
@@ -10,14 +10,12 @@ export const dormakaba_oracode_time_slot = z
10
10
  .number()
11
11
  .optional()
12
12
  .describe(`Prefix for a time slot for a dormakaba Oracode device.`),
13
- // Seam TOD
14
13
  check_in_time: z
15
14
  .string()
16
15
  .optional()
17
16
  .describe(
18
17
  `Check in time for a time slot for a dormakaba Oracode device.`,
19
18
  ),
20
- // Seam TOD
21
19
  check_out_time: z
22
20
  .string()
23
21
  .optional()
@@ -687,19 +685,19 @@ export const device_metadata = z
687
685
  .optional()
688
686
  .describe(
689
687
  `Device name for a Google Nest device. Google sets this value.`,
690
- ), // set by Google
688
+ ),
691
689
  device_custom_name: z
692
690
  .string()
693
691
  .optional()
694
692
  .describe(
695
693
  `Custom device name for a Google Nest device. The device owner sets this value.`,
696
- ), // set by device owner
694
+ ),
697
695
  structure_name: z
698
696
  .string()
699
697
  .optional()
700
698
  .describe(
701
699
  `Name of the Google Nest structure containing the device. The device owner sets this value.`,
702
- ), // set by device owner
700
+ ),
703
701
  display_name: z
704
702
  .string()
705
703
  .optional()
@@ -876,9 +874,7 @@ export const device_metadata = z
876
874
  .optional()
877
875
  .describe(`Product name for an Akiles device.`),
878
876
 
879
- /**
880
- * Group ID to add users to for this device
881
- */
877
+ // TODO: Remove _ prop
882
878
  _member_group_id: z
883
879
  .string()
884
880
  .optional()
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod'
2
2
 
3
- /** Locks */
4
3
  export const LOCK_DEVICE_TYPE = {
5
4
  AKUVOX_LOCK: 'akuvox_lock',
6
5
  AUGUST_LOCK: 'august_lock',
@@ -49,7 +48,6 @@ export const lock_device_type = z.enum(
49
48
 
50
49
  export type LockDeviceType = z.infer<typeof lock_device_type>
51
50
 
52
- /** Keys */
53
51
  export const KEY_DEVICE_TYPE = {
54
52
  KEYNEST_KEY: 'keynest_key',
55
53
  } as const
@@ -66,7 +64,6 @@ export const key_device_type = z.enum(
66
64
 
67
65
  export type KeyDeviceType = z.infer<typeof key_device_type>
68
66
 
69
- /** Noise Sensors */
70
67
  export const NOISE_SENSOR_DEVICE_TYPE = {
71
68
  NOISEAWARE_ACTIVITY_ZONE: 'noiseaware_activity_zone',
72
69
  MINUT_SENSOR: 'minut_sensor',
@@ -86,7 +83,6 @@ export const noise_sensor_device_type = z.enum(
86
83
 
87
84
  export type NoiseSensorDeviceType = z.infer<typeof noise_sensor_device_type>
88
85
 
89
- /** Thermostats */
90
86
  export const THERMOSTAT_DEVICE_TYPE = {
91
87
  ECOBEE_THERMOSTAT: 'ecobee_thermostat',
92
88
  NEST_THERMOSTAT: 'nest_thermostat',
@@ -110,7 +106,6 @@ export const thermostat_device_type = z.enum(
110
106
 
111
107
  export type ThermostatDeviceType = z.infer<typeof thermostat_device_type>
112
108
 
113
- /** Phones */
114
109
  export const PHONE_DEVICE_TYPE = {
115
110
  IOS_PHONE: 'ios_phone',
116
111
  ANDROID_PHONE: 'android_phone',
@@ -130,7 +125,6 @@ export const phone_device_type = z.enum(
130
125
 
131
126
  export type PhoneDeviceType = z.infer<typeof phone_device_type>
132
127
 
133
- /** Cameras */
134
128
  export const CAMERA_DEVICE_TYPE = {
135
129
  RING_CAMERA: 'ring_camera',
136
130
  } as const
@@ -707,7 +707,9 @@ export const device_warning_map = z.object({
707
707
  many_active_backup_codes: many_active_backup_codes.optional().nullable(),
708
708
  device_has_flaky_connection: device_has_flaky_connection
709
709
  .extend({
710
+ // TODO: Remove _ prop
710
711
  _event_id: z.string().uuid().optional(),
712
+ // TODO: Remove _ prop
711
713
  _reason: z.string().optional(),
712
714
  })
713
715
  .optional()
@@ -957,7 +959,6 @@ export const common_device_properties = z.object({
957
959
  )
958
960
  .optional(),
959
961
 
960
- // Deprecated legacy capability support props
961
962
  supports_accessory_keypad: z
962
963
  .boolean()
963
964
  .describe(
@@ -5,7 +5,6 @@ export const phone_number = z.coerce
5
5
  .trim()
6
6
  .refine(
7
7
  (val) => {
8
- // https://www.twilio.com/docs/glossary/what-e164
9
8
  return /^\+[1-9]\d{1,14}$/.test(val)
10
9
  },
11
10
  {
@@ -13,14 +12,4 @@ export const phone_number = z.coerce
13
12
  },
14
13
  )
15
14
 
16
- // Use this for phone numbers that originate from provider/external-system sync
17
- // — user identities, access system users, and their pending mutations — and,
18
- // because the create/update endpoints for those resources pick `phone_number`
19
- // from these same schemas, for that API input too. Synced data legitimately
20
- // contains non-E.164 values (partial/last-four digits, spaces, or a missing
21
- // `+`), so validating them strictly on the *output* path makes the public
22
- // mapper throw a ZodError, which 500s the entire list endpoint for any
23
- // workspace holding one such row; and the create/update endpoints must be able
24
- // to round-trip those same values. Use the strict `phone_number` schema above
25
- // only where you specifically want to reject non-E.164 input.
26
15
  export const loose_phone_number = z.string()
@@ -1,13 +1,5 @@
1
1
  import { z } from 'zod'
2
2
 
3
- /**
4
- * Shared schema for every customer-supplied `*_key` identifier
5
- * (`customer_key`, `access_grant_key`, `space_key`, `user_identity_key`, ...).
6
- *
7
- * A whitespace-only key is never a usable identifier: it cannot be looked back
8
- * up, and once stored it silently shadows the "no key set" case that the
9
- * underlying columns model as NULL.
10
- */
11
3
  export const resource_key = z
12
4
  .string()
13
5
  .min(1)
@@ -17,9 +17,4 @@ export const start_end_schedule = z
17
17
  'Schedule with starting and ending dates and times, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
18
18
  )
19
19
 
20
- // export const schedule = z.union([
21
- // start_end_schedule,
22
- // daily_schedule,
23
- // weekly_schedule
24
- // ])
25
20
  export const schedule = start_end_schedule