magicrealmsshared 0.6.17 → 0.6.18

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.
@@ -1,25 +1,21 @@
1
1
  import { GameCharacter } from "../types/charcter";
2
2
  import { Auth_Token, PlayerClientData, Well } from "../types/types";
3
3
  import { z } from "zod";
4
- export declare const enum ResponseCode {
5
- SUCCESS = 0,
6
- AUTH_INVALID = 1,
7
- PARSING_FAILED = 2,
8
- NOT_ALLOWED = 3,
9
- CREDENTIAL_MISMATCH = 4,
10
- EXISTS = 10,
11
- DOESNT_EXIST = 11,
12
- SERVER_ERROR = 500
13
- }
14
- type ResponseSuccess = {
15
- code: ResponseCode.SUCCESS;
16
- msg?: string;
4
+ export declare const ResponseCode: {
5
+ readonly SUCCESS: 0;
6
+ readonly AUTH_INVALID: 1;
7
+ readonly PARSING_FAILED: 2;
8
+ readonly NOT_ALLOWED: 3;
9
+ readonly CREDENTIAL_MISMATCH: 4;
10
+ readonly EXISTS: 10;
11
+ readonly DOESNT_EXIST: 11;
12
+ readonly SERVER_ERROR: 500;
17
13
  };
18
- type ResponseFailure = {
14
+ export type ResponseCode = typeof ResponseCode[keyof typeof ResponseCode];
15
+ export type Response = {
19
16
  code: ResponseCode;
20
17
  msg?: string;
21
18
  };
22
- export type Response = ResponseSuccess | ResponseFailure;
23
19
  export declare const GeoJSONPointSchema: z.ZodObject<{
24
20
  type: z.ZodLiteral<"Point">;
25
21
  coordinates: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
@@ -152,4 +148,3 @@ export type CHARACTER_CREATE_DATA = z.infer<typeof CHARACTER_CREATE_SCHEME>;
152
148
  export type CHARACTER_CREATE_RESPONSE = Response & {
153
149
  character?: GameCharacter<string, number>;
154
150
  };
155
- export {};
@@ -1,7 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHARACTER_CREATE_SCHEME = exports.CHARACTER_CREATE_COMMAND = exports.DEBUG_SOCKET_INFO_RETRIEVE_SCHEME = exports.DEBUG_SOCKET_INFO_RETRIEVE_COMMAND = exports.ADMIN_WELL_DELETE_SCHEME = exports.ADMIN_WELL_DELETE_COMMAND = exports.ADMIN_WELL_CREATE_SCHEME = exports.ADMIN_WELL_CREATE_COMMAND = exports.POSUPDATE_SCHEME = exports.POSUPDATE_COMMAND = exports.DATA_UPDATE_COMMAND = exports.REGISTER_RESPONSE_COMMAND = exports.REGISTER_DATA_SCHEME = exports.REGISTER_COMMAND = exports.LOGOUT_COMMAND = exports.LOGIN_RESPONSE_COMMAND = exports.LOGIN_DATA_SCHEME = exports.LOGIN_COMMAND = exports.AUTH_INVALID = exports.AUTH_ACK = exports.AUTH = exports.AUTH_TOKEN_SCHEME = exports.GeoJSONPointSchema = void 0;
3
+ exports.CHARACTER_CREATE_SCHEME = exports.CHARACTER_CREATE_COMMAND = exports.DEBUG_SOCKET_INFO_RETRIEVE_SCHEME = exports.DEBUG_SOCKET_INFO_RETRIEVE_COMMAND = exports.ADMIN_WELL_DELETE_SCHEME = exports.ADMIN_WELL_DELETE_COMMAND = exports.ADMIN_WELL_CREATE_SCHEME = exports.ADMIN_WELL_CREATE_COMMAND = exports.POSUPDATE_SCHEME = exports.POSUPDATE_COMMAND = exports.DATA_UPDATE_COMMAND = exports.REGISTER_RESPONSE_COMMAND = exports.REGISTER_DATA_SCHEME = exports.REGISTER_COMMAND = exports.LOGOUT_COMMAND = exports.LOGIN_RESPONSE_COMMAND = exports.LOGIN_DATA_SCHEME = exports.LOGIN_COMMAND = exports.AUTH_INVALID = exports.AUTH_ACK = exports.AUTH = exports.AUTH_TOKEN_SCHEME = exports.GeoJSONPointSchema = exports.ResponseCode = void 0;
4
4
  const zod_1 = require("zod");
5
+ exports.ResponseCode = {
6
+ SUCCESS: 0,
7
+ AUTH_INVALID: 1,
8
+ PARSING_FAILED: 2,
9
+ NOT_ALLOWED: 3,
10
+ CREDENTIAL_MISMATCH: 4,
11
+ EXISTS: 10,
12
+ DOESNT_EXIST: 11,
13
+ SERVER_ERROR: 500,
14
+ };
5
15
  exports.GeoJSONPointSchema = zod_1.z.strictObject({
6
16
  type: zod_1.z.literal("Point"),
7
17
  coordinates: zod_1.z.array(zod_1.z.number()).length(2).superRefine(([lon, lat], ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.6.17",
3
+ "version": "0.6.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {