dnf-api 2.0.3 → 3.0.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 (55) hide show
  1. package/README.md +3 -3
  2. package/dist/api/characters.equip.d.ts +2 -2
  3. package/dist/index.js +32 -32
  4. package/dist/util/config.d.ts +1 -0
  5. package/dist/util/query.d.ts +0 -7
  6. package/dist/util/queue.d.ts +14 -4
  7. package/package.json +41 -40
  8. package/bun.lockb +0 -0
  9. package/dist/src/api/auction.d.ts +0 -24
  10. package/dist/src/api/characters.d.ts +0 -32
  11. package/dist/src/api/characters.equip.d.ts +0 -29
  12. package/dist/src/api/characters.skill.d.ts +0 -29
  13. package/dist/src/api/index.d.ts +0 -9
  14. package/dist/src/api/items.d.ts +0 -21
  15. package/dist/src/api/multi.d.ts +0 -7
  16. package/dist/src/api/server.d.ts +0 -2
  17. package/dist/src/api/setitems.d.ts +0 -15
  18. package/dist/src/index.d.ts +0 -14
  19. package/dist/src/model/auction.d.ts +0 -47
  20. package/dist/src/model/character.d.ts +0 -91
  21. package/dist/src/model/index.d.ts +0 -39
  22. package/dist/src/model/item.d.ts +0 -103
  23. package/dist/src/model/setitem.d.ts +0 -32
  24. package/dist/src/util/config.d.ts +0 -11
  25. package/dist/src/util/index.d.ts +0 -5
  26. package/dist/src/util/params.d.ts +0 -76
  27. package/dist/src/util/query.d.ts +0 -14
  28. package/dist/src/util/static.d.ts +0 -50
  29. package/jest.config.js +0 -12
  30. package/src/api/auction.ts +0 -104
  31. package/src/api/avatar-market.ts +0 -77
  32. package/src/api/characters.equip.ts +0 -104
  33. package/src/api/characters.skill.ts +0 -86
  34. package/src/api/characters.ts +0 -114
  35. package/src/api/index.ts +0 -23
  36. package/src/api/items.ts +0 -60
  37. package/src/api/jobs.ts +0 -40
  38. package/src/api/multi.ts +0 -52
  39. package/src/api/server.ts +0 -9
  40. package/src/api/setitems.ts +0 -29
  41. package/src/index.ts +0 -28
  42. package/src/model/auction.ts +0 -48
  43. package/src/model/avatar-market.ts +0 -70
  44. package/src/model/character.ts +0 -134
  45. package/src/model/index.ts +0 -49
  46. package/src/model/item.ts +0 -149
  47. package/src/model/job.ts +0 -65
  48. package/src/model/setitem.ts +0 -33
  49. package/src/util/config.ts +0 -43
  50. package/src/util/index.ts +0 -17
  51. package/src/util/params.ts +0 -144
  52. package/src/util/query.ts +0 -147
  53. package/src/util/queue.ts +0 -104
  54. package/src/util/request-helper.ts +0 -19
  55. package/src/util/static.ts +0 -72
@@ -7,6 +7,7 @@ export interface IConfig {
7
7
  responseHeader: boolean;
8
8
  showURL: boolean;
9
9
  maxRequestsPerSecond: number;
10
+ maxRequestsPerMinute: number;
10
11
  }
11
12
  export declare const config: IConfig;
12
13
  /**
@@ -11,12 +11,6 @@ export interface RequestOptions {
11
11
  * @returns 결합된 URI 경로
12
12
  */
13
13
  export declare function UriBuilder(...args: (string | number)[]): string;
