@types/chrome-webstore-upload
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Installation

npm install --save @types/chrome-webstore-upload

Summary

This package contains type definitions for chrome-webstore-upload (https://github.com/fregante/chrome-webstore-upload).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/chrome-webstore-upload.

index.d.ts

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

export interface Options {
    extensionId: string;
    clientId: string;
    clientSecret?: string;
    refreshToken: string;
}

export interface Item {
    kind: string;
    id: string;
    publicKey: string;
    uploadState: "FAILURE" | "IN_PROGRESS" | "NOT_FOUND" | "SUCCESS";
    itemError: {
        error_code: string;
        error_detail: string;
    };
}

export type PublishStatus =
    | "OK"
    | "NOT_AUTHORIZED"
    | "INVALID_DEVELOPER"
    | "DEVELOPER_NO_OWNERSHIP"
    | "DEVELOPER_SUSPENDED"
    | "ITEM_NOT_FOUND"
    | "ITEM_PENDING_REVIEW"
    | "ITEM_TAKEN_DOWN"
    | "PUBLISHER_SUSPENDED";

export interface PublishResponse {
    kind: string;
    item_id: string;
    status: PublishStatus[];
    statusDetail: string[];
}

export interface APIClient {
    /** @async */
    uploadExisting(readStream: NodeJS.ReadableStream, token?: string): Promise<Item>;

    /** @async */
    publish(target?: string, token?: string): Promise<PublishResponse>;

    /** @async */
    get(projection?: string, token?: string): Promise<Item>;

    /** @async */
    fetchToken(): Promise<string>;
}

export default function chromeWebstoreUpload(options: Options): APIClient;

Additional Details

  • Last updated: Mon, 08 Jan 2024 18:36:13 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Granga.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/chrome-webstore-upload

Weekly Downloads

112

Version

1.0.0

License

MIT

Unpacked Size

5.17 kB

Total Files

5

Last publish

Collaborators

  • types