UNPKG

@shko.online/componentframework-mock

Version:

Mocking library to help with testing PowerApps Component Framework Components

38 lines (37 loc) 1.46 kB
/// <reference types="powerapps-component-framework" /> import type { SinonStub } from 'sinon'; import { MetadataDB } from '../ComponentFramework-Mock-Generator'; import { FormattingMock } from './Formatting.mock'; import { ShkoOnline } from '../ShkoOnline'; export declare class WebApiMock implements ComponentFramework.WebApi { _Delay: number; _ConvertRowToOData: SinonStub<[ /*row*/ any, /*entityMetadata*/ ShkoOnline.EntityMetadata ], void>; createRecord: SinonStub<[ /*entityType*/ string, /*data*/ ComponentFramework.WebApi.Entity ], Promise<ComponentFramework.LookupValue>>; deleteRecord: SinonStub<[ /*entityType*/ string, /*id*/ string ], Promise<ComponentFramework.LookupValue>>; updateRecord: SinonStub<[ /*entityType*/ string, /*id*/ string, /*data*/ ComponentFramework.WebApi.Entity ], Promise<ComponentFramework.LookupValue>>; retrieveMultipleRecords: SinonStub<[ /*entityType*/ string, /*options*/ string, /*maxPageSize*/ number ], Promise<ComponentFramework.WebApi.RetrieveMultipleResponse>>; retrieveRecord: SinonStub<[ /*entityType*/ string, /*id*/ string, /*options*/ string ], Promise<ComponentFramework.WebApi.Entity>>; constructor(db: MetadataDB, formatting: FormattingMock); } //# sourceMappingURL=WebApi.mock.d.ts.map