diff --git a/src/services/BaseEntityService.ts b/src/services/BaseEntityService.ts index 6859463..df65396 100644 --- a/src/services/BaseEntityService.ts +++ b/src/services/BaseEntityService.ts @@ -461,7 +461,7 @@ export default abstract class BaseEntityService extends TaskManager { // }) as Promise; } - run(m: IModel, method: keyof TA, argEntity: Partial, { + buildRunUrl(m: IModel, method: keyof TA, argEntity: Partial, { args = void 0 as any[], cacheSeconds = 0, cacheVersion = void 0 as any @@ -482,7 +482,17 @@ export default abstract class BaseEntityService extends TaskManager { if (cacheVersion) { usp.append("cv", cacheVersion); } - return FetchBuilder.get(`${this.url}run/${$type}/${method as any}?${usp.toString()}`).jsonPostProcessor(this.resultConverter); + return `${this.url}run/${$type}/${method as any}?${usp.toString()}`; + } + + run(m: IModel, method: keyof TA, argEntity: Partial, { + args = void 0 as any[], + cacheSeconds = 0, + cacheVersion = void 0 as any + } = { + }) { + const url = this.buildRunUrl(m, method, argEntity, { args, cacheSeconds, cacheVersion }); + return FetchBuilder.get(url).jsonPostProcessor(this.resultConverter); }