ferngully-aurelia-tools
Version:
Ferngully Tools for Aurelia
23 lines (22 loc) • 1.23 kB
TypeScript
import { Ajax, IAjaxResult } from "../ajax";
export declare class FormSchemaCrudService<TInstance> implements IFormSchemaCrudService<TInstance> {
private ajax;
constructor(ajax: Ajax);
webServiceName: string;
getAll(init?: RequestInit): Promise<Array<TInstance> | undefined>;
get(id: number | string): Promise<TInstance | undefined>;
delete(id: number | string): Promise<IAjaxResult<void>>;
create(): Promise<TInstance | undefined>;
insert(instance: TInstance): Promise<IAjaxResult<TInstance>>;
update(id: string | number, instance: any, propertyName: string, newValue: any, oldValue: any): Promise<IAjaxResult<TInstance>>;
}
export { IAjaxResult } from "../ajax";
export interface IFormSchemaCrudService<TInstance> {
webServiceName: string;
getAll(init?: RequestInit): Promise<Array<TInstance> | undefined>;
get(id: number | string): Promise<TInstance | undefined>;
delete(id: number | string): Promise<IAjaxResult<void>>;
create(): Promise<TInstance | undefined>;
insert(instance: any): Promise<IAjaxResult<any>>;
update(id: string | number, instance: any, propertyName: string, newValue: any, oldValue: any): Promise<IAjaxResult<TInstance>>;
}