@capgo/cli
Version:
A CLI to upload to capgo servers
24 lines (23 loc) • 1.54 kB
TypeScript
import type { manifestType } from '../utils';
import type { OptionsUpload } from './upload_interface';
import { Buffer } from 'node:buffer';
import { CliUserError } from '../shared/cli-user-error';
import type { ManifestUploadRequestEntry, ResolvedManifestUpload, ResolvedManifestUploadEntry } from './manifest-upload';
export declare function fileExistsAtUploadTarget(existenceCheckUrlPrefix: string, filename: string): Promise<{
exists: boolean;
receipt?: string;
}>;
export declare function prepareBundlePartialFiles(path: string, apikey: string, orgId: string, appid: string, encryptionMethod: 'none' | 'v2' | 'v1', finalKeyData: string, supportsHexChecksum?: boolean): Promise<{
file: string;
hash: string;
}[]>;
export interface PartialEncryptionOptions {
sessionKey: Buffer;
ivSessionKey: string;
}
export declare class PartialUploadValidationError extends CliUserError {
constructor(message: string);
}
export declare function prepareManifestUploadEntries(manifest: manifestType, path: string, encryptionOptions: PartialEncryptionOptions | undefined, options: OptionsUpload): Promise<ManifestUploadRequestEntry[]>;
export declare function buildPartialUploadHeaders(manifestUploadEntry: ResolvedManifestUploadEntry): Record<string, string>;
export declare function uploadPartial(apikey: string, manifest: manifestType, path: string, appId: string, orgId: string, encryptionOptions: PartialEncryptionOptions | undefined, options: OptionsUpload, manifestUpload: ResolvedManifestUpload): Promise<any[] | null>;