export class WebApiOnlineMock implements Xrm . WebApiOnline { private offline : Xrm . WebApiOffline ; private notImplementedError = "WebApi methods not implemented. Consider faking API calls using a tool such as Sinon.JS" ; constructor ( offlineCapabilities ) { this . offline = offlineCapabilities ; } public execute ( request ) { throw new Error ( this . notImplementedError ) ; } public executeMultiple ( request ) { throw new Error ( this . notImplementedError ) ; } public createRecord ( entityLogicalName , record ) { return this . offline . createRecord ( entityLogicalName , record ) ; } public deleteRecord ( entityLogicalName , id ) { return this . offline . deleteRecord ( entityLogicalName , id ) ; } public retrieveRecord ( entityLogicalName , id , options ) { return this . offline . retrieveRecord ( entityLogicalName , id , options ) ; } public retrieveMultipleRecords ( entityLogicalName , options ? , maxPageSize ? ) { return this . offline . retrieveMultipleRecords ( entityLogicalName , options , maxPageSize ) ; } public updateRecord ( entityLogicalName , id , data ) { return this . offline . updateRecord ( entityLogicalName , id , data ) ; } }