@seamapi/http 0.9.1 → 0.9.3
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/README.md +36 -0
- package/dist/connect.cjs +28 -2
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +15 -3
- package/lib/seam/connect/routes/acs-credentials.d.ts +6 -2
- package/lib/seam/connect/routes/acs-credentials.js +12 -2
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +5 -1
- package/lib/seam/connect/routes/user-identities.js +8 -0
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +4 -0
- package/lib/seam/connect/routes/workspaces.js +8 -0
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +12 -12
- package/src/lib/seam/connect/routes/acs-credentials.ts +33 -4
- package/src/lib/seam/connect/routes/user-identities.ts +26 -1
- package/src/lib/seam/connect/routes/workspaces.ts +20 -0
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -22,11 +22,17 @@ The underlying HTTP client is [Axios].
|
|
|
22
22
|
|
|
23
23
|
[Seam]: https://www.seam.co/
|
|
24
24
|
[Seam Docs]: https://docs.seam.co/latest/
|
|
25
|
+
[seamapi]: https://www.npmjs.com/package/seamapi
|
|
25
26
|
[@seamapi/types]: https://github.com/seamapi/types/
|
|
26
27
|
[Axios]: https://axios-http.com/
|
|
27
28
|
|
|
28
29
|
## Installation
|
|
29
30
|
|
|
31
|
+
_This is a low-level package meant for applications and libraries with particular dependency requirements.
|
|
32
|
+
Before using this package, ensure you understand the installation and updating instructions.
|
|
33
|
+
This SDK is entirely contained in the [seamapi] package. Seam recommends using that package instead
|
|
34
|
+
for simpler dependency management._
|
|
35
|
+
|
|
30
36
|
Add this as a dependency to your project using [npm] with
|
|
31
37
|
|
|
32
38
|
```
|
|
@@ -35,6 +41,36 @@ $ npm install @seamapi/http
|
|
|
35
41
|
|
|
36
42
|
[npm]: https://www.npmjs.com/
|
|
37
43
|
|
|
44
|
+
### Optional Peer Dependencies for TypeScript
|
|
45
|
+
|
|
46
|
+
This package has optional peer dependencies for TypeScript users.
|
|
47
|
+
Recent versions of npm will automatically install peer dependencies by default.
|
|
48
|
+
For those users, no additional steps are necessary for full TypeScript support,
|
|
49
|
+
however users should still explicitly install the latest types (see the next section).
|
|
50
|
+
|
|
51
|
+
Other package managers require peer dependencies to be added manually.
|
|
52
|
+
Refer to any warnings generated by your package manager
|
|
53
|
+
about missing peer dependencies and install them as needed.
|
|
54
|
+
Refer to the next section for keeping the types updated.
|
|
55
|
+
|
|
56
|
+
#### Keeping up with the latest types
|
|
57
|
+
|
|
58
|
+
This package depends on [@seamapi/types] for the latest TypeScript types.
|
|
59
|
+
New versions of this package are generally not released when new types are published.
|
|
60
|
+
Unless your project frequently runs a blanket `npm update`,
|
|
61
|
+
the types will become outdated with the Seam API over time.
|
|
62
|
+
Thus, users of this package should explicitly install the types
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
$ npm install @seamapi/types
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
and update them when consuming new API features:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
$ npm install @seamapi/http@latest
|
|
72
|
+
```
|
|
73
|
+
|
|
38
74
|
## Usage
|
|
39
75
|
|
|
40
76
|
```ts
|
package/dist/connect.cjs
CHANGED
|
@@ -1159,11 +1159,12 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
|
|
|
1159
1159
|
return new _SeamHttpAcsCredentials(constructorOptions);
|
|
1160
1160
|
}
|
|
1161
1161
|
async assign(body) {
|
|
1162
|
-
await this.client.request({
|
|
1162
|
+
const { data } = await this.client.request({
|
|
1163
1163
|
url: "/acs/credentials/assign",
|
|
1164
1164
|
method: "post",
|
|
1165
1165
|
data: body
|
|
1166
1166
|
});
|
|
1167
|
+
return data.acs_credential;
|
|
1167
1168
|
}
|
|
1168
1169
|
async create(body) {
|
|
1169
1170
|
const { data } = await this.client.request({
|
|
@@ -1197,11 +1198,20 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
|
|
|
1197
1198
|
return data.acs_credentials;
|
|
1198
1199
|
}
|
|
1199
1200
|
async unassign(body) {
|
|
1200
|
-
await this.client.request({
|
|
1201
|
+
const { data } = await this.client.request({
|
|
1201
1202
|
url: "/acs/credentials/unassign",
|
|
1202
1203
|
method: "post",
|
|
1203
1204
|
data: body
|
|
1204
1205
|
});
|
|
1206
|
+
return data.acs_credential;
|
|
1207
|
+
}
|
|
1208
|
+
async update(body) {
|
|
1209
|
+
const { data } = await this.client.request({
|
|
1210
|
+
url: "/acs/credentials/update",
|
|
1211
|
+
method: "post",
|
|
1212
|
+
data: body
|
|
1213
|
+
});
|
|
1214
|
+
return data.acs_credential;
|
|
1205
1215
|
}
|
|
1206
1216
|
};
|
|
1207
1217
|
|
|
@@ -2653,6 +2663,14 @@ var SeamHttpUserIdentities = class _SeamHttpUserIdentities {
|
|
|
2653
2663
|
data: body
|
|
2654
2664
|
});
|
|
2655
2665
|
}
|
|
2666
|
+
async list(params) {
|
|
2667
|
+
const { data } = await this.client.request({
|
|
2668
|
+
url: "/user_identities/list",
|
|
2669
|
+
method: "get",
|
|
2670
|
+
params
|
|
2671
|
+
});
|
|
2672
|
+
return data.user_identities;
|
|
2673
|
+
}
|
|
2656
2674
|
async listAccessibleDevices(body) {
|
|
2657
2675
|
const { data } = await this.client.request({
|
|
2658
2676
|
url: "/user_identities/list_accessible_devices",
|
|
@@ -2840,6 +2858,14 @@ var SeamHttpWorkspaces = class _SeamHttpWorkspaces {
|
|
|
2840
2858
|
}
|
|
2841
2859
|
return new _SeamHttpWorkspaces(constructorOptions);
|
|
2842
2860
|
}
|
|
2861
|
+
async create(body) {
|
|
2862
|
+
const { data } = await this.client.request({
|
|
2863
|
+
url: "/workspaces/create",
|
|
2864
|
+
method: "post",
|
|
2865
|
+
data: body
|
|
2866
|
+
});
|
|
2867
|
+
return data.workspace;
|
|
2868
|
+
}
|
|
2843
2869
|
async get(params) {
|
|
2844
2870
|
const { data } = await this.client.request({
|
|
2845
2871
|
url: "/workspaces/get",
|