maplestory-openapi 3.4.1 → 3.5.1
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/README.md +11 -10
- package/dist/cjs/maplestory/api/common/lib.js +16 -0
- package/dist/cjs/maplestory/api/common/mapleStoryApi.js +25 -0
- package/dist/cjs/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
- package/dist/cjs/maplestory/api/kms/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +1 -1
- package/dist/cjs/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
- package/dist/cjs/maplestory/api/kms/mapleStoryApi.js +98 -11
- package/dist/cjs/maplestory/api/msea/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/msea/mapleStoryApi.js +79 -1
- package/dist/cjs/maplestory/api/tms/dto/character/characterBasic.js +3 -2
- package/dist/cjs/maplestory/api/tms/mapleStoryApi.js +79 -1
- package/dist/esm/maplestory/api/common/lib.js +16 -1
- package/dist/esm/maplestory/api/common/mapleStoryApi.js +25 -0
- package/dist/esm/maplestory/api/kms/dto/character/characterAndroidEquipment.js +1 -1
- package/dist/esm/maplestory/api/kms/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/kms/dto/character/characterRingExchangeSkillEquipment.js +1 -1
- package/dist/esm/maplestory/api/kms/dto/history/starforceHistory.js +1 -1
- package/dist/esm/maplestory/api/kms/mapleStoryApi.js +98 -11
- package/dist/esm/maplestory/api/msea/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/msea/mapleStoryApi.js +79 -1
- package/dist/esm/maplestory/api/tms/dto/character/characterBasic.js +3 -2
- package/dist/esm/maplestory/api/tms/mapleStoryApi.js +79 -1
- package/dist/index.min.js +1 -1
- package/package.json +4 -3
- package/types/maplestory/api/common/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/common/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/common/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/common/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/common/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/common/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/common/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/common/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/common/lib.d.ts +9 -0
- package/types/maplestory/api/common/mapleStoryApi.d.ts +36 -25
- package/types/maplestory/api/kms/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterAndroidEquipment.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/kms/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/kms/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/kms/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/kms/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/kms/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/kms/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/kms/dto/history/starforceHistory.d.ts +4 -4
- package/types/maplestory/api/kms/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/kms/mapleStoryApi.d.ts +32 -32
- package/types/maplestory/api/kms/response/character/characterAndroidEquipmentBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/kms/response/union/unionRaiderBody.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/msea/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/msea/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/msea/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/msea/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/msea/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/msea/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/msea/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/msea/mapleStoryApi.d.ts +25 -25
- package/types/maplestory/api/msea/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/msea/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/msea/response/union/unionRaiderBody.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterAbility.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterBasic.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterCashItemEquipment.d.ts +3 -3
- package/types/maplestory/api/tms/dto/character/characterDojang.d.ts +4 -4
- package/types/maplestory/api/tms/dto/character/characterHexaMatrixStat.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterHyperStat.d.ts +6 -6
- package/types/maplestory/api/tms/dto/character/characterItemEquipment.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterLinkSkill.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterPropensity.d.ts +6 -6
- package/types/maplestory/api/tms/dto/character/characterSkill.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterStat.d.ts +2 -2
- package/types/maplestory/api/tms/dto/character/characterSymbolEquipment.d.ts +1 -1
- package/types/maplestory/api/tms/dto/character/characterVMatrix.d.ts +2 -2
- package/types/maplestory/api/tms/dto/union/unionRaider.d.ts +1 -1
- package/types/maplestory/api/tms/mapleStoryApi.d.ts +25 -25
- package/types/maplestory/api/tms/response/character/characterBasicBody.d.ts +1 -1
- package/types/maplestory/api/tms/response/character/characterPopularityBody.d.ts +1 -1
- package/types/maplestory/api/tms/response/union/unionRaiderBody.d.ts +1 -1
|
@@ -28,6 +28,7 @@ import { UnionArtifactDto } from './dto/union/unionArtifact.js';
|
|
|
28
28
|
import { UnionRaiderDto } from './dto/union/unionRaider.js';
|
|
29
29
|
import { CharacterImageAction, CharacterImageEmotion, CharacterImageWeaponMotion } from '../common/enum/characterImage.js';
|
|
30
30
|
import { MapleStoryApi as MapleStoryApi$1 } from '../common/mapleStoryApi.js';
|
|
31
|
+
import { removeQuery } from '../common/lib.js';
|
|
31
32
|
import { __exports as buffer } from '../../../_virtual/index.js_commonjs-exports.js';
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -85,6 +86,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
85
86
|
const { data } = await this.client.get(path, {
|
|
86
87
|
params: query,
|
|
87
88
|
});
|
|
89
|
+
if (this.isEmptyResponse(data)) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
88
92
|
return new CharacterBasicDto(data);
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
@@ -99,7 +103,11 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
99
103
|
* @param dateOptions 要搜尋的日期 (TST)
|
|
100
104
|
*/
|
|
101
105
|
async getCharacterImage(ocid, imageOptions, dateOptions) {
|
|
102
|
-
const
|
|
106
|
+
const basic = await this.getCharacterBasic(ocid, dateOptions);
|
|
107
|
+
if (!basic) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
const { date, characterImage } = basic;
|
|
103
111
|
const action = imageOptions?.action ?? CharacterImageAction.Stand1;
|
|
104
112
|
const emotion = imageOptions?.emotion ?? CharacterImageEmotion.Default;
|
|
105
113
|
const wmotion = imageOptions?.wmotion ?? CharacterImageWeaponMotion.Default;
|
|
@@ -109,6 +117,7 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
109
117
|
const height = 96;
|
|
110
118
|
const x = imageOptions?.x ?? null;
|
|
111
119
|
const y = imageOptions?.y ?? null;
|
|
120
|
+
const path = removeQuery(characterImage);
|
|
112
121
|
const query = {
|
|
113
122
|
action: `${action}.${actionFrame}`,
|
|
114
123
|
emotion: `${emotion}.${emotionFrame}`,
|
|
@@ -173,6 +182,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
173
182
|
const { data } = await this.client.get(path, {
|
|
174
183
|
params: query,
|
|
175
184
|
});
|
|
185
|
+
if (this.isEmptyResponse(data)) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
176
188
|
return new CharacterPopularityDto(data);
|
|
177
189
|
}
|
|
178
190
|
/**
|
|
@@ -201,6 +213,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
201
213
|
const { data } = await this.client.get(path, {
|
|
202
214
|
params: query,
|
|
203
215
|
});
|
|
216
|
+
if (this.isEmptyResponse(data)) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
204
219
|
return new CharacterStatDto(data);
|
|
205
220
|
}
|
|
206
221
|
/**
|
|
@@ -229,6 +244,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
229
244
|
const { data } = await this.client.get(path, {
|
|
230
245
|
params: query,
|
|
231
246
|
});
|
|
247
|
+
if (this.isEmptyResponse(data)) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
232
250
|
return new CharacterHyperStatDto(data);
|
|
233
251
|
}
|
|
234
252
|
/**
|
|
@@ -257,6 +275,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
257
275
|
const { data } = await this.client.get(path, {
|
|
258
276
|
params: query,
|
|
259
277
|
});
|
|
278
|
+
if (this.isEmptyResponse(data)) {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
260
281
|
return new CharacterPropensityDto(data);
|
|
261
282
|
}
|
|
262
283
|
/**
|
|
@@ -285,6 +306,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
285
306
|
const { data } = await this.client.get(path, {
|
|
286
307
|
params: query,
|
|
287
308
|
});
|
|
309
|
+
if (this.isEmptyResponse(data)) {
|
|
310
|
+
return null;
|
|
311
|
+
}
|
|
288
312
|
return new CharacterAbilityDto(data);
|
|
289
313
|
}
|
|
290
314
|
/**
|
|
@@ -313,6 +337,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
313
337
|
const { data } = await this.client.get(path, {
|
|
314
338
|
params: query,
|
|
315
339
|
});
|
|
340
|
+
if (this.isEmptyResponse(data)) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
316
343
|
return new CharacterItemEquipmentDto(data);
|
|
317
344
|
}
|
|
318
345
|
/**
|
|
@@ -341,6 +368,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
341
368
|
const { data } = await this.client.get(path, {
|
|
342
369
|
params: query,
|
|
343
370
|
});
|
|
371
|
+
if (this.isEmptyResponse(data)) {
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
344
374
|
return new CharacterCashItemEquipmentDto(data);
|
|
345
375
|
}
|
|
346
376
|
/**
|
|
@@ -369,6 +399,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
369
399
|
const { data } = await this.client.get(path, {
|
|
370
400
|
params: query,
|
|
371
401
|
});
|
|
402
|
+
if (this.isEmptyResponse(data)) {
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
372
405
|
return new CharacterSymbolEquipmentDto(data);
|
|
373
406
|
}
|
|
374
407
|
/**
|
|
@@ -397,6 +430,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
397
430
|
const { data } = await this.client.get(path, {
|
|
398
431
|
params: query,
|
|
399
432
|
});
|
|
433
|
+
if (this.isEmptyResponse(data)) {
|
|
434
|
+
return null;
|
|
435
|
+
}
|
|
400
436
|
return new CharacterSetEffectDto(data);
|
|
401
437
|
}
|
|
402
438
|
/**
|
|
@@ -425,6 +461,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
425
461
|
const { data } = await this.client.get(path, {
|
|
426
462
|
params: query,
|
|
427
463
|
});
|
|
464
|
+
if (this.isEmptyResponse(data)) {
|
|
465
|
+
return null;
|
|
466
|
+
}
|
|
428
467
|
return new CharacterBeautyEquipmentDto(data);
|
|
429
468
|
}
|
|
430
469
|
/**
|
|
@@ -453,6 +492,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
453
492
|
const { data } = await this.client.get(path, {
|
|
454
493
|
params: query,
|
|
455
494
|
});
|
|
495
|
+
if (this.isEmptyResponse(data)) {
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
456
498
|
return new CharacterAndroidEquipmentDto(data);
|
|
457
499
|
}
|
|
458
500
|
/**
|
|
@@ -481,6 +523,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
481
523
|
const { data } = await this.client.get(path, {
|
|
482
524
|
params: query,
|
|
483
525
|
});
|
|
526
|
+
if (this.isEmptyResponse(data)) {
|
|
527
|
+
return null;
|
|
528
|
+
}
|
|
484
529
|
return new CharacterPetEquipmentDto(data);
|
|
485
530
|
}
|
|
486
531
|
/**
|
|
@@ -511,6 +556,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
511
556
|
const { data } = await this.client.get(path, {
|
|
512
557
|
params: query,
|
|
513
558
|
});
|
|
559
|
+
if (this.isEmptyResponse(data)) {
|
|
560
|
+
return null;
|
|
561
|
+
}
|
|
514
562
|
return new CharacterSkillDto(data);
|
|
515
563
|
}
|
|
516
564
|
/**
|
|
@@ -539,6 +587,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
539
587
|
const { data } = await this.client.get(path, {
|
|
540
588
|
params: query,
|
|
541
589
|
});
|
|
590
|
+
if (this.isEmptyResponse(data)) {
|
|
591
|
+
return null;
|
|
592
|
+
}
|
|
542
593
|
return new CharacterLinkSkillDto(data);
|
|
543
594
|
}
|
|
544
595
|
/**
|
|
@@ -567,6 +618,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
567
618
|
const { data } = await this.client.get(path, {
|
|
568
619
|
params: query,
|
|
569
620
|
});
|
|
621
|
+
if (this.isEmptyResponse(data)) {
|
|
622
|
+
return null;
|
|
623
|
+
}
|
|
570
624
|
return new CharacterVMatrixDto(data);
|
|
571
625
|
}
|
|
572
626
|
/**
|
|
@@ -595,6 +649,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
595
649
|
const { data } = await this.client.get(path, {
|
|
596
650
|
params: query,
|
|
597
651
|
});
|
|
652
|
+
if (this.isEmptyResponse(data)) {
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
598
655
|
return new CharacterHexaMatrixDto(data);
|
|
599
656
|
}
|
|
600
657
|
/**
|
|
@@ -623,6 +680,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
623
680
|
const { data } = await this.client.get(path, {
|
|
624
681
|
params: query,
|
|
625
682
|
});
|
|
683
|
+
if (this.isEmptyResponse(data)) {
|
|
684
|
+
return null;
|
|
685
|
+
}
|
|
626
686
|
return new CharacterHexaMatrixStatDto(data);
|
|
627
687
|
}
|
|
628
688
|
/**
|
|
@@ -651,6 +711,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
651
711
|
const { data } = await this.client.get(path, {
|
|
652
712
|
params: query,
|
|
653
713
|
});
|
|
714
|
+
if (this.isEmptyResponse(data)) {
|
|
715
|
+
return null;
|
|
716
|
+
}
|
|
654
717
|
return new CharacterDojangDto(data);
|
|
655
718
|
}
|
|
656
719
|
//#endregion
|
|
@@ -681,6 +744,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
681
744
|
const { data } = await this.client.get(path, {
|
|
682
745
|
params: query,
|
|
683
746
|
});
|
|
747
|
+
if (this.isEmptyResponse(data)) {
|
|
748
|
+
return null;
|
|
749
|
+
}
|
|
684
750
|
return new UnionDto(data);
|
|
685
751
|
}
|
|
686
752
|
/**
|
|
@@ -709,6 +775,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
709
775
|
const { data } = await this.client.get(path, {
|
|
710
776
|
params: query,
|
|
711
777
|
});
|
|
778
|
+
if (this.isEmptyResponse(data)) {
|
|
779
|
+
return null;
|
|
780
|
+
}
|
|
712
781
|
return new UnionRaiderDto(data);
|
|
713
782
|
}
|
|
714
783
|
/**
|
|
@@ -737,6 +806,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
737
806
|
const { data } = await this.client.get(path, {
|
|
738
807
|
params: query,
|
|
739
808
|
});
|
|
809
|
+
if (this.isEmptyResponse(data)) {
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
740
812
|
return new UnionArtifactDto(data);
|
|
741
813
|
}
|
|
742
814
|
//#endregion
|
|
@@ -759,6 +831,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
759
831
|
world_name: worldName,
|
|
760
832
|
},
|
|
761
833
|
});
|
|
834
|
+
if (this.isEmptyResponse(data)) {
|
|
835
|
+
return null;
|
|
836
|
+
}
|
|
762
837
|
return new GuildDto(data);
|
|
763
838
|
}
|
|
764
839
|
/**
|
|
@@ -787,6 +862,9 @@ class MapleStoryApi extends MapleStoryApi$1 {
|
|
|
787
862
|
const { data } = await this.client.get(path, {
|
|
788
863
|
params: query,
|
|
789
864
|
});
|
|
865
|
+
if (this.isEmptyResponse(data)) {
|
|
866
|
+
return null;
|
|
867
|
+
}
|
|
790
868
|
return new GuildBasicDto(data);
|
|
791
869
|
}
|
|
792
870
|
}
|
package/dist/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("axios"),require("dayjs")):"function"==typeof define&&define.amd?define(["exports","axios","dayjs"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["maplestory-openapi"]={},t.axios,t.dayjs)}(this,function(t,e,a){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(e),i=r(a),s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});!function(t){var e,a;t.exports=(e={year:0,month:1,day:2,hour:3,minute:4,second:5},a={},function(t,r,o){var i,s=function(t,e,r){void 0===r&&(r={});var o=new Date(t),i=function(t,e){void 0===e&&(e={});var r=e.timeZoneName||"short",o=t+"|"+r,i=a[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),a[o]=i),i}(e,r);return i.formatToParts(o)},n=function(t,a){for(var r=s(t,a),i=[],n=0;n<r.length;n+=1){var c=r[n],l=c.type,u=c.value,h=e[l];h>=0&&(i[h]=parseInt(u,10))}var f=i[3],m=24===f?0:f,d=i[0]+"-"+i[1]+"-"+i[2]+" "+m+":"+i[4]+":"+i[5]+":000",E=+t;return(o.utc(d).valueOf()-(E-=E%1e3))/6e4},c=r.prototype;c.tz=function(t,e){void 0===t&&(t=i);var a,r=this.utcOffset(),s=this.toDate(),n=s.toLocaleString("en-US",{timeZone:t}),c=Math.round((s-new Date(n))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-c;if(Number(l)){if(a=o(n,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),e){var u=a.utcOffset();a=a.add(r-u,"minute")}}else a=this.utcOffset(0,e);return a.$x.$timezone=t,a},c.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),a=s(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return a&&a.value};var l=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return l.call(this,t,e);var a=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(a,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,a){var r=a&&e,s=a||e||i,c=n(+o(),s);if("string"!=typeof t)return o(t).tz(s);var l=function(t,e,a){var r=t-60*e*1e3,o=n(r,a);if(e===o)return[r,e];var i=n(r-=60*(o-e)*1e3,a);return o===i?[r,o]:[t-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(t,r).valueOf(),c,s),u=l[0],h=l[1],f=o(u).utcOffset(h);return f.$x.$timezone=s,f},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){i=t}})}(s);var n=s.exports,c={exports:{}};!function(t){var e,a,r;t.exports=(e="minute",a=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g,function(t,o,i){var s=o.prototype;i.utc=function(t){return new o({date:t,utc:!0,args:arguments})},s.utc=function(t){var a=i(this.toDate(),{locale:this.$L,utc:!0});return t?a.add(this.utcOffset(),e):a},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var n=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),n.call(this,t)};var c=s.init;s.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var l=s.utcOffset;s.utcOffset=function(t,o){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(a);if(!e)return null;var o=(""+e[0]).match(r)||["-",0,0],i=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===i?s:-s}(t),null===t))return this;var s=Math.abs(t)<=16?60*t:t;if(0===s)return this.utc(o);var n=this.clone();if(o)return n.$offset=s,n.$u=!1,n;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(s+c,e)).$offset=s,n.$x.$localOffset=c,n};var u=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var h=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var f=s.diff;s.diff=function(t,e,a){if(t&&this.$u===t.$u)return f.call(this,t,e,a);var r=this.local(),o=i(t).local();return f.call(r,o,e,a)}})}(c);var l,u=c.exports;class h extends Error{name="MapleStoryApiError";errorCode;message;constructor(t){const{name:e,message:a}=t.error;super(a),this.errorCode=f[e],this.message=a}}t.MapleStoryApiErrorCode=void 0,(l=t.MapleStoryApiErrorCode||(t.MapleStoryApiErrorCode={}))[l.OPENAPI00001=0]="OPENAPI00001",l[l.OPENAPI00002=1]="OPENAPI00002",l[l.OPENAPI00003=2]="OPENAPI00003",l[l.OPENAPI00004=3]="OPENAPI00004",l[l.OPENAPI00005=4]="OPENAPI00005",l[l.OPENAPI00006=5]="OPENAPI00006",l[l.OPENAPI00007=6]="OPENAPI00007",l[l.OPENAPI00009=7]="OPENAPI00009",l[l.OPENAPI00010=8]="OPENAPI00010",l[l.OPENAPI00011=9]="OPENAPI00011";const f={OPENAPI00001:t.MapleStoryApiErrorCode.OPENAPI00001,OPENAPI00002:t.MapleStoryApiErrorCode.OPENAPI00002,OPENAPI00003:t.MapleStoryApiErrorCode.OPENAPI00003,OPENAPI00004:t.MapleStoryApiErrorCode.OPENAPI00004,OPENAPI00005:t.MapleStoryApiErrorCode.OPENAPI00005,OPENAPI00006:t.MapleStoryApiErrorCode.OPENAPI00006,OPENAPI00007:t.MapleStoryApiErrorCode.OPENAPI00007,OPENAPI00009:t.MapleStoryApiErrorCode.OPENAPI00009,OPENAPI00010:t.MapleStoryApiErrorCode.OPENAPI00010,OPENAPI00011:t.MapleStoryApiErrorCode.OPENAPI00011};i.default.extend(n),i.default.extend(u);class m{apiKey;client;static BASE_URL="https://open.api.nexon.com/";static DEFAULT_TIMEOUT=5e3;get timeout(){return this.client.defaults.timeout}set timeout(t){this.client.defaults.timeout=t}constructor(t){this.apiKey=t,this.client=o.default.create({baseURL:m.BASE_URL,timeout:m.DEFAULT_TIMEOUT,headers:{"x-nxopen-api-key":this.apiKey}}),this.client.interceptors.response.use(t=>t,t=>{if(t instanceof e.AxiosError){const e=t.response.data;throw new h(e)}throw t})}getProperDefaultDateOptions(t){const{hour:e,minute:a,dateOffset:r}=t,o=i.default().utcOffset(this.timezoneOffset),s=i.default().utcOffset(this.timezoneOffset).hour(e).minute(a);let n;return n=o.isAfter(s)?o:o.subtract(1,"day"),n=n.subtract(r??0,"day"),{year:n.year(),month:n.month()+1,day:n.date()}}toDateString(t,e){const a=t=>{let e,a,r,o;return t instanceof Date?(o=i.default(t).utcOffset(this.timezoneOffset),e=o.year(),a=o.month()+1,r=o.date()):(e=t.year,a=t.month,r=t.day,o=i.default(`${e}-${a}-${r}`).utcOffset(this.timezoneOffset)),{year:e,month:a,day:r,d:o}},{year:r,month:o,day:s,d:n}=a(t),c=n.format("YYYY-MM-DD");if(e){const{year:t,month:n,day:c}=a(e);if(r<t||r===t&&o<n||r===t&&o===n&&s<c)throw new Error(`You can only retrieve data after ${i.default(`${t}-${n}-${c}`).format("YYYY-MM-DD")}.`)}return c}}var d,E,p,A;t.CharacterImageAction=void 0,(d=t.CharacterImageAction||(t.CharacterImageAction={})).Stand1="A00",d.Stand2="A01",d.Walk1="A02",d.Walk2="A03",d.Prone="A04",d.Fly="A05",d.Jump="A06",d.Sit="A07",d.Ladder="A08",d.Rope="A09",d.Heal="A10",d.Alert="A11",d.ProneStab="A12",d.SwingO1="A13",d.SwingO2="A14",d.SwingO3="A15",d.SwingOF="A16",d.SwingP1="A17",d.SwingP2="A18",d.SwingPF="A19",d.SwingT1="A20",d.SwingT2="A21",d.SwingT3="A22",d.SwingTF="A23",d.StabO1="A24",d.StabO2="A25",d.StabOF="A26",d.StabT1="A27",d.StabT2="A28",d.StabTF="A29",d.Shoot1="A30",d.Shoot2="A31",d.ShootF="A32",d.Dead="A33",d.GhostWalk="A34",d.GhostStand="A35",d.GhostJump="A36",d.GhostProneStab="A37",d.GhostLadder="A38",d.GhostRope="A39",d.GhostFly="A40",d.GhostSit="A41",t.CharacterImageEmotion=void 0,(E=t.CharacterImageEmotion||(t.CharacterImageEmotion={})).Default="E00",E.Wink="E01",E.Smile="E02",E.Cry="E03",E.Angry="E04",E.Bewildered="E05",E.Blink="E06",E.Blaze="E07",E.Bowing="E08",E.Cheers="E09",E.Chu="E10",E.Dam="E11",E.Despair="E12",E.Glitter="E13",E.Hit="E14",E.Hot="E15",E.Hum="E16",E.Love="E17",E.Oops="E18",E.Pain="E19",E.Troubled="E20",E.QBlue="E21",E.Shine="E22",E.Stunned="E23",E.Vomit="E24",t.CharacterImageWeaponMotion=void 0,(p=t.CharacterImageWeaponMotion||(t.CharacterImageWeaponMotion={})).Default="W00",p.OneHand="W01",p.TwoHands="W02",p.Gun="W03",p.Nothing="W04",t.PotentialOptionGrade=void 0,(A=t.PotentialOptionGrade||(t.PotentialOptionGrade={}))[A.RARE=0]="RARE",A[A.EPIC=1]="EPIC",A[A.UNIQUE=2]="UNIQUE",A[A.LEGENDARY=3]="LEGENDARY";t.CharacterAbilityDto=class{},t.CharacterAbilityInfoDto=class{},t.CharacterAbilityPresetDto=class{},t.CharacterAndroidCashItemEquipmentColoringPrismDto=class{},t.CharacterAndroidCashItemEquipmentDto=class{},t.CharacterAndroidCashItemEquipmentOptionDto=class{},t.CharacterAndroidEquipmentDto=class{},t.CharacterAndroidEquipmentFaceDto=class{},t.CharacterAndroidEquipmentHairDto=class{},t.CharacterAndroidEquipmentPresetDto=class{},t.CharacterAndroidEquipmentSkinDto=class{},t.CharacterBasicDto=class{get isAccessFlag(){return"true"===this.accessFlag}},t.CharacterBeautyEquipmentDto=class{},t.CharacterBeautyEquipmentFaceDto=class{},t.CharacterBeautyEquipmentHairDto=class{},t.CharacterBeautyEquipmentSkinDto=class{},t.CharacterCashItemEquipmentColoringPrismDto=class{},t.CharacterCashItemEquipmentDto=class{},t.CharacterCashItemEquipmentOptionDto=class{},t.CharacterCashItemEquipmentPresetDto=class{},t.CharacterDojangDto=class{},t.CharacterDto=class{},t.CharacterFinalStatDto=class{},t.CharacterHexaMatrixDto=class{},t.CharacterHexaMatrixEquipmentDto=class{},t.CharacterHexaMatrixEquipmentLinkedSkillDto=class{},t.CharacterHexaMatrixStatCoreDto=class{},t.CharacterHexaMatrixStatDto=class{},t.CharacterHyperStatDto=class{},t.CharacterHyperStatPresetDto=class{},t.CharacterImageDto=class{},t.CharacterItemEquipmentAddOptionDto=class{},t.CharacterItemEquipmentBaseOptionDto=class{},t.CharacterItemEquipmentDragonInfoDto=class{},t.CharacterItemEquipmentDto=class{},t.CharacterItemEquipmentEtcOptionDto=class{},t.CharacterItemEquipmentExceptionalOptionDto=class{},t.CharacterItemEquipmentInfoDto=class{},t.CharacterItemEquipmentMechanicInfoDto=class{},t.CharacterItemEquipmentStarforceOptionDto=class{},t.CharacterItemEquipmentTitleDto=class{},t.CharacterItemEquipmentTotalOptionDto=class{},t.CharacterLinkSkillDto=class{},t.CharacterLinkSkillInfoDto=class{},t.CharacterPetEquipmentAutoSkillDto=class{},t.CharacterPetEquipmentDto=class{},t.CharacterPetEquipmentItemDto=class{},t.CharacterPetEquipmentItemOptionDto=class{},t.CharacterPopularityDto=class{},t.CharacterPropensityDto=class{},t.CharacterSetEffectDto=class{},t.CharacterSetEffectInfoDto=class{},t.CharacterSetEffectOptionFullDto=class{},t.CharacterSetEffectSetDto=class{},t.CharacterSkillDto=class{},t.CharacterSkillInfoDto=class{},t.CharacterStatDto=class{},t.CharacterSymbolEquipmentDto=class{},t.CharacterSymbolEquipmentInfoDto=class{},t.CharacterVMatrixCodeEquipmentDto=class{},t.CharacterVMatrixDto=class{},t.GuildBasicDto=class{},t.GuildDto=class{},t.GuildSkillDto=class{},t.MapleStoryApi=m,t.MapleStoryApiError=h,t.UnionArtifactCrystalDto=class{},t.UnionArtifactDto=class{},t.UnionArtifactEffectDto=class{},t.UnionDto=class{},t.UnionRaiderBlockControlPointDto=class{},t.UnionRaiderBlockDto=class{},t.UnionRaiderBlockPositionDto=class{},t.UnionRaiderDto=class{},t.UnionRaiderInnerStatDto=class{},t.UnionRaiderPresetDto=class{}});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("axios"),require("dayjs")):"function"==typeof define&&define.amd?define(["exports","axios","dayjs"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["maplestory-openapi"]={},t.axios,t.dayjs)}(this,function(t,e,a){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(e),i=r(a),s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});!function(t){var e,a;t.exports=(e={year:0,month:1,day:2,hour:3,minute:4,second:5},a={},function(t,r,o){var i,s=function(t,e,r){void 0===r&&(r={});var o=new Date(t),i=function(t,e){void 0===e&&(e={});var r=e.timeZoneName||"short",o=t+"|"+r,i=a[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),a[o]=i),i}(e,r);return i.formatToParts(o)},n=function(t,a){for(var r=s(t,a),i=[],n=0;n<r.length;n+=1){var c=r[n],l=c.type,u=c.value,f=e[l];f>=0&&(i[f]=parseInt(u,10))}var h=i[3],m=24===h?0:h,d=i[0]+"-"+i[1]+"-"+i[2]+" "+m+":"+i[4]+":"+i[5]+":000",E=+t;return(o.utc(d).valueOf()-(E-=E%1e3))/6e4},c=r.prototype;c.tz=function(t,e){void 0===t&&(t=i);var a,r=this.utcOffset(),s=this.toDate(),n=s.toLocaleString("en-US",{timeZone:t}),c=Math.round((s-new Date(n))/1e3/60),l=15*-Math.round(s.getTimezoneOffset()/15)-c;if(Number(l)){if(a=o(n,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),e){var u=a.utcOffset();a=a.add(r-u,"minute")}}else a=this.utcOffset(0,e);return a.$x.$timezone=t,a},c.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),a=s(this.valueOf(),e,{timeZoneName:t}).find(function(t){return"timezonename"===t.type.toLowerCase()});return a&&a.value};var l=c.startOf;c.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return l.call(this,t,e);var a=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(a,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,a){var r=a&&e,s=a||e||i,c=n(+o(),s);if("string"!=typeof t)return o(t).tz(s);var l=function(t,e,a){var r=t-60*e*1e3,o=n(r,a);if(e===o)return[r,e];var i=n(r-=60*(o-e)*1e3,a);return o===i?[r,o]:[t-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(t,r).valueOf(),c,s),u=l[0],f=l[1],h=o(u).utcOffset(f);return h.$x.$timezone=s,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){i=t}})}(s);var n=s.exports,c={exports:{}};!function(t){var e,a,r;t.exports=(e="minute",a=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g,function(t,o,i){var s=o.prototype;i.utc=function(t){return new o({date:t,utc:!0,args:arguments})},s.utc=function(t){var a=i(this.toDate(),{locale:this.$L,utc:!0});return t?a.add(this.utcOffset(),e):a},s.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var n=s.parse;s.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),n.call(this,t)};var c=s.init;s.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var l=s.utcOffset;s.utcOffset=function(t,o){var i=this.$utils().u;if(i(t))return this.$u?0:i(this.$offset)?l.call(this):this.$offset;if("string"==typeof t&&(t=function(t){void 0===t&&(t="");var e=t.match(a);if(!e)return null;var o=(""+e[0]).match(r)||["-",0,0],i=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===i?s:-s}(t),null===t))return this;var s=Math.abs(t)<=16?60*t:t;if(0===s)return this.utc(o);var n=this.clone();if(o)return n.$offset=s,n.$u=!1,n;var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(n=this.local().add(s+c,e)).$offset=s,n.$x.$localOffset=c,n};var u=s.format;s.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},s.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var f=s.toDate;s.toDate=function(t){return"s"===t&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():f.call(this)};var h=s.diff;s.diff=function(t,e,a){if(t&&this.$u===t.$u)return h.call(this,t,e,a);var r=this.local(),o=i(t).local();return h.call(r,o,e,a)}})}(c);var l,u=c.exports;class f extends Error{name="MapleStoryApiError";errorCode;message;constructor(t){const{name:e,message:a}=t.error;super(a),this.errorCode=h[e],this.message=a}}t.MapleStoryApiErrorCode=void 0,(l=t.MapleStoryApiErrorCode||(t.MapleStoryApiErrorCode={}))[l.OPENAPI00001=0]="OPENAPI00001",l[l.OPENAPI00002=1]="OPENAPI00002",l[l.OPENAPI00003=2]="OPENAPI00003",l[l.OPENAPI00004=3]="OPENAPI00004",l[l.OPENAPI00005=4]="OPENAPI00005",l[l.OPENAPI00006=5]="OPENAPI00006",l[l.OPENAPI00007=6]="OPENAPI00007",l[l.OPENAPI00009=7]="OPENAPI00009",l[l.OPENAPI00010=8]="OPENAPI00010",l[l.OPENAPI00011=9]="OPENAPI00011";const h={OPENAPI00001:t.MapleStoryApiErrorCode.OPENAPI00001,OPENAPI00002:t.MapleStoryApiErrorCode.OPENAPI00002,OPENAPI00003:t.MapleStoryApiErrorCode.OPENAPI00003,OPENAPI00004:t.MapleStoryApiErrorCode.OPENAPI00004,OPENAPI00005:t.MapleStoryApiErrorCode.OPENAPI00005,OPENAPI00006:t.MapleStoryApiErrorCode.OPENAPI00006,OPENAPI00007:t.MapleStoryApiErrorCode.OPENAPI00007,OPENAPI00009:t.MapleStoryApiErrorCode.OPENAPI00009,OPENAPI00010:t.MapleStoryApiErrorCode.OPENAPI00010,OPENAPI00011:t.MapleStoryApiErrorCode.OPENAPI00011};i.default.extend(n),i.default.extend(u);class m{apiKey;client;static BASE_URL="https://open.api.nexon.com/";static DEFAULT_TIMEOUT=5e3;get timeout(){return this.client.defaults.timeout}set timeout(t){this.client.defaults.timeout=t}constructor(t){this.apiKey=t,this.client=o.default.create({baseURL:m.BASE_URL,timeout:m.DEFAULT_TIMEOUT,headers:{"x-nxopen-api-key":this.apiKey}}),this.client.interceptors.response.use(t=>t,t=>{if(t instanceof e.AxiosError){const e=t.response.data;throw new f(e)}throw t})}getProperDefaultDateOptions(t){const{hour:e,minute:a,dateOffset:r}=t,o=i.default().utcOffset(this.timezoneOffset),s=i.default().utcOffset(this.timezoneOffset).hour(e).minute(a);let n;return n=o.isAfter(s)?o:o.subtract(1,"day"),n=n.subtract(r??0,"day"),{year:n.year(),month:n.month()+1,day:n.date()}}toDateString(t,e){const a=t=>{let e,a,r,o;return t instanceof Date?(o=i.default(t).utcOffset(this.timezoneOffset),e=o.year(),a=o.month()+1,r=o.date()):(e=t.year,a=t.month,r=t.day,o=i.default(`${e}-${a}-${r}`).utcOffset(this.timezoneOffset)),{year:e,month:a,day:r,d:o}},{year:r,month:o,day:s,d:n}=a(t),c=n.format("YYYY-MM-DD");if(e){const{year:t,month:n,day:c}=a(e);if(r<t||r===t&&o<n||r===t&&o===n&&s<c)throw new Error(`You can only retrieve data after ${i.default(`${t}-${n}-${c}`).format("YYYY-MM-DD")}.`)}return c}isEmptyResponse(t){for(const[e,a]of Object.entries(t))if("date"!==e&&null!=a&&(!Array.isArray(a)||0!==a.length))return!1;return!0}}var d,E,p,A;t.CharacterImageAction=void 0,(d=t.CharacterImageAction||(t.CharacterImageAction={})).Stand1="A00",d.Stand2="A01",d.Walk1="A02",d.Walk2="A03",d.Prone="A04",d.Fly="A05",d.Jump="A06",d.Sit="A07",d.Ladder="A08",d.Rope="A09",d.Heal="A10",d.Alert="A11",d.ProneStab="A12",d.SwingO1="A13",d.SwingO2="A14",d.SwingO3="A15",d.SwingOF="A16",d.SwingP1="A17",d.SwingP2="A18",d.SwingPF="A19",d.SwingT1="A20",d.SwingT2="A21",d.SwingT3="A22",d.SwingTF="A23",d.StabO1="A24",d.StabO2="A25",d.StabOF="A26",d.StabT1="A27",d.StabT2="A28",d.StabTF="A29",d.Shoot1="A30",d.Shoot2="A31",d.ShootF="A32",d.Dead="A33",d.GhostWalk="A34",d.GhostStand="A35",d.GhostJump="A36",d.GhostProneStab="A37",d.GhostLadder="A38",d.GhostRope="A39",d.GhostFly="A40",d.GhostSit="A41",t.CharacterImageEmotion=void 0,(E=t.CharacterImageEmotion||(t.CharacterImageEmotion={})).Default="E00",E.Wink="E01",E.Smile="E02",E.Cry="E03",E.Angry="E04",E.Bewildered="E05",E.Blink="E06",E.Blaze="E07",E.Bowing="E08",E.Cheers="E09",E.Chu="E10",E.Dam="E11",E.Despair="E12",E.Glitter="E13",E.Hit="E14",E.Hot="E15",E.Hum="E16",E.Love="E17",E.Oops="E18",E.Pain="E19",E.Troubled="E20",E.QBlue="E21",E.Shine="E22",E.Stunned="E23",E.Vomit="E24",t.CharacterImageWeaponMotion=void 0,(p=t.CharacterImageWeaponMotion||(t.CharacterImageWeaponMotion={})).Default="W00",p.OneHand="W01",p.TwoHands="W02",p.Gun="W03",p.Nothing="W04",t.PotentialOptionGrade=void 0,(A=t.PotentialOptionGrade||(t.PotentialOptionGrade={}))[A.RARE=0]="RARE",A[A.EPIC=1]="EPIC",A[A.UNIQUE=2]="UNIQUE",A[A.LEGENDARY=3]="LEGENDARY";t.CharacterAbilityDto=class{},t.CharacterAbilityInfoDto=class{},t.CharacterAbilityPresetDto=class{},t.CharacterAndroidCashItemEquipmentColoringPrismDto=class{},t.CharacterAndroidCashItemEquipmentDto=class{},t.CharacterAndroidCashItemEquipmentOptionDto=class{},t.CharacterAndroidEquipmentDto=class{},t.CharacterAndroidEquipmentFaceDto=class{},t.CharacterAndroidEquipmentHairDto=class{},t.CharacterAndroidEquipmentPresetDto=class{},t.CharacterAndroidEquipmentSkinDto=class{},t.CharacterBasicDto=class{get isAccessFlag(){return"true"===this.accessFlag}},t.CharacterBeautyEquipmentDto=class{},t.CharacterBeautyEquipmentFaceDto=class{},t.CharacterBeautyEquipmentHairDto=class{},t.CharacterBeautyEquipmentSkinDto=class{},t.CharacterCashItemEquipmentColoringPrismDto=class{},t.CharacterCashItemEquipmentDto=class{},t.CharacterCashItemEquipmentOptionDto=class{},t.CharacterCashItemEquipmentPresetDto=class{},t.CharacterDojangDto=class{},t.CharacterDto=class{},t.CharacterFinalStatDto=class{},t.CharacterHexaMatrixDto=class{},t.CharacterHexaMatrixEquipmentDto=class{},t.CharacterHexaMatrixEquipmentLinkedSkillDto=class{},t.CharacterHexaMatrixStatCoreDto=class{},t.CharacterHexaMatrixStatDto=class{},t.CharacterHyperStatDto=class{},t.CharacterHyperStatPresetDto=class{},t.CharacterImageDto=class{},t.CharacterItemEquipmentAddOptionDto=class{},t.CharacterItemEquipmentBaseOptionDto=class{},t.CharacterItemEquipmentDragonInfoDto=class{},t.CharacterItemEquipmentDto=class{},t.CharacterItemEquipmentEtcOptionDto=class{},t.CharacterItemEquipmentExceptionalOptionDto=class{},t.CharacterItemEquipmentInfoDto=class{},t.CharacterItemEquipmentMechanicInfoDto=class{},t.CharacterItemEquipmentStarforceOptionDto=class{},t.CharacterItemEquipmentTitleDto=class{},t.CharacterItemEquipmentTotalOptionDto=class{},t.CharacterLinkSkillDto=class{},t.CharacterLinkSkillInfoDto=class{},t.CharacterPetEquipmentAutoSkillDto=class{},t.CharacterPetEquipmentDto=class{},t.CharacterPetEquipmentItemDto=class{},t.CharacterPetEquipmentItemOptionDto=class{},t.CharacterPopularityDto=class{},t.CharacterPropensityDto=class{},t.CharacterSetEffectDto=class{},t.CharacterSetEffectInfoDto=class{},t.CharacterSetEffectOptionFullDto=class{},t.CharacterSetEffectSetDto=class{},t.CharacterSkillDto=class{},t.CharacterSkillInfoDto=class{},t.CharacterStatDto=class{},t.CharacterSymbolEquipmentDto=class{},t.CharacterSymbolEquipmentInfoDto=class{},t.CharacterVMatrixCodeEquipmentDto=class{},t.CharacterVMatrixDto=class{},t.GuildBasicDto=class{},t.GuildDto=class{},t.GuildSkillDto=class{},t.MapleStoryApi=m,t.MapleStoryApiError=f,t.UnionArtifactCrystalDto=class{},t.UnionArtifactDto=class{},t.UnionArtifactEffectDto=class{},t.UnionDto=class{},t.UnionRaiderBlockControlPointDto=class{},t.UnionRaiderBlockDto=class{},t.UnionRaiderBlockPositionDto=class{},t.UnionRaiderDto=class{},t.UnionRaiderInnerStatDto=class{},t.UnionRaiderPresetDto=class{}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maplestory-openapi",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "This JavaScript library enables the use of the MapleStory OpenAPI of Nexon.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maplestory",
|
|
@@ -75,17 +75,18 @@
|
|
|
75
75
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
76
76
|
"@typescript-eslint/parser": "^6.15.0",
|
|
77
77
|
"buffer": "^6.0.3",
|
|
78
|
-
"
|
|
78
|
+
"dotenv": "^17.2.3",
|
|
79
79
|
"eslint": "^8.56.0",
|
|
80
80
|
"eslint-config-google": "^0.14.0",
|
|
81
81
|
"eslint-config-prettier": "^9.1.0",
|
|
82
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
82
83
|
"eslint-plugin-import": "^2.29.1",
|
|
83
84
|
"eslint-plugin-prettier": "^5.1.2",
|
|
85
|
+
"jest": "^29.7.0",
|
|
84
86
|
"prettier": "^3.1.1",
|
|
85
87
|
"rollup": "2.66.1",
|
|
86
88
|
"rollup-plugin-terser": "7.0.2",
|
|
87
89
|
"rollup-plugin-typescript2": "0.27.1",
|
|
88
|
-
"jest": "^29.7.0",
|
|
89
90
|
"ts-jest": "^29.1.4",
|
|
90
91
|
"ts-node": "^10.9.1",
|
|
91
92
|
"tsm": "2.2.1",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare abstract class CharacterAbilityDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract abilityGrade: string
|
|
3
|
+
abstract abilityGrade: string;
|
|
4
4
|
abstract abilityInfo: CharacterAbilityInfoDto[];
|
|
5
|
-
abstract remainFame: number
|
|
5
|
+
abstract remainFame: number;
|
|
6
6
|
abstract presetNo: number | null;
|
|
7
7
|
abstract abilityPreset1: CharacterAbilityPresetDto | null;
|
|
8
8
|
abstract abilityPreset2: CharacterAbilityPresetDto | null;
|
|
@@ -10,7 +10,7 @@ export declare abstract class CharacterBasicDto {
|
|
|
10
10
|
abstract characterExpRate: string;
|
|
11
11
|
abstract characterGuildName: string | null;
|
|
12
12
|
abstract characterImage: string;
|
|
13
|
-
abstract characterDateCreate: Date;
|
|
13
|
+
abstract characterDateCreate: Date | null;
|
|
14
14
|
abstract accessFlag: 'true' | 'false';
|
|
15
15
|
get isAccessFlag(): boolean;
|
|
16
16
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare abstract class CharacterCashItemEquipmentDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterGender: string
|
|
4
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterGender: string;
|
|
4
|
+
abstract characterClass: string;
|
|
5
5
|
abstract characterLookMode: string | null;
|
|
6
|
-
abstract presetNo: number
|
|
6
|
+
abstract presetNo: number;
|
|
7
7
|
abstract cashItemEquipmentBase: CharacterCashItemEquipmentPresetDto[];
|
|
8
8
|
abstract cashItemEquipmentPreset1: CharacterCashItemEquipmentPresetDto[];
|
|
9
9
|
abstract cashItemEquipmentPreset2: CharacterCashItemEquipmentPresetDto[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare abstract class CharacterDojangDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
4
|
-
abstract worldName: string
|
|
5
|
-
abstract dojangBestFloor: number
|
|
3
|
+
abstract characterClass: string;
|
|
4
|
+
abstract worldName: string;
|
|
5
|
+
abstract dojangBestFloor: number;
|
|
6
6
|
abstract dateDojangRecord: Date | null;
|
|
7
|
-
abstract dojangBestTime: number
|
|
7
|
+
abstract dojangBestTime: number;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare abstract class CharacterHexaMatrixStatDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterClass: string;
|
|
4
4
|
abstract characterHexaStatCore: CharacterHexaMatrixStatCoreDto[];
|
|
5
5
|
abstract characterHexaStatCore2: CharacterHexaMatrixStatCoreDto[];
|
|
6
6
|
abstract characterHexaStatCore3: CharacterHexaMatrixStatCoreDto[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare abstract class CharacterHyperStatDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
4
|
-
abstract usePresetNo: string
|
|
5
|
-
abstract useAvailableHyperStat: number
|
|
3
|
+
abstract characterClass: string;
|
|
4
|
+
abstract usePresetNo: string;
|
|
5
|
+
abstract useAvailableHyperStat: number;
|
|
6
6
|
abstract hyperStatPreset1: CharacterHyperStatPresetDto[];
|
|
7
|
-
abstract hyperStatPreset1RemainPoint: number
|
|
7
|
+
abstract hyperStatPreset1RemainPoint: number;
|
|
8
8
|
abstract hyperStatPreset2: CharacterHyperStatPresetDto[];
|
|
9
|
-
abstract hyperStatPreset2RemainPoint: number
|
|
9
|
+
abstract hyperStatPreset2RemainPoint: number;
|
|
10
10
|
abstract hyperStatPreset3: CharacterHyperStatPresetDto[];
|
|
11
|
-
abstract hyperStatPreset3RemainPoint: number
|
|
11
|
+
abstract hyperStatPreset3RemainPoint: number;
|
|
12
12
|
}
|
|
13
13
|
export declare abstract class CharacterHyperStatPresetDto {
|
|
14
14
|
abstract statType: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare abstract class CharacterItemEquipmentDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterGender: string
|
|
4
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterGender: string;
|
|
4
|
+
abstract characterClass: string;
|
|
5
5
|
abstract presetNo: number | null;
|
|
6
6
|
abstract itemEquipment: CharacterItemEquipmentInfoDto[];
|
|
7
7
|
abstract itemEquipmentPreset1: CharacterItemEquipmentInfoDto[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare abstract class CharacterLinkSkillDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterClass: string;
|
|
4
4
|
abstract characterLinkSkill: CharacterLinkSkillInfoDto[];
|
|
5
5
|
abstract characterLinkSkillPreset1: CharacterLinkSkillInfoDto[];
|
|
6
6
|
abstract characterLinkSkillPreset2: CharacterLinkSkillInfoDto[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare abstract class CharacterPropensityDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract charismaLevel: number
|
|
4
|
-
abstract sensibilityLevel: number
|
|
5
|
-
abstract insightLevel: number
|
|
6
|
-
abstract willingnessLevel: number
|
|
7
|
-
abstract handicraftLevel: number
|
|
8
|
-
abstract charmLevel: number
|
|
3
|
+
abstract charismaLevel: number;
|
|
4
|
+
abstract sensibilityLevel: number;
|
|
5
|
+
abstract insightLevel: number;
|
|
6
|
+
abstract willingnessLevel: number;
|
|
7
|
+
abstract handicraftLevel: number;
|
|
8
|
+
abstract charmLevel: number;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare abstract class CharacterStatDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterClass: string;
|
|
4
4
|
abstract finalStat: CharacterFinalStatDto[];
|
|
5
|
-
abstract remainAP: number
|
|
5
|
+
abstract remainAP: number;
|
|
6
6
|
}
|
|
7
7
|
export declare abstract class CharacterFinalStatDto {
|
|
8
8
|
abstract statName: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare abstract class CharacterSymbolEquipmentDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterClass: string;
|
|
4
4
|
abstract symbol: CharacterSymbolEquipmentInfoDto[];
|
|
5
5
|
}
|
|
6
6
|
export declare abstract class CharacterSymbolEquipmentInfoDto {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare abstract class CharacterVMatrixDto {
|
|
2
2
|
abstract date: Date | null;
|
|
3
|
-
abstract characterClass: string
|
|
3
|
+
abstract characterClass: string;
|
|
4
4
|
abstract characterVCoreEquipment: CharacterVMatrixCodeEquipmentDto[];
|
|
5
|
-
abstract characterVMatrixRemainSlotUpgradePoint: number
|
|
5
|
+
abstract characterVMatrixRemainSlotUpgradePoint: number;
|
|
6
6
|
}
|
|
7
7
|
export declare abstract class CharacterVMatrixCodeEquipmentDto {
|
|
8
8
|
abstract slotId: string;
|
|
@@ -25,7 +25,7 @@ export declare abstract class UnionRaiderBlockControlPointDto {
|
|
|
25
25
|
}
|
|
26
26
|
export declare abstract class UnionRaiderBlockDto {
|
|
27
27
|
abstract blockType: string;
|
|
28
|
-
abstract blockClass: string;
|
|
28
|
+
abstract blockClass: string | null;
|
|
29
29
|
abstract blockLevel: string;
|
|
30
30
|
abstract blockControlPoint: UnionRaiderBlockControlPointDto;
|
|
31
31
|
abstract blockPosition: UnionRaiderBlockPositionDto[] | null;
|
|
@@ -5,3 +5,12 @@ import { PotentialOptionGrade } from './enum/potentialOptionGrade';
|
|
|
5
5
|
* @param text support only "레어", "에픽", "유니크", "레전드리"
|
|
6
6
|
*/
|
|
7
7
|
export declare const potentialOptionGradeFromString: (text: string) => PotentialOptionGrade;
|
|
8
|
+
/**
|
|
9
|
+
* URL에서 Query를 제거합니다.
|
|
10
|
+
* @param url URL
|
|
11
|
+
* @example
|
|
12
|
+
* ```
|
|
13
|
+
* removeQuery('https://example.com/path?query=123&test=abc') // returns 'https://example.com/path'
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const removeQuery: (url: string) => string;
|
|
@@ -40,31 +40,31 @@ export declare abstract class MapleStoryApi {
|
|
|
40
40
|
set timeout(value: number);
|
|
41
41
|
constructor(apiKey: string);
|
|
42
42
|
abstract getCharacter(characterName: string): Promise<CharacterDto>;
|
|
43
|
-
abstract getCharacterBasic(ocid: string, dateOptions?: DateOptions): Promise<CharacterBasicDto>;
|
|
44
|
-
abstract getCharacterImage(ocid: string, imageOptions?: CharacterImageOptions, dateOptions?: DateOptions): Promise<CharacterImageDto>;
|
|
45
|
-
abstract getCharacterPopularity(ocid: string, dateOptions?: DateOptions): Promise<CharacterPopularityDto>;
|
|
46
|
-
abstract getCharacterStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterStatDto>;
|
|
47
|
-
abstract getCharacterHyperStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterHyperStatDto>;
|
|
48
|
-
abstract getCharacterPropensity(ocid: string, dateOptions?: DateOptions): Promise<CharacterPropensityDto>;
|
|
49
|
-
abstract getCharacterAbility(ocid: string, dateOptions?: DateOptions): Promise<CharacterAbilityDto>;
|
|
50
|
-
abstract getCharacterItemEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterItemEquipmentDto>;
|
|
51
|
-
abstract getCharacterCashItemEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterCashItemEquipmentDto>;
|
|
52
|
-
abstract getCharacterSymbolEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterSymbolEquipmentDto>;
|
|
53
|
-
abstract getCharacterSetEffect(ocid: string, dateOptions?: DateOptions): Promise<CharacterSetEffectDto>;
|
|
54
|
-
abstract getCharacterBeautyEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterBeautyEquipmentDto>;
|
|
55
|
-
abstract getCharacterAndroidEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterAndroidEquipmentDto>;
|
|
56
|
-
abstract getCharacterPetEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterPetEquipmentDto>;
|
|
57
|
-
abstract getCharacterSkill(ocid: string, characterSkillGrade: string, dateOptions?: DateOptions): Promise<CharacterSkillDto>;
|
|
58
|
-
abstract getCharacterLinkSkill(ocid: string, dateOptions?: DateOptions): Promise<CharacterLinkSkillDto>;
|
|
59
|
-
abstract getCharacterVMatrix(ocid: string, dateOptions?: DateOptions): Promise<CharacterVMatrixDto>;
|
|
60
|
-
abstract getCharacterHexaMatrix(ocid: string, dateOptions?: DateOptions): Promise<CharacterHexaMatrixDto>;
|
|
61
|
-
abstract getCharacterHexaMatrixStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterHexaMatrixStatDto>;
|
|
62
|
-
abstract getCharacterDojang(ocid: string, dateOptions?: DateOptions): Promise<CharacterDojangDto>;
|
|
63
|
-
abstract getUnion(ocid: string, dateOptions?: DateOptions): Promise<UnionDto>;
|
|
64
|
-
abstract getUnionRaider(ocid: string, dateOptions?: DateOptions): Promise<UnionRaiderDto>;
|
|
65
|
-
abstract getUnionArtifact(ocid: string, dateOptions?: DateOptions): Promise<UnionArtifactDto>;
|
|
66
|
-
abstract getGuild(guildName: string, worldName: string): Promise<GuildDto>;
|
|
67
|
-
abstract getGuildBasic(guildId: string, dateOptions?: DateOptions): Promise<GuildBasicDto>;
|
|
43
|
+
abstract getCharacterBasic(ocid: string, dateOptions?: DateOptions): Promise<CharacterBasicDto | null>;
|
|
44
|
+
abstract getCharacterImage(ocid: string, imageOptions?: CharacterImageOptions, dateOptions?: DateOptions): Promise<CharacterImageDto | null>;
|
|
45
|
+
abstract getCharacterPopularity(ocid: string, dateOptions?: DateOptions): Promise<CharacterPopularityDto | null>;
|
|
46
|
+
abstract getCharacterStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterStatDto | null>;
|
|
47
|
+
abstract getCharacterHyperStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterHyperStatDto | null>;
|
|
48
|
+
abstract getCharacterPropensity(ocid: string, dateOptions?: DateOptions): Promise<CharacterPropensityDto | null>;
|
|
49
|
+
abstract getCharacterAbility(ocid: string, dateOptions?: DateOptions): Promise<CharacterAbilityDto | null>;
|
|
50
|
+
abstract getCharacterItemEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterItemEquipmentDto | null>;
|
|
51
|
+
abstract getCharacterCashItemEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterCashItemEquipmentDto | null>;
|
|
52
|
+
abstract getCharacterSymbolEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterSymbolEquipmentDto | null>;
|
|
53
|
+
abstract getCharacterSetEffect(ocid: string, dateOptions?: DateOptions): Promise<CharacterSetEffectDto | null>;
|
|
54
|
+
abstract getCharacterBeautyEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterBeautyEquipmentDto | null>;
|
|
55
|
+
abstract getCharacterAndroidEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterAndroidEquipmentDto | null>;
|
|
56
|
+
abstract getCharacterPetEquipment(ocid: string, dateOptions?: DateOptions): Promise<CharacterPetEquipmentDto | null>;
|
|
57
|
+
abstract getCharacterSkill(ocid: string, characterSkillGrade: string, dateOptions?: DateOptions): Promise<CharacterSkillDto | null>;
|
|
58
|
+
abstract getCharacterLinkSkill(ocid: string, dateOptions?: DateOptions): Promise<CharacterLinkSkillDto | null>;
|
|
59
|
+
abstract getCharacterVMatrix(ocid: string, dateOptions?: DateOptions): Promise<CharacterVMatrixDto | null>;
|
|
60
|
+
abstract getCharacterHexaMatrix(ocid: string, dateOptions?: DateOptions): Promise<CharacterHexaMatrixDto | null>;
|
|
61
|
+
abstract getCharacterHexaMatrixStat(ocid: string, dateOptions?: DateOptions): Promise<CharacterHexaMatrixStatDto | null>;
|
|
62
|
+
abstract getCharacterDojang(ocid: string, dateOptions?: DateOptions): Promise<CharacterDojangDto | null>;
|
|
63
|
+
abstract getUnion(ocid: string, dateOptions?: DateOptions): Promise<UnionDto | null>;
|
|
64
|
+
abstract getUnionRaider(ocid: string, dateOptions?: DateOptions): Promise<UnionRaiderDto | null>;
|
|
65
|
+
abstract getUnionArtifact(ocid: string, dateOptions?: DateOptions): Promise<UnionArtifactDto | null>;
|
|
66
|
+
abstract getGuild(guildName: string, worldName: string): Promise<GuildDto | null>;
|
|
67
|
+
abstract getGuildBasic(guildId: string, dateOptions?: DateOptions): Promise<GuildBasicDto | null>;
|
|
68
68
|
/**
|
|
69
69
|
* API 서버의 데이터 갱신 시간에 따라 데이터가 조회 가능한 최신 날짜를 반환합니다.
|
|
70
70
|
*
|
|
@@ -78,6 +78,17 @@ export declare abstract class MapleStoryApi {
|
|
|
78
78
|
* @param minDateOptions API 호출 가능한 최소 날짜
|
|
79
79
|
*/
|
|
80
80
|
protected toDateString(dateOptions: DateOptions, minDateOptions?: DateOptions): string | never;
|
|
81
|
+
/**
|
|
82
|
+
* API 응답 데이터가 비어있는지 확인 합니다.<br/>
|
|
83
|
+
* API 요청 시 날짜에 해당하는 데이터가 없을 경우 date 필드만 값이 존재하는 상황을 검증할 때 사용 합니다.<br/>
|
|
84
|
+
* 일반적으로 API 지원 시작일과 캐릭터 생성일 사이의 날짜를 조회할 때 발생 합니다.
|
|
85
|
+
* @example
|
|
86
|
+
* ```
|
|
87
|
+
* isEmptyResponse({ date: '2024-01-01', popularity: null }) // true
|
|
88
|
+
* isEmptyResponse({ date: '2024-01-01', popularity: 10 }) // false
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
protected isEmptyResponse(body: Record<string, any>): boolean;
|
|
81
92
|
}
|
|
82
93
|
/**
|
|
83
94
|
* API 서버의 데이터 갱신 시각과 조회 가능한 최근 날짜와 현재 날짜와의 차이
|
|
@@ -11,7 +11,7 @@ export declare class CharacterAbilityDto extends base.CharacterAbilityDto {
|
|
|
11
11
|
/**
|
|
12
12
|
* 어빌리티 등급
|
|
13
13
|
*/
|
|
14
|
-
abilityGrade: string
|
|
14
|
+
abilityGrade: string;
|
|
15
15
|
/**
|
|
16
16
|
* 어빌리티 정보
|
|
17
17
|
*/
|
|
@@ -19,7 +19,7 @@ export declare class CharacterAbilityDto extends base.CharacterAbilityDto {
|
|
|
19
19
|
/**
|
|
20
20
|
* 보유 명성치
|
|
21
21
|
*/
|
|
22
|
-
remainFame: number
|
|
22
|
+
remainFame: number;
|
|
23
23
|
/**
|
|
24
24
|
* 적용 중인 어빌리티 프리셋 번호
|
|
25
25
|
*/
|