@seamapi/types 1.437.1 → 1.439.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 (63) hide show
  1. package/dist/connect.cjs +1315 -190
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +8832 -319
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/model-types.d.ts +1 -1
  8. package/lib/seam/connect/models/batches/batch.d.ts +5669 -0
  9. package/lib/seam/connect/models/batches/batch.js +8 -0
  10. package/lib/seam/connect/models/batches/batch.js.map +1 -0
  11. package/lib/seam/connect/models/batches/index.d.ts +2 -0
  12. package/lib/seam/connect/models/batches/index.js +3 -0
  13. package/lib/seam/connect/models/batches/index.js.map +1 -0
  14. package/lib/seam/connect/models/batches/spaces.d.ts +5669 -0
  15. package/lib/seam/connect/models/batches/spaces.js +13 -0
  16. package/lib/seam/connect/models/batches/spaces.js.map +1 -0
  17. package/lib/seam/connect/models/events/access-codes.d.ts +204 -0
  18. package/lib/seam/connect/models/events/access-codes.js +7 -0
  19. package/lib/seam/connect/models/events/access-codes.js.map +1 -1
  20. package/lib/seam/connect/models/events/connect-webviews.d.ts +6 -0
  21. package/lib/seam/connect/models/events/connect-webviews.js +5 -0
  22. package/lib/seam/connect/models/events/connect-webviews.js.map +1 -1
  23. package/lib/seam/connect/models/events/connected-accounts.d.ts +42 -0
  24. package/lib/seam/connect/models/events/connected-accounts.js +4 -0
  25. package/lib/seam/connect/models/events/connected-accounts.js.map +1 -1
  26. package/lib/seam/connect/models/events/devices.d.ts +396 -0
  27. package/lib/seam/connect/models/events/devices.js +7 -0
  28. package/lib/seam/connect/models/events/devices.js.map +1 -1
  29. package/lib/seam/connect/models/events/phones.d.ts +6 -0
  30. package/lib/seam/connect/models/events/phones.js +4 -0
  31. package/lib/seam/connect/models/events/phones.js.map +1 -1
  32. package/lib/seam/connect/models/events/seam-event.d.ts +327 -0
  33. package/lib/seam/connect/models/events/seam-event.js +1 -1
  34. package/lib/seam/connect/models/index.d.ts +1 -0
  35. package/lib/seam/connect/models/index.js +1 -0
  36. package/lib/seam/connect/models/index.js.map +1 -1
  37. package/lib/seam/connect/models/user-identities/user-identity.d.ts +3 -0
  38. package/lib/seam/connect/models/user-identities/user-identity.js +3 -0
  39. package/lib/seam/connect/models/user-identities/user-identity.js.map +1 -1
  40. package/lib/seam/connect/openapi.d.ts +783 -25
  41. package/lib/seam/connect/openapi.js +1068 -0
  42. package/lib/seam/connect/openapi.js.map +1 -1
  43. package/lib/seam/connect/route-types.d.ts +1755 -0
  44. package/lib/seam/connect/schemas.d.ts +1 -1
  45. package/lib/seam/connect/schemas.js +1 -1
  46. package/lib/seam/connect/schemas.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  49. package/src/lib/seam/connect/model-types.ts +1 -0
  50. package/src/lib/seam/connect/models/batches/batch.ts +12 -0
  51. package/src/lib/seam/connect/models/batches/index.ts +2 -0
  52. package/src/lib/seam/connect/models/batches/spaces.ts +16 -0
  53. package/src/lib/seam/connect/models/events/access-codes.ts +11 -0
  54. package/src/lib/seam/connect/models/events/connect-webviews.ts +8 -0
  55. package/src/lib/seam/connect/models/events/connected-accounts.ts +6 -0
  56. package/src/lib/seam/connect/models/events/devices.ts +11 -0
  57. package/src/lib/seam/connect/models/events/phones.ts +6 -0
  58. package/src/lib/seam/connect/models/events/seam-event.ts +1 -1
  59. package/src/lib/seam/connect/models/index.ts +1 -0
  60. package/src/lib/seam/connect/models/user-identities/user-identity.ts +5 -0
  61. package/src/lib/seam/connect/openapi.ts +1186 -0
  62. package/src/lib/seam/connect/route-types.ts +2536 -0
  63. package/src/lib/seam/connect/schemas.ts +1 -0
@@ -1 +1 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, batch, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
@@ -1,2 +1,2 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
1
+ export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, batch, bridge, bridge_client_session, building_block_type, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, thermostat_daily_program, thermostat_schedule, thermostat_weekly_program, unmanaged_access_code, unmanaged_acs_access_group, unmanaged_acs_credential, unmanaged_acs_user, unmanaged_device, user_identity, webhook, workspace, } from './models/index.js';
2
2
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,KAAK,EACL,MAAM,EACN,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,GACV,MAAM,mBAAmB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.437.1",
3
+ "version": "1.439.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -72,6 +72,7 @@ export {
72
72
  room_resource,
73
73
  space,
74
74
  neutral_resource as space_resource,
75
+ spaces_batch,
75
76
  tenant_resource,
76
77
  thermostat_capability_properties,
77
78
  thermostat_device_type,
