@kravc/dos 1.10.2 → 1.10.4
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
package/src/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare type Context = Record<string, any>;
|
|
|
4
4
|
export declare type QueryMap = Record<string, any>;
|
|
5
5
|
export declare type CreateMutationMap = Record<string, any>;
|
|
6
6
|
export declare type UpdateMutationMap = Record<string, any>;
|
|
7
|
+
export declare type AttributesMap = Record<string, any>;
|
|
7
8
|
|
|
8
9
|
export declare interface IndexOptions {
|
|
9
10
|
sort?: SortOrder;
|
|
@@ -29,6 +30,10 @@ export declare class Document<T> {
|
|
|
29
30
|
static get idKeyPrefix(): string;
|
|
30
31
|
static get documentName(): string;
|
|
31
32
|
|
|
33
|
+
static _read(query: QueryMap): Promise<AttributesMap>;
|
|
34
|
+
static _create(attributes: AttributesMap): Promise<Boolean>;
|
|
35
|
+
static _update(query: QueryMap, mutation: UpdateMutationMap): Promise<AttributesMap>;
|
|
36
|
+
|
|
32
37
|
static getPartition(
|
|
33
38
|
context: Context,
|
|
34
39
|
parameters: Record<string, any>
|
|
@@ -45,6 +50,16 @@ export declare class Document<T> {
|
|
|
45
50
|
lastEvaluatedKey: string;
|
|
46
51
|
}>;
|
|
47
52
|
|
|
53
|
+
static indexAll<T, D extends Document<T> = Document<T>>(
|
|
54
|
+
this: DocumentConstructor<T, D>,
|
|
55
|
+
context: Context,
|
|
56
|
+
query?: QueryMap,
|
|
57
|
+
options?: IndexOptions,
|
|
58
|
+
): Promise<{
|
|
59
|
+
count: number;
|
|
60
|
+
objects: D[];
|
|
61
|
+
}>;
|
|
62
|
+
|
|
48
63
|
static read<T, D extends Document<T> = Document<T>>(
|
|
49
64
|
this: DocumentConstructor<T, D>,
|
|
50
65
|
context: Context,
|