@kmlckj/licos-platform-sdk 0.6.2 → 0.6.4

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
@@ -1,45 +1,57 @@
1
- # @kmlckj/licos-platform-sdk
2
-
3
- LICOS platform SDK for server-side project runtime code.
4
-
5
- ## Runtime Configuration
6
-
7
- Server-side helpers call platform Studio runtime APIs. Project code does not
8
- pass API base URLs, project IDs, tokens, or environment scopes. The SDK loads
9
- them from runtime environment variables injected by LICOS:
10
-
11
- - `LICOS_PLATFORM_API_BASE_URL`
12
- - `LICOS_RUNTIME_TOKEN` or `LICOS_USER_TOKEN`
13
- - `LICOS_PROJECT_ID` or `AGENT_PROJECT_ID`
14
- - `LICOS_WORKSPACE_ID` or `AGENT_WORKSPACE_ID`
15
- - `LICOS_PROJECT_ENV`, mapped internally to `dev` or `prod`
16
-
17
- ## Database
18
-
19
- Database helpers call the runtime database data plane only. They do not expose
20
- database control-plane or service deletion APIs.
21
-
22
- ```js
23
- import { database } from '@kmlckj/licos-platform-sdk';
24
-
25
- const rows = await database
26
- .table('todos')
27
- .select('id', 'title')
28
- .eq('done', false)
29
- .order('created_at', { desc: true })
30
- .limit(10)
31
- .execute();
32
- ```
33
-
34
- ## Object Storage
35
-
36
- ```js
37
- import { storage } from '@kmlckj/licos-platform-sdk';
38
-
39
- await storage.createFolder('reports');
40
- const file = await storage.uploadFile('/tmp/report.pdf');
41
- const link = await storage.shareUrl(file.id);
42
- ```
43
-
44
- The browser entry does not export object storage helpers because runtime tokens
45
- must not be bundled into public frontend code.
1
+ # @kmlckj/licos-platform-sdk
2
+
3
+ LICOS platform SDK for server-side project runtime code.
4
+
5
+ ## Runtime Configuration
6
+
7
+ Server-side helpers call platform Studio runtime APIs. Project code does not
8
+ pass API base URLs, project IDs, tokens, or environment scopes. The SDK loads
9
+ them from runtime environment variables injected by LICOS:
10
+
11
+ - `LICOS_PLATFORM_API_BASE_URL`
12
+ - `LICOS_RUNTIME_TOKEN` or `LICOS_USER_TOKEN`
13
+ - `LICOS_PROJECT_ID` or `AGENT_PROJECT_ID`
14
+ - `LICOS_WORKSPACE_ID` or `AGENT_WORKSPACE_ID`
15
+ - `LICOS_PROJECT_ENV`, mapped internally to `dev` or `prod`
16
+
17
+ ## Database
18
+
19
+ Database CRUD helpers call the runtime database data plane only. Tooling helpers
20
+ can fetch platform schema metadata for ORM export. The SDK does not expose
21
+ service deletion APIs.
22
+
23
+ ```js
24
+ import { database } from '@kmlckj/licos-platform-sdk';
25
+
26
+ const rows = await database
27
+ .table('todos')
28
+ .select('id', 'title')
29
+ .eq('done', false)
30
+ .order('created_at', { desc: true })
31
+ .limit(10)
32
+ .execute();
33
+ ```
34
+
35
+ ORM export is a tooling helper. It fetches platform schema metadata and returns
36
+ source text; it does not use direct database credentials.
37
+
38
+ ```js
39
+ import { database } from '@kmlckj/licos-platform-sdk';
40
+
41
+ const source = await database.exportOrm({ language: 'typescript', orm: 'drizzle' });
42
+ ```
43
+
44
+ ## Object Storage
45
+
46
+ ```js
47
+ import { storage } from '@kmlckj/licos-platform-sdk';
48
+
49
+ await storage.createFolder('reports');
50
+ const file = await storage.uploadFile('/tmp/report.pdf');
51
+ const link = await storage.shareUrl(file.id);
52
+ ```
53
+
54
+ `uploadFile` limits each file to 20 MiB.
55
+
56
+ The browser entry does not export object storage helpers because runtime tokens
57
+ must not be bundled into public frontend code.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kmlckj/licos-platform-sdk",
3
- "version": "0.6.2",
4
- "description": "LICOS platform SDK package shell for browser and Node runtimes",
3
+ "version": "0.6.4",
4
+ "description": "LICOS platform SDK package shell for browser and Node runtimes",
5
5
  "author": "kmlckj",
6
6
  "type": "module",
7
7
  "main": "./src/index.js",