@seamapi/types 1.369.1 → 1.370.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 (54) hide show
  1. package/dist/connect.cjs +380 -5
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +525 -28
  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/access-grants/access-grant.d.ts +57 -0
  8. package/lib/seam/connect/models/access-grants/access-grant.js +29 -0
  9. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -0
  10. package/lib/seam/connect/models/access-grants/access-method.d.ts +21 -0
  11. package/lib/seam/connect/models/access-grants/access-method.js +24 -0
  12. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -0
  13. package/lib/seam/connect/models/access-grants/index.d.ts +2 -0
  14. package/lib/seam/connect/models/access-grants/index.js +3 -0
  15. package/lib/seam/connect/models/access-grants/index.js.map +1 -0
  16. package/lib/seam/connect/models/acs/acs-credential-provisioning-automation.d.ts +4 -4
  17. package/lib/seam/connect/models/acs/acs-credential.d.ts +4 -4
  18. package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +4 -4
  19. package/lib/seam/connect/models/acs/acs-users/acs-user.js +2 -0
  20. package/lib/seam/connect/models/acs/acs-users/acs-user.js.map +1 -1
  21. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +20 -20
  22. package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +8 -8
  23. package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +12 -12
  24. package/lib/seam/connect/models/bridges/{bridge_client_session.js → bridge-client-session.js} +1 -1
  25. package/lib/seam/connect/models/bridges/{bridge_client_session.js.map → bridge-client-session.js.map} +1 -1
  26. package/lib/seam/connect/models/bridges/bridge-connected-system.d.ts +30 -0
  27. package/lib/seam/connect/models/bridges/bridge-connected-system.js +17 -0
  28. package/lib/seam/connect/models/bridges/bridge-connected-system.js.map +1 -0
  29. package/lib/seam/connect/models/bridges/index.d.ts +2 -1
  30. package/lib/seam/connect/models/bridges/index.js +2 -1
  31. package/lib/seam/connect/models/bridges/index.js.map +1 -1
  32. package/lib/seam/connect/models/index.d.ts +1 -0
  33. package/lib/seam/connect/models/index.js +1 -0
  34. package/lib/seam/connect/models/index.js.map +1 -1
  35. package/lib/seam/connect/models/pagination.js +1 -0
  36. package/lib/seam/connect/models/pagination.js.map +1 -1
  37. package/lib/seam/connect/openapi.d.ts +408 -0
  38. package/lib/seam/connect/openapi.js +375 -0
  39. package/lib/seam/connect/openapi.js.map +1 -1
  40. package/lib/seam/connect/route-types.d.ts +89 -0
  41. package/package.json +1 -1
  42. package/src/lib/seam/connect/internal/schemas.ts +3 -0
  43. package/src/lib/seam/connect/models/access-grants/access-grant.ts +34 -0
  44. package/src/lib/seam/connect/models/access-grants/access-method.ts +28 -0
  45. package/src/lib/seam/connect/models/access-grants/index.ts +2 -0
  46. package/src/lib/seam/connect/models/acs/acs-users/acs-user.ts +2 -0
  47. package/src/lib/seam/connect/models/bridges/bridge-connected-system.ts +19 -0
  48. package/src/lib/seam/connect/models/bridges/index.ts +2 -1
  49. package/src/lib/seam/connect/models/index.ts +1 -0
  50. package/src/lib/seam/connect/models/pagination.ts +1 -0
  51. package/src/lib/seam/connect/openapi.ts +400 -0
  52. package/src/lib/seam/connect/route-types.ts +96 -0
  53. /package/lib/seam/connect/models/bridges/{bridge_client_session.d.ts → bridge-client-session.d.ts} +0 -0
  54. /package/src/lib/seam/connect/models/bridges/{bridge_client_session.ts → bridge-client-session.ts} +0 -0
@@ -29277,6 +29277,26 @@ export interface Routes {
29277
29277
  };
29278
29278
  };
29279
29279
  };
