maplestory-openapi 3.4.0 → 3.5.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.
Files changed (97) hide show
  1. package/README.md +11 -10
  2. package/dist/cjs/maplestory/api/common/mapleStoryApi.js +25 -0
  3. package/dist/cjs/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
  4. package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +1 -1
  5. package/dist/cjs/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +12 -2
  6. package/dist/cjs/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
  7. package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +96 -11
  8. package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +1 -1
  9. package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +77 -1
  10. package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +1 -1
  11. package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +77 -1
  12. package/dist/esm/maplestory/api/common/mapleStoryApi.js +25 -0
  13. package/dist/esm/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
  14. package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +1 -1
  15. package/dist/esm/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +12 -2
  16. package/dist/esm/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
  17. package/dist/esm/maplestory/api/kms/mapleStoryApi.js +96 -11
  18. package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +1 -1
  19. package/dist/esm/maplestory/api/msea/mapleStoryApi.js +77 -1
  20. package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +1 -1
  21. package/dist/esm/maplestory/api/tms/mapleStoryApi.js +77 -1
  22. package/dist/index.min.js +1 -1
  23. package/package.json +4 -3
  24. package/types/maplestory/api/common/dto/character/characterAbility.d.ts +2 -2
  25. package/types/maplestory/api/common/dto/character/characterBasic.d.ts +1 -1
  26. package/types/maplestory/api/common/dto/character/characterCashItemEquipment.d.ts +3 -3
  27. package/types/maplestory/api/common/dto/character/characterDojang.d.ts +4 -4
  28. package/types/maplestory/api/common/dto/character/characterHexaMatrixStat.d.ts +1 -1
  29. package/types/maplestory/api/common/dto/character/characterHyperStat.d.ts +6 -6
  30. package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +2 -2
  31. package/types/maplestory/api/common/dto/character/characterLinkSkill.d.ts +1 -1
  32. package/types/maplestory/api/common/dto/character/characterPropensity.d.ts +6 -6
  33. package/types/maplestory/api/common/dto/character/characterSkill.d.ts +1 -1
  34. package/types/maplestory/api/common/dto/character/characterStat.d.ts +2 -2
  35. package/types/maplestory/api/common/dto/character/characterSymbolEquipment.d.ts +1 -1
  36. package/types/maplestory/api/common/dto/character/characterVMatrix.d.ts +2 -2
  37. package/types/maplestory/api/common/dto/union/unionRaider.d.ts +1 -1
  38. package/types/maplestory/api/common/mapleStoryApi.d.ts +36 -25
  39. package/types/maplestory/api/kms/dto/character/characterAbility.d.ts +2 -2
  40. package/types/maplestory/api/kms/dto/character/characterAndroidEquipment.d.ts +1 -1
  41. package/types/maplestory/api/kms/dto/character/characterBasic.d.ts +1 -1
  42. package/types/maplestory/api/kms/dto/character/characterCashItemEquipment.d.ts +3 -3
  43. package/types/maplestory/api/kms/dto/character/characterDojang.d.ts +4 -4
  44. package/types/maplestory/api/kms/dto/character/characterHexaMatrixStat.d.ts +1 -1
  45. package/types/maplestory/api/kms/dto/character/characterHyperStat.d.ts +6 -6
  46. package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +2 -2
  47. package/types/maplestory/api/kms/dto/character/characterLinkSkill.d.ts +1 -1
  48. package/types/maplestory/api/kms/dto/character/characterPropensity.d.ts +6 -6
  49. package/types/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.d.ts +8 -0
  50. package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +1 -1
  51. package/types/maplestory/api/kms/dto/character/characterStat.d.ts +2 -2
  52. package/types/maplestory/api/kms/dto/character/characterSymbolEquipment.d.ts +1 -1
  53. package/types/maplestory/api/kms/dto/character/characterVMatrix.d.ts +2 -2
  54. package/types/maplestory/api/kms/dto/history/starforceHistory.d.ts +4 -4
  55. package/types/maplestory/api/kms/dto/union/unionRaider.d.ts +1 -1
  56. package/types/maplestory/api/kms/mapleStoryApi.d.ts +32 -32
  57. package/types/maplestory/api/kms/response/character/characterAndroidEquipmentBody.d.ts +1 -1
  58. package/types/maplestory/api/kms/response/character/characterBasicBody.d.ts +1 -1
  59. package/types/maplestory/api/kms/response/character/characterPopularityBody.d.ts +1 -1
  60. package/types/maplestory/api/kms/response/character/characterRingExchangeSkillEquipmentBody.d.ts +2 -0
  61. package/types/maplestory/api/kms/response/union/unionRaiderBody.d.ts +1 -1
  62. package/types/maplestory/api/msea/dto/character/characterAbility.d.ts +2 -2
  63. package/types/maplestory/api/msea/dto/character/characterBasic.d.ts +1 -1
  64. package/types/maplestory/api/msea/dto/character/characterCashItemEquipment.d.ts +3 -3
  65. package/types/maplestory/api/msea/dto/character/characterDojang.d.ts +4 -4
  66. package/types/maplestory/api/msea/dto/character/characterHexaMatrixStat.d.ts +1 -1
  67. package/types/maplestory/api/msea/dto/character/characterHyperStat.d.ts +6 -6
  68. package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +2 -2
  69. package/types/maplestory/api/msea/dto/character/characterLinkSkill.d.ts +1 -1
  70. package/types/maplestory/api/msea/dto/character/characterPropensity.d.ts +6 -6
  71. package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +1 -1
  72. package/types/maplestory/api/msea/dto/character/characterStat.d.ts +2 -2
  73. package/types/maplestory/api/msea/dto/character/characterSymbolEquipment.d.ts +1 -1
  74. package/types/maplestory/api/msea/dto/character/characterVMatrix.d.ts +2 -2
  75. package/types/maplestory/api/msea/dto/union/unionRaider.d.ts +1 -1
  76. package/types/maplestory/api/msea/mapleStoryApi.d.ts +25 -25
  77. package/types/maplestory/api/msea/response/character/characterBasicBody.d.ts +1 -1
  78. package/types/maplestory/api/msea/response/character/characterPopularityBody.d.ts +1 -1
  79. package/types/maplestory/api/msea/response/union/unionRaiderBody.d.ts +1 -1
  80. package/types/maplestory/api/tms/dto/character/characterAbility.d.ts +2 -2
  81. package/types/maplestory/api/tms/dto/character/characterBasic.d.ts +1 -1
  82. package/types/maplestory/api/tms/dto/character/characterCashItemEquipment.d.ts +3 -3
  83. package/types/maplestory/api/tms/dto/character/characterDojang.d.ts +4 -4
  84. package/types/maplestory/api/tms/dto/character/characterHexaMatrixStat.d.ts +1 -1
  85. package/types/maplestory/api/tms/dto/character/characterHyperStat.d.ts +6 -6
  86. package/types/maplestory/api/tms/dto/character/characterItemEquipment.d.ts +2 -2
  87. package/types/maplestory/api/tms/dto/character/characterLinkSkill.d.ts +1 -1
  88. package/types/maplestory/api/tms/dto/character/characterPropensity.d.ts +6 -6
  89. package/types/maplestory/api/tms/dto/character/characterSkill.d.ts +1 -1
  90. package/types/maplestory/api/tms/dto/character/characterStat.d.ts +2 -2
  91. package/types/maplestory/api/tms/dto/character/characterSymbolEquipment.d.ts +1 -1
  92. package/types/maplestory/api/tms/dto/character/characterVMatrix.d.ts +2 -2
  93. package/types/maplestory/api/tms/dto/union/unionRaider.d.ts +1 -1
  94. package/types/maplestory/api/tms/mapleStoryApi.d.ts +25 -25
  95. package/types/maplestory/api/tms/response/character/characterBasicBody.d.ts +1 -1
  96. package/types/maplestory/api/tms/response/character/characterPopularityBody.d.ts +1 -1
  97. package/types/maplestory/api/tms/response/union/unionRaiderBody.d.ts +1 -1
