@semilayer/client 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +10 -10
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ <p align="right">
2
+ <img src="https://raw.githubusercontent.com/semilayer/semilayer/main/assets/logo.png" alt="SemiLayer" width="120" />
3
+ <br />
4
+ <strong>@semilayer/client</strong>
5
+ </p>
6
+
7
+ <p align="right">
8
+ The Beam client runtime for <a href="https://semilayer.com">SemiLayer</a> — fetch, auth, pagination, and streaming. Used by generated typed clients and directly by apps that want an untyped low-level API.
9
+ </p>
10
+
11
+ ---
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ pnpm add @semilayer/client
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { BeamClient } from '@semilayer/client'
23
+
24
+ const beam = new BeamClient({
25
+ apiKey: process.env.SEMILAYER_API_KEY!,
26
+ })
27
+
28
+ const results = await beam.search('articles', { query: 'renewable energy' })
29
+ ```
30
+
31
+ For typed clients, scaffold with `semilayer generate` from [`@semilayer/cli`](https://www.npmjs.com/package/@semilayer/cli). For end-user tokens in multi-tenant apps, see `beam.withUser(token)`.
32
+
33
+ See [semilayer.dev](https://semilayer.dev) for the full docs.
34
+
35
+ ## License
36
+
37
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semilayer/client",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "SemiLayer Beam client runtime — fetch, auth, pagination",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,19 +14,19 @@
14
14
  "files": [
15
15
  "dist"
16
16
  ],
17
- "scripts": {
18
- "build": "tsup",
19
- "dev": "tsup --watch",
20
- "lint": "eslint src/",
21
- "typecheck": "tsc --noEmit",
22
- "test": "vitest run"
23
- },
24
17
  "dependencies": {
25
- "@semilayer/core": "workspace:*"
18
+ "@semilayer/core": "0.1.3"
26
19
  },
27
20
  "devDependencies": {
28
21
  "tsup": "^8.0.0",
29
22
  "typescript": "^5.7.0",
30
23
  "vitest": "^3.0.0"
24
+ },
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "dev": "tsup --watch",
28
+ "lint": "eslint src/",
29
+ "typecheck": "tsc --noEmit",
30
+ "test": "vitest run"
31
31
  }
32
- }
32
+ }