@angular-jz/jz
Version:
jim jz
35 lines (34 loc) • 1.47 kB
TypeScript
import { Injector } from '@angular/core';
import { Headers, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { OAuthService } from 'angular-oauth2-oidc';
import { Observable } from 'rxjs/Observable';
import { HttpClient } from '@angular/common/http';
export declare class JZPageServiceConfig {
appCode: string;
itemType: string;
}
export declare class JZPageService {
config: JZPageServiceConfig;
http: HttpClient;
oAuthService: OAuthService;
appServiceUrl: string;
headers: Headers;
requestOptions: RequestOptions;
fileHeaders: Headers;
fileRequestOptions: RequestOptions;
constructor(injector: Injector, config: JZPageServiceConfig);
handleError(error: any): Promise<any>;
post(url: string, data: any): Promise<any>;
postObservable(url: string, data: any): Observable<any>;
buildUrl(methodName: string): string;
loadPage(input: any, url?: string): Promise<any>;
loadItemListPage(input: any, url?: string): Promise<any>;
searchList(input: any, url?: string): Promise<any>;
loadViewItemPage(input: any, url?: string): Promise<any>;
deleteItem(input: any, url?: string): Promise<any>;
loadCreateItemPage(input: any, url?: string): Promise<any>;
createItem(input: any, url?: string): Promise<any>;
loadEditItemPage(input: any, url?: string): Promise<any>;
editItem(input: any, url?: string): Promise<any>;
}