Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 312342a

Browse files
authored
feat: Merge pull request #20 from seamapi/feat-cli
2 parents 94e145a + aa3ad00 commit 312342a

36 files changed

+1258
-152
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ dist
104104
.tern-port
105105

106106
*.generated.*
107+
cli-binaries

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
1-
# Javascript / Typescript Seam API Library
1+
# Javascript / Typescript Seam API Library & CLI
22

33
Control locks, lights and other internet of things devices with Seam's simple
44
API. Check out [the documentation](./docs/modules.md) or [some examples](./examples).
55

66
## Usage
77

8+
This package contains both a library and a CLI tool.
9+
10+
### CLI Usage
11+
12+
Install with `yarn global add seamapi` or `npm install -g seamapi`.
13+
14+
Then:
15+
```bash
16+
export SEAM_API_KEY=<your api key> # you can also pass this as an argument to the CLI
17+
18+
seam workspaces list
19+
```
20+
21+
### Library Usage
22+
23+
Install with `yarn add seamapi` or `npm install seamapi -s`.
24+
25+
Then:
826
```ts
927
// Replace with
1028
// const Seam = require("seamapi")

docs/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,30 @@
11
seamapi / [Exports](modules.md)
22

3-
# Javascript / Typescript Seam API Library
3+
# Javascript / Typescript Seam API Library & CLI
44

55
Control locks, lights and other internet of things devices with Seam's simple
66
API. Check out [the documentation](./docs/modules.md) or [some examples](./examples).
77

88
## Usage
99

10+
This package contains both a library and a CLI tool.
11+
12+
### CLI Usage
13+
14+
Install with `yarn global add seamapi` or `npm install -g seamapi`.
15+
16+
Then:
17+
```bash
18+
export SEAM_API_KEY=<your api key> # you can also pass this as an argument to the CLI
19+
20+
seam workspaces list
21+
```
22+
23+
### Library Usage
24+
25+
Install with `yarn add seamapi` or `npm install seamapi -s`.
26+
27+
Then:
1028
```ts
1129
// Replace with
1230
// const Seam = require("seamapi")

