@seamapi/types 1.249.0 → 1.252.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 (34) hide show
  1. package/dist/connect.cjs +254 -51
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +1219 -12
  4. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +93 -0
  5. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  6. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  7. package/lib/seam/connect/models/action-attempts/read-card.d.ts +96 -0
  8. package/lib/seam/connect/models/action-attempts/read-card.js +36 -0
  9. package/lib/seam/connect/models/action-attempts/read-card.js.map +1 -0
  10. package/lib/seam/connect/models/events/acs/common.d.ts +3 -3
  11. package/lib/seam/connect/models/events/acs/common.js +2 -1
  12. package/lib/seam/connect/models/events/acs/common.js.map +1 -1
  13. package/lib/seam/connect/models/events/acs/credentials.d.ts +6 -6
  14. package/lib/seam/connect/models/events/acs/index.d.ts +35 -9
  15. package/lib/seam/connect/models/events/acs/systems.d.ts +60 -6
  16. package/lib/seam/connect/models/events/acs/systems.js +9 -1
  17. package/lib/seam/connect/models/events/acs/systems.js.map +1 -1
  18. package/lib/seam/connect/models/events/acs/users.d.ts +6 -6
  19. package/lib/seam/connect/models/events/devices.d.ts +86 -0
  20. package/lib/seam/connect/models/events/devices.js +21 -0
  21. package/lib/seam/connect/models/events/devices.js.map +1 -1
  22. package/lib/seam/connect/models/events/seam-event.d.ts +35 -9
  23. package/lib/seam/connect/openapi.d.ts +138 -1
  24. package/lib/seam/connect/openapi.js +156 -0
  25. package/lib/seam/connect/openapi.js.map +1 -1
  26. package/lib/seam/connect/route-types.d.ts +1104 -153
  27. package/package.json +1 -1
  28. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  29. package/src/lib/seam/connect/models/action-attempts/read-card.ts +46 -0
  30. package/src/lib/seam/connect/models/events/acs/common.ts +2 -1
  31. package/src/lib/seam/connect/models/events/acs/systems.ts +12 -1
  32. package/src/lib/seam/connect/models/events/devices.ts +33 -0
  33. package/src/lib/seam/connect/openapi.ts +158 -0
  34. package/src/lib/seam/connect/route-types.ts +1115 -55
package/dist/connect.cjs CHANGED
@@ -1649,132 +1649,154 @@ var lock_door_action_attempt = zod.z.discriminatedUnion("status", [
1649
1649
  }).describe("Locking door succeeded."),
1650
1650
  common_failed_action_attempt.extend({ action_type: action_type2, error: error3 }).describe("Locking door failed.")
1651
1651
  ]);
1652
- var action_type3 = zod.z.literal("RESET_SANDBOX_WORKSPACE");
1652
+ var action_type3 = zod.z.literal("READ_CARD");
1653
1653
  var error4 = zod.z.object({
1654
1654
  type: zod.z.string(),
1655
+ // TODO This should be typed properly with the possible errors
1655
1656
  message: zod.z.string()
1656
1657
  });
1657
- var result4 = zod.z.object({});
1658
+ var result4 = zod.z.object({
1659
+ acs_credential_id: zod.z.string().uuid().nullable().describe("Matching acs_credential currently encoded on this card."),
1660
+ card_number: zod.z.string().nullable().describe("A number or sting that physically identifies this card.")
1661
+ // TODO visionline_metadata: visionline_credential_metadata,
1662
+ });
1663
+ var read_card_action_attempt = zod.z.discriminatedUnion("status", [
1664
+ common_pending_action_attempt.extend({
1665
+ action_type: action_type3
1666
+ }).describe("Reading card data from physical encoder."),
1667
+ common_succeeded_action_attempt.extend({
1668
+ action_type: action_type3,
1669
+ result: result4
1670
+ }).describe("Reading card data from physical encoder succeeded."),
1671
+ common_failed_action_attempt.extend({ action_type: action_type3, error: error4 }).describe("Reading card data from physical encoder failed.")
1672
+ ]);
1673
+ var action_type4 = zod.z.literal("RESET_SANDBOX_WORKSPACE");
1674
+ var error5 = zod.z.object({
1675
+ type: zod.z.string(),
1676
+ message: zod.z.string()
1677
+ });
1678
+ var result5 = zod.z.object({});
1658
1679
  var reset_sandbox_workspace_action_attempt = zod.z.discriminatedUnion(
1659
1680
  "status",
1660
1681
  [
1661
1682
  common_pending_action_attempt.extend({
1662
- action_type: action_type3
1683
+ action_type: action_type4
1663
1684
  }).describe("Resetting sandbox workspace."),
1664
1685
  common_succeeded_action_attempt.extend({
1665
- action_type: action_type3,
1666
- result: result4
1686
+ action_type: action_type4,
1687
+ result: result5
1667
1688
  }).describe("Resetting sandbox workspace succeeded."),
1668
1689
  common_failed_action_attempt.extend({
1669
- action_type: action_type3,
1670
- error: error4
1690
+ action_type: action_type4,
1691
+ error: error5
1671
1692
  }).describe("Resetting sandbox workspace failed.")
1672
1693
  ]
1673
1694
  );
