@seamapi/types 1.6.0 → 1.7.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 (41) hide show
  1. package/dist/connect.cjs +3158 -1527
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +4323 -2005
  4. package/lib/seam/connect/openapi.d.ts +4323 -2005
  5. package/lib/seam/connect/openapi.js +3372 -1741
  6. package/lib/seam/connect/openapi.js.map +1 -1
  7. package/lib/seam/connect/route-types.d.ts +76 -11
  8. package/lib/seam/connect/unstable/model-types.d.ts +1 -1
  9. package/lib/seam/connect/unstable/models/acs/access_group.d.ts +29 -0
  10. package/lib/seam/connect/unstable/models/acs/access_group.js +12 -0
  11. package/lib/seam/connect/unstable/models/acs/access_group.js.map +1 -0
  12. package/lib/seam/connect/unstable/models/acs/index.d.ts +3 -0
  13. package/lib/seam/connect/unstable/models/acs/index.js +4 -0
  14. package/lib/seam/connect/unstable/models/acs/index.js.map +1 -0
  15. package/lib/seam/connect/unstable/models/acs/system.d.ts +23 -0
  16. package/lib/seam/connect/unstable/models/acs/system.js +10 -0
  17. package/lib/seam/connect/unstable/models/acs/system.js.map +1 -0
  18. package/lib/seam/connect/unstable/models/acs/user.d.ts +30 -0
  19. package/lib/seam/connect/unstable/models/acs/user.js +25 -0
  20. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -0
  21. package/lib/seam/connect/unstable/models/capability-properties/index.d.ts +48 -48
  22. package/lib/seam/connect/unstable/models/capability-properties/thermostat.d.ts +104 -104
  23. package/lib/seam/connect/unstable/models/device-metadata.d.ts +4 -4
  24. package/lib/seam/connect/unstable/models/index.d.ts +1 -0
  25. package/lib/seam/connect/unstable/models/index.js +1 -0
  26. package/lib/seam/connect/unstable/models/index.js.map +1 -1
  27. package/lib/seam/connect/unstable/models/managed-device.d.ts +115 -115
  28. package/lib/seam/connect/unstable/models/unmanaged-device.d.ts +3 -3
  29. package/lib/seam/connect/unstable/schemas.d.ts +1 -1
  30. package/lib/seam/connect/unstable/schemas.js +1 -1
  31. package/lib/seam/connect/unstable/schemas.js.map +1 -1
  32. package/package.json +8 -8
  33. package/src/lib/seam/connect/openapi.ts +3372 -1741
  34. package/src/lib/seam/connect/route-types.ts +76 -11
  35. package/src/lib/seam/connect/unstable/model-types.ts +5 -0
  36. package/src/lib/seam/connect/unstable/models/acs/access_group.ts +17 -0
  37. package/src/lib/seam/connect/unstable/models/acs/index.ts +3 -0
  38. package/src/lib/seam/connect/unstable/models/acs/system.ts +15 -0
  39. package/src/lib/seam/connect/unstable/models/acs/user.ts +31 -0
  40. package/src/lib/seam/connect/unstable/models/index.ts +1 -0
  41. package/src/lib/seam/connect/unstable/schemas.ts +5 -0
@@ -479,7 +479,8 @@ export interface Routes {
479
479
  workspace_id: string
480
480
  name: string
481
481
  access_group_type: 'pti_unit'
482
- created_at: string | Date
482
+ access_group_type_display_name: string
483
+ created_at: string
483
484
  }
484
485
  }
485
486
  }
@@ -510,7 +511,8 @@ export interface Routes {
510
511
  workspace_id: string
511
512
  name: string
512
513
  access_group_type: 'pti_unit'
513
- created_at: string | Date
514
+ access_group_type_display_name: string
515
+ created_at: string
514
516
  }
515
517
  }
516
518
  }
@@ -531,7 +533,8 @@ export interface Routes {
531
533
  workspace_id: string
532
534
  name: string
533
535
  access_group_type: 'pti_unit'
534
- created_at: string | Date
536
+ access_group_type_display_name: string
537
+ created_at: string
535
538
  }>
536
539
  }
537
540
  }
@@ -560,8 +563,9 @@ export interface Routes {
560
563
  acs_system: {
561
564
  acs_system_id: string
562
565
  system_type: 'pti_site' | 'alta_org'
566
+ system_type_display_name: string
563
567
  name: string
564
- created_at: string | Date
568
+ created_at: string
565
569
  }
566
570
  }
567
571
  }
@@ -576,8 +580,9 @@ export interface Routes {
576
580
  acs_systems: Array<{
577
581
  acs_system_id: string
578
582
  system_type: 'pti_site' | 'alta_org'
583
+ system_type_display_name: string
579
584
  name: string
580
- created_at: string | Date
585
+ created_at: string
581
586
  }>
582
587
  }
583
588
  }
@@ -600,9 +605,10 @@ export interface Routes {
600
605
  jsonBody: {}
601
606
  commonParams: {
602
607
  acs_system_id: string
603
- name?: string | undefined
604
- email?: string | undefined
605
608
  acs_access_group_ids?: string[]
609
+ full_name?: string | undefined
610
+ email?: string | undefined
611
+ phone_number?: string | undefined
606
612
  }
607
613
  formData: {}
608
614
  jsonResponse: {
@@ -610,11 +616,69 @@ export interface Routes {
610
616
  acs_user_id: string
611
617
  acs_system_id: string
612
618
  workspace_id: string
613
- name: string
614
- created_at: string | Date
619
+ created_at: string
620
+ display_name: string
621
+ full_name?: string | undefined
622
+ email?: string | undefined
623
+ phone_number?: string | undefined
615
624
  }
616
625
  }
617
626
  }
