@seamapi/types 1.86.0 → 1.88.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 (26) hide show
  1. package/dist/connect.cjs +66 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +137 -0
  4. package/lib/seam/connect/openapi.d.ts +132 -0
  5. package/lib/seam/connect/openapi.js +66 -0
  6. package/lib/seam/connect/openapi.js.map +1 -1
  7. package/lib/seam/connect/route-types.d.ts +5 -0
  8. package/lib/seam/connect/unstable/models/events/access_code_events.d.ts +70 -0
  9. package/lib/seam/connect/unstable/models/events/access_code_events.js +33 -0
  10. package/lib/seam/connect/unstable/models/events/access_code_events.js.map +1 -0
  11. package/lib/seam/connect/unstable/models/events/connected_account_events.d.ts +48 -0
  12. package/lib/seam/connect/unstable/models/events/connected_account_events.js +24 -0
  13. package/lib/seam/connect/unstable/models/events/connected_account_events.js.map +1 -0
  14. package/lib/seam/connect/unstable/models/events/device_events.d.ts +63 -0
  15. package/lib/seam/connect/unstable/models/events/device_events.js +21 -0
  16. package/lib/seam/connect/unstable/models/events/device_events.js.map +1 -0
  17. package/lib/seam/connect/unstable/models/events/lock_events.d.ts +42 -0
  18. package/lib/seam/connect/unstable/models/events/lock_events.js +22 -0
  19. package/lib/seam/connect/unstable/models/events/lock_events.js.map +1 -0
  20. package/package.json +1 -1
  21. package/src/lib/seam/connect/openapi.ts +66 -0
  22. package/src/lib/seam/connect/route-types.ts +5 -0
  23. package/src/lib/seam/connect/unstable/models/events/access_code_events.ts +37 -0
  24. package/src/lib/seam/connect/unstable/models/events/connected_account_events.ts +27 -0
  25. package/src/lib/seam/connect/unstable/models/events/device_events.ts +24 -0
  26. package/src/lib/seam/connect/unstable/models/events/lock_events.ts +25 -0
@@ -2225,6 +2225,7 @@ export interface Routes {
2225
2225
  limit?: number;
2226
2226
  created_before?: Date | undefined;
2227
2227
  user_identifier_key?: string | undefined;
2228
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined;
2228
2229
  };
2229
2230
  formData: {};