@@ -13,6 +13,7 @@ export type {
13
13
  ActionAttempt,
14
14
  Bridge,
15
15
  BuildingBlockType,
16
+ Bundle,
16
17
  ClientSession,
17
18
  ConnectedAccount,
18
19
  ConnectedAccountError,
@@ -0,0 +1,12 @@
1
+ import type { z } from 'zod'
2
+
3
+ import { spaces_batch } from './spaces.js'
4
+
5
+ export const batch = spaces_batch.describe(`
6
+ ---
7
+ route_path: /
8
+ ---
9
+ Represents a resource batch.
10
+ `)
11
+
12
+ export type Bundle = z.infer<typeof batch>
@@ -0,0 +1,2 @@
1
+ export * from './batch.js'
2
+ export * from './spaces.js'
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod'
2
+
3
+ import { acs_entrance } from '../acs/index.js'
4
+ import { device } from '../devices/index.js'
5
+ import { space } from '../spaces/index.js'
6
+
7
+ export const spaces_batch = z
8
+ .object({
9
+ batch_type: z.literal('spaces'),
10
+ spaces: space.array().optional(),
11
+ devices: device.array().optional(),
12
+ acs_entrances: acs_entrance.array().optional(),
13
+ })
14
+ .describe('ID of the affected access system user.')
15
+
16
+ export type SpacesBundle = z.infer<typeof spaces_batch>
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from '../custom-metadata.js'
3
4
  import { common_event } from './common.js'
4
5
 
5
6
  const access_code_event = common_event.extend({
@@ -14,6 +15,16 @@ const access_code_event = common_event.extend({
14
15
  .describe(
15
16
  'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the affected access code.',
16
17
  ),
18
+ device_custom_metadata: custom_metadata
19
+ .optional()
20
+ .describe(
21
+ 'Custom metadata of the device, present when device_id is provided.',
22
+ ),
23
+ connected_account_custom_metadata: custom_metadata
24
+ .optional()
25
+ .describe(
26
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
27
+ ),
17
28
  })
18
29
 
19
30
  const code = z.string().describe('Code for the affected access code.')
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from '../custom-metadata.js'
3
4
  import { common_event } from './common.js'
4
5
 
5
6
  const connect_webview_event = common_event.extend({
@@ -18,10 +19,17 @@ const connected_account_id = z
18
19
  'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.',
19
20
  )
20
21
 
22
+ const connected_account_custom_metadata = custom_metadata
23
+ .optional()
24
+ .describe(
25
+ 'Custom metadata of the connected account; present when connected_account_id is provided.',
26
+ )
27
+
21
28
  export const connect_webview_login_succeeded_event =
22
29
  connect_webview_event.extend({
23
30
  event_type: z.literal('connect_webview.login_succeeded'),
24
31
  connected_account_id,
32
+ connected_account_custom_metadata,
25
33
  }).describe(`
26
34
  ---
27
35
  route_path: /connect_webviews
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from '../custom-metadata.js'
3
4
  import { common_event } from './common.js'
4
5
 
5
6
  const connected_account_event = common_event.extend({
@@ -9,6 +10,11 @@ const connected_account_event = common_event.extend({
9
10
  .describe(
10
11
  'ID of the affected [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).',
11
12
  ),
13
+ connected_account_custom_metadata: custom_metadata
14
+ .optional()
15
+ .describe(
16
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
17
+ ),
12
18
  })
13
19
 
14
20
  const connect_webview_id = z
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from '../custom-metadata.js'
3
4
  import { climate_setting } from '../thermostats/climate-preset.js'
4
5
  import { common_event } from './common.js'
5
6
 
@@ -11,6 +12,16 @@ const device_event = common_event.extend({
11
12
  .describe(
12
13
  'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) associated with the event.',
13
14
  ),
15
+ device_custom_metadata: custom_metadata
16
+ .optional()
17
+ .describe(
18
+ 'Custom metadata of the device, present when device_id is provided.',
19
+ ),
20
+ connected_account_custom_metadata: custom_metadata
21
+ .optional()
22
+ .describe(
23
+ 'Custom metadata of the connected account, present when connected_account_id is provided.',
24
+ ),
14
25
  })
15
26
 
16
27
  const battery_level = z
@@ -1,9 +1,15 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from '../custom-metadata.js'
3
4
  import { common_event } from './common.js'
4
5
 
5
6
  const phone_event = common_event.extend({
6
7
  device_id: z.string().uuid().describe('ID of the affected phone device.'),
8
+ device_custom_metadata: custom_metadata
9
+ .optional()
10
+ .describe(
11
+ 'Custom metadata of the device; present when device_id is provided.',
12
+ ),
7
13
  })
8
14
 
9
15
  export const phone_deactivated_event = phone_event.extend({
@@ -29,7 +29,7 @@ export const seam_event = z.discriminatedUnion('event_type', [
29
29
  route_path: /events
30
30
  ---
31
31
  Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a \`lock.unlocked\` event. When a device's battery level is low, Seam creates a \`device.battery_low\` event.
32
-
32
+
33
33
  As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate [webhook](https://docs.seam.co/latest/developer-tools/webhooks) system for sending the event objects directly to an endpoint on your sever. Manage webhooks through [Seam Console](https://console.seam.co). You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints.
34
34
  `)
35
35
 
@@ -2,6 +2,7 @@ export * from './access-codes/index.js'
2
2
  export * from './access-grants/index.js'
3
3
  export * from './acs/index.js'
4
4
  export * from './action-attempts/index.js'
5
+ export * from './batches/index.js'
5
6
  export * from './bridges/index.js'
6
7
  export * from './bridges/index.js'
7
8
  export * from './client-sessions/index.js'
@@ -143,6 +143,11 @@ export const user_identity = z.object({
143
143
  .describe(
144
144
  'Array of warnings associated with the user identity. 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.',
145
145
  ),
146
+ acs_user_ids: z
147
+ .array(z.string().uuid())
148
+ .describe(
149
+ 'Array of access system user IDs associated with the user identity.',
150
+ ),
146
151
  }).describe(`
147
152
  ---
148
153
  route_path: /user_identities