@seamapi/types 1.254.0 → 1.256.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 +273 -63
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +1314 -0
  4. package/lib/seam/connect/models/acs/acs-entrance.d.ts +48 -0
  5. package/lib/seam/connect/models/acs/acs-entrance.js +2 -1
  6. package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
  7. package/lib/seam/connect/models/acs/metadata/salto.d.ts +23 -2
  8. package/lib/seam/connect/models/acs/metadata/salto.js +8 -1
  9. package/lib/seam/connect/models/acs/metadata/salto.js.map +1 -1
  10. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +93 -0
  11. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  12. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  13. package/lib/seam/connect/models/action-attempts/encode-card.d.ts +96 -0
  14. package/lib/seam/connect/models/action-attempts/encode-card.js +36 -0
  15. package/lib/seam/connect/models/action-attempts/encode-card.js.map +1 -0
  16. package/lib/seam/connect/openapi.d.ts +114 -0
  17. package/lib/seam/connect/openapi.js +177 -0
  18. package/lib/seam/connect/openapi.js.map +1 -1
  19. package/lib/seam/connect/route-types.d.ts +1086 -27
  20. package/package.json +1 -1
  21. package/src/lib/seam/connect/models/acs/acs-entrance.ts +2 -0
  22. package/src/lib/seam/connect/models/acs/metadata/salto.ts +10 -3
  23. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  24. package/src/lib/seam/connect/models/action-attempts/encode-card.ts +46 -0
  25. package/src/lib/seam/connect/openapi.ts +179 -0
  26. package/src/lib/seam/connect/route-types.ts +1195 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.254.0",
3
+ "version": "1.256.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -2,6 +2,7 @@ import { z } from 'zod'
2
2
 
3
3
  import {
4
4
  acs_entrance_latch_metadata,
5
+ acs_entrance_salto_ks_metadata,
5
6
  acs_entrance_visionline_metadata,
6
7
  } from './metadata/index.js'
7
8
 
@@ -18,6 +19,7 @@ export const acs_entrance = z.object({
18
19
  ),
19
20
  latch_metadata: acs_entrance_latch_metadata.optional(),
20
21
  visionline_metadata: acs_entrance_visionline_metadata.optional(),
22
+ salto_ks_metadata: acs_entrance_salto_ks_metadata.optional(),
21
23
  })
22
24
 
23
25
  export type AcsEntrance = z.infer<typeof acs_entrance>
@@ -1,9 +1,16 @@
1
1
  import { z } from 'zod'
2
2
 
