vpn.email.client
Version:
Vpn.Email client IMAP core
211 lines (189 loc) • 6.85 kB
TypeScript
/*
interface Gcloud {
}
import * as http from 'http'
interface Query {
limit: ( n: number ) => Query;
order: ( order: string ) => Query;
start: ( token: number ) => Query;
filter: ( filter: string, compare: any ) => Query;
select: ( select: Array < string >) => Query;
hasAncestor: ( key: key ) => Query;
}
interface keyOption {
kind: string;
id: any;
}
interface googleErr extends Error {
code: number;
response: http.ServerResponse;
}
interface entities {
key: key;
data: any;
}
interface dataSet {
createQuery ( kind: Array<string> ): Query;
createQuery ( namespace: string, kind: string[] ): Query;
runQuery ( q: Query, fb: ( err: googleErr, entities:entities[], cursor ) => void ): void;
runQuery ( object: runQueryOption ): runQueryCallBack;
key ( option: Array < string > ): key;
key ( kind: string ): key;
key ( opt: any ): key;
save ( key: Array < key >, fb: ( err: googleErr, data ) => void ): void;
get ( path: key, fb: ( err: googleErr, entity ) => void ):void;
update ( key: key, fb: ( err: googleErr, data ) => void ):void;
}
interface key {
namespace: string;
path: Array < string >;
}
interface runQueryOption{
gqlQuery: {
queryString: string;
}
}
interface runQueryCallBack{
execute: ( cb: ( err, data ) => void ) => void
}
interface datastore {
dataset: ( option: gcloudOption ) => dataSet;
runQuery: ( object: runQueryOption ) => runQueryCallBack;
}
interface pubsub {
}
*/
interface gcloud_callBack {
( err, topic, apiResponse ): void
}
interface gcloud_pubsub_topic_v1_result {
ackId: string;
message: gcloud_pubsub_topic_v1_messageData
}
interface gcloud_pubsub_topic_v1_messageData {
data: string;
messageId: string,
publishTime: String;
attributes: any
}
interface gcloud_pubsub_topic_messageData {
data?: Object
attributes?: Object;
}
interface gcloud_pubsub_Subscription_option {
returnImmediately: boolean;
maxResults: number;
}
interface gcloud_pubsub_Subscription_message {
ackId: string;
id: string;
data: any;
attributes: any;
ack: ( CallBack: ( err: Error, respon ) => void ) => void;
skip: () => void;
}
interface gcloud_pubsub_Subscription {
pull: ( option: gcloud_pubsub_Subscription_option, CallBack: ( err: Error, message: gcloud_pubsub_Subscription_message[] ) => void ) => void
on: ( name: string, CallBack ) => void;
once: ( name: string, CallBack ) => void;
removeListener: (name: string, message: (message:any) => void ) => void
}
interface gcloud_topic {
createTopic: ( topic: string, CallBack: gcloud_callBack ) => void;
publish: ( message: gcloud_pubsub_topic_messageData, CallBack: gcloud_callBack ) => void;
subscription: ( name: string, option?: { interval?: number, autoAck?: boolean } ) => gcloud_pubsub_Subscription;
}
interface gcloud_pubsub {
topic: ( topic: string ) => gcloud_topic
}
interface gcloud_Option {
projectId: string;
keyFilename: string;
}
interface MonitoredResource {
}
interface gcloud_logging_entry {
}
interface gcloud_logging_log {
entry: ( resource: MonitoredResource, logData: any ) => gcloud_logging_entry;
critical: ( entry: gcloud_logging_entry, CallBack: gcloud_callBack ) => void;
error: ( entry: gcloud_logging_entry, CallBack: gcloud_callBack ) => void;
warning: ( entry: gcloud_logging_entry, CallBack: gcloud_callBack ) => void;
info: ( entry: gcloud_logging_entry, CallBack: gcloud_callBack ) => void;
debug: ( entry: gcloud_logging_entry, CallBack: gcloud_callBack ) => void;
delete: ( CallBack: gcloud_callBack ) => void;
getEntries: ( CallBack: gcloud_callBack ) => void;
}
interface gcloud_logging {
log: ( logName: string ) => gcloud_logging_log
}
interface gcloud_datastore_keyOption {
namespace?: string;
path: string[];
name?: string;
parent?: gcloud_datastore_keyOption;
kind?: string
}
interface gcloud_datastore_entities {
key: gcloud_datastore_keyOption
data: any
}
interface gcloud_datastore_CallBack {
( err: Error, entities, info ): void
}
interface gcloud_datastore_call_option {
}
interface gcloud_datastore_query_event {
on: ( event: string, CallBack: gcloud_datastore_CallBack ) => gcloud_datastore_query_event;
}
interface gcloud_datastore_transaction {
run: ( CallBack: ( err: Error, transaction: gcloud_datastore_transaction ) => void ) => void
get: ( keys: gcloud_datastore_keyOption, option?: gcloud_datastore_call_option, CallBack?: gcloud_datastore_CallBack ) => void
save: ( entities: gcloud_datastore_entities | gcloud_datastore_entities[] ) => void;
update: ( entities: gcloud_datastore_entities|gcloud_datastore_entities[] ) => void;
upsert: ( entities: gcloud_datastore_entities|gcloud_datastore_entities[] ) => void;
commit: ( CallBack: gcloud_datastore_CallBack ) => void;
runQuery: ( gcloud_datastore_query, CallBack?: gcloud_datastore_CallBack ) => void;
delete: ( keys: gcloud_datastore_keyOption ) => void;
}
interface gcloud_datastore_query {
hasAncestor: ( key: gcloud_datastore_keyOption ) => gcloud_datastore_query;
filter: ( property: string, operator?: any, value?: any ) => gcloud_datastore_query;
limit: ( n: number ) => gcloud_datastore_query;
select: ( ...args ) => gcloud_datastore_query;
run: ( options?: string, CallBack?: gcloud_datastore_CallBack ) => gcloud_datastore_query_event;
order: ( name: string, option?: any ) => gcloud_datastore_query;
}
interface gcloud_datastore {
key: ( options: gcloud_datastore_keyOption| string ) => gcloud_datastore_keyOption;
save: ( entities: gcloud_datastore_entities, CallBack: gcloud_datastore_CallBack ) => void
get: ( keys: gcloud_datastore_keyOption | gcloud_datastore_keyOption[], option?: gcloud_datastore_call_option, CallBack?: gcloud_datastore_CallBack ) => void
createQuery: ( ...args ) => gcloud_datastore_query;
transaction: () => gcloud_datastore_transaction;
}
interface gcloud_compute_vm {
delete: ( CallBack: ( err, vm, operation, apiResponse ) => void ) => void
getTags: ( CallBack: ( err, vm, operation, apiResponse ) => void ) => void
setMetadata: ( metaData: Object, CallBack: ( err, vm, operation, apiResponse ) => void ) => void
getMetadata: ( CallBack: ( err, metadata, apiResponse ) => void ) => void
}
interface gcloud_compute_zone {
createVM: ( name: string, option: any, CallBack: ( err, vm, operation, apiResponse ) => void ) => void
vm: ( name: string ) => gcloud_compute_vm;
}
interface gcloud_compute {
zone:( zoneName: string ) => gcloud_compute_zone;
}
interface _Gcloud {
logging: ( gcloudOption?: gcloud_Option ) => gcloud_logging;
pubsub: ( gcloudOption?: gcloud_Option ) => gcloud_pubsub;
datastore: ( gcloudOption?: gcloud_Option ) => gcloud_datastore;
compute: ( gcloudOption?: gcloud_Option ) => gcloud_compute;
}
interface Gcloud {
( gcloudOption?: gcloud_Option ): _Gcloud
}
declare let ex: Gcloud
declare module "google-cloud" {
export = ex
}