@tinycloud/web-sdk 3.10.0-beta.3 → 3.11.0-beta.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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/tcw.d.ts +20 -1
- package/package.json +6 -6
package/dist/modules/tcw.d.ts
CHANGED
|
@@ -35,10 +35,24 @@ export interface RuntimePermissionSigner {
|
|
|
35
35
|
* Extends ClientConfig with browser-specific options.
|
|
36
36
|
*/
|
|
37
37
|
export interface Config extends ClientConfig {
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* OpenKey authorize-sign client. Requires @openkey/sdk >=0.12.2; popup is the default mode.
|
|
40
|
+
*
|
|
41
|
+
* `expiryChangeable: true` asks OpenKey to let the user change the session expiry in the approval. The SDK then
|
|
42
|
+
* accepts the changed expiry and builds the session with the SIGNED value. It is a pass-through: `@openkey/sdk`
|
|
43
|
+
* >= 0.13.0 (beta: 0.13.0-beta.0) forwards it; it is inert on 0.12.x, so the expiry stays as requested.
|
|
44
|
+
*/
|
|
39
45
|
openkey?: {
|
|
40
46
|
client: OpenKeyAuthorizeTinyCloud;
|
|
41
47
|
mode?: "iframe" | "popup" | "redirect";
|
|
48
|
+
expiryChangeable?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* With `expiryChangeable`: the latest expiry you will accept. A signed expiry beyond it is refused before the
|
|
51
|
+
* session is built or stored. Epoch MILLISECONDS or a `Date`; a function is called when the approval comes back, so
|
|
52
|
+
* a slow approval does not count against it. It is never sent to OpenKey. It limits a CHANGED expiry only, so keep
|
|
53
|
+
* `sessionExpirationMs` within it.
|
|
54
|
+
*/
|
|
55
|
+
maxExpiresAt?: number | Date | (() => number | Date);
|
|
42
56
|
};
|
|
43
57
|
/** Notifications. `throwErrors` rethrows each error's raw message asynchronously, once per burst of identical errors (200 ms window). It applies unless `ui: false` or `ui.toasts: false`, which turn off toasts and throws together, as the old `popups: false` did; `ui.button: false` leaves throws on. Toast placement and visibility are set through `ui`. */
|
|
44
58
|
notifications?: NotificationConfig;
|
|
@@ -372,6 +386,11 @@ export declare class TinyCloudWeb {
|
|
|
372
386
|
* method again if the approval button remains visible longer.
|
|
373
387
|
*/
|
|
374
388
|
prepareSignIn(): Promise<void>;
|
|
389
|
+
/**
|
|
390
|
+
* Options forwarded to the node's OpenKey sign-in; `undefined` unless the app opted in to `expiryChangeable`.
|
|
391
|
+
* `maxExpiresAt` is forwarded only with it.
|
|
392
|
+
*/
|
|
393
|
+
private openKeySignInOptions;
|
|
375
394
|
signIn: (options?: SignInOptions) => Promise<ClientSession>;
|
|
376
395
|
private performSignIn;
|
|
377
396
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/web-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.11.0-beta.0",
|
|
4
4
|
"description": "A set of tools and utilities to help you build your app with TinyCloud.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"@multiformats/multiaddr": "^13.0.1",
|
|
67
67
|
"@multiformats/multiaddr-to-uri": "^12.0.0",
|
|
68
68
|
"@noble/curves": "^1.9.7",
|
|
69
|
-
"@tinycloud/node-sdk": "3.
|
|
70
|
-
"@tinycloud/replica": "0.4.3
|
|
71
|
-
"@tinycloud/sdk-core": "3.
|
|
72
|
-
"@tinycloud/share-envelope": "1.5.0
|
|
73
|
-
"@tinycloud/share-sdk": "1.4.4
|
|
69
|
+
"@tinycloud/node-sdk": "3.11.0-beta.0",
|
|
70
|
+
"@tinycloud/replica": "0.4.3",
|
|
71
|
+
"@tinycloud/sdk-core": "3.11.0-beta.0",
|
|
72
|
+
"@tinycloud/share-envelope": "1.5.0",
|
|
73
|
+
"@tinycloud/share-sdk": "1.4.4",
|
|
74
74
|
"@tinycloud/web-sdk-wasm": "1.7.7",
|
|
75
75
|
"axios": "^1.7.9",
|
|
76
76
|
"viem": "^2.45.0",
|