Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/dropbox-chooser

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/dropbox-chooser

TypeScript definitions for dropbox-chooser

  • 1.0.8
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/dropbox-chooser

Summary

This package contains type definitions for dropbox-chooser (https://www.dropbox.com/developers/chooser).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dropbox-chooser.

index.d.ts

declare namespace Dropbox {
    interface Chooser {
        choose(options: ChooserOptions): void;
    }

    interface ChooserOptions {
        // called when a user selects an item in the Chooser
        success(files: readonly ChooserFile[]): void;

        // called when the user closes the dialog without selecting a file
        cancel?(): void;

        // default: 'preview'
        linkType?: "preview" | "direct" | undefined;

        // default: false
        multiselect?: boolean | undefined;

        // eg. '.png'
        extensions?: string[] | undefined;

        // default: false
        folderselect?: boolean | undefined;

        // any positive number
        sizeLimit?: number | undefined;
    }

    interface ChooserFile {
        // Unique ID for the file, compatible with Dropbox API v2.
        id: string;

        // Name of the file.
        name: string;

        // URL to access the file, which varies depending on the linkType specified when the
        // Chooser was triggered.
        link: string;

        // Size of the file in bytes.
        bytes: number;

        // URL to a 64x64px icon for the file based on the file's extension.
        icon: string;

        // A thumbnail URL generated when the user selects images and videos.
        // If the user didn't select an image or video, no thumbnail will be included.
        thumbnailLink?: string | undefined;

        // whether or not the file is actually a directory
        isDir: boolean;
    }

    // Refer to "Handling the response" section of: https://www.dropbox.com/developers/chooser
    type ChooserFileBoundingBox = 75 | 256 | 800 | 1280 | 2048;
    type ChooserFileMode = "fit" | "crop" | "fit_one_and_overflow";
}

interface Window {
    Dropbox?: Dropbox.Chooser | undefined;
}

Additional Details

  • Last updated: Tue, 30 Jan 2024 21:35:45 GMT
  • Dependencies: none

Credits

These definitions were written by Michael Su.

FAQs

Package last updated on 30 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc