@seamapi/types 1.149.0 → 1.149.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.
Files changed (31) hide show
  1. package/dist/connect.cjs +25 -10
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +19 -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/{connect-webview.d.ts → connect-webviews/connect-webview.d.ts} +6 -5
  8. package/lib/seam/connect/models/{connect-webview.js → connect-webviews/connect-webview.js} +12 -5
  9. package/lib/seam/connect/models/connect-webviews/connect-webview.js.map +1 -0
  10. package/lib/seam/connect/models/connect-webviews/index.d.ts +1 -0
  11. package/lib/seam/connect/models/connect-webviews/index.js +2 -0
  12. package/lib/seam/connect/models/connect-webviews/index.js.map +1 -0
  13. package/lib/seam/connect/models/devices/managed-device.d.ts +0 -5
  14. package/lib/seam/connect/models/devices/managed-device.js.map +1 -1
  15. package/lib/seam/connect/models/index.d.ts +1 -1
  16. package/lib/seam/connect/models/index.js +1 -1
  17. package/lib/seam/connect/models/index.js.map +1 -1
  18. package/lib/seam/connect/openapi.d.ts +3 -0
  19. package/lib/seam/connect/openapi.js +13 -5
  20. package/lib/seam/connect/openapi.js.map +1 -1
  21. package/lib/seam/connect/route-types.d.ts +11 -11
  22. package/package.json +1 -1
  23. package/src/lib/seam/connect/internal/schemas.ts +2 -0
  24. package/src/lib/seam/connect/models/acs/entrance.ts +1 -0
  25. package/src/lib/seam/connect/models/{connect-webview.ts → connect-webviews/connect-webview.ts} +16 -5
  26. package/src/lib/seam/connect/models/connect-webviews/index.ts +1 -0
  27. package/src/lib/seam/connect/models/devices/managed-device.ts +0 -9
  28. package/src/lib/seam/connect/models/index.ts +1 -1
  29. package/src/lib/seam/connect/openapi.ts +13 -5
  30. package/src/lib/seam/connect/route-types.ts +11 -11
  31. package/lib/seam/connect/models/connect-webview.js.map +0 -1
@@ -1773,23 +1773,23 @@ export interface Routes {
1773
1773
  accepted_providers?: Array<'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'tedee' | 'honeywell_resideo' | 'latch' | 'yale_access' | 'hid_cm' | 'google_nest'> | undefined;
1774
1774
  provider_category?: ('stable' | 'consumer_smartlocks' | 'thermostats' | 'noise_sensors' | 'access_control_systems' | 'internal_beta') | undefined;
1775
1775
  custom_metadata?: Record<string, string | boolean | null> | undefined;
1776
- automatically_manage_new_devices?: boolean | undefined;
1777
- wait_for_device_creation?: boolean | undefined;
1776
+ automatically_manage_new_devices?: boolean;
1777
+ wait_for_device_creation?: boolean;
1778
1778
  };
1779
1779
  commonParams: {};
1780
1780
  formData: {};
