@polygonlabs/servercore 1.0.0-dev.40 → 1.0.0-dev.42
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/dist/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export { Logger } from './logger/logger.js';
|
|
5
5
|
export { errorCodes } from './constants/error_codes.js';
|
6
6
|
export { httpResposneCodes } from './constants/http_success_codes.js';
|
7
7
|
export { ILoggerConfig } from './types/logger_config.js';
|
8
|
-
export { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './types/database.js';
|
8
|
+
export { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './types/database.js';
|
9
9
|
export { IObserver } from './types/observer.js';
|
10
10
|
export { ChainNativeCurrency, IEventConsumerConfig } from './types/event_consumer_config.js';
|
11
11
|
export { ResponseContext } from './types/response_context.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IQueryFilterOperationParams, IDocumentConditionalModifications, IQueryOrderOperationParams } from '../types/database.js';
|
1
|
+
import { IQueryFilterOperationParams, IDocumentConditionalModifications, IQueryOrderOperationParams, IQueryOrFilterParams } from '../types/database.js';
|
2
2
|
|
3
3
|
interface Database {
|
4
4
|
connect(): Promise<void>;
|
@@ -6,9 +6,9 @@ interface Database {
|
|
6
6
|
addDocuments(collectionPaths: string[] | string, docDatas: any[], docIds?: string[]): Promise<void>;
|
7
7
|
updateDocuments(collectionPaths: string[] | string, docDatas: any[], docIds: string[]): Promise<void>;
|
8
8
|
conditionalUpdateDocuments(collectionPaths: string[] | string, docDatas: any[], docIds: string[], conditions: IQueryFilterOperationParams[], conditionModifications: IDocumentConditionalModifications[]): Promise<void>;
|
9
|
-
getDocuments(collectionPath: string, filter?: IQueryFilterOperationParams[] | undefined, limit?: number | undefined, order?: IQueryOrderOperationParams[] | undefined, startAfterCursor?: string | number | undefined): Promise<any[]>;
|
9
|
+
getDocuments(collectionPath: string, filter?: IQueryFilterOperationParams[] | undefined, limit?: number | undefined, order?: IQueryOrderOperationParams[] | undefined, startAfterCursor?: string | number | undefined, selectFields?: string[], orFilters?: IQueryOrFilterParams[]): Promise<any[]>;
|
10
10
|
getDocument(collectionId: string, docId: string): Promise<any | null>;
|
11
|
-
getCollectionGroup(groupId: string, filter?: IQueryFilterOperationParams[]): Promise<any | null>;
|
11
|
+
getCollectionGroup(groupId: string, filter?: IQueryFilterOperationParams[], orFilters?: IQueryOrFilterParams[]): Promise<any | null>;
|
12
12
|
}
|
13
13
|
|
14
14
|
export type { Database };
|
package/dist/types/database.d.ts
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
type WhereFilterOp = "<" | "<=" | "==" | "!=" | ">=" | ">" | "array-contains" | "in" | "not-in" | "array-contains-any";
|
2
2
|
type OrderByDirection = "desc" | "asc";
|
3
|
+
interface IQueryFilterOperationParams {
|
4
|
+
field: string;
|
5
|
+
operator: WhereFilterOp;
|
6
|
+
value: string | number | boolean | string[] | number[];
|
7
|
+
}
|
3
8
|
interface IQueryOrderOperationParams {
|
4
9
|
field: string;
|
5
10
|
order: OrderByDirection;
|
@@ -9,15 +14,8 @@ interface IDocumentConditionalModifications {
|
|
9
14
|
value: string | number | boolean;
|
10
15
|
defaultValue: string | number | boolean;
|
11
16
|
}
|
12
|
-
interface
|
13
|
-
|
14
|
-
operator: WhereFilterOp;
|
15
|
-
value: string | number | boolean | string[] | number[];
|
16
|
-
}
|
17
|
-
interface IQueryFilterOperationParams {
|
18
|
-
field: string;
|
19
|
-
operator: WhereFilterOp;
|
20
|
-
value: string | number | boolean | string[] | number[];
|
17
|
+
interface IQueryOrFilterParams {
|
18
|
+
or: IQueryFilterOperationParams[];
|
21
19
|
}
|
22
20
|
|
23
|
-
export type { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp };
|
21
|
+
export type { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp };
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { ILoggerConfig } from './logger_config.js';
|
2
|
-
export { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './database.js';
|
2
|
+
export { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './database.js';
|
3
3
|
export { IObserver } from './observer.js';
|
4
4
|
export { ChainNativeCurrency, IEventConsumerConfig } from './event_consumer_config.js';
|
5
5
|
export { ResponseContext } from './response_context.js';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@polygonlabs/servercore",
|
3
|
-
"version": "1.0.0-dev.
|
3
|
+
"version": "1.0.0-dev.42",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"winston-transport-sentry-node": "^3.0.0",
|
36
36
|
"zod": "^3.24.2"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "f1973a2b487ef400f2bd22a269a0b7efc45e8170"
|
39
39
|
}
|