@thingd/client 0.71.0 → 0.73.1

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 +23 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,6 +36,29 @@ const client = new ThingdClient({
36
36
  });
37
37
  ```
38
38
 
39
+ ### Mobile and web app backends
40
+
41
+ Use the app client for a project-user backend. It works with browsers,
42
+ React Native/Expo, Node.js, and other runtimes with `fetch`:
43
+
44
+ ```ts
45
+ import { createThingdAppClient } from "@thingd/client";
46
+
47
+ const app = createThingdAppClient({
48
+ baseUrl: "https://api.thingd.cloud",
49
+ publishableKey: "pk_...",
50
+ });
51
+
52
+ await app.auth.signUp({ email, password, name });
53
+ const profile = await app.functions.invoke("createProfile", { timezone: "UTC" }, {
54
+ idempotencyKey: "profile:create:user-1",
55
+ });
56
+ ```
57
+
58
+ The publishable key is safe for app bundles. Do not use a secret Cloud API key
59
+ or engine runtime token in a browser or mobile application. See
60
+ `docs/app-backend.md` for the public contract.
61
+
39
62
  ### Objects
40
63
 
41
64
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thingd/client",
3
- "version": "0.71.0",
3
+ "version": "0.73.1",
4
4
  "description": "Zero-dependency HTTP client for thingd — works in browsers, edge runtimes, Node.js, Bun, Deno",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",