@powerhousedao/reactor-attachments 6.2.2-dev.7 → 6.2.2-dev.71
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/client.d.ts +288 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +445 -10
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +211 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +851 -35
- package/dist/index.js.map +1 -1
- package/dist/{null-attachment-transport-BBhQIk5A.d.ts → null-attachment-transport-CMrO_ZKA.d.ts} +257 -10
- package/dist/null-attachment-transport-CMrO_ZKA.d.ts.map +1 -0
- package/dist/{null-attachment-transport-Drx03s02.js → null-attachment-transport-CrsUafCi.js} +361 -27
- package/dist/null-attachment-transport-CrsUafCi.js.map +1 -0
- package/package.json +12 -4
- package/dist/null-attachment-transport-BBhQIk5A.d.ts.map +0 -1
- package/dist/null-attachment-transport-Drx03s02.js.map +0 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,157 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as AttachmentPending, A as IReservationStore, B as AttachmentStatus, C as IAttachmentReader, D as IAttachmentTransportFactory, E as IAttachmentTransport, F as AttachmentDownloadTargetOptions, G as HashFirstReserveAttachmentOptions, H as AttachmentTransportConfig, I as AttachmentHeader, J as TransportFetchResult, K as Reservation, L as AttachmentMetadata, N as AttachmentDownloadOptions, O as IAttachmentUpload, P as AttachmentDownloadTarget, Q as AttachmentNotFound, R as AttachmentResponse, T as IAttachmentStore, U as AttachmentUploadResult, V as AttachmentTargetHeaders, W as AttachmentUploadTarget, X as UploadFirstReserveAttachmentOptions, Y as TransportResponse, Z as AttachmentAlreadyExists, _ as createRef, a as RemoteAttachmentUpload, at as SizeMismatch, b as parseAttachmentDownloadTarget, c as XhrUploadTransportOptions, d as AttachmentUploadResponse, et as AttachmentTransferError, f as AttachmentUploadTransport, g as ParsedRef, h as SwitchboardTransportConfig, i as RemoteAttachmentUploadFactory, it as ReservationNotFound, k as IAttachmentUploadFactory, l as createXhrUploadTransport, m as SwitchboardAttachmentTransport, n as createRemoteAttachmentService, nt as HashMismatch, o as RemoteReservationStore, ot as UploadTooLarge, p as createFetchUploadTransport, q as ReserveAttachmentOptions, r as RemoteAttachmentStore, rt as InvalidAttachmentRef, s as SwitchboardClientConfig, t as NullAttachmentTransport, tt as AttachmentTransferStage, u as AttachmentUploadRequest, v as parseRef, w as IAttachmentService, x as parseAttachmentUploadTarget, y as AttachmentService, z as AttachmentSendOptions } from "./null-attachment-transport-CMrO_ZKA.js";
|
|
2
2
|
import { AttachmentHash, AttachmentRef } from "@powerhousedao/reactor";
|
|
3
3
|
|
|
4
|
+
//#region src/concurrency.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Ordered result of one batch item. `index` always mirrors the input
|
|
7
|
+
* position, so callers can correlate results with inputs regardless of
|
|
8
|
+
* completion order, and successes are retained when siblings fail.
|
|
9
|
+
*/
|
|
10
|
+
type BatchItemResult<R> = {
|
|
11
|
+
index: number;
|
|
12
|
+
status: "fulfilled";
|
|
13
|
+
value: R;
|
|
14
|
+
} | {
|
|
15
|
+
index: number;
|
|
16
|
+
status: "rejected";
|
|
17
|
+
error: unknown;
|
|
18
|
+
};
|
|
19
|
+
type RunWithConcurrencyOptions<R = unknown> = {
|
|
20
|
+
/** Maximum simultaneously running workers. Must be a positive integer. */concurrency: number;
|
|
21
|
+
/**
|
|
22
|
+
* Whole-batch cancellation: unstarted items are rejected with the signal's
|
|
23
|
+
* reason without ever starting, while already-started items keep running —
|
|
24
|
+
* per-item signals are the mechanism for interrupting active work.
|
|
25
|
+
*/
|
|
26
|
+
signal?: AbortSignal;
|
|
27
|
+
/**
|
|
28
|
+
* Called once per item as it settles, in completion order, including items
|
|
29
|
+
* the signal skipped before they ever started. That completeness is the
|
|
30
|
+
* point: a caller counting settlements must still reach `items.length`
|
|
31
|
+
* after a whole-batch abort.
|
|
32
|
+
*/
|
|
33
|
+
onSettled?: (result: BatchItemResult<R>) => void;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Runs `worker` over `items` with a hard upper bound on simultaneous
|
|
37
|
+
* executions. Bounding starts (not just transfers) is what keeps memory flat:
|
|
38
|
+
* an item's preprocessing (hashing/buffering) only begins when a slot frees.
|
|
39
|
+
*/
|
|
40
|
+
declare function runWithConcurrency<T, R>(items: readonly T[], worker: (item: T, index: number) => Promise<R>, options: RunWithConcurrencyOptions<R>): Promise<BatchItemResult<R>[]>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/progress.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Byte-level progress for attachment transfers.
|
|
45
|
+
*
|
|
46
|
+
* `loaded`/`total` are per-stage, never per-operation. A per-operation
|
|
47
|
+
* denominator would have to weight hashing against transfer, and a confirmed
|
|
48
|
+
* dedup would shrink it mid-flight from 2N to N — the bar would run backwards.
|
|
49
|
+
* Choosing that weighting is a UI decision the client cannot make.
|
|
50
|
+
*/
|
|
51
|
+
type AttachmentStage = "hashing" | "reserving" | "uploading" | "requesting-download-target" | "downloading" | "done" | "error";
|
|
52
|
+
type AttachmentProgress = {
|
|
53
|
+
stage: AttachmentStage; /** Bytes moved so far within `stage`. */
|
|
54
|
+
loaded: number; /** Denominator for `stage`: file.size for uploads, header.sizeBytes for downloads. */
|
|
55
|
+
total: number | undefined; /** True when the stage is running but bytes cannot (yet) be observed. */
|
|
56
|
+
indeterminate: boolean; /** Only on a terminal `done` where dedup skipped the transfer entirely. */
|
|
57
|
+
deduped?: true;
|
|
58
|
+
};
|
|
59
|
+
type AttachmentProgressListener = (progress: AttachmentProgress) => void;
|
|
60
|
+
type AttachmentProgressOptions = {
|
|
61
|
+
onProgress?: AttachmentProgressListener; /** Min ms between byte events within a stage. Default 100. 0 emits every observation. */
|
|
62
|
+
throttleMs?: number;
|
|
63
|
+
};
|
|
64
|
+
declare const DEFAULT_PROGRESS_THROTTLE_MS = 100;
|
|
65
|
+
/**
|
|
66
|
+
* Fraction in 0..1 for a progress event. Indeterminate and unknown-total
|
|
67
|
+
* events read as 0 — a bar cannot honestly show a position it does not know.
|
|
68
|
+
* A zero total is complete by definition (the dedup case moves no bytes).
|
|
69
|
+
*/
|
|
70
|
+
declare function progressFraction(progress: AttachmentProgress): number;
|
|
71
|
+
type ProgressEmitterOptions = AttachmentProgressOptions & {
|
|
72
|
+
/** Injected clock so throttle tests stay synchronous. */now?: () => number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Emits `AttachmentProgress` for one single-item operation, upholding:
|
|
76
|
+
*
|
|
77
|
+
* - **I1** exactly one terminal event (`done` or `error`) — never both, never twice.
|
|
78
|
+
* - **I2** on `done`: `indeterminate === false`, `total` is a number, `loaded === total`.
|
|
79
|
+
* - **I3** `loaded` is non-decreasing within a stage and resets to 0 on stage change.
|
|
80
|
+
* - **I4** the terminal event bypasses the throttle unconditionally.
|
|
81
|
+
* - **I5** `error` carries the last known `loaded`/`total`.
|
|
82
|
+
*
|
|
83
|
+
* Leading edge: the first `bytes()` after a `stage()` always emits, so a bar
|
|
84
|
+
* leaves 0 immediately. There is deliberately no trailing-edge timer — it
|
|
85
|
+
* would leak on throw, could fire after the terminal event and violate I1's
|
|
86
|
+
* ordering, and is unnecessary because `finish()` always emits
|
|
87
|
+
* `loaded === total`, making a dropped last intra-stage tick invisible.
|
|
88
|
+
*/
|
|
89
|
+
declare class ProgressEmitter {
|
|
90
|
+
private readonly listener;
|
|
91
|
+
private readonly throttleMs;
|
|
92
|
+
private readonly now;
|
|
93
|
+
private currentStage;
|
|
94
|
+
private loaded;
|
|
95
|
+
private total;
|
|
96
|
+
private emittedBytesInStage;
|
|
97
|
+
private lastEmitAt;
|
|
98
|
+
private settled;
|
|
99
|
+
constructor(options?: ProgressEmitterOptions);
|
|
100
|
+
/** True when a listener is attached; lets callers skip instrumentation entirely. */
|
|
101
|
+
get active(): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Enter a stage. Always emits and resets `loaded` to 0. Entry is always
|
|
104
|
+
* indeterminate: no bytes have moved yet, and whether they can be observed
|
|
105
|
+
* at all is only proven by a transport actually calling back.
|
|
106
|
+
*/
|
|
107
|
+
stage(stage: AttachmentStage, options?: {
|
|
108
|
+
total?: number;
|
|
109
|
+
}): void;
|
|
110
|
+
/**
|
|
111
|
+
* Report observed bytes within the current stage. Throttled by time, with
|
|
112
|
+
* the first observation after a stage change always emitted.
|
|
113
|
+
*/
|
|
114
|
+
bytes(loaded: number, total?: number): void;
|
|
115
|
+
/**
|
|
116
|
+
* Terminal success. `total` defaults to the bytes actually seen so a stage
|
|
117
|
+
* with no known denominator still satisfies I2.
|
|
118
|
+
*/
|
|
119
|
+
finish(override?: {
|
|
120
|
+
loaded?: number;
|
|
121
|
+
total?: number;
|
|
122
|
+
deduped?: true;
|
|
123
|
+
}): void;
|
|
124
|
+
/** Terminal success for a confirmed dedup: no bytes moved, and none needed to. */
|
|
125
|
+
finishDeduped(): void;
|
|
126
|
+
/** Terminal failure, carrying the last known byte counts. */
|
|
127
|
+
fail(): void;
|
|
128
|
+
private emit;
|
|
129
|
+
}
|
|
130
|
+
type ByteProgressHooks = {
|
|
131
|
+
/** Cumulative bytes handed to the consumer. */onBytes?: (loaded: number) => void; /** The source ended and every byte reached the consumer. */
|
|
132
|
+
onDone?: () => void;
|
|
133
|
+
onError?: (error: unknown) => void;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Count bytes as a consumer reads them.
|
|
137
|
+
*
|
|
138
|
+
* Uses the manual-reader form rather than `pipeThrough`, whose internal queue
|
|
139
|
+
* reads far ahead of the consumer and would make `loaded` overstate what was
|
|
140
|
+
* actually received. `highWaterMark: 0` is load-bearing for the same reason:
|
|
141
|
+
* at the default of 1 the wrapper pulls one chunk the instant it is
|
|
142
|
+
* constructed, so a caller who never reads still sees bytes counted.
|
|
143
|
+
*
|
|
144
|
+
* `cancel` propagates to the source, which is what keeps reader refcounts
|
|
145
|
+
* (e.g. `KyselyAttachmentStore`'s) correct. Cancelling is an abandonment, not
|
|
146
|
+
* a completion, so it reports `onError` — never `onDone` — carrying the
|
|
147
|
+
* cancel reason the way an `AbortSignal` carries its own, with the DOM's
|
|
148
|
+
* default `AbortError` when the canceller gave none.
|
|
149
|
+
*
|
|
150
|
+
* Returns `source` unchanged when no hook is supplied, so a caller with no
|
|
151
|
+
* listener pays nothing.
|
|
152
|
+
*/
|
|
153
|
+
declare function withByteProgress(source: ReadableStream<Uint8Array>, hooks: ByteProgressHooks): ReadableStream<Uint8Array>;
|
|
154
|
+
//#endregion
|
|
4
155
|
//#region src/client.d.ts
|
|
5
156
|
type PreprocessResult = {
|
|
6
157
|
ref: AttachmentRef;
|
|
@@ -10,14 +161,149 @@ type PreprocessResult = {
|
|
|
10
161
|
data: ReadableStream<Uint8Array>;
|
|
11
162
|
stream: () => ReadableStream<Uint8Array>;
|
|
12
163
|
};
|
|
164
|
+
type AttachmentUploadInput = {
|
|
165
|
+
file: Blob;
|
|
166
|
+
fileName?: string;
|
|
167
|
+
mimeType?: string; /** Per-item cancellation, checked between stages. */
|
|
168
|
+
signal?: AbortSignal;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Upload bytes that were already hashed by a separate `preprocess()` call.
|
|
172
|
+
*
|
|
173
|
+
* This is the canonical two-call flow: the ref must reach the document before
|
|
174
|
+
* the bytes are committed, so callers preprocess, dispatch the operation, then
|
|
175
|
+
* upload. Passing the result back in skips the hashing stage rather than
|
|
176
|
+
* faking a zero-millisecond one.
|
|
177
|
+
*/
|
|
178
|
+
type AttachmentPreprocessedUploadInput = {
|
|
179
|
+
preprocessed: PreprocessResult;
|
|
180
|
+
signal?: AbortSignal;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Every remote download names the document that authorizes its ref; batches
|
|
184
|
+
* may freely mix documents because the anchor travels with each item.
|
|
185
|
+
*/
|
|
186
|
+
type AttachmentDownloadInput = {
|
|
187
|
+
documentId: string;
|
|
188
|
+
ref: AttachmentRef;
|
|
189
|
+
signal?: AbortSignal;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* The document keeps its own name and type for an attachment (the same
|
|
193
|
+
* bytes may appear under different names in different documents), so the
|
|
194
|
+
* blob-producing conveniences let callers override what the server header
|
|
195
|
+
* reports from upload time.
|
|
196
|
+
*/
|
|
197
|
+
type AttachmentBlobOptions = {
|
|
198
|
+
mimeType?: string;
|
|
199
|
+
};
|
|
200
|
+
type AttachmentSaveOptions = {
|
|
201
|
+
fileName?: string;
|
|
202
|
+
mimeType?: string;
|
|
203
|
+
};
|
|
204
|
+
type AttachmentBlobResult = {
|
|
205
|
+
blob: Blob;
|
|
206
|
+
header: AttachmentHeader;
|
|
207
|
+
};
|
|
208
|
+
type AttachmentObjectUrl = {
|
|
209
|
+
/** Ready for img/iframe/video src. Pins memory until revoke() is called. */url: string;
|
|
210
|
+
header: AttachmentHeader;
|
|
211
|
+
revoke: () => void;
|
|
212
|
+
};
|
|
213
|
+
type AttachmentShareLinkInput = {
|
|
214
|
+
documentId: string;
|
|
215
|
+
ref: AttachmentRef; /** Requested link lifetime in seconds; the server clamps to its maximum. */
|
|
216
|
+
expiresIn?: number;
|
|
217
|
+
signal?: AbortSignal;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* A self-contained public URL: anyone holding it can fetch the bytes until
|
|
221
|
+
* expiresAtUtc, with no login and no document access. Minting one requires
|
|
222
|
+
* document read access; once minted it cannot be revoked before expiry.
|
|
223
|
+
*/
|
|
224
|
+
type AttachmentShareLink = {
|
|
225
|
+
url: string;
|
|
226
|
+
expiresAtUtc: string;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Batch progress is per item, carrying the item's `index`. There is
|
|
230
|
+
* deliberately no batch-wide byte total: weighting items against each other is
|
|
231
|
+
* a presentation decision the client cannot make, and a confirmed dedup would
|
|
232
|
+
* shrink the denominator mid-flight.
|
|
233
|
+
*/
|
|
234
|
+
type AttachmentBatchOptions = {
|
|
235
|
+
/** Bounds preprocessing and transfer together. Defaults to 4. */concurrency?: number; /** Whole-batch cancellation: stops unstarted items. */
|
|
236
|
+
signal?: AbortSignal;
|
|
237
|
+
onProgress?: (progress: AttachmentProgress & {
|
|
238
|
+
index: number;
|
|
239
|
+
}) => void;
|
|
240
|
+
/**
|
|
241
|
+
* Fired as each item settles, including items the signal skipped before they
|
|
242
|
+
* started, so `settled` always reaches `total`.
|
|
243
|
+
*/
|
|
244
|
+
onItemSettled?: (counts: AttachmentBatchCounts) => void; /** Min ms between byte events, applied per item rather than batch-wide. */
|
|
245
|
+
throttleMs?: number;
|
|
246
|
+
};
|
|
247
|
+
type AttachmentBatchCounts = {
|
|
248
|
+
settled: number;
|
|
249
|
+
completed: number;
|
|
250
|
+
failed: number;
|
|
251
|
+
total: number;
|
|
252
|
+
};
|
|
253
|
+
declare const DEFAULT_ATTACHMENT_BATCH_CONCURRENCY = 4;
|
|
13
254
|
interface IAttachmentClient {
|
|
14
255
|
preprocess(file: Blob, opts?: {
|
|
15
256
|
fileName?: string;
|
|
16
257
|
mimeType?: string;
|
|
17
258
|
}): Promise<PreprocessResult>;
|
|
18
259
|
reserve(options: HashFirstReserveAttachmentOptions, send: (handle: IAttachmentUpload) => Promise<AttachmentUploadResult>): Promise<AttachmentUploadResult>;
|
|
260
|
+
/**
|
|
261
|
+
* Hash, reserve, and transfer one file; a confirmed dedup skips the transfer
|
|
262
|
+
* and reports a terminal `done` carrying `deduped: true` and zero bytes.
|
|
263
|
+
*
|
|
264
|
+
* Also accepts an already-preprocessed payload, so the canonical
|
|
265
|
+
* preprocess -> dispatch -> upload flow reports progress too.
|
|
266
|
+
*/
|
|
267
|
+
upload(input: AttachmentUploadInput | AttachmentPreprocessedUploadInput, options?: AttachmentProgressOptions): Promise<AttachmentUploadResult>;
|
|
268
|
+
/**
|
|
269
|
+
* Document-authorized download of one ref.
|
|
270
|
+
*
|
|
271
|
+
* Resolves as soon as the byte stream is available, with `downloading` as
|
|
272
|
+
* the last event emitted and `loaded: 0`. Byte events and the terminal
|
|
273
|
+
* `done` arrive as the caller reads the stream — and never arrive at all if
|
|
274
|
+
* the caller abandons it.
|
|
275
|
+
*/
|
|
276
|
+
download(input: AttachmentDownloadInput, options?: AttachmentProgressOptions): Promise<AttachmentResponse>;
|
|
277
|
+
/**
|
|
278
|
+
* Document-authorized download materialized as a typed Blob. The Blob's
|
|
279
|
+
* type comes from the server header unless overridden — that's what makes
|
|
280
|
+
* browsers render PDFs inline and images correctly.
|
|
281
|
+
*/
|
|
282
|
+
downloadBlob(input: AttachmentDownloadInput, options?: AttachmentBlobOptions & AttachmentProgressOptions): Promise<AttachmentBlobResult>;
|
|
283
|
+
/**
|
|
284
|
+
* Download and hand the bytes to the browser's save-file flow. Browser
|
|
285
|
+
* only. fileName defaults to the server header's; pass the document's own
|
|
286
|
+
* name for per-document naming.
|
|
287
|
+
*/
|
|
288
|
+
saveAttachment(input: AttachmentDownloadInput, options?: AttachmentSaveOptions & AttachmentProgressOptions): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Download and expose the bytes as an object URL for inline rendering
|
|
291
|
+
* (img/iframe/video src). Callers MUST call revoke() when done — the URL
|
|
292
|
+
* pins the blob in memory until then.
|
|
293
|
+
*/
|
|
294
|
+
downloadObjectUrl(input: AttachmentDownloadInput, options?: AttachmentBlobOptions & AttachmentProgressOptions): Promise<AttachmentObjectUrl>;
|
|
295
|
+
/**
|
|
296
|
+
* Mint a public share link: a presigned URL anyone can fetch until it
|
|
297
|
+
* expires, with no login. Authorized exactly like a download (document
|
|
298
|
+
* read access + the reference index). Requires a presigned-capable
|
|
299
|
+
* storage backend (S3); rejects when the server answers with an
|
|
300
|
+
* authenticated switchboard target, which would not be public.
|
|
301
|
+
*/
|
|
302
|
+
getShareLink(input: AttachmentShareLinkInput): Promise<AttachmentShareLink>;
|
|
303
|
+
uploadMany(inputs: readonly AttachmentUploadInput[], options?: AttachmentBatchOptions): Promise<BatchItemResult<AttachmentUploadResult>[]>;
|
|
304
|
+
downloadMany(inputs: readonly AttachmentDownloadInput[], options?: AttachmentBatchOptions): Promise<BatchItemResult<AttachmentResponse>[]>;
|
|
19
305
|
}
|
|
20
306
|
declare function createAttachmentClient(service: IAttachmentService): IAttachmentClient;
|
|
21
307
|
//#endregion
|
|
22
|
-
export { AttachmentAlreadyExists, type AttachmentHeader, type AttachmentMetadata, AttachmentNotFound, AttachmentPending, type AttachmentResponse, AttachmentService, type AttachmentStatus, type AttachmentTransportConfig, type AttachmentUploadResult, type HashFirstReserveAttachmentOptions, HashMismatch, IAttachmentClient, type IAttachmentReader, type IAttachmentService, type IAttachmentStore, type IAttachmentTransport, type IAttachmentTransportFactory, type IAttachmentUpload, type IAttachmentUploadFactory, type IReservationStore, InvalidAttachmentRef, NullAttachmentTransport, type ParsedRef, PreprocessResult, RemoteAttachmentStore, RemoteAttachmentUpload, RemoteAttachmentUploadFactory, RemoteReservationStore, type Reservation, ReservationNotFound, type ReserveAttachmentOptions, SizeMismatch, SwitchboardAttachmentTransport, type SwitchboardClientConfig, type SwitchboardTransportConfig, type TransportFetchResult, type TransportResponse, type UploadFirstReserveAttachmentOptions, UploadTooLarge, createAttachmentClient, createRef, createRemoteAttachmentService, parseRef };
|
|
308
|
+
export { AttachmentAlreadyExists, AttachmentBatchCounts, AttachmentBatchOptions, AttachmentBlobOptions, AttachmentBlobResult, AttachmentDownloadInput, type AttachmentDownloadOptions, type AttachmentDownloadTarget, type AttachmentDownloadTargetOptions, type AttachmentHeader, type AttachmentMetadata, AttachmentNotFound, AttachmentObjectUrl, AttachmentPending, AttachmentPreprocessedUploadInput, type AttachmentProgress, type AttachmentProgressListener, type AttachmentProgressOptions, type AttachmentResponse, AttachmentSaveOptions, type AttachmentSendOptions, AttachmentService, AttachmentShareLink, AttachmentShareLinkInput, type AttachmentStage, type AttachmentStatus, type AttachmentTargetHeaders, AttachmentTransferError, type AttachmentTransferStage, type AttachmentTransportConfig, AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, type AttachmentUploadResult, type AttachmentUploadTarget, type AttachmentUploadTransport, type BatchItemResult, type ByteProgressHooks, DEFAULT_ATTACHMENT_BATCH_CONCURRENCY, DEFAULT_PROGRESS_THROTTLE_MS, type HashFirstReserveAttachmentOptions, HashMismatch, IAttachmentClient, type IAttachmentReader, type IAttachmentService, type IAttachmentStore, type IAttachmentTransport, type IAttachmentTransportFactory, type IAttachmentUpload, type IAttachmentUploadFactory, type IReservationStore, InvalidAttachmentRef, NullAttachmentTransport, type ParsedRef, PreprocessResult, ProgressEmitter, type ProgressEmitterOptions, RemoteAttachmentStore, RemoteAttachmentUpload, RemoteAttachmentUploadFactory, RemoteReservationStore, type Reservation, ReservationNotFound, type ReserveAttachmentOptions, type RunWithConcurrencyOptions, SizeMismatch, SwitchboardAttachmentTransport, type SwitchboardClientConfig, type SwitchboardTransportConfig, type TransportFetchResult, type TransportResponse, type UploadFirstReserveAttachmentOptions, UploadTooLarge, type XhrUploadTransportOptions, createAttachmentClient, createFetchUploadTransport, createRef, createRemoteAttachmentService, createXhrUploadTransport, parseAttachmentDownloadTarget, parseAttachmentUploadTarget, parseRef, progressFraction, runWithConcurrency, withByteProgress };
|
|
23
309
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","names":[],"sources":["../src/client.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../src/concurrency.ts","../src/progress.ts","../src/client.ts"],"mappings":";;;;;;;;AAKA;KAAY,eAAA;EACN,KAAA;EAAe,MAAA;EAAqB,KAAA,EAAO,CAAA;AAAA;EAC3C,KAAA;EAAe,MAAA;EAAoB,KAAA;AAAA;AAAA,KAE7B,yBAAA;EAF6B,0EAIvC,WAAA;EAJ4C;AAE9C;;;;EAQE,MAAA,GAAS,WAAA;EAOY;;;;;;EAArB,S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