maplestory-openapi
Version:
This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.
425 lines (420 loc) • 12.2 kB
JavaScript
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var characterAndroidEquipment = require('../../../common/dto/character/characterAndroidEquipment.js');
/**
* Character android equipment information
*/
class CharacterAndroidEquipmentDto extends characterAndroidEquipment.CharacterAndroidEquipmentDto {
/**
* Reference date for query (SGT, daily data with hours and minutes set to 0)
*/
date;
/**
* Android name
*/
androidName;
/**
* Android nickname
*/
androidNickname;
/**
* Android icon
*/
androidIcon;
/**
* Android item description
*/
androidDescription;
/**
* Android hair information
*/
androidHair;
/**
* Android face information
*/
androidFace;
/**
* Android skin information
*/
androidSkin;
/**
* Android cash item equipment information
*/
androidCashItemEquipment;
/**
* Whether the Android ear sensor clip is applied
*/
androidEarSensorClipFlag;
/**
* Android gender
*/
androidGender;
/**
* Android grade
*/
androidGrade;
/**
* Whether the Android is non-humanoid
*/
androidNonHumanoidFlag;
/**
* Whether the Android can use the general store functionality
*/
androidShopUsableFlag;
/**
* Active equipment preset number
*/
presetNo;
/**
* Android information for preset 1
*/
androidPreset1;
/**
* Android information for preset 2
*/
androidPreset2;
/**
* Android information for preset 3
*/
androidPreset3;
constructor(obj) {
super();
const { date, android_name, android_nickname, android_icon, android_description, android_hair, android_face, android_skin, android_cash_item_equipment, android_ear_sensor_clip_flag, android_gender, android_grade, android_non_humanoid_flag, android_shop_usable_flag, preset_no, android_preset_1, android_preset_2, android_preset_3, } = obj;
this.date = date ? new Date(date) : null;
this.androidName = android_name;
this.androidNickname = android_nickname;
this.androidIcon = android_icon;
this.androidDescription = android_description;
this.androidHair = android_hair
? new CharacterAndroidEquipmentHairDto(android_hair)
: null;
this.androidFace = android_face
? new CharacterAndroidEquipmentFaceDto(android_face)
: null;
this.androidSkin = android_skin
? new CharacterAndroidEquipmentSkinDto(android_skin)
: null;
this.androidCashItemEquipment = android_cash_item_equipment.map((equipment) => new CharacterAndroidCashItemEquipmentDto(equipment));
this.androidEarSensorClipFlag = android_ear_sensor_clip_flag ?? null;
this.androidGender = android_gender;
this.androidGrade = android_grade;
this.androidNonHumanoidFlag = android_non_humanoid_flag;
this.androidShopUsableFlag = android_shop_usable_flag;
this.presetNo = preset_no;
this.androidPreset1 = android_preset_1
? new CharacterAndroidEquipmentPresetDto(android_preset_1)
: null;
this.androidPreset2 = android_preset_2
? new CharacterAndroidEquipmentPresetDto(android_preset_2)
: null;
this.androidPreset3 = android_preset_3
? new CharacterAndroidEquipmentPresetDto(android_preset_3)
: null;
}
}
/**
* Android face information
*/
class CharacterAndroidEquipmentFaceDto extends characterAndroidEquipment.CharacterAndroidEquipmentFaceDto {
/**
* Android face name
*/
faceName;
/**
* Android base face color
*/
baseColor;
/**
* Android mixed face color
*/
mixColor;
/**
* Dye ratio for Android mixed face color
*/
mixRate;
constructor(obj) {
super();
const { face_name, base_color, mix_color, mix_rate } = obj;
this.faceName = face_name;
this.baseColor = base_color;
this.mixColor = mix_color;
this.mixRate = mix_rate;
}
}
/**
* Android hair information
*/
class CharacterAndroidEquipmentHairDto extends characterAndroidEquipment.CharacterAndroidEquipmentHairDto {
/**
* Android hair name
*/
hairName;
/**
* Android base hair color
*/
baseColor;
/**
* Android mixed hair color
*/
mixColor;
/**
* Dye ratio for Android mixed hair color
*/
mixRate;
constructor(obj) {
super();
const { hair_name, base_color, mix_color, mix_rate } = obj;
this.hairName = hair_name;
this.baseColor = base_color;
this.mixColor = mix_color;
this.mixRate = mix_rate;
}
}
/**
* Android skin information
*/
class CharacterAndroidEquipmentSkinDto extends characterAndroidEquipment.CharacterAndroidEquipmentSkinDto {
/**
* Skin name
*/
skinName;
/**
* Color style
*/
colorStyle;
/**
* Skin hue
*/
hue;
/**
* Skin saturation
*/
saturation;
/**
* Skin brightness
*/
brightness;
constructor(obj) {
super();
const { skin_name, color_style, hue, saturation, brightness } = obj;
this.skinName = skin_name;
this.colorStyle = color_style;
this.hue = hue;
this.saturation = saturation;
this.brightness = brightness;
}
}
/**
* Android preset information
*/
class CharacterAndroidEquipmentPresetDto extends characterAndroidEquipment.CharacterAndroidEquipmentPresetDto {
/**
* Android name
*/
androidName;
/**
* Android nickname
*/
androidNickname;
/**
* Android icon
*/
androidIcon;
/**
* Android item description
*/
androidDescription;
/**
* Android gender
*/
androidGender;
/**
* Android grade
*/
androidGrade;
/**
*
* Android hair information
*/
androidHair;
/**
* Android face information
*/
androidFace;
/**
* Android skin information
*/
androidSkin;
/**
* Whether the Android ear sensor clip is applied
*/
androidEarSensorClipFlag;
/**
* Whether the Android is non-humanoid
*/
androidNonHumanoidFlag;
/**
* Whether the Android can use the general store functionality
*/
androidShopUsableFlag;
constructor(obj) {
super();
const { android_name, android_nickname, android_icon, android_description, android_gender, android_grade, android_hair, android_face, android_skin, android_ear_sensor_clip_flag, android_non_humanoid_flag, android_shop_usable_flag, } = obj;
this.androidName = android_name;
this.androidNickname = android_nickname;
this.androidIcon = android_icon;
this.androidDescription = android_description;
this.androidGender = android_gender;
this.androidGrade = android_grade;
this.androidHair = new CharacterAndroidEquipmentHairDto(android_hair);
this.androidFace = new CharacterAndroidEquipmentFaceDto(android_face);
this.androidSkin = android_skin
? new CharacterAndroidEquipmentSkinDto(android_skin)
: null;
this.androidEarSensorClipFlag = android_ear_sensor_clip_flag;
this.androidNonHumanoidFlag = android_non_humanoid_flag;
this.androidShopUsableFlag = android_shop_usable_flag;
}
}
/**
* Android cash item coloring prism information
*/
class CharacterAndroidCashItemEquipmentColoringPrismDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentColoringPrismDto {
/**
* Coloring prism color range
*/
colorRange;
/**
* Coloring prism hue
*/
hue;
/**
* Coloring prism saturation
*/
saturation;
/**
* Coloring prism brightness
*/
value;
constructor(obj) {
super();
const { color_range, hue, saturation, value } = obj;
this.colorRange = color_range;
this.hue = hue;
this.saturation = saturation;
this.value = value;
}
}
/**
* Android cash item options
*/
class CharacterAndroidCashItemEquipmentOptionDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentOptionDto {
/**
* Option type
*/
optionType;
/**
* Option value
*/
optionValue;
constructor(obj) {
super();
const { option_type, option_value } = obj;
this.optionType = option_type;
this.optionValue = option_value;
}
}
/**
* Android cash item equipment information
*/
class CharacterAndroidCashItemEquipmentDto extends characterAndroidEquipment.CharacterAndroidCashItemEquipmentDto {
/**
* Android cash item part name
*/
cashItemEquipmentPart;
/**
* Android cash item slot position
*/
cashItemEquipmentSlot;
/**
* Android cash item name
*/
cashItemName;
/**
* Android cash item icon
*/
cashItemIcon;
/**
* Android cash item description
*/
cashItemDescription;
/**
* Android cash item options
*/
cashItemOption;
/**
* Android cash item validity period (SGT)
*/
dateExpire = null;
/**
* Whether the android cash item is expired
*/
isExpired = null;
/**
* Android cash item option validity period (SGT, data with minutes set to 0)
*/
dateOptionExpire = null;
/**
* Whether the android cash item option is expired
*/
isOptionExpired = null;
/**
* Android cash item label information (e.g., Special Label, Red Label, Black Label, Master Label)
*/
cashItemLabel;
/**
* Android cash item coloring prism information
*/
cashItemColoringPrism;
/**
* Gender compatibility for item equipment
*/
androidItemGender;
constructor(obj) {
super();
const { cash_item_equipment_part, cash_item_equipment_slot, cash_item_name, cash_item_icon, cash_item_description, cash_item_option, date_expire, date_option_expire, cash_item_label, cash_item_coloring_prism, android_item_gender, } = obj;
this.cashItemEquipmentPart = cash_item_equipment_part;
this.cashItemEquipmentSlot = cash_item_equipment_slot;
this.cashItemName = cash_item_name;
this.cashItemIcon = cash_item_icon;
this.cashItemDescription = cash_item_description;
this.cashItemOption = cash_item_option.map((option) => new CharacterAndroidCashItemEquipmentOptionDto(option));
this.cashItemLabel = cash_item_label;
this.cashItemColoringPrism = cash_item_coloring_prism
? new CharacterAndroidCashItemEquipmentColoringPrismDto(cash_item_coloring_prism)
: null;
this.androidItemGender = android_item_gender;
if (date_expire === 'expired') {
this.isExpired = true;
}
else if (typeof date_expire === 'string') {
this.dateExpire = date_expire ? new Date(date_expire) : null;
}
if (date_option_expire === 'expired') {
this.isOptionExpired = true;
}
else if (typeof date_option_expire === 'string') {
this.dateOptionExpire = date_option_expire
? new Date(date_option_expire)
: null;
}
}
}
exports.CharacterAndroidCashItemEquipmentColoringPrismDto = CharacterAndroidCashItemEquipmentColoringPrismDto;
exports.CharacterAndroidCashItemEquipmentDto = CharacterAndroidCashItemEquipmentDto;
exports.CharacterAndroidCashItemEquipmentOptionDto = CharacterAndroidCashItemEquipmentOptionDto;
exports.CharacterAndroidEquipmentDto = CharacterAndroidEquipmentDto;
exports.CharacterAndroidEquipmentFaceDto = CharacterAndroidEquipmentFaceDto;
exports.CharacterAndroidEquipmentHairDto = CharacterAndroidEquipmentHairDto;
exports.CharacterAndroidEquipmentPresetDto = CharacterAndroidEquipmentPresetDto;
exports.CharacterAndroidEquipmentSkinDto = CharacterAndroidEquipmentSkinDto;