@seamapi/types 1.1098.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.
Files changed (23) hide show
  1. package/lib/seam/connect/models/access-grants/access-grant.d.ts +87 -8
  2. package/lib/seam/connect/models/access-grants/access-grant.js +12 -0
  3. package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
  4. package/lib/seam/connect/models/access-grants/access-method.d.ts +74 -8
  5. package/lib/seam/connect/models/access-grants/access-method.js +15 -1
  6. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  7. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +112 -8
  8. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  9. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  10. package/lib/seam/connect/models/action-attempts/assign-credential.d.ts +37 -8
  11. package/lib/seam/connect/models/action-attempts/convert-access-code-to-managed.d.ts +77 -0
  12. package/lib/seam/connect/models/action-attempts/convert-access-code-to-managed.js +31 -0
  13. package/lib/seam/connect/models/action-attempts/convert-access-code-to-managed.js.map +1 -0
  14. package/lib/seam/connect/openapi.js +215 -0
  15. package/lib/seam/connect/openapi.js.map +1 -1
  16. package/lib/seam/connect/route-types.d.ts +1667 -106
  17. package/package.json +1 -1
  18. package/src/lib/seam/connect/models/access-grants/access-grant.ts +13 -0
  19. package/src/lib/seam/connect/models/access-grants/access-method.ts +16 -1
  20. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  21. package/src/lib/seam/connect/models/action-attempts/convert-access-code-to-managed.ts +44 -0
  22. package/src/lib/seam/connect/openapi.ts +246 -0
  23. package/src/lib/seam/connect/route-types.ts +2451 -629
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1098.0",
3
+ "version": "1.1100.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -36,6 +36,17 @@ const cannot_create_requested_access_methods_error =
36
36
  Indicates that Seam could not create one or more of the requested access methods for the access grant.
37
37
  `)
38
38
 
39
+ const access_not_provisioned_error = common_access_grant_error.extend({
40
+ error_code: z
41
+ .literal('access_not_provisioned')
42
+ .describe(error_code_description),
43
+ }).describe(`
44
+ ---
45
+ resource_type: access_grant
46
+ ---
47
+ Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.
48
+ `)
49
+
39
50
  const common_access_grant_warning = z.object({
40
51
  created_at: datetime.describe(
41
52
  'Date and time at which Seam created the warning.',
@@ -52,6 +63,7 @@ const warning_code_description =
52
63
 
53
64
  const access_grant_error = z.discriminatedUnion('error_code', [
54
65
  cannot_create_requested_access_methods_error,
66
+ access_not_provisioned_error,
55
67
  ])
56
68
 
57
69
  export type AccessGrantError = z.infer<typeof access_grant_error>
@@ -59,6 +71,7 @@ export type AccessGrantError = z.infer<typeof access_grant_error>
59
71
  export const _access_grant_error_map = z.object({
60
72
  cannot_create_requested_access_methods:
61
73
  cannot_create_requested_access_methods_error.optional().nullable(),
74
+ access_not_provisioned: access_not_provisioned_error.optional().nullable(),
62
75
  })
63
76
 
64
77
  export type AccessGrantErrorMap = z.infer<typeof _access_grant_error_map>
@@ -133,14 +133,29 @@ const failed_to_issue_error = common_access_method_error.extend({
133
133
  Indicates that Seam was unable to issue this [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access method is eventually issued.
134
134
  `)
135
135
 
136
+ const access_not_provisioned_error = common_access_method_error.extend({
137
+ error_code: z
138
+ .literal('access_not_provisioned')
139
+ .describe(error_code_description),
140
+ }).describe(`
141
+ ---
142
+ resource_type: access_method
143
+ ---
144
+ Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.
145
+ `)
146
+
136
147
  const access_method_error = z
137
- .discriminatedUnion('error_code', [failed_to_issue_error])
148
+ .discriminatedUnion('error_code', [
149
+ failed_to_issue_error,
150
+ access_not_provisioned_error,
151
+ ])
138
152
  .describe(
139
153
  'Error associated with the [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant).',
140
154
  )
141
155
 
142
156
  const _access_method_error_map = z.object({
143
157
  failed_to_issue: failed_to_issue_error.optional().nullable(),
158
+ access_not_provisioned: access_not_provisioned_error.optional().nullable(),
144
159
  })
145
160
 
146
161
  export type AccessMethodErrorMap = z.infer<typeof _access_method_error_map>
@@ -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
+ ])
@@ -1872,6 +1872,32 @@ const openapi: OpenAPISpec = {
1872
1872
  type: 'object',
1873
1873
  'x-resource-type': 'access_grant',
1874
1874
  },
