seam 1.229.0 → 1.230.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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021-2025 Seam Labs, Inc.
3
+ Copyright (c) 2021-2026 Seam Labs, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
package/README.md CHANGED
@@ -15,13 +15,15 @@ The SDK is fully tree-shakeable
15
15
  and optimized for use in both client and server applications.
16
16
 
17
17
  The repository does not contain the SDK code.
18
- Instead, it re-exports from a core set of Seam modules:
18
+ Instead, it builds on a core set of Seam modules:
19
19
 
20
+ - [@seamapi/cli]: Command line interface for interacting with the Seam API.
20
21
  - [@seamapi/http]: JavaScript HTTP client for the Seam API written in TypeScript.
21
22
  - [@seamapi/webhook]: Webhook SDK for the Seam API written in TypeScript.
22
23
 
23
24
  [Seam]: https://www.seam.co/
24
25
  [Seam Docs]: https://docs.seam.co/latest/
26
+ [@seamapi/cli]: https://github.com/seamapi/cli
25
27
  [@seamapi/http]: https://github.com/seamapi/javascript-http
26
28
  [@seamapi/webhook]: https://github.com/seamapi/javascript-webhook
27
29
 
@@ -56,6 +58,7 @@ Instead, it re-exports from a core set of Seam modules:
56
58
  - [Overriding the Client](#overriding-the-client)
57
59
  - [Alternative endpoint path interface](#alternative-endpoint-path-interface)
58
60
  - [Inspecting the Request](#inspecting-the-request)
61
+ - [Command Line Interface](#command-line-interface)
59
62
  - [Receiving Webhooks](#receiving-webhooks)
60
63
  - [Development and Testing](#development-and-testing)
61
64
  - [Quickstart](#quickstart)
@@ -547,6 +550,40 @@ console.log(`${request.method} ${request.url}`, JSON.stringify(request.body))
547
550
  const devices = await request.execute()
548
551
  ```
549
552
 
553
+ ### Command Line Interface
554
+
555
+ Every `seam` command is interactive and will prompt you for any missing
556
+ required properties with helpful suggestions. To avoid automatic behavior,
557
+ pass `-y`
558
+
559
+ ```bash
560
+ # Login to Seam
561
+ seam login
562
+
563
+ # Select your workspace
564
+ seam select workspace
565
+
566
+ # Interactively select commands to execute
567
+ seam
568
+
569
+ # Create a connect webview to connect devices
570
+ seam connect-webviews create
571
+
572
+ # List devices in your workspace
573
+ seam devices list
574
+
575
+ MY_DOOR=$(seam devices get --name "Front Door" --id-only)
576
+
577
+ # Unlock a lock
578
+ seam locks unlock-door --device-id $MY_DOOR
579
+
580
+ # Create an access code
581
+ seam access-codes create --code "1234" --name "My Code"
582
+
583
+ # List your access codes
584
+ seam access-codes list --device-id $MY_DOOR
585
+ ```
586
+
550
587
  ### Receiving Webhooks
551
588
 
552
589
  The Seam API implements webhooks using [Svix](https://www.svix.com).
package/bin/seam.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '@seamapi/cli/cli';
package/bin/seam.js ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import '@seamapi/cli/cli';
3
+ //# sourceMappingURL=seam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seam.js","sourceRoot":"","sources":["../src/bin/seam.ts"],"names":[],"mappings":";AAEA,OAAO,kBAAkB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seam",
3
- "version": "1.229.0",
3
+ "version": "1.230.0",
4
4
  "description": "JavaScript SDK for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -10,15 +10,17 @@
10
10
  "import": {
11
11
  "types": "./index.d.ts",
12
12
  "default": "./index.js"
13
- },
14
- "require": {
15
- "types": "./dist/index.d.cts",
16
- "default": "./dist/index.cjs"
17
13
  }
18
14
  }
19
15
  },
20
16
  "module": "index.js",
21
- "sideEffects": false,
17
+ "bin": {
18
+ "seam": "./bin/seam.js"
19
+ },
20
+ "sideEffects": [
21
+ "./bin/seam.js",
22
+ "./src/bin/seam.ts"
23
+ ],
22
24
  "keywords": [
23
25
  "node"
24
26
  ],
@@ -34,17 +36,16 @@
34
36
  "index.js",
35
37
  "index.js.map",
36
38
  "index.d.ts",
37
- "src",
38
- "dist"
39
+ "bin",
40
+ "src"
39
41
  ],
40
42
  "scripts": {
41
43
  "build": "npm run build:entrypoints",
42
44
  "prebuild": "tsx src/index.ts",
43
45
  "postbuild": "node ./index.js",
44
46
  "build:entrypoints": "npm run build:ts",
45
- "postbuild:entrypoints": "tsup",
46
47
  "build:ts": "tsc --project tsconfig.build.json",
47
- "prebuild:ts": "del 'index.*'",
48
+ "prebuild:ts": "del 'index.*' bin",
48
49
  "postbuild:ts": "tsc-alias --project tsconfig.build.json",
49
50
  "typecheck": "tsc",
50
51
  "test": "true",
@@ -62,14 +63,24 @@
62
63
  },
63
64
  "engines": {
64
65
  "node": ">=22.11.0",
65
- "npm": ">=10.9.4"
66
+ "npm": ">=10.0.0"
67
+ },
68
+ "devEngines": {
69
+ "runtime": {
70
+ "name": "node",
71
+ "version": "^24.11.0 || ^22.11.0"
72
+ },
73
+ "packageManager": {
74
+ "name": "npm",
75
+ "version": "^11.0.0 || ^10.0.0"
76
+ }
66
77
  },
67
78
  "dependencies": {
79
+ "@seamapi/cli": "0.6.0",
68
80
  "@seamapi/http": "^2.2.0",
69
81
  "@seamapi/webhook": "1.4.0"
70
82
  },
71
83
  "devDependencies": {
72
- "@swc/core": "^1.11.29",
73
84
  "@types/node": "^24.10.9",
74
85
  "del-cli": "^6.0.0",
75
86
  "eslint": "^9.31.0",
@@ -79,11 +90,10 @@
79
90
  "jiti": "^2.4.2",
80
91
  "landlubber": "^2.0.0",
81
92
  "markdown-toc": "^1.2.0",
82
- "neostandard": "^0.12.2",
93
+ "neostandard": "^0.13.0",
83
94
  "prettier": "^3.0.0",
84
95
  "tsc-alias": "^1.8.2",
85
- "tsup": "^8.0.1",
86
96
  "tsx": "^4.6.2",
87
- "typescript": "^5.8.3"
97
+ "typescript": "^6.0.3"
88
98
  }
89
99
  }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ import '@seamapi/cli/cli'
package/dist/index.cjs DELETED
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var http = require('@seamapi/http');
4
- var webhook = require('@seamapi/webhook');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "Seam", {
9
- enumerable: true,
10
- get: function () { return http.SeamHttp; }
11
- });
12
- Object.defineProperty(exports, "SeamEndpoints", {
13
- enumerable: true,
14
- get: function () { return http.SeamHttpEndpoints; }
15
- });
16
- Object.defineProperty(exports, "SeamWithoutWorkspace", {
17
- enumerable: true,
18
- get: function () { return http.SeamHttpWithoutWorkspace; }
19
- });
20
- Object.keys(http).forEach(function (k) {
21
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
22
- enumerable: true,
23
- get: function () { return http[k]; }
24
- });
25
- });
26
- Object.keys(webhook).forEach(function (k) {
27
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
28
- enumerable: true,
29
- get: function () { return webhook[k]; }
30
- });
31
- });
32
- //# sourceMappingURL=index.cjs.map
33
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs","sourcesContent":[]}
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- export * from '@seamapi/http';
2
- export { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, SeamHttpWithoutWorkspaceOptions as SeamMultiWorkspaceOptions, SeamHttpOptions as SeamOptions, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, SeamHttpWithoutWorkspace as SeamWithoutWorkspaceOptions } from '@seamapi/http';
3
- export * from '@seamapi/webhook';