tevrocsdk 0.1.81 → 0.1.83
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 +12 -0
- package/package.json +6 -2
- package/tevroc-sdk.cjs.js +1221 -322
- package/tevroc-sdk.cjs.js.map +4 -4
- package/tevroc-sdk.esm.js +387 -154
- package/tevroc-sdk.esm.js.map +4 -4
package/README.md
CHANGED
|
@@ -29,6 +29,7 @@ import { createClient } from "tevrocsdk";
|
|
|
29
29
|
const tevroc = createClient({
|
|
30
30
|
baseUrl: "https://your-worker.example.workers.dev",
|
|
31
31
|
serviceUrl: "https://services.example.com",
|
|
32
|
+
vpsUrl: "https://vps.example.com",
|
|
32
33
|
appId: "tevroc-portal",
|
|
33
34
|
appName: "Tevroc Portal",
|
|
34
35
|
debug: true,
|
|
@@ -191,6 +192,11 @@ await tevroc.integrations.Core.SendEmail({
|
|
|
191
192
|
await tevroc.integrations.Core.UploadFile(file, {
|
|
192
193
|
filename: "report.pdf",
|
|
193
194
|
contentType: "application/pdf",
|
|
195
|
+
tableName: "Documents",
|
|
196
|
+
tableIdx: "123",
|
|
197
|
+
onProgress: ({ progress, uploaded, total }) => {
|
|
198
|
+
console.log(`Uploaded ${progress}% (${uploaded}/${total} bytes)`);
|
|
199
|
+
},
|
|
194
200
|
});
|
|
195
201
|
|
|
196
202
|
await tevroc.integrations.Core.UploadPrivateFile(file, {
|
|
@@ -207,6 +213,12 @@ await tevroc.integrations.Core.ExtractDataFromUploadedFile({
|
|
|
207
213
|
});
|
|
208
214
|
```
|
|
209
215
|
|
|
216
|
+
### File upload runtime behavior
|
|
217
|
+
|
|
218
|
+
File uploads use the client's configured `serviceUrl`. The SDK first requests `GET /api/environment` from that URL. In an Electron runtime it uses the native `bridge.js` `syncRequest` transport and sends the existing base64 packet format to `/receivePacket`, preserving SQLite `_File` storage. In a browser or VPS runtime it creates a resumable Google Cloud Storage session, uploads 10 MB `Content-Range` chunks with retry support, finalizes the upload, and stores the resulting storage key in `_File`.
|
|
219
|
+
|
|
220
|
+
The VPS must have `GCS_BUCKET` configured and its attached Google service account must be allowed to create resumable uploads and signed URLs. `vpsUrl` is available as an explicit runtime configuration value; upload endpoints continue to use `serviceUrl`.
|
|
221
|
+
|
|
210
222
|
## Payments
|
|
211
223
|
|
|
212
224
|
The payments helpers support Yoco-based checkout creation and status tracking.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tevrocsdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.83",
|
|
4
4
|
"description": "JavaScript SDK for the Tevroc API.",
|
|
5
5
|
"main": "./tevroc-sdk.umd.js",
|
|
6
6
|
"module": "./tevroc-sdk.esm.js",
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
"YOCO",
|
|
15
15
|
"google Auth",
|
|
16
16
|
"Google Drive",
|
|
17
|
-
"Firebase"
|
|
17
|
+
"Firebase",
|
|
18
|
+
"Ozow" ,
|
|
19
|
+
"Internet of Things",
|
|
20
|
+
"IoT",
|
|
21
|
+
"Bluetooth"
|
|
18
22
|
],
|
|
19
23
|
"license": "MIT"
|
|
20
24
|
}
|