@seamapi/types 1.1037.0 → 1.1038.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 (121) hide show
  1. package/lib/seam/connect/models/access-codes/managed-access-code.js +6 -16
  2. package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
  3. package/lib/seam/connect/models/access-codes/pending-mutations.js +7 -20
  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 +6 -19
  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 +10 -37
  8. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  9. package/lib/seam/connect/models/access-grants/pending-mutations.js +6 -22
  10. package/lib/seam/connect/models/access-grants/pending-mutations.js.map +1 -1
  11. package/lib/seam/connect/models/access-grants/requested-access-method.js +2 -4
  12. package/lib/seam/connect/models/access-grants/requested-access-method.js.map +1 -1
  13. package/lib/seam/connect/models/acs/acs-access-group.js +4 -12
  14. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  15. package/lib/seam/connect/models/acs/acs-access-groups/pending-mutations.js +4 -10
  16. package/lib/seam/connect/models/acs/acs-access-groups/pending-mutations.js.map +1 -1
  17. package/lib/seam/connect/models/acs/acs-credential-pool.js +2 -1
  18. package/lib/seam/connect/models/acs/acs-credential-pool.js.map +1 -1
  19. package/lib/seam/connect/models/acs/acs-credential-provisioning-automation.js +3 -5
  20. package/lib/seam/connect/models/acs/acs-credential-provisioning-automation.js.map +1 -1
  21. package/lib/seam/connect/models/acs/acs-credential.js +9 -27
  22. package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
  23. package/lib/seam/connect/models/acs/acs-credentials/pending-mutations.js +2 -4
  24. package/lib/seam/connect/models/acs/acs-credentials/pending-mutations.js.map +1 -1
  25. package/lib/seam/connect/models/acs/acs-encoder.js +3 -8
  26. package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
  27. package/lib/seam/connect/models/acs/acs-entrance.js +4 -12
  28. package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
  29. package/lib/seam/connect/models/acs/acs-system.js +4 -12
  30. package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
  31. package/lib/seam/connect/models/acs/acs-users/acs-user.js +5 -13
  32. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
  33. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js +5 -13
  34. package/lib/seam/connect/models/acs/acs-users/pending-mutations.js.map +1 -1
  35. package/lib/seam/connect/models/bridges/bridge-client-session.js +5 -15
  36. package/lib/seam/connect/models/bridges/bridge-client-session.js.map +1 -1
  37. package/lib/seam/connect/models/bridges/bridge-connected-system.js +3 -8
  38. package/lib/seam/connect/models/bridges/bridge-connected-system.js.map +1 -1
  39. package/lib/seam/connect/models/bridges/bridge.js +2 -4
  40. package/lib/seam/connect/models/bridges/bridge.js.map +1 -1
  41. package/lib/seam/connect/models/client-sessions/client-session.js +3 -8
  42. package/lib/seam/connect/models/client-sessions/client-session.js.map +1 -1
  43. package/lib/seam/connect/models/connect-webviews/connect-webview.js +3 -7
  44. package/lib/seam/connect/models/connect-webviews/connect-webview.js.map +1 -1
  45. package/lib/seam/connect/models/connected-accounts/connected-account.js +4 -11
  46. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  47. package/lib/seam/connect/models/customer/access-grant-resources.js +3 -6
  48. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
  49. package/lib/seam/connect/models/customer/customer.js +2 -4
  50. package/lib/seam/connect/models/customer/customer.js.map +1 -1
  51. package/lib/seam/connect/models/customization-profiles/customization-profile.js +2 -1
  52. package/lib/seam/connect/models/customization-profiles/customization-profile.js.map +1 -1
  53. package/lib/seam/connect/models/datetime.d.ts +2 -0
  54. package/lib/seam/connect/models/datetime.js +3 -0
  55. package/lib/seam/connect/models/datetime.js.map +1 -0
  56. package/lib/seam/connect/models/devices/device.js +4 -12
  57. package/lib/seam/connect/models/devices/device.js.map +1 -1
  58. package/lib/seam/connect/models/devices/phone.js +3 -8
  59. package/lib/seam/connect/models/devices/phone.js.map +1 -1
  60. package/lib/seam/connect/models/events/common.js +5 -16
  61. package/lib/seam/connect/models/events/common.js.map +1 -1
  62. package/lib/seam/connect/models/index.d.ts +1 -0
  63. package/lib/seam/connect/models/index.js +1 -0
  64. package/lib/seam/connect/models/index.js.map +1 -1
  65. package/lib/seam/connect/models/instant-keys/instant-key.js +3 -8
  66. package/lib/seam/connect/models/instant-keys/instant-key.js.map +1 -1
  67. package/lib/seam/connect/models/partner/customer-portal.js +3 -8
  68. package/lib/seam/connect/models/partner/customer-portal.js.map +1 -1
  69. package/lib/seam/connect/models/partner/magic-link.js +3 -8
  70. package/lib/seam/connect/models/partner/magic-link.js.map +1 -1
  71. package/lib/seam/connect/models/schedule.js +3 -7
  72. package/lib/seam/connect/models/schedule.js.map +1 -1
  73. package/lib/seam/connect/models/spaces/space.js +2 -4
  74. package/lib/seam/connect/models/spaces/space.js.map +1 -1
  75. package/lib/seam/connect/models/thermostats/thermostat-program.js +3 -8
  76. package/lib/seam/connect/models/thermostats/thermostat-program.js.map +1 -1
  77. package/lib/seam/connect/models/thermostats/thermostat-schedule.js +5 -16
  78. package/lib/seam/connect/models/thermostats/thermostat-schedule.js.map +1 -1
  79. package/lib/seam/connect/models/user-identities/user-identity.js +4 -12
  80. package/lib/seam/connect/models/user-identities/user-identity.js.map +1 -1
  81. package/package.json +1 -1
  82. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  83. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +8 -16
  84. package/src/lib/seam/connect/models/access-codes/pending-mutations.ts +12 -22
  85. package/src/lib/seam/connect/models/access-grants/access-grant.ts +14 -19
  86. package/src/lib/seam/connect/models/access-grants/access-method.ts +19 -37
  87. package/src/lib/seam/connect/models/access-grants/pending-mutations.ts +9 -22
  88. package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +5 -6
  89. package/src/lib/seam/connect/models/acs/acs-access-group.ts +10 -12
  90. package/src/lib/seam/connect/models/acs/acs-access-groups/pending-mutations.ts +7 -10
  91. package/src/lib/seam/connect/models/acs/acs-credential-pool.ts +3 -1
  92. package/src/lib/seam/connect/models/acs/acs-credential-provisioning-automation.ts +6 -5
  93. package/src/lib/seam/connect/models/acs/acs-credential.ts +15 -29
  94. package/src/lib/seam/connect/models/acs/acs-credentials/pending-mutations.ts +5 -4
  95. package/src/lib/seam/connect/models/acs/acs-encoder.ts +8 -10
  96. package/src/lib/seam/connect/models/acs/acs-entrance.ts +10 -14
  97. package/src/lib/seam/connect/models/acs/acs-system.ts +11 -14
  98. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +11 -15
  99. package/src/lib/seam/connect/models/acs/acs-users/pending-mutations.ts +7 -13
  100. package/src/lib/seam/connect/models/bridges/bridge-client-session.ts +12 -17
  101. package/src/lib/seam/connect/models/bridges/bridge-connected-system.ts +8 -10
  102. package/src/lib/seam/connect/models/bridges/bridge.ts +5 -4
  103. package/src/lib/seam/connect/models/client-sessions/client-session.ts +8 -12
  104. package/src/lib/seam/connect/models/connect-webviews/connect-webview.ts +5 -7
  105. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +8 -11
  106. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +3 -6
  107. package/src/lib/seam/connect/models/customer/customer.ts +5 -4
  108. package/src/lib/seam/connect/models/customization-profiles/customization-profile.ts +2 -1
  109. package/src/lib/seam/connect/models/datetime.ts +3 -0
  110. package/src/lib/seam/connect/models/devices/device.ts +10 -12
  111. package/src/lib/seam/connect/models/devices/phone.ts +7 -8
  112. package/src/lib/seam/connect/models/events/common.ts +12 -16
  113. package/src/lib/seam/connect/models/index.ts +1 -0
  114. package/src/lib/seam/connect/models/instant-keys/instant-key.ts +8 -8
  115. package/src/lib/seam/connect/models/partner/customer-portal.ts +8 -8
  116. package/src/lib/seam/connect/models/partner/magic-link.ts +8 -8
  117. package/src/lib/seam/connect/models/schedule.ts +6 -9
  118. package/src/lib/seam/connect/models/spaces/space.ts +5 -4
  119. package/src/lib/seam/connect/models/thermostats/thermostat-program.ts +8 -12
  120. package/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts +14 -22
  121. package/src/lib/seam/connect/models/user-identities/user-identity.ts +10 -12
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
+ import { datetime } from '../datetime.js'
4
5
  import { provider_capability } from '../provider-capability.js'