2230
2231
  jsonResponse: {
@@ -2790,6 +2791,7 @@ export interface Routes {
2790
2791
  limit?: number;
2791
2792
  created_before?: Date | undefined;
2792
2793
  user_identifier_key?: string | undefined;
2794
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined;
2793
2795
  };
2794
2796
  formData: {};
2795
2797
  jsonResponse: {
@@ -2879,6 +2881,7 @@ export interface Routes {
2879
2881
  } | undefined;
2880
2882
  name?: (string | null) | undefined;
2881
2883
  is_managed?: boolean;
2884
+ custom_metadata?: Record<string, string | boolean | null> | undefined;
2882
2885
  };
2883
2886
  formData: {};
2884
2887
  jsonResponse: {};
@@ -3943,6 +3946,7 @@ export interface Routes {
3943
3946
  limit?: number;
3944
3947
  created_before?: Date | undefined;
3945
3948
  user_identifier_key?: string | undefined;
3949
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined;
3946
3950
  };
3947
3951
  formData: {};
3948
3952
  jsonResponse: {
@@ -6775,6 +6779,7 @@ export interface Routes {
6775
6779
  limit?: number;
6776
6780
  created_before?: Date | undefined;
6777
6781
  user_identifier_key?: string | undefined;
6782
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined;
6778
6783
  };
6779
6784
  formData: {};
6780
6785
  jsonResponse: {
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ export declare const access_code_event_map: {
3
+ access_code_created: z.ZodObject<{
4
+ event_type: z.ZodLiteral<"access_code.created">;
5
+ device_id: z.ZodString;
6
+ workspace_id: z.ZodString;
7
+ access_code_id: z.ZodString;
8
+ connected_account_id: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ connected_account_id: string;
11
+ workspace_id: string;
12
+ access_code_id: string;
13
+ device_id: string;
14
+ event_type: "access_code.created";
15
+ }, {
16
+ connected_account_id: string;
17
+ workspace_id: string;
18
+ access_code_id: string;
19
+ device_id: string;
20
+ event_type: "access_code.created";
21
+ }>;
22
+ access_code_changed: z.ZodObject<{
23
+ event_type: z.ZodLiteral<"access_code.changed">;
24
+ device_id: z.ZodString;
25
+ workspace_id: z.ZodString;
26
+ access_code_id: z.ZodString;
27
+ }, "strip", z.ZodTypeAny, {
28
+ workspace_id: string;
29
+ access_code_id: string;
30
+ device_id: string;
31
+ event_type: "access_code.changed";
32
+ }, {
33
+ workspace_id: string;
34
+ access_code_id: string;
35
+ device_id: string;
36
+ event_type: "access_code.changed";
37
+ }>;
38
+ access_code_scheduled_on_device: z.ZodObject<{
39
+ event_type: z.ZodLiteral<"access_code.scheduled_on_device">;
40
+ device_id: z.ZodString;
41
+ connected_account_id: z.ZodString;
42
+ workspace_id: z.ZodString;
43
+ }, "strip", z.ZodTypeAny, {
44
+ connected_account_id: string;
45
+ workspace_id: string;
46
+ device_id: string;
47
+ event_type: "access_code.scheduled_on_device";
48
+ }, {
49
+ connected_account_id: string;
50
+ workspace_id: string;
51
+ device_id: string;
52
+ event_type: "access_code.scheduled_on_device";
53
+ }>;
54
+ backup_access_code_pulled: z.ZodObject<{
55
+ event_type: z.ZodLiteral<"backup_access_code.pulled">;
56
+ device_id: z.ZodString;
57
+ workspace_id: z.ZodString;
58
+ connected_account_id: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ connected_account_id: string;
61
+ workspace_id: string;
62
+ device_id: string;
63
+ event_type: "backup_access_code.pulled";
64
+ }, {
65
+ connected_account_id: string;
66
+ workspace_id: string;
67
+ device_id: string;
68
+ event_type: "backup_access_code.pulled";
69
+ }>;
70
+ };
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ const access_code_created = z.object({
3
+ event_type: z.literal('access_code.created'),
4
+ device_id: z.string().uuid(),
5
+ workspace_id: z.string().uuid(),
6
+ access_code_id: z.string().uuid(),
7
+ connected_account_id: z.string().uuid(),
8
+ });
9
+ const access_code_changed = z.object({
10
+ event_type: z.literal('access_code.changed'),
11
+ device_id: z.string().uuid(),
12
+ workspace_id: z.string().uuid(),
13
+ access_code_id: z.string().uuid(),
14
+ });
15
+ const access_code_scheduled_on_device = z.object({
16
+ event_type: z.literal('access_code.scheduled_on_device'),
17
+ device_id: z.string().uuid(),
18
+ connected_account_id: z.string().uuid(),
19
+ workspace_id: z.string().uuid(),
20
+ });
21
+ const backup_access_code_pulled = z.object({
22
+ event_type: z.literal('backup_access_code.pulled'),
23
+ device_id: z.string().uuid(),
24
+ workspace_id: z.string().uuid(),
25
+ connected_account_id: z.string().uuid(),
26
+ });
27
+ export const access_code_event_map = {
28
+ access_code_created,
29
+ access_code_changed,
30
+ access_code_scheduled_on_device,
31
+ backup_access_code_pulled,
32
+ };
33
+ //# sourceMappingURL=access_code_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access_code_events.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/events/access_code_events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACjC,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACxC,CAAC,CAAA;AAEF,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC;IAC5C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAClC,CAAC,CAAA;AAEF,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC;IACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA;AAEF,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACxC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,mBAAmB;IACnB,mBAAmB;IACnB,+BAA+B;IAC/B,yBAAyB;CAC1B,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ export declare const connected_account_event_map: {
3
+ connected_account_connected: z.ZodObject<{
4
+ event_type: z.ZodLiteral<"connected_account.connected">;
5
+ connected_account_id: z.ZodString;
6
+ workspace_id: z.ZodString;
7
+ connect_webview_id: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ connect_webview_id: string;
10
+ connected_account_id: string;
11
+ workspace_id: string;
12
+ event_type: "connected_account.connected";
13
+ }, {
14
+ connect_webview_id: string;
15
+ connected_account_id: string;
16
+ workspace_id: string;
17
+ event_type: "connected_account.connected";
18
+ }>;
19
+ connected_account_successful_login: z.ZodObject<{
20
+ event_type: z.ZodLiteral<"connected_account.successful_login">;
21
+ connected_account_id: z.ZodString;
22
+ workspace_id: z.ZodString;
23
+ connect_webview_id: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ connect_webview_id: string;
26
+ connected_account_id: string;
27
+ workspace_id: string;
28
+ event_type: "connected_account.successful_login";
29
+ }, {
30
+ connect_webview_id: string;
31
+ connected_account_id: string;
32
+ workspace_id: string;
33
+ event_type: "connected_account.successful_login";
34
+ }>;
35
+ connected_account_created: z.ZodObject<{
36
+ event_type: z.ZodLiteral<"connected_account.created">;
37
+ connected_account_id: z.ZodString;
38
+ workspace_id: z.ZodString;
39
+ }, "strip", z.ZodTypeAny, {
40
+ connected_account_id: string;
41
+ workspace_id: string;
42
+ event_type: "connected_account.created";
43
+ }, {
44
+ connected_account_id: string;
45
+ workspace_id: string;
46
+ event_type: "connected_account.created";
47
+ }>;
48
+ };
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ const connected_account_connected = z.object({
3
+ event_type: z.literal('connected_account.connected'),
4
+ connected_account_id: z.string().uuid(),
5
+ workspace_id: z.string().uuid(),
6
+ connect_webview_id: z.string().uuid(),
7
+ });
8
+ const connected_account_successful_login = z.object({
9
+ event_type: z.literal('connected_account.successful_login'),
10
+ connected_account_id: z.string().uuid(),
11
+ workspace_id: z.string().uuid(),
12
+ connect_webview_id: z.string().uuid(),
13
+ });
14
+ const connected_account_created = z.object({
15
+ event_type: z.literal('connected_account.created'),
16
+ connected_account_id: z.string().uuid(),
17
+ workspace_id: z.string().uuid(),
18
+ });
19
+ export const connected_account_event_map = {
20
+ connected_account_connected,
21
+ connected_account_successful_login,
22
+ connected_account_created,
23
+ };
24
+ //# sourceMappingURL=connected_account_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected_account_events.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/events/connected_account_events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC;IACpD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACtC,CAAC,CAAA;AAEF,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,oCAAoC,CAAC;IAC3D,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACtC,CAAC,CAAA;AAEF,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC;IAClD,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAChC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,2BAA2B;IAC3B,kCAAkC;IAClC,yBAAyB;CAC1B,CAAA"}
@@ -0,0 +1,63 @@
1
+ import { z } from 'zod';
2
+ export declare const device_added: z.ZodObject<{
3
+ event_type: z.ZodLiteral<"device_added">;
4
+ device_id: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ device_id: string;
7
+ event_type: "device_added";
8
+ }, {
9
+ device_id: string;
10
+ event_type: "device_added";
11
+ }>;
12
+ export declare const device_removed: z.ZodObject<{
13
+ event_type: z.ZodLiteral<"device_removed">;
14
+ device_id: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ device_id: string;
17
+ event_type: "device_removed";
18
+ }, {
19
+ device_id: string;
20
+ event_type: "device_removed";
21
+ }>;
22
+ export declare const device_updated: z.ZodObject<{
23
+ event_type: z.ZodLiteral<"device_updated">;
24
+ device_id: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ device_id: string;
27
+ event_type: "device_updated";
28
+ }, {
29
+ device_id: string;
30
+ event_type: "device_updated";
31
+ }>;
32
+ export declare const device_event_map: {
33
+ device_added: z.ZodObject<{
34
+ event_type: z.ZodLiteral<"device_added">;
35
+ device_id: z.ZodString;
36
+ }, "strip", z.ZodTypeAny, {
37
+ device_id: string;
38
+ event_type: "device_added";
39
+ }, {
40
+ device_id: string;
41
+ event_type: "device_added";
42
+ }>;
43
+ device_removed: z.ZodObject<{
44
+ event_type: z.ZodLiteral<"device_removed">;
45
+ device_id: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ device_id: string;
48
+ event_type: "device_removed";
49
+ }, {
50
+ device_id: string;
51
+ event_type: "device_removed";
52
+ }>;
53
+ device_updated: z.ZodObject<{
54
+ event_type: z.ZodLiteral<"device_updated">;
55
+ device_id: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ device_id: string;
58
+ event_type: "device_updated";
59
+ }, {
60
+ device_id: string;
61
+ event_type: "device_updated";
62
+ }>;
63
+ };
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export const device_added = z
3
+ .object({
4
+ event_type: z.literal('device_added'),
5
+ device_id: z.string().uuid(),
6
+ })
7
+ .describe('This device was added to a Connected Account by the device owner');
8
+ export const device_removed = z.object({
9
+ event_type: z.literal('device_removed'),
10
+ device_id: z.string().uuid(),
11
+ });
12
+ export const device_updated = z.object({
13
+ event_type: z.literal('device_updated'),
14
+ device_id: z.string().uuid(),
15
+ });
16
+ export const device_event_map = {
17
+ device_added,
18
+ device_removed,
19
+ device_updated,
20
+ };
21
+ //# sourceMappingURL=device_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_events.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/events/device_events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC;KAC1B,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAC7B,CAAC;KACD,QAAQ,CAAC,kEAAkE,CAAC,CAAA;AAE/E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CAC7B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY;IACZ,cAAc;IACd,cAAc;CACf,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ export declare const lock_event_map: {
3
+ lock_methods: z.ZodEnum<["keycode", "manual", "unknown", "seamapi"]>;
4
+ lock_locked: z.ZodObject<{
5
+ event_type: z.ZodLiteral<"lock.locked">;
6
+ device_id: z.ZodString;
7
+ workspace_id: z.ZodString;
8
+ lock_id: z.ZodString;
9
+ connected_account_id: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ connected_account_id: string;
12
+ workspace_id: string;
13
+ device_id: string;
14
+ lock_id: string;
15
+ event_type: "lock.locked";
16
+ }, {
17
+ connected_account_id: string;
18
+ workspace_id: string;
19
+ device_id: string;
20
+ lock_id: string;
21
+ event_type: "lock.locked";
22
+ }>;
23
+ lock_unlocked: z.ZodObject<{
24
+ event_type: z.ZodLiteral<"lock.unlocked">;
25
+ device_id: z.ZodString;
26
+ workspace_id: z.ZodString;
27
+ lock_id: z.ZodString;
28
+ connected_account_id: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ connected_account_id: string;
31
+ workspace_id: string;
32
+ device_id: string;
33
+ lock_id: string;
34
+ event_type: "lock.unlocked";
35
+ }, {
36
+ connected_account_id: string;
37
+ workspace_id: string;
38
+ device_id: string;
39
+ lock_id: string;
40
+ event_type: "lock.unlocked";
41
+ }>;
42
+ };
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ const lock_methods = z.enum(['keycode', 'manual', 'unknown', 'seamapi']);
3
+ const lock_locked = z.object({
4
+ event_type: z.literal('lock.locked'),
5
+ device_id: z.string().uuid(),
6
+ workspace_id: z.string().uuid(),
7
+ lock_id: z.string().uuid(),
8
+ connected_account_id: z.string().uuid(),
9
+ });
10
+ const lock_unlocked = z.object({
11
+ event_type: z.literal('lock.unlocked'),
12
+ device_id: z.string().uuid(),
13
+ workspace_id: z.string().uuid(),
14
+ lock_id: z.string().uuid(),
15
+ connected_account_id: z.string().uuid(),
16
+ });
17
+ export const lock_event_map = {
18
+ lock_methods,
19
+ lock_locked,
20
+ lock_unlocked,
21
+ };
22
+ //# sourceMappingURL=lock_events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock_events.js","sourceRoot":"","sources":["../../../../../../src/lib/seam/connect/unstable/models/events/lock_events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;AAExE,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACxC,CAAC,CAAA;AAEF,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACxC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,YAAY;IACZ,WAAW;IACX,aAAa;CACd,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.86.0",
3
+ "version": "1.88.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -7977,6 +7977,17 @@ export default {
7977
7977
  nullable: true,
7978
7978
  type: 'string',
7979
7979
  },
