@secondlayer/sdk 6.54.1 → 8.0.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/README.md CHANGED
@@ -14,12 +14,12 @@ bun add @secondlayer/sdk
14
14
  import { SecondLayer } from "@secondlayer/sdk";
15
15
 
16
16
  const sl = new SecondLayer({
17
- apiKey: process.env.INSTANCE_TOKEN, // from sl init; omit on loopback
17
+ apiKey: process.env.INSTANCE_TOKEN, // from secondlayer init; omit on loopback
18
18
  // default baseUrl: http://127.0.0.1:3800 (or SL_API_URL)
19
19
  });
20
20
  ```
21
21
 
22
- Reads hit your instance. Writes use `INSTANCE_TOKEN` from `sl init` when the
22
+ Reads hit your instance. Writes use `INSTANCE_TOKEN` from `secondlayer init` when the
23
23
  API is bound beyond loopback. Public archive dumps (`client.dumps`) need no
24
24
  instance key.
25
25
 
@@ -370,12 +370,8 @@ const spec = await sl.subgraphs.openapi("my-subgraph");
370
370
  const source = await sl.subgraphs.getSource("my-subgraph");
371
371
  const gaps = await sl.subgraphs.gaps("my-subgraph");
372
372
 
373
- // Deploy — managed deploys default visibility "public", BYO default "private"
373
+ // Deploy — deploys default visibility "public" (409 PUBLIC_NAME_TAKEN if the name is claimed)
374
374
  const result = await sl.subgraphs.deploy({ name, sources, schema, handlerCode, visibility: "public" });
375
-
376
- // Flip visibility — publish claims the global public name (409 PUBLIC_NAME_TAKEN if claimed)
377
- await sl.subgraphs.publish("my-subgraph");
378
- await sl.subgraphs.unpublish("my-subgraph");
379
375
  ```
380
376
 
381
377
  Stream rows live with the typed client — each table exposes `subscribe`