@interncom/diplomatic 0.0.48 → 0.0.49
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/entityDB.d.ts +10 -5
- package/dist/shared/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/entityDB.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { type DBSchema } from
|
|
2
|
-
import { Applier } from
|
|
3
|
-
import {
|
|
1
|
+
import { type DBSchema } from "idb";
|
|
2
|
+
import { Applier } from "./types";
|
|
3
|
+
import { GroupID } from "./shared/types";
|
|
4
|
+
import { StateManager } from "./state";
|
|
4
5
|
export declare const entityTableName = "entities";
|
|
5
|
-
export declare const typeIndexName = "
|
|
6
|
+
export declare const typeIndexName = "entity_type_created_at";
|
|
7
|
+
export declare const typeGroupIndexName = "entity_type_group_id";
|
|
6
8
|
export interface IEntity<T> {
|
|
7
9
|
eid: Uint8Array;
|
|
10
|
+
gid?: GroupID;
|
|
11
|
+
pid?: Uint8Array;
|
|
8
12
|
type: string;
|
|
9
13
|
updatedAt: Date;
|
|
10
14
|
createdAt: Date;
|
|
@@ -15,7 +19,8 @@ interface IEntityDB extends DBSchema {
|
|
|
15
19
|
key: Uint8Array;
|
|
16
20
|
value: IEntity<unknown>;
|
|
17
21
|
indexes: {
|
|
18
|
-
"
|
|
22
|
+
"entity_type_created_at": [string, Date];
|
|
23
|
+
"entity_type_group_id": [string, GroupID];
|
|
19
24
|
};
|
|
20
25
|
};
|
|
21
26
|
}
|
package/dist/shared/types.d.ts
CHANGED