magicrealmsshared 0.6.5 → 0.6.6
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/communication/ws.d.ts +11 -4
- package/package.json +1 -1
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { GameCharacter } from "../types/charcter";
|
|
2
2
|
import { Auth_Token, PlayerClientData, Well } from "../types/types";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
type ResponseSuccess = {
|
|
5
|
+
code: 0;
|
|
6
|
+
};
|
|
7
|
+
type ResponseFailure = {
|
|
8
|
+
code: number;
|
|
9
|
+
msg: string;
|
|
10
|
+
};
|
|
11
|
+
export type Response = ResponseSuccess | ResponseFailure;
|
|
4
12
|
export declare const GeoJSONPointSchema: z.ZodObject<{
|
|
5
13
|
type: z.ZodLiteral<"Point">;
|
|
6
14
|
coordinates: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
|
|
@@ -28,8 +36,7 @@ export declare const LOGIN_DATA_SCHEME: z.ZodObject<{
|
|
|
28
36
|
}>;
|
|
29
37
|
export type LOGIN_DATA = z.infer<typeof LOGIN_DATA_SCHEME>;
|
|
30
38
|
export declare const LOGIN_RESPONSE_COMMAND = "NIGOL";
|
|
31
|
-
export type LOGIN_RESPONSE_DATA<T> = {
|
|
32
|
-
code: number;
|
|
39
|
+
export type LOGIN_RESPONSE_DATA<T> = Response & {
|
|
33
40
|
characterData?: GameCharacter<string, number>;
|
|
34
41
|
playerData?: PlayerClientData;
|
|
35
42
|
authToken?: Auth_Token<number, T>;
|
|
@@ -104,7 +111,7 @@ export declare const CHARACTER_CREATE_SCHEME: z.ZodObject<{
|
|
|
104
111
|
name: string;
|
|
105
112
|
}>;
|
|
106
113
|
export type CHARACTER_CREATE_DATA = z.infer<typeof CHARACTER_CREATE_SCHEME>;
|
|
107
|
-
export type CHARACTER_CREATE_RESPONSE = {
|
|
108
|
-
success: boolean;
|
|
114
|
+
export type CHARACTER_CREATE_RESPONSE = Response & {
|
|
109
115
|
character?: GameCharacter<string, number>;
|
|
110
116
|
};
|
|
117
|
+
export {};
|