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

@agconnect/network-types

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agconnect/network-types - npm Package Compare versions

Comparing version 1.2.0-beta1 to 1.2.0

68

index.d.ts

@@ -32,2 +32,4 @@ export namespace AGCPlatformInfoService {

onDownloadProgress?: (progressEvent: any) => void;
validateStatus?: ((status: number) => boolean);
cancelToken?: CancelToken;
}

@@ -42,2 +44,31 @@

export interface AGCError<T = any> extends Error {
code?: string;
response?: AGCResponse<T>;
}
export interface Cancel {
message: string;
}
export interface Canceler {
(message?: string): void;
}
export interface CancelTokenStatic {
new(executor: (cancel: Canceler) => void): CancelToken;
source(): CancelTokenSource;
}
export interface CancelToken {
promise: Promise<Cancel>;
reason?: Cancel;
throwIfRequested(): void;
}
export interface CancelTokenSource {
token: CancelToken;
cancel: Canceler;
}
export interface AGCNetwork {

@@ -51,5 +82,42 @@ post(url: string, param: any, headers?: any, config?: AGCRequestConfig): Promise<AGCResponse>;

put(url: string, param?: any, headers?: any, config?: AGCRequestConfig): Promise<AGCResponse>;
CancelToken: CancelTokenStatic;
}
}
export namespace AGCFileTransloadService {
export const enum Naming {
value = "AGCFileTransloadService",
}
export interface AGCFile {
uri: string;
filename?: string;
name?: string;
type?: string;
}
export interface AGCUploadRequest {
url: string;
files: AGCFile[];
headers?: any;
method?: string;
data?: any;
validateStatus?: ((status: number) => boolean);
}
export interface AGCUploadResponse<T = any> {
data: T;
status: number;
statusText: string;
headers: any;
}
export interface AGCFileTransload {
upload(request: AGCUploadRequest): Promise<AGCUploadResponse>;
uploadTask(request: AGCUploadRequest) : Promise<AGCUploadResponse>;
onProgressUpdate(progress: (progressEvent: any) => void) : void;
onHeadersReceived(received: (progressEvent: any) => void) : void;
abort() : void;
}
}
export namespace AGCWebSocketService {

@@ -56,0 +124,0 @@ export const enum Naming {

4

package.json
{
"name": "@agconnect/network-types",
"version": "1.2.0-beta1",
"version": "1.2.0",
"description": "",

@@ -14,2 +14,2 @@ "scripts": {},

"license": "ISC"
}
}
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