@seamapi/types 1.5.0 → 1.7.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/lib/seam/connect/route-types.d.ts +129 -10
  2. package/lib/seam/connect/unstable/model-types.d.ts +1 -1
  3. package/lib/seam/connect/unstable/models/acs/access_group.d.ts +29 -0
  4. package/lib/seam/connect/unstable/models/acs/access_group.js +12 -0
  5. package/lib/seam/connect/unstable/models/acs/access_group.js.map +1 -0
  6. package/lib/seam/connect/unstable/models/acs/index.d.ts +3 -0
  7. package/lib/seam/connect/unstable/models/acs/index.js +4 -0
  8. package/lib/seam/connect/unstable/models/acs/index.js.map +1 -0
  9. package/lib/seam/connect/unstable/models/acs/system.d.ts +23 -0
  10. package/lib/seam/connect/unstable/models/acs/system.js +10 -0
  11. package/lib/seam/connect/unstable/models/acs/system.js.map +1 -0
  12. package/lib/seam/connect/unstable/models/acs/user.d.ts +30 -0
  13. package/lib/seam/connect/unstable/models/acs/user.js +25 -0
  14. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -0
  15. package/lib/seam/connect/unstable/models/capability-properties/index.d.ts +42 -42
  16. package/lib/seam/connect/unstable/models/capability-properties/thermostat.d.ts +88 -88
  17. package/lib/seam/connect/unstable/models/index.d.ts +1 -0
  18. package/lib/seam/connect/unstable/models/index.js +1 -0
  19. package/lib/seam/connect/unstable/models/index.js.map +1 -1
  20. package/lib/seam/connect/unstable/models/managed-device.d.ts +90 -90
  21. package/lib/seam/connect/unstable/schemas.d.ts +1 -1
  22. package/lib/seam/connect/unstable/schemas.js +1 -1
  23. package/lib/seam/connect/unstable/schemas.js.map +1 -1
  24. package/package.json +8 -8
  25. package/src/lib/seam/connect/route-types.ts +129 -10
  26. package/src/lib/seam/connect/unstable/model-types.ts +5 -0
  27. package/src/lib/seam/connect/unstable/models/acs/access_group.ts +17 -0
  28. package/src/lib/seam/connect/unstable/models/acs/index.ts +3 -0
  29. package/src/lib/seam/connect/unstable/models/acs/system.ts +15 -0
  30. package/src/lib/seam/connect/unstable/models/acs/user.ts +31 -0
  31. package/src/lib/seam/connect/unstable/models/index.ts +1 -0
  32. package/src/lib/seam/connect/unstable/schemas.ts +5 -0
@@ -464,11 +464,66 @@ export interface Routes {
464
464
  acs_system_id: string;
465
465
  workspace_id: string;
466
466
  name: string;
467
- acs_access_group_type: 'pti_unit';
468
- created_at: string | Date;
467
+ access_group_type: 'pti_unit';
468
+ access_group_type_display_name: string;
469
+ created_at: string;
469
470
  };
470
471
  };
471
472
  };
