@synopackageland/app 0.10.12 → 0.11.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
@@ -218,3 +218,16 @@ npm run build # dist/: ESM and .d.ts
218
218
  when they differ from `spec/`. `scripts/gate.sh` also runs the tests, the
219
219
  bridge's golden runner and the hello example on Node 18 in Docker
220
220
  (`scripts/node18-test.sh`).
221
+
222
+ With bridge capability `webapi:true` and approved executor profiles, the existing
223
+ runtime service interface supports profile grants and calls:
224
+
225
+ ```ts
226
+ const grant = await ctx.runtime('webapi.grant', {scope: 'calendar', lifetime: 'until-revoked'})
227
+ const result = await ctx.runtime('webapi.call', {delegation_id: (grant as {delegation_id:string}).delegation_id,
228
+ api: 'SYNO.Cal.Event', method: 'list', version: 6, params: {}})
229
+ ```
230
+
231
+ `webapi.grants` lists the caller's grants; `webapi.revoke` revokes one. Replies
232
+ contain the full DSM envelope. No mutation retries; reconcile unknown outcomes.
233
+ See spec/bridge/v1 and executor/README.md for the fixed permissions and limits.
package/dist/app.d.ts CHANGED
@@ -3,7 +3,7 @@ import { type Context } from './context.js';
3
3
  /** The channel protocol version this SDK speaks. */
4
4
  export declare const VERSION = 1;
5
5
  /** The SDK's name in hello: node/<package version>. */
6
- export declare const SDK = "node/0.10.12";
6
+ export declare const SDK = "node/0.11.0";
7
7
  /**
8
8
  * A method's implementation. params is the request's params as the browser
9
9
  * sent them, not checked against P. The result is the data the browser gets,
package/dist/app.js CHANGED
@@ -5,7 +5,7 @@ import { browserError } from './errors.js';
5
5
  /** The channel protocol version this SDK speaks. */
6
6
  export const VERSION = 1;
7
7
  /** The SDK's name in hello: node/<package version>. */
8
- export const SDK = 'node/0.10.12';
8
+ export const SDK = 'node/0.11.0';
9
9
  const methodName = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/;
10
10
  const internal = { code: 'internal', message: 'internal error' };
11
11
  /** The App: its methods, served on one channel per call. */
package/dist/refusals.js CHANGED
@@ -36,4 +36,5 @@ export const protocolRefusals = new Set([
36
36
  'EXECUTOR_TIMEOUT',
37
37
  'EXECUTOR_TOO_LARGE',
38
38
  'EXECUTOR_PROTOCOL',
39
+ 'WEBAPI_UNCERTAIN',
39
40
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/app",
3
- "version": "0.10.12",
3
+ "version": "0.11.0",
4
4
  "description": "Node SDK for Synology Package Land Apps: the backend methods behind the synopkgland Go runtime (channel spec/bridge/v1)",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/synopackageland/syno-pkg-land-sdk/tree/main/node#readme",