@seamapi/types 1.251.0 → 1.252.1
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/dist/connect.cjs +228 -52
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1183 -2
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +93 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/read-card.d.ts +96 -0
- package/lib/seam/connect/models/action-attempts/read-card.js +36 -0
- package/lib/seam/connect/models/action-attempts/read-card.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +139 -2
- package/lib/seam/connect/openapi.js +155 -1
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +1102 -151
- package/package.json +1 -1
- package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
- package/src/lib/seam/connect/models/action-attempts/read-card.ts +46 -0
- package/src/lib/seam/connect/openapi.ts +157 -1
- package/src/lib/seam/connect/route-types.ts +1113 -55
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { z } from 'zod'
|
|
|
3
3
|
import { activate_climate_preset_action_attempt } from './activate-climate-preset.js'
|
|
4
4
|
import { deprecated_action_attempts } from './deprecated.js'
|
|
5
5
|
import { lock_door_action_attempt } from './lock-door.js'
|
|
6
|
+
import { read_card_action_attempt } from './read-card.js'
|
|
6
7
|
import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
|
|
7
8
|
import { set_cool_action_attempt } from './set-cool.js'
|
|
8
9
|
import { set_fan_mode_action_attempt } from './set-fan-mode.js'
|
|
@@ -14,6 +15,7 @@ import { unlock_door_action_attempt } from './unlock-door.js'
|
|
|
14
15
|
export const action_attempt = z.union([
|
|
15
16
|
...lock_door_action_attempt.options,
|
|
16
17
|
...unlock_door_action_attempt.options,
|
|
18
|
+
...read_card_action_attempt.options,
|
|
17
19
|
...reset_sandbox_workspace_action_attempt.options,
|
|
18
20
|
...set_cool_action_attempt.options,
|
|
19
21
|
...set_heat_action_attempt.options,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
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.literal('READ_CARD')
|
|
10
|
+
|
|
11
|
+
const error = z.object({
|
|
12
|
+
type: z.string(), // TODO This should be typed properly with the possible errors
|
|
13
|
+
message: z.string(),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const result = z.object({
|
|
17
|
+
acs_credential_id: z
|
|
18
|
+
.string()
|
|
19
|
+
.uuid()
|
|
20
|
+
.nullable()
|
|
21
|
+
.describe('Matching acs_credential currently encoded on this card.'),
|
|
22
|
+
card_number: z
|
|
23
|
+
.string()
|
|
24
|
+
.nullable()
|
|
25
|
+
.describe('A number or sting that physically identifies this card.'),
|
|
26
|
+
// TODO visionline_metadata: visionline_credential_metadata,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export const read_card_action_attempt = z.discriminatedUnion('status', [
|
|
30
|
+
common_pending_action_attempt
|
|
31
|
+
.extend({
|
|
32
|
+
action_type,
|
|
33
|
+
})
|
|
34
|
+
.describe('Reading card data from physical encoder.'),
|
|
35
|
+
common_succeeded_action_attempt
|
|
36
|
+
.extend({
|
|
37
|
+
action_type,
|
|
38
|
+
result,
|
|
39
|
+
})
|
|
40
|
+
.describe('Reading card data from physical encoder succeeded.'),
|
|
41
|
+
common_failed_action_attempt
|
|
42
|
+
.extend({ action_type, error })
|
|
43
|
+
.describe('Reading card data from physical encoder failed.'),
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
export type ReadCardActionAttempt = z.infer<typeof read_card_action_attempt>
|
|
@@ -1174,6 +1174,100 @@ export default {
|
|
|
1174
1174
|
],
|
|
1175
1175
|
type: 'object',
|
|
1176
1176
|
},
|
|
1177
|
+
{
|
|
1178
|
+
description: 'Reading card data from physical encoder.',
|
|
1179
|
+
properties: {
|
|
1180
|
+
action_attempt_id: {
|
|
1181
|
+
description: 'The ID of the action attempt.',
|
|
1182
|
+
format: 'uuid',
|
|
1183
|
+
type: 'string',
|
|
1184
|
+
'x-title': 'Action Attempt ID',
|
|
1185
|
+
},
|
|
1186
|
+
action_type: { enum: ['READ_CARD'], type: 'string' },
|
|
1187
|
+
error: { nullable: true },
|
|
1188
|
+
result: { nullable: true },
|
|
1189
|
+
status: { enum: ['pending'], type: 'string' },
|
|
1190
|
+
},
|
|
1191
|
+
required: [
|
|
1192
|
+
'action_attempt_id',
|
|
1193
|
+
'status',
|
|
1194
|
+
'result',
|
|
1195
|
+
'error',
|
|
1196
|
+
'action_type',
|
|
1197
|
+
],
|
|
1198
|
+
type: 'object',
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
description: 'Reading card data from physical encoder succeeded.',
|
|
1202
|
+
properties: {
|
|
1203
|
+
action_attempt_id: {
|
|
1204
|
+
description: 'The ID of the action attempt.',
|
|
1205
|
+
format: 'uuid',
|
|
1206
|
+
type: 'string',
|
|
1207
|
+
'x-title': 'Action Attempt ID',
|
|
1208
|
+
},
|
|
1209
|
+
action_type: { enum: ['READ_CARD'], type: 'string' },
|
|
1210
|
+
error: { nullable: true },
|
|
1211
|
+
result: {
|
|
1212
|
+
properties: {
|
|
1213
|
+
acs_credential_id: {
|
|
1214
|
+
description:
|
|
1215
|
+
'Matching acs_credential currently encoded on this card.',
|
|
1216
|
+
format: 'uuid',
|
|
1217
|
+
nullable: true,
|
|
1218
|
+
type: 'string',
|
|
1219
|
+
},
|
|
1220
|
+
card_number: {
|
|
1221
|
+
description:
|
|
1222
|
+
'A number or sting that physically identifies this card.',
|
|
1223
|
+
nullable: true,
|
|
1224
|
+
type: 'string',
|
|
1225
|
+
},
|
|
1226
|
+
},
|
|
1227
|
+
required: ['acs_credential_id', 'card_number'],
|
|
1228
|
+
type: 'object',
|
|
1229
|
+
},
|
|
1230
|
+
status: { enum: ['success'], type: 'string' },
|
|
1231
|
+
},
|
|
1232
|
+
required: [
|
|
1233
|
+
'action_attempt_id',
|
|
1234
|
+
'status',
|
|
1235
|
+
'error',
|
|
1236
|
+
'action_type',
|
|
1237
|
+
'result',
|
|
1238
|
+
],
|
|
1239
|
+
type: 'object',
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
description: 'Reading card data from physical encoder failed.',
|
|
1243
|
+
properties: {
|
|
1244
|
+
action_attempt_id: {
|
|
1245
|
+
description: 'The ID of the action attempt.',
|
|
1246
|
+
format: 'uuid',
|
|
1247
|
+
type: 'string',
|
|
1248
|
+
'x-title': 'Action Attempt ID',
|
|
1249
|
+
},
|
|
1250
|
+
action_type: { enum: ['READ_CARD'], type: 'string' },
|
|
1251
|
+
error: {
|
|
1252
|
+
properties: {
|
|
1253
|
+
message: { type: 'string' },
|
|
1254
|
+
type: { type: 'string' },
|
|
1255
|
+
},
|
|
1256
|
+
required: ['type', 'message'],
|
|
1257
|
+
type: 'object',
|
|
1258
|
+
},
|
|
1259
|
+
result: { nullable: true },
|
|
1260
|
+
status: { enum: ['error'], type: 'string' },
|
|
1261
|
+
},
|
|
1262
|
+
required: [
|
|
1263
|
+
'action_attempt_id',
|
|
1264
|
+
'status',
|
|
1265
|
+
'result',
|
|
1266
|
+
'action_type',
|
|
1267
|
+
'error',
|
|
1268
|
+
],
|
|
1269
|
+
type: 'object',
|
|
1270
|
+
},
|
|
1177
1271
|
{
|
|
1178
1272
|
description: 'Resetting sandbox workspace.',
|
|
1179
1273
|
properties: {
|
|
@@ -6716,6 +6810,68 @@ export default {
|
|
|
6716
6810
|
'x-fern-sdk-return-value': 'acs_entrances',
|
|
6717
6811
|
},
|
|
6718
6812
|
},
|
|
6813
|
+
'/acs/credentials/read_card': {
|
|
6814
|
+
post: {
|
|
6815
|
+
operationId: 'acsCredentialsReadCardPost',
|
|
6816
|
+
requestBody: {
|
|
6817
|
+
content: {
|
|
6818
|
+
'application/json': {
|
|
6819
|
+
schema: {
|
|
6820
|
+
oneOf: [
|
|
6821
|
+
{
|
|
6822
|
+
properties: {
|
|
6823
|
+
acs_system_id: { format: 'uuid', type: 'string' },
|
|
6824
|
+
device_name: { type: 'string' },
|
|
6825
|
+
},
|
|
6826
|
+
required: ['acs_system_id', 'device_name'],
|
|
6827
|
+
type: 'object',
|
|
6828
|
+
},
|
|
6829
|
+
{
|
|
6830
|
+
properties: {
|
|
6831
|
+
device_id: { format: 'uuid', type: 'string' },
|
|
6832
|
+
},
|
|
6833
|
+
required: ['device_id'],
|
|
6834
|
+
type: 'object',
|
|
6835
|
+
},
|
|
6836
|
+
],
|
|
6837
|
+
},
|
|
6838
|
+
},
|
|
6839
|
+
},
|
|
6840
|
+
},
|
|
6841
|
+
responses: {
|
|
6842
|
+
200: {
|
|
6843
|
+
content: {
|
|
6844
|
+
'application/json': {
|
|
6845
|
+
schema: {
|
|
6846
|
+
properties: {
|
|
6847
|
+
action_attempt: {
|
|
6848
|
+
$ref: '#/components/schemas/action_attempt',
|
|
6849
|
+
},
|
|
6850
|
+
ok: { type: 'boolean' },
|
|
6851
|
+
},
|
|
6852
|
+
required: ['action_attempt', 'ok'],
|
|
6853
|
+
type: 'object',
|
|
6854
|
+
},
|
|
6855
|
+
},
|
|
6856
|
+
},
|
|
6857
|
+
description: 'OK',
|
|
6858
|
+
},
|
|
6859
|
+
400: { description: 'Bad Request' },
|
|
6860
|
+
401: { description: 'Unauthorized' },
|
|
6861
|
+
},
|
|
6862
|
+
security: [
|
|
6863
|
+
{ pat_with_workspace: [] },
|
|
6864
|
+
{ console_session: [] },
|
|
6865
|
+
{ api_key: [] },
|
|
6866
|
+
],
|
|
6867
|
+
summary: '/acs/credentials/read_card',
|
|
6868
|
+
tags: ['/acs'],
|
|
6869
|
+
'x-fern-sdk-group-name': ['acs', 'credentials'],
|
|
6870
|
+
'x-fern-sdk-method-name': 'read_card',
|
|
6871
|
+
'x-fern-sdk-return-value': 'action_attempt',
|
|
6872
|
+
'x-undocumented': 'Reading a card is currently unimplemented.',
|
|
6873
|
+
},
|
|
6874
|
+
},
|
|
6719
6875
|
'/acs/credentials/unassign': {
|
|
6720
6876
|
patch: {
|
|
6721
6877
|
operationId: 'acsCredentialsUnassignPatch',
|
|
@@ -13138,6 +13294,7 @@ export default {
|
|
|
13138
13294
|
tags: ['/thermostats'],
|
|
13139
13295
|
'x-fern-sdk-group-name': ['thermostats'],
|
|
13140
13296
|
'x-fern-sdk-method-name': 'create_climate_preset',
|
|
13297
|
+
'x-fern-sdk-return-value': 'climate_preset',
|
|
13141
13298
|
},
|
|
13142
13299
|
},
|
|
13143
13300
|
'/thermostats/delete_climate_preset': {
|
|
@@ -14217,7 +14374,6 @@ export default {
|
|
|
14217
14374
|
tags: ['/thermostats'],
|
|
14218
14375
|
'x-fern-sdk-group-name': ['thermostats'],
|
|
14219
14376
|
'x-fern-sdk-method-name': 'update_climate_preset',
|
|
14220
|
-
'x-fern-sdk-return-value': 'climate_preset',
|
|
14221
14377
|
},
|
|
14222
14378
|
},
|
|
14223
14379
|
'/user_identities/add_acs_user': {
|