1781
1781
  jsonResponse: {
1782
1782
  connect_webview: {
1783
1783
  connect_webview_id: string;
1784
- connected_account_id?: string | undefined;
1785
- url: string;
1786
1784
  workspace_id: string;
1785
+ created_at: string;
1786
+ connected_account_id: string | null;
1787
+ url: string;
1787
1788
  device_selection_mode: 'none' | 'single' | 'multiple';
1788
1789
  accepted_providers: string[];
1789
1790
  accepted_devices: string[];
1790
1791
  any_provider_allowed: boolean;
1791
1792
  any_device_allowed: boolean;
1792
- created_at: string;
1793
1793
  login_successful: boolean;
1794
1794
  status: 'pending' | 'failed' | 'authorized';
1795
1795
  custom_redirect_url: string | null;
@@ -1825,15 +1825,15 @@ export interface Routes {
1825
1825
  jsonResponse: {
1826
1826
  connect_webview: {
1827
1827
  connect_webview_id: string;
1828
- connected_account_id?: string | undefined;
1829
- url: string;
1830
1828
  workspace_id: string;
1829
+ created_at: string;
1830
+ connected_account_id: string | null;
1831
+ url: string;
1831
1832
  device_selection_mode: 'none' | 'single' | 'multiple';
1832
1833
  accepted_providers: string[];
1833
1834
  accepted_devices: string[];
1834
1835
  any_provider_allowed: boolean;
1835
1836
  any_device_allowed: boolean;
1836
- created_at: string;
1837
1837
  login_successful: boolean;
1838
1838
  status: 'pending' | 'failed' | 'authorized';
1839
1839
  custom_redirect_url: string | null;
@@ -1860,15 +1860,15 @@ export interface Routes {
1860
1860
  jsonResponse: {
1861
1861
  connect_webviews: Array<{
1862
1862
  connect_webview_id: string;
1863
- connected_account_id?: string | undefined;
1864
- url: string;
1865
1863
  workspace_id: string;
1864
+ created_at: string;
1865
+ connected_account_id: string | null;
1866
+ url: string;
1866
1867
  device_selection_mode: 'none' | 'single' | 'multiple';
1867
1868
  accepted_providers: string[];
1868
1869
  accepted_devices: string[];
1869
1870
  any_provider_allowed: boolean;
1870
1871
  any_device_allowed: boolean;
1871
- created_at: string;
1872
1872
  login_successful: boolean;
1873
1873
  status: 'pending' | 'failed' | 'authorized';
1874
1874
  custom_redirect_url: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.149.0",
3
+ "version": "1.149.1",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -20,8 +20,10 @@ export {
20
20
  climate_setting,
21
21
  climate_setting_schedule,
22
22
  common_device_properties,
23
+ connect_webview_device_selection_mode,
23
24
  custom_metadata_input,
24
25
  device_capability_flags,
26
+ device_metadata,
25
27
  dormakaba_oracode_time_slot,
26
28
  enrollment_automation,
27
29
  fan_mode_setting,
@@ -38,6 +38,7 @@ export const acs_entrance = z.object({
38
38
  })
39
39
  .nullable(),
40
40
  })
41
+
41
42
  export type AcsEntranceLatchMetadata = z.infer<
42
43
  typeof acs_entrance_latch_metadata
43
44
  >
@@ -1,18 +1,29 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import { custom_metadata } from './custom-metadata.js'
3
+ import { custom_metadata } from '../custom-metadata.js'
4
+
5
+ export const connect_webview_device_selection_mode = z.enum([
6
+ 'none',
7
+ 'single',
8
+ 'multiple',
9
+ ])
4
10
 
5
11
  export const connect_webview = z.object({
6
12
  connect_webview_id: z.string().uuid(),
7
- connected_account_id: z.string().uuid().optional(),
8
- url: z.string().url(),
9
13
  workspace_id: z.string().uuid(),
10
- device_selection_mode: z.enum(['none', 'single', 'multiple']),
14
+ created_at: z.string().datetime(),
15
+ connected_account_id: z.string().uuid().nullable(),
16
+ url: z.string().url(),
17
+ device_selection_mode: connect_webview_device_selection_mode,
18
+
19
+ // TODO: Use enum value.
11
20
  accepted_providers: z.array(z.string()),
21
+
22
+ // TODO: Use enum value.
12
23
  accepted_devices: z.array(z.string()),
24
+
13
25
  any_provider_allowed: z.boolean(),
14
26
  any_device_allowed: z.boolean(),
15
- created_at: z.string().datetime(),
16
27
  login_successful: z.boolean(),
17
28
  status: z.enum(['pending', 'failed', 'authorized']),
18
29
  custom_redirect_url: z.string().url().nullable(),
@@ -0,0 +1 @@
1
+ export * from './connect-webview.js'
@@ -1,4 +1,3 @@
1
- import type { SetRequired, Simplify } from 'type-fest'
2
1
  import { z } from 'zod'
3
2
 
4
3
  import { schemas as devicedb_schemas } from '@seamapi/types/devicedb'
@@ -229,11 +228,3 @@ export const managed_device = z
229
228
  .merge(device_capability_flags)
230
229
 
231
230
  export type ManagedDevice = z.infer<typeof managed_device>
232
-
233
- export type ManagedDeviceWithBackendMetadata<
234
- MetadataKey extends keyof z.infer<typeof device_metadata>,
235
- > = Simplify<
236
- ManagedDevice & {
237
- properties: SetRequired<ManagedDevice['properties'], MetadataKey>
238
- }
239
- >
@@ -1,7 +1,7 @@
1
1
  export * from './access-codes/index.js'
2
2
  export * from './acs/index.js'
3
3
  export * from './capability-properties/index.js'
4
- export * from './connect-webview.js'
4
+ export * from './connect-webviews/index.js'
5
5
  export * from './custom-metadata.js'
6
6
  export * from './devices/index.js'
7
7
  export * from './network.js'
@@ -434,7 +434,11 @@ export default {
434
434
  },
435
435
  automatically_manage_new_devices: { type: 'boolean' },
436
436
  connect_webview_id: { format: 'uuid', type: 'string' },
437
- connected_account_id: { format: 'uuid', type: 'string' },
437
+ connected_account_id: {
438
+ format: 'uuid',
439
+ nullable: true,
440
+ type: 'string',
441
+ },
438
442
  created_at: { format: 'date-time', type: 'string' },
439
443
  custom_metadata: {
440
444
  additionalProperties: {
@@ -465,14 +469,15 @@ export default {
465
469
  },
466
470
  required: [
467
471
  'connect_webview_id',
468
- 'url',
469
472
  'workspace_id',
473
+ 'created_at',
474
+ 'connected_account_id',
475
+ 'url',
470
476
  'device_selection_mode',
471
477
  'accepted_providers',
472
478
  'accepted_devices',
473
479
  'any_provider_allowed',
474
480
  'any_device_allowed',
475
- 'created_at',
476
481
  'login_successful',
477
482
  'status',
478
483
  'custom_redirect_url',
@@ -7234,7 +7239,10 @@ export default {
7234
7239
  },
7235
7240
  type: 'array',
7236
7241
  },
7237
- automatically_manage_new_devices: { type: 'boolean' },
7242
+ automatically_manage_new_devices: {
7243
+ default: true,
7244
+ type: 'boolean',
7245
+ },
7238
7246
  custom_metadata: {
7239
7247
  additionalProperties: {
7240
7248
  nullable: true,
@@ -7263,7 +7271,7 @@ export default {
7263
7271
  ],
7264
7272
  type: 'string',
7265
7273
  },
7266
- wait_for_device_creation: { type: 'boolean' },
7274
+ wait_for_device_creation: { default: false, type: 'boolean' },
7267
7275
  },
7268
7276
  type: 'object',
7269
7277
  },
@@ -2025,23 +2025,23 @@ export interface Routes {
2025
2025
  )
2026
2026
  | undefined
2027
2027
  custom_metadata?: Record<string, string | boolean | null> | undefined
2028
- automatically_manage_new_devices?: boolean | undefined
2029
- wait_for_device_creation?: boolean | undefined
2028
+ automatically_manage_new_devices?: boolean
2029
+ wait_for_device_creation?: boolean
2030
2030
  }
2031
2031
  commonParams: {}
2032
2032
  formData: {}
2033
2033
  jsonResponse: {
2034
2034
  connect_webview: {
2035
2035
  connect_webview_id: string
2036
- connected_account_id?: string | undefined
2037
- url: string
2038
2036
  workspace_id: string
2037
+ created_at: string
2038
+ connected_account_id: string | null
2039
+ url: string
2039
2040
  device_selection_mode: 'none' | 'single' | 'multiple'
2040
2041
  accepted_providers: string[]
2041
2042
  accepted_devices: string[]
2042
2043
  any_provider_allowed: boolean
2043
2044
  any_device_allowed: boolean
2044
- created_at: string
2045
2045
  login_successful: boolean
2046
2046
  status: 'pending' | 'failed' | 'authorized'
2047
2047
  custom_redirect_url: string | null
@@ -2077,15 +2077,15 @@ export interface Routes {
2077
2077
  jsonResponse: {
2078
2078
  connect_webview: {
2079
2079
  connect_webview_id: string
2080
- connected_account_id?: string | undefined
2081
- url: string
2082
2080
  workspace_id: string
2081
+ created_at: string
2082
+ connected_account_id: string | null
2083
+ url: string
2083
2084
  device_selection_mode: 'none' | 'single' | 'multiple'
2084
2085
  accepted_providers: string[]
2085
2086
  accepted_devices: string[]
2086
2087
  any_provider_allowed: boolean
2087
2088
  any_device_allowed: boolean
2088
- created_at: string
2089
2089
  login_successful: boolean
2090
2090
  status: 'pending' | 'failed' | 'authorized'
2091
2091
  custom_redirect_url: string | null
@@ -2112,15 +2112,15 @@ export interface Routes {
2112
2112
  jsonResponse: {
2113
2113
  connect_webviews: Array<{
2114
2114
  connect_webview_id: string
2115
- connected_account_id?: string | undefined
2116
- url: string
2117
2115
  workspace_id: string
2116
+ created_at: string
2117
+ connected_account_id: string | null
2118
+ url: string
2118
2119
  device_selection_mode: 'none' | 'single' | 'multiple'
2119
2120
  accepted_providers: string[]
2120
2121
  accepted_devices: string[]
2121
2122
  any_provider_allowed: boolean
2122
2123
  any_device_allowed: boolean
2123
- created_at: string
2124
2124
  login_successful: boolean
2125
2125
  status: 'pending' | 'failed' | 'authorized'
2126
2126
  custom_redirect_url: string | null
@@ -1 +0,0 @@
1
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