@seamapi/types 1.1036.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 (126) 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/lib/seam/connect/openapi.js +6 -6
  82. package/lib/seam/connect/openapi.js.map +1 -1
  83. package/lib/seam/connect/route-types.d.ts +3 -3
  84. package/package.json +1 -1
  85. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  86. package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +8 -16
  87. package/src/lib/seam/connect/models/access-codes/pending-mutations.ts +12 -22
  88. package/src/lib/seam/connect/models/access-grants/access-grant.ts +14 -19
  89. package/src/lib/seam/connect/models/access-grants/access-method.ts +19 -37
  90. package/src/lib/seam/connect/models/access-grants/pending-mutations.ts +9 -22
  91. package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +5 -6
  92. package/src/lib/seam/connect/models/acs/acs-access-group.ts +10 -12
  93. package/src/lib/seam/connect/models/acs/acs-access-groups/pending-mutations.ts +7 -10
  94. package/src/lib/seam/connect/models/acs/acs-credential-pool.ts +3 -1
  95. package/src/lib/seam/connect/models/acs/acs-credential-provisioning-automation.ts +6 -5
  96. package/src/lib/seam/connect/models/acs/acs-credential.ts +15 -29
  97. package/src/lib/seam/connect/models/acs/acs-credentials/pending-mutations.ts +5 -4
  98. package/src/lib/seam/connect/models/acs/acs-encoder.ts +8 -10
  99. package/src/lib/seam/connect/models/acs/acs-entrance.ts +10 -14
  100. package/src/lib/seam/connect/models/acs/acs-system.ts +11 -14
  101. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +11 -15
  102. package/src/lib/seam/connect/models/acs/acs-users/pending-mutations.ts +7 -13
  103. package/src/lib/seam/connect/models/bridges/bridge-client-session.ts +12 -17
  104. package/src/lib/seam/connect/models/bridges/bridge-connected-system.ts +8 -10
  105. package/src/lib/seam/connect/models/bridges/bridge.ts +5 -4
  106. package/src/lib/seam/connect/models/client-sessions/client-session.ts +8 -12
  107. package/src/lib/seam/connect/models/connect-webviews/connect-webview.ts +5 -7
  108. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +8 -11
  109. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +3 -6
  110. package/src/lib/seam/connect/models/customer/customer.ts +5 -4
  111. package/src/lib/seam/connect/models/customization-profiles/customization-profile.ts +2 -1
  112. package/src/lib/seam/connect/models/datetime.ts +3 -0
  113. package/src/lib/seam/connect/models/devices/device.ts +10 -12
  114. package/src/lib/seam/connect/models/devices/phone.ts +7 -8
  115. package/src/lib/seam/connect/models/events/common.ts +12 -16
  116. package/src/lib/seam/connect/models/index.ts +1 -0
  117. package/src/lib/seam/connect/models/instant-keys/instant-key.ts +8 -8
  118. package/src/lib/seam/connect/models/partner/customer-portal.ts +8 -8
  119. package/src/lib/seam/connect/models/partner/magic-link.ts +8 -8
  120. package/src/lib/seam/connect/models/schedule.ts +6 -9
  121. package/src/lib/seam/connect/models/spaces/space.ts +5 -4
  122. package/src/lib/seam/connect/models/thermostats/thermostat-program.ts +8 -12
  123. package/src/lib/seam/connect/models/thermostats/thermostat-schedule.ts +14 -22
  124. package/src/lib/seam/connect/models/user-identities/user-identity.ts +10 -12
  125. package/src/lib/seam/connect/openapi.ts +6 -6
  126. package/src/lib/seam/connect/route-types.ts +3 -3
