onecore 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onecore",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "onecore",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./src/index.ts",
package/src/index.ts CHANGED
@@ -37,9 +37,6 @@ export * from './repository/SearchRepository';
37
37
  export * from './repository/ViewSearchRepository';
38
38
  export * from './repository/GenericSearchRepository';
39
39
 
40
- import {GenericSearchService} from './service/GenericSearchService';
41
- export {GenericSearchService as Service};
42
-
43
40
  export * from './service/ViewService';
44
41
  export * from './service/GenericService';
45
42
  export * from './service/SearchService';
@@ -66,10 +63,14 @@ export * from './video';
66
63
  export * from './health';
67
64
  export * from './logger';
68
65
 
66
+ export type Log = (msg: string) => void;
67
+ export type LogFunc = Log;
68
+
69
69
  import { Attributes } from './metadata';
70
70
  import { Filter, SearchResult } from './model';
71
71
  // import { GenericRepository } from './repository/GenericRepository';
72
72
  import { ViewRepository } from './repository/ViewRepository';
73
+ import { GenericSearchService } from './service/GenericSearchService';
73
74
  // import { GenericSearchService } from './service/GenericSearchService';
74
75
  import { GenericService } from './service/GenericService';
75
76
  import { ViewService } from './service/ViewService';
package/src/model.ts CHANGED
@@ -117,6 +117,7 @@ export interface ResultInfo<T> {
117
117
  value?: T;
118
118
  message?: string;
119
119
  }
120
+ export type Result<T> = number | ResultInfo<T>;
120
121
 
121
122
  export interface DiffModel<T, ID> {
122
123
  id?: ID;
@@ -1,7 +1,10 @@
1
- import {Filter} from '../model';
1
+ import {Filter, Result} from '../model';
2
2
  import {GenericService} from './GenericService';
3
3
  import {SearchService} from './SearchService';
4
4
 
5
5
  export interface GenericSearchService<T, ID, R, F extends Filter>
6
6
  extends GenericService<T, ID, R>, SearchService<T, F> {
7
7
  }
8
+ export interface Service<T, ID, F extends Filter> extends GenericSearchService<T, ID, Result<T>, F> {
9
+
10
+ }