@seamapi/types 1.302.1 → 1.302.2

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.
@@ -2083,6 +2083,67 @@ export interface Routes {
2083
2083
  /** Indicates whether the access code is intended for use in offline scenarios. If "true," this code can be created on a device without a network connection. */
2084
2084
  is_offline_access_code: boolean;
2085
2085
  };
2086
+ access_code: {
2087
+ /** Unique identifier for a group of access codes that share the same code. */
2088
+ common_code_key: string | null;
2089
+ /** Indicates whether the code is set on the device according to a preconfigured schedule. */
2090
+ is_scheduled_on_device?: boolean | undefined;
2091
+ /** Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. */
2092
+ type: 'time_bound' | 'ongoing';
2093
+ /** Indicates whether the access code is waiting for a code assignment. */
2094
+ is_waiting_for_code_assignment?: boolean | undefined;
2095
+ /** Unique identifier for the access code. */
2096
+ access_code_id: string;
2097
+ /** Unique identifier for the device associated with the access code. */
2098
+ device_id: string;
2099
+ /** Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. */
2100
+ name: string | null;
2101
+ /** Code used for access. Typically, a numeric or alphanumeric string. */
2102
+ code: string | null;
2103
+ /** Date and time at which the access code was created. */
2104
+ created_at: string;
2105
+ /** Collection of errors associated with the access code, structured in a dictionary format. A unique "error_code" keys each error. Each error entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the error. "created_at" is a date that indicates when the error was generated. This structure enables detailed tracking and timely response to critical issues. */
2106
+ errors: Array<{
2107
+ message: string;
2108
+ is_access_code_error: true;
2109
+ error_code: string;
2110
+ } | {
2111
+ message: string;
2112
+ is_device_error: true;
2113
+ error_code: string;
2114
+ } | {
2115
+ message: string;
2116
+ is_connected_account_error: true;
2117
+ error_code: string;
2118
+ }>;
2119
+ /** Collection of warnings associated with the access code, structured in a dictionary format. A unique "warning_code" keys each warning. Each warning entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the warning. "created_at" is a date that indicates when the warning was generated. This structure enables detailed tracking and timely response to potential issues that are not critical but that may require attention. */
2120
+ warnings: Array<{
2121
+ message: string;
2122
+ warning_code: string;
2123
+ }>;
2124
+ /** Indicates whether Seam manages the access code. */
2125
+ is_managed: true;
2126
+ /** Date and time at which the time-bound access code becomes active. */
2127
+ starts_at?: (string | null) | undefined;
2128
+ /** Date and time after which the time-bound access code becomes inactive. */
2129
+ ends_at?: (string | null) | undefined;
2130
+ /**
2131
+ Current status of the access code within the operational lifecycle. Values are "setting," a transitional phase that indicates that the code is being configured or activated; "set", which indicates that the code is active and operational; "unset," which indicates a deactivated or unused state, either before activation or after deliberate deactivation; "removing," which indicates a transitional period in which the code is being deleted or made inactive; and "unknown," which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting.
2132
+ */
2133
+ status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown';
2134
+ /** Indicates whether a backup access code is available for use if the primary access code is lost or compromised. */
2135
+ is_backup_access_code_available: boolean;
2136
+ /** Indicates whether the access code is a backup code. */
2137
+ is_backup?: boolean | undefined;
2138
+ /** Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. */
2139
+ pulled_backup_access_code_id?: (string | null) | undefined;
2140
+ /** Indicates whether changes to the access code from external sources are permitted. */
2141
+ is_external_modification_allowed: boolean;
2142
+ /** Indicates whether the access code can only be used once. If "true," the code becomes invalid after the first use. */
2143
+ is_one_time_use: boolean;
2144
+ /** Indicates whether the access code is intended for use in offline scenarios. If "true," this code can be created on a device without a network connection. */
2145
+ is_offline_access_code: boolean;
2146
+ };
2086
2147
  };
2087
2148
  };
2088
2149
  '/access_codes/simulate/create_unmanaged_access_code': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.302.1",
3
+ "version": "1.302.2",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -7153,6 +7153,8 @@ export default {
7153
7153
  },
