@seamapi/types 1.1097.0 → 1.1099.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/lib/seam/connect/models/access-grants/access-grant.d.ts +87 -8
- package/lib/seam/connect/models/access-grants/access-grant.js +12 -0
- package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
- package/lib/seam/connect/models/access-grants/access-method.d.ts +74 -8
- package/lib/seam/connect/models/access-grants/access-method.js +15 -1
- package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +37 -8
- package/lib/seam/connect/models/action-attempts/assign-credential.d.ts +37 -8
- package/lib/seam/connect/models/spaces/space.d.ts +54 -0
- package/lib/seam/connect/models/spaces/space.js +21 -0
- package/lib/seam/connect/models/spaces/space.js.map +1 -1
- package/lib/seam/connect/openapi.js +142 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +594 -106
- package/package.json +1 -1
- package/src/lib/seam/connect/models/access-grants/access-grant.ts +13 -0
- package/src/lib/seam/connect/models/access-grants/access-method.ts +16 -1
- package/src/lib/seam/connect/models/spaces/space.ts +35 -0
- package/src/lib/seam/connect/openapi.ts +166 -0
- package/src/lib/seam/connect/route-types.ts +1093 -446
package/package.json
CHANGED
|
@@ -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', [
|
|
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>
|
|
@@ -37,6 +37,38 @@ export const space_geolocation = z
|
|
|
37
37
|
})
|
|
38
38
|
.describe('Geographic coordinates of the space.')
|
|
39
39
|
|
|
40
|
+
const warning_code_description =
|
|
41
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'
|
|
42
|
+
|
|
43
|
+
const common_space_warning = z.object({
|
|
44
|
+
created_at: datetime.describe(
|
|
45
|
+
'Date and time at which Seam created the warning.',
|
|
46
|
+
),
|
|
47
|
+
message: z
|
|
48
|
+
.string()
|
|
49
|
+
.describe(
|
|
50
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
51
|
+
),
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const space_being_deleted = common_space_warning
|
|
55
|
+
.extend({
|
|
56
|
+
warning_code: z.literal('being_deleted').describe(warning_code_description),
|
|
57
|
+
})
|
|
58
|
+
.describe(
|
|
59
|
+
'Indicates that the space is being deleted. Seam removes it, revokes its access grants, and detaches its devices and entrances shortly.',
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
const space_warning = z
|
|
63
|
+
.discriminatedUnion('warning_code', [space_being_deleted])
|
|
64
|
+
.describe('Warning associated with the space.')
|
|
65
|
+
|
|
66
|
+
const _space_warning_map = z.object({
|
|
67
|
+
being_deleted: space_being_deleted.optional().nullable(),
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
export type SpaceWarningMap = z.infer<typeof _space_warning_map>
|
|
71
|
+
|
|
40
72
|
export const space = z.object({
|
|
41
73
|
space_id: z.string().uuid().describe('ID of the space.'),
|
|
42
74
|
workspace_id: z
|
|
@@ -67,6 +99,9 @@ export const space = z.object({
|
|
|
67
99
|
geolocation: space_geolocation
|
|
68
100
|
.nullish()
|
|
69
101
|
.describe('Geographic coordinates (latitude and longitude) of the space.'),
|
|
102
|
+
warnings: z
|
|
103
|
+
.array(space_warning)
|
|
104
|
+
.describe('Warnings associated with the space.'),
|
|
70
105
|
parent_space_id: z.string().uuid().optional().describe(`
|
|
71
106
|
---
|
|
72
107
|
undocumented: Only used internally.
|
|
@@ -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',
|
|
@@ -31640,6 +31718,41 @@ const openapi: OpenAPISpec = {
|
|
|
31640
31718
|
description: 'Unique key for the space within the workspace.',
|
|
31641
31719
|
type: 'string',
|
|
31642
31720
|
},
|
|
31721
|
+
warnings: {
|
|
31722
|
+
description: 'Warnings associated with the space.',
|
|
31723
|
+
items: {
|
|
31724
|
+
description: 'Warning associated with the space.',
|
|
31725
|
+
discriminator: { propertyName: 'warning_code' },
|
|
31726
|
+
oneOf: [
|
|
31727
|
+
{
|
|
31728
|
+
description:
|
|
31729
|
+
'Indicates that the space is being deleted. Seam removes it, revokes its access grants, and detaches its devices and entrances shortly.',
|
|
31730
|
+
properties: {
|
|
31731
|
+
created_at: {
|
|
31732
|
+
description:
|
|
31733
|
+
'Date and time at which Seam created the warning.',
|
|
31734
|
+
format: 'date-time',
|
|
31735
|
+
type: 'string',
|
|
31736
|
+
},
|
|
31737
|
+
message: {
|
|
31738
|
+
description:
|
|
31739
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
31740
|
+
type: 'string',
|
|
31741
|
+
},
|
|
31742
|
+
warning_code: {
|
|
31743
|
+
description:
|
|
31744
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
|
|
31745
|
+
enum: ['being_deleted'],
|
|
31746
|
+
type: 'string',
|
|
31747
|
+
},
|
|
31748
|
+
},
|
|
31749
|
+
required: ['created_at', 'message', 'warning_code'],
|
|
31750
|
+
type: 'object',
|
|
31751
|
+
},
|
|
31752
|
+
],
|
|
31753
|
+
},
|
|
31754
|
+
type: 'array',
|
|
31755
|
+
},
|
|
31643
31756
|
workspace_id: {
|
|
31644
31757
|
description: 'ID of the workspace associated with the space.',
|
|
31645
31758
|
format: 'uuid',
|
|
@@ -31654,6 +31767,7 @@ const openapi: OpenAPISpec = {
|
|
|
31654
31767
|
'created_at',
|
|
31655
31768
|
'device_count',
|
|
31656
31769
|
'acs_entrance_count',
|
|
31770
|
+
'warnings',
|
|
31657
31771
|
],
|
|
31658
31772
|
type: 'object',
|
|
31659
31773
|
'x-draft': 'Early access.',
|
|
@@ -33454,6 +33568,32 @@ const openapi: OpenAPISpec = {
|
|
|
33454
33568
|
type: 'object',
|
|
33455
33569
|
'x-resource-type': 'access_grant',
|
|
33456
33570
|
},
|
|
33571
|
+
{
|
|
33572
|
+
description:
|
|
33573
|
+
'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.',
|
|
33574
|
+
properties: {
|
|
33575
|
+
created_at: {
|
|
33576
|
+
description:
|
|
33577
|
+
'Date and time at which Seam created the error.',
|
|
33578
|
+
format: 'date-time',
|
|
33579
|
+
type: 'string',
|
|
33580
|
+
},
|
|
33581
|
+
error_code: {
|
|
33582
|
+
description:
|
|
33583
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
33584
|
+
enum: ['access_not_provisioned'],
|
|
33585
|
+
type: 'string',
|
|
33586
|
+
},
|
|
33587
|
+
message: {
|
|
33588
|
+
description:
|
|
33589
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
33590
|
+
type: 'string',
|
|
33591
|
+
},
|
|
33592
|
+
},
|
|
33593
|
+
required: ['created_at', 'message', 'error_code'],
|
|
33594
|
+
type: 'object',
|
|
33595
|
+
'x-resource-type': 'access_grant',
|
|
33596
|
+
},
|
|
33457
33597
|
],
|
|
33458
33598
|
},
|
|
33459
33599
|
type: 'array',
|
|
@@ -34059,6 +34199,32 @@ const openapi: OpenAPISpec = {
|
|
|
34059
34199
|
type: 'object',
|
|
34060
34200
|
'x-resource-type': 'access_method',
|
|
34061
34201
|
},
|
|
34202
|
+
{
|
|
34203
|
+
description:
|
|
34204
|
+
'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.',
|
|
34205
|
+
properties: {
|
|
34206
|
+
created_at: {
|
|
34207
|
+
description:
|
|
34208
|
+
'Date and time at which Seam created the error.',
|
|
34209
|
+
format: 'date-time',
|
|
34210
|
+
type: 'string',
|
|
34211
|
+
},
|
|
34212
|
+
error_code: {
|
|
34213
|
+
description:
|
|
34214
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
34215
|
+
enum: ['access_not_provisioned'],
|
|
34216
|
+
type: 'string',
|
|
34217
|
+
},
|
|
34218
|
+
message: {
|
|
34219
|
+
description:
|
|
34220
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
34221
|
+
type: 'string',
|
|
34222
|
+
},
|
|
34223
|
+
},
|
|
34224
|
+
required: ['created_at', 'message', 'error_code'],
|
|
34225
|
+
type: 'object',
|
|
34226
|
+
'x-resource-type': 'access_method',
|
|
34227
|
+
},
|
|
34062
34228
|
],
|
|
34063
34229
|
},
|
|
34064
34230
|
type: 'array',
|