@seamapi/http 2.37.0 → 2.38.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.
@@ -62,6 +62,21 @@ export type AccessGrant = {
62
62
  * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
63
63
  */
64
64
  missing_device_ids?: Array<string> | undefined;
65
+ } /**
66
+ * 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.
67
+ */ | {
68
+ /**
69
+ * Date and time at which Seam created the error.
70
+ */
71
+ created_at: string;
72
+ /**
73
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
74
+ */
75
+ error_code: 'access_not_provisioned';
76
+ /**
77
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
78
+ */
79
+ message: string;
65
80
  }>;
66
81
  /**
67
82
  * Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method.
@@ -50,6 +50,21 @@ export type AccessMethod = {
50
50
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
51
51
  */
52
52
  message: string;
53
+ } /**
54
+ * 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.
55
+ */ | {
56
+ /**
57
+ * Date and time at which Seam created the error.
58
+ */
59
+ created_at: string;
60
+ /**
61
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
62
+ */
63
+ error_code: 'access_not_provisioned';
64
+ /**
65
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
66
+ */
67
+ message: string;
53
68
  }>;
54
69
  /**
55
70
  * URL of the Instant Key for mobile key access methods.
@@ -1066,7 +1066,7 @@ export type ActionAttempt = {
1066
1066
  /**
1067
1067
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
1068
1068
  */
1069
- error_code: 'failed_to_issue';
1069
+ error_code: 'failed_to_issue' | 'access_not_provisioned';
1070
1070
  /**
1071
1071
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1072
1072
  */
@@ -1780,6 +1780,69 @@ export type ActionAttempt = {
1780
1780
  */
1781
1781
  result: null;
1782
1782
  status: 'error';
1783
+ } | {
1784
+ /**
1785
+ * ID of the action attempt.
1786
+ */
1787
+ action_attempt_id: string;
1788
+ /**
1789
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
1790
+ */
1791
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED';
1792
+ /**
1793
+ * Error associated with the action.
1794
+ */
1795
+ error: null;
1796
+ /**
1797
+ * Result of the action.
1798
+ */
1799
+ result: {};
1800
+ status: 'success';
1801
+ } | {
1802
+ /**
1803
+ * ID of the action attempt.
1804
+ */
1805
+ action_attempt_id: string;
1806
+ /**
1807
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
1808
+ */
1809
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED';
1810
+ /**
1811
+ * Error associated with the action.
1812
+ */
1813
+ error: null;
1814
+ /**
1815
+ * Result of the action.
1816
+ */
1817
+ result: null;
1818
+ status: 'pending';
1819
+ } | {
1820
+ /**
1821
+ * ID of the action attempt.
1822
+ */
1823
+ action_attempt_id: string;
1824
+ /**
1825
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
1826
+ */
1827
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED';
1828
+ /**
1829
+ * Error associated with the action.
1830
+ */
1831
+ error: {
1832
+ /**
1833
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1834
+ */
1835
+ message: string;
1836
+ /**
1837
+ * Type of the error.
1838
+ */
1839
+ type: string;
1840
+ };
1841
+ /**
1842
+ * Result of the action.
1843
+ */
1844
+ result: null;
1845
+ status: 'error';
1783
1846
  } | {
1784
1847
  /**
1785
1848
  * ID of the action attempt.
@@ -46,6 +46,21 @@ export type UnmanagedAccessGrant = {
46
46
  * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
47
47
  */
48
48
  missing_device_ids?: Array<string> | undefined;
49
+ } /**
50
+ * 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.
51
+ */ | {
52
+ /**
53
+ * Date and time at which Seam created the error.
54
+ */
55
+ created_at: string;
56
+ /**
57
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
58
+ */
59
+ error_code: 'access_not_provisioned';
60
+ /**
61
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
62
+ */
63
+ message: string;
49
64
  }>;
50
65
  /**
51
66
  * @deprecated Use `space_ids`.
@@ -42,6 +42,21 @@ export type UnmanagedAccessMethod = {
42
42
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
43
43
  */
44
44
  message: string;
45
+ } /**
46
+ * 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.
47
+ */ | {
48
+ /**
49
+ * Date and time at which Seam created the error.
50
+ */
51
+ created_at: string;
52
+ /**
53
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
54
+ */
55
+ error_code: 'access_not_provisioned';
56
+ /**
57
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
58
+ */
59
+ message: string;
45
60
  }>;
