mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
remove qiniu
This commit is contained in:
@@ -420,6 +420,12 @@
|
||||
"sourceRepoURL": "https://github.com/angular/protractor",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "qiniu",
|
||||
"typingsPackageName": "qiniu",
|
||||
"sourceRepoURL": "git@github.com:qiniu/nodejs-sdk.git",
|
||||
"asOfVersion": "6.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "Raven JS",
|
||||
"typingsPackageName": "raven-js",
|
||||
|
||||
Vendored
-262
@@ -1,262 +0,0 @@
|
||||
// Type definitions for qiniu 6.1
|
||||
// Project: https://github.com/qiniu/nodejs-sdk
|
||||
// Definitions by: xialeistudio <https://github.com/xialeistudio>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare namespace qiniu {
|
||||
type onret = (e?: any, result?: any, res?: any) => void;
|
||||
class conf {
|
||||
static ACCESS_KEY: string;
|
||||
static SECRET_KEY: string;
|
||||
static USER_AGENT: string;
|
||||
static UP_HOST: string;
|
||||
static RS_HOST: string;
|
||||
static RSF_HOST: string;
|
||||
static API_HOST: string;
|
||||
static RPC_TIMEOUT: number;
|
||||
static UC_HOST: string;
|
||||
static UP_HTTPS_HOST: string;
|
||||
static SCHEME: string;
|
||||
static AUTOZONE: boolean;
|
||||
static BUCKET: string | null;
|
||||
static EXPIRE: number;
|
||||
}
|
||||
namespace auth {
|
||||
class Mac {
|
||||
accessKey: string;
|
||||
secretKey: string;
|
||||
|
||||
constructor(accessKey: string, secretKey: string);
|
||||
}
|
||||
}
|
||||
namespace io {
|
||||
const UNDEFINED_KEY: string;
|
||||
class PutExtra {
|
||||
params: any;
|
||||
mimeType?: string;
|
||||
crc32?: string;
|
||||
checkCrc?: number;
|
||||
|
||||
constructor(params?: any, mimeType?: string, crc32?: string, checkCrc?: number);
|
||||
}
|
||||
class PutRet {
|
||||
hash?: string;
|
||||
key?: string;
|
||||
|
||||
constructor(hash?: string, key?: string);
|
||||
}
|
||||
|
||||
function putReadable(uptoken: string, key?: string, rs?: any, extra?: any, onret?: onret): any;
|
||||
|
||||
function put(uptoken: string, key?: string, body?: any, extra?: any, onret?: onret): any;
|
||||
|
||||
function putWithoutKey(uptoken: string, body?: any, extra?: any, onret?: onret): any;
|
||||
|
||||
function putFile(uptoken: string, key?: string, localFile?: string, extra?: any, onret?: onret): any;
|
||||
|
||||
function putFileWithoutKey(uptoken: string, localFile?: string, extra?: any, onret?: onret): any;
|
||||
}
|
||||
namespace util {
|
||||
function urlsafeBase64Encode(jsonFlags: any): string;
|
||||
|
||||
function base64ToUrlSafe(v: string): string;
|
||||
|
||||
function hmacSha1(encodedFlags: any, secretKey: string): string;
|
||||
|
||||
function generateAccessToken(uri: string, body?: any): string;
|
||||
|
||||
function isQiniuCallback(path: string, body: any, callbackAuth: any): boolean;
|
||||
}
|
||||
namespace zone {
|
||||
function up_host(uptoken: string, conf: conf): void;
|
||||
}
|
||||
namespace rsf {
|
||||
function listPrefix(bucket: string, prefix?: string, marker?: any, limit?: any, delimiter?: any, onret?: onret): void;
|
||||
}
|
||||
namespace rpc {
|
||||
function postMultipart(uri: string, form: any, onret?: onret): any;
|
||||
|
||||
function postWithForm(uri: string, form: any, token?: string, onret?: onret): any;
|
||||
|
||||
function postWithoutForm(uri: string, token?: string, onret?: onret): any;
|
||||
}
|
||||
namespace fop {
|
||||
class ImageView {
|
||||
mode: number;
|
||||
width: number;
|
||||
height: number;
|
||||
quality: number;
|
||||
format: any;
|
||||
|
||||
constructor(mode?: number, width?: number, height?: number, quality?: number, format?: any);
|
||||
|
||||
makeRequest(url: string): string;
|
||||
}
|
||||
|
||||
class ImageInfo {
|
||||
makeRequest(url: string): string;
|
||||
}
|
||||
class Exif {
|
||||
makeRequest(url: string): string;
|
||||
}
|
||||
|
||||
function pfop(bucket: string, key: string, fops: any, opts?: any, onret?: onret): void;
|
||||
}
|
||||
namespace rs {
|
||||
import Mac = qiniu.auth.Mac;
|
||||
class Client {
|
||||
client?: Client;
|
||||
|
||||
constructor(client?: Client);
|
||||
|
||||
stat(bucket: string, key: string, onret?: onret): void;
|
||||
|
||||
remove(bucket: string, key: string, onret?: onret): void;
|
||||
|
||||
move(bucketSrc: string, keySrc: string, bucketDest: string, keyDest: string, onret?: onret): void;
|
||||
|
||||
forceMove(bucketSrc: string, keySrc: string, bucketDest: string, keyDest: string, force: boolean, onret?: onret): void;
|
||||
|
||||
copy(bucketSrc: string, keySrc: string, bucketDest: string, keyDest: string, onret?: onret): void;
|
||||
|
||||
forceCopy(bucketSrc: string, keySrc: string, bucketDest: string, keyDest: string, force: boolean, onret?: onret): void;
|
||||
|
||||
fetch(url: string, bucket: string, key: string, onret?: onret): void;
|
||||
|
||||
batchStat(entries: any[], onret?: onret): void;
|
||||
|
||||
batchDelete(entries: any[], onret?: onret): void;
|
||||
|
||||
batchMove(entries: any[], onret?: onret): void;
|
||||
|
||||
forceBatchMove(entries: any[], force: boolean, onret?: onret): void;
|
||||
|
||||
batchCopy(entries: any[], onret?: onret): void;
|
||||
|
||||
forceBatchCopy(entries: any[], force: boolean, onret?: onret): void;
|
||||
}
|
||||
class Entry {
|
||||
hash?: string;
|
||||
fsize?: number;
|
||||
putTime?: number;
|
||||
mimeType?: string;
|
||||
endUser?: any;
|
||||
|
||||
constructor(hash?: string, fsize?: number, putTime?: number, mimeType?: string, endUser?: any);
|
||||
}
|
||||
class EntryPath {
|
||||
bucket?: string;
|
||||
key?: string;
|
||||
|
||||
constructor(bucket?: string, key?: string);
|
||||
|
||||
encode(): string;
|
||||
|
||||
toStr(op: string): string;
|
||||
}
|
||||
class EntryPathPair {
|
||||
src?: string;
|
||||
dest?: string;
|
||||
|
||||
constructor(src?: string, desc?: string);
|
||||
|
||||
toStr(op: string, force?: boolean): string;
|
||||
}
|
||||
class BatchItemRet {
|
||||
error?: any;
|
||||
code?: number;
|
||||
|
||||
constructor(error?: any, code?: number);
|
||||
}
|
||||
class BatchStatItemRet {
|
||||
data: any;
|
||||
error: any;
|
||||
code: number;
|
||||
|
||||
constructor(data: any, error: any, code: number);
|
||||
}
|
||||
class PutPolicy {
|
||||
scope?: string;
|
||||
callbackUrl?: string;
|
||||
callbackBody?: any;
|
||||
returnUrl?: string;
|
||||
returnBody?: any;
|
||||
endUser?: any;
|
||||
expires: number;
|
||||
persistentOps?: any;
|
||||
persistentNotifyUrl?: string;
|
||||
|
||||
constructor(score?: string,
|
||||
callbackUrl?: string,
|
||||
callbackBody?: any,
|
||||
returnUrl?: string,
|
||||
returnBody?: any,
|
||||
endUser?: any,
|
||||
expires?: number,
|
||||
persistentOps?: any,
|
||||
persistentNotifyUrl?: string);
|
||||
|
||||
token(mac?: Mac): string;
|
||||
|
||||
getFlags(): any;
|
||||
}
|
||||
interface putPolicyObj {
|
||||
scope?: string;
|
||||
expires?: number;
|
||||
insertOnly?: boolean;
|
||||
saveKey?: string;
|
||||
endUser?: any;
|
||||
returnUrl?: string;
|
||||
returnBody?: any;
|
||||
callbackUrl?: string;
|
||||
callbackHost?: string;
|
||||
callbackBody?: any;
|
||||
callbackBodyType?: string;
|
||||
callbackFetchKey?: string;
|
||||
persistentOps?: any;
|
||||
persistentNotifyUrl?: string;
|
||||
persistentPipeline?: string;
|
||||
fsizeLimit?: number;
|
||||
fsizeMin?: any;
|
||||
detectMime?: any;
|
||||
mimeLimit?: any;
|
||||
deleteAfterDays?: number;
|
||||
}
|
||||
class PutPolicy2 {
|
||||
scope?: string;
|
||||
expires: number;
|
||||
insertOnly?: boolean;
|
||||
saveKey?: string;
|
||||
endUser?: any;
|
||||
returnUrl?: string;
|
||||
returnBody?: any;
|
||||
callbackUrl?: string;
|
||||
callbackHost?: string;
|
||||
callbackBody?: any;
|
||||
callbackBodyType?: string;
|
||||
callbackFetchKey?: string;
|
||||
persistentOps?: any;
|
||||
persistentNotifyUrl?: string;
|
||||
persistentPipeline?: string;
|
||||
fsizeLimit?: number;
|
||||
fsizeMin?: any;
|
||||
detectMime?: any;
|
||||
mimeLimit?: any;
|
||||
deleteAfterDays?: number;
|
||||
|
||||
constructor(putPolicyObj: putPolicyObj);
|
||||
|
||||
token(mac?: Mac): string;
|
||||
|
||||
getFlags(): any;
|
||||
}
|
||||
class GetPolicy {
|
||||
expires: number;
|
||||
|
||||
constructor(expires?: number);
|
||||
|
||||
makeRequest(baseUrl: string, mac?: Mac): string;
|
||||
}
|
||||
function makeBaseUrl(domain: string, key: string, query?: string): string;
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
// test for qiniu.conf
|
||||
function testConf() {
|
||||
qiniu.conf.ACCESS_KEY = 'Access_Key';
|
||||
qiniu.conf.SECRET_KEY = 'Secret_Key';
|
||||
}
|
||||
|
||||
// test for qiniu.auth
|
||||
function testAuth() {
|
||||
// test for auth.Mac
|
||||
const mac = new qiniu.auth.Mac(qiniu.conf.ACCESS_KEY, qiniu.conf.SECRET_KEY);
|
||||
}
|
||||
|
||||
// test for qiniu.io
|
||||
function testIo() {
|
||||
// test for PutExtra
|
||||
const putExtra = new qiniu.io.PutExtra();
|
||||
// test for PutRet
|
||||
const putRet = new qiniu.io.PutRet();
|
||||
// test for putReadable
|
||||
qiniu.io.putReadable('xxx', undefined, undefined, undefined, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for put
|
||||
qiniu.io.put('xxx', undefined, 'test-data', undefined, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for putWithoutKey
|
||||
qiniu.io.putWithoutKey('xxx', 'test-data', undefined, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for putFile
|
||||
qiniu.io.putFile('xxx', undefined, 'tslint.json', undefined, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for putFileWithoutKey
|
||||
qiniu.io.putFileWithoutKey('xxx', 'tslint.json', undefined, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
}
|
||||
|
||||
// test for qiniu.util
|
||||
function testUtil() {
|
||||
// test for urlsafeBase64Encode
|
||||
qiniu.util.urlsafeBase64Encode(null);
|
||||
// test for base64ToUrlSafe
|
||||
qiniu.util.base64ToUrlSafe('https://example.com');
|
||||
// test for hmacSha1
|
||||
qiniu.util.hmacSha1(null, 'test');
|
||||
// test for generateAccessToken
|
||||
qiniu.util.generateAccessToken('https://example.com');
|
||||
// test for isQiniuCallback
|
||||
qiniu.util.isQiniuCallback('/key', 'test-data', 'test-auth');
|
||||
}
|
||||
|
||||
// test for qiniu.zone
|
||||
function testZone() {
|
||||
qiniu.zone.up_host('test', {ACCESS_KEY: 'xx', SECRET_KEY: 'ss'});
|
||||
}
|
||||
|
||||
// test for qiniu.rsf
|
||||
function testRsf() {
|
||||
qiniu.rsf.listPrefix('test');
|
||||
}
|
||||
|
||||
// test for qiniu.rpc
|
||||
function testRpc() {
|
||||
// test for postMultipart
|
||||
qiniu.rpc.postMultipart('https://up.qbox.me', 'test');
|
||||
// test for postWithForm
|
||||
qiniu.rpc.postWithForm('https://up.qbox.me', 'test');
|
||||
// test for postWithoutForm
|
||||
qiniu.rpc.postWithoutForm('https://up.qbox.me');
|
||||
}
|
||||
|
||||
// test for qiniu.fop
|
||||
function testFop() {
|
||||
// test for ImageView
|
||||
const imageView = new qiniu.fop.ImageView(1, 1, 1, 1);
|
||||
imageView.makeRequest('https://up.qbox.me');
|
||||
// test for ImageInfo
|
||||
const imageInfo = new qiniu.fop.ImageInfo();
|
||||
imageInfo.makeRequest('https://up.qbox.me');
|
||||
// test for Exif
|
||||
const exif = new qiniu.fop.Exif();
|
||||
exif.makeRequest('https://up.qbox.me');
|
||||
// test for fop
|
||||
qiniu.fop.pfop('test', 'test', 'test');
|
||||
}
|
||||
|
||||
// test for qiniu.rs
|
||||
function testRs() {
|
||||
// test for Client
|
||||
const client = new qiniu.rs.Client();
|
||||
// test for Client.stat
|
||||
client.stat('test', 'test', (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.remove
|
||||
client.remove('test', 'test', (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.move
|
||||
client.move('test-src', 'test-src', 'test-dest', 'test-dest', (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.forceMove
|
||||
client.forceMove('test-src', 'test-src', 'test-dest', 'test-dest', true, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.copy
|
||||
client.copy('test-src', 'test-src', 'test-dest', 'test-dest', (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.forceCopy
|
||||
client.forceCopy('test-src', 'test-src', 'test-dest', 'test-dest', true, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.fetch
|
||||
client.fetch('https://up.qbox.me', 'test', 'test', (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.batchStat
|
||||
client.batchStat(['data'], (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.batchDelete
|
||||
client.batchDelete(['data'], (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.batchMove
|
||||
client.batchMove(['data'], (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.forceBatchMove
|
||||
client.forceBatchMove(['data'], true, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.batchCopy
|
||||
client.batchCopy(['data'], (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Client.forceBatchMove
|
||||
client.forceBatchCopy(['data'], true, (e?: any, result?: any, res?: any) => {
|
||||
});
|
||||
// test for Entry
|
||||
const entry = new qiniu.rs.Entry('xx', 1, 1);
|
||||
// test for EntryPath
|
||||
const entryPath = new qiniu.rs.EntryPath('test', 'test');
|
||||
entryPath.encode();
|
||||
entryPath.toStr('x');
|
||||
// test for EntryPathPair
|
||||
const entryPathPair = new qiniu.rs.EntryPathPair('xxx', 'xxx');
|
||||
entryPathPair.toStr('x', false);
|
||||
// test for BatchItemRet
|
||||
const batchItemRet = new qiniu.rs.BatchItemRet('xx', 0);
|
||||
// test for BatchStatItemRet
|
||||
const batchStatItemRet = new qiniu.rs.BatchStatItemRet('xx', 'xxx', 0);
|
||||
// test for PutPolicy
|
||||
const putPolicy = new qiniu.rs.PutPolicy();
|
||||
putPolicy.token();
|
||||
putPolicy.getFlags();
|
||||
// test for PutPolicy2
|
||||
const putPolicy2 = new qiniu.rs.PutPolicy2({
|
||||
scope: 'xxx'
|
||||
});
|
||||
putPolicy2.token();
|
||||
putPolicy2.getFlags();
|
||||
// test for GetPolicy
|
||||
const getPolicy = new qiniu.rs.GetPolicy(10);
|
||||
getPolicy.makeRequest('https://up.qbox.me');
|
||||
// test for makeBaseUrl
|
||||
qiniu.rs.makeBaseUrl('up.qbox.me', 'test');
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"qiniu-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user