dnf-api 0.5.22 → 0.6.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/LICENSE +21 -21
- package/README.md +313 -313
- package/bun.lockb +0 -0
- package/dist/index.js +22 -35
- package/jest.config.js +12 -12
- package/package.json +37 -41
- package/src/api/auction.ts +67 -61
- package/src/api/characters.equip.ts +81 -53
- package/src/api/characters.skill.ts +52 -52
- package/src/api/characters.ts +91 -60
- package/src/api/index.ts +9 -9
- package/src/api/items.ts +27 -9
- package/src/api/server.ts +9 -9
- package/src/api/setitems.ts +34 -29
- package/src/index.ts +29 -18
- package/src/model/character.ts +51 -3
- package/src/model/index.ts +86 -62
- package/src/model/item.ts +74 -22
- package/src/model/setitem.ts +31 -31
- package/src/util/config.ts +20 -19
- package/src/util/index.ts +6 -6
- package/src/util/params.ts +14 -5
- package/src/util/query.ts +103 -109
- package/src/util/static.ts +51 -45
- package/dist/api/auction.d.ts +0 -24
- package/dist/api/auction.js +0 -58
- package/dist/api/characters.d.ts +0 -32
- package/dist/api/characters.equip.d.ts +0 -29
- package/dist/api/characters.equip.js +0 -51
- package/dist/api/characters.js +0 -58
- package/dist/api/characters.skill.d.ts +0 -29
- package/dist/api/characters.skill.js +0 -51
- package/dist/api/index.d.ts +0 -8
- package/dist/api/index.js +0 -23
- package/dist/api/items.d.ts +0 -15
- package/dist/api/items.js +0 -40
- package/dist/api/server.d.ts +0 -2
- package/dist/api/server.js +0 -9
- package/dist/api/setitems.d.ts +0 -15
- package/dist/api/setitems.js +0 -28
- package/dist/index.d.ts +0 -14
- package/dist/model/character.d.ts +0 -41
- package/dist/model/character.js +0 -2
- package/dist/model/index.d.ts +0 -56
- package/dist/model/index.js +0 -15
- package/dist/model/item.d.ts +0 -45
- package/dist/model/item.js +0 -2
- package/dist/model/setitem.d.ts +0 -24
- package/dist/model/setitem.js +0 -2
- package/dist/util/config.d.ts +0 -11
- package/dist/util/config.js +0 -12
- package/dist/util/index.d.ts +0 -5
- package/dist/util/index.js +0 -20
- package/dist/util/params.d.ts +0 -67
- package/dist/util/params.js +0 -2
- package/dist/util/query.d.ts +0 -14
- package/dist/util/query.js +0 -132
- package/dist/util/static.d.ts +0 -44
- package/dist/util/static.js +0 -53
- package/src/index.tmp.js +0 -48
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { Query, Static } from "../util";
|
|
2
|
-
/**
|
|
3
|
-
* 아이템 및 장비를 통한 스킬 강화 제외 입니다.
|
|
4
|
-
*
|
|
5
|
-
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
6
|
-
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
7
|
-
*/
|
|
8
|
-
export const style = (serverId: Static.Server, characterId: string) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 캐릭터 '버프 스킬 강화 장착 장비'(스위칭) 를 조회합니다.
|
|
17
|
-
*
|
|
18
|
-
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
19
|
-
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
20
|
-
*/
|
|
21
|
-
export const equipment = (serverId: Static.Server, characterId: string) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 캐릭터 '버프 스킬 강화 장착 아바타'(스위칭) 를 조회합니다.
|
|
30
|
-
*
|
|
31
|
-
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
32
|
-
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
33
|
-
*/
|
|
34
|
-
export const avatar = (serverId: Static.Server, characterId: string) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 캐릭터 '버프 스킬 강화 장착 크리쳐'(스위칭) 를 조회합니다.
|
|
43
|
-
*
|
|
44
|
-
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
45
|
-
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
46
|
-
*/
|
|
47
|
-
export const creature = (serverId: Static.Server, characterId: string) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
1
|
+
import { Query, Static } from "../util";
|
|
2
|
+
/**
|
|
3
|
+
* 아이템 및 장비를 통한 스킬 강화 제외 입니다.
|
|
4
|
+
*
|
|
5
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
6
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
7
|
+
*/
|
|
8
|
+
export const style = (serverId: Static.Server, characterId: string) => {
|
|
9
|
+
const opt = {
|
|
10
|
+
base: `${Query.UriBuilder(Static.BaseUri.Servers, serverId, "characters", characterId, "skill", "style")}`,
|
|
11
|
+
};
|
|
12
|
+
return Query.Request(opt);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 캐릭터 '버프 스킬 강화 장착 장비'(스위칭) 를 조회합니다.
|
|
17
|
+
*
|
|
18
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
19
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
20
|
+
*/
|
|
21
|
+
export const equipment = (serverId: Static.Server, characterId: string) => {
|
|
22
|
+
const opt = {
|
|
23
|
+
base: `${Query.UriBuilder(Static.BaseUri.Servers, serverId, "characters", characterId, "skill", "buff", "equip", "equipment")}`,
|
|
24
|
+
};
|
|
25
|
+
return Query.Request(opt);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 캐릭터 '버프 스킬 강화 장착 아바타'(스위칭) 를 조회합니다.
|
|
30
|
+
*
|
|
31
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
32
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
33
|
+
*/
|
|
34
|
+
export const avatar = (serverId: Static.Server, characterId: string) => {
|
|
35
|
+
const opt = {
|
|
36
|
+
base: `${Query.UriBuilder(Static.BaseUri.Servers, serverId, "characters", characterId, "skill", "buff", "equip", "avatar")}`,
|
|
37
|
+
};
|
|
38
|
+
return Query.Request(opt);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 캐릭터 '버프 스킬 강화 장착 크리쳐'(스위칭) 를 조회합니다.
|
|
43
|
+
*
|
|
44
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
45
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
46
|
+
*/
|
|
47
|
+
export const creature = (serverId: Static.Server, characterId: string) => {
|
|
48
|
+
const opt = {
|
|
49
|
+
base: `${Query.UriBuilder(Static.BaseUri.Servers, serverId, "characters", characterId, "skill", "buff", "equip", "creature")}`,
|
|
50
|
+
};
|
|
51
|
+
return Query.Request(opt);
|
|
52
|
+
};
|
package/src/api/characters.ts
CHANGED
|
@@ -1,60 +1,91 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 서버 이름과 캐릭터 닉네임을 입력하여 해당 캐릭터를 검색합니다.
|
|
6
|
-
*
|
|
7
|
-
* @param {Static.Server} [serverId=""] 캐릭터가 존재하는 서버의 이름입니다.
|
|
8
|
-
* @param {string} [characterName=""] 검색할 캐릭터의 이름입니다.
|
|
9
|
-
* @param {object} [params={}] 선택적 요청변수의 Object입니다.
|
|
10
|
-
*/
|
|
11
|
-
export const characterName = (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
import type * as Model from "../model";
|
|
2
|
+
import { type Params, Query, Static } from "../util";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 서버 이름과 캐릭터 닉네임을 입력하여 해당 캐릭터를 검색합니다.
|
|
6
|
+
*
|
|
7
|
+
* @param {Static.Server} [serverId=""] 캐릭터가 존재하는 서버의 이름입니다.
|
|
8
|
+
* @param {string} [characterName=""] 검색할 캐릭터의 이름입니다.
|
|
9
|
+
* @param {object} [params={}] 선택적 요청변수의 Object입니다.
|
|
10
|
+
*/
|
|
11
|
+
export const characterName = (
|
|
12
|
+
serverId: Static.Server,
|
|
13
|
+
characterName: string,
|
|
14
|
+
params: Params.ICharParams = {},
|
|
15
|
+
) => {
|
|
16
|
+
// if (params === undefined) params = {};
|
|
17
|
+
params.characterName = characterName;
|
|
18
|
+
const opt = {
|
|
19
|
+
base: Query.UriBuilder(Static.BaseUri.Servers, serverId, "characters"),
|
|
20
|
+
params: params,
|
|
21
|
+
};
|
|
22
|
+
return Query.Request<Model.Rows<Model.Char.Character>>(opt);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 캐릭터 ID를 입력하여 해당 캐릭터 정보를 받아옵니다
|
|
27
|
+
*
|
|
28
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
29
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
30
|
+
*/
|
|
31
|
+
export const characterId = (
|
|
32
|
+
serverId: Static.Server,
|
|
33
|
+
characterId: string,
|
|
34
|
+
): Promise<Model.DnfResponse<Model.Char.Info>> => {
|
|
35
|
+
const opt = {
|
|
36
|
+
base: Query.UriBuilder(
|
|
37
|
+
Static.BaseUri.Servers,
|
|
38
|
+
serverId,
|
|
39
|
+
"characters",
|
|
40
|
+
characterId,
|
|
41
|
+
),
|
|
42
|
+
};
|
|
43
|
+
return Query.Request<Model.Char.Info>(opt);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 캐릭터 ID를 입력하여 해당 캐릭터의 타임라인 정보를 검색합니다.
|
|
48
|
+
*
|
|
49
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
50
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
51
|
+
* @param {object} params 선택적 요청변수의 Object입니다.
|
|
52
|
+
*/
|
|
53
|
+
export const timeline = (
|
|
54
|
+
serverId: Static.Server,
|
|
55
|
+
characterId: string,
|
|
56
|
+
params: Params.ITimeLine = {},
|
|
57
|
+
): Promise<Model.DnfResponse<Model.Char.Timeline>> => {
|
|
58
|
+
const opt = {
|
|
59
|
+
base: Query.UriBuilder(
|
|
60
|
+
Static.BaseUri.Servers,
|
|
61
|
+
serverId,
|
|
62
|
+
"characters",
|
|
63
|
+
characterId,
|
|
64
|
+
"timeline",
|
|
65
|
+
),
|
|
66
|
+
params: {
|
|
67
|
+
...params,
|
|
68
|
+
...(params.code ? { code: Query.QueryBuilder(params.code) } : {}),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
return Query.Request<Model.Char.Timeline>(opt);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 캐릭터 ID를 입력하여 해당 캐릭터의 능력치 정보를 검색합니다.
|
|
76
|
+
*
|
|
77
|
+
* @param {Static.Server} serverId 캐릭터가 존재하는 서버의 이름입니다.
|
|
78
|
+
* @param {string} characterId 검색할 캐릭터의 ID입니다.
|
|
79
|
+
*/
|
|
80
|
+
export const status = (serverId: Static.Server, characterId: string) => {
|
|
81
|
+
const opt = {
|
|
82
|
+
base: Query.UriBuilder(
|
|
83
|
+
Static.BaseUri.Servers,
|
|
84
|
+
serverId,
|
|
85
|
+
"characters",
|
|
86
|
+
characterId,
|
|
87
|
+
"status",
|
|
88
|
+
),
|
|
89
|
+
};
|
|
90
|
+
return Query.Request<Model.Char.CharacterStatus>(opt);
|
|
91
|
+
};
|
package/src/api/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as Action from "./auction";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as Item from "./items";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
|
|
9
|
-
export { Action, Equip, Skill, Characters, Item, SetItem, Server };
|
|
1
|
+
import * as Action from "./auction";
|
|
2
|
+
import * as Characters from "./characters";
|
|
3
|
+
import * as Equip from "./characters.equip";
|
|
4
|
+
import * as Skill from "./characters.skill";
|
|
5
|
+
import * as Item from "./items";
|
|
6
|
+
import * as Server from "./server";
|
|
7
|
+
import * as SetItem from "./setitems";
|
|
8
|
+
|
|
9
|
+
export { Action, Equip, Skill, Characters, Item, SetItem, Server };
|
package/src/api/items.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type * as Model from "../model";
|
|
2
|
+
import { type Params, Query, Static } from "../util";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 현재 인게임에서 획득 가능한 아이템의 경우만 검색 가능합니다.
|
|
@@ -7,25 +7,43 @@ import * as Model from "../model";
|
|
|
7
7
|
* @param {string} itemName 검색할 아이템의 명칭
|
|
8
8
|
* @param {string} params 선택적 요청변수의 Object입니다.
|
|
9
9
|
*/
|
|
10
|
-
export const item = async (itemName: string, params: Params.IItem = {})
|
|
10
|
+
export const item = async (itemName: string, params: Params.IItem = {}) => {
|
|
11
11
|
// if (params === undefined) params = {};
|
|
12
12
|
params.itemName = itemName;
|
|
13
13
|
// if (query) params.q = Query.makeItemQuery(query);
|
|
14
14
|
//let querystring =
|
|
15
|
-
|
|
15
|
+
const opt = {
|
|
16
16
|
base: Query.UriBuilder(Static.BaseUri.Item),
|
|
17
|
-
params:
|
|
17
|
+
params: {
|
|
18
|
+
...params,
|
|
19
|
+
...(params.hashtag
|
|
20
|
+
? { hashtag: Query.QueryBuilder(params.hashtag) }
|
|
21
|
+
: {}),
|
|
22
|
+
},
|
|
18
23
|
};
|
|
19
|
-
return await Query.Request<Model.Item.Item
|
|
24
|
+
return await Query.Request<Model.Rows<Model.Item.Item>>(opt);
|
|
20
25
|
};
|
|
21
26
|
/**
|
|
22
27
|
* 해당하는 아이템의 상세정보를 요청합니다.
|
|
23
28
|
*
|
|
24
29
|
* @param {string} itemId 검색할 아이템의 ID
|
|
25
30
|
*/
|
|
26
|
-
export const detail = (itemId: string)
|
|
27
|
-
|
|
28
|
-
base: Query.UriBuilder(Static.BaseUri.Item, itemId),
|
|
31
|
+
export const detail = (itemId: string) => {
|
|
32
|
+
const opt = {
|
|
33
|
+
base: Query.UriBuilder(Static.BaseUri.Item, itemId),
|
|
29
34
|
};
|
|
30
35
|
return Query.Request<Model.Item.Detail>(opt);
|
|
31
36
|
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 26. 아이템 상점 판매 정보 조회
|
|
40
|
+
* 인게임 백과사전 기준의 상점 판매 95레벨 에픽, 100레벨 이상 유니크, 레전더리, 에픽 장비가 조회 가능 합니다.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} itemId 검색할 아이템의 ID
|
|
43
|
+
*/
|
|
44
|
+
// export const shop = (itemId: string) => {
|
|
45
|
+
// const opt = {
|
|
46
|
+
// base: Query.UriBuilder(Static.BaseUri.Item, itemId),
|
|
47
|
+
// };
|
|
48
|
+
// return Query.Request<Model.Item.Detail>(opt);
|
|
49
|
+
// };
|
package/src/api/server.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export const List = (): Promise<Model.DnfResponse<Model.Server[]>> => {
|
|
5
|
-
|
|
6
|
-
base: Query.UriBuilder(Static.BaseUri.Servers),
|
|
7
|
-
};
|
|
8
|
-
return Query.Request<Model.Server[]>(opt);
|
|
9
|
-
};
|
|
1
|
+
import type * as Model from "../model";
|
|
2
|
+
import { Query, Static } from "../util";
|
|
3
|
+
|
|
4
|
+
export const List = (): Promise<Model.DnfResponse<Model.Server[]>> => {
|
|
5
|
+
const opt = {
|
|
6
|
+
base: Query.UriBuilder(Static.BaseUri.Servers),
|
|
7
|
+
};
|
|
8
|
+
return Query.Request<Model.Server[]>(opt);
|
|
9
|
+
};
|
package/src/api/setitems.ts
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 세트 아이템 정보를 세트의 이름으로 검색합니다.
|
|
6
|
-
*
|
|
7
|
-
* @param {string} setItemName 세트 아이템의 이름입니다.
|
|
8
|
-
* @param {object} params 선택적 요청변수의 Object입니다.
|
|
9
|
-
*/
|
|
10
|
-
export const setitem = (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import type * as Model from "../model";
|
|
2
|
+
import { type Params, Query, Static } from "../util";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 세트 아이템 정보를 세트의 이름으로 검색합니다.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} setItemName 세트 아이템의 이름입니다.
|
|
8
|
+
* @param {object} params 선택적 요청변수의 Object입니다.
|
|
9
|
+
*/
|
|
10
|
+
export const setitem = (
|
|
11
|
+
setItemName: string,
|
|
12
|
+
params: Params.ISetItem = {},
|
|
13
|
+
): Promise<Model.DnfResponse<Model.SetItem.SetItem[]>> => {
|
|
14
|
+
params.setItemName = setItemName;
|
|
15
|
+
const opt = {
|
|
16
|
+
base: Query.UriBuilder(Static.BaseUri.SetItem),
|
|
17
|
+
params: params,
|
|
18
|
+
};
|
|
19
|
+
return Query.Request<Model.SetItem.SetItem[]>(opt);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 세트 ID로 세트 아이템 정보를 받아옵니다.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} setItemId 세트 아이템의 ID입니다.
|
|
26
|
+
*/
|
|
27
|
+
export const detail = (
|
|
28
|
+
setItemId: string,
|
|
29
|
+
): Promise<Model.DnfResponse<Model.SetItem.Detail>> => {
|
|
30
|
+
const opt = {
|
|
31
|
+
base: Query.UriBuilder(Static.BaseUri.SetItem, setItemId),
|
|
32
|
+
};
|
|
33
|
+
return Query.Request<Model.SetItem.Detail>(opt);
|
|
34
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
import * as Request from "./api";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
public static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import * as Request from "./api";
|
|
2
|
+
import * as Model from "./model/index";
|
|
3
|
+
import * as Util from "./util";
|
|
4
|
+
|
|
5
|
+
import Config from "./util/config";
|
|
6
|
+
import * as Params from "./util/params";
|
|
7
|
+
import * as Query from "./util/query";
|
|
8
|
+
import * as Static from "./util/static";
|
|
9
|
+
|
|
10
|
+
// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>
|
|
11
|
+
export default class DnfApi {
|
|
12
|
+
public static Util = Util;
|
|
13
|
+
public static Request = Request;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ServerNames = Static.Server;
|
|
17
|
+
const RarityNames = Static.Rarity;
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
Request as Api,
|
|
21
|
+
Request,
|
|
22
|
+
Config,
|
|
23
|
+
Static,
|
|
24
|
+
ServerNames,
|
|
25
|
+
RarityNames,
|
|
26
|
+
Query,
|
|
27
|
+
Params,
|
|
28
|
+
Model,
|
|
29
|
+
};
|
package/src/model/character.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type { Static } from "../util";
|
|
2
|
+
import type { NameValue } from "./";
|
|
3
|
+
|
|
1
4
|
export type Character = {
|
|
5
|
+
serverId: Static.Server;
|
|
2
6
|
characterId: string;
|
|
3
7
|
characterName: string;
|
|
4
8
|
level: number;
|
|
@@ -6,9 +10,11 @@ export type Character = {
|
|
|
6
10
|
jobGrowId: string;
|
|
7
11
|
jobName: string;
|
|
8
12
|
jobGrowName: string;
|
|
13
|
+
fame: number;
|
|
9
14
|
};
|
|
10
15
|
|
|
11
16
|
export type Info = {
|
|
17
|
+
serverId: Static.Server;
|
|
12
18
|
characterId: string;
|
|
13
19
|
characterName: string;
|
|
14
20
|
level: number;
|
|
@@ -16,12 +22,14 @@ export type Info = {
|
|
|
16
22
|
jobGrowId: string;
|
|
17
23
|
jobName: string;
|
|
18
24
|
jobGrowName: string;
|
|
25
|
+
fame: number;
|
|
19
26
|
adventureName: string;
|
|
20
|
-
guildId: string;
|
|
21
|
-
guildName: string;
|
|
27
|
+
guildId: string | null;
|
|
28
|
+
guildName: string | null;
|
|
22
29
|
};
|
|
23
30
|
|
|
24
31
|
export type Timeline = {
|
|
32
|
+
serverId: Static.Server;
|
|
25
33
|
characterId: string;
|
|
26
34
|
characterName: string;
|
|
27
35
|
level: number;
|
|
@@ -38,6 +46,46 @@ export type Timeline = {
|
|
|
38
46
|
end: Date;
|
|
39
47
|
};
|
|
40
48
|
next: string;
|
|
41
|
-
rows:
|
|
49
|
+
rows: TimeLineRow[];
|
|
42
50
|
};
|
|
43
51
|
};
|
|
52
|
+
|
|
53
|
+
export type TimeLineRow = {
|
|
54
|
+
code: number;
|
|
55
|
+
name: string;
|
|
56
|
+
date: string;
|
|
57
|
+
data: TimeLineRowData;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export type TimeLineRowData = {
|
|
61
|
+
itemId: string;
|
|
62
|
+
itemName: string;
|
|
63
|
+
itemRarity: Static.Rarity;
|
|
64
|
+
channelName: string;
|
|
65
|
+
channelNo: number;
|
|
66
|
+
dungeonName: string;
|
|
67
|
+
mistGear: boolean;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type CharacterStatus = {
|
|
71
|
+
serverId: Static.Server;
|
|
72
|
+
characterId: string;
|
|
73
|
+
characterName: string;
|
|
74
|
+
level: number;
|
|
75
|
+
jobId: string;
|
|
76
|
+
jobGrowId: string;
|
|
77
|
+
jobName: string;
|
|
78
|
+
jobGrowName: string;
|
|
79
|
+
fame: number;
|
|
80
|
+
adventureName: string;
|
|
81
|
+
guildId: string | null;
|
|
82
|
+
guildName: string | null;
|
|
83
|
+
buff: Buff[];
|
|
84
|
+
status: NameValue[];
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export type Buff = {
|
|
88
|
+
name: string;
|
|
89
|
+
level?: number;
|
|
90
|
+
status: NameValue[];
|
|
91
|
+
};
|