docs/classes/default.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Routes.constructor
6262
| :------ | :------ |
6363
| `create` | (`params`: [`AccessCodeCreateRequest`](../modules.md#accesscodecreaterequest)) => `Promise`<[`AccessCode`](../interfaces/AccessCode.md)\> |
6464
| `delete` | (`params`: [`AccessCodeDeleteRequest`](../modules.md#accesscodedeleterequest)) => `Promise`<[`Workspace`](../interfaces/Workspace.md) \| [`Workspace`](../interfaces/Workspace.md)[] \| [`Device`](../interfaces/Device.md)<[`LockProperties`](../interfaces/LockProperties.md), `any`\> \| [`Device`](../interfaces/Device.md)<[`LockProperties`](../interfaces/LockProperties.md), `any`\>[] \| [`ActionAttempt`](../modules.md#actionattempt)<`any`\> \| [`AccessCode`](../interfaces/AccessCode.md) \| [`AccessCode`](../interfaces/AccessCode.md)[] \| [`Device`](../interfaces/Device.md)<`any`, `any`\> \| [`Device`](../interfaces/Device.md)<`any`, `any`\>[] \| [`ConnectWebview`](../interfaces/ConnectWebview.md) \| [`ConnectWebview`](../interfaces/ConnectWebview.md)[] \| [`ConnectedAccount`](../interfaces/ConnectedAccount.md) \| [`ConnectedAccount`](../interfaces/ConnectedAccount.md)[]\> |
65-
| `list` | (`params`: { `device_id?`: `string` }) => `Promise`<[`AccessCode`](../interfaces/AccessCode.md)[]\> |
65+
| `list` | (`params`: { `device_id`: `string` }) => `Promise`<[`AccessCode`](../interfaces/AccessCode.md)[]\> |
6666

6767
#### Inherited from
6868

docs/enums/Provider.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[seamapi](../README.md) / [Exports](../modules.md) / Provider
2+
3+
# Enumeration: Provider
4+
5+
## Table of contents
6+
7+
### Enumeration members
8+
9+
- [AUGUST](Provider.md#august)
10+
- [NOISEAWARE](Provider.md#noiseaware)
11+
- [SCHLAGE](Provider.md#schlage)
12+
- [SMARTTHINGS](Provider.md#smartthings)
13+
- [YALE](Provider.md#yale)
14+
15+
## Enumeration members
16+
17+
### AUGUST
18+
19+
**AUGUST** = `"august"`
20+
21+
#### Defined in
22+
23+
[src/types/models.ts:13](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L13)
24+
25+
___
26+
27+
### NOISEAWARE
28+
29+
**NOISEAWARE** = `"noiseaware"`
30+
31+
#### Defined in
32+
33+
[src/types/models.ts:16](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L16)
34+
35+
___
36+
37+
### SCHLAGE
38+
39+
**SCHLAGE** = `"schlage"`
40+
41+
#### Defined in
42+
43+
[src/types/models.ts:14](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L14)
44+
45+
___
46+
47+
### SMARTTHINGS
48+
49+
**SMARTTHINGS** = `"smartthings"`
50+
51+
#### Defined in
52+
53+
[src/types/models.ts:17](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L17)
54+
55+
___
56+
57+
### YALE
58+
59+
**YALE** = `"yale"`
60+
61+
#### Defined in
62+
63+
[src/types/models.ts:15](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L15)

docs/interfaces/AccessCode.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#### Defined in
2323

24-
[src/types/models.ts:111](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L111)
24+
[src/types/models.ts:112](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L112)
2525

2626
___
2727

@@ -31,7 +31,7 @@ ___
3131

3232
#### Defined in
3333

34-
[src/types/models.ts:112](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L112)
34+
[src/types/models.ts:113](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L113)
3535

3636
___
3737

@@ -41,7 +41,7 @@ ___
4141

4242
#### Defined in
4343

44-
[src/types/models.ts:115](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L115)
44+
[src/types/models.ts:116](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L116)
4545

4646
___
4747

@@ -51,7 +51,7 @@ ___
5151

5252
#### Defined in
5353

54-
[src/types/models.ts:113](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L113)
54+
[src/types/models.ts:114](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L114)
5555

5656
___
5757

@@ -61,7 +61,7 @@ ___
6161

6262
#### Defined in
6363

64-
[src/types/models.ts:116](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L116)
64+
[src/types/models.ts:117](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L117)
6565

6666
___
6767

@@ -71,4 +71,4 @@ ___
7171

7272
#### Defined in
7373

74-
[src/types/models.ts:114](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L114)
74+
[src/types/models.ts:115](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L115)

docs/interfaces/ActionAttemptResultTypeMap.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#### Defined in
2727

28-
[src/types/models.ts:145](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L145)
28+
[src/types/models.ts:146](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L146)
2929

3030
___
3131

@@ -35,7 +35,7 @@ ___
3535

3636
#### Defined in
3737

38-
[src/types/models.ts:146](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L146)
38+
[src/types/models.ts:147](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L147)
3939

4040
___
4141

@@ -45,7 +45,7 @@ ___
4545

4646
#### Defined in
4747

48-
[src/types/models.ts:143](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L143)
48+
[src/types/models.ts:144](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L144)
4949

5050
___
5151

@@ -55,4 +55,4 @@ ___
5555

5656
#### Defined in
5757

58-
[src/types/models.ts:144](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L144)
58+
[src/types/models.ts:145](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L145)

docs/interfaces/ActionAttemptWithError.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ActionAttemptBase.action\_attempt\_id
3636

3737
#### Defined in
3838

39-
[src/types/models.ts:58](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L58)
39+
[src/types/models.ts:59](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L59)
4040

4141
___
4242

@@ -50,7 +50,7 @@ ActionAttemptBase.action\_type
5050

5151
#### Defined in
5252

53-
[src/types/models.ts:59](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L59)
53+
[src/types/models.ts:60](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L60)
5454

5555
___
5656

@@ -71,7 +71,7 @@ ActionAttemptBase.error
7171

7272
#### Defined in
7373

74-
[src/types/models.ts:76](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L76)
74+
[src/types/models.ts:77](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L77)
7575

7676
___
7777

@@ -85,7 +85,7 @@ ActionAttemptBase.result
8585

8686
#### Defined in
8787

88-
[src/types/models.ts:75](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L75)
88+
[src/types/models.ts:76](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L76)
8989

9090
___
9191

@@ -99,4 +99,4 @@ ActionAttemptBase.status
9999

100100
#### Defined in
101101

102-
[src/types/models.ts:74](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L74)
102+
[src/types/models.ts:75](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L75)

docs/interfaces/ConnectWebview.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828

2929
#### Defined in
3030

31-
[src/types/models.ts:99](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L99)
31+
[src/types/models.ts:100](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L100)
3232

3333
___
3434

3535
### accepted\_providers
3636

37-
**accepted\_providers**: [`Provider`](../modules.md#provider)[]
37+
**accepted\_providers**: [`Provider`](../enums/Provider.md)[]
3838

3939
#### Defined in
4040

41-
[src/types/models.ts:98](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L98)
41+
[src/types/models.ts:99](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L99)
4242

4343
___
4444

@@ -48,7 +48,7 @@ ___
4848

4949
#### Defined in
5050

51-
[src/types/models.ts:101](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L101)
51+
[src/types/models.ts:102](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L102)
5252

5353
___
5454

@@ -58,7 +58,7 @@ ___
5858

5959
#### Defined in
6060

61-
[src/types/models.ts:100](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L100)
61+
[src/types/models.ts:101](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L101)
6262

6363
___
6464

@@ -68,7 +68,7 @@ ___
6868

6969
#### Defined in
7070

71-
[src/types/models.ts:95](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L95)
71+
[src/types/models.ts:96](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L96)
7272

7373
___
7474

@@ -78,7 +78,7 @@ ___
7878

7979
#### Defined in
8080

81-
[src/types/models.ts:105](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L105)
81+
[src/types/models.ts:106](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L106)
8282

8383
___
8484

@@ -88,7 +88,7 @@ ___
8888

8989
#### Defined in
9090

91-
[src/types/models.ts:102](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L102)
91+
[src/types/models.ts:103](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L103)
9292

9393
___
9494

@@ -98,7 +98,7 @@ ___
9898

9999
#### Defined in
100100

101-
[src/types/models.ts:106](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L106)
101+
[src/types/models.ts:107](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L107)
102102

103103
___
104104

@@ -108,7 +108,7 @@ ___
108108

109109
#### Defined in
110110

111-
[src/types/models.ts:97](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L97)
111+
[src/types/models.ts:98](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L98)
112112

113113
___
114114

@@ -118,7 +118,7 @@ ___
118118

119119
#### Defined in
120120

121-
[src/types/models.ts:103](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L103)
121+
[src/types/models.ts:104](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L104)
122122

123123
___
124124

@@ -128,7 +128,7 @@ ___
128128

129129
#### Defined in
130130

131-
[src/types/models.ts:104](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L104)
131+
[src/types/models.ts:105](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L105)
132132

133133
___
134134

@@ -138,7 +138,7 @@ ___
138138

139139
#### Defined in
140140

141-
[src/types/models.ts:107](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L107)
141+
[src/types/models.ts:108](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L108)
142142

143143
___
144144

@@ -148,4 +148,4 @@ ___
148148

149149
#### Defined in
150150

151-
[src/types/models.ts:96](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L96)
151+
[src/types/models.ts:97](https://github.com/hello-seam/seamapi-javascript/blob/main/src/types/models.ts#L97)

docs/interfaces/ConnectWebviewCreateRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
### accepted\_providers
1414

15-
**accepted\_providers**: [`Provider`](../modules.md#provider)[]
15+
**accepted\_providers**: [`Provider`](../enums/Provider.md)[]
1616

1717
#### Defined in
1818

0 commit comments

Comments
 (0)