46
61
  /**
47
62
  * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment.
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiJavascriptHttpVersion = "2.37.0";
1
+ declare const seamapiJavascriptHttpVersion = "2.38.0";
2
2
  export default seamapiJavascriptHttpVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.37.0';
1
+ const seamapiJavascriptHttpVersion = '2.38.0';
2
2
  export default seamapiJavascriptHttpVersion;
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/http",
3
- "version": "2.37.0",
3
+ "version": "2.38.0",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -88,7 +88,7 @@
88
88
  "@seamapi/blueprint": "^1.10.0",
89
89
  "@seamapi/fake-seam-connect": "^2.0.4",
90
90
  "@seamapi/smith": "^1.1.0",
91
- "@seamapi/types": "1.1098.0",
91
+ "@seamapi/types": "1.1100.0",
92
92
  "@types/jsonwebtoken": "^9.0.6",
93
93
  "@types/node": "^24.10.9",
94
94
  "ava": "^8.0.1",
@@ -55,27 +55,45 @@ export type AccessGrant = {
55
55
  /**
56
56
  * Indicates that Seam could not create one or more of the requested access methods for the access grant.
57
57
  */
58
- {
59
- /**
60
- * Date and time at which Seam created the error.
61
- */
62
- created_at: string
63
-
64
- /**
65
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
66
- */
67
- error_code: 'cannot_create_requested_access_methods'
68
-
69
- /**
70
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
71
- */
72
- message: string
73
-
74
- /**
75
- * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
76
- */
77
- missing_device_ids?: Array<string> | undefined
78
- }
58
+ | {
59
+ /**
60
+ * Date and time at which Seam created the error.
61
+ */
62
+ created_at: string
63
+
64
+ /**
65
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
66
+ */
67
+ error_code: 'cannot_create_requested_access_methods'
68
+
69
+ /**
70
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
71
+ */
72
+ message: string
73
+
74
+ /**
75
+ * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
76
+ */
77
+ missing_device_ids?: Array<string> | undefined
78
+ } /**
79
+ * 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.
80
+ */
81
+ | {
82
+ /**
83
+ * Date and time at which Seam created the error.
84
+ */
85
+ created_at: string
86
+
87
+ /**
88
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
89
+ */
90
+ error_code: 'access_not_provisioned'
91
+
92
+ /**
93
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
94
+ */
95
+ message: string
96
+ }
79
97
  >
80
98
 
81
99
  /**
@@ -46,22 +46,40 @@ export type AccessMethod = {
46
46
  /**
47
47
  * 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.
48
48
  */
49
- {
50
- /**
51
- * Date and time at which Seam created the error.
52
- */
53
- created_at: string
54
-
55
- /**
56
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
57
- */
58
- error_code: 'failed_to_issue'
59
-
60
- /**
61
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
62
- */
63
- message: string
64
- }
49
+ | {
50
+ /**
51
+ * Date and time at which Seam created the error.
52
+ */
53
+ created_at: string
54
+
55
+ /**
56
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
57
+ */
58
+ error_code: 'failed_to_issue'
59
+
60
+ /**
61
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
62
+ */
63
+ message: string
64
+ } /**
65
+ * 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.
66
+ */
67
+ | {
68
+ /**
69
+ * Date and time at which Seam created the error.
70
+ */
71
+ created_at: string
72
+
73
+ /**
74
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
75
+ */
76
+ error_code: 'access_not_provisioned'
77
+
78
+ /**
79
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
80
+ */
81
+ message: string
82
+ }
65
83
  >
66
84
 
67
85
  /**
@@ -1305,7 +1305,7 @@ export type ActionAttempt =
1305
1305
  /**
1306
1306
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
1307
1307
  */
1308
- error_code: 'failed_to_issue'
1308
+ error_code: 'failed_to_issue' | 'access_not_provisioned'
1309
1309
 
1310
1310
  /**
1311
1311
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
@@ -2186,6 +2186,83 @@ export type ActionAttempt =
2186
2186
  */
2187
2187
  action_attempt_id: string
2188
2188
 
