@nutrient-sdk/dws-client-typescript
Version:
Node.js TypeScript client library for Nutrient Document Web Services (DWS) API
47 lines • 1.09 kB
TypeScript
/**
* Represents a file path input (Node.js only)
*/
export interface FilePathInput {
type: 'file-path';
path: string;
}
/**
* Represents a Buffer input (Node.js)
*/
export interface BufferInput {
type: 'buffer';
buffer: Buffer;
filename: string;
}
/**
* Represents a Uint8Array input
*/
export interface Uint8ArrayInput {
type: 'uint8array';
data: Uint8Array;
filename: string;
}
/**
* Represents a URL input
*/
export interface UrlInput {
type: 'url';
url: string;
}
/**
* Union type for all possible file inputs (Node.js only)
*/
export type FileInput = FilePathInput | BufferInput | Uint8ArrayInput | UrlInput | Buffer | Uint8Array | string;
/**
* Type guard to check if input is a Buffer
*/
export declare function isBuffer(input: unknown): input is Buffer;
/**
* Type guard to check if input is a Uint8Array
*/
export declare function isUint8Array(input: unknown): input is Uint8Array;
/**
* Type guard to check if string is a URL
*/
export declare function isUrl(input: string): boolean;
//# sourceMappingURL=inputs.d.ts.map