5
6
 
6
7
  const common_connected_account_error = z.object({
7
- created_at: z
8
- .string()
9
- .datetime()
10
- .describe('Date and time at which Seam created the error.'),
8
+ created_at: datetime.describe(
9
+ 'Date and time at which Seam created the error.',
10
+ ),
11
11
  message: z
12
12
  .string()
13
13
  .describe(
@@ -34,10 +34,9 @@ const warning_code_description =
34
34
  'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'
35
35
 
36
36
  const common_connected_account_warning = z.object({
37
- created_at: z
38
- .string()
39
- .datetime()
40
- .describe('Date and time at which Seam created the warning.'),
37
+ created_at: datetime.describe(
38
+ 'Date and time at which Seam created the warning.',
39
+ ),
41
40
  message: z
42
41
  .string()
43
42
  .describe(
@@ -335,9 +334,7 @@ export const connected_account = z.object({
335
334
  .string()
336
335
  .uuid()
337
336
  .describe('ID of the connected account.'),
338
- created_at: z
339
- .string()
340
- .datetime()
337
+ created_at: datetime
341
338
  .optional()
342
339
  .describe('Date and time at which the connected account was created.'),
343
340
  user_identifier: z
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata_input } from '../custom-metadata.js'
4
+ import { datetime } from '../datetime.js'
4
5
 
5
6
  // Base access grant resource with common fields
6
7
  const base_access_grant_resource = z.object({
@@ -8,14 +9,10 @@ const base_access_grant_resource = z.object({
8
9
  .string()
9
10
  .optional()
10
11
  .describe('Your name for this access grant resource.'),
11
- starts_at: z
12
- .string()
13
- .datetime()
12
+ starts_at: datetime
14
13
  .optional()
15
14
  .describe('Starting date and time for the access grant.'),
16
- ends_at: z
17
- .string()
18
- .datetime()
15
+ ends_at: datetime
19
16
  .optional()
20
17
  .describe('Ending date and time for the access grant.'),
21
18
  preferred_code: z
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const customer = z.object({
4
6
  customer_key: z
5
7
  .string()
@@ -8,10 +10,9 @@ export const customer = z.object({
8
10
  .string()
9
11
  .uuid()
10
12
  .describe('ID of the workspace associated with the customer.'),
11
- created_at: z
12
- .string()
13
- .datetime()
14
- .describe('Date and time at which the customer was created.'),
13
+ created_at: datetime.describe(
14
+ 'Date and time at which the customer was created.',
15
+ ),
15
16
  }).describe(`
16
17
  ---
17
18
  route_path: /customers
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { hex_color_code } from '../colors.js'
4
+ import { datetime } from '../datetime.js'
4
5
 
5
6
  export const customer_portal_theme = z.object({
6
7
  primary_color: hex_color_code.optional(),
@@ -23,7 +24,7 @@ export const customization_profile = z.object({
23
24
  workspace_id: z.string().uuid(),
24
25
  name: z.string().nullable(),
25
26
  customization_profile_id: z.string().uuid(),
26
- created_at: z.string().datetime(),
27
+ created_at: datetime,
27
28
  logo_url: z.string().url().optional(),
28
29
  primary_color: z.string().optional(),
29
30
  secondary_color: z.string().optional(),
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod'
2
+
3
+ export const datetime = z.string().datetime({ offset: true })
@@ -2,6 +2,7 @@ import { z } from 'zod'
2
2
 
3
3
  import { connected_account_error } from '../connected-accounts/index.js'
4
4
  import { custom_metadata } from '../custom-metadata.js'
5
+ import { datetime } from '../datetime.js'
5
6
  import { capabilities } from './capabilities-supported.js'
6
7
  import { capability_properties } from './capability-properties/index.js'
7
8
  import { device_metadata } from './device-metadata.js'
@@ -118,10 +119,9 @@ const common_device_error = z.object({
118
119
  is_device_error: z
119
120
  .literal(true)
120
121
  .describe('Indicates that the error is a device error.'),
121
- created_at: z
122
- .string()
123
- .datetime()
124
- .describe('Date and time at which Seam created the error.'),
122
+ created_at: datetime.describe(
123
+ 'Date and time at which Seam created the error.',
124
+ ),
125
125
  })
126
126
 
127
127
  const error_code_description =
@@ -357,10 +357,9 @@ const common_device_warning = z.object({
357
357
  .describe(
358
358
  'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
359
359
  ),
360
- created_at: z
361
- .string()
362
- .datetime()
363
- .describe('Date and time at which Seam created the warning.'),
360
+ created_at: datetime.describe(
361
+ 'Date and time at which Seam created the warning.',
362
+ ),
364
363
  })
365
364
 
366
365
  const partial_backup_access_code_pool = common_device_warning.extend({
@@ -1149,10 +1148,9 @@ export const device = z
1149
1148
  ---
1150
1149
  Array of warnings associated with the device. Each warning object within the array contains two fields: \`warning_code\` and \`message\`. \`warning_code\` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. \`message\` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it.
1151
1150
  `),
1152
- created_at: z
1153
- .string()
1154
- .datetime()
1155
- .describe('Date and time at which the device object was created.'),
1151
+ created_at: datetime.describe(
1152
+ 'Date and time at which the device object was created.',
1153
+ ),
1156
1154
  is_managed: z
1157
1155
  .literal(true)
1158
1156
  .describe(
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
3
4
  import { device } from './device.js'
4
5
  import { phone_device_type } from './device-type.js'
5
6
  import { phone_specific_properties } from './phone-properties.js'
@@ -41,10 +42,9 @@ export const phone = z.object({
41
42
  .string()
42
43
  .describe('Unique identifier of the type of error.'),
43
44
  message: z.string().describe('Detailed description of the error.'),
44
- created_at: z
45
- .string()
46
- .datetime()
47
- .describe('Date and time at which Seam created the error.'),
45
+ created_at: datetime.describe(
46
+ 'Date and time at which Seam created the error.',
47
+ ),
48
48
  }),
49
49
  )
50
50
  .describe('Errors associated with the phone.'),
@@ -55,10 +55,9 @@ export const phone = z.object({
55
55
  .string()
56
56
  .describe('Unique identifier of the type of warning.'),
57
57
  message: z.string().describe('Detailed description of the warning.'),
58
- created_at: z
59
- .string()
60
- .datetime()
61
- .describe('Date and time at which Seam created the warning.'),
58
+ created_at: datetime.describe(
59
+ 'Date and time at which Seam created the warning.',
60
+ ),
62
61
  }),
63
62
  )
64
63
  .describe('Warnings associated with the phone.'),
@@ -1,19 +1,17 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const common_event = z.object({
4
6
  event_id: z.string().uuid().describe('ID of the event.'),
5
7
  workspace_id: z
6
8
  .string()
7
9
  .uuid()
8
10
  .describe('ID of the workspace associated with the event.'),
9
- created_at: z
10
- .string()
11
- .datetime()
12
- .describe('Date and time at which the event was created.'),
13
- occurred_at: z
14
- .string()
15
- .datetime()
16
- .describe('Date and time at which the event occurred.'),
11
+ created_at: datetime.describe(
12
+ 'Date and time at which the event was created.',
13
+ ),
14
+ occurred_at: datetime.describe('Date and time at which the event occurred.'),
17
15
  event_description: z
18
16
  .string()
19
17
  .optional()
@@ -29,10 +27,9 @@ const warning_code_description =
29
27
 
30
28
  export const common_event_error = z
31
29
  .object({
32
- created_at: z
33
- .string()
34
- .datetime()
35
- .describe('Date and time at which Seam created the error.'),
30
+ created_at: datetime.describe(
31
+ 'Date and time at which Seam created the error.',
32
+ ),
36
33
  message: z
37
34
  .string()
38
35
  .describe(
@@ -46,10 +43,9 @@ export const common_event_error = z
46
43
 
47
44
  export const common_event_warning = z
48
45
  .object({
49
- created_at: z
50
- .string()
51
- .datetime()
52
- .describe('Date and time at which Seam created the warning.'),
46
+ created_at: datetime.describe(
47
+ 'Date and time at which Seam created the warning.',
48
+ ),
53
49
  message: z
54
50
  .string()
55
51
  .describe(
@@ -15,6 +15,7 @@ export * from './customer/index.js'
15
15
  export * from './customer/location-resources.js'
16
16
  export * from './customer/user-identity-resources.js'
17
17
  export * from './customization-profiles/index.js'
18
+ export * from './datetime.js'
18
19
  export * from './devices/index.js'
19
20
  export * from './events/index.js'
20
21
  export * from './instant-keys/index.js'
@@ -1,15 +1,16 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const instant_key = z.object({
4
6
  instant_key_id: z.string().uuid().describe('ID of the Instant Key.'),
5
7
  workspace_id: z
6
8
  .string()
7
9
  .uuid()
8
10
  .describe('ID of the workspace that contains the Instant Key.'),
9
- created_at: z
10
- .string()
11
- .datetime()
12
- .describe('Date and time at which the Instant Key was created.'),
11
+ created_at: datetime.describe(
12
+ 'Date and time at which the Instant Key was created.',
13
+ ),
13
14
  instant_key_url: z
14
15
  .string()
15
16
  .url()
@@ -24,10 +25,9 @@ export const instant_key = z.object({
24
25
  .string()
25
26
  .uuid()
26
27
  .describe('ID of the user identity associated with the Instant Key.'),
27
- expires_at: z
28
- .string()
29
- .datetime()
30
- .describe('Date and time at which the Instant Key expires.'),
28
+ expires_at: datetime.describe(
29
+ 'Date and time at which the Instant Key expires.',
30
+ ),
31
31
  customization_profile_id: z
32
32
  .string()
33
33
  .uuid()
@@ -1,21 +1,21 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const customer_portal = z
4
6
  .object({
5
7
  url: z.string().url().describe('URL for the customer portal.'),
6
8
  customer_key: z.string().describe('Customer key for the customer portal.'),
7
- expires_at: z
8
- .string()
9
- .datetime()
10
- .describe('Date and time at which the customer portal link expires.'),
9
+ expires_at: datetime.describe(
10
+ 'Date and time at which the customer portal link expires.',
11
+ ),
11
12
  workspace_id: z
12
13
  .string()
13
14
  .uuid()
14
15
  .describe('ID of the workspace associated with the customer portal.'),
15
- created_at: z
16
- .string()
17
- .datetime()
18
- .describe('Date and time at which the customer portal link was created.'),
16
+ created_at: datetime.describe(
17
+ 'Date and time at which the customer portal link was created.',
18
+ ),
19
19
  })
20
20
  .describe(
21
21
  `
@@ -1,20 +1,20 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const magic_link = z.object({
4
6
  url: z.string().url().describe('URL for the magic link.'),
5
7
  customer_key: z.string().describe('Customer key for the magic link.'),
6
- expires_at: z
7
- .string()
8
- .datetime()
9
- .describe('Date and time at which the magic link expires.'),
8
+ expires_at: datetime.describe(
9
+ 'Date and time at which the magic link expires.',
10
+ ),
10
11
  workspace_id: z
11
12
  .string()
12
13
  .uuid()
13
14
  .describe('ID of the workspace associated with the magic link.'),
14
- created_at: z
15
- .string()
16
- .datetime()
17
- .describe('Date and time at which the magic link was created.'),
15
+ created_at: datetime.describe(
16
+ 'Date and time at which the magic link was created.',
17
+ ),
18
18
  }).describe(`
19
19
  ---
20
20
  undocumented: Unreleased.
@@ -1,16 +1,13 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from './datetime.js'
4
+
3
5
  export const start_end_schedule = z
4
6
  .object({
5
- starts_at: z
6
- .string()
7
- .datetime()
8
- .describe(
9
- "Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.",
10
- ),
11
- ends_at: z
12
- .string()
13
- .datetime()
7
+ starts_at: datetime.describe(
8
+ "Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.",
9
+ ),
10
+ ends_at: datetime
14
11
  .describe(
15
12
  "Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.",
16
13
  )
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  const time_of_day_re = /^([01]\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/
4
6
 
5
7
  export const space_customer_data = z
@@ -47,10 +49,9 @@ export const space = z.object({
47
49
  .describe('Unique key for the space within the workspace.'),
48
50
  name: z.string().describe('Name of the space.'),
49
51
  display_name: z.string().describe('Display name for the space.'),
50
- created_at: z
51
- .string()
52
- .datetime()
53
- .describe('Date and time at which the space was created.'),
52
+ created_at: datetime.describe(
53
+ 'Date and time at which the space was created.',
54
+ ),
54
55
  device_count: z.number().describe('Number of devices in the space.'),
55
56
  acs_entrance_count: z.number().describe('Number of entrances in the space.'),
56
57
  customer_key: z
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const thermostat_daily_program_period = z
4
6
  .object({
5
7
  starts_at_time: z
@@ -42,12 +44,9 @@ export const thermostat_daily_program = z.object({
42
44
  .describe(
43
45
  'ID of the workspace that contains the thermostat daily program.',
44
46
  ),
45
- created_at: z
46
- .string()
47
- .datetime()
48
- .describe(
49
- 'Date and time at which the thermostat daily program was created.',
50
- ),
47
+ created_at: datetime.describe(
48
+ 'Date and time at which the thermostat daily program was created.',
49
+ ),
51
50
  }).describe(`
52
51
  ---
53
52
  route_path: /thermostats/daily_programs
@@ -91,12 +90,9 @@ export const thermostat_weekly_program = z.object({
91
90
  .uuid()
92
91
  .nullable()
93
92
  .describe('ID of the thermostat daily program to run on Sundays.'),
94
- created_at: z
95
- .string()
96
- .datetime()
97
- .describe(
98
- 'Date and time at which the thermostat weekly program was created.',
99
- ),
93
+ created_at: datetime.describe(
94
+ 'Date and time at which the thermostat weekly program was created.',
95
+ ),
100
96
  })
101
97
 
102
98
  export type ThermostatDailyProgram = z.infer<typeof thermostat_daily_program>
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const thermostat_schedule = z.object({
4
6
  thermostat_schedule_id: z
5
7
  .string()
@@ -33,34 +35,25 @@ export const thermostat_schedule = z.object({
33
35
  .describe(
34
36
  "Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions).",
35
37
  ),
36
- starts_at: z
37
- .string()
38
- .datetime()
39
- .describe(
40
- 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
41
- ),
38
+ starts_at: datetime.describe(
39
+ 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
40
+ ),
42
41
  is_override_allowed: z
43
42
  .boolean()
44
43
  .optional()
45
44
  .describe(
46
45
  "Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts.",
47
46
  ),
48
- ends_at: z
49
- .string()
50
- .datetime()
51
- .describe(
52
- 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
53
- ),
47
+ ends_at: datetime.describe(
48
+ 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
49
+ ),
54
50
  workspace_id: z
55
51
  .string()
56
52
  .uuid()
57
53
  .describe('ID of the workspace that contains the thermostat schedule.'),
58
- created_at: z
59
- .string()
60
- .datetime()
61
- .describe(
62
- 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created.',
63
- ),
54
+ created_at: datetime.describe(
55
+ 'Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created.',
56
+ ),
64
57
  errors: z
65
58
  .array(
66
59
  z.object({
@@ -74,10 +67,9 @@ export const thermostat_schedule = z.object({
74
67
  .describe(
75
68
  'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
76
69
  ),
77
- created_at: z
78
- .string()
79
- .datetime()
80
- .describe('Date and time at which Seam created the error.'),
70
+ created_at: datetime.describe(
71
+ 'Date and time at which Seam created the error.',
72
+ ),
81
73
  }),
82
74
  )
83
75
  .describe(
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
3
4
  import { loose_phone_number } from '../phone-number.js'
4
5
 
5
6
  const common_user_identity_error = z.object({
6
- created_at: z
7
- .string()
8
- .datetime()
9
- .describe('Date and time at which Seam created the error.'),
7
+ created_at: datetime.describe(
8
+ 'Date and time at which Seam created the error.',
9
+ ),
10
10
  message: z
11
11
  .string()
12
12
  .describe(
@@ -15,10 +15,9 @@ const common_user_identity_error = z.object({
15
15
  })
16
16
 
17
17
  const common_user_identity_warning = z.object({
18
- created_at: z
19
- .string()
20
- .datetime()
21
- .describe('Date and time at which Seam created the warning.'),
18
+ created_at: datetime.describe(
19
+ 'Date and time at which Seam created the warning.',
20
+ ),
22
21
  message: z
23
22
  .string()
24
23
  .describe(
@@ -139,10 +138,9 @@ export const user_identity = z.object({
139
138
  .describe(
140
139
  'Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity.',
141
140
  ),
142
- created_at: z
143
- .string()
144
- .datetime()
145
- .describe('Date and time at which the user identity was created.'),
141
+ created_at: datetime.describe(
142
+ 'Date and time at which the user identity was created.',
143
+ ),
146
144
  workspace_id: z
147
145
  .string()
148
146
  .uuid()