0.4.4 • Published 6 months ago

@types/uploadcare v0.4.4

Weekly downloads
844
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/uploadcare

Summary

This package contains type definitions for uploadcare (https://github.com/rexmorgan/uploadcare-node).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uploadcare.

index.d.ts

// Type definitions for uploadcare 0.4
// Project: https://github.com/rexmorgan/uploadcare-node
// Definitions by: Jinesh Shah <https://github.com/jineshshah36>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import { ReadStream } from "fs";

declare namespace Uploadcare {
    interface File {
        original_file_url: string;
        image_info: ImageInfo;
        mime_type: string;
        is_ready: boolean;
        url: string;
        uuid: string;
        original_filename: string;
        datetime_uploaded: string;
        size: number;
        is_image: boolean;
        datetime_stored: string;
        datetime_removed: string | null;
    }

    interface ImageInfo {
        orientation: null;
        sequence: boolean;
        format: string;
        height: number;
        width: number;
        geo_location: null;
        datetime_original: null;
        dpi: number[];
    }

    interface Instance {
        file: {
            upload: (
                readStream: ReadStream,
                options: { store?: boolean | undefined },
                callback: (err: Error, res: { file: string }) => void
            ) => void;
            fromUrl: (
                url: string,
                options: { store?: boolean | undefined },
                callback: (err: Error, res: File) => void
            ) => void;
        };
        files: {
            store: (
                uuid: string,
                callback: (err: Error, res: File) => void
            ) => void;
            remove: (
                uuid: string,
                callback: (err: Error, res: File) => void
            ) => void;
        };
    }
}

declare function Uploadcare(
    publicKey: string,
    privateKey: string
): Uploadcare.Instance;

export = Uploadcare;

Additional Details

  • Last updated: Fri, 02 Jul 2021 18:04:51 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Jinesh Shah.

0.4.4

6 months ago

0.4.3

7 months ago

0.4.2

8 months ago

0.4.1

3 years ago

0.4.0

6 years ago