OSDN Git Service

Modified: Upload, Command execution
[eos/zephyr.git] / front-end / app / scripts / declares.ts
1 namespace app.declares {
2
3     export class CommandInfo{
4         name: string;
5
6         constructor(name: string) {
7             this.name = name;
8         }
9     }
10
11     interface IArg {
12         argIndex: number;
13         argName: string;
14         argType: string;
15         attribute: string;
16         formType: string;
17         initialValue;
18         input;
19     }        
20
21     export interface IOption {
22         option: string;
23         fullOption: string;
24         optionName: string;
25         optionProperties: boolean;
26         optionNumber: number;
27         arg: IArg[];
28     }
29
30     export interface IFileInfo {
31         fileId: string,
32         name: string,
33         parentId: string,
34         fileType: string,
35         createdAt: string,
36         updatedAt: string
37     }
38
39     export interface IDirectoryInfo extends IFileInfo {
40         fileId: string,
41         name: string,
42         parentId: string,
43         fileType: string,
44         createdAt: string,
45         updatedAt: string,
46         path: string
47     }
48
49     export interface IResponse extends ng.resource.IResource<IResponse> {
50         status: string,
51         message: string,
52         info: any
53     }
54
55     export interface IResponseOption extends IResponse {
56         status: string,
57         message: string,
58         info: IOption[]
59     }
60
61     export interface IResponseFileInfo extends IResponse {
62         status: string,
63         message: string,
64         info: IFileInfo[]
65     }
66
67     export interface IResponseResource extends ng.resource.IResourceClass<IResponse> {
68         //customAction(): any
69         execute(): any
70     }
71
72 }
73 declare var io : {
74     connect(): Socket;
75 }
76 interface Socket {
77     on(event: string, callback: (data: any) => void );
78     emit(event: string, data: any);
79 }
80