@sparkvault/sdk-js 13.0.0 → 13.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.
@@ -89,7 +89,10 @@ export declare class IngotsModule {
89
89
  * `upload_received_publishing`: every byte is received, and the server
90
90
  * finishes the publication on its own, so never upload the file again; a
91
91
  * caller that kept the session (`onSessionCreated`) learns what became of
92
- * it with {@link resumeUpload}.
92
+ * it with {@link resumeUpload}. A chunk's upload progress needs the
93
+ * browser's XMLHttpRequest: where there is none (a Node server) it rejects
94
+ * with code `environment_unsupported` before any request; a server sends
95
+ * the bytes over tus to `uploadUrl` itself.
93
96
  *
94
97
  * @param options.signal - Cancels this transfer (it rejects with code
95
98
  * `cancelled`); other transfers carry on.
@@ -157,7 +160,10 @@ export declare class IngotsModule {
157
160
  * any way but one the server received whole ({@link isReceivedUploadFailure}:
158
161
  * the server publishes or ends that one on its own) is given up: the end of
159
162
  * it with the file its create made ({@link endUpload}) starts as it
160
- * rejects, without holding up its own error.
163
+ * rejects, without holding up its own error. It needs the browser's
164
+ * XMLHttpRequest, as {@link sendUpload} does: in a server process it
165
+ * rejects with code `environment_unsupported` before any request, so no
166
+ * create stages an ingot it cannot send.
161
167
  *
162
168
  * @example
163
169
  * const ingot = await sv.ingots.upload(unsealed, {
@@ -174,7 +180,8 @@ export declare class IngotsModule {
174
180
  /**
175
181
  * Replace an existing ingot's content (high-level flow). Rejects as
176
182
  * {@link upload} does, a replacement another upload of the same ingot
177
- * superseded included (`upload_refused`).
183
+ * superseded included (`upload_refused`), and `environment_unsupported`
184
+ * before the replacement is staged where there is no XMLHttpRequest.
178
185
  *
179
186
  * @example
180
187
  * await sv.ingots.replace(unsealed, 'ing_abc', { file: updatedFile });
@@ -210,7 +217,9 @@ export declare class IngotsModule {
210
217
  */
211
218
  get(vault: UnsealedVault, ingotId: string): Promise<Ingot>;
212
219
  /**
213
- * List ingots in an unsealed vault.
220
+ * List ingots in an unsealed vault, one page at a time in the vault index's
221
+ * order: follow `nextCursor`. `sortBy` orders only the page answered; for
222
+ * one order across a vault, search or list a folder's contents.
214
223
  *
215
224
  * @example
216
225
  * const { ingots } = await sv.ingots.list(unsealed);
@@ -220,7 +229,7 @@ export declare class IngotsModule {
220
229
  * Search ingots in an unsealed vault.
221
230
  *
222
231
  * @example
223
- * const { ingots } = await sv.ingots.search(unsealed, { q: 'invoice' });
232
+ * const { ingots } = await sv.ingots.search(unsealed, { q: 'invoice-2026-03.pdf' });
224
233
  */
225
234
  search(vault: UnsealedVault, options?: SearchIngotsOptions): Promise<IngotPage>;
226
235
  /**
@@ -229,9 +229,12 @@ export interface ListIngotsOptions {
229
229
  limit?: number;
230
230
  /** Pagination cursor */
231
231
  cursor?: string;
232
- /** Sort field (name | size | content_type | created | access_count) */
232
+ /**
233
+ * Sort field (name | size | content_type | created | access_count): it
234
+ * orders only the page answered, never the list across pages
235
+ */
233
236
  sortBy?: string;
234
- /** Sort direction */
237
+ /** Sort direction of the page */
235
238
  sortOrder?: 'asc' | 'desc';
236
239
  }
237
240
  /** Options for listContents. */
@@ -273,7 +276,12 @@ export interface FolderContents {
273
276
  }
274
277
  /** Options for search. */
275
278
  export interface SearchIngotsOptions {
276
- /** The beginning of the ingot's name, in any case: a prefix, never a substring or a fuzzy match. */
279
+ /**
280
+ * The ingot's whole file name, matched ignoring letter case, accent
281
+ * composition and Unicode compatibility forms (`Straße` matches `STRASSE`):
282
+ * never a prefix, a substring or a fuzzy match. A name no ingot can hold is
283
+ * refused (400).
284
+ */
277
285
  q?: string;
278
286
  /**
279
287
  * The MIME type to match, in lowercase: a family (`image`, `video`,
@@ -26,5 +26,5 @@ export declare class ProductsModule {
26
26
  }
27
27
  export { IdentityModule } from './identity';
28
28
  export { NotifyProductModule, NOTIFY_PRESETS, buildNotifyPresetSend } from './notify';
29
- export type { VerifyOptions, AttachOptions, VerifyResult, TokenClaims, } from './identity';
29
+ export type { SignInOptions, SignInResult, VerifyOptions, AttachOptions, VerifyResult, TokenClaims, } from './identity';
30
30
  export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, } from './notify';