@uppy/companion-client
Advanced tools
Comparing version 3.4.1 to 3.5.0
# @uppy/companion-client | ||
## 3.5.0 | ||
Released: 2023-10-20 | ||
Included in: Uppy v3.18.0 | ||
- @uppy/companion-client: fixup! Added Companion OAuth Key type (Murderlon / #4668) | ||
- @uppy/companion-client: Added Companion OAuth Key type (Chris Pratt / #4668) | ||
## 3.4.1 | ||
@@ -4,0 +12,0 @@ |
@@ -15,3 +15,3 @@ 'use strict'; | ||
const packageJson = { | ||
"version": "3.4.1" | ||
"version": "3.5.0" | ||
}; // Remove the trailing slash so we can always safely append /xyz. | ||
@@ -18,0 +18,0 @@ function stripSlash(url) { |
{ | ||
"name": "@uppy/companion-client", | ||
"description": "Client library for communication with Companion. Intended for use in Uppy plugins.", | ||
"version": "3.4.1", | ||
"version": "3.5.0", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/utils": "^5.5.1", | ||
"@uppy/utils": "^5.5.2", | ||
"namespace-emitter": "^2.0.1" | ||
@@ -28,0 +28,0 @@ }, |
@@ -15,2 +15,7 @@ import type { Uppy } from '@uppy/core' | ||
type CompanionKeys = { | ||
key: string | ||
credentialsName: string | ||
} | ||
export interface RequestClientOptions { | ||
@@ -20,11 +25,12 @@ companionUrl: string | ||
companionCookiesRule?: RequestCredentials | ||
companionKeysParams?: CompanionKeys | ||
} | ||
type RequestOptions = { | ||
skipPostResponse?: boolean, | ||
signal?: AbortSignal, | ||
skipPostResponse?: boolean | ||
signal?: AbortSignal | ||
} | ||
export class RequestClient { | ||
constructor (uppy: Uppy, opts: RequestClientOptions) | ||
constructor(uppy: Uppy, opts: RequestClientOptions) | ||
@@ -35,16 +41,32 @@ readonly hostname: string | ||
get<T = unknown> (path: string, options?: RequestOptions): Promise<T> | ||
get<T = unknown>(path: string, options?: RequestOptions): Promise<T> | ||
/** @deprecated use option bag instead */ | ||
get<T = unknown> (path: string, skipPostResponse: boolean): Promise<T> | ||
get<T = unknown>(path: string, skipPostResponse: boolean): Promise<T> | ||
post<T = unknown> (path: string, data: Record<string, unknown>, options?: RequestOptions): Promise<T> | ||
post<T = unknown>( | ||
path: string, | ||
data: Record<string, unknown>, | ||
options?: RequestOptions, | ||
): Promise<T> | ||
/** @deprecated use option bag instead */ | ||
post<T = unknown> (path: string, data: Record<string, unknown>, skipPostResponse: boolean): Promise<T> | ||
post<T = unknown>( | ||
path: string, | ||
data: Record<string, unknown>, | ||
skipPostResponse: boolean, | ||
): Promise<T> | ||
delete<T = unknown> (path: string, data?: Record<string, unknown>, options?: RequestOptions): Promise<T> | ||
delete<T = unknown>( | ||
path: string, | ||
data?: Record<string, unknown>, | ||
options?: RequestOptions, | ||
): Promise<T> | ||
/** @deprecated use option bag instead */ | ||
delete<T = unknown> (path: string, data: Record<string, unknown>, skipPostResponse: boolean): Promise<T> | ||
delete<T = unknown>( | ||
path: string, | ||
data: Record<string, unknown>, | ||
skipPostResponse: boolean, | ||
): Promise<T> | ||
} | ||
@@ -70,15 +92,19 @@ | ||
export class Provider extends RequestClient { | ||
constructor (uppy: Uppy, opts: ProviderOptions) | ||
constructor(uppy: Uppy, opts: ProviderOptions) | ||
checkAuth (): Promise<boolean> | ||
checkAuth(): Promise<boolean> | ||
authUrl (): string | ||
authUrl(): string | ||
fileUrl (id: string): string | ||
fileUrl(id: string): string | ||
list (directory: string): Promise<any> | ||
list(directory: string): Promise<any> | ||
logout (redirect?: string): Promise<any> | ||
logout(redirect?: string): Promise<any> | ||
static initPlugin (plugin: unknown, opts: Record<string, unknown>, defaultOpts?: Record<string, unknown>): void | ||
static initPlugin( | ||
plugin: unknown, | ||
opts: Record<string, unknown>, | ||
defaultOpts?: Record<string, unknown>, | ||
): void | ||
} | ||
@@ -94,15 +120,15 @@ | ||
constructor (opts: SocketOptions) | ||
constructor(opts: SocketOptions) | ||
open (): void | ||
open(): void | ||
close (): void | ||
close(): void | ||
send (action: string, payload: unknown): void | ||
send(action: string, payload: unknown): void | ||
on (action: string, handler: (param: any) => void): void | ||
on(action: string, handler: (param: any) => void): void | ||
once (action: string, handler: (param: any) => void): void | ||
once(action: string, handler: (param: any) => void): void | ||
emit (action: string, payload: (param: any) => void): void | ||
emit(action: string, payload: (param: any) => void): void | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124193
1719
Updated@uppy/utils@^5.5.2