1875
+ {
1876
+ description:
1877
+ 'Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.',
1878
+ properties: {
1879
+ created_at: {
1880
+ description:
1881
+ 'Date and time at which Seam created the error.',
1882
+ format: 'date-time',
1883
+ type: 'string',
1884
+ },
1885
+ error_code: {
1886
+ description:
1887
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
1888
+ enum: ['access_not_provisioned'],
1889
+ type: 'string',
1890
+ },
1891
+ message: {
1892
+ description:
1893
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
1894
+ type: 'string',
1895
+ },
1896
+ },
1897
+ required: ['created_at', 'message', 'error_code'],
1898
+ type: 'object',
1899
+ 'x-resource-type': 'access_grant',
1900
+ },
1875
1901
  ],
1876
1902
  },
1877
1903
  type: 'array',
@@ -2496,6 +2522,32 @@ const openapi: OpenAPISpec = {
2496
2522
  type: 'object',
2497
2523
  'x-resource-type': 'access_method',
2498
2524
  },
2525
+ {
2526
+ description:
2527
+ 'Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.',
2528
+ properties: {
2529
+ created_at: {
2530
+ description:
2531
+ 'Date and time at which Seam created the error.',
2532
+ format: 'date-time',
2533
+ type: 'string',
2534
+ },
2535
+ error_code: {
2536
+ description:
2537
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
2538
+ enum: ['access_not_provisioned'],
2539
+ type: 'string',
2540
+ },
2541
+ message: {
2542
+ description:
2543
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
2544
+ type: 'string',
2545
+ },
2546
+ },
2547
+ required: ['created_at', 'message', 'error_code'],
2548
+ type: 'object',
2549
+ 'x-resource-type': 'access_method',
2550
+ },
2499
2551
  ],
2500
2552
  },
2501
2553
  type: 'array',
@@ -9934,6 +9986,32 @@ const openapi: OpenAPISpec = {
9934
9986
  type: 'object',
9935
9987
  'x-resource-type': 'access_method',
9936
9988
  },
9989
+ {
9990
+ description:
9991
+ 'Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.',
9992
+ properties: {
9993
+ created_at: {
9994
+ description:
9995
+ 'Date and time at which Seam created the error.',
9996
+ format: 'date-time',
9997
+ type: 'string',
9998
+ },
9999
+ error_code: {
10000
+ description:
10001
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
10002
+ enum: ['access_not_provisioned'],
10003
+ type: 'string',
10004
+ },
10005
+ message: {
10006
+ description:
10007
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
10008
+ type: 'string',
10009
+ },
10010
+ },
10011
+ required: ['created_at', 'message', 'error_code'],
10012
+ type: 'object',
10013
+ 'x-resource-type': 'access_method',
10014
+ },
9937
10015
  ],
9938
10016
  },
9939
10017
  type: 'array',
@@ -11488,6 +11566,122 @@ const openapi: OpenAPISpec = {
11488
11566
  ],
11489
11567
  type: 'object',
11490
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
+ },
11491
11685
  {
11492
11686
  properties: {
11493
11687
  action_attempt_id: {
@@ -33490,6 +33684,32 @@ const openapi: OpenAPISpec = {
33490
33684
  type: 'object',
33491
33685
  'x-resource-type': 'access_grant',
33492
33686
  },
33687
+ {
33688
+ description:
33689
+ 'Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.',
33690
+ properties: {
33691
+ created_at: {
33692
+ description:
33693
+ 'Date and time at which Seam created the error.',
33694
+ format: 'date-time',
33695
+ type: 'string',
33696
+ },
33697
+ error_code: {
33698
+ description:
33699
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
33700
+ enum: ['access_not_provisioned'],
33701
+ type: 'string',
33702
+ },
33703
+ message: {
33704
+ description:
33705
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
33706
+ type: 'string',
33707
+ },
33708
+ },
33709
+ required: ['created_at', 'message', 'error_code'],
33710
+ type: 'object',
33711
+ 'x-resource-type': 'access_grant',
33712
+ },
33493
33713
  ],
33494
33714
  },
33495
33715
  type: 'array',
@@ -34095,6 +34315,32 @@ const openapi: OpenAPISpec = {
34095
34315
  type: 'object',
34096
34316
  'x-resource-type': 'access_method',
34097
34317
  },
34318
+ {
34319
+ description:
34320
+ 'Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.',
34321
+ properties: {
34322
+ created_at: {
34323
+ description:
34324
+ 'Date and time at which Seam created the error.',
34325
+ format: 'date-time',
34326
+ type: 'string',
34327
+ },
34328
+ error_code: {
34329
+ description:
34330
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
34331
+ enum: ['access_not_provisioned'],
34332
+ type: 'string',
34333
+ },
34334
+ message: {
34335
+ description:
34336
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
34337
+ type: 'string',
34338
+ },
34339
+ },
34340
+ required: ['created_at', 'message', 'error_code'],
34341
+ type: 'object',
34342
+ 'x-resource-type': 'access_method',
34343
+ },
34098
34344
  ],
34099
34345
  },
34100
34346
  type: 'array',