@hostr/upload 0.1.0 → 0.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/dist/api/client.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -51,6 +51,18 @@ export declare class HostrApi {
|
|
|
51
51
|
}): Promise<CompleteResult>;
|
|
52
52
|
abort(assetId: string): Promise<void>;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Per-asset audio options for `POST /v1/uploads`. `'asmr'` is the preset —
|
|
56
|
+
* 256 kbps, linear loudness normalisation to -24 LUFS under -1.5 dBTP; the
|
|
57
|
+
* object form sets the knobs individually. Omitted, the audio passes through
|
|
58
|
+
* with its gain untouched at 128 kbps.
|
|
59
|
+
*/
|
|
60
|
+
export type UploadAudioOptions = 'asmr' | {
|
|
61
|
+
normalize?: boolean;
|
|
62
|
+
targetLufs?: number;
|
|
63
|
+
truePeakDbtp?: number;
|
|
64
|
+
kbps?: number;
|
|
65
|
+
};
|
|
54
66
|
export declare function createUploadSession(opts: {
|
|
55
67
|
endpoint: string;
|
|
56
68
|
apiKey: string;
|
|
@@ -59,6 +71,7 @@ export declare function createUploadSession(opts: {
|
|
|
59
71
|
size: number;
|
|
60
72
|
partSize?: number;
|
|
61
73
|
tokenTtlSec?: number;
|
|
74
|
+
audio?: UploadAudioOptions;
|
|
62
75
|
}, fetchFn?: typeof fetch): Promise<CreateResult>;
|
|
63
76
|
export declare function mintUploadToken(opts: {
|
|
64
77
|
endpoint: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type * from './core/types.js';
|
|
2
2
|
export { ApiError, NetworkError, HostrApi, createUploadSession, mintUploadToken, } from './api/client.js';
|
|
3
|
-
export type { RemotePart, RemoteUpload, CreateResult, CompleteResult } from './api/client.js';
|
|
3
|
+
export type { RemotePart, RemoteUpload, CreateResult, CompleteResult, UploadAudioOptions } from './api/client.js';
|
|
4
4
|
export { storageKey, loadSession, saveSession, clearSession, partSizeOf, memoryStore, } from './core/session.js';
|
|
5
5
|
export type { SessionStatus, SessionRecord } from './core/session.js';
|
|
6
6
|
export { classifyPut, classifyApi, backoffMs, RETRY_BUDGET } from './core/retry.js';
|