7980
+ custom_metadata_has: {
7981
+ additionalProperties: {
7982
+ nullable: true,
7983
+ oneOf: [
7984
+ { maxLength: 500, type: 'string' },
7985
+ { type: 'boolean' },
7986
+ { format: 'null', nullable: true, type: 'string' },
7987
+ ],
7988
+ },
7989
+ type: 'object',
7990
+ },
7980
7991
  device_ids: {
7981
7992
  items: { format: 'uuid', type: 'string' },
7982
7993
  type: 'array',
@@ -8275,6 +8286,17 @@ export default {
8275
8286
  nullable: true,
8276
8287
  type: 'string',
8277
8288
  },
8289
+ custom_metadata_has: {
8290
+ additionalProperties: {
8291
+ nullable: true,
8292
+ oneOf: [
8293
+ { maxLength: 500, type: 'string' },
8294
+ { type: 'boolean' },
8295
+ { format: 'null', nullable: true, type: 'string' },
8296
+ ],
8297
+ },
8298
+ type: 'object',
8299
+ },
8278
8300
  device_ids: {
8279
8301
  items: { format: 'uuid', type: 'string' },
8280
8302
  type: 'array',
@@ -8543,6 +8565,17 @@ export default {
8543
8565
  'application/json': {
8544
8566
  schema: {
8545
8567
  properties: {
8568
+ custom_metadata: {
8569
+ additionalProperties: {
8570
+ nullable: true,
8571
+ oneOf: [
8572
+ { maxLength: 500, type: 'string' },
8573
+ { type: 'boolean' },
8574
+ { format: 'null', nullable: true, type: 'string' },
8575
+ ],
8576
+ },
8577
+ type: 'object',
8578
+ },
8546
8579
  device_id: { format: 'uuid', type: 'string' },
8547
8580
  is_managed: { default: true, type: 'boolean' },
8548
8581
  name: { nullable: true, type: 'string' },
@@ -8589,6 +8622,17 @@ export default {
8589
8622
  'application/json': {
8590
8623
  schema: {
8591
8624
  properties: {
8625
+ custom_metadata: {
8626
+ additionalProperties: {
8627
+ nullable: true,
8628
+ oneOf: [
8629
+ { maxLength: 500, type: 'string' },
8630
+ { type: 'boolean' },
8631
+ { format: 'null', nullable: true, type: 'string' },
8632
+ ],
8633
+ },
8634
+ type: 'object',
8635
+ },
8592
8636
  device_id: { format: 'uuid', type: 'string' },
8593
8637
  is_managed: { default: true, type: 'boolean' },
8594
8638
  name: { nullable: true, type: 'string' },
@@ -9087,6 +9131,17 @@ export default {
9087
9131
  nullable: true,
9088
9132
  type: 'string',
9089
9133
  },
9134
+ custom_metadata_has: {
9135
+ additionalProperties: {
9136
+ nullable: true,
9137
+ oneOf: [
9138
+ { maxLength: 500, type: 'string' },
9139
+ { type: 'boolean' },
9140
+ { format: 'null', nullable: true, type: 'string' },
9141
+ ],
9142
+ },
9143
+ type: 'object',
9144
+ },
9090
9145
  device_ids: {
9091
9146
  items: { format: 'uuid', type: 'string' },
9092
9147
  type: 'array',
@@ -10707,6 +10762,17 @@ export default {
10707
10762
  nullable: true,
10708
10763
  type: 'string',
10709
10764
  },
10765
+ custom_metadata_has: {
10766
+ additionalProperties: {
10767
+ nullable: true,
10768
+ oneOf: [
10769
+ { maxLength: 500, type: 'string' },
10770
+ { type: 'boolean' },
10771
+ { format: 'null', nullable: true, type: 'string' },
10772
+ ],
10773
+ },
10774
+ type: 'object',
10775
+ },
10710
10776
  device_ids: {
10711
10777
  items: { format: 'uuid', type: 'string' },
10712
10778
  type: 'array',
@@ -2734,6 +2734,7 @@ export interface Routes {
2734
2734
  limit?: number
2735
2735
  created_before?: Date | undefined
2736
2736
  user_identifier_key?: string | undefined
2737
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined
2737
2738
  }
2738
2739
  formData: {}
2739
2740
  jsonResponse: {
@@ -3641,6 +3642,7 @@ export interface Routes {
3641
3642
  limit?: number
3642
3643
  created_before?: Date | undefined
3643
3644
  user_identifier_key?: string | undefined
3645
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined
3644
3646
  }
3645
3647
  formData: {}
3646
3648
  jsonResponse: {
@@ -3771,6 +3773,7 @@ export interface Routes {
3771
3773
  | undefined
3772
3774
  name?: (string | null) | undefined
3773
3775
  is_managed?: boolean
3776
+ custom_metadata?: Record<string, string | boolean | null> | undefined
3774
3777
  }
3775
3778
  formData: {}
3776
3779
  jsonResponse: {}
@@ -5438,6 +5441,7 @@ export interface Routes {
5438
5441
  limit?: number
5439
5442
  created_before?: Date | undefined
5440
5443
  user_identifier_key?: string | undefined
5444
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined
5441
5445
  }
5442
5446
  formData: {}
5443
5447
  jsonResponse: {
@@ -9340,6 +9344,7 @@ export interface Routes {
9340
9344
  limit?: number
9341
9345
  created_before?: Date | undefined
9342
9346
  user_identifier_key?: string | undefined
9347
+ custom_metadata_has?: Record<string, string | boolean | null> | undefined
9343
9348
  }
9344
9349
  formData: {}
9345
9350
  jsonResponse: {
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod'
2
+
3
+ const access_code_created = z.object({
4
+ event_type: z.literal('access_code.created'),
5
+ device_id: z.string().uuid(),
6
+ workspace_id: z.string().uuid(),
7
+ access_code_id: z.string().uuid(),
8
+ connected_account_id: z.string().uuid(),
9
+ })
10
+
11
+ const access_code_changed = z.object({
12
+ event_type: z.literal('access_code.changed'),
13
+ device_id: z.string().uuid(),
14
+ workspace_id: z.string().uuid(),
15
+ access_code_id: z.string().uuid(),
16
+ })
17
+
18
+ const access_code_scheduled_on_device = z.object({
19
+ event_type: z.literal('access_code.scheduled_on_device'),
20
+ device_id: z.string().uuid(),
21
+ connected_account_id: z.string().uuid(),
22
+ workspace_id: z.string().uuid(),
23
+ })
24
+
25
+ const backup_access_code_pulled = z.object({
26
+ event_type: z.literal('backup_access_code.pulled'),
27
+ device_id: z.string().uuid(),
28
+ workspace_id: z.string().uuid(),
29
+ connected_account_id: z.string().uuid(),
30
+ })
31
+
32
+ export const access_code_event_map = {
33
+ access_code_created,
34
+ access_code_changed,
35
+ access_code_scheduled_on_device,
36
+ backup_access_code_pulled,
37
+ }
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod'
2
+
3
+ const connected_account_connected = z.object({
4
+ event_type: z.literal('connected_account.connected'),
5
+ connected_account_id: z.string().uuid(),
6
+ workspace_id: z.string().uuid(),
7
+ connect_webview_id: z.string().uuid(),
8
+ })
9
+
10
+ const connected_account_successful_login = z.object({
11
+ event_type: z.literal('connected_account.successful_login'),
12
+ connected_account_id: z.string().uuid(),
13
+ workspace_id: z.string().uuid(),
14
+ connect_webview_id: z.string().uuid(),
15
+ })
16
+
17
+ const connected_account_created = z.object({
18
+ event_type: z.literal('connected_account.created'),
19
+ connected_account_id: z.string().uuid(),
20
+ workspace_id: z.string().uuid(),
21
+ })
22
+
23
+ export const connected_account_event_map = {
24
+ connected_account_connected,
25
+ connected_account_successful_login,
26
+ connected_account_created,
27
+ }
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod'
2
+
3
+ export const device_added = z
4
+ .object({
5
+ event_type: z.literal('device_added'),
6
+ device_id: z.string().uuid(),
7
+ })
8
+ .describe('This device was added to a Connected Account by the device owner')
9
+
10
+ export const device_removed = z.object({
11
+ event_type: z.literal('device_removed'),
12
+ device_id: z.string().uuid(),
13
+ })
14
+
15
+ export const device_updated = z.object({
16
+ event_type: z.literal('device_updated'),
17
+ device_id: z.string().uuid(),
18
+ })
19
+
20
+ export const device_event_map = {
21
+ device_added,
22
+ device_removed,
23
+ device_updated,
24
+ }
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod'
2
+
3
+ const lock_methods = z.enum(['keycode', 'manual', 'unknown', 'seamapi'])
4
+
5
+ const lock_locked = z.object({
6
+ event_type: z.literal('lock.locked'),
7
+ device_id: z.string().uuid(),
8
+ workspace_id: z.string().uuid(),
9
+ lock_id: z.string().uuid(),
10
+ connected_account_id: z.string().uuid(),
11
+ })
12
+
13
+ const lock_unlocked = z.object({
14
+ event_type: z.literal('lock.unlocked'),
15
+ device_id: z.string().uuid(),
16
+ workspace_id: z.string().uuid(),
17
+ lock_id: z.string().uuid(),
18
+ connected_account_id: z.string().uuid(),
19
+ })
20
+
21
+ export const lock_event_map = {
22
+ lock_methods,
23
+ lock_locked,
24
+ lock_unlocked,
25
+ }