seam 1.228.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 +1 -1
- package/README.md +38 -3
- package/bin/seam.d.ts +2 -0
- package/bin/seam.js +3 -0
- package/bin/seam.js.map +1 -0
- package/index.d.ts +0 -2
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/package.json +27 -19
- package/src/bin/seam.ts +3 -0
- package/src/index.ts +0 -2
- package/dist/index.cjs +0 -38
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -4
package/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021-
|
|
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,15 +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
|
|
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
|
-
- [@seamapi/types]: TypeScript types for the Seam API.
|
|
23
23
|
|
|
24
24
|
[Seam]: https://www.seam.co/
|
|
25
25
|
[Seam Docs]: https://docs.seam.co/latest/
|
|
26
|
-
[@seamapi/
|
|
26
|
+
[@seamapi/cli]: https://github.com/seamapi/cli
|
|
27
27
|
[@seamapi/http]: https://github.com/seamapi/javascript-http
|
|
28
28
|
[@seamapi/webhook]: https://github.com/seamapi/javascript-webhook
|
|
29
29
|
|
|
@@ -58,6 +58,7 @@ Instead, it re-exports from a core set of Seam modules:
|
|
|
58
58
|
- [Overriding the Client](#overriding-the-client)
|
|
59
59
|
- [Alternative endpoint path interface](#alternative-endpoint-path-interface)
|
|
60
60
|
- [Inspecting the Request](#inspecting-the-request)
|
|
61
|
+
- [Command Line Interface](#command-line-interface)
|
|
61
62
|
- [Receiving Webhooks](#receiving-webhooks)
|
|
62
63
|
- [Development and Testing](#development-and-testing)
|
|
63
64
|
- [Quickstart](#quickstart)
|
|
@@ -549,6 +550,40 @@ console.log(`${request.method} ${request.url}`, JSON.stringify(request.body))
|
|
|
549
550
|
const devices = await request.execute()
|
|
550
551
|
```
|
|
551
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
|
+
|
|
552
587
|
### Receiving Webhooks
|
|
553
588
|
|
|
554
589
|
The Seam API implements webhooks using [Svix](https://www.svix.com).
|
package/bin/seam.d.ts
ADDED
package/bin/seam.js
ADDED
package/bin/seam.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seam.js","sourceRoot":"","sources":["../src/bin/seam.ts"],"names":[],"mappings":";AAEA,OAAO,kBAAkB,CAAA"}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, type SeamHttpOptions as SeamOptions, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, type SeamHttpWithoutWorkspace as SeamWithoutWorkspaceOptions, type SeamHttpWithoutWorkspaceOptions as SeamMultiWorkspaceOptions } from '@seamapi/http';
|
|
2
2
|
export * from '@seamapi/http';
|
|
3
|
-
export type { openapi } from '@seamapi/types';
|
|
4
|
-
export { schemas } from '@seamapi/types';
|
|
5
3
|
export * from '@seamapi/webhook';
|
|
6
4
|
export { Seam, SeamEndpoints, SeamWithoutWorkspace };
|
|
7
5
|
export type { SeamMultiWorkspaceOptions, SeamOptions, SeamWithoutWorkspaceOptions, };
|
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, } from '@seamapi/http';
|
|
2
2
|
export * from '@seamapi/http';
|
|
3
|
-
export { schemas } from '@seamapi/types';
|
|
4
3
|
export * from '@seamapi/webhook';
|
|
5
4
|
export { Seam, SeamEndpoints, SeamWithoutWorkspace };
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,IAAI,EAChB,iBAAiB,IAAI,aAAa,EAElC,wBAAwB,IAAI,oBAAoB,GAGjD,MAAM,eAAe,CAAA;AAEtB,cAAc,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,IAAI,EAChB,iBAAiB,IAAI,aAAa,EAElC,wBAAwB,IAAI,oBAAoB,GAGjD,MAAM,eAAe,CAAA;AAEtB,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,oBAAoB,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seam",
|
|
3
|
-
"version": "1.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
38
|
-
"
|
|
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,16 +63,24 @@
|
|
|
62
63
|
},
|
|
63
64
|
"engines": {
|
|
64
65
|
"node": ">=22.11.0",
|
|
65
|
-
"npm": ">=10.
|
|
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": {
|
|
68
|
-
"@seamapi/
|
|
69
|
-
"@seamapi/
|
|
70
|
-
"@seamapi/webhook": "1.
|
|
71
|
-
"zod": "^3.21.4"
|
|
79
|
+
"@seamapi/cli": "0.6.0",
|
|
80
|
+
"@seamapi/http": "^2.2.0",
|
|
81
|
+
"@seamapi/webhook": "1.4.0"
|
|
72
82
|
},
|
|
73
83
|
"devDependencies": {
|
|
74
|
-
"@swc/core": "^1.11.29",
|
|
75
84
|
"@types/node": "^24.10.9",
|
|
76
85
|
"del-cli": "^6.0.0",
|
|
77
86
|
"eslint": "^9.31.0",
|
|
@@ -81,11 +90,10 @@
|
|
|
81
90
|
"jiti": "^2.4.2",
|
|
82
91
|
"landlubber": "^2.0.0",
|
|
83
92
|
"markdown-toc": "^1.2.0",
|
|
84
|
-
"neostandard": "^0.
|
|
93
|
+
"neostandard": "^0.13.0",
|
|
85
94
|
"prettier": "^3.0.0",
|
|
86
95
|
"tsc-alias": "^1.8.2",
|
|
87
|
-
"tsup": "^8.0.1",
|
|
88
96
|
"tsx": "^4.6.2",
|
|
89
|
-
"typescript": "^
|
|
97
|
+
"typescript": "^6.0.3"
|
|
90
98
|
}
|
|
91
99
|
}
|
package/src/bin/seam.ts
ADDED
package/src/index.ts
CHANGED
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
} from '@seamapi/http'
|
|
9
9
|
|
|
10
10
|
export * from '@seamapi/http'
|
|
11
|
-
export type { openapi } from '@seamapi/types'
|
|
12
|
-
export { schemas } from '@seamapi/types'
|
|
13
11
|
export * from '@seamapi/webhook'
|
|
14
12
|
export { Seam, SeamEndpoints, SeamWithoutWorkspace }
|
|
15
13
|
export type {
|
package/dist/index.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var http = require('@seamapi/http');
|
|
4
|
-
var types = require('@seamapi/types');
|
|
5
|
-
var webhook = require('@seamapi/webhook');
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "Seam", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () { return http.SeamHttp; }
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "SeamEndpoints", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return http.SeamHttpEndpoints; }
|
|
16
|
-
});
|
|
17
|
-
Object.defineProperty(exports, "SeamWithoutWorkspace", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return http.SeamHttpWithoutWorkspace; }
|
|
20
|
-
});
|
|
21
|
-
Object.defineProperty(exports, "schemas", {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return types.schemas; }
|
|
24
|
-
});
|
|
25
|
-
Object.keys(http).forEach(function (k) {
|
|
26
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () { return http[k]; }
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
Object.keys(webhook).forEach(function (k) {
|
|
32
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () { return webhook[k]; }
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
//# sourceMappingURL=index.cjs.map
|
|
38
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs","sourcesContent":[]}
|
package/dist/index.d.cts
DELETED
|
@@ -1,4 +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 { openapi, schemas } from '@seamapi/types';
|
|
4
|
-
export * from '@seamapi/webhook';
|