@gpa-gemstone/common-pages
Version:
Common UI pages for GPA products
23 lines (22 loc) • 1.26 kB
TypeScript
import { Gemstone } from "./Gemstone";
export declare class ReadOnlyControllerFunctions<T> {
protected APIPath: string;
constructor(APIPath: string);
GetPageInfo: (filter?: Gemstone.Types.ISearchFilter<T>[], parentID?: string | number) => JQuery.jqXHR<Gemstone.Types.IPageInfo>;
GetOne: (id: string | number) => JQuery.jqXHR<T>;
GetPage: (page: number, sortField?: keyof T, asc?: boolean, parentID?: string | number) => JQuery.jqXHR<T[]>;
/**
* Use with caution as this could be VERY network resource intensive.
*/
GetAll: (sortField: keyof T, asc: boolean, filter?: Gemstone.Types.ISearchFilter<T>[], parentID?: string | number) => JQuery.jqXHR<T[]>;
SearchPage: (page: number, sortField: keyof T, asc: boolean, filter: Gemstone.Types.ISearchFilter<T>[], parentID?: number | string) => JQuery.jqXHR<T[]>;
New: () => JQuery.jqXHR<T>;
GetMaxValue: (fieldName: keyof T) => JQuery.jqXHR<number>;
}
export declare class ReadWriteControllerFunctions<T> extends ReadOnlyControllerFunctions<T> {
constructor(APIPath: string);
Add: (record: T) => JQuery.jqXHR<T>;
Update: (record: T) => JQuery.jqXHR<T>;
Delete: (record: T) => JQuery.jqXHR<T>;
DeleteByID: (id: string | number) => JQuery.jqXHR<T>;
}