@seamapi/types 1.270.0 → 1.271.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.270.0",
3
+ "version": "1.271.1",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,5 +1,9 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import {
4
+ acs_credential,
5
+ unmanaged_acs_credential,
6
+ } from '../acs/acs-credential.js'
3
7
  import {
4
8
  common_failed_action_attempt,
5
9
  common_pending_action_attempt,
@@ -13,7 +17,7 @@ const error = z.object({
13
17
  message: z.string(),
14
18
  })
15
19
 
16
- const result = z.object({})
20
+ const result = acs_credential.or(unmanaged_acs_credential)
17
21
 
18
22
  export const encode_card_action_attempt = z.discriminatedUnion('status', [
19
23
  common_pending_action_attempt
@@ -1658,7 +1658,234 @@ export default {
1658
1658
  },
1659
1659
  action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1660
1660
  error: { nullable: true },
1661
- result: { properties: {}, type: 'object' },
1661
+ result: {
1662
+ oneOf: [
1663
+ {
1664
+ properties: {
1665
+ access_method: {
1666
+ enum: ['code', 'card', 'mobile_key'],
1667
+ type: 'string',
1668
+ },
1669
+ acs_credential_id: { format: 'uuid', type: 'string' },
1670
+ acs_credential_pool_id: {
1671
+ format: 'uuid',
1672
+ type: 'string',
1673
+ },
1674
+ acs_system_id: { format: 'uuid', type: 'string' },
1675
+ acs_user_id: { format: 'uuid', type: 'string' },
1676
+ card_number: { nullable: true, type: 'string' },
1677
+ code: { nullable: true, type: 'string' },
1678
+ created_at: { format: 'date-time', type: 'string' },
1679
+ display_name: { minLength: 1, type: 'string' },
1680
+ ends_at: { type: 'string' },
1681
+ errors: {
1682
+ items: {
1683
+ properties: {
1684
+ error_code: { type: 'string' },
1685
+ message: { type: 'string' },
1686
+ },
1687
+ required: ['error_code', 'message'],
1688
+ type: 'object',
1689
+ },
1690
+ type: 'array',
1691
+ },
1692
+ external_type: {
1693
+ enum: [
1694
+ 'pti_card',
1695
+ 'brivo_credential',
1696
+ 'hid_credential',
1697
+ 'visionline_card',
1698
+ 'salto_ks_credential',
1699
+ ],
1700
+ type: 'string',
1701
+ },
1702
+ external_type_display_name: { type: 'string' },
1703
+ is_issued: { type: 'boolean' },
1704
+ is_latest_desired_state_synced_with_provider: {
1705
+ type: 'boolean',
1706
+ },
1707
+ is_managed: { enum: [true], type: 'boolean' },
1708
+ is_multi_phone_sync_credential: { type: 'boolean' },
1709
+ issued_at: {
1710
+ format: 'date-time',
1711
+ nullable: true,
1712
+ type: 'string',
1713
+ },
1714
+ latest_desired_state_synced_with_provider_at: {
1715
+ format: 'date-time',
1716
+ type: 'string',
1717
+ },
1718
+ parent_acs_credential_id: {
1719
+ format: 'uuid',
1720
+ type: 'string',
1721
+ },
1722
+ starts_at: { type: 'string' },
1723
+ visionline_metadata: {
1724
+ properties: {
1725
+ auto_join: { type: 'boolean' },
1726
+ card_function_type: {
1727
+ enum: ['guest', 'staff'],
1728
+ type: 'string',
1729
+ },
1730
+ card_id: { type: 'string' },
1731
+ common_acs_entrance_ids: {
1732
+ items: { format: 'uuid', type: 'string' },
1733
+ type: 'array',
1734
+ },
1735
+ credential_id: { type: 'string' },
1736
+ guest_acs_entrance_ids: {
1737
+ items: { format: 'uuid', type: 'string' },
1738
+ type: 'array',
1739
+ },
1740
+ is_valid: { type: 'boolean' },
1741
+ joiner_acs_credential_ids: {
1742
+ items: { format: 'uuid', type: 'string' },
1743
+ type: 'array',
1744
+ },
1745
+ },
1746
+ required: ['card_function_type'],
1747
+ type: 'object',
1748
+ },
1749
+ warnings: {
1750
+ items: {
1751
+ properties: {
1752
+ message: { type: 'string' },
1753
+ warning_code: { type: 'string' },
1754
+ },
1755
+ required: ['warning_code', 'message'],
1756
+ type: 'object',
1757
+ },
1758
+ type: 'array',
1759
+ },
1760
+ workspace_id: { format: 'uuid', type: 'string' },
1761
+ },
1762
+ required: [
1763
+ 'acs_credential_id',
1764
+ 'acs_system_id',
1765
+ 'display_name',
1766
+ 'access_method',
1767
+ 'created_at',
1768
+ 'workspace_id',
1769
+ 'errors',
1770
+ 'warnings',
1771
+ 'is_managed',
1772
+ ],
1773
+ type: 'object',
1774
+ },
1775
+ {
1776
+ properties: {
1777
+ access_method: {
1778
+ enum: ['code', 'card', 'mobile_key'],
1779
+ type: 'string',
1780
+ },
1781
+ acs_credential_id: { format: 'uuid', type: 'string' },
1782
+ acs_credential_pool_id: {
1783
+ format: 'uuid',
1784
+ type: 'string',
1785
+ },
1786
+ acs_system_id: { format: 'uuid', type: 'string' },
1787
+ acs_user_id: { format: 'uuid', type: 'string' },
1788
+ card_number: { nullable: true, type: 'string' },
1789
+ code: { nullable: true, type: 'string' },
1790
+ created_at: { format: 'date-time', type: 'string' },
1791
+ display_name: { minLength: 1, type: 'string' },
1792
+ ends_at: { type: 'string' },
1793
+ errors: {
1794
+ items: {
1795
+ properties: {
1796
+ error_code: { type: 'string' },
1797
+ message: { type: 'string' },
1798
+ },
1799
+ required: ['error_code', 'message'],
1800
+ type: 'object',
1801
+ },
1802
+ type: 'array',
1803
+ },
1804
+ external_type: {
1805
+ enum: [
1806
+ 'pti_card',
1807
+ 'brivo_credential',
1808
+ 'hid_credential',
1809
+ 'visionline_card',
1810
+ 'salto_ks_credential',
1811
+ ],
1812
+ type: 'string',
1813
+ },
1814
+ external_type_display_name: { type: 'string' },
1815
+ is_issued: { type: 'boolean' },
1816
+ is_latest_desired_state_synced_with_provider: {
1817
+ type: 'boolean',
1818
+ },
1819
+ is_managed: { enum: [false], type: 'boolean' },
1820
+ is_multi_phone_sync_credential: { type: 'boolean' },
1821
+ issued_at: {
1822
+ format: 'date-time',
1823
+ nullable: true,
1824
+ type: 'string',
1825
+ },
1826
+ latest_desired_state_synced_with_provider_at: {
1827
+ format: 'date-time',
1828
+ type: 'string',
1829
+ },
1830
+ parent_acs_credential_id: {
1831
+ format: 'uuid',
1832
+ type: 'string',
1833
+ },
1834
+ starts_at: { type: 'string' },
1835
+ visionline_metadata: {
1836
+ properties: {
1837
+ auto_join: { type: 'boolean' },
1838
+ card_function_type: {
1839
+ enum: ['guest', 'staff'],
1840
+ type: 'string',
1841
+ },
1842
+ card_id: { type: 'string' },
1843
+ common_acs_entrance_ids: {
1844
+ items: { format: 'uuid', type: 'string' },
1845
+ type: 'array',
1846
+ },
1847
+ credential_id: { type: 'string' },
1848
+ guest_acs_entrance_ids: {
1849
+ items: { format: 'uuid', type: 'string' },
1850
+ type: 'array',
1851
+ },
1852
+ is_valid: { type: 'boolean' },
1853
+ joiner_acs_credential_ids: {
1854
+ items: { format: 'uuid', type: 'string' },
1855
+ type: 'array',
1856
+ },
1857
+ },
1858
+ required: ['card_function_type'],
1859
+ type: 'object',
1860
+ },
1861
+ warnings: {
1862
+ items: {
1863
+ properties: {
1864
+ message: { type: 'string' },
1865
+ warning_code: { type: 'string' },
1866
+ },
1867
+ required: ['warning_code', 'message'],
1868
+ type: 'object',
1869
+ },
1870
+ type: 'array',
1871
+ },
1872
+ workspace_id: { format: 'uuid', type: 'string' },
1873
+ },
1874
+ required: [
1875
+ 'acs_credential_id',
1876
+ 'acs_system_id',
1877
+ 'display_name',
1878
+ 'access_method',
1879
+ 'created_at',
1880
+ 'workspace_id',
1881
+ 'errors',
1882
+ 'warnings',
1883
+ 'is_managed',
1884
+ ],
1885
+ type: 'object',
1886
+ },
1887
+ ],
1888
+ },
1662
1889
  status: { enum: ['success'], type: 'string' },
1663
1890
  },
1664
1891
  required: [
@@ -7987,23 +8214,12 @@ export default {
7987
8214
  content: {
7988
8215
  'application/json': {
7989
8216
  schema: {
7990
- oneOf: [
7991
- {
7992
- properties: {
7993
- acs_system_id: { format: 'uuid', type: 'string' },
7994
- device_name: { type: 'string' },
7995
- },
7996
- required: ['acs_system_id', 'device_name'],
7997
- type: 'object',
7998
- },
7999
- {
8000
- properties: {
8001
- device_id: { format: 'uuid', type: 'string' },
8002
- },
8003
- required: ['device_id'],
8004
- type: 'object',
8005
- },
8006
- ],
8217
+ properties: {
8218
+ acs_credential_id: { format: 'uuid', type: 'string' },
8219
+ device_id: { format: 'uuid', type: 'string' },
8220
+ },
8221
+ required: ['device_id', 'acs_credential_id'],
8222
+ type: 'object',
8007
8223
  },
8008
8224
  },
8009
8225
  },
@@ -8136,24 +8352,12 @@ export default {
8136
8352
  content: {
8137
8353
  'application/json': {
8138
8354
  schema: {
8139
- oneOf: [
8140
- {
8141
- properties: {
8142
- acs_system_id: { format: 'uuid', type: 'string' },
8143
- device_name: { type: 'string' },
8144
- },
8145
- required: ['acs_system_id', 'device_name'],
8146
- type: 'object',
8147
- },
8148
- {
8149
- properties: {
8150
- acs_system_id: { format: 'uuid', type: 'string' },
8151
- device_id: { format: 'uuid', type: 'string' },
8152
- },
8153
- required: ['acs_system_id', 'device_id'],
8154
- type: 'object',
8155
- },
8156
- ],
8355
+ properties: {
8356
+ acs_system_id: { format: 'uuid', type: 'string' },
8357
+ device_id: { format: 'uuid', type: 'string' },
8358
+ },
8359
+ required: ['acs_system_id', 'device_id'],
8360
+ type: 'object',
8157
8361
  },
8158
8362
  },
8159
8363
  },