2189
+ /**
2190
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
2191
+ */
2192
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED'
2193
+
2194
+ /**
2195
+ * Error associated with the action.
2196
+ */
2197
+ error: null
2198
+ /**
2199
+ * Result of the action.
2200
+ */
2201
+ result: {}
2202
+
2203
+ status: 'success'
2204
+ }
2205
+ | {
2206
+ /**
2207
+ * ID of the action attempt.
2208
+ */
2209
+ action_attempt_id: string
2210
+
2211
+ /**
2212
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
2213
+ */
2214
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED'
2215
+
2216
+ /**
2217
+ * Error associated with the action.
2218
+ */
2219
+ error: null
2220
+ /**
2221
+ * Result of the action.
2222
+ */
2223
+ result: null
2224
+
2225
+ status: 'pending'
2226
+ }
2227
+ | {
2228
+ /**
2229
+ * ID of the action attempt.
2230
+ */
2231
+ action_attempt_id: string
2232
+
2233
+ /**
2234
+ * Action attempt to track the status of converting an unmanaged access code to a managed access code.
2235
+ */
2236
+ action_type: 'CONVERT_ACCESS_CODE_TO_MANAGED'
2237
+
2238
+ /**
2239
+ * Error associated with the action.
2240
+ */
2241
+ error: {
2242
+ /**
2243
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
2244
+ */
2245
+ message: string
2246
+
2247
+ /**
2248
+ * Type of the error.
2249
+ */
2250
+ type: string
2251
+ }
2252
+
2253
+ /**
2254
+ * Result of the action.
2255
+ */
2256
+ result: null
2257
+
2258
+ status: 'error'
2259
+ }
2260
+ | {
2261
+ /**
2262
+ * ID of the action attempt.
2263
+ */
2264
+ action_attempt_id: string
2265
+
2189
2266
  /**
2190
2267
  * Syncing access codes is pending.
2191
2268
  */
@@ -38,27 +38,45 @@ export type UnmanagedAccessGrant = {
38
38
  /**
39
39
  * Indicates that Seam could not create one or more of the requested access methods for the access grant.
40
40
  */
41
- {
42
- /**
43
- * Date and time at which Seam created the error.
44
- */
45
- created_at: string
46
-
47
- /**
48
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
- */
50
- error_code: 'cannot_create_requested_access_methods'
51
-
52
- /**
53
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
- */
55
- message: string
56
-
57
- /**
58
- * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
59
- */
60
- missing_device_ids?: Array<string> | undefined
61
- }
41
+ | {
42
+ /**
43
+ * Date and time at which Seam created the error.
44
+ */
45
+ created_at: string
46
+
47
+ /**
48
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
+ */
50
+ error_code: 'cannot_create_requested_access_methods'
51
+
52
+ /**
53
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
+ */
55
+ message: string
56
+
57
+ /**
58
+ * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
59
+ */
60
+ missing_device_ids?: Array<string> | undefined
61
+ } /**
62
+ * 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.
63
+ */
64
+ | {
65
+ /**
66
+ * Date and time at which Seam created the error.
67
+ */
68
+ created_at: string
69
+
70
+ /**
71
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
72
+ */
73
+ error_code: 'access_not_provisioned'
74
+
75
+ /**
76
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
77
+ */
78
+ message: string
79
+ }
62
80
  >
63
81
 
64
82
  /**
@@ -38,22 +38,40 @@ export type UnmanagedAccessMethod = {
38
38
  /**
39
39
  * 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.
40
40
  */
41
- {
42
- /**
43
- * Date and time at which Seam created the error.
44
- */
45
- created_at: string
46
-
47
- /**
48
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
- */
50
- error_code: 'failed_to_issue'
51
-
52
- /**
53
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
- */
55
- message: string
56
- }
41
+ | {
42
+ /**
43
+ * Date and time at which Seam created the error.
44
+ */
45
+ created_at: string
46
+
47
+ /**
48
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
+ */
50
+ error_code: 'failed_to_issue'
51
+
52
+ /**
53
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
+ */
55
+ message: string
56
+ } /**
57
+ * 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.
58
+ */
59
+ | {
60
+ /**
61
+ * Date and time at which Seam created the error.
62
+ */
63
+ created_at: string
64
+
65
+ /**
66
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
67
+ */
68
+ error_code: 'access_not_provisioned'
69
+
70
+ /**
71
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
72
+ */
73
+ message: string
74
+ }
57
75
  >
58
76
 
59
77
  /**
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.37.0'
1
+ const seamapiJavascriptHttpVersion = '2.38.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion