@polygonlabs/servercore 1.0.0-dev.42 → 1.0.0-dev.43
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, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './types/database.js';
|
8
|
+
export { AddDocumentsParams, ConditionalUpdateDocumentsParams, GetCollectionGroupParams, GetDocumentParams, GetDocumentsParams, IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, UpdateDocumentsParams, 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,14 +1,14 @@
|
|
1
|
-
import {
|
1
|
+
import { AddDocumentsParams, UpdateDocumentsParams, ConditionalUpdateDocumentsParams, GetDocumentsParams, GetDocumentParams, GetCollectionGroupParams } from '../types/database.js';
|
2
2
|
|
3
3
|
interface Database {
|
4
4
|
connect(): Promise<void>;
|
5
5
|
disconnect(): Promise<void>;
|
6
|
-
addDocuments(
|
7
|
-
updateDocuments(
|
8
|
-
conditionalUpdateDocuments(
|
9
|
-
getDocuments(
|
10
|
-
getDocument(
|
11
|
-
getCollectionGroup(
|
6
|
+
addDocuments(params: AddDocumentsParams): Promise<void>;
|
7
|
+
updateDocuments(params: UpdateDocumentsParams): Promise<void>;
|
8
|
+
conditionalUpdateDocuments(params: ConditionalUpdateDocumentsParams): Promise<void>;
|
9
|
+
getDocuments(params: GetDocumentsParams): Promise<any[]>;
|
10
|
+
getDocument(params: GetDocumentParams): Promise<any | null>;
|
11
|
+
getCollectionGroup(params: GetCollectionGroupParams): Promise<any | null>;
|
12
12
|
}
|
13
13
|
|
14
14
|
export type { Database };
|
package/dist/types/database.d.ts
CHANGED
@@ -17,5 +17,41 @@ interface IDocumentConditionalModifications {
|
|
17
17
|
interface IQueryOrFilterParams {
|
18
18
|
or: IQueryFilterOperationParams[];
|
19
19
|
}
|
20
|
+
interface AddDocumentsParams {
|
21
|
+
collectionPaths: string[] | string;
|
22
|
+
docDatas: any[];
|
23
|
+
docIds?: string[];
|
24
|
+
}
|
25
|
+
interface UpdateDocumentsParams {
|
26
|
+
collectionPaths: string[] | string;
|
27
|
+
docDatas: any[];
|
28
|
+
docIds: string[];
|
29
|
+
}
|
30
|
+
interface ConditionalUpdateDocumentsParams {
|
31
|
+
collectionPaths: string[] | string;
|
32
|
+
docDatas: any[];
|
33
|
+
docIds: string[];
|
34
|
+
conditions: IQueryFilterOperationParams[];
|
35
|
+
conditionModifications: IDocumentConditionalModifications[];
|
36
|
+
}
|
37
|
+
interface GetDocumentsParams {
|
38
|
+
collectionPath: string;
|
39
|
+
filter?: IQueryFilterOperationParams[];
|
40
|
+
limit?: number;
|
41
|
+
order?: IQueryOrderOperationParams[];
|
42
|
+
startAfterCursor?: string | number;
|
43
|
+
selectFields?: string[];
|
44
|
+
orFilters?: IQueryOrFilterParams[];
|
45
|
+
offset?: number;
|
46
|
+
}
|
47
|
+
interface GetDocumentParams {
|
48
|
+
collectionId: string;
|
49
|
+
docId: string;
|
50
|
+
}
|
51
|
+
interface GetCollectionGroupParams {
|
52
|
+
groupId: string;
|
53
|
+
filter?: IQueryFilterOperationParams[];
|
54
|
+
orFilters?: IQueryOrFilterParams[];
|
55
|
+
}
|
20
56
|
|
21
|
-
export type { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp };
|
57
|
+
export type { AddDocumentsParams, ConditionalUpdateDocumentsParams, GetCollectionGroupParams, GetDocumentParams, GetDocumentsParams, IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, UpdateDocumentsParams, WhereFilterOp };
|
package/dist/types/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export { ILoggerConfig } from './logger_config.js';
|
2
|
-
export { IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, WhereFilterOp } from './database.js';
|
2
|
+
export { AddDocumentsParams, ConditionalUpdateDocumentsParams, GetCollectionGroupParams, GetDocumentParams, GetDocumentsParams, IDocumentConditionalModifications, IQueryFilterOperationParams, IQueryOrFilterParams, IQueryOrderOperationParams, OrderByDirection, UpdateDocumentsParams, 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.43",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -16,7 +16,8 @@
|
|
16
16
|
"scripts": {
|
17
17
|
"tests": "echo 'Hello unit tests'",
|
18
18
|
"tests:integration": "echo 'Hello integration tests'",
|
19
|
-
"build": "tsup"
|
19
|
+
"build": "tsup",
|
20
|
+
"typecheck": "tsc --noEmit"
|
20
21
|
},
|
21
22
|
"files": [
|
22
23
|
"./dist/**",
|
@@ -35,5 +36,5 @@
|
|
35
36
|
"winston-transport-sentry-node": "^3.0.0",
|
36
37
|
"zod": "^3.24.2"
|
37
38
|
},
|
38
|
-
"gitHead": "
|
39
|
+
"gitHead": "4d657bd396c2ba780a8837423fd2c8957c0d9b77"
|
39
40
|
}
|