@@ -93,6 +93,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
93
93
  const { data } = await this.client.get(path, {
94
94
  params: query,
95
95
  });
96
+ if (this.isEmptyResponse(data)) {
97
+ return null;
98
+ }
96
99
  return new characterBasic.CharacterBasicDto(data);
97
100
  }
98
101
  /**
@@ -107,7 +110,11 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
107
110
  * @param dateOptions Reference date for query (SGT)
108
111
  */
109
112
  async getCharacterImage(ocid, imageOptions, dateOptions) {
110
- const { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
113
+ const basic = await this.getCharacterBasic(ocid, dateOptions);
114
+ if (!basic) {
115
+ return null;
116
+ }
117
+ const { date, characterImage: path } = basic;
111
118
  const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
112
119
  const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
113
120
  const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
@@ -181,6 +188,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
181
188
  const { data } = await this.client.get(path, {
182
189
  params: query,
183
190
  });
191
+ if (this.isEmptyResponse(data)) {
192
+ return null;
193
+ }
184
194
  return new characterPopularity.CharacterPopularityDto(data);
185
195
  }
186
196
  /**
@@ -209,6 +219,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
209
219
  const { data } = await this.client.get(path, {
210
220
  params: query,
211
221
  });
222
+ if (this.isEmptyResponse(data)) {
223
+ return null;
224
+ }
212
225
  return new characterStat.CharacterStatDto(data);
213
226
  }
214
227
  /**
@@ -237,6 +250,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
237
250
  const { data } = await this.client.get(path, {
238
251
  params: query,
239
252
  });
253
+ if (this.isEmptyResponse(data)) {
254
+ return null;
255
+ }
240
256
  return new characterHyperStat.CharacterHyperStatDto(data);
241
257
  }
242
258
  /**
@@ -265,6 +281,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
265
281
  const { data } = await this.client.get(path, {
266
282
  params: query,
267
283
  });
284
+ if (this.isEmptyResponse(data)) {
285
+ return null;
286
+ }
268
287
  return new characterPropensity.CharacterPropensityDto(data);
269
288
  }
270
289
  /**
@@ -293,6 +312,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
293
312
  const { data } = await this.client.get(path, {
294
313
  params: query,
295
314
  });
315
+ if (this.isEmptyResponse(data)) {
316
+ return null;
317
+ }
296
318
  return new characterAbility.CharacterAbilityDto(data);
297
319
  }
298
320
  /**
@@ -321,6 +343,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
321
343
  const { data } = await this.client.get(path, {
322
344
  params: query,
323
345
  });
346
+ if (this.isEmptyResponse(data)) {
347
+ return null;
348
+ }
324
349
  return new characterItemEquipment.CharacterItemEquipmentDto(data);
325
350
  }
326
351
  /**
@@ -349,6 +374,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
349
374
  const { data } = await this.client.get(path, {
350
375
  params: query,
351
376
  });
377
+ if (this.isEmptyResponse(data)) {
378
+ return null;
379
+ }
352
380
  return new characterCashItemEquipment.CharacterCashItemEquipmentDto(data);
353
381
  }
354
382
  /**
@@ -377,6 +405,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
377
405
  const { data } = await this.client.get(path, {
378
406
  params: query,
379
407
  });
408
+ if (this.isEmptyResponse(data)) {
409
+ return null;
410
+ }
380
411
  return new characterSymbolEquipment.CharacterSymbolEquipmentDto(data);
381
412
  }
382
413
  /**
@@ -405,6 +436,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
405
436
  const { data } = await this.client.get(path, {
406
437
  params: query,
407
438
  });
439
+ if (this.isEmptyResponse(data)) {
440
+ return null;
441
+ }
408
442
  return new characterSetEffect.CharacterSetEffectDto(data);
409
443
  }
410
444
  /**
@@ -433,6 +467,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
433
467
  const { data } = await this.client.get(path, {
434
468
  params: query,
435
469
  });
470
+ if (this.isEmptyResponse(data)) {
471
+ return null;
472
+ }
436
473
  return new characterBeautyEquipment.CharacterBeautyEquipmentDto(data);
437
474
  }
438
475
  /**
@@ -461,6 +498,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
461
498
  const { data } = await this.client.get(path, {
462
499
  params: query,
463
500
  });
501
+ if (this.isEmptyResponse(data)) {
502
+ return null;
503
+ }
464
504
  return new characterAndroidEquipment.CharacterAndroidEquipmentDto(data);
465
505
  }
466
506
  /**
@@ -489,6 +529,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
489
529
  const { data } = await this.client.get(path, {
490
530
  params: query,
491
531
  });
532
+ if (this.isEmptyResponse(data)) {
533
+ return null;
534
+ }
492
535
  return new characterPetEquipment.CharacterPetEquipmentDto(data);
493
536
  }
494
537
  /**
@@ -519,6 +562,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
519
562
  const { data } = await this.client.get(path, {
520
563
  params: query,
521
564
  });
565
+ if (this.isEmptyResponse(data)) {
566
+ return null;
567
+ }
522
568
  return new characterSkill.CharacterSkillDto(data);
523
569
  }
524
570
  /**
@@ -547,6 +593,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
547
593
  const { data } = await this.client.get(path, {
548
594
  params: query,
549
595
  });
596
+ if (this.isEmptyResponse(data)) {
597
+ return null;
598
+ }
550
599
  return new characterLinkSkill.CharacterLinkSkillDto(data);
551
600
  }
552
601
  /**
@@ -575,6 +624,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
575
624
  const { data } = await this.client.get(path, {
576
625
  params: query,
577
626
  });
627
+ if (this.isEmptyResponse(data)) {
628
+ return null;
629
+ }
578
630
  return new characterVMatrix.CharacterVMatrixDto(data);
579
631
  }
580
632
  /**
@@ -603,6 +655,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
603
655
  const { data } = await this.client.get(path, {
604
656
  params: query,
605
657
  });
658
+ if (this.isEmptyResponse(data)) {
659
+ return null;
660
+ }
606
661
  return new characterHexaMatrix.CharacterHexaMatrixDto(data);
607
662
  }
608
663
  /**
@@ -631,6 +686,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
631
686
  const { data } = await this.client.get(path, {
632
687
  params: query,
633
688
  });
689
+ if (this.isEmptyResponse(data)) {
690
+ return null;
691
+ }
634
692
  return new characterHexaMatrixStat.CharacterHexaMatrixStatDto(data);
635
693
  }
636
694
  /**
@@ -659,6 +717,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
659
717
  const { data } = await this.client.get(path, {
660
718
  params: query,
661
719
  });
720
+ if (this.isEmptyResponse(data)) {
721
+ return null;
722
+ }
662
723
  return new characterDojang.CharacterDojangDto(data);
663
724
  }
664
725
  //#endregion
@@ -689,6 +750,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
689
750
  const { data } = await this.client.get(path, {
690
751
  params: query,
691
752
  });
753
+ if (this.isEmptyResponse(data)) {
754
+ return null;
755
+ }
692
756
  return new union.UnionDto(data);
693
757
  }
694
758
  /**
@@ -717,6 +781,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
717
781
  const { data } = await this.client.get(path, {
718
782
  params: query,
719
783
  });
784
+ if (this.isEmptyResponse(data)) {
785
+ return null;
786
+ }
720
787
  return new unionRaider.UnionRaiderDto(data);
721
788
  }
722
789
  /**
@@ -745,6 +812,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
745
812
  const { data } = await this.client.get(path, {
746
813
  params: query,
747
814
  });
815
+ if (this.isEmptyResponse(data)) {
816
+ return null;
817
+ }
748
818
  return new unionArtifact.UnionArtifactDto(data);
749
819
  }
750
820
  //#endregion
@@ -767,6 +837,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
767
837
  world_name: worldName,
768
838
  },
769
839
  });
840
+ if (this.isEmptyResponse(data)) {
841
+ return null;
842
+ }
770
843
  return new guild.GuildDto(data);
771
844
  }
772
845
  /**
@@ -795,6 +868,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
795
868
  const { data } = await this.client.get(path, {
796
869
  params: query,
797
870
  });
871
+ if (this.isEmptyResponse(data)) {
872
+ return null;
873
+ }
798
874
  return new guildBasic.GuildBasicDto(data);
799
875
  }
800
876
  }
@@ -78,7 +78,7 @@ class CharacterBasicDto extends characterBasic.CharacterBasicDto {
78
78
  this.characterExpRate = character_exp_rate;
79
79
  this.characterGuildName = character_guild_name;
80
80
  this.characterImage = character_image;
81
- this.characterDateCreate = new Date(character_date_create);
81
+ this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
82
82
  this.accessFlag = access_flag;
83
83
  this.liberationQuestClear = liberation_quest_clear;
84
84
  }
@@ -93,6 +93,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
93
93
  const { data } = await this.client.get(path, {
94
94
  params: query,
95
95
  });
96
+ if (this.isEmptyResponse(data)) {
97
+ return null;
98
+ }
96
99
  return new characterBasic.CharacterBasicDto(data);
97
100
  }
98
101
  /**
@@ -107,7 +110,11 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
107
110
  * @param dateOptions 要搜尋的日期 (TST)
108
111
  */
109
112
  async getCharacterImage(ocid, imageOptions, dateOptions) {
110
- const { date, characterImage: path } = await this.getCharacterBasic(ocid, dateOptions);
113
+ const basic = await this.getCharacterBasic(ocid, dateOptions);
114
+ if (!basic) {
115
+ return null;
116
+ }
117
+ const { date, characterImage: path } = basic;
111
118
  const action = imageOptions?.action ?? characterImage.CharacterImageAction.Stand1;
112
119
  const emotion = imageOptions?.emotion ?? characterImage.CharacterImageEmotion.Default;
113
120
  const wmotion = imageOptions?.wmotion ?? characterImage.CharacterImageWeaponMotion.Default;
@@ -181,6 +188,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
181
188
  const { data } = await this.client.get(path, {
182
189
  params: query,
183
190
  });
191
+ if (this.isEmptyResponse(data)) {
192
+ return null;
193
+ }
184
194
  return new characterPopularity.CharacterPopularityDto(data);
185
195
  }
186
196
  /**
@@ -209,6 +219,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
209
219
  const { data } = await this.client.get(path, {
210
220
  params: query,
211
221
  });
222
+ if (this.isEmptyResponse(data)) {
223
+ return null;
224
+ }
212
225
  return new characterStat.CharacterStatDto(data);
213
226
  }
214
227
  /**
@@ -237,6 +250,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
237
250
  const { data } = await this.client.get(path, {
238
251
  params: query,
239
252
  });
253
+ if (this.isEmptyResponse(data)) {
254
+ return null;
255
+ }
240
256
  return new characterHyperStat.CharacterHyperStatDto(data);
241
257
  }
242
258
  /**
@@ -265,6 +281,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
265
281
  const { data } = await this.client.get(path, {
266
282
  params: query,
267
283
  });
284
+ if (this.isEmptyResponse(data)) {
285
+ return null;
286
+ }
268
287
  return new characterPropensity.CharacterPropensityDto(data);
269
288
  }
270
289
  /**
@@ -293,6 +312,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
293
312
  const { data } = await this.client.get(path, {
294
313
  params: query,
295
314
  });
315
+ if (this.isEmptyResponse(data)) {
316
+ return null;
317
+ }
296
318
  return new characterAbility.CharacterAbilityDto(data);
297
319
  }
298
320
  /**
@@ -321,6 +343,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
321
343
  const { data } = await this.client.get(path, {
322
344
  params: query,
323
345
  });
346
+ if (this.isEmptyResponse(data)) {
347
+ return null;
348
+ }
324
349
  return new characterItemEquipment.CharacterItemEquipmentDto(data);
325
350
  }
326
351
  /**
@@ -349,6 +374,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
349
374
  const { data } = await this.client.get(path, {
350
375
  params: query,
351
376
  });
377
+ if (this.isEmptyResponse(data)) {
378
+ return null;
379
+ }
352
380
  return new characterCashItemEquipment.CharacterCashItemEquipmentDto(data);
353
381
  }
354
382
  /**
@@ -377,6 +405,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
377
405
  const { data } = await this.client.get(path, {
378
406
  params: query,
379
407
  });
408
+ if (this.isEmptyResponse(data)) {
409
+ return null;
410
+ }
380
411
  return new characterSymbolEquipment.CharacterSymbolEquipmentDto(data);
381
412
  }
382
413
  /**
@@ -405,6 +436,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
405
436
  const { data } = await this.client.get(path, {
406
437
  params: query,
407
438
  });
439
+ if (this.isEmptyResponse(data)) {
440
+ return null;
441
+ }
408
442
  return new characterSetEffect.CharacterSetEffectDto(data);
409
443
  }
410
444
  /**
@@ -433,6 +467,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
433
467
  const { data } = await this.client.get(path, {
434
468
  params: query,
435
469
  });
470
+ if (this.isEmptyResponse(data)) {
471
+ return null;
472
+ }
436
473
  return new characterBeautyEquipment.CharacterBeautyEquipmentDto(data);
437
474
  }
438
475
  /**
@@ -461,6 +498,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
461
498
  const { data } = await this.client.get(path, {
462
499
  params: query,
463
500
  });
501
+ if (this.isEmptyResponse(data)) {
502
+ return null;
503
+ }
464
504
  return new characterAndroidEquipment.CharacterAndroidEquipmentDto(data);
465
505
  }
466
506
  /**
@@ -489,6 +529,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
489
529
  const { data } = await this.client.get(path, {
490
530
  params: query,
491
531
  });
532
+ if (this.isEmptyResponse(data)) {
533
+ return null;
534
+ }
492
535
  return new characterPetEquipment.CharacterPetEquipmentDto(data);
493
536
  }
494
537
  /**
@@ -519,6 +562,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
519
562
  const { data } = await this.client.get(path, {
520
563
  params: query,
521
564
  });
565
+ if (this.isEmptyResponse(data)) {
566
+ return null;
567
+ }
522
568
  return new characterSkill.CharacterSkillDto(data);
523
569
  }
524
570
  /**
@@ -547,6 +593,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
547
593
  const { data } = await this.client.get(path, {
548
594
  params: query,
549
595
  });
596
+ if (this.isEmptyResponse(data)) {
597
+ return null;
598
+ }
550
599
  return new characterLinkSkill.CharacterLinkSkillDto(data);
551
600
  }
552
601
  /**
@@ -575,6 +624,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
575
624
  const { data } = await this.client.get(path, {
576
625
  params: query,
577
626
  });
627
+ if (this.isEmptyResponse(data)) {
628
+ return null;
629
+ }
578
630
  return new characterVMatrix.CharacterVMatrixDto(data);
579
631
  }
580
632
  /**
@@ -603,6 +655,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
603
655
  const { data } = await this.client.get(path, {
604
656
  params: query,
605
657
  });
658
+ if (this.isEmptyResponse(data)) {
659
+ return null;
660
+ }
606
661
  return new characterHexaMatrix.CharacterHexaMatrixDto(data);
607
662
  }
608
663
  /**
@@ -631,6 +686,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
631
686
  const { data } = await this.client.get(path, {
632
687
  params: query,
633
688
  });
689
+ if (this.isEmptyResponse(data)) {
690
+ return null;
691
+ }
634
692
  return new characterHexaMatrixStat.CharacterHexaMatrixStatDto(data);
635
693
  }
636
694
  /**
@@ -659,6 +717,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
659
717
  const { data } = await this.client.get(path, {
660
718
  params: query,
661
719
  });
720
+ if (this.isEmptyResponse(data)) {
721
+ return null;
722
+ }
662
723
  return new characterDojang.CharacterDojangDto(data);
663
724
  }
664
725
  //#endregion
@@ -689,6 +750,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
689
750
  const { data } = await this.client.get(path, {
690
751
  params: query,
691
752
  });
753
+ if (this.isEmptyResponse(data)) {
754
+ return null;
755
+ }
692
756
  return new union.UnionDto(data);
693
757
  }
694
758
  /**
@@ -717,6 +781,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
717
781
  const { data } = await this.client.get(path, {
718
782
  params: query,
719
783
  });
784
+ if (this.isEmptyResponse(data)) {
785
+ return null;
786
+ }
720
787
  return new unionRaider.UnionRaiderDto(data);
721
788
  }
722
789
  /**
@@ -745,6 +812,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
745
812
  const { data } = await this.client.get(path, {
746
813
  params: query,
747
814
  });
815
+ if (this.isEmptyResponse(data)) {
816
+ return null;
817
+ }
748
818
  return new unionArtifact.UnionArtifactDto(data);
749
819
  }
750
820
  //#endregion
@@ -767,6 +837,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
767
837
  world_name: worldName,
768
838
  },
769
839
  });
840
+ if (this.isEmptyResponse(data)) {
841
+ return null;
842
+ }
770
843
  return new guild.GuildDto(data);
771
844
  }
772
845
  /**
@@ -795,6 +868,9 @@ class MapleStoryApi extends mapleStoryApi.MapleStoryApi {
795
868
  const { data } = await this.client.get(path, {
796
869
  params: query,
797
870
  });
871
+ if (this.isEmptyResponse(data)) {
872
+ return null;
873
+ }
798
874
  return new guildBasic.GuildBasicDto(data);
799
875
  }
800
876
  }
@@ -107,6 +107,31 @@ class MapleStoryApi {
107
107
  return str;
108
108
  }
109
109
  ;
110
+ /**
111
+ * API 응답 데이터가 비어있는지 확인 합니다.<br/>
112
+ * API 요청 시 날짜에 해당하는 데이터가 없을 경우 date 필드만 값이 존재하는 상황을 검증할 때 사용 합니다.<br/>
113
+ * 일반적으로 API 지원 시작일과 캐릭터 생성일 사이의 날짜를 조회할 때 발생 합니다.
114
+ * @example
115
+ * ```
116
+ * isEmptyResponse({ date: '2024-01-01', popularity: null }) // true
117
+ * isEmptyResponse({ date: '2024-01-01', popularity: 10 }) // false
118
+ * ```
119
+ */
120
+ isEmptyResponse(body) {
121
+ for (const [key, value] of Object.entries(body)) {
122
+ if (key === 'date') {
123
+ continue;
124
+ }
125
+ if (value === null || value === undefined) {
126
+ continue;
127
+ }
128
+ if (Array.isArray(value) && value.length === 0) {
129
+ continue;
130
+ }
131
+ return false;
132
+ }
133
+ return true;
134
+ }
110
135
  }