14
- /**
15
- * 쿼리 문자열을 빌드합니다.
16
- * @param query 쿼리 배열
17
- * @returns 쿼리 문자열
18
- */
19
- export declare function QueryBuilder(query: (string | number)[]): string;
20
14
  /**
21
15
  * 던전앤파이터 API 서버에 요청을 보내는 함수입니다.
22
16
  * @param opt 요청 옵션
@@ -32,7 +26,6 @@ export declare function Request<T>(opt?: RequestOptions, method?: "GET" | "POST"
32
26
  export declare function makeItemQuery(query: string): string;
33
27
  declare const _default: {
34
28
  UriBuilder: typeof UriBuilder;
35
- QueryBuilder: typeof QueryBuilder;
36
29
  Request: typeof Request;
37
30
  makeItemQuery: typeof makeItemQuery;
38
31
  };
@@ -1,14 +1,22 @@
1
1
  export declare class RequestQueue {
2
2
  private queue;
3
3
  private processing;
4
- private requestCount;
5
- private lastResetTime;
4
+ private secondTimestamps;
5
+ private minuteTimestamps;
6
6
  /**
7
7
  * 큐에 요청을 추가합니다.
8
8
  * @param task 실행할 비동기 작업
9
9
  * @returns 작업 결과 Promise
10
10
  */
11
11
  add<T>(task: () => Promise<T>): Promise<T>;
12
+ /**
13
+ * 슬라이딩 윈도우 기반으로 대기 시간을 계산합니다.
14
+ */
15
+ private getWaitTime;
16
+ /**
17
+ * 요청 타임스탬프를 기록합니다.
18
+ */
19
+ private recordRequest;
12
20
  /**
13
21
  * 큐를 처리합니다.
14
22
  */