7154
7154
  '/access_codes/pull_backup_access_code': {
7155
7155
  post: {
7156
+ description:
7157
+ 'Retrieves a backup access code for an access code. See also [Managing Backup Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/backup-access-codes).',
7156
7158
  operationId: 'accessCodesPullBackupAccessCodePost',
7157
7159
  requestBody: {
7158
7160
  content: {
@@ -7173,12 +7175,13 @@ export default {
7173
7175
  'application/json': {
7174
7176
  schema: {
7175
7177
  properties: {
7178
+ access_code: { $ref: '#/components/schemas/access_code' },
7176
7179
  backup_access_code: {
7177
7180
  $ref: '#/components/schemas/access_code',
7178
7181
  },
7179
7182
  ok: { type: 'boolean' },
7180
7183
  },
7181
- required: ['backup_access_code', 'ok'],
7184
+ required: ['backup_access_code', 'access_code', 'ok'],
7182
7185
  type: 'object',
7183
7186
  },
7184
7187
  },
@@ -7198,8 +7201,8 @@ export default {
7198
7201
  tags: ['/access_codes'],
7199
7202
  'x-fern-sdk-group-name': ['access_codes'],
7200
7203
  'x-fern-sdk-method-name': 'pull_backup_access_code',
7201
- 'x-fern-sdk-return-value': 'backup_access_code',
7202
- 'x-response-key': 'backup_access_code',
7204
+ 'x-fern-sdk-return-value': 'access_code',
7205
+ 'x-response-key': 'access_code',
7203
7206
  },
7204
7207
  },
7205
7208
  '/access_codes/simulate/create_unmanaged_access_code': {
@@ -2395,6 +2395,71 @@ export interface Routes {
2395
2395
  /** Indicates whether the access code is intended for use in offline scenarios. If "true," this code can be created on a device without a network connection. */
2396
2396
  is_offline_access_code: boolean
2397
2397
  }
2398
+ access_code: {
2399
+ /** Unique identifier for a group of access codes that share the same code. */
2400
+ common_code_key: string | null
2401
+ /** Indicates whether the code is set on the device according to a preconfigured schedule. */
2402
+ is_scheduled_on_device?: boolean | undefined
2403
+ /** Nature of the access code. Values are "ongoing" for access codes that are active continuously until deactivated manually or "time_bound" for access codes that have a specific duration. */
2404
+ type: 'time_bound' | 'ongoing'
2405
+ /** Indicates whether the access code is waiting for a code assignment. */
2406
+ is_waiting_for_code_assignment?: boolean | undefined
2407
+ /** Unique identifier for the access code. */
2408
+ access_code_id: string
2409
+ /** Unique identifier for the device associated with the access code. */
2410
+ device_id: string
2411
+ /** Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. */
2412
+ name: string | null
2413
+ /** Code used for access. Typically, a numeric or alphanumeric string. */
2414
+ code: string | null
2415
+ /** Date and time at which the access code was created. */
2416
+ created_at: string
2417
+ /** Collection of errors associated with the access code, structured in a dictionary format. A unique "error_code" keys each error. Each error entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the error. "created_at" is a date that indicates when the error was generated. This structure enables detailed tracking and timely response to critical issues. */
2418
+ errors: Array<
2419
+ | {
2420
+ message: string
2421
+ is_access_code_error: true
2422
+ error_code: string
2423
+ }
2424
+ | {
2425
+ message: string
2426
+ is_device_error: true
2427
+ error_code: string
2428
+ }
2429
+ | {
2430
+ message: string
2431
+ is_connected_account_error: true
2432
+ error_code: string
2433
+ }
2434
+ >
2435
+ /** Collection of warnings associated with the access code, structured in a dictionary format. A unique "warning_code" keys each warning. Each warning entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the warning. "created_at" is a date that indicates when the warning was generated. This structure enables detailed tracking and timely response to potential issues that are not critical but that may require attention. */
2436
+ warnings: Array<{
2437
+ message: string
2438
+ warning_code: string
2439
+ }>
2440
+ /** Indicates whether Seam manages the access code. */
2441
+ is_managed: true
2442
+ /** Date and time at which the time-bound access code becomes active. */
2443
+ starts_at?: (string | null) | undefined
2444
+ /** Date and time after which the time-bound access code becomes inactive. */
2445
+ ends_at?: (string | null) | undefined
2446
+ /**
2447
+ Current status of the access code within the operational lifecycle. Values are "setting," a transitional phase that indicates that the code is being configured or activated; "set", which indicates that the code is active and operational; "unset," which indicates a deactivated or unused state, either before activation or after deliberate deactivation; "removing," which indicates a transitional period in which the code is being deleted or made inactive; and "unknown," which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting.
2448
+ */
2449
+ status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown'
2450
+ /** Indicates whether a backup access code is available for use if the primary access code is lost or compromised. */
2451
+ is_backup_access_code_available: boolean
2452
+ /** Indicates whether the access code is a backup code. */
2453
+ is_backup?: boolean | undefined
2454
+ /** Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. */
2455
+ pulled_backup_access_code_id?: (string | null) | undefined
2456
+ /** Indicates whether changes to the access code from external sources are permitted. */
2457
+ is_external_modification_allowed: boolean
2458
+ /** Indicates whether the access code can only be used once. If "true," the code becomes invalid after the first use. */
2459
+ is_one_time_use: boolean
2460
+ /** Indicates whether the access code is intended for use in offline scenarios. If "true," this code can be created on a device without a network connection. */
2461
+ is_offline_access_code: boolean
2462
+ }
2398
2463
  }
2399
2464
  }
2400
2465
  '/access_codes/simulate/create_unmanaged_access_code': {