@seamapi/types 1.406.7 → 1.406.9

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 (33) hide show
  1. package/dist/connect.cjs +597 -79
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +695 -16
  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/models/acs/acs-access-group.d.ts +6 -0
  8. package/lib/seam/connect/models/acs/acs-access-group.js +5 -1
  9. package/lib/seam/connect/models/acs/acs-access-group.js.map +1 -1
  10. package/lib/seam/connect/models/acs/acs-encoder.d.ts +3 -0
  11. package/lib/seam/connect/models/acs/acs-encoder.js +4 -0
  12. package/lib/seam/connect/models/acs/acs-encoder.js.map +1 -1
  13. package/lib/seam/connect/models/noise-sensors/noise-threshold.js +23 -7
  14. package/lib/seam/connect/models/noise-sensors/noise-threshold.js.map +1 -1
  15. package/lib/seam/connect/models/partner/magic-link.d.ts +5 -6
  16. package/lib/seam/connect/models/partner/magic-link.js +6 -2
  17. package/lib/seam/connect/models/partner/magic-link.js.map +1 -1
  18. package/lib/seam/connect/models/partner/resources.d.ts +16 -0
  19. package/lib/seam/connect/models/partner/resources.js +11 -0
  20. package/lib/seam/connect/models/partner/resources.js.map +1 -1
  21. package/lib/seam/connect/openapi.d.ts +521 -8
  22. package/lib/seam/connect/openapi.js +566 -61
  23. package/lib/seam/connect/openapi.js.map +1 -1
  24. package/lib/seam/connect/route-types.d.ts +165 -8
  25. package/package.json +1 -1
  26. package/src/lib/seam/connect/internal/schemas.ts +2 -0
  27. package/src/lib/seam/connect/models/acs/acs-access-group.ts +7 -1
  28. package/src/lib/seam/connect/models/acs/acs-encoder.ts +6 -0
  29. package/src/lib/seam/connect/models/noise-sensors/noise-threshold.ts +29 -7
  30. package/src/lib/seam/connect/models/partner/magic-link.ts +9 -2
  31. package/src/lib/seam/connect/models/partner/resources.ts +13 -0
  32. package/src/lib/seam/connect/openapi.ts +622 -61
  33. package/src/lib/seam/connect/route-types.ts +180 -8
