@flashstart/client 8.11.0 → 8.11.2
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 +6 -23
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,32 +13,15 @@ const client = createFlashStartClient({
|
|
|
13
13
|
apiKey: process.env.FLASHSTART_API_KEY!,
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
const networks = await client.listNetworks({
|
|
17
|
-
query: { organizationId: "00000000-0000-0000-0000-000000000000" },
|
|
18
|
-
});
|
|
19
|
-
const policies = await client.listPolicies({
|
|
20
|
-
query: { includeNetworkCount: true },
|
|
21
|
-
});
|
|
22
|
-
await client.createPolicy({
|
|
23
|
-
body: { name: "Office policy", isLimited: false },
|
|
24
|
-
});
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Use `accessToken` instead of `apiKey` for bearer-token authentication. Set `networkBaseUrl`, `protectionBaseUrl`, `authenticationBaseUrl`, `integrationBaseUrl`, and `reportBaseUrl` to override the respective API endpoints. Credentials are optional only for public Authentication operations.
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
const client = createFlashStartClient({});
|
|
31
|
-
await client.login({
|
|
32
|
-
body: { username: "user@example.com", password: "password1" },
|
|
33
|
-
});
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
```ts
|
|
37
16
|
try {
|
|
38
|
-
await client.listNetworks(
|
|
17
|
+
const networks = await client.listNetworks({
|
|
18
|
+
query: { organizationId: "00000000-0000-0000-0000-000000000000" },
|
|
19
|
+
});
|
|
20
|
+
console.log(networks);
|
|
39
21
|
} catch (error) {
|
|
40
22
|
if (error instanceof FlashStartError) console.error(error.status, error.body);
|
|
23
|
+
else throw error;
|
|
41
24
|
}
|
|
42
25
|
```
|
|
43
26
|
|
|
44
|
-
|
|
27
|
+
Set `networkBaseUrl`, `protectionBaseUrl`, `authenticationBaseUrl`, `integrationBaseUrl`, and `reportBaseUrl` to override API endpoints. Set `fetch` to provide a custom Fetch implementation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashstart/client",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@hey-api/openapi-ts": "0.99.0",
|
|
26
|
+
"@repo/typescript-config": "8.11.2",
|
|
26
27
|
"tsx": "4.23.12",
|
|
27
|
-
"typescript": "6.0.3"
|
|
28
|
-
"@repo/typescript-config": "8.11.0"
|
|
28
|
+
"typescript": "6.0.3"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "pnpm generate && tsc",
|