@sparkvault/sdk-js 14.1.1 → 14.2.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/README.md +10 -0
- package/dist/api-base.d.ts +2 -0
- package/dist/config.d.ts +18 -0
- package/dist/index.cjs +112 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +81 -6
- package/dist/index.mjs +112 -8
- package/dist/index.mjs.map +1 -1
- package/dist/ingots/index.d.ts +6 -4
- package/dist/ingots/types.d.ts +5 -0
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vault-session.d.ts +2 -0
- package/dist/vaults/index.d.ts +16 -3
- package/dist/vaults/types.d.ts +64 -2
- package/package.json +1 -1
package/dist/ingots/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { type ResolvedConfig } from '../config';
|
|
13
13
|
import { HttpClient } from '../http';
|
|
14
|
-
import type { UnsealedVault, Ingot, IngotUpload, UploadEnd, CreatedIngot, IngotDownloadLink, CreateUploadOptions, UploadIngotOptions, SendUploadOptions, ResumeUploadOptions, UploadSession, ReplaceIngotOptions, ListIngotsOptions, ListContentsOptions, FolderContents, SearchIngotsOptions, IngotPage, IngotSharingConfig, UpdateIngotSharingOptions, IngotInvitation, IngotAccessLogPage, AccessLogsOptions, HashCheckResponse } from './types';
|
|
14
|
+
import type { UnsealedVault, Ingot, IngotUpload, UploadEnd, CreatedIngot, IngotDownloadLink, DownloadIngotOptions, CreateUploadOptions, UploadIngotOptions, SendUploadOptions, ResumeUploadOptions, UploadSession, ReplaceIngotOptions, ListIngotsOptions, ListContentsOptions, FolderContents, SearchIngotsOptions, IngotPage, IngotSharingConfig, UpdateIngotSharingOptions, IngotInvitation, IngotAccessLogPage, AccessLogsOptions, HashCheckResponse } from './types';
|
|
15
15
|
export declare class IngotsModule {
|
|
16
16
|
private readonly config;
|
|
17
17
|
private readonly http;
|
|
@@ -262,6 +262,8 @@ export declare class IngotsModule {
|
|
|
262
262
|
* when you want the URL itself; otherwise prefer {@link download}. The link
|
|
263
263
|
* is single-use: Forge claims it the moment a request arrives, so a retry or
|
|
264
264
|
* a resume needs a link of its own (`fetchDownload`'s `remint`).
|
|
265
|
+
* Automatic display/prefetch should pass `{ countAsActivity: false }` so
|
|
266
|
+
* loading visible content does not extend the vault's inactivity deadline.
|
|
265
267
|
*
|
|
266
268
|
* @example
|
|
267
269
|
* const link = await sv.ingots.createDownloadLink(unsealed, 'ing_abc');
|
|
@@ -269,7 +271,7 @@ export declare class IngotsModule {
|
|
|
269
271
|
* remint: async () => (await sv.ingots.createDownloadLink(unsealed, 'ing_abc')).downloadUrl,
|
|
270
272
|
* });
|
|
271
273
|
*/
|
|
272
|
-
createDownloadLink(vault: UnsealedVault, ingotId: string): Promise<IngotDownloadLink>;
|
|
274
|
+
createDownloadLink(vault: UnsealedVault, ingotId: string, options?: DownloadIngotOptions): Promise<IngotDownloadLink>;
|
|
273
275
|
/**
|
|
274
276
|
* Download an ingot as a Blob (high-level flow).
|
|
275
277
|
*
|
|
@@ -296,7 +298,7 @@ export declare class IngotsModule {
|
|
|
296
298
|
* link.download = ingot.downloadFilename;
|
|
297
299
|
* link.click();
|
|
298
300
|
*/
|
|
299
|
-
download(vault: UnsealedVault, ingotId: string): Promise<Blob>;
|
|
301
|
+
download(vault: UnsealedVault, ingotId: string, options?: DownloadIngotOptions): Promise<Blob>;
|
|
300
302
|
/**
|
|
301
303
|
* Get an ingot's sharing configuration.
|
|
302
304
|
*
|
|
@@ -366,4 +368,4 @@ export { NAME_CONFLICT_POLICIES } from './types';
|
|
|
366
368
|
export { fetchDownload } from './fetch-download';
|
|
367
369
|
export { isReceivedUploadFailure } from '../vaults/upload/api';
|
|
368
370
|
export type { FetchDownloadOptions, FetchedDownload } from './fetch-download';
|
|
369
|
-
export type { NameConflictPolicy, UnsealedVault, Ingot, IngotUpload, UploadEnd, CreatedIngot, IngotDownloadLink, CreateUploadOptions, UploadIngotOptions, SendUploadOptions, ResumeUploadOptions, UploadSession, ReplaceIngotOptions, ListIngotsOptions, ListContentsOptions, FolderContents, SearchIngotsOptions, IngotPage, IngotSharingConfig, UpdateIngotSharingOptions, IngotInvite, IngotInvitation, IngotAccessLog, IngotAccessLogPage, AccessLogsOptions, HashCheckResponse, } from './types';
|
|
371
|
+
export type { NameConflictPolicy, UnsealedVault, Ingot, IngotUpload, UploadEnd, CreatedIngot, IngotDownloadLink, DownloadIngotOptions, CreateUploadOptions, UploadIngotOptions, SendUploadOptions, ResumeUploadOptions, UploadSession, ReplaceIngotOptions, ListIngotsOptions, ListContentsOptions, FolderContents, SearchIngotsOptions, IngotPage, IngotSharingConfig, UpdateIngotSharingOptions, IngotInvite, IngotInvitation, IngotAccessLog, IngotAccessLogPage, AccessLogsOptions, HashCheckResponse, } from './types';
|
package/dist/ingots/types.d.ts
CHANGED
|
@@ -122,6 +122,11 @@ export interface CreatedIngot {
|
|
|
122
122
|
*/
|
|
123
123
|
created: boolean;
|
|
124
124
|
}
|
|
125
|
+
/** Options shared by download and createDownloadLink. */
|
|
126
|
+
export interface DownloadIngotOptions {
|
|
127
|
+
/** False for automatic display/prefetch: fetching bytes will not extend vault inactivity. */
|
|
128
|
+
countAsActivity?: boolean;
|
|
129
|
+
}
|
|
125
130
|
/** The discrete primitive returned by createDownloadLink. */
|
|
126
131
|
export interface IngotDownloadLink {
|
|
127
132
|
/** Opaque published-content revision; null for legacy content. */
|