@seamapi/types 1.254.0 → 1.255.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/dist/connect.cjs +238 -62
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1186 -0
- 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/encode-card.d.ts +96 -0
- package/lib/seam/connect/models/action-attempts/encode-card.js +36 -0
- package/lib/seam/connect/models/action-attempts/encode-card.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +84 -0
- package/lib/seam/connect/openapi.js +154 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +1036 -27
- 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/encode-card.ts +46 -0
- package/src/lib/seam/connect/openapi.ts +156 -0
- package/src/lib/seam/connect/route-types.ts +1135 -13
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from 'zod'
|
|
|
2
2
|
|
|
3
3
|
import { activate_climate_preset_action_attempt } from './activate-climate-preset.js'
|
|
4
4
|
import { deprecated_action_attempts } from './deprecated.js'
|
|
5
|
+
import { encode_card_action_attempt } from './encode-card.js'
|
|
5
6
|
import { lock_door_action_attempt } from './lock-door.js'
|
|
6
7
|
import { read_card_action_attempt } from './read-card.js'
|
|
7
8
|
import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
|
|
@@ -16,6 +17,7 @@ export const action_attempt = z.union([
|
|
|
16
17
|
...lock_door_action_attempt.options,
|
|
17
18
|
...unlock_door_action_attempt.options,
|
|
18
19
|
...read_card_action_attempt.options,
|
|
20
|
+
...encode_card_action_attempt.options,
|
|
19
21
|
...reset_sandbox_workspace_action_attempt.options,
|
|
20
22
|
...set_cool_action_attempt.options,
|
|
21
23
|
...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('ENCODE_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 encode_card_action_attempt = z.discriminatedUnion('status', [
|
|
30
|
+
common_pending_action_attempt
|
|
31
|
+
.extend({
|
|
32
|
+
action_type,
|
|
33
|
+
})
|
|
34
|
+
.describe('Encoding card data from physical encoder.'),
|
|
35
|
+
common_succeeded_action_attempt
|
|
36
|
+
.extend({
|
|
37
|
+
action_type,
|
|
38
|
+
result,
|
|
39
|
+
})
|
|
40
|
+
.describe('Encoding card data from physical encoder succeeded.'),
|
|
41
|
+
common_failed_action_attempt
|
|
42
|
+
.extend({ action_type, error })
|
|
43
|
+
.describe('Encoding card data from physical encoder failed.'),
|
|
44
|
+
])
|
|
45
|
+
|
|
46
|
+
export type EncodeCardActionAttempt = z.infer<typeof encode_card_action_attempt>
|
|
@@ -1268,6 +1268,100 @@ export default {
|
|
|
1268
1268
|
],
|
|
1269
1269
|
type: 'object',
|
|
1270
1270
|
},
|
|
1271
|
+
{
|
|
1272
|
+
description: 'Encoding card data from physical encoder.',
|
|
1273
|
+
properties: {
|
|
1274
|
+
action_attempt_id: {
|
|
1275
|
+
description: 'The ID of the action attempt.',
|
|
1276
|
+
format: 'uuid',
|
|
1277
|
+
type: 'string',
|
|
1278
|
+
'x-title': 'Action Attempt ID',
|
|
1279
|
+
},
|
|
1280
|
+
action_type: { enum: ['ENCODE_CARD'], type: 'string' },
|
|
1281
|
+
error: { nullable: true },
|
|
1282
|
+
result: { nullable: true },
|
|
1283
|
+
status: { enum: ['pending'], type: 'string' },
|
|
1284
|
+
},
|
|
1285
|
+
required: [
|
|
1286
|
+
'action_attempt_id',
|
|
1287
|
+
'status',
|
|
1288
|
+
'result',
|
|
1289
|
+
'error',
|
|
1290
|
+
'action_type',
|
|
1291
|
+
],
|
|
1292
|
+
type: 'object',
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
description: 'Encoding card data from physical encoder succeeded.',
|
|
1296
|
+
properties: {
|
|
1297
|
+
action_attempt_id: {
|
|
1298
|
+
description: 'The ID of the action attempt.',
|
|
1299
|
+
format: 'uuid',
|
|
1300
|
+
type: 'string',
|
|
1301
|
+
'x-title': 'Action Attempt ID',
|
|
1302
|
+
},
|
|
1303
|
+
action_type: { enum: ['ENCODE_CARD'], type: 'string' },
|
|
1304
|
+
error: { nullable: true },
|
|
1305
|
+
result: {
|
|
1306
|
+
properties: {
|
|
1307
|
+
acs_credential_id: {
|
|
1308
|
+
description:
|
|
1309
|
+
'Matching acs_credential currently encoded on this card.',
|
|
1310
|
+
format: 'uuid',
|
|
1311
|
+
nullable: true,
|
|
1312
|
+
type: 'string',
|
|
1313
|
+
},
|
|
1314
|
+
card_number: {
|
|
1315
|
+
description:
|
|
1316
|
+
'A number or sting that physically identifies this card.',
|
|
1317
|
+
nullable: true,
|
|
1318
|
+
type: 'string',
|
|
1319
|
+
},
|
|
1320
|
+
},
|
|
1321
|
+
required: ['acs_credential_id', 'card_number'],
|
|
1322
|
+
type: 'object',
|
|
1323
|
+
},
|
|
1324
|
+
status: { enum: ['success'], type: 'string' },
|
|
1325
|
+
},
|
|
1326
|
+
required: [
|
|
1327
|
+
'action_attempt_id',
|
|
1328
|
+
'status',
|
|
1329
|
+
'error',
|
|
1330
|
+
'action_type',
|
|
1331
|
+
'result',
|
|
1332
|
+
],
|
|
1333
|
+
type: 'object',
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
description: 'Encoding card data from physical encoder failed.',
|
|
1337
|
+
properties: {
|
|
1338
|
+
action_attempt_id: {
|
|
1339
|
+
description: 'The ID of the action attempt.',
|
|
1340
|
+
format: 'uuid',
|
|
1341
|
+
type: 'string',
|
|
1342
|
+
'x-title': 'Action Attempt ID',
|
|
1343
|
+
},
|
|
1344
|
+
action_type: { enum: ['ENCODE_CARD'], type: 'string' },
|
|
1345
|
+
error: {
|
|
1346
|
+
properties: {
|
|
1347
|
+
message: { type: 'string' },
|
|
1348
|
+
type: { type: 'string' },
|
|
1349
|
+
},
|
|
1350
|
+
required: ['type', 'message'],
|
|
1351
|
+
type: 'object',
|
|
1352
|
+
},
|
|
1353
|
+
result: { nullable: true },
|
|
1354
|
+
status: { enum: ['error'], type: 'string' },
|
|
1355
|
+
},
|
|
1356
|
+
required: [
|
|
1357
|
+
'action_attempt_id',
|
|
1358
|
+
'status',
|
|
1359
|
+
'result',
|
|
1360
|
+
'action_type',
|
|
1361
|
+
'error',
|
|
1362
|
+
],
|
|
1363
|
+
type: 'object',
|
|
1364
|
+
},
|
|
1271
1365
|
{
|
|
1272
1366
|
description: 'Resetting sandbox workspace.',
|
|
1273
1367
|
properties: {
|
|
@@ -7361,6 +7455,68 @@ export default {
|
|
|
7361
7455
|
'x-fern-sdk-method-name': 'update',
|
|
7362
7456
|
},
|
|
7363
7457
|
},
|
|
7458
|
+
'/acs/encoders/encode_card': {
|
|
7459
|
+
post: {
|
|
7460
|
+
operationId: 'acsEncodersEncodeCardPost',
|
|
7461
|
+
requestBody: {
|
|
7462
|
+
content: {
|
|
7463
|
+
'application/json': {
|
|
7464
|
+
schema: {
|
|
7465
|
+
oneOf: [
|
|
7466
|
+
{
|
|
7467
|
+
properties: {
|
|
7468
|
+
acs_system_id: { format: 'uuid', type: 'string' },
|
|
7469
|
+
device_name: { type: 'string' },
|
|
7470
|
+
},
|
|
7471
|
+
required: ['acs_system_id', 'device_name'],
|
|
7472
|
+
type: 'object',
|
|
7473
|
+
},
|
|
7474
|
+
{
|
|
7475
|
+
properties: {
|
|
7476
|
+
device_id: { format: 'uuid', type: 'string' },
|
|
7477
|
+
},
|
|
7478
|
+
required: ['device_id'],
|
|
7479
|
+
type: 'object',
|
|
7480
|
+
},
|
|
7481
|
+
],
|
|
7482
|
+
},
|
|
7483
|
+
},
|
|
7484
|
+
},
|
|
7485
|
+
},
|
|
7486
|
+
responses: {
|
|
7487
|
+
200: {
|
|
7488
|
+
content: {
|
|
7489
|
+
'application/json': {
|
|
7490
|
+
schema: {
|
|
7491
|
+
properties: {
|
|
7492
|
+
action_attempt: {
|
|
7493
|
+
$ref: '#/components/schemas/action_attempt',
|
|
7494
|
+
},
|
|
7495
|
+
ok: { type: 'boolean' },
|
|
7496
|
+
},
|
|
7497
|
+
required: ['action_attempt', 'ok'],
|
|
7498
|
+
type: 'object',
|
|
7499
|
+
},
|
|
7500
|
+
},
|
|
7501
|
+
},
|
|
7502
|
+
description: 'OK',
|
|
7503
|
+
},
|
|
7504
|
+
400: { description: 'Bad Request' },
|
|
7505
|
+
401: { description: 'Unauthorized' },
|
|
7506
|
+
},
|
|
7507
|
+
security: [
|
|
7508
|
+
{ pat_with_workspace: [] },
|
|
7509
|
+
{ console_session: [] },
|
|
7510
|
+
{ api_key: [] },
|
|
7511
|
+
],
|
|
7512
|
+
summary: '/acs/encoders/encode_card',
|
|
7513
|
+
tags: ['/acs'],
|
|
7514
|
+
'x-fern-sdk-group-name': ['acs', 'encoders'],
|
|
7515
|
+
'x-fern-sdk-method-name': 'encode_card',
|
|
7516
|
+
'x-fern-sdk-return-value': 'action_attempt',
|
|
7517
|
+
'x-undocumented': 'Encoding a card is currently unimplemented.',
|
|
7518
|
+
},
|
|
7519
|
+
},
|
|
7364
7520
|
'/acs/encoders/read_card': {
|
|
7365
7521
|
post: {
|
|
7366
7522
|
operationId: 'acsEncodersReadCardPost',
|