@seamapi/types 1.1099.0 → 1.1100.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1099.0",
3
+ "version": "1.1100.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -4,6 +4,7 @@ import { activate_climate_preset_action_attempt } from './activate-climate-prese
4
4
  import { activate_weekly_program_action_attempt } from './activate-weekly-program.js'
5
5
  import { assign_credential_action_attempt } from './assign-credential.js'
6
6
  import { configure_auto_lock_action_attempt } from './configure-auto-lock.js'
7
+ import { convert_access_code_to_managed_action_attempt } from './convert-access-code-to-managed.js'
7
8
  import { deprecated_action_attempts } from './deprecated.js'
8
9
  import { encode_credential_action_attempt } from './encode-credential.js'
9
10
  import { lock_door_action_attempt } from './lock-door.js'
@@ -33,6 +34,7 @@ export const action_attempt = z.union([
33
34
  ...simulate_manual_lock_via_keypad_action_attempt.options,
34
35
  ...push_thermostat_programs_action_attempt.options,
35
36
  ...configure_auto_lock_action_attempt.options,
37
+ ...convert_access_code_to_managed_action_attempt.options,
36
38
  ...deprecated_action_attempts,
37
39
  ]).describe(`
38
40
  ---
@@ -0,0 +1,44 @@
1
+ import * as z from 'zod/v3'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z
10
+ .literal('CONVERT_ACCESS_CODE_TO_MANAGED')
11
+ .describe(
12
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
13
+ )
14
+
15
+ const error = z
16
+ .object({
17
+ type: z.string().describe('Type of the error.'),
18
+ message: z
19
+ .string()
20
+ .describe(
21
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
22
+ ),
23
+ })
24
+ .describe('Error associated with the action.')
25
+
26
+ const result = z.object({}).describe('Result of the action.')
27
+
28
+ export const convert_access_code_to_managed_action_attempt =
29
+ z.discriminatedUnion('status', [
30
+ common_pending_action_attempt
31
+ .extend({
32
+ action_type,
33
+ })
34
+ .describe('Converting an unmanaged access code to managed is pending.'),
35
+ common_succeeded_action_attempt
36
+ .extend({
37
+ action_type,
38
+ result,
39
+ })
40
+ .describe('Converting an unmanaged access code to managed succeeded.'),
41
+ common_failed_action_attempt
42
+ .extend({ action_type, error })
43
+ .describe('Converting an unmanaged access code to managed failed.'),
44
+ ])
@@ -11566,6 +11566,122 @@ const openapi: OpenAPISpec = {
11566
11566
  ],
11567
11567
  type: 'object',
11568
11568
  },
11569
+ {
11570
+ description:
11571
+ 'Converting an unmanaged access code to managed is pending.',
11572
+ properties: {
11573
+ action_attempt_id: {
11574
+ description: 'ID of the action attempt.',
11575
+ format: 'uuid',
11576
+ type: 'string',
11577
+ },
11578
+ action_type: {
11579
+ description:
11580
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11581
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11582
+ type: 'string',
11583
+ },
11584
+ error: {
11585
+ description:
11586
+ 'Errors associated with the action attempt. Null for pending action attempts.',
11587
+ nullable: true,
11588
+ },
11589
+ result: {
11590
+ description:
11591
+ 'Result of the action attempt. Null for pending action attempts.',
11592
+ nullable: true,
11593
+ },
11594
+ status: { enum: ['pending'], type: 'string' },
11595
+ },
11596
+ required: [
11597
+ 'action_attempt_id',
11598
+ 'status',
11599
+ 'result',
11600
+ 'error',
11601
+ 'action_type',
11602
+ ],
11603
+ type: 'object',
11604
+ },
11605
+ {
11606
+ description:
11607
+ 'Converting an unmanaged access code to managed succeeded.',
11608
+ properties: {
11609
+ action_attempt_id: {
11610
+ description: 'ID of the action attempt.',
11611
+ format: 'uuid',
11612
+ type: 'string',
11613
+ },
11614
+ action_type: {
11615
+ description:
11616
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11617
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11618
+ type: 'string',
11619
+ },
11620
+ error: {
11621
+ description:
11622
+ 'Errors associated with the action attempt. Null for successful action attempts.',
11623
+ nullable: true,
11624
+ },
11625
+ result: {
11626
+ description: 'Result of the action.',
11627
+ properties: {},
11628
+ type: 'object',
11629
+ },
11630
+ status: { enum: ['success'], type: 'string' },
11631
+ },
11632
+ required: [
11633
+ 'action_attempt_id',
11634
+ 'status',
11635
+ 'error',
11636
+ 'action_type',
11637
+ 'result',
11638
+ ],
11639
+ type: 'object',
11640
+ },
11641
+ {
11642
+ description:
11643
+ 'Converting an unmanaged access code to managed failed.',
11644
+ properties: {
11645
+ action_attempt_id: {
11646
+ description: 'ID of the action attempt.',
11647
+ format: 'uuid',
11648
+ type: 'string',
11649
+ },
11650
+ action_type: {
11651
+ description:
11652
+ 'Action attempt to track the status of converting an unmanaged access code to a managed access code.',
11653
+ enum: ['CONVERT_ACCESS_CODE_TO_MANAGED'],
11654
+ type: 'string',
11655
+ },
11656
+ error: {
11657
+ description: 'Error associated with the action.',
11658
+ properties: {
11659
+ message: {
11660
+ description:
11661
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
11662
+ type: 'string',
11663
+ },
11664
+ type: { description: 'Type of the error.', type: 'string' },
11665
+ },
11666
+ required: ['type', 'message'],
11667
+ type: 'object',
11668
+ },
11669
+ result: {
11670
+ description:
11671
+ 'Result of the action attempt. Null for failed action attempts.',
11672
+ nullable: true,
11673
+ },
11674
+ status: { enum: ['error'], type: 'string' },
11675
+ },
11676
+ required: [
11677
+ 'action_attempt_id',
11678
+ 'status',
11679
+ 'result',
11680
+ 'action_type',
11681
+ 'error',
11682
+ ],
11683
+ type: 'object',
11684
+ },
11569
11685
  {
11570
11686
  properties: {
11571
11687
  action_attempt_id: {