@seamapi/types 1.1098.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1098.0",
3
+ "version": "1.1099.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>
@@ -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',
@@ -33490,6 +33568,32 @@ const openapi: OpenAPISpec = {
33490
33568
  type: 'object',
33491
33569
  'x-resource-type': 'access_grant',
33492
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
+ },
33493
33597
  ],
33494
33598
  },
33495
33599
  type: 'array',
@@ -34095,6 +34199,32 @@ const openapi: OpenAPISpec = {
34095
34199
  type: 'object',
34096
34200
  'x-resource-type': 'access_method',
34097
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
+ },
34098
34228
  ],
34099
34229
  },
34100
34230
  type: 'array',