@seamapi/types 1.1085.0 → 1.1086.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 (31) hide show
  1. package/lib/seam/connect/model-types.d.ts +1 -1
  2. package/lib/seam/connect/models/events/devices.d.ts +12 -6
  3. package/lib/seam/connect/models/events/devices.js +7 -3
  4. package/lib/seam/connect/models/events/devices.js.map +1 -1
  5. package/lib/seam/connect/models/events/seam-event.d.ts +6 -3
  6. package/lib/seam/connect/models/index.d.ts +1 -0
  7. package/lib/seam/connect/models/index.js +1 -0
  8. package/lib/seam/connect/models/index.js.map +1 -1
  9. package/lib/seam/connect/models/instant-keys/instant-key-preview.d.ts +6 -6
  10. package/lib/seam/connect/models/media/index.d.ts +1 -0
  11. package/lib/seam/connect/models/media/index.js +2 -0
  12. package/lib/seam/connect/models/media/index.js.map +1 -0
  13. package/lib/seam/connect/models/media/media.d.ts +36 -0
  14. package/lib/seam/connect/models/media/media.js +44 -0
  15. package/lib/seam/connect/models/media/media.js.map +1 -0
  16. package/lib/seam/connect/openapi.js +146 -4
  17. package/lib/seam/connect/openapi.js.map +1 -1
  18. package/lib/seam/connect/route-types.d.ts +59 -10
  19. package/lib/seam/connect/schemas.d.ts +1 -1
  20. package/lib/seam/connect/schemas.js +1 -1
  21. package/lib/seam/connect/schemas.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  24. package/src/lib/seam/connect/model-types.ts +1 -0
  25. package/src/lib/seam/connect/models/events/devices.ts +9 -3
  26. package/src/lib/seam/connect/models/index.ts +1 -0
  27. package/src/lib/seam/connect/models/media/index.ts +1 -0
  28. package/src/lib/seam/connect/models/media/media.ts +55 -0
  29. package/src/lib/seam/connect/openapi.ts +154 -4
  30. package/src/lib/seam/connect/route-types.ts +59 -17
  31. package/src/lib/seam/connect/schemas.ts +1 -0
