@seamapi/types 1.312.2 → 1.313.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 (25) hide show
  1. package/dist/connect.cjs +1201 -1194
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +1296 -934
  4. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +10 -10
  5. package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +5 -5
  6. package/lib/seam/connect/models/action-attempts/encode-credential.js +3 -3
  7. package/lib/seam/connect/models/action-attempts/encode-credential.js.map +1 -1
  8. package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +5 -5
  9. package/lib/seam/connect/models/action-attempts/scan-credential.js +3 -3
  10. package/lib/seam/connect/models/action-attempts/scan-credential.js.map +1 -1
  11. package/lib/seam/connect/models/events/common.js +10 -24
  12. package/lib/seam/connect/models/events/common.js.map +1 -1
  13. package/lib/seam/connect/models/events/devices.js +145 -98
  14. package/lib/seam/connect/models/events/devices.js.map +1 -1
  15. package/lib/seam/connect/openapi.d.ts +383 -134
  16. package/lib/seam/connect/openapi.js +717 -716
  17. package/lib/seam/connect/openapi.js.map +1 -1
  18. package/lib/seam/connect/route-types.d.ts +801 -688
  19. package/package.json +1 -1
  20. package/src/lib/seam/connect/models/action-attempts/encode-credential.ts +3 -3
  21. package/src/lib/seam/connect/models/action-attempts/scan-credential.ts +3 -3
  22. package/src/lib/seam/connect/models/events/common.ts +12 -24
  23. package/src/lib/seam/connect/models/events/devices.ts +212 -101
  24. package/src/lib/seam/connect/openapi.ts +842 -716
  25. package/src/lib/seam/connect/route-types.ts +810 -688
@@ -1309,13 +1309,13 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
1309
1309
  type: "action_attempt_expired";
1310
1310
  message: string;
1311
1311
  }>, z.ZodObject<{
1312
- type: z.ZodLiteral<"no_card_on_encoder">;
1312
+ type: z.ZodLiteral<"no_credential_on_encoder">;
1313
1313
  message: z.ZodString;
1314
1314
  }, "strip", z.ZodTypeAny, {
1315
- type: "no_card_on_encoder";
1315
+ type: "no_credential_on_encoder";
1316
1316
  message: string;
1317
1317
  }, {
1318
- type: "no_card_on_encoder";
1318
+ type: "no_credential_on_encoder";
1319
1319
  message: string;
1320
1320
  }>]>;
1321
1321
  }>, "strip", z.ZodTypeAny, {
@@ -1326,7 +1326,7 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
1326
1326
  type: "action_attempt_expired";
1327
1327
  message: string;
1328
1328
  } | {
1329
- type: "no_card_on_encoder";
1329
+ type: "no_credential_on_encoder";
1330
1330
  message: string;
1331
1331
  };
1332
1332
  status: "error";
@@ -1341,7 +1341,7 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
1341
1341
  type: "action_attempt_expired";
1342
1342
  message: string;
1343
1343
  } | {
1344
- type: "no_card_on_encoder";
1344
+ type: "no_credential_on_encoder";
1345
1345
  message: string;
1346
1346
  };
1347
1347
  status: "error";
@@ -2079,13 +2079,13 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
2079
2079
  type: "action_attempt_expired";
2080
2080
  message: string;
