@seamapi/types 1.952.0 → 1.953.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.
@@ -28888,6 +28888,16 @@ declare const seam_event: z.ZodDiscriminatedUnion<"event_type", [z.ZodObject<{
28888
28888
  acs_user_id: z.ZodOptional<z.ZodString>;
28889
28889
  acs_entrance_id: z.ZodOptional<z.ZodString>;
28890
28890
  device_id: z.ZodOptional<z.ZodString>;
28891
+ reason: z.ZodOptional<z.ZodObject<{
28892
+ reason_code: z.ZodEnum<["unknown_code", "expired_code", "blocklisted_code", "too_many_attempts", "blocked_by_privacy_mode", "credential_error"]>;
28893
+ message: z.ZodString;
28894
+ }, "strip", z.ZodTypeAny, {
28895
+ message: string;
28896
+ reason_code: "unknown_code" | "expired_code" | "blocklisted_code" | "too_many_attempts" | "blocked_by_privacy_mode" | "credential_error";
28897
+ }, {
28898
+ message: string;
28899
+ reason_code: "unknown_code" | "expired_code" | "blocklisted_code" | "too_many_attempts" | "blocked_by_privacy_mode" | "credential_error";
28900
+ }>>;
28891
28901
  }, "strip", z.ZodTypeAny, {
28892
28902
  workspace_id: string;
28893
28903
  created_at: string;
@@ -28898,6 +28908,10 @@ declare const seam_event: z.ZodDiscriminatedUnion<"event_type", [z.ZodObject<{
28898
28908
  device_id?: string | undefined;
28899
28909
  customer_key?: string | undefined;
28900
28910
  access_code_id?: string | undefined;
28911
+ reason?: {
28912
+ message: string;
28913
+ reason_code: "unknown_code" | "expired_code" | "blocklisted_code" | "too_many_attempts" | "blocked_by_privacy_mode" | "credential_error";
28914
+ } | undefined;
28901
28915
  user_identity_id?: string | undefined;
28902
28916
  acs_user_id?: string | undefined;
28903
28917
  acs_entrance_id?: string | undefined;
@@ -28915,6 +28929,10 @@ declare const seam_event: z.ZodDiscriminatedUnion<"event_type", [z.ZodObject<{
28915
28929
  device_id?: string | undefined;
28916
28930
  customer_key?: string | undefined;
28917
28931
  access_code_id?: string | undefined;
28932
+ reason?: {
28933
+ message: string;
28934
+ reason_code: "unknown_code" | "expired_code" | "blocklisted_code" | "too_many_attempts" | "blocked_by_privacy_mode" | "credential_error";
28935
+ } | undefined;
28918
28936
  user_identity_id?: string | undefined;
28919
28937
  acs_user_id?: string | undefined;
28920
28938
  acs_entrance_id?: string | undefined;
@@ -78277,6 +78295,13 @@ type Routes = {
78277
78295
  ID of the ACS entrance associated with the access-denied event.
78278
78296
  */
78279
78297
  acs_entrance_id?: string | undefined;
78298
+ /** Why access was denied, when the provider reports a determinable cause. Omitted when unknown. */
78299
+ reason?: {
78300
+ /** Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. */
78301
+ reason_code: 'unknown_code' | 'expired_code' | 'blocklisted_code' | 'too_many_attempts' | 'blocked_by_privacy_mode' | 'credential_error';
78302
+ /** Human-readable explanation of why access was denied. */
78303
+ message: string;
78304
+ } | undefined;
78280
78305
  } | {
78281
78306
  /** ID of the event. */
78282
78307
  event_id: string;
@@ -81536,6 +81561,13 @@ type Routes = {
81536
81561
  ID of the ACS entrance associated with the access-denied event.
81537
81562
  */
81538
81563
  acs_entrance_id?: string | undefined;
81564
+ /** Why access was denied, when the provider reports a determinable cause. Omitted when unknown. */
81565
+ reason?: {
81566
+ /** Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. */
81567
+ reason_code: 'unknown_code' | 'expired_code' | 'blocklisted_code' | 'too_many_attempts' | 'blocked_by_privacy_mode' | 'credential_error';
81568
+ /** Human-readable explanation of why access was denied. */
81569
+ message: string;
81570
+ } | undefined;
81539
81571
  } | {
81540
81572
  /** ID of the event. */
81541
81573
  event_id: string;
@@ -111300,6 +111332,13 @@ type Routes = {
111300
111332
  ID of the ACS entrance associated with the access-denied event.
111301
111333
  */
111302
111334
  acs_entrance_id?: string | undefined;
111335
+ /** Why access was denied, when the provider reports a determinable cause. Omitted when unknown. */
111336
+ reason?: {
111337
+ /** Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. */
111338
+ reason_code: 'unknown_code' | 'expired_code' | 'blocklisted_code' | 'too_many_attempts' | 'blocked_by_privacy_mode' | 'credential_error';
111339
+ /** Human-readable explanation of why access was denied. */
111340
+ message: string;
111341
+ } | undefined;
111303
111342
  } | {
111304
111343
  /** ID of the event. */
111305
111344
  event_id: string;
@@ -149395,6 +149434,13 @@ type Routes = {
149395
149434
  ID of the ACS entrance associated with the access-denied event.
149396
149435
  */
149397
149436
  acs_entrance_id?: string | undefined;
149437
+ /** Why access was denied, when the provider reports a determinable cause. Omitted when unknown. */
149438
+ reason?: {
149439
+ /** Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. */
149440
+ reason_code: 'unknown_code' | 'expired_code' | 'blocklisted_code' | 'too_many_attempts' | 'blocked_by_privacy_mode' | 'credential_error';
149441
+ /** Human-readable explanation of why access was denied. */
149442
+ message: string;
149443
+ } | undefined;
149398
149444
  } | {
149399
149445
  /** ID of the event. */
149400
149446
  event_id: string;
package/dist/index.cjs CHANGED
@@ -5616,6 +5616,16 @@ var common_event_warning = zod.z.object({
5616
5616
  }).describe(
5617
5617
  "Warning associated with the resource, including the warning code, message, and creation timestamp."
5618
5618
  );
5619
+ var lock_access_denied_reason = zod.z.enum([
5620
+ "unknown_code",
5621
+ "expired_code",
5622
+ "blocklisted_code",
5623
+ "too_many_attempts",
5624
+ "blocked_by_privacy_mode",
5625
+ "credential_error"
5626
+ ]).describe(
5627
+ "Normalized reason a lock denied access. Provider-agnostic; not all providers report every value."
5628
+ );
5619
5629
 
5620
5630
  // src/lib/seam/connect/models/events/access-codes.ts
5621
5631
  var access_code_event = common_event.extend({
@@ -6782,7 +6792,13 @@ var lock_access_denied_event = device_event.extend({
6782
6792
  ---
6783
6793
  ID of the ACS entrance associated with the access-denied event.
6784
6794
  `),
6785
- device_id: zod.z.string().uuid().optional().describe("ID of the affected device.")
6795
+ device_id: zod.z.string().uuid().optional().describe("ID of the affected device."),
6796
+ reason: zod.z.object({
6797
+ reason_code: lock_access_denied_reason,
6798
+ message: zod.z.string().describe("Human-readable explanation of why access was denied.")
6799
+ }).optional().describe(
6800
+ "Why access was denied, when the provider reports a determinable cause. Omitted when unknown."
6801
+ )
6786
6802
  }).describe(`
6787
6803
  ---
6788
6804
  route_path: /locks
@@ -31035,6 +31051,29 @@ var openapi = {
31035
31051
  format: "date-time",
31036
31052
  type: "string"
31037
31053
  },
31054
+ reason: {
31055
+ description: "Why access was denied, when the provider reports a determinable cause. Omitted when unknown.",
31056
+ properties: {
31057
+ message: {
31058
+ description: "Human-readable explanation of why access was denied.",
31059
+ type: "string"
31060
+ },
31061
+ reason_code: {
31062
+ description: "Normalized reason a lock denied access. Provider-agnostic; not all providers report every value.",
31063
+ enum: [
31064
+ "unknown_code",
31065
+ "expired_code",
31066
+ "blocklisted_code",
31067
+ "too_many_attempts",
31068
+ "blocked_by_privacy_mode",
31069
+ "credential_error"
31070
+ ],
31071
+ type: "string"
31072
+ }
31073
+ },
31074
+ required: ["reason_code", "message"],
31075
+ type: "object"
31076
+ },
31038
31077
  user_identity_id: {
31039
31078
  description: "\n undocumented: Unreleased.\n ---\n ID of the user identity associated with the access-denied event.\n ",
31040
31079
  format: "uuid",