# @types/react-native-aws3

> TypeScript definitions for react-native-aws3

Latest version **0.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/react-native-aws3
pnpm add @types/react-native-aws3
yarn add @types/react-native-aws3
bun add @types/react-native-aws3
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-11-07 |
| First published | 2020-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51451 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/react-native-aws3
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-aws3
- npm.io page: https://npm.io/package/@types/react-native-aws3

## Recent versions

- 0.0.4 (latest) — 2023-11-07
- 0.0.1 (ts3.6) — 2021-07-08
- 0.0.0 (ts3.2) — 2020-10-01
- 0.0.3 — 2023-10-18
- 0.0.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/react-native-aws3`

# Summary
This package contains type definitions for react-native-aws3 (https://github.com/benjreinhart/react-native-aws3#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-aws3.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-aws3/index.d.ts)
````ts
export interface File {
    /**
     * File system URI, can be assets library path or file:// path
     */
    uri: string;

    /**
     * The name of the file, will be stored as such in S3
     */
    name: string;

    /**
     * The mime type, also used for Content-Type parameter in the S3 post policy
     */
    type: string;
}

export interface Options {
    /**
     * The Access Control List of this object
     * @default "public-read"
     */
    acl?: string | undefined;

    /**
     * Prefix, or path to the file on S3, i.e. uploads/ (note the trailing slash)
     */
    keyPrefix?: string | undefined;

    /**
     * Your S3 bucket
     */
    bucket: string;

    /**
     * The region of your S3 bucket
     */
    region: string;

    /**
     * Your S3 AWSAccessKeyId
     */
    accessKey: string;

    /**
     * Your S3 AWSSecretKey
     */
    secretKey: string;

    /**
     * HTTP response status if successful
     * @default 201
     */
    successActionStatus?: number | undefined;

    /**
     * AWS S3 url
     * @default "s3.amazonaws.com"
     */
    awsUrl?: string | undefined;

    /**
     * Devices time offset from world clock in milliseconds
     * @default 0
     */
    timeDelta?: number | undefined;
}

export interface Progress {
    /**
     * amount uploaded
     */
    loaded: number;

    /**
     * total amount to upload
     */
    total: number;

    /**
     * number between 0 and 1 representing the percent completed
     */
    percent: number;
}

export interface Request {
    _xhr: XMLHttpRequest;
    _formData: FormData;
    _promise: Promise<Response>;

    header(key: string, value: string): this;
    set(key: string, value: string | Blob): this;
    send(): this;
    abort(): this;
    progress(callback: (progress: Progress) => any): this;
    then(...args: Parameters<this["_promise"]["then"]>): this;
    catch(...args: Parameters<this["_promise"]["catch"]>): this;
}

export interface Response {
    status: number;
    text: string;
    headers: { [K: string]: string };
}

export namespace RNS3 {
    function put(file: File, options: Options): Request;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Shirsh Zibbu](https://github.com/zhirzh).

---
_Source: https://npm.io/package/@types/react-native-aws3 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