627
+ '/acs/users/delete': {
628
+ route: '/acs/users/delete'
629
+ method: 'DELETE' | 'POST'
630
+ queryParams: {}
631
+ jsonBody: {}
632
+ commonParams: {
633
+ acs_user_id: string
634
+ }
635
+ formData: {}
636
+ jsonResponse: {}
637
+ }
638
+ '/acs/users/get': {
639
+ route: '/acs/users/get'
640
+ method: 'GET' | 'POST'
641
+ queryParams: {}
642
+ jsonBody: {}
643
+ commonParams: {
644
+ acs_user_id: string
645
+ }
646
+ formData: {}
647
+ jsonResponse: {
648
+ acs_user: {
649
+ acs_user_id: string
650
+ acs_system_id: string
651
+ workspace_id: string
652
+ created_at: string
653
+ display_name: string
654
+ full_name?: string | undefined
655
+ email?: string | undefined
656
+ phone_number?: string | undefined
657
+ }
658
+ }
659
+ }
660
+ '/acs/users/list': {
661
+ route: '/acs/users/list'
662
+ method: 'GET' | 'POST'
663
+ queryParams: {}
664
+ jsonBody: {}
665
+ commonParams: {
666
+ acs_system_id: string
667
+ }
668
+ formData: {}
669
+ jsonResponse: {
670
+ acs_users: Array<{
671
+ acs_user_id: string
672
+ acs_system_id: string
673
+ workspace_id: string
674
+ created_at: string
675
+ display_name: string
676
+ full_name?: string | undefined
677
+ email?: string | undefined
678
+ phone_number?: string | undefined
679
+ }>
680
+ }
681
+ }
618
682
  '/acs/users/remove_from_access_group': {
619
683
  route: '/acs/users/remove_from_access_group'
620
684
  method: 'POST' | 'PATCH'
@@ -634,8 +698,9 @@ export interface Routes {
634
698
  jsonBody: {}
635
699
  commonParams: {
636
700
  acs_user_id: string
637
- name?: (string | null) | undefined
638
- email?: (string | null) | undefined
701
+ full_name?: string | undefined
702
+ email?: string | undefined
703
+ phone_number?: string | undefined
639
704
  }
640
705
  formData: {}
641
706
  jsonResponse: {}
@@ -1,5 +1,10 @@
1
1
  export type {
2
2
  AccessCodeConstraint,
3
+ AcsAccessGroup,
4
+ AcsAccessGroupType,
5
+ AcsSystem,
6
+ AcsSystemType,
7
+ AcsUser,
3
8
  AnyDeviceType,
4
9
  BatteryStatus,
5
10
  Capabilities,
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod'
2
+
3
+ export const acs_access_group_type = z.enum(['pti_unit'])
4
+
5
+ export type AcsAccessGroupType = z.infer<typeof acs_access_group_type>
6
+
7
+ export const acs_access_group = z.object({
8
+ acs_access_group_id: z.string().uuid(),
9
+ acs_system_id: z.string().uuid(),
10
+ workspace_id: z.string().uuid(),
11
+ name: z.string(),
12
+ access_group_type: acs_access_group_type,
13
+ access_group_type_display_name: z.string(),
14
+ created_at: z.string().datetime(),
15
+ })
16
+
17
+ export type AcsAccessGroup = z.output<typeof acs_access_group>
@@ -0,0 +1,3 @@
1
+ export * from './access_group.js'
2
+ export * from './system.js'
3
+ export * from './user.js'
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod'
2
+
3
+ export const acs_system_type = z.enum(['pti_site', 'alta_org'])
4
+
5
+ export type AcsSystemType = z.infer<typeof acs_system_type>
6
+
7
+ export const acs_system = z.object({
8
+ acs_system_id: z.string().uuid(),
9
+ system_type: acs_system_type,
10
+ system_type_display_name: z.string(),
11
+ name: z.string(),
12
+ created_at: z.string().datetime(),
13
+ })
14
+
15
+ export type AcsSystem = z.output<typeof acs_system>
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod'
2
+
3
+ const user_fields = z.object({
4
+ full_name: z.string().optional(),
5
+ email: z.string().email().optional(),
6
+ phone_number: z.coerce
7
+ .string()
8
+ .trim()
9
+ .refine(
10
+ (val) => {
11
+ // https://www.twilio.com/docs/glossary/what-e164
12
+ return /^\+[1-9]\d{1,14}$/.test(val)
13
+ },
14
+ {
15
+ message: 'Phone number must be in E.164 format: +14155552671',
16
+ },
17
+ )
18
+ .optional(),
19
+ })
20
+
21
+ export const acs_user = z
22
+ .object({
23
+ acs_user_id: z.string().uuid(),
24
+ acs_system_id: z.string().uuid(),
25
+ workspace_id: z.string().uuid(),
26
+ created_at: z.string().datetime(),
27
+ display_name: z.string(),
28
+ })
29
+ .merge(user_fields)
30
+
31
+ export type AcsUser = z.output<typeof acs_user>
@@ -1,3 +1,4 @@
1
+ export * from './acs/index.js'
1
2
  export * from './capabilities-supported.js'
2
3
  export * from './capability-properties/index.js'
3
4
  export * from './device-type.js'
@@ -1,5 +1,10 @@
1
1
  export {
2
2
  access_code_code_constraint,
3
+ acs_access_group,
4
+ acs_access_group_type,
5
+ acs_system,
6
+ acs_system_type,
7
+ acs_user,
3
8
  any_device_type,
4
9
  battery_status,
5
10
  capabilities,