@smallstack/common
Advanced tools
import { APIPaginationResult } from "../index"; | ||
import { APIRequestOptions } from "./APIRequestOptions"; | ||
import { Collection } from "./Collection"; | ||
import { MongoDBCursor } from "./MongoDBCursor"; | ||
@@ -8,3 +7,3 @@ import { QueryObject } from "./QueryObject"; | ||
import { SmallstackModel } from "./SmallstackModel"; | ||
import { TypeServiceQuery } from "./Type"; | ||
import { Type, TypeServiceQuery } from "./Type"; | ||
export declare class DefaultQueryObject<ModelClass extends SmallstackModel> implements QueryObject<ModelClass> { | ||
@@ -16,10 +15,9 @@ private selector; | ||
private sorting; | ||
private collection; | ||
private type; | ||
private ModelConstructor; | ||
private totalCount; | ||
private typesystem; | ||
private cursorResolver; | ||
private configurationService; | ||
private dataBridge; | ||
create(selector: any, serviceQuery: TypeServiceQuery, queryOptions: QueryOptions, parameters: any, sorting: any, collection: Collection<ModelClass>): QueryObject<ModelClass>; | ||
create(type: Type, selector: any, serviceQuery: TypeServiceQuery, queryOptions: QueryOptions, parameters: any, sorting: any): QueryObject<ModelClass>; | ||
getSelector(): any; | ||
@@ -26,0 +24,0 @@ getCursor(): MongoDBCursor<ModelClass>; |
@@ -0,10 +1,9 @@ | ||
import { APIListResponse } from "../api/APIResponses"; | ||
import { APIRequestOptions } from "./APIRequestOptions"; | ||
import { Collection } from "./Collection"; | ||
import { MongoDBCursor } from "./MongoDBCursor"; | ||
import { QueryOptions } from "./QueryOptions"; | ||
import { SmallstackModel } from "./SmallstackModel"; | ||
import { APIListResponse } from "../api/APIResponses"; | ||
import { TypeServiceQuery } from "./Type"; | ||
import { TypeServiceQuery, Type } from "./Type"; | ||
export interface QueryObject<ModelClass extends SmallstackModel> { | ||
create(selector: any, serviceQuery: TypeServiceQuery, queryOptions: QueryOptions, parameters: any, sorting: any, collection: Collection<ModelClass>): QueryObject<ModelClass>; | ||
create(type: Type, selector: any, serviceQuery: TypeServiceQuery, queryOptions: QueryOptions, parameters: any, sorting: any): QueryObject<ModelClass>; | ||
getSelector(): any; | ||
@@ -11,0 +10,0 @@ getCursor(): MongoDBCursor<ModelClass>; |
@@ -1,2 +0,1 @@ | ||
import { Collection } from "./Collection"; | ||
import { QueryObject } from "./QueryObject"; | ||
@@ -7,3 +6,3 @@ import { QueryOptions } from "./QueryOptions"; | ||
export declare class QueryObjectBuilder { | ||
static create<ModelClass extends SmallstackModel>(type: Type, serviceQueryName: string, queryOptions: QueryOptions, parameters: any, sorting: any, collection: Collection<ModelClass>): QueryObject<ModelClass>; | ||
static create<ModelClass extends SmallstackModel>(type: Type, serviceQueryName: string, queryOptions: QueryOptions, parameters: any, sorting: any): QueryObject<ModelClass>; | ||
} |
import { API } from "../api/API"; | ||
import { SmallstackService, Collection } from "../index"; | ||
import { SmallstackModelStatic } from "./SmallstackModel"; | ||
@@ -88,5 +89,6 @@ export interface TypeSecuredMethod { | ||
getGeneratedModelClassName(): string; | ||
getService(): {}; | ||
getService(): SmallstackService<any>; | ||
getCollectionName(): string; | ||
getCollectionClassName(): string; | ||
getCollection(): Collection<any>; | ||
getGeneratedCollectionClassName(): string; | ||
@@ -93,0 +95,0 @@ getModel(): SmallstackModelStatic; |
{ | ||
"name": "@smallstack/common", | ||
"version": "0.7.41", | ||
"version": "0.7.42", | ||
"description": "common functionality for smallstack projects", | ||
@@ -28,3 +28,3 @@ "main": "dist/bundle/smallstack_common.umd.js", | ||
"devDependencies": { | ||
"@smallstack/testing": "^0.1.7", | ||
"@smallstack/testing": "^0.1.9", | ||
"@types/chai": "^4.0.4", | ||
@@ -31,0 +31,0 @@ "@types/mocha": "^2.2.43", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
427237
0.55%87
3.57%2248
1.35%