473
+ '/acs/access_groups/delete': {
474
+ route: '/acs/access_groups/delete';
475
+ method: 'DELETE' | 'POST';
476
+ queryParams: {};
477
+ jsonBody: {};
478
+ commonParams: {
479
+ acs_access_group_id: string;
480
+ };
481
+ formData: {};
482
+ jsonResponse: {};
483
+ };
484
+ '/acs/access_groups/get': {
485
+ route: '/acs/access_groups/get';
486
+ method: 'GET' | 'POST';
487
+ queryParams: {};
488
+ jsonBody: {};
489
+ commonParams: {
490
+ acs_access_group_id: string;
491
+ };
492
+ formData: {};
493
+ jsonResponse: {
494
+ acs_access_group: {
495
+ acs_access_group_id: string;
496
+ acs_system_id: string;
497
+ workspace_id: string;
498
+ name: string;
499
+ access_group_type: 'pti_unit';
500
+ access_group_type_display_name: string;
501
+ created_at: string;
502
+ };
503
+ };
504
+ };
505
+ '/acs/access_groups/list': {
506
+ route: '/acs/access_groups/list';
507
+ method: 'GET' | 'POST';
508
+ queryParams: {};
509
+ jsonBody: {};
510
+ commonParams: {
511
+ acs_access_system_id?: string | undefined;
512
+ acs_user_id?: string | undefined;
513
+ };
514
+ formData: {};
515
+ jsonResponse: {
516
+ acs_access_groups: Array<{
517
+ acs_access_group_id: string;
518
+ acs_system_id: string;
519
+ workspace_id: string;
520
+ name: string;
521
+ access_group_type: 'pti_unit';
522
+ access_group_type_display_name: string;
523
+ created_at: string;
524
+ }>;
525
+ };
526
+ };
472
527
  '/acs/access_groups/update': {
473
528
  route: '/acs/access_groups/update';
474
529
  method: 'POST' | 'PATCH';
@@ -494,8 +549,9 @@ export interface Routes {
494
549
  acs_system: {
495
550
  acs_system_id: string;
496
551
  system_type: 'pti_site' | 'alta_org';
552
+ system_type_display_name: string;
497
553
  name: string;
498
- created_at: string | Date;
554
+ created_at: string;
499
555
  };
500
556
  };
501
557
  };
@@ -510,8 +566,9 @@ export interface Routes {
510
566
  acs_systems: Array<{
511
567
  acs_system_id: string;
512
568
  system_type: 'pti_site' | 'alta_org';
569
+ system_type_display_name: string;
513
570
  name: string;
514
- created_at: string | Date;
571
+ created_at: string;
515
572
  }>;
516
573
  };
517
574
  };
@@ -534,9 +591,10 @@ export interface Routes {
534
591
  jsonBody: {};
535
592
  commonParams: {
536
593
  acs_system_id: string;
537
- name?: string | undefined;
538
- email?: string | undefined;
539
594
  acs_access_group_ids?: string[];
595
+ full_name?: string | undefined;
596
+ email?: string | undefined;
597
+ phone_number?: string | undefined;
540
598
  };
541
599
  formData: {};
542
600
  jsonResponse: {
@@ -544,11 +602,69 @@ export interface Routes {
544
602
  acs_user_id: string;
545
603
  acs_system_id: string;
546
604
  workspace_id: string;
547
- name: string;
548
- created_at: string | Date;
605
+ created_at: string;
606
+ display_name: string;
607
+ full_name?: string | undefined;
608
+ email?: string | undefined;
609
+ phone_number?: string | undefined;
549
610
  };
550
611
  };
551
612
  };