@@ -1,10 +1,11 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  const common_acs_encoder_error = z.object({
4
- created_at: z
5
- .string()
6
- .datetime()
7
- .describe('Date and time at which Seam created the error.'),
6
+ created_at: datetime.describe(
7
+ 'Date and time at which Seam created the error.',
8
+ ),
8
9
  message: z
9
10
  .string()
10
11
  .describe(
@@ -65,12 +66,9 @@ export const acs_encoder = z.object({
65
66
  .describe(
66
67
  'Errors associated with the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).',
67
68
  ),
68
- created_at: z
69
- .string()
70
- .datetime()
71
- .describe(
72
- 'Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created.',
73
- ),
69
+ created_at: datetime.describe(
70
+ 'Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created.',
71
+ ),
74
72
  display_name: z
75
73
  .string()
76
74
  .describe(
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
3
4
  import { acs_entrance_akiles_metadata } from './metadata/akiles.js'
4
5
  import { acs_entrance_avigilon_alta_metadata } from './metadata/avigilon-alta.js'
5
6
  import { acs_entrance_dormakaba_ambiance_metadata } from './metadata/dormakaba-ambiance.js'
@@ -18,10 +19,9 @@ const warning_code_description =
18
19
  'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'
19
20
 
20
21
  const common_acs_entrance_warning = z.object({
21
- created_at: z
22
- .string()
23
- .datetime()
24
- .describe('Date and time at which Seam created the warning.'),
22
+ created_at: datetime.describe(
23
+ 'Date and time at which Seam created the warning.',
24
+ ),
25
25
  message: z
26
26
  .string()
27
27
  .describe(
@@ -152,12 +152,9 @@ export const acs_entrance = z
152
152
  space_ids: z
153
153
  .array(z.string().uuid())
154
154
  .describe('IDs of the spaces that the entrance is in.'),
155
- created_at: z
156
- .string()
157
- .datetime()
158
- .describe(
159
- 'Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created.',
160
- ),
155
+ created_at: datetime.describe(
156
+ 'Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created.',
157
+ ),
161
158
  display_name: z
162
159
  .string()
163
160
  .describe(
@@ -182,10 +179,9 @@ export const acs_entrance = z
182
179
  .describe(
183
180
  'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
184
181
  ),
185
- created_at: z
186
- .string()
187
- .datetime()
188
- .describe('Date and time at which Seam created the error.'),
182
+ created_at: datetime.describe(
183
+ 'Date and time at which Seam created the error.',
184
+ ),
189
185
  }),
190
186
  )
191
187
  .describe(
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const acs_system_capability_flags = z.object({
4
6
  // Access method type capability flags are not publicly exposed for ACS systems
5
7
  // They are only available for ACS entrances
@@ -38,10 +40,9 @@ export const acs_system_external_type = z.enum([
38
40
  export type AcsSystemExternalType = z.infer<typeof acs_system_external_type>
39
41
 
40
42
  const common_acs_system_error = z.object({
41
- created_at: z
42
- .string()
43
- .datetime()
44
- .describe('Date and time at which Seam created the error.'),
43
+ created_at: datetime.describe(
44
+ 'Date and time at which Seam created the error.',
45
+ ),
45
46
  message: z
46
47
  .string()
47
48
  .describe(
@@ -200,10 +201,9 @@ const _acs_system_error_map = z.object({
200
201
  export type AcsSystemErrorMap = z.infer<typeof _acs_system_error_map>
201
202
 
202
203
  const common_acs_system_warning = z.object({
203
- created_at: z
204
- .string()
205
- .datetime()
206
- .describe('Date and time at which Seam created the warning.'),
204
+ created_at: datetime.describe(
205
+ 'Date and time at which Seam created the warning.',
206
+ ),
207
207
  message: z
208
208
  .string()
209
209
  .describe(
@@ -377,12 +377,9 @@ export const acs_system = z
377
377
  .describe(
378
378
  'Name of the [access control system](https://docs.seam.co/low-level-apis/access-systems).',
379
379
  ),
380
- created_at: z
381
- .string()
382
- .datetime()
383
- .describe(
384
- 'Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created.',
385
- ),
380
+ created_at: datetime.describe(
381
+ 'Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created.',
382
+ ),
386
383
  workspace_id: z
387
384
  .string()
388
385
  .uuid()
@@ -1,5 +1,6 @@
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
  import { schedule } from '../../schedule.js'
5
6
  import { acs_user_salto_ks_metadata } from '../metadata/salto.js'
@@ -21,10 +22,9 @@ export const acs_user_external_type = z.enum([
21
22
  export type AcsUserExternalType = z.infer<typeof acs_user_external_type>
22
23
 
23
24
  const common_acs_user_error = z.object({
24
- created_at: z
25
- .string()
26
- .datetime()
27
- .describe('Date and time at which Seam created the error.'),
25
+ created_at: datetime.describe(
26
+ 'Date and time at which Seam created the error.',
27
+ ),
28
28
  message: z
29
29
  .string()
30
30
  .describe(
@@ -122,10 +122,9 @@ const _acs_users_error_map = z.object({
122
122
  export type AcsUsersErrorMap = z.infer<typeof _acs_users_error_map>
123
123
 
124
124
  const common_acs_user_warning = z.object({
125
- created_at: z
126
- .string()
127
- .datetime()
128
- .describe('Date and time at which Seam created the warning.'),
125
+ created_at: datetime.describe(
126
+ 'Date and time at which Seam created the warning.',
127
+ ),
129
128
  message: z
130
129
  .string()
131
130
  .describe(
@@ -254,12 +253,9 @@ const common_acs_user = z
254
253
  .describe(
255
254
  'ID of the workspace that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).',
256
255
  ),
257
- created_at: z
258
- .string()
259
- .datetime()
260
- .describe(
261
- 'Date and time at which the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created.',
262
- ),
256
+ created_at: datetime.describe(
257
+ 'Date and time at which the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created.',
258
+ ),
263
259
  display_name: z
264
260
  .string()
265
261
  .describe(
@@ -330,7 +326,7 @@ const common_acs_user = z
330
326
  .describe(
331
327
  'Pending mutations associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system.',
332
328
  ),
333
- last_successful_sync_at: z.string().datetime().nullable().describe(`
329
+ last_successful_sync_at: datetime.nullable().describe(`
334
330
  ---
335
331
  undocumented: Only used internally.
336
332
  ---
@@ -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_pending_mutation = z.object({
6
- created_at: z
7
- .string()
8
- .datetime()
9
- .describe('Date and time at which the mutation was created.'),
7
+ created_at: datetime.describe(
8
+ 'Date and time at which the mutation was created.',
9
+ ),
10
10
  message: z.string().describe('Detailed description of the mutation.'),
11
11
  })
12
12
 
@@ -41,9 +41,7 @@ const deferring_creation = common_pending_mutation
41
41
  .describe(
42
42
  'Mutation code to indicate that Seam is intentionally deferring the creation of the user on the access control system until the appropriate time.',
43
43
  ),
44
- scheduled_at: z
45
- .string()
46
- .datetime()
44
+ scheduled_at: datetime
47
45
  .optional()
48
46
  .nullable()
49
47
  .describe('Optional: When the user creation is scheduled to occur.'),
@@ -83,14 +81,10 @@ export const updating_user_information_mutation =
83
81
 
84
82
  const access_schedule = z
85
83
  .object({
86
- starts_at: z
87
- .string()
88
- .datetime()
84
+ starts_at: datetime
89
85
  .nullable()
90
86
  .describe('Starting time for the access schedule.'),
91
- ends_at: z
92
- .string()
93
- .datetime()
87
+ ends_at: datetime
94
88
  .nullable()
95
89
  .describe('Starting time for the access schedule.'),
96
90
  })
@@ -1,15 +1,16 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  const common_bridge_client_session_error = z.object({
4
6
  message: z
5
7
  .string()
6
8
  .describe(
7
9
  'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
8
10
  ),
9
- created_at: z
10
- .string()
11
- .datetime()
12
- .describe('Date and time at which Seam created the error.'),
11
+ created_at: datetime.describe(
12
+ 'Date and time at which Seam created the error.',
13
+ ),
13
14
  })
14
15
 
15
16
  const error_code_description =
@@ -89,12 +90,9 @@ export type BridgeClientSessionErrorMap = z.infer<
89
90
  >
90
91
 
91
92
  export const bridge_client_session = z.object({
92
- created_at: z
93
- .string()
94
- .datetime()
95
- .describe(
96
- 'Date and time at which the Seam Bridge client session was created.',
97
- ),
93
+ created_at: datetime.describe(
94
+ 'Date and time at which the Seam Bridge client session was created.',
95
+ ),
98
96
  bridge_client_session_id: z
99
97
  .string()
100
98
  .uuid()
@@ -110,10 +108,9 @@ export const bridge_client_session = z.object({
110
108
  .describe(
111
109
  'Pairing code for Seam Bridge. Use this code to pair Seam Bridge with your workspace.',
112
110
  ),
113
- pairing_code_expires_at: z
114
- .string()
115
- .datetime()
116
- .describe('Date and time at which the pairing code expires.'),
111
+ pairing_code_expires_at: datetime.describe(
112
+ 'Date and time at which the pairing code expires.',
113
+ ),
117
114
  tailscale_hostname: z
118
115
  .string()
119
116
  .describe('Tailscale hostname for Seam Bridge.'),
@@ -137,9 +134,7 @@ export const bridge_client_session = z.object({
137
134
  .string()
138
135
  .nullable()
139
136
  .describe('Telemetry token for the Seam Bridge client session.'),
140
- telemetry_token_expires_at: z
141
- .string()
142
- .datetime()
137
+ telemetry_token_expires_at: datetime
143
138
  .nullable()
144
139
  .describe(
145
140
  'Date and time at which the telemetry token for the Seam Bridge client session expires.',
@@ -1,24 +1,22 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const bridge_connected_system = z.object({
4
6
  bridge_id: z
5
7
  .string()
6
8
  .uuid()
7
9
  .describe('ID of Seam Bridge connected to the access system.'),
8
- bridge_created_at: z
9
- .string()
10
- .datetime()
11
- .describe('Date and time at which Seam Bridge was created.'),
10
+ bridge_created_at: datetime.describe(
11
+ 'Date and time at which Seam Bridge was created.',
12
+ ),
12
13
  connected_account_id: z
13
14
  .string()
14
15
  .uuid()
15
16
  .describe('ID of the connected account associated with Seam Bridge.'),
16
- connected_account_created_at: z
17
- .string()
18
- .datetime()
19
- .describe(
20
- 'Date and time at which the connected account associated with Seam Bridge was created.',
21
- ),
17
+ connected_account_created_at: datetime.describe(
18
+ 'Date and time at which the connected account associated with Seam Bridge was created.',
19
+ ),
22
20
  acs_system_id: z
23
21
  .string()
24
22
  .uuid()
@@ -1,15 +1,16 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const bridge = z.object({
4
6
  bridge_id: z.string().uuid().describe('ID of Seam Bridge.'),
5
7
  workspace_id: z
6
8
  .string()
7
9
  .uuid()
8
10
  .describe('ID of the workspace that contains Seam Bridge.'),
9
- created_at: z
10
- .string()
11
- .datetime()
12
- .describe('Date and time at which Seam Bridge was created.'),
11
+ created_at: datetime.describe(
12
+ 'Date and time at which Seam Bridge was created.',
13
+ ),
13
14
  }).describe(`
14
15
  ---
15
16
  undocumented: Unreleased.
@@ -1,23 +1,19 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { datetime } from '../datetime.js'
4
+
3
5
  export const client_session = z.object({
4
6
  client_session_id: z.string().uuid().describe('ID of the client session.'),
5
7
  workspace_id: z
6
8
  .string()
7
9
  .uuid()
8
10
  .describe('ID of the workspace associated with the client session.'),
9
- created_at: z
10
- .string()
11
- .datetime()
12
- .describe(
13
- 'Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created.',
14
- ),
15
- expires_at: z
16
- .string()
17
- .datetime()
18
- .describe(
19
- 'Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires.',
20
- ),
11
+ created_at: datetime.describe(
12
+ 'Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created.',
13
+ ),
14
+ expires_at: datetime.describe(
15
+ 'Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires.',
16
+ ),
21
17
  token: z
22
18
  .string()
23
19
  .describe(
@@ -1,6 +1,7 @@
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
  export const connect_webview_device_selection_mode = z.enum([
@@ -15,10 +16,9 @@ export const connect_webview = z.object({
15
16
  .string()
16
17
  .uuid()
17
18
  .describe('ID of the workspace that contains the Connect Webview.'),
18
- created_at: z
19
- .string()
20
- .datetime()
21
- .describe('Date and time at which the Connect Webview was created.'),
19
+ created_at: datetime.describe(
20
+ 'Date and time at which the Connect Webview was created.',
21
+ ),
22
22
  connected_account_id: z
23
23
  .string()
24
24
  .uuid()
@@ -104,9 +104,7 @@ export const connect_webview = z.object({
104
104
  .describe(
105
105
  'Indicates whether Seam should [finish syncing all devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview.',
106
106
  ),
107
- authorized_at: z
108
- .string()
109
- .datetime()
107
+ authorized_at: datetime
110
108
  .nullable()
111
109
  .describe(
112
110
  'Date and time at which the user authorized (through the Connect Webview) the management of their devices.',
@@ -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.'),