@seamapi/types 1.423.3 → 1.424.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 (32) hide show
  1. package/dist/connect.cjs +28 -14
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +20 -6
  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-webviews/connect-webview.d.ts +2 -4
  8. package/lib/seam/connect/models/connect-webviews/connect-webview.js +3 -9
  9. package/lib/seam/connect/models/connect-webviews/connect-webview.js.map +1 -1
  10. package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +3 -0
  11. package/lib/seam/connect/models/connected-accounts/connected-account.js +4 -0
  12. package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
  13. package/lib/seam/connect/models/devices/device-provider.d.ts +2 -2
  14. package/lib/seam/connect/models/index.d.ts +1 -0
  15. package/lib/seam/connect/models/index.js +1 -0
  16. package/lib/seam/connect/models/index.js.map +1 -1
  17. package/lib/seam/connect/models/provider-capability.d.ts +3 -0
  18. package/lib/seam/connect/models/provider-capability.js +11 -0
  19. package/lib/seam/connect/models/provider-capability.js.map +1 -0
  20. package/lib/seam/connect/openapi.d.ts +9 -1
  21. package/lib/seam/connect/openapi.js +12 -3
  22. package/lib/seam/connect/openapi.js.map +1 -1
  23. package/lib/seam/connect/route-types.d.ts +6 -3
  24. package/package.json +1 -1
  25. package/src/lib/seam/connect/internal/schemas.ts +1 -0
  26. package/src/lib/seam/connect/models/connect-webviews/connect-webview.ts +3 -16
  27. package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +6 -0
  28. package/src/lib/seam/connect/models/devices/device-provider.ts +2 -2
  29. package/src/lib/seam/connect/models/index.ts +1 -0
  30. package/src/lib/seam/connect/models/provider-capability.ts +13 -0
  31. package/src/lib/seam/connect/openapi.ts +14 -3
  32. package/src/lib/seam/connect/route-types.ts +12 -3
@@ -21854,7 +21854,6 @@ export interface Routes {
21854
21854
  connected_account_id: string | null;
21855
21855
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
21856
21856
  url: string;
21857
- /** */
21858
21857
  device_selection_mode: 'none' | 'single' | 'multiple';
21859
21858
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
21860
21859
  accepted_providers: string[];
@@ -21934,7 +21933,6 @@ export interface Routes {
21934
21933
  connected_account_id: string | null;
21935
21934
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
21936
21935
  url: string;
21937
- /** */
21938
21936
  device_selection_mode: 'none' | 'single' | 'multiple';
21939
21937
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
21940
21938
  accepted_providers: string[];
@@ -21998,7 +21996,6 @@ export interface Routes {
21998
21996
  connected_account_id: string | null;
21999
21997
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
22000
21998
  url: string;
22001
- /** */
22002
21999
  device_selection_mode: 'none' | 'single' | 'multiple';
22003
22000
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
22004
22001
  accepted_providers: string[];
@@ -22196,6 +22193,8 @@ export interface Routes {
22196
22193
  automatically_manage_new_devices: boolean;
22197
22194
  /** Your unique key for the customer associated with this connected account. */
22198
22195
  customer_key?: string | undefined;
22196
+ /** List of capabilities that were accepted during the account connection process. */
22197
+ accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
22199
22198
  };
22200
22199
  };
22201
22200
  };
@@ -22342,6 +22341,8 @@ export interface Routes {
22342
22341
  automatically_manage_new_devices: boolean;
22343
22342
  /** Your unique key for the customer associated with this connected account. */
22344
22343
  customer_key?: string | undefined;
22344
+ /** List of capabilities that were accepted during the account connection process. */
22345
+ accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
22345
22346
  }>;
22346
22347
  /** Information about the current page of results. */
22347
22348
  pagination: {
@@ -22507,6 +22508,8 @@ export interface Routes {
22507
22508
  automatically_manage_new_devices: boolean;
22508
22509
  /** Your unique key for the customer associated with this connected account. */
22509
22510
  customer_key?: string | undefined;
22511
+ /** List of capabilities that were accepted during the account connection process. */
22512
+ accepted_capabilities: Array<'lock' | 'thermostat' | 'noise_sensor' | 'access_control'>;
22510
22513
  };
22511
22514
  };
22512
22515
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.423.3",
3
+ "version": "1.424.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -65,6 +65,7 @@ export {
65
65
  phone_session,
66
66
  portal_configuration,
67
67
  property_resource,
68
+ provider_capability,
68
69
  reservation_resource,
69
70
  resident_resource,
70
71
  room_resource,
@@ -1,26 +1,13 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
+ import { provider_capability } from '../provider-capability.js'
4
5
 
5
6
  export const connect_webview_device_selection_mode = z.enum([
6
7
  'none',
7
8
  'single',
8
9
  'multiple',
9
- ]).describe(`
10
- ---
11
- undocumented: Not implemented.
12
- ---
13
- `)
14
-
15
- export const connect_webview_accepted_capabilities = z
16
- .enum(['lock', 'thermostat', 'noise_sensor', 'access_control'])
17
- .describe(
18
- 'High-level device capabilities that the Connect Webview can accept.',
19
- )
20
-
21
- export type ConnectWebviewAcceptedCapabilities = z.infer<
22
- typeof connect_webview_accepted_capabilities
23
- >
10
+ ])
24
11
 