613
+ '/acs/users/delete': {
614
+ route: '/acs/users/delete';
615
+ method: 'DELETE' | 'POST';
616
+ queryParams: {};
617
+ jsonBody: {};
618
+ commonParams: {
619
+ acs_user_id: string;
620
+ };
621
+ formData: {};
622
+ jsonResponse: {};
623
+ };
624
+ '/acs/users/get': {
625
+ route: '/acs/users/get';
626
+ method: 'GET' | 'POST';
627
+ queryParams: {};
628
+ jsonBody: {};
629
+ commonParams: {
630
+ acs_user_id: string;
631
+ };
632
+ formData: {};
633
+ jsonResponse: {
634
+ acs_user: {
635
+ acs_user_id: string;
636
+ acs_system_id: string;
637
+ workspace_id: string;
638
+ created_at: string;
639
+ display_name: string;
640
+ full_name?: string | undefined;
641
+ email?: string | undefined;
642
+ phone_number?: string | undefined;
643
+ };
644
+ };
645
+ };
646
+ '/acs/users/list': {
647
+ route: '/acs/users/list';
648
+ method: 'GET' | 'POST';
649
+ queryParams: {};
650
+ jsonBody: {};
651
+ commonParams: {
652
+ acs_system_id: string;
653
+ };
654
+ formData: {};
655
+ jsonResponse: {
656
+ acs_users: Array<{
657
+ acs_user_id: string;
658
+ acs_system_id: string;
659
+ workspace_id: string;
660
+ created_at: string;
661
+ display_name: string;
662
+ full_name?: string | undefined;
663
+ email?: string | undefined;
664
+ phone_number?: string | undefined;
665
+ }>;
666
+ };
667
+ };
552
668
  '/acs/users/remove_from_access_group': {
553
669
  route: '/acs/users/remove_from_access_group';
554
670
  method: 'POST' | 'PATCH';
@@ -568,8 +684,9 @@ export interface Routes {
568
684
  jsonBody: {};
569
685
  commonParams: {
570
686
  acs_user_id: string;
571
- name?: (string | null) | undefined;
572
- email?: (string | null) | undefined;
687
+ full_name?: string | undefined;
688
+ email?: string | undefined;
689
+ phone_number?: string | undefined;
573
690
  };
574
691
  formData: {};
575
692
  jsonResponse: {};
@@ -887,6 +1004,7 @@ export interface Routes {
887
1004
  exclusive?: boolean | undefined;
888
1005
  } | undefined;
889
1006
  account_type?: string | undefined;
1007
+ account_type_display_name: string;
890
1008
  errors?: any;
891
1009
  warnings?: any;
892
1010
  custom_metadata?: Record<string, string | number | boolean | null> | undefined;
@@ -912,6 +1030,7 @@ export interface Routes {
912
1030
  exclusive?: boolean | undefined;
913
1031
  } | undefined;
914
1032
  account_type?: string | undefined;
1033
+ account_type_display_name: string;
915
1034
  errors?: any;
916
1035
  warnings?: any;
917
1036
  custom_metadata?: Record<string, string | number | boolean | null> | undefined;
@@ -1 +1 @@
1
- export type { AccessCodeConstraint, AnyDeviceType, BatteryStatus, Capabilities, ClimateSetting, LockDeviceType, ManagedDevice, ManagedDeviceWithBackendMetadata, NoiseSensorDeviceType, ThermostatDeviceType, UnmanagedDevice, } from './models/index.js';
1
+ export type { AccessCodeConstraint, AcsAccessGroup, AcsAccessGroupType, AcsSystem, AcsSystemType, AcsUser, AnyDeviceType, BatteryStatus, Capabilities, ClimateSetting, LockDeviceType, ManagedDevice, ManagedDeviceWithBackendMetadata, NoiseSensorDeviceType, ThermostatDeviceType, UnmanagedDevice, } from './models/index.js';
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const acs_access_group_type: z.ZodEnum<["pti_unit"]>;
3
+ export type AcsAccessGroupType = z.infer<typeof acs_access_group_type>;
4
+ export declare const acs_access_group: z.ZodObject<{
5
+ acs_access_group_id: z.ZodString;
6
+ acs_system_id: z.ZodString;
7
+ workspace_id: z.ZodString;
8
+ name: z.ZodString;
9
+ access_group_type: z.ZodEnum<["pti_unit"]>;
10
+ access_group_type_display_name: z.ZodString;
11
+ created_at: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ name: string;
14
+ workspace_id: string;
15
+ created_at: string;
16
+ acs_access_group_id: string;
17
+ acs_system_id: string;
18
+ access_group_type: "pti_unit";
19
+ access_group_type_display_name: string;
20
+ }, {
21
+ name: string;
22
+ workspace_id: string;
23
+ created_at: string;
24
+ acs_access_group_id: string;
25
+ acs_system_id: string;
26
+ access_group_type: "pti_unit";
27
+ access_group_type_display_name: string;
28
+ }>;
29
+ export type AcsAccessGroup = z.output<typeof acs_access_group>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export const acs_access_group_type = z.enum(['pti_unit']);
3
+ export const acs_access_group = z.object({
4
+ acs_access_group_id: z.string().uuid(),
5
+ acs_system_id: z.string().uuid(),
6
+ workspace_id: z.string().uuid(),
7
+ name: z.string(),
8
+ access_group_type: acs_access_group_type,
9
+ access_group_type_display_name: z.string(),
10
+ created_at: z.string().datetime(),
11
+ });
12
+ //# sourceMappingURL=access_group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access_group.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/access_group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;AAIzD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACtC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,iBAAiB,EAAE,qBAAqB;IACxC,8BAA8B,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './access_group.js';
2
+ export * from './system.js';
3
+ export * from './user.js';
@@ -0,0 +1,4 @@
1
+ export * from './access_group.js';
2
+ export * from './system.js';
3
+ export * from './user.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const acs_system_type: z.ZodEnum<["pti_site", "alta_org"]>;
3
+ export type AcsSystemType = z.infer<typeof acs_system_type>;
4
+ export declare const acs_system: z.ZodObject<{
5
+ acs_system_id: z.ZodString;
6
+ system_type: z.ZodEnum<["pti_site", "alta_org"]>;
7
+ system_type_display_name: z.ZodString;
8
+ name: z.ZodString;
9
+ created_at: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ name: string;
12
+ created_at: string;
13
+ acs_system_id: string;
14
+ system_type: "pti_site" | "alta_org";
15
+ system_type_display_name: string;
16
+ }, {
17
+ name: string;
18
+ created_at: string;
19
+ acs_system_id: string;
20
+ system_type: "pti_site" | "alta_org";
21
+ system_type_display_name: string;
22
+ }>;
23
+ export type AcsSystem = z.output<typeof acs_system>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export const acs_system_type = z.enum(['pti_site', 'alta_org']);
3
+ export const acs_system = z.object({
4
+ acs_system_id: z.string().uuid(),
5
+ system_type: acs_system_type,
6
+ system_type_display_name: z.string(),
7
+ name: z.string(),
8
+ created_at: z.string().datetime(),
9
+ });
10
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;AAI/D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,WAAW,EAAE,eAAe;IAC5B,wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA"}
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const acs_user: z.ZodObject<{
3
+ workspace_id: z.ZodString;
4
+ created_at: z.ZodString;
5
+ display_name: z.ZodString;
6
+ acs_system_id: z.ZodString;
7
+ acs_user_id: z.ZodString;
8
+ full_name: z.ZodOptional<z.ZodString>;
9
+ email: z.ZodOptional<z.ZodString>;
10
+ phone_number: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ workspace_id: string;
13
+ created_at: string;
14
+ display_name: string;
15
+ acs_system_id: string;
16
+ acs_user_id: string;
17
+ full_name?: string | undefined;
18
+ email?: string | undefined;
19
+ phone_number?: string | undefined;
20
+ }, {
21
+ workspace_id: string;
22
+ created_at: string;
23
+ display_name: string;
24
+ acs_system_id: string;
25
+ acs_user_id: string;
26
+ full_name?: string | undefined;
27
+ email?: string | undefined;
28
+ phone_number?: string | undefined;
29
+ }>;
30
+ export type AcsUser = z.output<typeof acs_user>;
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ const user_fields = z.object({
3
+ full_name: z.string().optional(),
4
+ email: z.string().email().optional(),
5
+ phone_number: z.coerce
6
+ .string()
7
+ .trim()
8
+ .refine((val) => {
9
+ // https://www.twilio.com/docs/glossary/what-e164
10
+ return /^\+[1-9]\d{1,14}$/.test(val);
11
+ }, {
12
+ message: 'Phone number must be in E.164 format: +14155552671',
13
+ })
14
+ .optional(),
15
+ });
16
+ export const acs_user = z
17
+ .object({
18
+ acs_user_id: z.string().uuid(),
19
+ acs_system_id: z.string().uuid(),
20
+ workspace_id: z.string().uuid(),
21
+ created_at: z.string().datetime(),
22
+ display_name: z.string(),
23
+ })
24
+ .merge(user_fields);
25
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/acs/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM;SACnB,MAAM,EAAE;SACR,IAAI,EAAE;SACN,MAAM,CACL,CAAC,GAAG,EAAE,EAAE;QACN,iDAAiD;QACjD,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtC,CAAC,EACD;QACE,OAAO,EAAE,oDAAoD;KAC9D,CACF;SACA,QAAQ,EAAE;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC;KACD,KAAK,CAAC,WAAW,CAAC,CAAA"}