@seamapi/types 1.961.0 → 1.963.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 (26) hide show
  1. package/dist/connect.cjs +564 -22
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +979 -6
  4. package/dist/index.cjs +564 -22
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/access-grants/access-method.d.ts +143 -0
  7. package/lib/seam/connect/models/access-grants/access-method.js +36 -0
  8. package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
  9. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +63 -0
  10. package/lib/seam/connect/models/action-attempts/assign-credential.d.ts +63 -0
  11. package/lib/seam/connect/models/devices/device-provider.d.ts +2 -1
  12. package/lib/seam/connect/models/devices/device-provider.js +2 -1
  13. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  14. package/lib/seam/connect/models/events/access-methods.d.ts +130 -0
  15. package/lib/seam/connect/models/events/access-methods.js +18 -0
  16. package/lib/seam/connect/models/events/access-methods.js.map +1 -1
  17. package/lib/seam/connect/models/events/seam-event.d.ts +65 -1
  18. package/lib/seam/connect/openapi.js +492 -0
  19. package/lib/seam/connect/openapi.js.map +1 -1
  20. package/lib/seam/connect/route-types.d.ts +806 -6
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/models/access-grants/access-method.ts +53 -0
  23. package/src/lib/seam/connect/models/devices/device-provider.ts +2 -1
  24. package/src/lib/seam/connect/models/events/access-methods.ts +20 -0
  25. package/src/lib/seam/connect/openapi.ts +560 -0
  26. package/src/lib/seam/connect/route-types.ts +859 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.961.0",
3
+ "version": "1.963.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -50,11 +50,22 @@ const pulled_backup_access_code_warning = common_access_method_warning
50
50
  'Indicates that all attempts to create an access code on this device before the start time failed and a backup access code was used to ensure access was provided in time.',
51
51
  )
52
52
 
53
+ const delay_in_issuing_warning = common_access_method_warning
54
+ .extend({
55
+ warning_code: z
56
+ .literal('delay_in_issuing')
57
+ .describe(warning_code_description),
58
+ })
59
+ .describe(
60
+ 'Indicates that Seam has not yet issued this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant), even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds.',
61
+ )
62
+
53
63
  const access_method_warning = z
54
64
  .discriminatedUnion('warning_code', [
55
65
  being_deleted,
56
66
  updating_access_times_warning,
57
67
  pulled_backup_access_code_warning,
68
+ delay_in_issuing_warning,
58
69
  ])
59
70
  .describe(
60
71
  'Warning associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).',
@@ -66,10 +77,47 @@ const _access_method_warning_map = z.object({
66
77
  pulled_backup_access_code: pulled_backup_access_code_warning
67
78
  .optional()
68
79
  .nullable(),
80
+ delay_in_issuing: delay_in_issuing_warning.optional().nullable(),
69
81
  })
70
82
 
71
83
  export type AccessMethodWarningMap = z.infer<typeof _access_method_warning_map>
72
84
 
85
+ const common_access_method_error = z.object({
86
+ created_at: z
87
+ .string()
88
+ .datetime()
89
+ .describe('Date and time at which Seam created the error.'),
90
+ message: z
91
+ .string()
92
+ .describe(
93
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
94
+ ),
95
+ })
96
+
97
+ const error_code_description =
98
+ 'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
99
+
100
+ const failed_to_issue_error = common_access_method_error.extend({
101
+ error_code: z.literal('failed_to_issue').describe(error_code_description),
102
+ }).describe(`
103
+ ---
104
+ resource_type: access_method
105
+ ---
106
+ Indicates that Seam was unable to issue this [access method](https://docs.seam.co/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.
107
+ `)
108
+
109
+ const access_method_error = z
110
+ .discriminatedUnion('error_code', [failed_to_issue_error])
111
+ .describe(
112
+ 'Error associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).',
113
+ )
114
+
115
+ const _access_method_error_map = z.object({
116
+ failed_to_issue: failed_to_issue_error.optional().nullable(),
117
+ })
118
+
119
+ export type AccessMethodErrorMap = z.infer<typeof _access_method_error_map>
120
+
73
121
  // Pending mutations for access methods
74
122
  const common_pending_mutation = z.object({
75
123
  created_at: z
@@ -279,6 +327,11 @@ export const access_method = z.object({
279
327
  .describe(
280
328
  'Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).',
281
329
  ),
330
+ errors: z
331
+ .array(access_method_error)
332
+ .describe(
333
+ 'Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).',
334
+ ),
282
335
  pending_mutations: z
283
336
  .array(access_method_pending_mutations)
284
337
  .describe(
@@ -19,6 +19,7 @@ export const DEVICE_PROVIDERS = {
19
19
  DOORKING: 'doorking',
20
20
  SALTO: 'salto',
21
21
  SALTO_KS: 'salto_ks',
22
+ SALTO_KS_ACCEPT: 'salto_ks_accept',
22
23
  LOCKLY: 'lockly',
23
24
  TTLOCK: 'ttlock',
24
25
  LINEAR: 'linear',
@@ -143,7 +144,7 @@ export const PROVIDER_CATEGORY_MAP = {
143
144
  'thirty_three_lock',
144
145
  ],
145
146
 
146
- beta: ['kisi'],
147
+ beta: ['kisi', 'salto_ks_accept'],
147
148
 
148
149
  thermostats: ['ecobee', 'nest', 'sensi', 'honeywell_resideo', 'first_alert'],
149
150
  noise_sensors: ['minut', 'noiseaware'],
@@ -91,6 +91,24 @@ export const access_method_created_event = access_method_event.extend({
91
91
  An access method was created.
92
92
  `)
93
93
 
94
+ export const access_method_delay_in_issuing_event = access_method_event.extend({
95
+ event_type: z.literal('access_method.delay_in_issuing'),
96
+ }).describe(`
97
+ ---
98
+ route_path: /access_methods
99
+ ---
100
+ Seam has not yet issued this access method, even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying \`delay_in_issuing\` warning clears automatically once issuance succeeds.
101
+ `)
102
+
103
+ export const access_method_failed_to_issue_event = access_method_event.extend({
104
+ event_type: z.literal('access_method.failed_to_issue'),
105
+ }).describe(`
106
+ ---
107
+ route_path: /access_methods
108
+ ---
109
+ Seam was unable to issue this access method 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 the accompanying \`failed_to_issue\` error clears automatically if the access method is eventually issued.
110
+ `)
111
+
94
112
  export type AccessMethodCreatedEvent = z.infer<
95
113
  typeof access_method_created_event
96
114
  >
@@ -106,4 +124,6 @@ export const access_method_events = [
106
124
  access_method_deleted_event,
107
125
  access_method_reissued_event,
108
126
  access_method_created_event,
127
+ access_method_delay_in_issuing_event,
128
+ access_method_failed_to_issue_event,
109
129
  ] as const