@sparkvault/sdk-mobile 7.0.0 → 7.0.2
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/app-sdk/transfer-retry.d.ts +298 -0
- package/dist/app-sdk/transfer-retry.js +535 -0
- package/dist/app-sdk/transfer-retry.js.map +1 -0
- package/dist/app-sdk/upload-publication.d.ts +132 -0
- package/dist/app-sdk/upload-publication.js +149 -0
- package/dist/app-sdk/upload-publication.js.map +1 -0
- package/dist/config.d.ts +26 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +38 -4
- package/dist/errors.js +4 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/ingots.d.ts +30 -18
- package/dist/ingots.js +25 -19
- package/dist/ingots.js.map +1 -1
- package/dist/tus.d.ts +179 -14
- package/dist/tus.js +738 -300
- package/dist/tus.js.map +1 -1
- package/dist/types.d.ts +16 -8
- package/package.json +1 -1
- package/src/app-sdk/transfer-retry.js +563 -0
- package/src/app-sdk/upload-publication.js +164 -0
- package/src/config.ts +40 -0
- package/src/errors.ts +42 -5
- package/src/index.ts +2 -0
- package/src/ingots.ts +57 -26
- package/src/tus.ts +971 -378
- package/src/types.ts +16 -8
package/src/types.ts
CHANGED
|
@@ -743,11 +743,10 @@ export interface UploadResult {
|
|
|
743
743
|
*/
|
|
744
744
|
created?: boolean;
|
|
745
745
|
/**
|
|
746
|
-
* The ingot status the upload
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
* faith (resume the session later; Forge re-confirms finalization).
|
|
746
|
+
* The ingot status the upload confirmed: `active`, the server's read of
|
|
747
|
+
* the published ingot. An upload whose activation the poll budget could
|
|
748
|
+
* not confirm never resolves: it rejects with a `TusUploadError` whose
|
|
749
|
+
* `retryLater` is set.
|
|
751
750
|
*/
|
|
752
751
|
status?: Ingot['status'];
|
|
753
752
|
}
|
|
@@ -866,14 +865,23 @@ export interface MobileFileReader {
|
|
|
866
865
|
|
|
867
866
|
/**
|
|
868
867
|
* A tus upload session as Forge created it: the session URL, the per-upload
|
|
869
|
-
* token every request on it must carry,
|
|
870
|
-
*
|
|
871
|
-
* relaunch (`ingots.resumeUpload`) instead of re-sending bytes
|
|
868
|
+
* token every request on it must carry, the chunk geometry Forge fixed for
|
|
869
|
+
* it, and when it lapses. Persist it to resume the upload after a failed
|
|
870
|
+
* attempt or a relaunch (`ingots.resumeUpload`) instead of re-sending bytes
|
|
871
|
+
* Forge holds.
|
|
872
872
|
*/
|
|
873
873
|
export interface TusSessionInfo {
|
|
874
874
|
uploadUrl: string;
|
|
875
875
|
istk: string;
|
|
876
876
|
chunkSize: number;
|
|
877
|
+
/**
|
|
878
|
+
* When the session lapses (epoch ms, Forge's `Upload-Expires`), or null
|
|
879
|
+
* when Forge named no expiry. Forge slides it forward on every committed
|
|
880
|
+
* chunk, so a caller that persists the session keeps this current through
|
|
881
|
+
* the upload's `onSessionExpiry`; past it, Forge refuses every request to
|
|
882
|
+
* the session (`isSessionExpired`).
|
|
883
|
+
*/
|
|
884
|
+
expiresAt: number | null;
|
|
877
885
|
}
|
|
878
886
|
|
|
879
887
|
/**
|