magicrealmsshared 0.1.1 → 0.1.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/types/types.ts CHANGED
@@ -2,11 +2,11 @@ import { ObjectId } from "mongodb"
2
2
 
3
3
 
4
4
  //#region Base Types
5
- type ObjectWithId<T> = {
5
+ export type ObjectWithId<T> = {
6
6
  _id: T
7
7
  }
8
8
 
9
- type WorldObject<T> = ObjectWithId<T> & {
9
+ export type WorldObject<T> = ObjectWithId<T> & {
10
10
  pos: GeoJSON.Point;
11
11
  }
12
12
  //#endregion
@@ -1,2 +1,12 @@
1
+ import { ObjectId } from "mongodb";
2
+ import { Well } from "./types/types";
3
+
1
4
  export const AUTH = "AUTH";
2
5
  export const AUTH_ACK = "AUTH_ACK";
6
+
7
+ export const DATA_UPDATE_COMMAND = "DATA_UPDATE";
8
+ export type DATA_UPDATE_CLIENT = DATA_UPDATE<string>;
9
+ export type DATA_UPDATE_SERVER = DATA_UPDATE<ObjectId>;
10
+ type DATA_UPDATE<T> = {
11
+ wells: Well<T>,
12
+ }