@@ -3725,6 +3725,7 @@ export interface Routes {
3725
3725
  queryParams: {};
3726
3726
  jsonBody: {};
3727
3727
  commonParams: {
3728
+ customer_ids?: string[] | undefined;
3728
3729
  /** ID of the device for which you want to list access codes. Specify either `device_id` or `access_code_ids`. */
3729
3730
  device_id?: string | undefined;
3730
3731
  /** IDs of the access codes that you want to retrieve. Specify either `device_id` or `access_code_ids`. */
@@ -8905,6 +8906,8 @@ export interface Routes {
8905
8906
  acs_system_id: string;
8906
8907
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group. */
8907
8908
  workspace_id: string;
8909
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group. */
8910
+ connected_account_id: string;
8908
8911
  /** Name of the access group. */
8909
8912
  name: string;
8910
8913
  /**
@@ -8955,6 +8958,8 @@ export interface Routes {
8955
8958
  acs_system_id: string;
8956
8959
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group. */
8957
8960
  workspace_id: string;
8961
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group. */
8962
+ connected_account_id: string;
8958
8963
  /** Name of the access group. */
8959
8964
  name: string;
8960
8965
  /**
@@ -9292,6 +9297,8 @@ export interface Routes {
9292
9297
  acs_system_id: string;
9293
9298
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group. */
9294
9299
  workspace_id: string;
9300
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group. */
9301
+ connected_account_id: string;
9295
9302
  /** Name of the access group. */
9296
9303
  name: string;
9297
9304
  /**
@@ -9340,6 +9347,8 @@ export interface Routes {
9340
9347
  acs_system_id: string;
9341
9348
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group. */
9342
9349
  workspace_id: string;
9350
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group. */
9351
+ connected_account_id: string;
9343
9352
  /** Name of the access group. */
9344
9353
  name: string;
9345
9354
  /**
@@ -13032,6 +13041,8 @@ export interface Routes {
13032
13041
  acs_encoder_id: string;
13033
13042
  /** ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13034
13043
  acs_system_id: string;
13044
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13045
+ connected_account_id: string;
13035
13046
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13036
13047
  workspace_id: string;
13037
13048
  /** Errors associated with the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
@@ -13078,6 +13089,8 @@ export interface Routes {
13078
13089
  acs_encoder_id: string;
13079
13090
  /** ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13080
13091
  acs_system_id: string;
13092
+ /** ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13093
+ connected_account_id: string;
13081
13094
  /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
13082
13095
  workspace_id: string;
13083
13096
  /** Errors associated with the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners). */
@@ -34848,11 +34861,11 @@ export interface Routes {
34848
34861
  connected_account_ids?: string[] | undefined;
34849
34862
  /** ID of the Connect Webview for which you want to list devices. */
34850
34863
  connect_webview_id?: string | undefined;
34851
- /** Device type by which to filter devices. */
34864
+ /** Device type of the noise sensors that you want to list. */
34852
34865
  device_type?: ('noiseaware_activity_zone' | 'minut_sensor') | undefined;
34853
- /** Array of device types by which to filter devices. */
34866
+ /** Device types of the noise sensors that you want to list. */
34854
34867
  device_types?: Array<'noiseaware_activity_zone' | 'minut_sensor'> | undefined;
34855
- /** Manufacturer by which to filter devices. */
34868
+ /** Manufacturers of the noise sensors that you want to list. */
34856
34869
  manufacturer?: ('minut' | 'noiseaware') | undefined;
34857
34870
  /** Array of device IDs for which you want to list devices. */
34858
34871
  device_ids?: string[] | undefined;
@@ -37288,12 +37301,19 @@ export interface Routes {
37288
37301
  method: 'POST';
37289
37302
  queryParams: {};
37290
37303
  jsonBody: {
37304
+ /** ID of the device for which you want to create a noise threshold. */
37291
37305
  device_id: string;
37306
+ /** */
37292
37307
  sync?: boolean;
37308
+ /** Name of the new noise threshold. */
37293
37309
  name?: string | undefined;
37310
+ /** Time at which the new noise threshold should become active daily. */
37294
37311
  starts_daily_at: string;
37312
+ /** Time at which the new noise threshold should become inactive daily. */
37295
37313
  ends_daily_at: string;
37314
+ /** Noise level in decibels for the new noise threshold. */
37296
37315
  noise_threshold_decibels?: number | undefined;
37316
+ /** Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors). */
37297
37317
  noise_threshold_nrs?: number | undefined;
37298
37318
  };
37299
37319
  commonParams: {};
@@ -38402,14 +38422,21 @@ export interface Routes {
38402
38422
  message: string;
38403
38423
  };
38404
38424
  };
38405
- /** */
38425
+ /** Represents a [noise threshold](https://docs.seam.co/latest/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/latest/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. */
38406
38426
  noise_threshold: {
38427
+ /** Unique identifier for the noise threshold. */
38407
38428
  noise_threshold_id: string;
38429
+ /** Unique identifier for the device that contains the noise threshold. */
38408
38430
  device_id: string;
38431
+ /** Name of the noise threshold. */
38409
38432
  name: string;
38433
+ /** Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors). */
38410
38434
  noise_threshold_nrs?: number | undefined;
38435
+ /** Time at which the noise threshold should become active daily. */
38411
38436
  starts_daily_at: string;
38437
+ /** Time at which the noise threshold should become inactive daily. */
38412
38438
  ends_daily_at: string;
38439
+ /** Noise level in decibels for the noise threshold. */
38413
38440
  noise_threshold_decibels: number;
38414
38441
  };
38415
38442
  };
@@ -38419,8 +38446,11 @@ export interface Routes {
38419
38446
  method: 'DELETE' | 'POST';
38420
38447
  queryParams: {};
38421
38448
  jsonBody: {
38449
+ /** ID of the noise threshold that you want to delete. */
38422
38450
  noise_threshold_id: string;
38451
+ /** ID of the device that contains the noise threshold that you want to delete. */
38423
38452
  device_id: string;
38453
+ /** */
38424
38454
  sync?: boolean;
38425
38455
  };
38426
38456
  commonParams: {};
@@ -39537,18 +39567,26 @@ export interface Routes {
39537
39567
  queryParams: {};
39538
39568
  jsonBody: {};
39539
39569
  commonParams: {
39570
+ /** ID of the noise threshold that you want to get. */
39540
39571
  noise_threshold_id: string;
39541
39572
  };
39542
39573
  formData: {};
39543
39574
  jsonResponse: {
39544
- /** */
39575
+ /** Represents a [noise threshold](https://docs.seam.co/latest/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/latest/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. */
39545
39576
  noise_threshold: {
39577
+ /** Unique identifier for the noise threshold. */
39546
39578
  noise_threshold_id: string;
39579
+ /** Unique identifier for the device that contains the noise threshold. */
39547
39580
  device_id: string;
39581
+ /** Name of the noise threshold. */
39548
39582
  name: string;
39583
+ /** Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors). */
39549
39584
  noise_threshold_nrs?: number | undefined;
39585
+ /** Time at which the noise threshold should become active daily. */
39550
39586
  starts_daily_at: string;
39587
+ /** Time at which the noise threshold should become inactive daily. */
39551
39588
  ends_daily_at: string;
39589
+ /** Noise level in decibels for the noise threshold. */
39552
39590
  noise_threshold_decibels: number;
39553
39591
  };
39554
39592
  };
@@ -39559,18 +39597,27 @@ export interface Routes {
39559
39597
  queryParams: {};
39560
39598
  jsonBody: {};
39561
39599
  commonParams: {
39600
+ /** ID of the device for which you want to list noise thresholds. */
39562
39601
  device_id: string;
39602
+ /** Enables you to limit the returned noise thresholds by whether they are programmed on the noise sensor. To list only noise thresholds that are programmed on the noise sensor, set this parameter to `true`. To list only noise thresholds that are not programmed on the noise sensor, se this parameter to `false`. */
39563
39603
  is_programmed?: boolean | undefined;
39564
39604
  };
39565
39605
  formData: {};
39566
39606
  jsonResponse: {
39567
39607
  noise_thresholds: Array<{
39608
+ /** Unique identifier for the noise threshold. */
39568
39609
  noise_threshold_id: string;
39610
+ /** Unique identifier for the device that contains the noise threshold. */
39569
39611
  device_id: string;
39612
+ /** Name of the noise threshold. */
39570
39613
  name: string;
39614
+ /** Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors). */
39571
39615
  noise_threshold_nrs?: number | undefined;
39616
+ /** Time at which the noise threshold should become active daily. */
39572
39617
  starts_daily_at: string;
39618
+ /** Time at which the noise threshold should become inactive daily. */
39573
39619
  ends_daily_at: string;
39620
+ /** Noise level in decibels for the noise threshold. */
39574
39621
  noise_threshold_decibels: number;
39575
39622
  }>;
39576
39623
  };
@@ -39580,13 +39627,21 @@ export interface Routes {
39580
39627
  method: 'PATCH' | 'POST' | 'PUT';
39581
39628
  queryParams: {};
39582
39629
  jsonBody: {
39630
+ /** ID of the noise threshold that you want to update. */
39583
39631
  noise_threshold_id: string;
39632
+ /** ID of the device that contains the noise threshold that you want to update. */
39584
39633
  device_id: string;
39634
+ /** */
39585
39635
  sync?: boolean;
39636
+ /** Name of the noise threshold that you want to update. */
39586
39637
  name?: string | undefined;
39638
+ /** Time at which the noise threshold should become active daily. */
39587
39639
  starts_daily_at?: string | undefined;
39640
+ /** Time at which the noise threshold should become inactive daily. */
39588
39641
  ends_daily_at?: string | undefined;
39642
+ /** Noise level in decibels for the noise threshold. */
39589
39643
  noise_threshold_decibels?: number | undefined;
39644
+ /** Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors). */
39590
39645
  noise_threshold_nrs?: number | undefined;
39591
39646
  };
39592
39647
  commonParams: {};
@@ -40702,6 +40757,7 @@ export interface Routes {
40702
40757
  method: 'POST';
40703
40758
  queryParams: {};
40704
40759
  jsonBody: {
40760
+ /** ID of the device for which you want to simulate the triggering of a noise threshold. */
40705
40761
  device_id: string;
40706
40762
  };
40707
40763
  commonParams: {};
@@ -41543,6 +41599,32 @@ export interface Routes {
41543
41599
  };
41544
41600
  };
41545
41601
  };
41602
+ '/seam/partner/v1/building_blocks/spaces/auto_map': {
41603
+ route: '/seam/partner/v1/building_blocks/spaces/auto_map';
41604
+ method: 'GET' | 'POST';
41605
+ queryParams: {};
41606
+ jsonBody: {};
41607
+ commonParams: {
41608
+ collection_key: string;
41609
+ };
41610
+ formData: {};
41611
+ jsonResponse: {
41612
+ spaces: Array<{
41613
+ name: string;
41614
+ partner_resource_key: string;
41615
+ devices: Array<{
41616
+ device_id: string;
41617
+ device_type: 'lock' | 'thermostat' | 'sensor';
41618
+ name: string;
41619
+ }>;
41620
+ acs_entrances: Array<{
41621
+ acs_entrance_id: string;
41622
+ name: string;
41623
+ }>;
41624
+ needs_review?: boolean | undefined;
41625
+ }>;
41626
+ };
41627
+ };
41546
41628
  '/seam/partner/v1/resources/list': {
41547
41629
  route: '/seam/partner/v1/resources/list';
41548
41630
  method: 'GET' | 'POST';
@@ -56207,22 +56289,97 @@ export interface Routes {
56207
56289
  };
56208
56290
  };
56209
56291
  };
56292
+ '/unstable_partner/building_blocks/connect_accounts': {
56293
+ route: '/unstable_partner/building_blocks/connect_accounts';
56294
+ method: 'POST';
56295
+ queryParams: {};
56296
+ jsonBody: {};
56297
+ commonParams: {
56298
+ customer_key: string;
56299
+ };
56300
+ formData: {};
56301
+ jsonResponse: {
56302
+ /** */
56303
+ magic_link: {
56304
+ url: string;
56305
+ building_block_type: 'connect_accounts' | 'manage_devices' | 'organize_spaces';
56306
+ customer_key: string;
56307
+ expires_at: string;
56308
+ workspace_id: string;
56309
+ created_at: string;
56310
+ };
56311
+ };
56312
+ };
56210
56313
  '/unstable_partner/building_blocks/generate_magic_link': {
56211
56314
  route: '/unstable_partner/building_blocks/generate_magic_link';
56212
56315
  method: 'POST' | 'GET';
56213
56316
  queryParams: {};
56214
56317
  jsonBody: {};
56215
56318
  commonParams: {
56216
- building_block_type: 'connect_account' | 'manage_devices';
56319
+ building_block_type: 'connect_accounts';
56217
56320
  customer_key: string;
56321
+ } | {
56322
+ building_block_type: 'manage_devices';
56323
+ customer_key: string;
56324
+ } | {
56325
+ building_block_type: 'organize_spaces';
56326
+ customer_key: string;
56327
+ collection_key: string;
56328
+ };
56329
+ formData: {};
56330
+ jsonResponse: {
56331
+ /** */
56332
+ magic_link: {
56333
+ url: string;
56334
+ building_block_type: 'connect_accounts' | 'manage_devices' | 'organize_spaces';
56335
+ customer_key: string;
56336
+ expires_at: string;
56337
+ workspace_id: string;
56338
+ created_at: string;
56339
+ };
56340
+ };
56341
+ };
56342
+ '/unstable_partner/building_blocks/manage_devices': {
56343
+ route: '/unstable_partner/building_blocks/manage_devices';
56344
+ method: 'POST';
56345
+ queryParams: {};
56346
+ jsonBody: {};
56347
+ commonParams: {
56348
+ customer_key: string;
56349
+ };
56350
+ formData: {};
56351
+ jsonResponse: {
56352
+ /** */
56353
+ magic_link: {
56354
+ url: string;
56355
+ building_block_type: 'connect_accounts' | 'manage_devices' | 'organize_spaces';
56356
+ customer_key: string;
56357
+ expires_at: string;
56358
+ workspace_id: string;
56359
+ created_at: string;
56360
+ };
56361
+ };
56362
+ };
56363
+ '/unstable_partner/building_blocks/organize_spaces': {
56364
+ route: '/unstable_partner/building_blocks/organize_spaces';
56365
+ method: 'POST';
56366
+ queryParams: {};
56367
+ jsonBody: {};
56368
+ commonParams: {
56369
+ customer_key: string;
56370
+ partner_resources: Array<{
56371
+ partner_resource_key: string;
56372
+ name: string;
56373
+ description?: string | undefined;
56374
+ custom_metadata?: Record<string, string> | undefined;
56375
+ }>;
56218
56376
  };
56219
56377
  formData: {};
56220
56378
  jsonResponse: {
56221
56379
  /** */
56222
56380
  magic_link: {
56223
56381
  url: string;
56224
- building_block_type: 'connect_account' | 'manage_devices';
56225
- customer_id: string;
56382
+ building_block_type: 'connect_accounts' | 'manage_devices' | 'organize_spaces';
56226
56383
  customer_key: string;
56227
56384
  expires_at: string;
56228
56385
  workspace_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.406.7",
3
+ "version": "1.406.9",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -21,6 +21,7 @@ export {
21
21
  bridge,
22
22
  bridge_client_session,
23
23
  bridge_connected_system,
24
+ building_block_type,
24
25
  capabilities,
25
26
  climate_preset,
26
27
  climate_setting,
@@ -55,6 +56,7 @@ export {
55
56
  thermostat_capability_properties,
56
57
  thermostat_device_type,
57
58
  thermostat_schedule,
59
+ typed_partner_resource,
58
60
  unmanaged_access_code,
59
61
  unmanaged_device,
60
62
  user_identity,
@@ -68,6 +68,12 @@ const common_acs_access_group = z.object({
68
68
  .describe(
69
69
  'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the access group.',
70
70
  ),
71
+ connected_account_id: z
72
+ .string()
73
+ .uuid()
74
+ .describe(
75
+ 'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the access group.',
76
+ ),
71
77
  name: z.string().describe('Name of the access group.'),
72
78
  access_group_type: acs_access_group_external_type.describe(`
73
79
  ---
@@ -104,7 +110,7 @@ export const acs_access_group = common_acs_access_group.extend({
104
110
  route_path: /acs/access_groups
105
111
  ---
106
112
  Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
107
-
113
+
108
114
  Some access control systems use [access group](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
109
115
 
110
116
  To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/latest/device-and-system-integration-guides/overview#access-control-systems).
@@ -46,6 +46,12 @@ export const acs_encoder = z.object({
46
46
  .describe(
47
47
  'ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners).',
48
48
  ),
49
+ connected_account_id: z
50
+ .string()
51
+ .uuid()
52
+ .describe(
53
+ 'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts) that contains the [encoder](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners).',
54
+ ),
49
55
  workspace_id: z
50
56
  .string()
51
57
  .uuid()
@@ -1,17 +1,39 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  export const noise_threshold = z.object({
4
- noise_threshold_id: z.string().uuid(),
5
- device_id: z.string().uuid(),
6
- name: z.string(),
7
- noise_threshold_nrs: z.number().optional(),
8
- starts_daily_at: z.string(), // TODO: zoned_time
9
- ends_daily_at: z.string(), // TODO: zoned_time
10
- noise_threshold_decibels: z.number(),
4
+ noise_threshold_id: z
5
+ .string()
6
+ .uuid()
7
+ .describe('Unique identifier for the noise threshold.'),
8
+ device_id: z
9
+ .string()
10
+ .uuid()
11
+ .describe(
12
+ 'Unique identifier for the device that contains the noise threshold.',
13
+ ),
14
+ name: z.string().describe('Name of the noise threshold.'),
15
+ noise_threshold_nrs: z
16
+ .number()
17
+ .optional()
18
+ .describe(
19
+ 'Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/latest/device-and-system-integration-guides/noiseaware-sensors).',
20
+ ),
21
+ starts_daily_at: z
22
+ .string()
23
+ .describe('Time at which the noise threshold should become active daily.'), // TODO: zoned_time
24
+ ends_daily_at: z
25
+ .string()
26
+ .describe(
27
+ 'Time at which the noise threshold should become inactive daily.',
28
+ ), // TODO: zoned_time
29
+ noise_threshold_decibels: z
30
+ .number()
31
+ .describe('Noise level in decibels for the noise threshold.'),
11
32
  }).describe(`
12
33
  ---
13
34
  route_path: /noise_sensors/noise_thresholds
14
35
  ---
36
+ Represents a [noise threshold](https://docs.seam.co/latest/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/latest/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.
15
37
  `)
16
38
 
17
39
  export type NoiseThreshold = z.infer<typeof noise_threshold>
@@ -1,9 +1,16 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ export const building_block_type = z.enum([
4
+ 'connect_accounts',
5
+ 'manage_devices',
6
+ 'organize_spaces',
7
+ ])
8
+
9
+ export type BuildingBlockType = z.infer<typeof building_block_type>
10
+
3
11
  export const magic_link = z.object({
4
12
  url: z.string().url(),
5
- building_block_type: z.enum(['connect_account', 'manage_devices']),
6
- customer_id: z.string().uuid(),
13
+ building_block_type,
7
14
  customer_key: z.string(),
8
15
  expires_at: z.string().datetime(),
9
16
  workspace_id: z.string().uuid(),
@@ -27,3 +27,16 @@ export const partner_resource = z.object({
27
27
  `)
28
28
 
29
29
  export type PartnerResource = z.infer<typeof partner_resource>
30
+
31
+ export const typed_partner_resource = z.object({
32
+ partner_resource_key: z.string(),
33
+
34
+ name: z.string(),
35
+ description: z.string().optional(),
36
+ custom_metadata: z.record(z.string(), z.string()).optional(),
37
+ }).describe(`
38
+ ---
39
+ undocumented: Unreleased.
40
+ route_path: /unstable_partner/resources
41
+ ---
42
+ `)