@reset-framework/sdk 1.2.1 → 1.2.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/LICENSE +20 -20
- package/README.md +41 -41
- package/package.json +1 -1
- package/src/client.js +932 -846
- package/src/errors.js +33 -33
- package/src/events.js +123 -123
- package/src/index.d.ts +664 -574
- package/src/index.js +40 -39
- package/src/transport.js +180 -180
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Jan Kordoš
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to do so, subject to the
|
|
10
|
-
following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jan Kordoš
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to do so, subject to the
|
|
10
|
+
following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# SDK
|
|
2
|
-
|
|
3
|
-
`@reset-framework/sdk` is the browser-side JavaScript package for Reset applications.
|
|
4
|
-
|
|
5
|
-
Responsibilities:
|
|
6
|
-
|
|
7
|
-
- expose a stable typed client for app frontends
|
|
8
|
-
- hide the raw `window.reset` bridge envelope
|
|
9
|
-
- provide runtime availability checks for local browser development
|
|
10
|
-
- centralize the shared browser helpers used by templates and demo apps
|
|
11
|
-
|
|
12
|
-
Package layout:
|
|
13
|
-
|
|
14
|
-
- `src/index.js`: public entrypoint
|
|
15
|
-
- `src/client.js`: high-level client and namespaced APIs
|
|
16
|
-
- `src/transport.js`: low-level transport and response validation
|
|
17
|
-
- `src/errors.js`: SDK-specific error types
|
|
18
|
-
|
|
19
|
-
Recommended usage:
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import { reset } from "@reset-framework/sdk"
|
|
23
|
-
|
|
24
|
-
const appInfo = await reset.app.getInfo()
|
|
25
|
-
const runtimeInfo = await reset.runtime.getInfo()
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Available namespaces:
|
|
29
|
-
|
|
30
|
-
- `reset.app.getId()`
|
|
31
|
-
- `reset.app.getName()`
|
|
32
|
-
- `reset.app.getSlug()`
|
|
33
|
-
- `reset.app.getVersion()`
|
|
34
|
-
- `reset.app.getInfo()`
|
|
35
|
-
- `reset.runtime.getPlatform()`
|
|
36
|
-
- `reset.runtime.getArchitecture()`
|
|
37
|
-
- `reset.runtime.getFrameworkVersion()`
|
|
38
|
-
- `reset.runtime.getBridgeVersion()`
|
|
39
|
-
- `reset.runtime.getInfo()`
|
|
40
|
-
- `reset.commands.invoke()`
|
|
41
|
-
- `reset.commands.invokeRaw()`
|
|
1
|
+
# SDK
|
|
2
|
+
|
|
3
|
+
`@reset-framework/sdk` is the browser-side JavaScript package for Reset applications.
|
|
4
|
+
|
|
5
|
+
Responsibilities:
|
|
6
|
+
|
|
7
|
+
- expose a stable typed client for app frontends
|
|
8
|
+
- hide the raw `window.reset` bridge envelope
|
|
9
|
+
- provide runtime availability checks for local browser development
|
|
10
|
+
- centralize the shared browser helpers used by templates and demo apps
|
|
11
|
+
|
|
12
|
+
Package layout:
|
|
13
|
+
|
|
14
|
+
- `src/index.js`: public entrypoint
|
|
15
|
+
- `src/client.js`: high-level client and namespaced APIs
|
|
16
|
+
- `src/transport.js`: low-level transport and response validation
|
|
17
|
+
- `src/errors.js`: SDK-specific error types
|
|
18
|
+
|
|
19
|
+
Recommended usage:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { reset } from "@reset-framework/sdk"
|
|
23
|
+
|
|
24
|
+
const appInfo = await reset.app.getInfo()
|
|
25
|
+
const runtimeInfo = await reset.runtime.getInfo()
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Available namespaces:
|
|
29
|
+
|
|
30
|
+
- `reset.app.getId()`
|
|
31
|
+
- `reset.app.getName()`
|
|
32
|
+
- `reset.app.getSlug()`
|
|
33
|
+
- `reset.app.getVersion()`
|
|
34
|
+
- `reset.app.getInfo()`
|
|
35
|
+
- `reset.runtime.getPlatform()`
|
|
36
|
+
- `reset.runtime.getArchitecture()`
|
|
37
|
+
- `reset.runtime.getFrameworkVersion()`
|
|
38
|
+
- `reset.runtime.getBridgeVersion()`
|
|
39
|
+
- `reset.runtime.getInfo()`
|
|
40
|
+
- `reset.commands.invoke()`
|
|
41
|
+
- `reset.commands.invokeRaw()`
|