111
136
 
112
137
  export { MapleStoryApi };
@@ -94,7 +94,7 @@ class CharacterAndroidEquipmentDto extends CharacterAndroidEquipmentDto$1 {
94
94
  ? new CharacterAndroidEquipmentSkinDto(android_skin)
95
95
  : null;
96
96
  this.androidCashItemEquipment = android_cash_item_equipment.map((equipment) => new CharacterAndroidCashItemEquipmentDto(equipment));
97
- this.androidEarSensorClipFlag = android_ear_sensor_clip_flag ?? null;
97
+ this.androidEarSensorClipFlag = android_ear_sensor_clip_flag;
98
98
  this.androidGender = android_gender;
99
99
  this.androidGrade = android_grade;
100
100
  this.androidNonHumanoidFlag = android_non_humanoid_flag;
@@ -74,7 +74,7 @@ class CharacterBasicDto extends CharacterBasicDto$1 {
74
74
  this.characterExpRate = character_exp_rate;
75
75
  this.characterGuildName = character_guild_name;
76
76
  this.characterImage = character_image;
77
- this.characterDateCreate = new Date(character_date_create);
77
+ this.characterDateCreate = character_date_create ? new Date(character_date_create) : null;
78
78
  this.accessFlag = access_flag;
79
79
  this.liberationQuestClear = liberation_quest_clear;
80
80
  }
@@ -18,12 +18,22 @@ class CharacterRingExchangeSkillEquipmentDto {
18
18
  * 링 익스체인지에 등록된 특수 반지 레벨
19
19
  */
20
20
  specialRingExchangeLevel;
21
+ /**
22
+ * 링 익스체인지에 등록된 특수 반지 아이콘
23
+ */
24
+ specialRingExchangeIcon;
25
+ /**
26
+ * 링 익스체인지에 등록된 특수 반지 설명
27
+ */
28
+ specialRingExchangeDescription;
21
29
  constructor(obj) {
22
- const { date, character_class, special_ring_exchange_name, special_ring_exchange_level } = obj;
30
+ const { date, character_class, special_ring_exchange_name, special_ring_exchange_level, special_ring_exchange_icon, special_ring_exchange_description } = obj;
23
31
  this.date = date ? new Date(date) : null;
24
- this.characterClass = character_class ?? '';
32
+ this.characterClass = character_class;
25
33
  this.specialRingExchangeName = special_ring_exchange_name ?? null;
26
34
  this.specialRingExchangeLevel = special_ring_exchange_level ?? null;
35
+ this.specialRingExchangeIcon = special_ring_exchange_icon ?? null;
36
+ this.specialRingExchangeDescription = special_ring_exchange_description ?? null;
27
37
  }
28
38
  }
29
39
 
@@ -90,7 +90,7 @@ class StarforceHistoryDto {
90
90
  this.dateCreate = new Date(date_create);
91
91
  this.starforceEventList =
92
92
  starforce_event_list?.map((event) => new StarforceEventDto(event)) ??
93
- null;
93
+ [];
94
94
  }
95
95
  }
96
96
  /**