magicrealmsshared 0.6.18 → 0.6.19

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.
@@ -139,10 +139,16 @@ export type DEBUG_SOCKET_INFO_RESPONSE = Response & {
139
139
  export declare const CHARACTER_CREATE_COMMAND = "CHARACTER_CREATE";
140
140
  export declare const CHARACTER_CREATE_SCHEME: z.ZodObject<{
141
141
  name: z.ZodString;
142
+ gender: z.ZodEnum<["f", "m"]>;
143
+ portrait: z.ZodString;
142
144
  }, "strict", z.ZodTypeAny, {
143
145
  name: string;
146
+ gender: "f" | "m";
147
+ portrait: string;
144
148
  }, {
145
149
  name: string;
150
+ gender: "f" | "m";
151
+ portrait: string;
146
152
  }>;
147
153
  export type CHARACTER_CREATE_DATA = z.infer<typeof CHARACTER_CREATE_SCHEME>;
148
154
  export type CHARACTER_CREATE_RESPONSE = Response & {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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
+ const charcter_1 = require("../types/charcter");
4
5
  const zod_1 = require("zod");
5
6
  exports.ResponseCode = {
6
7
  SUCCESS: 0,
@@ -68,5 +69,7 @@ exports.DEBUG_SOCKET_INFO_RETRIEVE_SCHEME = zod_1.z.strictObject({});
68
69
  exports.CHARACTER_CREATE_COMMAND = "CHARACTER_CREATE";
69
70
  exports.CHARACTER_CREATE_SCHEME = zod_1.z.strictObject({
70
71
  name: zod_1.z.string().min(3).max(32),
72
+ gender: charcter_1.GenderSchema,
73
+ portrait: zod_1.z.string().min(2).max(8),
71
74
  });
72
75
  //#endregion
@@ -1,3 +1,4 @@
1
+ import z from "zod";
1
2
  import { GameItem, HeadGear, ManaCrytal } from "./items";
2
3
  import { ObjectWithId } from "./types";
3
4
  export type Equipment<IDFormat, DateFormat> = {
@@ -8,6 +9,10 @@ export type GameCharacter<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
8
9
  ownerId: IDFormat;
9
10
  name: string;
10
11
  creationDate: DateFormat;
12
+ gender: Gender;
13
+ portrait: string;
11
14
  equipment: Equipment<IDFormat, DateFormat>;
12
15
  inventory: GameItem<IDFormat, DateFormat>[];
13
16
  };
17
+ export declare const GenderSchema: z.ZodEnum<["f", "m"]>;
18
+ export type Gender = z.infer<typeof GenderSchema>;
@@ -1,2 +1,8 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GenderSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.GenderSchema = zod_1.default.enum(["f", "m"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.6.18",
3
+ "version": "0.6.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {