Socket
Socket
Sign inDemoInstall

@uppy/companion-client

Package Overview
Dependencies
Maintainers
5
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/companion-client - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

types/index.test-d.ts

2

lib/RequestClient.js

@@ -218,2 +218,2 @@ 'use strict';

return RequestClient;
}(), _class.VERSION = "1.4.1", _temp);
}(), _class.VERSION = "1.4.2", _temp);
{
"name": "@uppy/companion-client",
"description": "Client library for communication with Companion. Intended for use in Uppy plugins.",
"version": "1.4.1",
"version": "1.4.2",
"license": "MIT",

@@ -26,3 +26,3 @@ "main": "lib/index.js",

},
"gitHead": "b2f158e45ec14a5198e1981747f39cacd4a3276e"
"gitHead": "2c98271103539fbe46b37b9f8c2746bc7188b9c8"
}

@@ -0,48 +1,70 @@

/**
* Async storage interface, similar to `localStorage`. This can be used to
* implement custom storages for authentication tokens.
*/
export interface TokenStorage {
setItem: (key: string, value: string) => Promise<void>
getItem: (key: string) => Promise<string>
removeItem: (key: string) => Promise<void>
}
export interface RequestClientOptions {
companionUrl: string;
companionHeaders?: object;
companionUrl: string
companionHeaders?: object
/**
* Deprecated, use `companionHeaders` instead.
*/
serverHeaders?: object;
serverHeaders?: object
}
export class RequestClient {
constructor (uppy: any, opts: RequestClientOptions);
get (path: string): Promise<any>;
post (path: string, data: object): Promise<any>;
delete (path: string, data: object): Promise<any>;
constructor (uppy: any, opts: RequestClientOptions)
get (path: string): Promise<any>
post (path: string, data: object): Promise<any>
delete (path: string, data: object): Promise<any>
}
export interface ProviderOptions extends RequestClientOptions {
provider: string;
authProvider?: string;
name?: string;
/**
* Options for Providers that can be passed in by Uppy users through
* Plugin constructors.
*/
export interface PublicProviderOptions extends RequestClientOptions {
companionAllowedHosts?: string | RegExp | Array<string | RegExp>
}
/**
* Options for Providers, including internal options that Plugins can set.
*/
export interface ProviderOptions extends PublicProviderOptions {
provider: string
authProvider?: string
name?: string
pluginId: string
}
export class Provider extends RequestClient {
constructor (uppy: any, opts: ProviderOptions);
checkAuth (): Promise<boolean>;
authUrl (): string;
fileUrl (id: string): string;
list (directory: string): Promise<any>;
logout (redirect?: string): Promise<any>;
static initPlugin(plugin: any, opts: object, defaultOpts?: object): void;
constructor (uppy: any, opts: ProviderOptions)
checkAuth (): Promise<boolean>
authUrl (): string
fileUrl (id: string): string
list (directory: string): Promise<any>
logout (redirect?: string): Promise<any>
static initPlugin (plugin: any, opts: object, defaultOpts?: object): void
}
export interface SocketOptions {
target: string;
autoOpen?: boolean;
target: string
autoOpen?: boolean
}
export class Socket {
isOpen: boolean;
isOpen: boolean
constructor (opts: SocketOptions);
open (): void;
close (): void;
send (action: string, payload: any): void;
on (action: string, handler: (param: any) => void): void;
once (action: string, handler: (param: any) => void): void;
emit (action: string, payload: (param: any) => void): void;
constructor (opts: SocketOptions)
open (): void
close (): void
send (action: string, payload: any): void
on (action: string, handler: (param: any) => void): void
once (action: string, handler: (param: any) => void): void
emit (action: string, payload: (param: any) => void): void
}
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