1674
- var action_type4 = zod.z.literal("SET_COOL");
1675
- var error5 = zod.z.object({
1695
+ var action_type5 = zod.z.literal("SET_COOL");
1696
+ var error6 = zod.z.object({
1676
1697
  type: zod.z.string(),
1677
1698
  message: zod.z.string()
1678
1699
  });
1679
- var result5 = zod.z.object({});
1700
+ var result6 = zod.z.object({});
1680
1701
  var set_cool_action_attempt = zod.z.discriminatedUnion("status", [
1681
1702
  common_pending_action_attempt.extend({
1682
- action_type: action_type4
1703
+ action_type: action_type5
1683
1704
  }).describe("Setting HVAC to cool."),
1684
1705
  common_succeeded_action_attempt.extend({
1685
- action_type: action_type4,
1686
- result: result5
1706
+ action_type: action_type5,
1707
+ result: result6
1687
1708
  }).describe("Setting HVAC to cool succeeded."),
1688
- common_failed_action_attempt.extend({ action_type: action_type4, error: error5 }).describe("Setting HVAC to cool failed.")
1709
+ common_failed_action_attempt.extend({ action_type: action_type5, error: error6 }).describe("Setting HVAC to cool failed.")
1689
1710
  ]);
1690
- var action_type5 = zod.z.literal("SET_FAN_MODE");
1691
- var error6 = zod.z.object({
1711
+ var action_type6 = zod.z.literal("SET_FAN_MODE");
1712
+ var error7 = zod.z.object({
1692
1713
  type: zod.z.string(),
1693
1714
  message: zod.z.string()
1694
1715
  });
1695
- var result6 = zod.z.object({});
1716
+ var result7 = zod.z.object({});
1696
1717
  var set_fan_mode_action_attempt = zod.z.discriminatedUnion("status", [
1697
1718
  common_pending_action_attempt.extend({
1698
- action_type: action_type5
1719
+ action_type: action_type6
1699
1720
  }).describe("Setting fan mode."),
1700
1721
  common_succeeded_action_attempt.extend({
1701
- action_type: action_type5,
1702
- result: result6
1722
+ action_type: action_type6,
1723
+ result: result7
1703
1724
  }).describe("Setting fan mode succeeded."),
1704
- common_failed_action_attempt.extend({ action_type: action_type5, error: error6 }).describe("Setting fan mode failed.")
1725
+ common_failed_action_attempt.extend({ action_type: action_type6, error: error7 }).describe("Setting fan mode failed.")
1705
1726
  ]);
1706
- var action_type6 = zod.z.literal("SET_HEAT");
1707
- var error7 = zod.z.object({
1727
+ var action_type7 = zod.z.literal("SET_HEAT");
1728
+ var error8 = zod.z.object({
1708
1729
  type: zod.z.string(),
1709
1730
  message: zod.z.string()
1710
1731
  });
1711
- var result7 = zod.z.object({});
1732
+ var result8 = zod.z.object({});
1712
1733
  var set_heat_action_attempt = zod.z.discriminatedUnion("status", [
1713
1734
  common_pending_action_attempt.extend({
1714
- action_type: action_type6
1735
+ action_type: action_type7
1715
1736
  }).describe("Setting HVAC to heat mode."),
1716
1737
  common_succeeded_action_attempt.extend({
1717
- action_type: action_type6,
1718
- result: result7
1738
+ action_type: action_type7,
1739
+ result: result8
1719
1740
  }).describe("Setting HVAC to heat mode succeeded."),
1720
- common_failed_action_attempt.extend({ action_type: action_type6, error: error7 }).describe("Setting HVAC to heat mode failed.")
1741
+ common_failed_action_attempt.extend({ action_type: action_type7, error: error8 }).describe("Setting HVAC to heat mode failed.")
1721
1742
  ]);
1722
- var action_type7 = zod.z.literal("SET_HEAT_COOL");
1723
- var error8 = zod.z.object({
1743
+ var action_type8 = zod.z.literal("SET_HEAT_COOL");
1744
+ var error9 = zod.z.object({
1724
1745
  type: zod.z.string(),
1725
1746
  message: zod.z.string()
1726
1747
  });
1727
- var result8 = zod.z.object({});
1748
+ var result9 = zod.z.object({});
1728
1749
  var set_heat_cool_action_attempt = zod.z.discriminatedUnion("status", [
1729
1750
  common_pending_action_attempt.extend({
1730
- action_type: action_type7
1751
+ action_type: action_type8
1731
1752
  }).describe("Setting HVAC to heat-cool mode."),
1732
1753
  common_succeeded_action_attempt.extend({
1733
- action_type: action_type7,
1734
- result: result8
1754
+ action_type: action_type8,
1755
+ result: result9
1735
1756
  }).describe("Setting HVAC to heat-cool mode succeeded."),
1736
- common_failed_action_attempt.extend({ action_type: action_type7, error: error8 }).describe("Setting heat-cool mode failed.")
1757
+ common_failed_action_attempt.extend({ action_type: action_type8, error: error9 }).describe("Setting heat-cool mode failed.")
1737
1758
  ]);
1738
- var action_type8 = zod.z.literal("SET_THERMOSTAT_OFF");
1739
- var error9 = zod.z.object({
1759
+ var action_type9 = zod.z.literal("SET_THERMOSTAT_OFF");
1760
+ var error10 = zod.z.object({
1740
1761
  type: zod.z.string(),
1741
1762
  message: zod.z.string()
1742
1763
  });
1743
- var result9 = zod.z.object({});
1764
+ var result10 = zod.z.object({});
1744
1765
  var set_thermostat_off_action_attempt = zod.z.discriminatedUnion(
1745
1766
  "status",
1746
1767
  [
1747
1768
  common_pending_action_attempt.extend({
1748
- action_type: action_type8
1769
+ action_type: action_type9
1749
1770
  }).describe("Turning HVAC off."),
1750
1771
  common_succeeded_action_attempt.extend({
1751
- action_type: action_type8,
1752
- result: result9
1772
+ action_type: action_type9,
1773
+ result: result10
1753
1774
  }).describe("Turning HVAC off succeeded."),
1754
- common_failed_action_attempt.extend({ action_type: action_type8, error: error9 }).describe("Turning HVAC off failed.")
1775
+ common_failed_action_attempt.extend({ action_type: action_type9, error: error10 }).describe("Turning HVAC off failed.")
1755
1776
  ]
1756
1777
  );
1757
- var action_type9 = zod.z.literal("UNLOCK_DOOR");
1758
- var error10 = zod.z.object({
1778
+ var action_type10 = zod.z.literal("UNLOCK_DOOR");
1779
+ var error11 = zod.z.object({
1759
1780
  type: zod.z.string(),
1760
1781
  message: zod.z.string()
1761
1782
  });
1762
- var result10 = zod.z.object({});
1783
+ var result11 = zod.z.object({});
1763
1784
  var unlock_door_action_attempt = zod.z.discriminatedUnion("status", [
1764
1785
  common_pending_action_attempt.extend({
1765
- action_type: action_type9
1786
+ action_type: action_type10
1766
1787
  }).describe("Unlocking door."),
1767
1788
  common_succeeded_action_attempt.extend({
1768
- action_type: action_type9,
1769
- result: result10
1789
+ action_type: action_type10,
1790
+ result: result11
1770
1791
  }).describe("Unlocking door succeeded."),
1771
- common_failed_action_attempt.extend({ action_type: action_type9, error: error10 }).describe("Unlocking door failed.")
1792
+ common_failed_action_attempt.extend({ action_type: action_type10, error: error11 }).describe("Unlocking door failed.")
1772
1793
  ]);
1773
1794
 
1774
1795
  // src/lib/seam/connect/models/action-attempts/action-attempt.ts
1775
1796
  var action_attempt = zod.z.union([
1776
1797
  ...lock_door_action_attempt.options,
1777
1798
  ...unlock_door_action_attempt.options,
1799
+ ...read_card_action_attempt.options,
1778
1800
  ...reset_sandbox_workspace_action_attempt.options,
1779
1801
  ...set_cool_action_attempt.options,
1780
1802
  ...set_heat_action_attempt.options,
@@ -1975,9 +1997,10 @@ var access_code_events = [
1975
1997
  unmanaged_access_code_removed_event
1976
1998
  ];
1977
1999
  var common_acs_event = common_event.extend({
1978
- connected_account_id: zod.z.string().uuid().describe(`
2000
+ connected_account_id: zod.z.string().uuid().optional().describe(`
1979
2001
  ---
1980
2002
  title: Connected Account ID
2003
+ deprecated: Will be removed.
1981
2004
  ---
1982
2005
  ID of the connected account.
1983
2006
  `),
@@ -2001,7 +2024,13 @@ var acs_system_event = common_acs_event.extend({});
2001
2024
  var acs_system_connected_event = acs_system_event.extend({
2002
2025
  event_type: zod.z.literal("acs_system.connected")
2003
2026
  }).describe("An ACS system was connected.");
2004
- var acs_system_events = [acs_system_connected_event];
2027
+ var acs_system_added_event = acs_system_event.extend({
2028
+ event_type: zod.z.literal("acs_system.added")
2029
+ }).describe("An ACS system was added.");
2030
+ var acs_system_events = [
2031
+ acs_system_connected_event,
2032
+ acs_system_added_event
2033
+ ];
2005
2034
  var acs_user_event = common_acs_event.extend({
2006
2035
  acs_user_id: zod.z.string().uuid()
2007
2036
  });
@@ -2286,6 +2315,22 @@ var lock_access_denied_event = device_event.extend({
2286
2315
  }).describe(
2287
2316
  "The lock denied access to a user after one or more consecutive invalid attempts to unlock the device."
2288
2317
  );
2318
+ device_event.extend({
2319
+ event_type: zod.z.literal("thermostat.climate_preset_activated"),
2320
+ thermostat_schedule_id: zod.z.string().uuid().nullable(),
2321
+ climate_preset_key: zod.z.string(),
2322
+ is_fallback_climate_preset: zod.z.boolean()
2323
+ }).describe("A thermostat climate preset was activated.");
2324
+ device_event.merge(
2325
+ climate_setting.pick({
2326
+ fan_mode_setting: true,
2327
+ hvac_mode_setting: true,
2328
+ cooling_set_point_celsius: true,
2329
+ heating_set_point_celsius: true,
2330
+ cooling_set_point_fahrenheit: true,
2331
+ heating_set_point_fahrenheit: true
2332
+ })
2333
+ ).describe("A thermostat was manually adjusted.");
2289
2334
  var device_events = [
2290
2335
  device_connected_event,
2291
2336
  device_converted_to_unmanaged_event,
@@ -2312,6 +2357,8 @@ var device_events = [
2312
2357
  lock_locked_event,
2313
2358
  lock_unlocked_event,
2314
2359
  lock_access_denied_event
2360
+ // thermostat_climate_preset_activated_event,
2361
+ // thermostat_manually_adjusted_event,
2315
2362
  ];
2316
2363
  var enrollment_automation_event = common_event.extend({
2317
2364
  enrollment_automation_id: zod.z.string().uuid().describe(`
@@ -3493,6 +3540,98 @@ var openapi_default = {
3493
3540
  ],
3494
3541
  type: "object"
3495
3542
  },
3543
+ {
3544
+ description: "Reading card data from physical encoder.",
3545
+ properties: {
3546
+ action_attempt_id: {
3547
+ description: "The ID of the action attempt.",
3548
+ format: "uuid",
3549
+ type: "string",
3550
+ "x-title": "Action Attempt ID"
3551
+ },
3552
+ action_type: { enum: ["READ_CARD"], type: "string" },
3553
+ error: { nullable: true },
3554
+ result: { nullable: true },
3555
+ status: { enum: ["pending"], type: "string" }
3556
+ },
3557
+ required: [
3558
+ "action_attempt_id",
3559
+ "status",
3560
+ "result",
3561
+ "error",
3562
+ "action_type"
3563
+ ],
3564
+ type: "object"
3565
+ },
3566
+ {
3567
+ description: "Reading card data from physical encoder succeeded.",
3568
+ properties: {
3569
+ action_attempt_id: {
3570
+ description: "The ID of the action attempt.",
3571
+ format: "uuid",
3572
+ type: "string",
3573
+ "x-title": "Action Attempt ID"
3574
+ },
3575
+ action_type: { enum: ["READ_CARD"], type: "string" },
3576
+ error: { nullable: true },
3577
+ result: {
3578
+ properties: {
3579
+ acs_credential_id: {
3580
+ description: "Matching acs_credential currently encoded on this card.",
3581
+ format: "uuid",
3582
+ nullable: true,
3583
+ type: "string"
3584
+ },
3585
+ card_number: {
3586
+ description: "A number or sting that physically identifies this card.",
3587
+ nullable: true,
3588
+ type: "string"
3589
+ }
3590
+ },
3591
+ required: ["acs_credential_id", "card_number"],
3592
+ type: "object"
3593
+ },
3594
+ status: { enum: ["success"], type: "string" }
3595
+ },
3596
+ required: [
3597
+ "action_attempt_id",
3598
+ "status",
3599
+ "error",
3600
+ "action_type",
3601
+ "result"
3602
+ ],
3603
+ type: "object"
3604
+ },
3605
+ {
3606
+ description: "Reading card data from physical encoder failed.",
3607
+ properties: {
3608
+ action_attempt_id: {
3609
+ description: "The ID of the action attempt.",
3610
+ format: "uuid",
3611
+ type: "string",
3612
+ "x-title": "Action Attempt ID"
3613
+ },
3614
+ action_type: { enum: ["READ_CARD"], type: "string" },
3615
+ error: {
3616
+ properties: {
3617
+ message: { type: "string" },
3618
+ type: { type: "string" }
3619
+ },
3620
+ required: ["type", "message"],
3621
+ type: "object"
3622
+ },
3623
+ result: { nullable: true },
3624
+ status: { enum: ["error"], type: "string" }
3625
+ },
3626
+ required: [
3627
+ "action_attempt_id",
3628
+ "status",
3629
+ "result",
3630
+ "action_type",
3631
+ "error"
3632
+ ],
3633
+ type: "object"
3634
+ },
3496
3635
  {
3497
3636
  description: "Resetting sandbox workspace.",
3498
3637
  properties: {
@@ -8971,6 +9110,68 @@ var openapi_default = {
8971
9110
  "x-fern-sdk-return-value": "acs_entrances"
8972
9111
  }
8973
9112
  },
9113
+ "/acs/credentials/read_card": {
9114
+ post: {
9115
+ operationId: "acsCredentialsReadCardPost",
9116
+ requestBody: {
9117
+ content: {
9118
+ "application/json": {
9119
+ schema: {
9120
+ oneOf: [
9121
+ {
9122
+ properties: {
9123
+ acs_system_id: { format: "uuid", type: "string" },
9124
+ device_name: { type: "string" }
9125
+ },
9126
+ required: ["acs_system_id", "device_name"],
9127
+ type: "object"
9128
+ },
9129
+ {
9130
+ properties: {
9131
+ device_id: { format: "uuid", type: "string" }
9132
+ },
9133
+ required: ["device_id"],
9134
+ type: "object"
9135
+ }
9136
+ ]
9137
+ }
9138
+ }
9139
+ }
9140
+ },
9141
+ responses: {
9142
+ 200: {
9143
+ content: {
9144
+ "application/json": {
9145
+ schema: {
9146
+ properties: {
9147
+ action_attempt: {
9148
+ $ref: "#/components/schemas/action_attempt"
9149
+ },
9150
+ ok: { type: "boolean" }
9151
+ },
9152
+ required: ["action_attempt", "ok"],
9153
+ type: "object"
9154
+ }
9155
+ }
9156
+ },
9157
+ description: "OK"
9158
+ },
9159
+ 400: { description: "Bad Request" },
9160
+ 401: { description: "Unauthorized" }
9161
+ },
9162
+ security: [
9163
+ { pat_with_workspace: [] },
9164
+ { console_session: [] },
9165
+ { api_key: [] }
9166
+ ],
9167
+ summary: "/acs/credentials/read_card",
9168
+ tags: ["/acs"],
9169
+ "x-fern-sdk-group-name": ["acs", "credentials"],
9170
+ "x-fern-sdk-method-name": "read_card",
9171
+ "x-fern-sdk-return-value": "action_attempt",
9172
+ "x-undocumented": "Reading a card is currently unimplemented."
9173
+ }
9174
+ },
8974
9175
  "/acs/credentials/unassign": {
8975
9176
  patch: {
8976
9177
  operationId: "acsCredentialsUnassignPatch",
@@ -13642,6 +13843,7 @@ var openapi_default = {
13642
13843
  "connect_webview.login_failed",
13643
13844
  "noise_sensor.noise_threshold_triggered",
13644
13845
  "access_code.backup_access_code_pulled",
13846
+ "acs_system.added",
13645
13847
  "acs_system.connected",
13646
13848
  "acs_user.deleted",
13647
13849
  "acs_credential.deleted",
@@ -13709,6 +13911,7 @@ var openapi_default = {
13709
13911
  "connect_webview.login_failed",
13710
13912
  "noise_sensor.noise_threshold_triggered",
13711
13913
  "access_code.backup_access_code_pulled",
13914
+ "acs_system.added",
13712
13915
  "acs_system.connected",
13713
13916
  "acs_user.deleted",
13714
13917
  "acs_credential.deleted",