25
12
  export const connect_webview = z.object({
26
13
  connect_webview_id: z.string().uuid().describe('ID of the Connect Webview.'),
@@ -57,7 +44,7 @@ export const connect_webview = z.object({
57
44
  ),
58
45
 
59
46
  accepted_capabilities: z
60
- .array(connect_webview_accepted_capabilities)
47
+ .array(provider_capability)
61
48
  .describe(
62
49
  'High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.',
63
50
  ),
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
3
  import { custom_metadata } from '../custom-metadata.js'
4
+ import { provider_capability } from '../provider-capability.js'
4
5
 
5
6
  const common_connected_account_error = z.object({
6
7
  created_at: z
@@ -312,6 +313,11 @@ export const connected_account = z.object({
312
313
  .describe(
313
314
  'Your unique key for the customer associated with this connected account.',
314
315
  ),
316
+ accepted_capabilities: z
317
+ .array(provider_capability)
318
+ .describe(
319
+ 'List of capabilities that were accepted during the account connection process.',
320
+ ),
315
321
  }).describe(`
316
322
  ---
317
323
  route_path: /connected_accounts
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- import type { ConnectWebviewAcceptedCapabilities } from '../connect-webviews/index.js'
3
+ import type { ProviderCapability } from '../provider-capability.js'
4
4
  import { device_capability_flags } from './device.js'
5
5
 
6
6
  export const DEVICE_PROVIDERS = {
@@ -149,7 +149,7 @@ export type DeviceProvider = z.infer<typeof device_provider>
149
149
 
150
150
  export const PROVIDER_CATEGORY_CAPABILITY_MAP: Record<
151
151
  ProviderCategory,
152
- ConnectWebviewAcceptedCapabilities[]
152
+ ProviderCapability[]
153
153
  > = {
154
154
  stable: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
155
155
  consumer_smartlocks: ['lock'],
@@ -21,6 +21,7 @@ export * from './pagination.js'
21
21
  export * from './partner/index.js'
22
22
  export * from './phone-number.js'
23
23
  export * from './phones/index.js'
24
+ export * from './provider-capability.js'
24
25
  export * from './spaces/index.js'
25
26
  export * from './thermostats/index.js'
26
27
  export * from './user-identities/index.js'
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod'
2
+
3
+ export const provider_capability = z.enum([
4
+ 'lock',
5
+ 'thermostat',
6
+ 'noise_sensor',
7
+ 'access_control',
8
+ ]).describe(`
9
+ High-level device capabilities that can be restricted in connect webviews.
10
+ These represent the main device categories that customers can opt into.
11
+ `)
12
+
13
+ export type ProviderCapability = z.infer<typeof provider_capability>
@@ -8714,7 +8714,7 @@ export default {
8714
8714
  'High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.',
8715
8715
  items: {
8716
8716
  description:
8717
- 'High-level device capabilities that the Connect Webview can accept.',
8717
+ '\n High-level device capabilities that can be restricted in connect webviews.\n These represent the main device categories that customers can opt into.\n',
8718
8718
  enum: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
8719
8719
  type: 'string',
8720
8720
  },
@@ -8798,7 +8798,6 @@ export default {
8798
8798
  device_selection_mode: {
8799
8799
  enum: ['none', 'single', 'multiple'],
8800
8800
  type: 'string',
8801
- 'x-undocumented': 'Not implemented.',
8802
8801
  },
8803
8802
  login_successful: {
8804
8803
  description:
@@ -8864,6 +8863,17 @@ export default {
8864
8863
  description:
8865
8864
  'Represents a [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks.',
8866
8865
  properties: {
8866
+ accepted_capabilities: {
8867
+ description:
8868
+ 'List of capabilities that were accepted during the account connection process.',
8869
+ items: {
8870
+ description:
8871
+ '\n High-level device capabilities that can be restricted in connect webviews.\n These represent the main device categories that customers can opt into.\n',
8872
+ enum: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
8873
+ type: 'string',
8874
+ },
8875
+ type: 'array',
8876
+ },
8867
8877
  account_type: {
8868
8878
  description: 'Type of connected account.',
8869
8879
  type: 'string',
@@ -9279,6 +9289,7 @@ export default {
9279
9289
  'warnings',
9280
9290
  'custom_metadata',
9281
9291
  'automatically_manage_new_devices',
9292
+ 'accepted_capabilities',
9282
9293
  ],
9283
9294
  type: 'object',
9284
9295
  'x-route-path': '/connected_accounts',
@@ -34789,7 +34800,7 @@ export default {
34789
34800
  'List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers.',
34790
34801
  items: {
34791
34802
  description:
34792
- 'High-level device capabilities that the Connect Webview can accept.',
34803
+ '\n High-level device capabilities that can be restricted in connect webviews.\n These represent the main device categories that customers can opt into.\n',
34793
34804
  enum: [
34794
34805
  'lock',
34795
34806
  'thermostat',
@@ -24910,7 +24910,6 @@ export interface Routes {
24910
24910
  connected_account_id: string | null
24911
24911
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
24912
24912
  url: string
24913
- /** */
24914
24913
  device_selection_mode: 'none' | 'single' | 'multiple'
24915
24914
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
24916
24915
  accepted_providers: string[]
@@ -24992,7 +24991,6 @@ export interface Routes {
24992
24991
  connected_account_id: string | null
24993
24992
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
24994
24993
  url: string
24995
- /** */
24996
24994
  device_selection_mode: 'none' | 'single' | 'multiple'
24997
24995
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
24998
24996
  accepted_providers: string[]
@@ -25058,7 +25056,6 @@ export interface Routes {
25058
25056
  connected_account_id: string | null
25059
25057
  /** URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. */
25060
25058
  url: string
25061
- /** */
25062
25059
  device_selection_mode: 'none' | 'single' | 'multiple'
25063
25060
  /** List of accepted [provider keys](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). */
25064
25061
  accepted_providers: string[]
@@ -25271,6 +25268,10 @@ export interface Routes {
25271
25268
  automatically_manage_new_devices: boolean
25272
25269
  /** Your unique key for the customer associated with this connected account. */
25273
25270
  customer_key?: string | undefined
25271
+ /** List of capabilities that were accepted during the account connection process. */
25272
+ accepted_capabilities: Array<
25273
+ 'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
25274
+ >
25274
25275
  }
25275
25276
  }
25276
25277
  }
@@ -25428,6 +25429,10 @@ export interface Routes {
25428
25429
  automatically_manage_new_devices: boolean
25429
25430
  /** Your unique key for the customer associated with this connected account. */
25430
25431
  customer_key?: string | undefined
25432
+ /** List of capabilities that were accepted during the account connection process. */
25433
+ accepted_capabilities: Array<
25434
+ 'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
25435
+ >
25431
25436
  }>
25432
25437
  /** Information about the current page of results. */
25433
25438
  pagination: {
@@ -25604,6 +25609,10 @@ export interface Routes {
25604
25609
  automatically_manage_new_devices: boolean
25605
25610
  /** Your unique key for the customer associated with this connected account. */
25606
25611
  customer_key?: string | undefined
25612
+ /** List of capabilities that were accepted during the account connection process. */
25613
+ accepted_capabilities: Array<
25614
+ 'lock' | 'thermostat' | 'noise_sensor' | 'access_control'
25615
+ >
25607
25616
  }
25608
25617
  }
25609
25618
  }