2081
2081
  }>, z.ZodObject<{
2082
- type: z.ZodLiteral<"no_card_on_encoder">;
2082
+ type: z.ZodLiteral<"no_credential_on_encoder">;
2083
2083
  message: z.ZodString;
2084
2084
  }, "strip", z.ZodTypeAny, {
2085
- type: "no_card_on_encoder";
2085
+ type: "no_credential_on_encoder";
2086
2086
  message: string;
2087
2087
  }, {
2088
- type: "no_card_on_encoder";
2088
+ type: "no_credential_on_encoder";
2089
2089
  message: string;
2090
2090
  }>, z.ZodObject<{
2091
2091
  type: z.ZodLiteral<"incompatible_card_format">;
@@ -2105,7 +2105,7 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
2105
2105
  type: "action_attempt_expired";
2106
2106
  message: string;
2107
2107
  } | {
2108
- type: "no_card_on_encoder";
2108
+ type: "no_credential_on_encoder";
2109
2109
  message: string;
2110
2110
  } | {
2111
2111
  type: "incompatible_card_format";
@@ -2123,7 +2123,7 @@ export declare const action_attempt: z.ZodUnion<[z.ZodObject<z.objectUtil.extend
2123
2123
  type: "action_attempt_expired";
2124
2124
  message: string;
2125
2125
  } | {
2126
- type: "no_card_on_encoder";
2126
+ type: "no_credential_on_encoder";
2127
2127
  message: string;
2128
2128
  } | {
2129
2129
  type: "incompatible_card_format";
@@ -730,13 +730,13 @@ export declare const encode_credential_action_attempt: z.ZodDiscriminatedUnion<"
730
730
  type: "action_attempt_expired";
731
731
  message: string;
732
732
  }>, z.ZodObject<{
733
- type: z.ZodLiteral<"no_card_on_encoder">;
733
+ type: z.ZodLiteral<"no_credential_on_encoder">;
734
734
  message: z.ZodString;
735
735
  }, "strip", z.ZodTypeAny, {
736
- type: "no_card_on_encoder";
736
+ type: "no_credential_on_encoder";
737
737
  message: string;
738
738
  }, {
739
- type: "no_card_on_encoder";
739
+ type: "no_credential_on_encoder";
740
740
  message: string;
741
741
  }>, z.ZodObject<{
742
742
  type: z.ZodLiteral<"incompatible_card_format">;
@@ -756,7 +756,7 @@ export declare const encode_credential_action_attempt: z.ZodDiscriminatedUnion<"
756
756
  type: "action_attempt_expired";
757
757
  message: string;
758
758
  } | {
759
- type: "no_card_on_encoder";
759
+ type: "no_credential_on_encoder";
760
760
  message: string;
761
761
  } | {
762
762
  type: "incompatible_card_format";
@@ -774,7 +774,7 @@ export declare const encode_credential_action_attempt: z.ZodDiscriminatedUnion<"
774
774
  type: "action_attempt_expired";
775
775
  message: string;
776
776
  } | {
777
- type: "no_card_on_encoder";
777
+ type: "no_credential_on_encoder";
778
778
  message: string;
779
779
  } | {
780
780
  type: "incompatible_card_format";
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  import { acs_credential, unmanaged_acs_credential, } from '../acs/acs-credential.js';
3
3
  import { common_action_attempt_errors, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, } from './common.js';
4
4
  const action_type = z.literal('ENCODE_CREDENTIAL');
5
- const no_card_on_encoder_error = z.object({
6
- type: z.literal('no_card_on_encoder'),
5
+ const no_credential_on_encoder_error = z.object({
6
+ type: z.literal('no_credential_on_encoder'),
7
7
  message: z.string(),
8
8
  });
9
9
  const incompatible_card_format_error = z.object({
@@ -12,7 +12,7 @@ const incompatible_card_format_error = z.object({
12
12
  });
13
13
  const error = z.union([
14
14
  ...common_action_attempt_errors,
15
- no_card_on_encoder_error,
15
+ no_credential_on_encoder_error,
16
16
  incompatible_card_format_error,
17
17
  ]);
18
18
  const result = acs_credential.or(unmanaged_acs_credential);
@@ -1 +1 @@
1
- {"version":3,"file":"encode-credential.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/action-attempts/encode-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,cAAc,EACd,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAElD,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,GAAG,4BAA4B;IAC/B,wBAAwB;IACxB,8BAA8B;CAC/B,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAA;AAE1D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC7E,6BAA6B;SAC1B,MAAM,CAAC;QACN,WAAW;KACZ,CAAC;SACD,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,+BAA+B;SAC5B,MAAM,CAAC;QACN,WAAW;QACX,MAAM;KACP,CAAC;SACD,QAAQ,CAAC,2DAA2D,CAAC;IACxE,4BAA4B;SACzB,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;SAC9B,QAAQ,CAAC,wDAAwD,CAAC;CACtE,CAAC,CAAA"}
1
+ {"version":3,"file":"encode-credential.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/action-attempts/encode-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,cAAc,EACd,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;AAElD,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,GAAG,4BAA4B;IAC/B,8BAA8B;IAC9B,8BAA8B;CAC/B,CAAC,CAAA;AAEF,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAA;AAE1D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC7E,6BAA6B;SAC1B,MAAM,CAAC;QACN,WAAW;KACZ,CAAC;SACD,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,+BAA+B;SAC5B,MAAM,CAAC;QACN,WAAW;QACX,MAAM;KACP,CAAC;SACD,QAAQ,CAAC,2DAA2D,CAAC;IACxE,4BAA4B;SACzB,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;SAC9B,QAAQ,CAAC,wDAAwD,CAAC;CACtE,CAAC,CAAA"}
@@ -1153,13 +1153,13 @@ export declare const scan_credential_action_attempt: z.ZodDiscriminatedUnion<"st
1153
1153
  type: "action_attempt_expired";
1154
1154
  message: string;
1155
1155
  }>, z.ZodObject<{
1156
- type: z.ZodLiteral<"no_card_on_encoder">;
1156
+ type: z.ZodLiteral<"no_credential_on_encoder">;
1157
1157
  message: z.ZodString;
1158
1158
  }, "strip", z.ZodTypeAny, {
1159
- type: "no_card_on_encoder";
1159
+ type: "no_credential_on_encoder";
1160
1160
  message: string;
1161
1161
  }, {
1162
- type: "no_card_on_encoder";
1162
+ type: "no_credential_on_encoder";
1163
1163
  message: string;
1164
1164
  }>]>;
1165
1165
  }>, "strip", z.ZodTypeAny, {
@@ -1170,7 +1170,7 @@ export declare const scan_credential_action_attempt: z.ZodDiscriminatedUnion<"st
1170
1170
  type: "action_attempt_expired";
1171
1171
  message: string;
1172
1172
  } | {
1173
- type: "no_card_on_encoder";
1173
+ type: "no_credential_on_encoder";
1174
1174
  message: string;
1175
1175
  };
1176
1176
  status: "error";
@@ -1185,7 +1185,7 @@ export declare const scan_credential_action_attempt: z.ZodDiscriminatedUnion<"st
1185
1185
  type: "action_attempt_expired";
1186
1186
  message: string;
1187
1187
  } | {
1188
- type: "no_card_on_encoder";
1188
+ type: "no_credential_on_encoder";
1189
1189
  message: string;
1190
1190
  };
1191
1191
  status: "error";
@@ -2,13 +2,13 @@ import { z } from 'zod';
2
2
  import { acs_credential, acs_credential_on_encoder, unmanaged_acs_credential, } from '../acs/acs-credential.js';
3
3
  import { common_action_attempt_errors, common_failed_action_attempt, common_pending_action_attempt, common_succeeded_action_attempt, } from './common.js';
4
4
  const action_type = z.literal('SCAN_CREDENTIAL');
5
- const no_card_on_encoder_error = z.object({
6
- type: z.literal('no_card_on_encoder'),
5
+ const no_credential_on_encoder_error = z.object({
6
+ type: z.literal('no_credential_on_encoder'),
7
7
  message: z.string(),
8
8
  });
9
9
  const error = z.union([
10
10
  ...common_action_attempt_errors,
11
- no_card_on_encoder_error,
11
+ no_credential_on_encoder_error,
12
12
  ]);
13
13
  const warning = z.object({
14
14
  warning_code: z.union([
@@ -1 +1 @@
1
- {"version":3,"file":"scan-credential.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/action-attempts/scan-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAEhD,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,GAAG,4BAA4B;IAC/B,wBAAwB;CACzB,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;QACpB,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC;KAC9C,CAAC;IACF,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAA;AAE1E,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,yBAAyB,EAAE,yBAAyB;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACtE,sBAAsB,EAAE,sBAAsB;SAC3C,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACtE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC3E,6BAA6B;SAC1B,MAAM,CAAC;QACN,WAAW;KACZ,CAAC;SACD,QAAQ,CAAC,gDAAgD,CAAC;IAC7D,+BAA+B;SAC5B,MAAM,CAAC;QACN,WAAW;QACX,MAAM;KACP,CAAC;SACD,QAAQ,CAAC,0DAA0D,CAAC;IACvE,4BAA4B;SACzB,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;SAC9B,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC,CAAA"}
1
+ {"version":3,"file":"scan-credential.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/action-attempts/scan-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAEhD,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAA;AAEF,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IACpB,GAAG,4BAA4B;IAC/B,8BAA8B;CAC/B,CAAC,CAAA;AAEF,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC;QACpB,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC;QAClD,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC;KAC9C,CAAC;IACF,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAA;AAEF,MAAM,sBAAsB,GAAG,cAAc,CAAC,EAAE,CAAC,wBAAwB,CAAC,CAAA;AAE1E,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,yBAAyB,EAAE,yBAAyB;SACjD,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACtE,sBAAsB,EAAE,sBAAsB;SAC3C,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IACtE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;CAC3B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC3E,6BAA6B;SAC1B,MAAM,CAAC;QACN,WAAW;KACZ,CAAC;SACD,QAAQ,CAAC,gDAAgD,CAAC;IAC7D,+BAA+B;SAC5B,MAAM,CAAC;QACN,WAAW;QACX,MAAM;KACP,CAAC;SACD,QAAQ,CAAC,0DAA0D,CAAC;IACvE,4BAA4B;SACzB,MAAM,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;SAC9B,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC,CAAA"}
@@ -1,28 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  export const common_event = z.object({
3
- event_id: z.string().uuid().describe(`
4
- ---
5
- title: Event ID
6
- ---
7
- The ID of the event.
8
- `),
9
- workspace_id: z.string().uuid().describe(`
10
- ---
11
- title: Workspace ID
12
- ---
13
- The ID of the workspace.
14
- `),
15
- created_at: z.string().datetime().describe(`
16
- ---
17
- title: Created At
18
- ---
19
- The time when the event was created.
20
- `),
21
- occurred_at: z.string().datetime().describe(`
22
- ---
23
- title: Occurred At
24
- ---
25
- The time when the event occurred.
26
- `),
3
+ event_id: z.string().uuid().describe('ID of the event.'),
4
+ workspace_id: z
5
+ .string()
6
+ .uuid()
7
+ .describe('ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces).'),
8
+ created_at: z
9
+ .string()
10
+ .datetime()
11
+ .describe('Time at which the event was created.'),
12
+ occurred_at: z.string().datetime().describe('Time when the event occurred.'),
27
13
  });
28
14
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/events/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC;;;;;GAKpC,CAAC;IACF,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC;;;;;GAKxC,CAAC;IACF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;;;;;GAK1C,CAAC;IACF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;;;;;GAK3C,CAAC;CACH,CAAC,CAAA"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/events/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACxD,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,CACP,8EAA8E,CAC/E;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,sCAAsC,CAAC;IACnD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;CAC7E,CAAC,CAAA"}
@@ -2,54 +2,26 @@ import { z } from 'zod';
2
2
  import { climate_setting } from '../thermostats/climate-preset.js';
3
3
  import { common_event } from './common.js';
4
4
  const device_event = common_event.extend({
5
- device_id: z.string().uuid().describe(`
6
- ---
7
- title: Device ID
8
- ---
9
- ID of the device.
10
- `),
11
- connected_account_id: z.string().uuid().describe(`
12
- ---
13
- title: Connected Account ID
14
- ---
15
- ID of the connected account.
16
- `),
5
+ device_id: z.string().uuid().describe('ID of the device.'),
6
+ connected_account_id: z
7
+ .string()
8
+ .uuid()
9
+ .describe('ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).'),
17
10
  });
18
- const battery_level = z.number().min(0).max(1).describe(`
19
- ---
20
- title: Battery Level
21
- ---
22
- Fractional number 0 to 1.0 indicating amount of battery in device, as reported by device.
23
- `);
24
- const device_battery_status = z.enum(['critical', 'low', 'good', 'full'])
25
- .describe(`
26
- ---
27
- title: Battery Status
28
- ---
29
- Enum representing the battery status calculated from numeric battery_level value, one of 'critical' | 'low' | 'good' | 'full'
30
- `);
31
- const disconnection_error_code = z.enum([
32
- 'account_disconnected',
33
- 'hub_disconnected',
34
- 'device_disconnected',
35
- ]).describe(`
36
- ---
37
- title: Event Error Code
38
- ---
39
- The error code associated with the event, if any.
40
- `);
41
- export const lock_method = z.enum([
42
- 'keycode',
43
- 'manual',
44
- 'automatic',
45
- 'unknown',
46
- 'seamapi',
47
- ]).describe(`
48
- ---
49
- title: Lock Lock/Unlock Method
50
- ---
51
- Method by which a lock device was locked or unlocked. When the method is \`keycode\`, the \`access_code_id\` will reference the Seam access code which was used, if reported by the device.
52
- `);
11
+ const battery_level = z
12
+ .number()
13
+ .min(0)
14
+ .max(1)
15
+ .describe('Number in the range 0 to 1.0 indicating the amount of battery in the device, as reported by the device.');
16
+ const device_battery_status = z
17
+ .enum(['critical', 'low', 'good', 'full'])
18
+ .describe('Battery status of the device, calculated from the numeric `battery_level` value.');
19
+ const disconnection_error_code = z
20
+ .enum(['account_disconnected', 'hub_disconnected', 'device_disconnected'])
21
+ .describe('Error code associated with the disconnection event, if any.');
22
+ export const lock_method = z
23
+ .enum(['keycode', 'manual', 'automatic', 'unknown', 'seamapi'])
24
+ .describe('Method by which a lock device was locked or unlocked. When the method is `keycode`, the `access_code_id` indicates the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used, if reported by the device.');
53
25
  export const device_connected_event = device_event
54
26
  .extend({
55
27
  event_type: z.literal('device.connected'),
@@ -59,39 +31,39 @@ export const device_added_event = device_event
59
31
  .extend({
60
32
  event_type: z.literal('device.added'),
61
33
  })
62
- .describe('A device has been added or reconnected to Seam.');
34
+ .describe('A device was added or reconnected to Seam.');
63
35
  export const device_converted_to_unmanaged_event = device_event
64
36
  .extend({
65
37
  event_type: z.literal('device.converted_to_unmanaged'),
66
38
  })
67
- .describe('An unmanaged device was successfully converted to a managed device.');
39
+ .describe('An [unmanaged device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices) was successfully converted to a managed device.');
68
40
  export const unmanaged_device_converted_to_managed_event = device_event
69
41
  .extend({
70
42
  event_type: z.literal('device.unmanaged.converted_to_managed'),
71
43
  })
72
- .describe('A managed device was successfully converted to an unmanaged device.');
44
+ .describe('A managed device was successfully converted to an [unmanaged device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices).');
73
45
  export const unmanaged_device_connected_event = device_event
74
46
  .extend({
75
47
  event_type: z.literal('device.unmanaged.connected'),
76
48
  })
77
- .describe('An unmanaged device was connected to Seam');
49
+ .describe('An [unmanaged device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices) was connected to Seam.');
78
50
  export const device_disconnected_event = device_event
79
51
  .extend({
80
52
  event_type: z.literal('device.disconnected'),
81
53
  error_code: disconnection_error_code,
82
54
  })
83
- .describe('A device was disconnected');
55
+ .describe('A device was disconnected from Seam.');
84
56
  export const unmanaged_device_disconnected_event = device_event
85
57
  .extend({
86
58
  event_type: z.literal('device.unmanaged.disconnected'),
87
59
  error_code: disconnection_error_code,
88
60
  })
89
- .describe('An unmanaged device was disconnected');
61
+ .describe('An [unmanaged device](https://docs.seam.co/latest/core-concepts/devices/managed-and-unmanaged-devices) was disconnected from Seam.');
90
62
  export const device_tampered_event = device_event
91
63
  .extend({
92
64
  event_type: z.literal('device.tampered'),
93
65
  })
94
- .describe('A device detected that it was tampered with, e.g., opened or moved.');
66
+ .describe('A device detected that it was tampered with, for example, opened or moved.');
95
67
  export const device_low_battery_event = device_event
96
68
  .extend({
97
69
  event_type: z.literal('device.low_battery'),
@@ -104,27 +76,27 @@ export const device_battery_status_changed_event = device_event
104
76
  battery_status: device_battery_status,
105
77
  battery_level,
106
78
  })
107
- .describe('A device battery status changed since the last battery status changed event.');
79
+ .describe('A device battery status changed since the last `battery_status_changed` event.');
108
80
  export const device_removed_event = device_event
109
81
  .extend({
110
82
  event_type: z.literal('device.removed'),
111
83
  })
112
- .describe('A device was removed externally from the connected account.');
84
+ .describe('A device was removed externally from the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).');
113
85
  export const device_deleted_event = device_event
114
86
  .extend({
115
87
  event_type: z.literal('device.deleted'),
116
88
  })
117
- .describe('A device was deleted.');
89
+ .describe('A device was [deleted](https://docs.seam.co/latest/api/devices/delete).');
118
90
  export const device_third_party_integration_detected_event = device_event
119
91
  .extend({
120
92
  event_type: z.literal('device.third_party_integration_detected'),
121
93
  })
122
- .describe('Seam detected a device is using a third party integration that will interfere with Seam device management.');
94
+ .describe('Seam detected that a device is using a third-party integration that will interfere with Seam device management.');
123
95
  export const device_third_party_integration_no_longer_detected_event = device_event
124
96
  .extend({
125
97
  event_type: z.literal('device.third_party_integration_no_longer_detected'),
126
98
  })
127
- .describe('Seam detected a device is no longer using a third party integration that was interfering with Seam device management.');
99
+ .describe('Seam detected that a device is no longer using a third-party integration that was interfering with Seam device management.');
128
100
  export const device_salto_privacy_mode_activated_event = device_event
129
101
  .extend({
130
102
  event_type: z.literal('device.salto.privacy_mode_activated'),
@@ -144,80 +116,123 @@ export const device_connection_stabilized_event = device_event
144
116
  .extend({
145
117
  event_type: z.literal('device.connection_stabilized'),
146
118
  })
147
- .describe('Seam detected a previously flaky device connection stabilized.');
119
+ .describe('Seam detected that a previously-flaky device connection stabilized.');
148
120
  export const device_error_subscription_required_event = device_event
149
121
  .extend({
150
122
  event_type: z.literal('device.error.subscription_required'),
151
123
  })
152
- .describe('A third party subscription is required to use all device features.');
124
+ .describe('A third-party subscription is required to use all device features.');
153
125
  export const device_error_subscription_required_resolved_event = device_event
154
126
  .extend({
155
127
  event_type: z.literal('device.error.subscription_required.resolved'),
156
128
  })
157
- .describe('A third party subscription is active or no longer-required to use all device features.');
129
+ .describe('A third-party subscription is active or no longer required to use all device features.');
158
130
  export const device_accessory_keypad_connected_event = device_event
159
131
  .extend({
160
132
  event_type: z.literal('device.accessory_keypad_connected'),
161
133
  })
162
- .describe('A accessory keypad was connected to a device.');
134
+ .describe('An accessory keypad was connected to a device.');
163
135
  export const device_accessory_keypad_disconnected_event = device_event
164
136
  .extend({
165
137
  event_type: z.literal('device.accessory_keypad_disconnected'),
166
138
  })
167
- .describe('A accessory keypad was disconnected to a device.');
139
+ .describe('An accessory keypad was disconnected from a device.');
168
140
  export const noise_sensor_noise_threshold_triggered_event = device_event
169
141
  .extend({
170
142
  event_type: z.literal('noise_sensor.noise_threshold_triggered'),
171
- noise_level_decibels: z.number().optional(),
172
- noise_level_nrs: z.number().optional(),
173
- noise_threshold_id: z.string().uuid().optional(),
174
- noise_threshold_name: z.string().optional(),
143
+ noise_level_decibels: z
144
+ .number()
145
+ .optional()
146
+ .describe('Detected noise level in decibels.'),
147
+ noise_level_nrs: z
148
+ .number()
149
+ .optional()
150
+ .describe('Detected noise level in Noiseaware Noise Risk Score (NRS).'),
151
+ noise_threshold_id: z
152
+ .string()
153
+ .uuid()
154
+ .optional()
155
+ .describe('ID of the [noise threshold](https://docs.seam.co/latest/capability-guides/noise-sensors#what-is-a-threshold) that was triggered.'),
156
+ noise_threshold_name: z
157
+ .string()
158
+ .optional()
159
+ .describe('Name of the [noise threshold](https://docs.seam.co/latest/capability-guides/noise-sensors#what-is-a-threshold) that was triggered.'),
175
160
  // TODO: remove metadata from this event
176
161
  noiseaware_metadata: z.record(z.unknown()).optional().describe(`
177
162
  ---
178
163
  title: Noiseaware Metadata
179
164
  ---
180
- Metadata from the Noiseaware API.
165
+ Metadata from Noiseaware.
181
166
  `),
182
167
  minut_metadata: z.record(z.unknown()).optional().describe(`
183
168
  ---
184
169
  title: Minut Metadata
185
170
  ---
186
- Metadata from the Minut API.
171
+ Metadata from Minut.
187
172
  `),
188
173
  })
189
- .describe('Extended periods of noise or noise exceeding a threshold was detected.');
174
+ .describe('Extended periods of noise or noise exceeding a [threshold](https://docs.seam.co/latest/capability-guides/noise-sensors#what-is-a-threshold) were detected.');
190
175
  export const lock_locked_event = device_event
191
176
  .extend({
192
177
  event_type: z.literal('lock.locked'),
193
- access_code_id: z.string().uuid().optional(),
194
- action_attempt_id: z.string().uuid().optional(),
195
- method: lock_method,
178
+ access_code_id: z
179
+ .string()
180
+ .uuid()
181
+ .optional()
182
+ .describe('ID of the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used to lock the device.'),
183
+ action_attempt_id: z
184
+ .string()
185
+ .uuid()
186
+ .optional()
187
+ .describe('ID of the [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) associated with the lock action.'),
188
+ method: lock_method.describe('Method by which a lock device was locked. When the method is `keycode`, the `access_code_id` indicates the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used, if reported by the device.'),
196
189
  })
197
190
  .describe('A lock was locked.');
198
191
  export const lock_unlocked_event = device_event
199
192
  .extend({
200
193
  event_type: z.literal('lock.unlocked'),
201
- access_code_id: z.string().uuid().optional(),
202
- action_attempt_id: z.string().uuid().optional(),
203
- method: lock_method,
194
+ access_code_id: z
195
+ .string()
196
+ .uuid()
197
+ .optional()
198
+ .describe('ID of the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used to unlock the device.'),
199
+ action_attempt_id: z
200
+ .string()
201
+ .uuid()
202
+ .optional()
203
+ .describe('ID of the [action attempt](https://docs.seam.co/latest/core-concepts/action-attempts) associated with the unlock action.'),
204
+ method: lock_method.describe('Method by which a lock device was unlocked. When the method is `keycode`, the `access_code_id` indicates the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used, if reported by the device.'),
204
205
  })
205
206
  .describe('A lock was unlocked.');
206
207
  export const lock_access_denied_event = device_event
207
208
  .extend({
208
209
  event_type: z.literal('lock.access_denied'),
209
- access_code_id: z.string().uuid().optional(),
210
+ access_code_id: z
211
+ .string()
212
+ .uuid()
213
+ .optional()
214
+ .describe('ID of the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes) that was used in the unlock attempts.'),
210
215
  })
211
216
  .describe('The lock denied access to a user after one or more consecutive invalid attempts to unlock the device.');
212
217
  export const thermostat_climate_preset_activated_event = device_event
213
218
  .extend({
214
219
  event_type: z.literal('thermostat.climate_preset_activated'),
215
- thermostat_schedule_id: z.string().uuid().nullable(),
216
- climate_preset_key: z.string(),
217
- is_fallback_climate_preset: z.boolean(),
220
+ thermostat_schedule_id: z
221
+ .string()
222
+ .uuid()
223
+ .nullable()
224
+ .describe('ID of the [thermostat schedule](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that prompted the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) to be activated.'),
225
+ climate_preset_key: z
226
+ .string()
227
+ .describe('Key of the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) that was activated.'),
228
+ is_fallback_climate_preset: z
229
+ .boolean()
230
+ .describe('Indicates whether the [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) that was activated is the [fallback climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat.'),
218
231
  })
219
- .describe('A thermostat climate preset was activated.');
220
- export const thermostat_manually_adjusted_method = z.enum(['seam', 'external']);
232
+ .describe('A thermostat [climate preset](https://docs.seam.co/latest/capability-guides/thermostats/creating-and-managing-climate-presets) was activated.');
233
+ export const thermostat_manually_adjusted_method = z
234
+ .enum(['seam', 'external'])
235
+ .describe('Method used to adjust the thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat.');
221
236
  export const thermostat_manually_adjusted_event = device_event
222
237
  .extend({
223
238
  event_type: z.literal('thermostat.manually_adjusted'),
@@ -231,29 +246,61 @@ export const thermostat_manually_adjusted_event = device_event
231
246
  cooling_set_point_fahrenheit: true,
232
247
  heating_set_point_fahrenheit: true,
233
248
  }))
234
- .describe('A thermostat was manually adjusted.');
249
+ .describe('A thermostat was adjusted manually.');
235
250
  export const temperature_threshold_exceeded_event = device_event
236
251
  .extend({
237
252
  event_type: z.literal('thermostat.temperature_threshold_exceeded'),
238
- temperature_celsius: z.number(),
239
- temperature_fahrenheit: z.number(),
240
- upper_limit_celsius: z.number().nullable(),
241
- upper_limit_fahrenheit: z.number().nullable(),
242
- lower_limit_celsius: z.number().nullable(),
243
- lower_limit_fahrenheit: z.number().nullable(),
253
+ temperature_celsius: z
254
+ .number()
255
+ .describe('Temperature, in °C, reported by the thermostat.'),
256
+ temperature_fahrenheit: z
257
+ .number()
258
+ .describe('Temperature, in °F, reported by the thermostat.'),
259
+ upper_limit_celsius: z
260
+ .number()
261
+ .nullable()
262
+ .describe('Upper temperature limit, in °C, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
263
+ upper_limit_fahrenheit: z
264
+ .number()
265
+ .nullable()
266
+ .describe('Upper temperature limit, in °F, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
267
+ lower_limit_celsius: z
268
+ .number()
269
+ .nullable()
270
+ .describe('Lower temperature limit, in °C, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
271
+ lower_limit_fahrenheit: z
272
+ .number()
273
+ .nullable()
274
+ .describe('Lower temperature limit, in °F, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
244
275
  })
245
- .describe("A thermostat's temperature reading exceeded the set threshold.");
276
+ .describe("A thermostat's temperature reading exceeded the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).");
246
277
  export const temperature_threshold_no_longer_exceeded_event = device_event
247
278
  .extend({
248
279
  event_type: z.literal('thermostat.temperature_threshold_no_longer_exceeded'),
249
- temperature_celsius: z.number(),
250
- temperature_fahrenheit: z.number(),
251
- upper_limit_celsius: z.number().nullable(),
252
- upper_limit_fahrenheit: z.number().nullable(),
253
- lower_limit_celsius: z.number().nullable(),
254
- lower_limit_fahrenheit: z.number().nullable(),
280
+ temperature_celsius: z
281
+ .number()
282
+ .describe('Temperature, in °C, reported by the thermostat.'),
283
+ temperature_fahrenheit: z
284
+ .number()
285
+ .describe('Temperature, in °F, reported by the thermostat.'),
286
+ upper_limit_celsius: z
287
+ .number()
288
+ .nullable()
289
+ .describe('Upper temperature limit, in °C, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
290
+ upper_limit_fahrenheit: z
291
+ .number()
292
+ .nullable()
293
+ .describe('Upper temperature limit, in °F, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
294
+ lower_limit_celsius: z
295
+ .number()
296
+ .nullable()
297
+ .describe('Lower temperature limit, in °C, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
298
+ lower_limit_fahrenheit: z
299
+ .number()
300
+ .nullable()
301
+ .describe('Lower temperature limit, in °F, defined by the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).'),
255
302
  })
256
- .describe("A thermostat's temperature reading is no longer exceeding the set threshold.");
303
+ .describe("A thermostat's temperature reading no longer exceeds the set [threshold](https://docs.seam.co/latest/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds).");
257
304
  export const device_events = [
258
305
  device_connected_event,
259
306
  device_added_event,