maplestory-openapi 2.9.0 → 2.11.0
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/index.js +198 -12
- package/dist/index.min.js +3 -3
- package/dist/index.mjs +198 -12
- package/package.json +1 -1
- package/types/maplestory/api/dto/character/characterCashItemEquipmentPresetDto.d.ts +4 -0
- package/types/maplestory/api/dto/character/characterImageDto.d.ts +10 -0
- package/types/maplestory/api/dto/character/characterItemEquipmentDto.d.ts +5 -0
- package/types/maplestory/api/dto/character/characterItemEquipmentMedalShapeDto.d.ts +32 -0
- package/types/maplestory/api/dto/character/characterItemEquipmentTitleDto.d.ts +12 -0
- package/types/maplestory/api/dto/union/unionChampionBadgeInfoDto.d.ts +12 -0
- package/types/maplestory/api/dto/union/unionChampionDto.d.ts +22 -0
- package/types/maplestory/api/dto/union/unionChampionInfoDto.d.ts +25 -0
- package/types/maplestory/api/mapleStoryApi.d.ts +21 -0
- package/types/maplestory/api/response/character/characterCashItemEquipmentDtoBody.d.ts +1 -0
- package/types/maplestory/api/response/character/characterItemEquipmentDtoBody.d.ts +13 -1
- package/types/maplestory/api/response/union/unionChampionDtoBody.d.ts +15 -0
package/dist/index.js
CHANGED
|
@@ -3186,8 +3186,12 @@ class CharacterCashItemEquipmentPresetDto {
|
|
|
3186
3186
|
* 아이템 장착 가능 성별
|
|
3187
3187
|
*/
|
|
3188
3188
|
itemGender;
|
|
3189
|
+
/**
|
|
3190
|
+
* 스킬명
|
|
3191
|
+
*/
|
|
3192
|
+
skills;
|
|
3189
3193
|
constructor(obj) {
|
|
3190
|
-
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, item_gender, } = obj;
|
|
3194
|
+
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, item_gender, skills, } = obj;
|
|
3191
3195
|
this.cashItemEquipmentPart = cash_item_equipment_part;
|
|
3192
3196
|
this.cashItemEquipmentSlot = cash_item_equipment_slot;
|
|
3193
3197
|
this.cashItemName = cash_item_name;
|
|
@@ -3201,6 +3205,7 @@ class CharacterCashItemEquipmentPresetDto {
|
|
|
3201
3205
|
? new CharacterCashItemEquipmentColoringPrismDto(cash_item_coloring_prism)
|
|
3202
3206
|
: null;
|
|
3203
3207
|
this.itemGender = item_gender;
|
|
3208
|
+
this.skills = skills;
|
|
3204
3209
|
}
|
|
3205
3210
|
}
|
|
3206
3211
|
|
|
@@ -3607,6 +3612,14 @@ class CharacterImageDto {
|
|
|
3607
3612
|
* 캐릭터 무기 모션
|
|
3608
3613
|
*/
|
|
3609
3614
|
wmotion;
|
|
3615
|
+
/**
|
|
3616
|
+
* 캐릭터 액션 프레임
|
|
3617
|
+
*/
|
|
3618
|
+
actionFrame;
|
|
3619
|
+
/**
|
|
3620
|
+
* 캐릭터 감정표현 프레임
|
|
3621
|
+
*/
|
|
3622
|
+
emotionFrame;
|
|
3610
3623
|
/**
|
|
3611
3624
|
* 가로 길이. 배경 크기에 해당함, 96 (default) ~ 1000
|
|
3612
3625
|
*/
|
|
@@ -3631,6 +3644,8 @@ class CharacterImageDto {
|
|
|
3631
3644
|
this.action = obj.action;
|
|
3632
3645
|
this.emotion = obj.emotion;
|
|
3633
3646
|
this.wmotion = obj.wmotion;
|
|
3647
|
+
this.actionFrame = obj.actionFrame;
|
|
3648
|
+
this.emotionFrame = obj.emotionFrame;
|
|
3634
3649
|
this.width = obj.width;
|
|
3635
3650
|
this.height = obj.height;
|
|
3636
3651
|
this.x = obj.x;
|
|
@@ -4674,6 +4689,45 @@ class CharacterItemEquipmentMechanicInfoDto {
|
|
|
4674
4689
|
}
|
|
4675
4690
|
}
|
|
4676
4691
|
|
|
4692
|
+
/**
|
|
4693
|
+
* 캐릭터 외형 설정에 등록한 훈장 외형 정보
|
|
4694
|
+
*/
|
|
4695
|
+
class CharacterItemEquipmentMedalShapeDto {
|
|
4696
|
+
/**
|
|
4697
|
+
* 외형 설정에 등록한 훈장 장비 명
|
|
4698
|
+
*/
|
|
4699
|
+
medalShapeName;
|
|
4700
|
+
/**
|
|
4701
|
+
* 외형 설정에 등록한 훈장 아이콘
|
|
4702
|
+
*/
|
|
4703
|
+
medalShapeIcon;
|
|
4704
|
+
/**
|
|
4705
|
+
* 외형 설정에 등록한 훈장 설명
|
|
4706
|
+
*/
|
|
4707
|
+
medalShapeDescription;
|
|
4708
|
+
/**
|
|
4709
|
+
* 외형 설정에 등록한 훈장의 모루 적용 장비 명
|
|
4710
|
+
*/
|
|
4711
|
+
medalShapeChangedName;
|
|
4712
|
+
/**
|
|
4713
|
+
* 외형 설정에 등록한 훈장의 모루 적용 아이콘
|
|
4714
|
+
*/
|
|
4715
|
+
medalShapeChangedIcon;
|
|
4716
|
+
/**
|
|
4717
|
+
* 외형 설정에 등록한 훈장의 모루 적용 훈장 설명
|
|
4718
|
+
*/
|
|
4719
|
+
medalShapeChangedDescription;
|
|
4720
|
+
constructor(obj) {
|
|
4721
|
+
const { medal_shape_name, medal_shape_icon, medal_shape_description, medal_shape_changed_name, medal_shape_changed_icon, medal_shape_changed_description, } = obj;
|
|
4722
|
+
this.medalShapeName = medal_shape_name;
|
|
4723
|
+
this.medalShapeIcon = medal_shape_icon;
|
|
4724
|
+
this.medalShapeDescription = medal_shape_description;
|
|
4725
|
+
this.medalShapeChangedName = medal_shape_changed_name;
|
|
4726
|
+
this.medalShapeChangedIcon = medal_shape_changed_icon;
|
|
4727
|
+
this.medalShapeChangedDescription = medal_shape_changed_description;
|
|
4728
|
+
}
|
|
4729
|
+
}
|
|
4730
|
+
|
|
4677
4731
|
/**
|
|
4678
4732
|
* 캐릭터 칭호 아이템 정보
|
|
4679
4733
|
*/
|
|
@@ -4702,12 +4756,27 @@ class CharacterItemEquipmentTitleDto {
|
|
|
4702
4756
|
* 칭호 옵션 유효 기간 만료 여부
|
|
4703
4757
|
*/
|
|
4704
4758
|
isOptionExpired = null;
|
|
4759
|
+
/**
|
|
4760
|
+
* 외형 설정에 등록한 칭호 장비 명
|
|
4761
|
+
*/
|
|
4762
|
+
titleShapeName;
|
|
4763
|
+
/**
|
|
4764
|
+
* 외형 설정에 등록한 칭호 아이콘
|
|
4765
|
+
*/
|
|
4766
|
+
titleShapeIcon;
|
|
4767
|
+
/**
|
|
4768
|
+
* 외형 설정에 등록한 칭호 설명
|
|
4769
|
+
*/
|
|
4770
|
+
titleShapeDescription;
|
|
4705
4771
|
constructor(obj) {
|
|
4706
|
-
const { title_name, title_icon, title_description, date_expire, date_option_expire, } = obj;
|
|
4772
|
+
const { title_name, title_icon, title_description, date_expire, date_option_expire, title_shape_name, title_shape_icon, title_shape_description, } = obj;
|
|
4707
4773
|
this.titleName = title_name;
|
|
4708
4774
|
this.titleIcon = title_icon;
|
|
4709
4775
|
this.titleDescription = title_description;
|
|
4710
4776
|
this.dateExpire = date_expire ? new Date(date_expire) : null;
|
|
4777
|
+
this.titleShapeName = title_shape_name;
|
|
4778
|
+
this.titleShapeIcon = title_shape_icon;
|
|
4779
|
+
this.titleShapeDescription = title_shape_description;
|
|
4711
4780
|
if (date_option_expire === 'expired') {
|
|
4712
4781
|
this.isOptionExpired = true;
|
|
4713
4782
|
}
|
|
@@ -4759,6 +4828,10 @@ class CharacterItemEquipmentDto {
|
|
|
4759
4828
|
* 칭호 정보
|
|
4760
4829
|
*/
|
|
4761
4830
|
title;
|
|
4831
|
+
/**
|
|
4832
|
+
* 외형 설정에 등록한 훈장 외형 정보
|
|
4833
|
+
*/
|
|
4834
|
+
medalShape;
|
|
4762
4835
|
/**
|
|
4763
4836
|
* 에반 드래곤 장비 정보 (에반인 경우 응답)
|
|
4764
4837
|
*/
|
|
@@ -4768,7 +4841,7 @@ class CharacterItemEquipmentDto {
|
|
|
4768
4841
|
*/
|
|
4769
4842
|
mechanicEquipment;
|
|
4770
4843
|
constructor(obj) {
|
|
4771
|
-
const { date, character_gender, character_class, preset_no, item_equipment, item_equipment_preset_1, item_equipment_preset_2, item_equipment_preset_3, title, dragon_equipment, mechanic_equipment, } = obj;
|
|
4844
|
+
const { date, character_gender, character_class, preset_no, item_equipment, item_equipment_preset_1, item_equipment_preset_2, item_equipment_preset_3, title, medal_shape, dragon_equipment, mechanic_equipment, } = obj;
|
|
4772
4845
|
this.date = date ? new Date(date) : null;
|
|
4773
4846
|
this.characterGender = character_gender;
|
|
4774
4847
|
this.characterClass = character_class;
|
|
@@ -4778,6 +4851,7 @@ class CharacterItemEquipmentDto {
|
|
|
4778
4851
|
this.itemEquipmentPreset2 = item_equipment_preset_2 ? item_equipment_preset_2.map((equipment) => new CharacterItemEquipmentInfoDto(equipment)) : null;
|
|
4779
4852
|
this.itemEquipmentPreset3 = item_equipment_preset_3 ? item_equipment_preset_3.map((equipment) => new CharacterItemEquipmentInfoDto(equipment)) : null;
|
|
4780
4853
|
this.title = title ? new CharacterItemEquipmentTitleDto(title) : null;
|
|
4854
|
+
this.medalShape = medal_shape ? new CharacterItemEquipmentMedalShapeDto(medal_shape) : null;
|
|
4781
4855
|
this.dragonEquipment = dragon_equipment.map((equipment) => new CharacterItemEquipmentDragonInfoDto(equipment));
|
|
4782
4856
|
this.mechanicEquipment = mechanic_equipment.map((equipment) => new CharacterItemEquipmentMechanicInfoDto(equipment));
|
|
4783
4857
|
}
|
|
@@ -7403,6 +7477,73 @@ const errorMap = {
|
|
|
7403
7477
|
['OPENAPI00011']: exports.MapleStoryApiErrorCode.OPENAPI00011,
|
|
7404
7478
|
};
|
|
7405
7479
|
|
|
7480
|
+
/**
|
|
7481
|
+
* 유니온 챔피언 휘장 정보
|
|
7482
|
+
*/
|
|
7483
|
+
class UnionChampionBadgeInfoDto {
|
|
7484
|
+
/**
|
|
7485
|
+
* 유니온 챔피언 휘장 효과
|
|
7486
|
+
*/
|
|
7487
|
+
stat;
|
|
7488
|
+
constructor(obj) {
|
|
7489
|
+
const { stat } = obj;
|
|
7490
|
+
this.stat = stat;
|
|
7491
|
+
}
|
|
7492
|
+
}
|
|
7493
|
+
|
|
7494
|
+
/**
|
|
7495
|
+
* 유니온 챔피언 상세 정보
|
|
7496
|
+
*/
|
|
7497
|
+
class UnionChampionInfoDto {
|
|
7498
|
+
/**
|
|
7499
|
+
* 유니온 챔피언 슬롯
|
|
7500
|
+
*/
|
|
7501
|
+
championSlot;
|
|
7502
|
+
/**
|
|
7503
|
+
* 유니온 챔피언 등급
|
|
7504
|
+
*/
|
|
7505
|
+
championGrade;
|
|
7506
|
+
/**
|
|
7507
|
+
* 유니온 챔피언 캐릭터의 직업
|
|
7508
|
+
*/
|
|
7509
|
+
championClass;
|
|
7510
|
+
/**
|
|
7511
|
+
* 챔피언 휘장 효과
|
|
7512
|
+
*/
|
|
7513
|
+
championBadgeInfo;
|
|
7514
|
+
constructor(obj) {
|
|
7515
|
+
const { champion_slot, champion_grade, champion_class, champion_badge_info } = obj;
|
|
7516
|
+
this.championSlot = champion_slot;
|
|
7517
|
+
this.championGrade = champion_grade;
|
|
7518
|
+
this.championClass = champion_class;
|
|
7519
|
+
this.championBadgeInfo = champion_badge_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7520
|
+
}
|
|
7521
|
+
}
|
|
7522
|
+
|
|
7523
|
+
/**
|
|
7524
|
+
* 유니온 챔피언 정보
|
|
7525
|
+
*/
|
|
7526
|
+
class UnionChampionDto {
|
|
7527
|
+
/**
|
|
7528
|
+
* 조회 기준일
|
|
7529
|
+
*/
|
|
7530
|
+
date;
|
|
7531
|
+
/**
|
|
7532
|
+
* 유니온 챔피언 정보
|
|
7533
|
+
*/
|
|
7534
|
+
unionChampion;
|
|
7535
|
+
/**
|
|
7536
|
+
* 유니온 챔피언 휘장 정보
|
|
7537
|
+
*/
|
|
7538
|
+
championBadgeTotalInfo;
|
|
7539
|
+
constructor(obj) {
|
|
7540
|
+
const { date, union_champion, champion_badge_total_info } = obj;
|
|
7541
|
+
this.date = date ? new Date(date) : null;
|
|
7542
|
+
this.unionChampion = union_champion.map((info) => new UnionChampionInfoDto(info));
|
|
7543
|
+
this.championBadgeTotalInfo = champion_badge_total_info.map((info) => new UnionChampionBadgeInfoDto(info));
|
|
7544
|
+
}
|
|
7545
|
+
}
|
|
7546
|
+
|
|
7406
7547
|
dayjs__default["default"].extend(timezone);
|
|
7407
7548
|
dayjs__default["default"].extend(utc);
|
|
7408
7549
|
/**
|
|
@@ -7509,15 +7650,23 @@ class MapleStoryApi {
|
|
|
7509
7650
|
*/
|
|
7510
7651
|
async getCharacterImage(ocid, imageOptions, dateOptions) {
|
|
7511
7652
|
const { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
|
|
7653
|
+
const action = imageOptions?.action ?? exports.CharacterImageAction.Stand1;
|
|
7654
|
+
const emotion = imageOptions?.emotion ?? exports.CharacterImageEmotion.Default;
|
|
7655
|
+
const wmotion = imageOptions?.wmotion ?? exports.CharacterImageWeaponMotion.Default;
|
|
7656
|
+
const actionFrame = imageOptions?.actionFrame ?? 0;
|
|
7657
|
+
const emotionFrame = imageOptions?.emotionFrame ?? 0;
|
|
7658
|
+
const width = 96;
|
|
7659
|
+
const height = 96;
|
|
7660
|
+
const x = imageOptions?.x ?? null;
|
|
7661
|
+
const y = imageOptions?.y ?? null;
|
|
7512
7662
|
const query = {
|
|
7513
|
-
action:
|
|
7514
|
-
emotion:
|
|
7515
|
-
wmotion
|
|
7516
|
-
width
|
|
7517
|
-
height
|
|
7518
|
-
x
|
|
7519
|
-
y
|
|
7520
|
-
...imageOptions,
|
|
7663
|
+
action: `${action}.${actionFrame}`,
|
|
7664
|
+
emotion: `${emotion}.${emotionFrame}`,
|
|
7665
|
+
wmotion,
|
|
7666
|
+
width,
|
|
7667
|
+
height,
|
|
7668
|
+
x,
|
|
7669
|
+
y,
|
|
7521
7670
|
};
|
|
7522
7671
|
const urlImageToBase64 = async (path, query) => {
|
|
7523
7672
|
const { data, headers } = await axios__default["default"].get(path, {
|
|
@@ -7537,7 +7686,15 @@ class MapleStoryApi {
|
|
|
7537
7686
|
originUrl: path,
|
|
7538
7687
|
originImage,
|
|
7539
7688
|
image,
|
|
7540
|
-
|
|
7689
|
+
action,
|
|
7690
|
+
emotion,
|
|
7691
|
+
wmotion,
|
|
7692
|
+
actionFrame,
|
|
7693
|
+
emotionFrame,
|
|
7694
|
+
width,
|
|
7695
|
+
height,
|
|
7696
|
+
x,
|
|
7697
|
+
y,
|
|
7541
7698
|
});
|
|
7542
7699
|
}
|
|
7543
7700
|
/**
|
|
@@ -8140,6 +8297,35 @@ class MapleStoryApi {
|
|
|
8140
8297
|
});
|
|
8141
8298
|
return new UnionArtifactDto(data);
|
|
8142
8299
|
}
|
|
8300
|
+
/**
|
|
8301
|
+
* 유니온 챔피언 정보를 조회합니다.<br>
|
|
8302
|
+
* 유니온 챔피언 정보는 2025년 2월 20일 메이플스토리 점검 이후 데이터부터 조회 가능합니다.<br>
|
|
8303
|
+
* - 메이플스토리 게임 데이터는 평균 15분 후 확인 가능합니다.
|
|
8304
|
+
* - 2023년 12월 21일 데이터부터 조회할 수 있습니다.
|
|
8305
|
+
* - 과거 데이터는 원하는 일자를 입력해 조회할 수 있으며, 전일 데이터는 다음날 오전 2시부터 확인할 수 있습니다. (12월 22일 데이터 조회 시, 22일 00시부터 23일 00시 사이 데이터가 조회 됩니다.)
|
|
8306
|
+
* - 게임 콘텐츠 변경으로 ocid가 변경될 수 있습니다. ocid 기반 서비스 갱신 시 유의해 주시길 바랍니다.
|
|
8307
|
+
*
|
|
8308
|
+
* @param ocid 캐릭터 식별자
|
|
8309
|
+
* @param dateOptions 조회 기준일 (KST)
|
|
8310
|
+
*/
|
|
8311
|
+
async getUnionChampion(ocid, dateOptions) {
|
|
8312
|
+
const path = 'maplestory/v1/user/union-champion';
|
|
8313
|
+
const date = dateOptions
|
|
8314
|
+
? MapleStoryApi.toDateString({
|
|
8315
|
+
year: 2023,
|
|
8316
|
+
month: 12,
|
|
8317
|
+
day: 21,
|
|
8318
|
+
}, dateOptions)
|
|
8319
|
+
: undefined;
|
|
8320
|
+
const query = {
|
|
8321
|
+
ocid: ocid,
|
|
8322
|
+
date: date,
|
|
8323
|
+
};
|
|
8324
|
+
const { data } = await this.client.get(path, {
|
|
8325
|
+
params: query,
|
|
8326
|
+
});
|
|
8327
|
+
return new UnionChampionDto(data);
|
|
8328
|
+
}
|
|
8143
8329
|
//#endregion
|
|
8144
8330
|
//#region 길드 정보 조회
|
|
8145
8331
|
/**
|