Blame view

lib/_services/request.service.d.ts 6.8 KB
75f29219   Anan Sangthongtum   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { Router } from '@angular/router';
import { CustomStoreOptions } from '../model/custom-store-options';
import { AppConfigService } from '../app-config/app-config.service';
import { Common } from './common.service';
import { B2bService } from './b2b.service';
import { ModalSpellCheckComponent } from '../modal-spell-check/modal-spell-check.component';
import { HttpClient } from '@angular/common/http';
export declare class Request {
    private appConfigService;
    httpClient: HttpClient;
    http: Http;
    private router;
    private common;
    private b2bService;
    config: any;
    api: any;
    system_id: any;
    constructor(appConfigService: AppConfigService, httpClient: HttpClient, http: Http, router: Router, common: Common, b2bService: B2bService);
    /**
     * fn. get data สำหรับดึงข้อมูลสำหรับ Datagrid เท่านั้น
     * @param customStoreOptions โยนค่าต่าง ๆ มาในนี้
     */
    getCustomStore(customStoreOptions: CustomStoreOptions): Promise<any[] | {
        data: any[];
        totalCount: number;
    } | {
        data: any[];
        totalCount: number;
    }>;
    /**
     * fn. post data สำหรับดึงข้อมูลสำหรับ Datagrid เท่านั้น
     * @param customStoreOptions โยนค่าต่าง ๆ มาในนี้
     */
    postCustomStore(customStoreOptions: CustomStoreOptions): Promise<any[] | {
        data: any[];
        totalCount: number;
    } | {
        data: any[];
        totalCount: number;
    }>;
    /**
     * fn. post data สำหรับดึงข้อมูลสำหรับ Datagrid เท่านั้น
     * @param customStoreOptions โยนค่าต่าง ๆ มาในนี้
     */
    postCustomStore31(customStoreOptions: CustomStoreOptions): Promise<any[] | {
        data: any[];
        totalCount: number;
    } | {
        data: any[];
        totalCount: number;
    }>;
    /**
     * ถ้า getCustomStore แล้ว error กรณี loadMode = 'processed'
     * @param error
     */
    fnHandleErrorProcessedMode(error: any): {
        data: any[];
        totalCount: number;
    };
    /**
     * ถ้า getCustomStore แล้ว error กรณี loadMode = 'raw'
     * @param error
     */
    fnHandleErrorRawMode(error: any): any[];
    /**
     * fn. get data สำหรับดึงข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    get(url: any, data?: any): Promise<any[]>;
    /**
     * fn. get data สำหรับดึงข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    get31(url: any, data?: any): Promise<any[]>;
    /**
     * fn. get data สำหรับดึงข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    getCustom(url: any, headers?: any): Promise<any[]>;
    /**
     * fn. get data สำหรับดึงข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    getRawResponse(url: any, headers?: any): Promise<any>;
    /**
     * fn. delete data สำหรับลบข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    delete(url: any, data?: any): Promise<any>;
    /**
     * fn. post data สำหรับสร้างข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    post(url: any, data: any): Promise<any>;
    /**
     * fn. post data สำหรับสร้างข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    post31(url: any, data: any): Promise<any>;
    /**
     * fn. post data สำหรับสร้างข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    post14(url: any, data: any): Promise<any>;
    /**
     * fn. post data สำหรับสร้างข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    postCustom(url: any, data: any, headers?: any): Promise<any>;
    /**
     * fn. put data สำหรับอัพเดตข้อมูลทั่วไป
     * @param url ex /test
     * @param data ค่าต่างที่ต้องการแนบไปกับ API
     */
    put(url: any, data: any): Promise<any>;
    /**
     * ถ้า getCustomStore แล้ว success กรณี loadMode = 'processed'
     * @param resData
     */
    fnHandleResponseProcessedMode(resData: any): {
        data: any[];
        totalCount: number;
    };
    /**
     * ถ้า getCustomStore แล้ว success กรณี loadMode = 'raw'
     * @param resData
     */
    fnHandleResponseRawMode(resData: any): any[];
    fnHandleResponse(resData: any): any[];
    /**
     * fn ดึงข้อมูลเพื่อใช้ใน Dropdown List
     * @param systemId เลขรหัสระบบที่ต้องการดึง
     * @param dropDownType ประเภทข้อมูล dropdown ที่ต้องการดึง
     */
    getDropDown(systemId: number, dropDownType: String, code?: String): Promise<any>;
    getDepartment(parentId?: number): Promise<any>;
    getExtDepartment(): Promise<any>;
    getCategory(system_id: any): Promise<any[]>;
    getStepName(category_id: any): Promise<any[]>;
    getAttachment(url: any): Promise<any>;
    postAttachment(url: any, data: any): Promise<any>;
    getUserLevel(): Promise<any>;
    multipleDeleteMain(table: any, idList: any): Promise<any>;
    getAttachmentLinkToken(url: any): Promise<string>;
    checkSpell(data: any, fieldList: any, modal: ModalSpellCheckComponent): Promise<boolean>;
    getQualification(url: any, headers?: any): Promise<any>;
    verifyUserName(): Promise<any>;
    utoa(str: any): string;
    downloadImgToBase64(api: any): Promise<{}>;
    downloadView(api: any): Promise<void>;
    download(api: any): Promise<void>;
}