3
- export const acs_entrance_salto_metadata = z.object({
3
+ export const acs_entrance_salto_ks_metadata = z.object({
4
4
  door_name: z.string(),
5
+ locked_state: z.string(),
6
+ lock_type: z.string(),
7
+ online: z.boolean(),
8
+ battery_level: z.string(),
9
+ left_open_alarm: z.boolean(),
10
+ intrusion_alarm: z.boolean(),
11
+ privacy_mode: z.boolean(),
5
12
  })
6
13
 
7
- export type AcsEntranceSaltoMetadata = z.infer<
8
- typeof acs_entrance_salto_metadata
14
+ export type AcsEntranceSaltoKSMetadata = z.infer<
15
+ typeof acs_entrance_salto_ks_metadata
9
16
  >
@@ -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>
@@ -405,6 +405,29 @@ export default {
405
405
  ],
406
406
  type: 'object',
407
407
  },
408
+ salto_ks_metadata: {
409
+ properties: {
410
+ battery_level: { type: 'string' },
411
+ door_name: { type: 'string' },
412
+ intrusion_alarm: { type: 'boolean' },
413
+ left_open_alarm: { type: 'boolean' },
414
+ lock_type: { type: 'string' },
415
+ locked_state: { type: 'string' },
416
+ online: { type: 'boolean' },
417
+ privacy_mode: { type: 'boolean' },
418
+ },
419
+ required: [
420
+ 'door_name',
421
+ 'locked_state',
422
+ 'lock_type',
423
+ 'online',
424
+ 'battery_level',
425
+ 'left_open_alarm',
426
+ 'intrusion_alarm',
427
+ 'privacy_mode',
428
+ ],
429
+ type: 'object',
430
+ },
408
431
  visionline_metadata: {
409
432
  properties: {
410
433
  door_category: {
@@ -1268,6 +1291,100 @@ export default {
1268
1291
  ],
1269
1292
  type: 'object',
1270
1293
  },
1294
+ {
1295
+ description: 'Encoding card data from physical encoder.',
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: { nullable: true },
1306
+ status: { enum: ['pending'], type: 'string' },
1307
+ },
1308
+ required: [
1309
+ 'action_attempt_id',
1310
+ 'status',
1311
+ 'result',
1312
+ 'error',
1313
+ 'action_type',
1314
+ ],
1315
+ type: 'object',
1316
+ },
1317
+ {
1318
+ description: 'Encoding card data from physical encoder succeeded.',
1319
+ properties: {
1320
+ action_attempt_id: {
1321
+ description: 'The ID of the action attempt.',
1322
+ format: 'uuid',
1323
+ type: 'string',
1324
+ 'x-title': 'Action Attempt ID',
1325
+ },
1326
+ action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1327
+ error: { nullable: true },
1328
+ result: {
1329
+ properties: {
1330
+ acs_credential_id: {
1331
+ description:
1332
+ 'Matching acs_credential currently encoded on this card.',
1333
+ format: 'uuid',
1334
+ nullable: true,
1335
+ type: 'string',
1336
+ },
1337
+ card_number: {
1338
+ description:
1339
+ 'A number or sting that physically identifies this card.',
1340
+ nullable: true,
1341
+ type: 'string',
1342
+ },
1343
+ },
1344
+ required: ['acs_credential_id', 'card_number'],
1345
+ type: 'object',
1346
+ },
1347
+ status: { enum: ['success'], type: 'string' },
1348
+ },
1349
+ required: [
1350
+ 'action_attempt_id',
1351
+ 'status',
1352
+ 'error',
1353
+ 'action_type',
1354
+ 'result',
1355
+ ],
1356
+ type: 'object',
1357
+ },
1358
+ {
1359
+ description: 'Encoding card data from physical encoder failed.',
1360
+ properties: {
1361
+ action_attempt_id: {
1362
+ description: 'The ID of the action attempt.',
1363
+ format: 'uuid',
1364
+ type: 'string',
1365
+ 'x-title': 'Action Attempt ID',
1366
+ },
1367
+ action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1368
+ error: {
1369
+ properties: {
1370
+ message: { type: 'string' },
1371
+ type: { type: 'string' },
1372
+ },
1373
+ required: ['type', 'message'],
1374
+ type: 'object',
1375
+ },
1376
+ result: { nullable: true },
1377
+ status: { enum: ['error'], type: 'string' },
1378
+ },
1379
+ required: [
1380
+ 'action_attempt_id',
1381
+ 'status',
1382
+ 'result',
1383
+ 'action_type',
1384
+ 'error',
1385
+ ],
1386
+ type: 'object',
1387
+ },
1271
1388
  {
1272
1389
  description: 'Resetting sandbox workspace.',
1273
1390
  properties: {
@@ -7361,6 +7478,68 @@ export default {
7361
7478
  'x-fern-sdk-method-name': 'update',
7362
7479
  },
7363
7480
  },
7481
+ '/acs/encoders/encode_card': {
7482
+ post: {
7483
+ operationId: 'acsEncodersEncodeCardPost',
7484
+ requestBody: {
7485
+ content: {
7486
+ 'application/json': {
7487
+ schema: {
7488
+ oneOf: [
7489
+ {
7490
+ properties: {
7491
+ acs_system_id: { format: 'uuid', type: 'string' },
7492
+ device_name: { type: 'string' },
7493
+ },
7494
+ required: ['acs_system_id', 'device_name'],
7495
+ type: 'object',
7496
+ },
7497
+ {
7498
+ properties: {
7499
+ device_id: { format: 'uuid', type: 'string' },
7500
+ },
7501
+ required: ['device_id'],
7502
+ type: 'object',
7503
+ },
7504
+ ],
7505
+ },
7506
+ },
7507
+ },
7508
+ },
7509
+ responses: {
7510
+ 200: {
7511
+ content: {
7512
+ 'application/json': {
7513
+ schema: {
7514
+ properties: {
7515
+ action_attempt: {
7516
+ $ref: '#/components/schemas/action_attempt',
7517
+ },
7518
+ ok: { type: 'boolean' },
7519
+ },
7520
+ required: ['action_attempt', 'ok'],
7521
+ type: 'object',
7522
+ },
7523
+ },
7524
+ },
7525
+ description: 'OK',
7526
+ },
7527
+ 400: { description: 'Bad Request' },
7528
+ 401: { description: 'Unauthorized' },
7529
+ },
7530
+ security: [
7531
+ { pat_with_workspace: [] },
7532
+ { console_session: [] },
7533
+ { api_key: [] },
7534
+ ],
7535
+ summary: '/acs/encoders/encode_card',
7536
+ tags: ['/acs'],
7537
+ 'x-fern-sdk-group-name': ['acs', 'encoders'],
7538
+ 'x-fern-sdk-method-name': 'encode_card',
7539
+ 'x-fern-sdk-return-value': 'action_attempt',
7540
+ 'x-undocumented': 'Encoding a card is currently unimplemented.',
7541
+ },
7542
+ },
7364
7543
  '/acs/encoders/read_card': {
7365
7544
  post: {
7366
7545
  operationId: 'acsEncodersReadCardPost',