@@ -19,8 +27,10 @@ export declare class RequestQueue {
19
27
  */
20
28
  get status(): {
21
29
  queueLength: number;
22
- requestCount: number;
23
- maxRequestsPerSecond: number;
30
+ requestsInLastSecond: number;
31
+ requestsInLastMinute: number;
32
+ maxPerSecond: number;
33
+ maxPerMinute: number;
24
34
  };
25
35
  /**
26
36
  * 큐를 초기화합니다.
package/package.json CHANGED
@@ -1,40 +1,41 @@
1
- {
2
- "name": "dnf-api",
3
- "version": "2.0.3",
4
- "description": "던전 앤 파이터 API",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/src/index.d.ts",
9
- "dependencies": {
10
- "consola": "^3.4.2",
11
- "prototype-helper": "^1.2.0"
12
- },
13
- "devDependencies": {
14
- "@types/bun": "^1.1.6",
15
- "@biomejs/biome": "^2.3.10",
16
- "dotenv": "^17.2.3",
17
- "typescript": "5.9.3"
18
- },
19
- "scripts": {
20
- "dev": "bun --watch test.ts",
21
- "bundle": "tsc --declaration --emitDeclarationOnly --outDir dist && bun build src/index.ts --minify --target=bun --outfile dist/index.js",
22
- "dev:test": "bun --watch test.ts",
23
- "lint": "biome lint ./src",
24
- "lint:fix": "biome lint --write ./src",
25
- "format": "biome format --write ./src",
26
- "check": "biome check ./src",
27
- "check:fix": "biome check --write ./src"
28
- },
29
- "repository": {
30
- "type": "git",
31
- "url": "git+https://github.com/k22pr/dnf-api.git"
32
- },
33
- "keywords": ["dnf"],
34
- "author": "서버지기",
35
- "license": "MIT",
36
- "bugs": {
37
- "url": "https://github.com/k22pr/dnf-api/issues"
38
- },
39
- "homepage": "https://github.com/k22pr/dnf-api#readme"
40
- }
1
+ {
2
+ "name": "dnf-api",
3
+ "version": "3.0.0",
4
+ "description": "던전 앤 파이터 API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": ["dist"],
10
+ "dependencies": {
11
+ "consola": "^3.4.2",
12
+ "prototype-helper": "^1.2.0"
13
+ },
14
+ "devDependencies": {
15
+ "@types/bun": "^1.1.6",
16
+ "dotenv": "^17.2.3",
17
+ "oxfmt": "^0.42.0",
18
+ "oxlint": "^1.57.0",
19
+ "typescript": "5.9.3"
20
+ },
21
+ "scripts": {
22
+ "dev": "bun --watch test.ts",
23
+ "bundle": "bun x rimraf dist && tsc --declaration --emitDeclarationOnly --outDir dist && bun build src/index.ts --minify --target=bun --outfile dist/index.js",
24
+ "dev:test": "bun --watch test.ts",
25
+ "lint": "oxlint ./src",
26
+ "lint:fix": "oxlint --fix ./src",
27
+ "format": "oxfmt --write ./src",
28
+ "format:check": "oxfmt --check ./src"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/k22pr/dnf-api.git"
33
+ },
34
+ "keywords": ["dnf"],
35
+ "author": "서버지기",
36
+ "license": "MIT",
37
+ "bugs": {
38
+ "url": "https://github.com/k22pr/dnf-api/issues"
39
+ },
40
+ "homepage": "https://github.com/k22pr/dnf-api#readme"
41
+ }
package/bun.lockb DELETED
Binary file
@@ -1,24 +0,0 @@
1
- import type * as model from "../model";
2
- import { type params } from "../util";
3
- /**
4
- * 경매장에 등록된 아이템을 "아이템 이름"을 기준으로 받아옵니다
5
- *
6
- * @param {string} itemName 검색할 아이템의 이름입니다.
7
- * @param {object} params 선택적 요청변수의 Object입니다.
8
- */
9
- export declare const itemName: (itemName: string, params?: params.IAuction) => Promise<model.IDnfResponse<model.IRows<model.auction.IAuction>>>;
10
- /**
11
- * 경매장에 등록된 아이템을 "아이템 아이디"을 기준으로 받아옵니다
12
- *
13
- * @param {string} itemID 검색할 아이템의 ID입니다.
14
- * @param {object} params 선택적 요청변수의 Object입니다.
15
- */
16
- export declare const itemId: (itemId: string, params?: params.IAuction) => Promise<model.IDnfResponse<model.IRows<model.auction.IAuction>>>;
17
- /**
18
- * 경매장에 등록된 경매장번호로 받아옵니다.
19
- *
20
- * @param {Number} auctionNo 검색할 경매장 번호입니다.
21
- */
22
- export declare const no: (auctionNo: number) => Promise<model.IDnfResponse<model.auction.IAuction>>;
23
- export declare const auctionSoldName: (itemName: string, params?: params.IActionSoldOption) => Promise<model.IDnfResponse<model.IRows<model.auction.IAuctionSolid>>>;
24
- export declare const auctionSoldId: (itemId: string, params?: params.IActionSoldOption) => Promise<model.IDnfResponse<model.IRows<model.auction.IAuctionSolid>>>;
@@ -1,32 +0,0 @@
1
- import type * as model from "../model";
2
- import { type params, staticUtil } from "../util";
3
- /**
4
- * 서버 이름과 캐릭터 닉네임을 입력하여 해당 캐릭터를 검색합니다.
5
- *
6
- * @param {staticUtil.server} [serverId=""] 캐릭터가 존재하는 서버의 이름입니다.
7
- * @param {string} [characterName=""] 검색할 캐릭터의 이름입니다.
8
- * @param {object} [params={}] 선택적 요청변수의 Object입니다.
9
- */
10
- export declare const characterName: (serverId: staticUtil.server, characterName: string, params?: params.ICharParams) => Promise<model.IDnfResponse<model.IRows<model.char.ICharacter>>>;
11
- /**
12
- * 캐릭터 ID를 입력하여 해당 캐릭터 정보를 받아옵니다
13
- *
14
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
15
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
16
- */
17
- export declare const characterId: (serverId: staticUtil.server, characterId: string) => Promise<model.IDnfResponse<model.char.IInfo>>;
18
- /**
19
- * 캐릭터 ID를 입력하여 해당 캐릭터의 타임라인 정보를 검색합니다.
20
- *
21
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
22
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
23
- * @param {object} params 선택적 요청변수의 Object입니다.
24
- */
25
- export declare const timeline: (serverId: staticUtil.server, characterId: string, params?: params.ITimeLine) => Promise<model.IDnfResponse<model.char.ITimeline>>;
26
- /**
27
- * 캐릭터 ID를 입력하여 해당 캐릭터의 능력치 정보를 검색합니다.
28
- *
29
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
30
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
31
- */
32
- export declare const status: (serverId: staticUtil.server, characterId: string) => Promise<model.IDnfResponse<model.char.ICharacterStatus>>;
@@ -1,29 +0,0 @@
1
- import { staticUtil } from "../util";
2
- /**
3
- * 해당 캐릭터가 장착한 장비 정보를 받아옵니다.
4
- *
5
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
6
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
7
- */
8
- export declare const equipment: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
9
- /**
10
- * 해당 캐릭터가 장착한 아바타 정보를 받아옵니다.
11
- *
12
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
13
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
14
- */
15
- export declare const avatar: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
16
- /**
17
- * 해당 캐릭터가 장착한 크리쳐 정보를 받아옵니다.
18
- *
19
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
20
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
21
- */
22
- export declare const creature: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
23
- /**
24
- * 해당 캐릭터가 장착한 휘장 정보를 받아옵니다.
25
- *
26
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
27
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
28
- */
29
- export declare const flag: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
@@ -1,29 +0,0 @@
1
- import { staticUtil } from "../util";
2
- /**
3
- * 아이템 및 장비를 통한 스킬 강화 제외 입니다.
4
- *
5
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
6
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
7
- */
8
- export declare const style: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
9
- /**
10
- * 캐릭터 '버프 스킬 강화 장착 장비'(스위칭) 를 조회합니다.
11
- *
12
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
13
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
14
- */
15
- export declare const equipment: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
16
- /**
17
- * 캐릭터 '버프 스킬 강화 장착 아바타'(스위칭) 를 조회합니다.
18
- *
19
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
20
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
21
- */
22
- export declare const avatar: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
23
- /**
24
- * 캐릭터 '버프 스킬 강화 장착 크리쳐'(스위칭) 를 조회합니다.
25
- *
26
- * @param {staticUtil.server} serverId 캐릭터가 존재하는 서버의 이름입니다.
27
- * @param {string} characterId 검색할 캐릭터의 ID입니다.
28
- */
29
- export declare const creature: (serverId: staticUtil.server, characterId: string) => Promise<import("../model").IDnfResponse<unknown>>;
@@ -1,9 +0,0 @@
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 multi from "./multi";
7
- import * as server from "./server";
8
- import * as setItem from "./setitems";
9
- export { action, equip, skill, characters, item, setItem, server, multi };
@@ -1,21 +0,0 @@
1
- import type * as model from "../model";
2
- import { type params } from "../util";
3
- /**
4
- * 현재 인게임에서 획득 가능한 아이템의 경우만 검색 가능합니다.
5
- *
6
- * @param {string} itemName 검색할 아이템의 명칭
7
- * @param {string} params 선택적 요청변수의 Object입니다.
8
- */
9
- export declare const item: (itemName: string, params?: params.IItem) => Promise<model.IDnfResponse<model.item.IItem>>;
10
- /**
11
- * 해당하는 아이템의 상세정보를 요청합니다.
12
- *
13
- * @param {string} itemId 검색할 아이템의 ID
14
- */
15
- export declare const detail: (itemId: string) => Promise<model.IDnfResponse<model.item.IDetail>>;
16
- /**
17
- * 26. 아이템 상점 판매 정보 조회
18
- * 인게임 백과사전 기준의 상점 판매 95레벨 에픽, 100레벨 이상 유니크, 레전더리, 에픽 장비가 조회 가능 합니다.
19
- *
20
- * @param {string} itemId 검색할 아이템의 ID
21
- */
@@ -1,7 +0,0 @@
1
- import type * as model from "../model";
2
- /**
3
- * 해당하는 아이템의 상세정보를 요청합니다.
4
- *
5
- * @param {string} itemId 검색할 아이템의 ID
6
- */
7
- export declare const items: (itemIdList: string[]) => Promise<model.IDnfResponse<model.IRows<model.item.IDetail>>>;
@@ -1,2 +0,0 @@
1
- import type * as Model from "../model";
2
- export declare const List: () => Promise<Model.IDnfResponse<Model.IServer[]>>;
@@ -1,15 +0,0 @@
1
- import type * as Model from "../model";
2
- import { type params } from "../util";
3
- /**
4
- * 세트 아이템 정보를 세트의 이름으로 검색합니다.
5
- *
6
- * @param {string} setItemName 세트 아이템의 이름입니다.
7
- * @param {object} params 선택적 요청변수의 Object입니다.
8
- */
9
- export declare const setitem: (setItemName: string, params?: params.ISetItem) => Promise<Model.IDnfResponse<Model.setItem.ISetItem[]>>;
10
- /**
11
- * 세트 ID로 세트 아이템 정보를 받아옵니다.
12
- *
13
- * @param {string} setItemId 세트 아이템의 ID입니다.
14
- */
15
- export declare const detail: (setItemId: string) => Promise<Model.IDnfResponse<Model.setItem.IDetail>>;
@@ -1,14 +0,0 @@
1
- import * as request from "./api";
2
- import * as model from "./model/index";
3
- import * as util from "./util";
4
- import config from "./util/config";
5
- import * as params from "./util/params";
6
- import * as query from "./util/query";
7
- import * as staticUtil from "./util/static";
8
- export default class DnfApi {
9
- util: typeof util;
10
- request: typeof request;
11
- }
12
- declare const ServerNames: typeof util.staticUtil.server;
13
- declare const RarityNames: typeof util.staticUtil.rarity;
14
- export { request as api, request, config, staticUtil, ServerNames, RarityNames, query, params, model, };
@@ -1,47 +0,0 @@
1
- /** 경매장 아이템 인터페이스 */
2
- export interface IAuction {
3
- auctionNo: number;
4
- regDate: Date;
5
- expireDate: Date;
6
- itemId: string;
7
- itemName: string;
8
- itemAvailableLevel: number;
9
- itemRarity: string;
10
- itemTypeId: string;
11
- itemType: string;
12
- itemTypeDetailId: string;
13
- itemTypeDetail: string;
14
- refine: number;
15
- reinforce: number;
16
- amplificationName: string;
17
- fame: number;
18
- count: number;
19
- regCount: number;
20
- price: number;
21
- currentPrice: number;
22
- unitPrice: number;
23
- averagePrice: number;
24
- upgrade?: number;
25
- upgradeMax?: number;
26
- }
27
- /** 판매 완료 아이템 인터페이스 */
28
- export interface IAuctionSolid {
29
- soldDate: string;
30
- itemId: string;
31
- itemName: string;
32
- itemAvailableLevel: number;
33
- itemRarity: string;
34
- itemTypeId: string;
35
- itemType: string;
36
- itemTypeDetailId: string;
37
- itemTypeDetail: string;
38
- refine: number;
39
- reinforce: number;
40
- amplificationName: string | null;
41
- fame: number;
42
- count: number;
43
- price: number;
44
- unitPrice: number;
45
- upgrade?: number;
46
- upgradeMax?: number;
47
- }
@@ -1,91 +0,0 @@
1
- import type { staticUtil } from "../util";
2
- import type { INameValue } from "./";
3
- /** 캐릭터 정보 인터페이스 */
4
- export interface ICharacter {
5
- serverId: staticUtil.server;
6
- characterId: string;
7
- characterName: string;
8
- level: number;
9
- jobId: string;
10
- jobGrowId: string;
11
- jobName: string;
12
- jobGrowName: string;
13
- fame: number;
14
- }
15
- /** 캐릭터 상세 정보 인터페이스 */
16
- export interface IInfo {
17
- serverId: staticUtil.server;
18
- characterId: string;
19
- characterName: string;
20
- level: number;
21
- jobId: string;
22
- jobGrowId: string;
23
- jobName: string;
24
- jobGrowName: string;
25
- fame: number;
26
- adventureName: string;
27
- guildId: string | null;
28
- guildName: string | null;
29
- }
30
- /** 캐릭터 타임라인 인터페이스 */
31
- export interface ITimeline {
32
- serverId: staticUtil.server;
33
- characterId: string;
34
- characterName: string;
35
- level: number;
36
- jobId: string;
37
- jobGrowId: string;
38
- jobName: string;
39
- jobGrowName: string;
40
- adventureName: string;
41
- guildId: string;
42
- guildName: string;
43
- timeline: {
44
- date: {
45
- start: Date;
46
- end: Date;
47
- };
48
- next: string;
49
- rows: ITimeLineRow[];
50
- };
51
- }
52
- /** 타임라인 행 인터페이스 */
53
- export interface ITimeLineRow {
54
- code: number;
55
- name: string;
56
- date: string;
57
- data: ITimeLineRowData;
58
- }
59
- /** 타임라인 행 데이터 인터페이스 */
60
- export interface ITimeLineRowData {
61
- itemId: string;
62
- itemName: string;
63
- itemRarity: staticUtil.rarity;
64
- channelName: string;
65
- channelNo: number;
66
- dungeonName: string;
67
- mistGear: boolean;
68
- }
69
- /** 캐릭터 상태 인터페이스 */
70
- export interface ICharacterStatus {
71
- serverId: staticUtil.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: IBuff[];
84
- status: INameValue[];
85
- }
86
- /** 버프 정보 인터페이스 */
87
- export interface IBuff {
88
- name: string;
89
- level?: number;
90
- status: INameValue[];
91
- }
@@ -1,39 +0,0 @@
1
- import * as auction from "./auction";
2
- import * as char from "./character";
3
- import * as item from "./item";
4
- import * as setItem from "./setitem";
5
- export { char, item, setItem, auction };
6
- /** 에러 응답 인터페이스 */
7
- export interface IDnfErrorResponse {
8
- url: string;
9
- status: number;
10
- statusText: string;
11
- code: string;
12
- message: string;
13
- }
14
- /** 성공 응답 인터페이스 */
15
- export interface IDnfSuccess<T> {
16
- data: T;
17
- error?: never;
18
- }
19
- /** 에러 정보 인터페이스 */
20
- export interface IDnfError {
21
- data?: never;
22
- error: IDnfErrorResponse;
23
- }
24
- /** 응답 타입(합성 타입) */
25
- export type IDnfResponse<T> = IDnfSuccess<T> | IDnfError;
26
- /** 행 배열 인터페이스 */
27
- export interface IRows<T> {
28
- rows: T[];
29
- }
30
- /** 서버 정보 인터페이스 */
31
- export interface IServer {
32
- serverId: string;
33
- serverName: string;
34
- }
35
- /** 이름-값 쌍 인터페이스 */
36
- export interface INameValue {
37
- name: string;
38
- value: string | number;
39
- }
@@ -1,103 +0,0 @@
1
- import type * as Static from "../util/static";
2
- import type { INameValue } from "./";
3
- export declare enum ItemDetailKind {
4
- Material = "material",
5
- Equip = "equip"
6
- }
7
- /** 아이템 인터페이스 */
8
- export interface IItem {
9
- itemId: string;
10
- itemName: string;
11
- itemRarity: Static.rarity;
12
- itemType: string;
13
- itemTypeDetail: string;
14
- itemAvailableLevel: number;
15
- }
16
- /** 아이템 상세 인터페이스(합성 타입) */
17
- export type IDetail = IMaterialDetail | IEquipDetail;
18
- /** 재료 아이템 상세 인터페이스 */
19
- export interface IMaterialDetail {
20
- kind: ItemDetailKind.Material;
21
- itemId: string;
22
- itemName: string;
23
- itemRarity: string;
24
- itemTypeId: string;
25
- itemType: string;
26
- itemTypeDetailId: string;
27
- itemTypeDetail: string;
28
- itemAvailableLevel: number;
29
- itemExplain: string;
30
- itemExplainDetail: string;
31
- itemFlavorText: string;
32
- fame: number;
33
- setItemId: string | null;
34
- setItemName: string | null;
35
- obtainInfo: IObtainInfo;
36
- }
37
- /** 장비 아이템 상세 인터페이스 */
38
- export interface IEquipDetail {
39
- kind: ItemDetailKind.Equip;
40
- itemId: string;
41
- itemName: string;
42
- itemRarity: string;
43
- itemTypeId: string;
44
- itemType: string;
45
- itemTypeDetailId: string;
46
- itemTypeDetail: string;
47
- itemAvailableLevel: number;
48
- itemExplain: string;
49
- itemExplainDetail: string;
50
- itemFlavorText: string;
51
- fame: number;
52
- setItemId: string | null;
53
- setItemName: string | null;
54
- itemStatus: INameValue[];
55
- tune: ITune;
56
- itemBuff: IItemBuff;
57
- hashtag: string[];
58
- obtainInfo: IObtainInfoDetail;
59
- }
60
- /** 튠 정보 인터페이스 */
61
- export interface ITune {
62
- level: number;
63
- setPoint: number;
64
- }
65
- /** 아이템 버프 인터페이스 */
66
- export interface IItemBuff {
67
- explain: string;
68
- explainDetail: string;
69
- reinforceSkill: any[];
70
- status: any | null;
71
- }
72
- /** 획득 정보 인터페이스 */
73
- export interface IObtainInfo {
74
- dungeon: string | null;
75
- shop: IShopInfo[];
76
- }
77
- /** 획득 상세 정보 인터페이스 */
78
- export interface IObtainInfoDetail {
79
- dungeon: IDungeon[];
80
- shop: IShopDetail[];
81
- }
82
- /** 던전 정보 인터페이스 */
83
- export interface IDungeon {
84
- type: string;
85
- rows: IDungeonRow[];
86
- }
87
- /** 던전 행 인터페이스 */
88
- export interface IDungeonRow {
89
- name: string;
90
- }
91
- /** 상점 정보 인터페이스 */
92
- export interface IShopInfo {
93
- type: string;
94
- }
95
- /** 상점 상세 정보 인터페이스 */
96
- export interface IShopDetail {
97
- rows: IShopRow[];
98
- }
99
- /** 상점 행 인터페이스 */
100
- export interface IShopRow {
101
- name: string;
102
- details: string[];
103
- }
@@ -1,32 +0,0 @@
1
- /** 세트 아이템 인터페이스 */
2
- export interface ISetItem {
3
- setItemId: string;
4
- setItemName: string;
5
- }
6
- /** 세트 아이템 상세 인터페이스 */
7
- export interface IDetail {
8
- setItemId: string;
9
- setItemName: string;
10
- setItems: [
11
- {
12
- slotId: string;
13
- slotName: string;
14
- itemId: string;
15
- itemName: string;
16
- itemRarity: string;
17
- }
18
- ];
19
- setItemOption: [
20
- {
21
- optionNo: number;
22
- explain: string;
23
- detailExplain: string;
24
- status: [
25
- {
26
- name: string;
27
- value: number;
28
- }
29
- ];
30
- }
31
- ];
32
- }