@@ -51999,8 +51999,8 @@ export type Routes = {
51999
51999
  image_url?: string | undefined;
52000
52000
  /** URL to a short video clip captured at the time of activation. */
52001
52001
  video_url?: string | undefined;
52002
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
52003
- media_status?: ('pending' | 'available' | 'unavailable' | 'failed') | undefined;
52002
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
52003
+ media_ids?: string[] | undefined;
52004
52004
  } | {
52005
52005
  /** ID of the event. */
52006
52006
  event_id: string;
@@ -52031,6 +52031,8 @@ export type Routes = {
52031
52031
  image_url?: string | undefined;
52032
52032
  /** URL to a short video clip captured at the time the doorbell was pressed. */
52033
52033
  video_url?: string | undefined;
52034
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
52035
+ media_ids?: string[] | undefined;
52034
52036
  } | {
52035
52037
  /** ID of the event. */
52036
52038
  event_id: string;
@@ -55632,8 +55634,8 @@ export type Routes = {
55632
55634
  image_url?: string | undefined;
55633
55635
  /** URL to a short video clip captured at the time of activation. */
55634
55636
  video_url?: string | undefined;
55635
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
55636
- media_status?: ('pending' | 'available' | 'unavailable' | 'failed') | undefined;
55637
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
55638
+ media_ids?: string[] | undefined;
55637
55639
  } | {
55638
55640
  /** ID of the event. */
55639
55641
  event_id: string;
@@ -55664,6 +55666,8 @@ export type Routes = {
55664
55666
  image_url?: string | undefined;
55665
55667
  /** URL to a short video clip captured at the time the doorbell was pressed. */
55666
55668
  video_url?: string | undefined;
55669
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
55670
+ media_ids?: string[] | undefined;
55667
55671
  } | {
55668
55672
  /** ID of the event. */
55669
55673
  event_id: string;
@@ -71276,6 +71280,45 @@ export type Routes = {
71276
71280
  };
71277
71281
  maxDuration: undefined;
71278
71282
  };
71283
+ '/media/get': {
71284
+ route: '/media/get';
71285
+ method: 'GET' | 'POST';
71286
+ queryParams: {};
71287
+ jsonBody: {};
71288
+ commonParams: {
71289
+ /** ID of the media that you want to get. */
71290
+ media_id: string;
71291
+ /** Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. */
71292
+ format?: 'json' | 'redirect';
71293
+ };
71294
+ formData: {};
71295
+ jsonResponse: {
71296
+ /** Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta. */
71297
+ media: {
71298
+ /** ID of the media. */
71299
+ media_id: string;
71300
+ /** ID of the workspace that contains the media. */
71301
+ workspace_id: string;
71302
+ /** ID of the device that captured the media. */
71303
+ device_id: string | null;
71304
+ /** ID of the event that the media belongs to. */
71305
+ event_id: string | null;
71306
+ /** Type of the media: a video clip or a still image. */
71307
+ media_type: 'video' | 'image';
71308
+ /** MIME type of the media, such as `video/mp4` or `image/jpeg`. */
71309
+ content_type: string | null;
71310
+ /** Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. */
71311
+ status: 'pending' | 'available' | 'unavailable' | 'failed';
71312
+ /** Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL. */
71313
+ url: string | null;
71314
+ /** Date and time at which the media stops being available. Null when Seam does not know when the media expires. */
71315
+ expires_at: string | null;
71316
+ /** Date and time at which the media was created. */
71317
+ created_at: string;
71318
+ };
71319
+ };
71320
+ maxDuration: undefined;
71321
+ };
71279
71322
  '/noise_sensors/list': {
71280
71323
  route: '/noise_sensors/list';
71281
71324
  method: 'GET' | 'POST';
@@ -88008,8 +88051,8 @@ export type Routes = {
88008
88051
  image_url?: string | undefined;
88009
88052
  /** URL to a short video clip captured at the time of activation. */
88010
88053
  video_url?: string | undefined;
88011
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
88012
- media_status?: ('pending' | 'available' | 'unavailable' | 'failed') | undefined;
88054
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
88055
+ media_ids?: string[] | undefined;
88013
88056
  } | {
88014
88057
  /** ID of the event. */
88015
88058
  event_id: string;
@@ -88040,6 +88083,8 @@ export type Routes = {
88040
88083
  image_url?: string | undefined;
88041
88084
  /** URL to a short video clip captured at the time the doorbell was pressed. */
88042
88085
  video_url?: string | undefined;
88086
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
88087
+ media_ids?: string[] | undefined;
88043
88088
  } | {
88044
88089
  /** ID of the event. */
88045
88090
  event_id: string;
@@ -93661,8 +93706,8 @@ export type Routes = {
93661
93706
  image_url?: string | undefined;
93662
93707
  /** URL to a short video clip captured at the time of activation. */
93663
93708
  video_url?: string | undefined;
93664
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
93665
- media_status?: ('pending' | 'available' | 'unavailable' | 'failed') | undefined;
93709
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
93710
+ media_ids?: string[] | undefined;
93666
93711
  } | {
93667
93712
  /** ID of the event. */
93668
93713
  event_id: string;
@@ -93693,6 +93738,8 @@ export type Routes = {
93693
93738
  image_url?: string | undefined;
93694
93739
  /** URL to a short video clip captured at the time the doorbell was pressed. */
93695
93740
  video_url?: string | undefined;
93741
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
93742
+ media_ids?: string[] | undefined;
93696
93743
  } | {
93697
93744
  /** ID of the event. */
93698
93745
  event_id: string;
@@ -134320,8 +134367,8 @@ export type Routes = {
134320
134367
  image_url?: string | undefined;
134321
134368
  /** URL to a short video clip captured at the time of activation. */
134322
134369
  video_url?: string | undefined;
134323
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
134324
- media_status?: ('pending' | 'available' | 'unavailable' | 'failed') | undefined;
134370
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
134371
+ media_ids?: string[] | undefined;
134325
134372
  } | {
134326
134373
  /** ID of the event. */
134327
134374
  event_id: string;
@@ -134352,6 +134399,8 @@ export type Routes = {
134352
134399
  image_url?: string | undefined;
134353
134400
  /** URL to a short video clip captured at the time the doorbell was pressed. */
134354
134401
  video_url?: string | undefined;
134402
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
134403
+ media_ids?: string[] | undefined;
134355
134404
  } | {
134356
134405
  /** ID of the event. */
134357
134406
  event_id: string;
@@ -1 +1 @@
1
- export { access_code, acs_access_group, acs_credential, acs_encoder, acs_entrance, acs_system, acs_user, action_attempt, batch, bridge, bridge_client_session, camera_live_view_answer, camera_live_view_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, customer_portal, customization_profile, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, staff_member_resource, 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, camera_live_view_answer, camera_live_view_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, customer_portal, customization_profile, device, device_provider, instant_key, magic_link, media, noise_threshold, pagination, seam_event, staff_member_resource, 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, batch, bridge, bridge_client_session, camera_live_view_answer, camera_live_view_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, customer_portal, customization_profile, device, device_provider, instant_key, magic_link, noise_threshold, pagination, seam_event, staff_member_resource, 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, camera_live_view_answer, camera_live_view_session, client_session, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, connect_webview, connected_account, custom_metadata, customer_portal, customization_profile, device, device_provider, instant_key, magic_link, media, noise_threshold, pagination, seam_event, staff_member_resource, 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,KAAK,EACL,MAAM,EACN,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,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,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,EACd,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,EAC/B,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,EACV,KAAK,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,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.1085.0",
3
+ "version": "1.1086.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -63,6 +63,7 @@ export {
63
63
  magic_link,
64
64
  access_code as managed_access_code,
65
65
  device as managed_device,
66
+ media,
66
67
  message_overrides,
67
68
  neutral_resource,
68
69
  noise_sensor_device_type,
@@ -29,6 +29,7 @@ export type {
29
29
  DeviceWarning,
30
30
  InstantKey,
31
31
  MagicLink,
32
+ Media,
32
33
  NoiseThreshold,
33
34
  Pagination,
34
35
  SeamEvent,
@@ -852,11 +852,11 @@ export const camera_activated_event = device_event.extend({
852
852
  .url()
853
853
  .optional()
854
854
  .describe('URL to a short video clip captured at the time of activation.'),
855
- media_status: z
856
- .enum(['pending', 'available', 'unavailable', 'failed'])
855
+ media_ids: z
856
+ .array(z.string().uuid())
857
857
  .optional()
858
858
  .describe(
859
- 'Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed.',
859
+ 'IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one.',
860
860
  ),
861
861
  }).describe(`
862
862
  ---
@@ -883,6 +883,12 @@ export const device_doorbell_rang_event = device_event.extend({
883
883
  .describe(
884
884
  'URL to a short video clip captured at the time the doorbell was pressed.',
885
885
  ),
886
+ media_ids: z
887
+ .array(z.string().uuid())
888
+ .optional()
889
+ .describe(
890
+ 'IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one.',
891
+ ),
886
892
  }).describe(`
887
893
  ---
888
894
  route_path: /devices
@@ -20,6 +20,7 @@ export * from './datetime.js'
20
20
  export * from './devices/index.js'
21
21
  export * from './events/index.js'
22
22
  export * from './instant-keys/index.js'
23
+ export * from './media/index.js'
23
24
  export * from './noise-sensors/index.js'
24
25
  export * from './pagination.js'
25
26
  export * from './partner/index.js'
@@ -0,0 +1 @@
1
+ export * from './media.js'
@@ -0,0 +1,55 @@
1
+ import * as z from 'zod/v3'
2
+
3
+ import { datetime } from '../datetime.js'
4
+
5
+ export const media = z.object({
6
+ media_id: z.string().uuid().describe('ID of the media.'),
7
+ workspace_id: z
8
+ .string()
9
+ .uuid()
10
+ .describe('ID of the workspace that contains the media.'),
11
+ device_id: z
12
+ .string()
13
+ .uuid()
14
+ .nullable()
15
+ .describe('ID of the device that captured the media.'),
16
+ event_id: z
17
+ .string()
18
+ .uuid()
19
+ .nullable()
20
+ .describe('ID of the event that the media belongs to.'),
21
+ media_type: z
22
+ .enum(['video', 'image'])
23
+ .describe('Type of the media: a video clip or a still image.'),
24
+ content_type: z
25
+ .string()
26
+ .nullable()
27
+ .describe('MIME type of the media, such as `video/mp4` or `image/jpeg`.'),
28
+ status: z
29
+ .enum(['pending', 'available', 'unavailable', 'failed'])
30
+ .describe(
31
+ 'Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it.',
32
+ ),
33
+ url: z
34
+ .string()
35
+ .url()
36
+ .nullable()
37
+ .describe(
38
+ 'Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL.',
39
+ ),
40
+ expires_at: datetime
41
+ .nullable()
42
+ .describe(
43
+ 'Date and time at which the media stops being available. Null when Seam does not know when the media expires.',
44
+ ),
45
+ created_at: datetime.describe(
46
+ 'Date and time at which the media was created.',
47
+ ),
48
+ }).describe(`
49
+ ---
50
+ route_path: /media
51
+ ---
52
+ Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta.
53
+ `)
54
+
55
+ export type Media = z.infer<typeof media>
@@ -29172,11 +29172,11 @@ const openapi: OpenAPISpec = {
29172
29172
  format: 'uri',
29173
29173
  type: 'string',
29174
29174
  },
29175
- media_status: {
29175
+ media_ids: {
29176
29176
  description:
29177
- 'Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed.',
29178
- enum: ['pending', 'available', 'unavailable', 'failed'],
29179
- type: 'string',
29177
+ 'IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one.',
29178
+ items: { format: 'uuid', type: 'string' },
29179
+ type: 'array',
29180
29180
  },
29181
29181
  motion_sub_type: {
29182
29182
  description: 'Sub-type of motion detected, if available.',
@@ -29270,6 +29270,12 @@ const openapi: OpenAPISpec = {
29270
29270
  format: 'uri',
29271
29271
  type: 'string',
29272
29272
  },
29273
+ media_ids: {
29274
+ description:
29275
+ 'IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one.',
29276
+ items: { format: 'uuid', type: 'string' },
29277
+ type: 'array',
29278
+ },
29273
29279
  occurred_at: {
29274
29280
  description: 'Date and time at which the event occurred.',
29275
29281
  format: 'date-time',
@@ -29732,6 +29738,84 @@ const openapi: OpenAPISpec = {
29732
29738
  'x-route-path': '/unstable_partner/building_blocks',
29733
29739
  'x-undocumented': 'Unreleased.',
29734
29740
  },
29741
+ media: {
29742
+ description:
29743
+ 'Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta.',
29744
+ properties: {
29745
+ content_type: {
29746
+ description:
29747
+ 'MIME type of the media, such as `video/mp4` or `image/jpeg`.',
29748
+ nullable: true,
29749
+ type: 'string',
29750
+ },
29751
+ created_at: {
29752
+ description: 'Date and time at which the media was created.',
29753
+ format: 'date-time',
29754
+ type: 'string',
29755
+ },
29756
+ device_id: {
29757
+ description: 'ID of the device that captured the media.',
29758
+ format: 'uuid',
29759
+ nullable: true,
29760
+ type: 'string',
29761
+ },
29762
+ event_id: {
29763
+ description: 'ID of the event that the media belongs to.',
29764
+ format: 'uuid',
29765
+ nullable: true,
29766
+ type: 'string',
29767
+ },
29768
+ expires_at: {
29769
+ description:
29770
+ 'Date and time at which the media stops being available. Null when Seam does not know when the media expires.',
29771
+ format: 'date-time',
29772
+ nullable: true,
29773
+ type: 'string',
29774
+ },
29775
+ media_id: {
29776
+ description: 'ID of the media.',
29777
+ format: 'uuid',
29778
+ type: 'string',
29779
+ },
29780
+ media_type: {
29781
+ description: 'Type of the media: a video clip or a still image.',
29782
+ enum: ['video', 'image'],
29783
+ type: 'string',
29784
+ },
29785
+ status: {
29786
+ description:
29787
+ 'Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it.',
29788
+ enum: ['pending', 'available', 'unavailable', 'failed'],
29789
+ type: 'string',
29790
+ },
29791
+ url: {
29792
+ description:
29793
+ 'Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL.',
29794
+ format: 'uri',
29795
+ nullable: true,
29796
+ type: 'string',
29797
+ },
29798
+ workspace_id: {
29799
+ description: 'ID of the workspace that contains the media.',
29800
+ format: 'uuid',
29801
+ type: 'string',
29802
+ },
29803
+ },
29804
+ required: [
29805
+ 'media_id',
29806
+ 'workspace_id',
29807
+ 'device_id',
29808
+ 'event_id',
29809
+ 'media_type',
29810
+ 'content_type',
29811
+ 'status',
29812
+ 'url',
29813
+ 'expires_at',
29814
+ 'created_at',
29815
+ ],
29816
+ type: 'object',
29817
+ 'x-route-path': '/media',
29818
+ },
29735
29819
  noise_threshold: {
29736
29820
  description:
29737
29821
  'Represents a [noise threshold](https://www.seam.co/docs/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://www.seam.co/docs/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them.',
@@ -55215,6 +55299,72 @@ const openapi: OpenAPISpec = {
55215
55299
  'x-title': 'Unlock a Lock',
55216
55300
  },
55217
55301
  },
55302
+ '/media/get': {
55303
+ get: {
55304
+ description:
55305
+ 'Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta.',
55306
+ operationId: 'mediaGetGet',
55307
+ parameters: [
55308
+ {
55309
+ in: 'query',
55310
+ name: 'media_id',
55311
+ required: true,
55312
+ schema: {
55313
+ description: 'ID of the media that you want to get.',
55314
+ format: 'uuid',
55315
+ type: 'string',
55316
+ },
55317
+ },
55318
+ {
55319
+ in: 'query',
55320
+ name: 'format',
55321
+ required: false,
55322
+ schema: {
55323
+ default: 'json',
55324
+ description:
55325
+ "Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video.",
55326
+ enum: ['json', 'redirect'],
55327
+ type: 'string',
55328
+ },
55329
+ },
55330
+ ],
55331
+ responses: {
55332
+ '200': {
55333
+ content: {
55334
+ 'application/json': {
55335
+ schema: {
55336
+ properties: {
55337
+ media: { $ref: '#/components/schemas/media' },
55338
+ ok: { type: 'boolean' },
55339
+ },
55340
+ required: ['media', 'ok'],
55341
+ type: 'object',
55342
+ },
55343
+ },
55344
+ },
55345
+ description: 'OK',
55346
+ },
55347
+ '400': { description: 'Bad Request' },
55348
+ '401': { description: 'Unauthorized' },
55349
+ },
55350
+ security: [
55351
+ { api_key: [] },
55352
+ { pat_with_workspace: [] },
55353
+ { console_session_with_workspace: [] },
55354
+ { client_session: [] },
55355
+ { client_session_with_customer: [] },
55356
+ { client_session_with_customer_ro: [] },
55357
+ { support_read_only_token: [] },
55358
+ ],
55359
+ summary: '/media/get',
55360
+ tags: [],
55361
+ 'x-fern-sdk-group-name': ['media'],
55362
+ 'x-fern-sdk-method-name': 'get',
55363
+ 'x-fern-sdk-return-value': 'media',
55364
+ 'x-response-key': 'media',
55365
+ 'x-title': 'Get Media',
55366
+ },
55367
+ },
55218
55368
  '/noise_sensors/list': {
55219
55369
  get: {
55220
55370
  description:
@@ -62748,10 +62748,8 @@ export type Routes = {
62748
62748
  image_url?: string | undefined
62749
62749
  /** URL to a short video clip captured at the time of activation. */
62750
62750
  video_url?: string | undefined
62751
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
62752
- media_status?:
62753
- | ('pending' | 'available' | 'unavailable' | 'failed')
62754
- | undefined
62751
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
62752
+ media_ids?: string[] | undefined
62755
62753
  }
62756
62754
  | {
62757
62755
  /** ID of the event. */
@@ -62787,6 +62785,8 @@ export type Routes = {
62787
62785
  image_url?: string | undefined
62788
62786
  /** URL to a short video clip captured at the time the doorbell was pressed. */
62789
62787
  video_url?: string | undefined
62788
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
62789
+ media_ids?: string[] | undefined
62790
62790
  }
62791
62791
  | {
62792
62792
  /** ID of the event. */
@@ -67045,9 +67045,8 @@ export type Routes = {
67045
67045
  image_url?: string | undefined
67046
67046
  /** URL to a short video clip captured at the time of activation. */
67047
67047
  video_url?: string | undefined
67048
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
67049
- media_status?:
67050
- ('pending' | 'available' | 'unavailable' | 'failed') | undefined
67048
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
67049
+ media_ids?: string[] | undefined
67051
67050
  }
67052
67051
  | {
67053
67052
  /** ID of the event. */
@@ -67083,6 +67082,8 @@ export type Routes = {
67083
67082
  image_url?: string | undefined
67084
67083
  /** URL to a short video clip captured at the time the doorbell was pressed. */
67085
67084
  video_url?: string | undefined
67085
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
67086
+ media_ids?: string[] | undefined
67086
67087
  }
67087
67088
  | {
67088
67089
  /** ID of the event. */
@@ -85914,6 +85915,45 @@ export type Routes = {
85914
85915
  }
85915
85916
  maxDuration: undefined
85916
85917
  }
85918
+ '/media/get': {
85919
+ route: '/media/get'
85920
+ method: 'GET' | 'POST'
85921
+ queryParams: {}
85922
+ jsonBody: {}
85923
+ commonParams: {
85924
+ /** ID of the media that you want to get. */
85925
+ media_id: string
85926
+ /** Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video. */
85927
+ format?: 'json' | 'redirect'
85928
+ }
85929
+ formData: {}
85930
+ jsonResponse: {
85931
+ /** Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta. */
85932
+ media: {
85933
+ /** ID of the media. */
85934
+ media_id: string
85935
+ /** ID of the workspace that contains the media. */
85936
+ workspace_id: string
85937
+ /** ID of the device that captured the media. */
85938
+ device_id: string | null
85939
+ /** ID of the event that the media belongs to. */
85940
+ event_id: string | null
85941
+ /** Type of the media: a video clip or a still image. */
85942
+ media_type: 'video' | 'image'
85943
+ /** MIME type of the media, such as `video/mp4` or `image/jpeg`. */
85944
+ content_type: string | null
85945
+ /** Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it. */
85946
+ status: 'pending' | 'available' | 'unavailable' | 'failed'
85947
+ /** Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL. */
85948
+ url: string | null
85949
+ /** Date and time at which the media stops being available. Null when Seam does not know when the media expires. */
85950
+ expires_at: string | null
85951
+ /** Date and time at which the media was created. */
85952
+ created_at: string
85953
+ }
85954
+ }
85955
+ maxDuration: undefined
85956
+ }
85917
85957
  '/noise_sensors/list': {
85918
85958
  route: '/noise_sensors/list'
85919
85959
  method: 'GET' | 'POST'
@@ -105585,9 +105625,8 @@ export type Routes = {
105585
105625
  image_url?: string | undefined
105586
105626
  /** URL to a short video clip captured at the time of activation. */
105587
105627
  video_url?: string | undefined
105588
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
105589
- media_status?:
105590
- ('pending' | 'available' | 'unavailable' | 'failed') | undefined
105628
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
105629
+ media_ids?: string[] | undefined
105591
105630
  }
105592
105631
  | {
105593
105632
  /** ID of the event. */
@@ -105623,6 +105662,8 @@ export type Routes = {
105623
105662
  image_url?: string | undefined
105624
105663
  /** URL to a short video clip captured at the time the doorbell was pressed. */
105625
105664
  video_url?: string | undefined
105665
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
105666
+ media_ids?: string[] | undefined
105626
105667
  }
105627
105668
  | {
105628
105669
  /** ID of the event. */
@@ -112226,9 +112267,8 @@ export type Routes = {
112226
112267
  image_url?: string | undefined
112227
112268
  /** URL to a short video clip captured at the time of activation. */
112228
112269
  video_url?: string | undefined
112229
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
112230
- media_status?:
112231
- ('pending' | 'available' | 'unavailable' | 'failed') | undefined
112270
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
112271
+ media_ids?: string[] | undefined
112232
112272
  }
112233
112273
  | {
112234
112274
  /** ID of the event. */
@@ -112264,6 +112304,8 @@ export type Routes = {
112264
112304
  image_url?: string | undefined
112265
112305
  /** URL to a short video clip captured at the time the doorbell was pressed. */
112266
112306
  video_url?: string | undefined
112307
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
112308
+ media_ids?: string[] | undefined
112267
112309
  }
112268
112310
  | {
112269
112311
  /** ID of the event. */
@@ -160555,10 +160597,8 @@ export type Routes = {
160555
160597
  image_url?: string | undefined
160556
160598
  /** URL to a short video clip captured at the time of activation. */
160557
160599
  video_url?: string | undefined
160558
- /** Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed. */
160559
- media_status?:
160560
- | ('pending' | 'available' | 'unavailable' | 'failed')
160561
- | undefined
160600
+ /** IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one. */
160601
+ media_ids?: string[] | undefined
160562
160602
  }
160563
160603
  | {
160564
160604
  /** ID of the event. */
@@ -160594,6 +160634,8 @@ export type Routes = {
160594
160634
  image_url?: string | undefined
160595
160635
  /** URL to a short video clip captured at the time the doorbell was pressed. */
160596
160636
  video_url?: string | undefined
160637
+ /** IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one. */
160638
+ media_ids?: string[] | undefined
160597
160639
  }
160598
160640
  | {
160599
160641
  /** ID of the event. */
@@ -25,6 +25,7 @@ export {
25
25
  device_provider,
26
26
  instant_key,
27
27
  magic_link,
28
+ media,
28
29
  noise_threshold,
29
30
  pagination,
30
31
  seam_event,