29280
+ '/seam/bridge/v1/bridge_connected_systems/list': {
29281
+ route: '/seam/bridge/v1/bridge_connected_systems/list';
29282
+ method: 'GET' | 'POST';
29283
+ queryParams: {};
29284
+ jsonBody: {};
29285
+ commonParams: {};
29286
+ formData: {};
29287
+ jsonResponse: {
29288
+ bridge_connected_systems: Array<{
29289
+ bridge_id: string;
29290
+ bridge_created_at: string;
29291
+ connected_account_id: string;
29292
+ connected_account_created_at: string;
29293
+ acs_system_id: string;
29294
+ acs_system_display_name: string;
29295
+ workspace_id: string;
29296
+ workspace_display_name: string;
29297
+ }>;
29298
+ };
29299
+ };
29280
29300
  '/thermostats/activate_climate_preset': {
29281
29301
  route: '/thermostats/activate_climate_preset';
29282
29302
  method: 'POST';
@@ -38541,6 +38561,74 @@ export interface Routes {
38541
38561
  formData: {};
38542
38562
  jsonResponse: {};
38543
38563
  };
38564
+ '/unstable_access_grants/create': {
38565
+ route: '/unstable_access_grants/create';
38566
+ method: 'POST';
38567
+ queryParams: {};
38568
+ jsonBody: {};
38569
+ commonParams: ({
38570
+ /** ID of user identity for whom access is being granted. */
38571
+ user_identity_id?: string | undefined;
38572
+ } | {
38573
+ /** When used, creates a new user identity with the given details, and grants them access. */
38574
+ user_identity?: {
38575
+ /** Unique email address for the user identity. */
38576
+ email_address?: (string | null) | undefined;
38577
+ /** Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). */
38578
+ phone_number?: (string | null) | undefined;
38579
+ full_name?: (string | null) | undefined;
38580
+ } | undefined;
38581
+ }) & {
38582
+ /** Set of IDs of existing locations to which access is being granted. */
38583
+ location_ids?: string[] | undefined;
38584
+ /** When used, creates a new location with the given entrances and devices, and gives the user access to this location. */
38585
+ location?: {
38586
+ /** Set of IDs of the [entrances](https://docs.seam.co/latest/api/acs/systems/list) to add to the location to which access is being granted. */
38587
+ acs_entrance_ids?: string[];
38588
+ /** Set of IDs of the [devices](https://docs.seam.co/latest/api/devices/list) to add to the location to which access is being granted. */
38589
+ device_ids?: string[];
38590
+ } | undefined;
38591
+ desired_access_methods: Array<{
38592
+ /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
38593
+ mode: 'code' | 'card' | 'mobile_key';
38594
+ }>;
38595
+ /** Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
38596
+ starts_at?: string | undefined;
38597
+ /** Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. */
38598
+ ends_at?: string | undefined;
38599
+ };
38600
+ formData: {};
38601
+ jsonResponse: {
38602
+ /** */
38603
+ access_grant: {
38604
+ /** Unique identifier for the Seam workspace associated with the access grant. */
38605
+ workspace_id: string;
38606
+ /** ID of the access grant. */
38607
+ access_grant_id: string;
38608
+ /** ID of user identity to which access is being granted. */
38609
+ user_identity_id: string;
38610
+ /** IDs of the locations to which access is being given. */
38611
+ location_ids: string[];
38612
+ /** Access methods associated with this access grant. */
38613
+ access_methods: Array<{
38614
+ /** Key for the access method - unique within an access grant. */
38615
+ access_method_key: string;
38616
+ /** Display name of the access method. */
38617
+ display_name: string;
38618
+ /** Access method mode. Supported values: `code`, `card`, `mobile_key`. */
38619
+ mode: 'code' | 'card' | 'mobile_key';
38620
+ /** Date and time at which the access method was created. */
38621
+ created_at: string;
38622
+ /** Date and time at which the access method was issued. */
38623
+ issued_at: string | null;
38624
+ }>;
38625
+ /** Display name of the access grant. */
38626
+ display_name: string;
38627
+ /** Date and time at which the access grant was created. */
38628
+ created_at: string;
38629
+ };
38630
+ };
38631
+ };
38544
38632
  '/unstable_locations/add_devices': {
38545
38633
  route: '/unstable_locations/add_devices';
38546
38634
  method: 'POST' | 'PUT';
@@ -40757,6 +40845,7 @@ export interface Routes {
40757
40845
  webview_primary_button_color?: string | undefined;
40758
40846
  webview_primary_button_text_color?: string | undefined;
40759
40847
  webview_logo_shape?: ('circle' | 'square') | undefined;
40848
+ webview_success_message?: string | undefined;
40760
40849
  };
40761
40850
  commonParams: {};
40762
40851
  formData: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.369.1",
3
+ "version": "1.370.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,5 +1,7 @@
1
1
  export {
2
2
  access_code_code_constraint,
3
+ access_grant,
4
+ access_method,
3
5
  acs_access_group,
4
6
  acs_access_group_external_type,
5
7
  acs_credential,
@@ -18,6 +20,7 @@ export {
18
20
  battery_status,
19
21
  bridge,
20
22
  bridge_client_session,
23
+ bridge_connected_system,
21
24
  capabilities,
22
25
  climate_preset,
23
26
  climate_setting,
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod'
2
+
3
+ import { access_method } from './access-method.js'
4
+
5
+ export const access_grant = z.object({
6
+ workspace_id: z
7
+ .string()
8
+ .uuid()
9
+ .describe(
10
+ 'Unique identifier for the Seam workspace associated with the access grant.',
11
+ ),
12
+ access_grant_id: z.string().uuid().describe('ID of the access grant.'),
13
+ user_identity_id: z
14
+ .string()
15
+ .uuid()
16
+ .describe('ID of user identity to which access is being granted.'),
17
+ location_ids: z
18
+ .array(z.string().uuid())
19
+ .describe('IDs of the locations to which access is being given.'),
20
+ access_methods: z
21
+ .array(access_method)
22
+ .describe('Access methods associated with this access grant.'),
23
+ display_name: z.string().describe('Display name of the access grant.'),
24
+ created_at: z
25
+ .string()
26
+ .datetime()
27
+ .describe('Date and time at which the access grant was created.'),
28
+ }).describe(`
29
+ ---
30
+ undocumented: Unreleased.
31
+ ---
32
+ `)
33
+
34
+ export type AccessGrant = z.infer<typeof access_grant>
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod'
2
+
3
+ export const access_method = z.object({
4
+ access_method_key: z
5
+ .string()
6
+ .describe('Key for the access method - unique within an access grant.'),
7
+ display_name: z.string().describe('Display name of the access method.'),
8
+ mode: z
9
+ .enum(['code', 'card', 'mobile_key'])
10
+ .describe(
11
+ 'Access method mode. Supported values: `code`, `card`, `mobile_key`.',
12
+ ),
13
+ created_at: z
14
+ .string()
15
+ .datetime()
16
+ .describe('Date and time at which the access method was created.'),
17
+ issued_at: z
18
+ .string()
19
+ .datetime()
20
+ .nullable()
21
+ .describe('Date and time at which the access method was issued.'),
22
+ }).describe(`
23
+ ---
24
+ undocumented: Unreleased.
25
+ ---
26
+ `)
27
+
28
+ export type AccessMethod = z.infer<typeof access_method>
@@ -0,0 +1,2 @@
1
+ export * from './access-grant.js'
2
+ export * from './access-method.js'
@@ -193,6 +193,8 @@ export type AcsUserUnappliedModificationMap = z.infer<
193
193
  const user_fields = z.object({
194
194
  full_name: z
195
195
  .string()
196
+ .trim()
197
+ .min(1)
196
198
  .optional()
197
199
  .describe(
198
200
  'Full name of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management).',
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod'
2
+
3
+ export const bridge_connected_system = z.object({
4
+ bridge_id: z.string().uuid(),
5
+ bridge_created_at: z.string().datetime(),
6
+ connected_account_id: z.string().uuid(),
7
+ connected_account_created_at: z.string().datetime(),
8
+ acs_system_id: z.string().uuid(),
9
+ acs_system_display_name: z.string(),
10
+ workspace_id: z.string().uuid(),
11
+ workspace_display_name: z.string(),
12
+ }).describe(`
13
+ ---
14
+ route_path: /seam/bridge/v1/bridge_connected_systems
15
+ undocumented: Seam Bridge Client only.
16
+ ---
17
+ `)
18
+
19
+ export type BridgeConnectedSystem = z.infer<typeof bridge_connected_system>
@@ -1,2 +1,3 @@
1
1
  export * from './bridge.js'
2
- export * from './bridge_client_session.js'
2
+ export * from './bridge-client-session.js'
3
+ export * from './bridge-connected-system.js'
@@ -1,4 +1,5 @@
1
1
  export * from './access-codes/index.js'
2
+ export * from './access-grants/index.js'
2
3
  export * from './acs/index.js'
3
4
  export * from './action-attempts/index.js'
4
5
  export * from './bridges/index.js'
@@ -4,6 +4,7 @@ export const pagination = z
4
4
  .object({
5
5
  next_page_cursor: z
6
6
  .string()
7
+ .base64()
7
8
  .nullable()
8
9
  .describe(
9
10
  'Opaque value that can be used to select the next page of results via the `page_cursor` parameter.',