tevrocsdk 0.1.35 → 0.1.37
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 +29 -0
- package/package.json +1 -1
- package/tevroc-sdk.esm.js +39256 -4004
- package/tevroc-sdk.min.js +280 -1
- package/tevroc-sdk.umd.js +39244 -4018
package/README.md
CHANGED
|
@@ -25,8 +25,10 @@ Tevroc SDK works in web apps, but it also fits naturally into mobile and desktop
|
|
|
25
25
|
|
|
26
26
|
### Capacitor (mobile)
|
|
27
27
|
- Declare the app identity and a custom URL scheme in your Capacitor config so the app can receive OAuth redirects.
|
|
28
|
+
- Add the Capacitor app and browser plugins so the SDK can use native file save, toast, and browser flows when available.
|
|
28
29
|
- Add an Android intent filter so the platform can route callback URLs back into your app.
|
|
29
30
|
- Listen for the platform event and forward the URL into your auth callback flow.
|
|
31
|
+
- For offline support, the SDK will keep using native storage when the Capacitor SQLite plugin is available and will safely fall back to localStorage in web or unsupported environments.
|
|
30
32
|
|
|
31
33
|
Typical file locations:
|
|
32
34
|
|
|
@@ -172,6 +174,33 @@ listen("deep-link://open-url", (event) => {
|
|
|
172
174
|
});
|
|
173
175
|
```
|
|
174
176
|
|
|
177
|
+
## Setup notes for local apps and desktop shells
|
|
178
|
+
|
|
179
|
+
If you are consuming the SDK from a monorepo or local workspace, point your app dependency at the local package folder and rebuild the SDK output before launching the app:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npm install ../tevrocsdk
|
|
183
|
+
cd ../tevrocsdk && npm run build
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
For Tauri desktop apps, ensure the frontend can access the Tauri bridge and the Rust side exposes the PDF command. The recommended setup is:
|
|
187
|
+
|
|
188
|
+
- add the Tauri plugins for deep-link, dialog, fs, opener, and shell in your Rust app
|
|
189
|
+
- expose a command such as `open_pdf_file` from [client-flow/src-tauri/src/lib.rs](../client-flow/src-tauri/src/lib.rs)
|
|
190
|
+
- keep the base64 dependency in [client-flow/src-tauri/Cargo.toml](../client-flow/src-tauri/Cargo.toml)
|
|
191
|
+
|
|
192
|
+
For web and Capacitor apps, preview/print fall back to browser popup windows and native file save flows where available. In offline mode, the SDK keeps a local snapshot of entity data and retries sync when the network is available again.
|
|
193
|
+
|
|
194
|
+
## Added services and capabilities
|
|
195
|
+
|
|
196
|
+
Recent SDK updates include:
|
|
197
|
+
|
|
198
|
+
- PDF helpers: `tevroc.pdf.downloadPdf`, `tevroc.pdf.previewPdf`, and `tevroc.pdf.printPdf`
|
|
199
|
+
- Desktop-friendly PDF handling for Tauri, where the SDK writes a temporary PDF and opens it with the host OS viewer
|
|
200
|
+
- Offline sync support with a safe fallback when Capacitor background-task support is unavailable
|
|
201
|
+
- Native store helpers for web/localStorage fallback and native persistence in Capacitor/Tauri contexts
|
|
202
|
+
- Auth, entity, integration, payments, and file helpers that work through the same unified client object
|
|
203
|
+
|
|
175
204
|
## Create a client
|
|
176
205
|
|
|
177
206
|
Start by creating a client with your Tevroc worker URL and app details. This gives you a single object that you can use throughout your app for authentication, data access, integrations, and more.
|