artifacts-api-client 1.6.0 → 2.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 (35) hide show
  1. package/README.md +90 -88
  2. package/dist/api/artifacts-accounts.api.d.ts +11 -1
  3. package/dist/api/artifacts-accounts.api.js +26 -0
  4. package/dist/api/artifacts-achievements.api.d.ts +10 -0
  5. package/dist/api/artifacts-achievements.api.js +20 -0
  6. package/dist/api/artifacts-badges.api.d.ts +10 -0
  7. package/dist/api/artifacts-badges.api.js +20 -0
  8. package/dist/api/artifacts-characters.api.d.ts +5 -5
  9. package/dist/api/artifacts-characters.api.js +10 -10
  10. package/dist/api/artifacts-effects.api.d.ts +10 -0
  11. package/dist/api/artifacts-effects.api.js +20 -0
  12. package/dist/api/artifacts-events.api.d.ts +12 -1
  13. package/dist/api/artifacts-events.api.js +20 -0
  14. package/dist/api/artifacts-grand-exchange.api.d.ts +7 -5
  15. package/dist/api/artifacts-grand-exchange.api.js +11 -5
  16. package/dist/api/artifacts-leaderboard.api.d.ts +4 -2
  17. package/dist/api/artifacts-leaderboard.api.js +8 -2
  18. package/dist/api/artifacts-maps.api.d.ts +7 -3
  19. package/dist/api/artifacts-maps.api.js +13 -3
  20. package/dist/api/artifacts-my-account.api.d.ts +9 -3
  21. package/dist/api/artifacts-my-account.api.js +21 -3
  22. package/dist/api/artifacts-my-characters.api.d.ts +39 -20
  23. package/dist/api/artifacts-my-characters.api.js +112 -36
  24. package/dist/api/artifacts-npcs.api.d.ts +14 -0
  25. package/dist/api/artifacts-npcs.api.js +32 -0
  26. package/dist/api/artifacts-simulation.api.d.ts +8 -0
  27. package/dist/api/artifacts-simulation.api.js +17 -0
  28. package/dist/api/artifacts-tasks.api.d.ts +14 -0
  29. package/dist/api/artifacts-tasks.api.js +30 -0
  30. package/dist/api/artifacts.api.d.ts +18 -6
  31. package/dist/api/artifacts.api.js +30 -12
  32. package/dist/api/types/api-schema-bindings.types.d.ts +98 -29
  33. package/dist/api/types/api-schema.types.d.ts +9448 -2514
  34. package/dist/http-client/types/artifacts-http-client.types.d.ts +6 -6
  35. package/package.json +49 -42
@@ -1,51 +1,70 @@
1
1
  import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
2
- import { CraftingApiBody, CraftingApiResult, DepositBankApiBody, DepositBankGoldApiBody, DepositBankGoldApiResult, DepositBankApiResult, EquipItemApiBody, EquipItemApiResult, FightApiResult, GatheringApiResult, MoveApiBody, MoveApiResult, UnequipItemApiBody, UnequipItemApiResult, WithdrawBankApiBody, WithdrawBankApiResult, WithdrawBankGoldApiBody, WithdrawBankGoldApiResult, RecyclingApiBody, RecyclingApiResult, BuyGrandExchangeItemApiBody, BuyGrandExchangeItemApiResult, SellGrandExchangeItemApiBody, SellGrandExchangeItemApiResult, DeleteItemApiBody, DeleteItemApiResult, AcceptTaskApiResult, CompleteTaskApiResult, ExchangeTaskApiResult, GetLogsApiResult, GetLogsApiQuery, GetMyCharactersApiResult, CancelTaskApiResult, BuyExpansionApiResult } from './types/api-schema-bindings.types';
2
+ import { CraftingApiBody, CraftingApiResult, DepositBankItemApiBody, DepositBankGoldApiBody, DepositBankGoldApiResult, DepositBankItemApiResult, EquipItemApiBody, EquipItemApiResult, FightApiResult, GatheringApiResult, MoveApiBody, MoveApiResult, UnequipItemApiBody, UnequipItemApiResult, WithdrawBankItemApiBody, WithdrawBankItemApiResult, WithdrawBankGoldApiBody, WithdrawBankGoldApiResult, RecyclingApiBody, RecyclingApiResult, BuyGrandExchangeItemApiBody, BuyGrandExchangeItemApiResult, CreateGrandExchangeSellOrderApiBody, CreateGrandExchangeSellOrderApiResult, DeleteItemApiBody, DeleteItemApiResult, AcceptTaskApiResult, CompleteTaskApiResult, ExchangeTaskApiResult, GetAllLogsApiResult, GetAllLogsApiQuery, GetMyCharactersApiResult, CancelTaskApiResult, BuyExpansionApiResult, TransitionApiResult, RestApiResult, UseItemApiBody, UseItemApiResult, FightApiBody, NpcBuyItemApiBody, NpcBuyItemApiResult, NpcSellItemApiBody, NpcSellItemApiResult, CancelGrandExchangeSellOrderApiBody, CancelGrandExchangeSellOrderApiResult, TradeTaskItemApiBody, TradeTaskItemApiResult, GiveGoldApiBody, GiveGoldApiResult, GiveItemsApiBody, GiveItemsApiResult, ChangeSkinApiBody, ChangeSkinApiResult, GetLogsApiQuery, GetLogsApiResult } from './types/api-schema-bindings.types';
3
3
  export declare class ArtifactsMyCharactersApi {
4
4
  private readonly httpClient;
5
5
  constructor(httpClient: ArtifactsHttpClient);
6
6
  /** Moves a character on the map using the map's X and Y position. */
7
7
  move(name: string, body: MoveApiBody): Promise<MoveApiResult>;
8
+ /** Execute a transition from the current map to another layer. The character must be on a map that has a transition available. */
9
+ transition(name: string): Promise<TransitionApiResult>;
10
+ /** Recovers hit points by resting. (1 second per 5 HP, minimum 3 seconds) */
11
+ rest(name: string): Promise<RestApiResult>;
8
12
  /** Equip an item on your character. */
9
13
  equipItem(name: string, body: EquipItemApiBody): Promise<EquipItemApiResult>;
10
14
  /** Unequip an item on your character. */
11
15
  unequipItem(name: string, body: UnequipItemApiBody): Promise<UnequipItemApiResult>;
16
+ /** Use an item as a consumable. */
17
+ useItem(name: string, body: UseItemApiBody): Promise<UseItemApiResult>;
12
18
  /** Start a fight against a monster on the character's map. */
13
- fight(name: string): Promise<FightApiResult>;
19
+ fight(name: string, body?: FightApiBody): Promise<FightApiResult>;
14
20
  /** Harvest a resource on the character's map. */
15
21
  gathering(name: string): Promise<GatheringApiResult>;
16
22
  /** Crafting an item. The character must be on a map with a workshop. */
17
23
  crafting(name: string, body: CraftingApiBody): Promise<CraftingApiResult>;
18
- /** Deposit an item in a bank on the character's map. */
19
- depositBank(name: string, body: DepositBankApiBody): Promise<DepositBankApiResult>;
20
24
  /** Deposit golds in a bank on the character's map. */
21
25
  depositBankGold(name: string, body: DepositBankGoldApiBody): Promise<DepositBankGoldApiResult>;
22
- /** Take an item from your bank and put it in the character's inventory. */
23
- withdrawBank(name: string, body: WithdrawBankApiBody): Promise<WithdrawBankApiResult>;
26
+ /** Deposit multiple items in a bank on the character's map. The cooldown will be 3 seconds multiplied by the number of different items deposited. */
27
+ depositBankItem(name: string, body: DepositBankItemApiBody): Promise<DepositBankItemApiResult>;
28
+ /** Take items from your bank and put them in the character's inventory. The cooldown will be 3 seconds multiplied by the number of different items withdrawn. */
29
+ withdrawBankItem(name: string, body: WithdrawBankItemApiBody): Promise<WithdrawBankItemApiResult>;
24
30
  /** Withdraw gold from your bank. */
25
31
  withdrawBankGold(name: string, body: WithdrawBankGoldApiBody): Promise<WithdrawBankGoldApiResult>;
32
+ /** Buy a 20 slots bank expansion. */
33
+ buyBankExpansion(name: string): Promise<BuyExpansionApiResult>;
34
+ /** Buy an item from an NPC on the character's map. */
35
+ buyNpcItem(name: string, body: NpcBuyItemApiBody): Promise<NpcBuyItemApiResult>;
36
+ /** Sell an item to an NPC on the character's map. */
37
+ sellNpcItem(name: string, body: NpcSellItemApiBody): Promise<NpcSellItemApiResult>;
26
38
  /** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
27
39
  recycling(name: string, body: RecyclingApiBody): Promise<RecyclingApiResult>;
28
40
  /** Buy an item at the Grand Exchange on the character's map. */
29
41
  buyGrandExchangeItem(name: string, body: BuyGrandExchangeItemApiBody): Promise<BuyGrandExchangeItemApiResult>;
30
- /** Sell an item at the Grand Exchange on the character's map. */
31
- sellGrandExchangeItem(name: string, body: SellGrandExchangeItemApiBody): Promise<SellGrandExchangeItemApiResult>;
32
- /** Accepting a new task. */
33
- acceptTask(name: string): Promise<AcceptTaskApiResult>;
42
+ /** Create a sell order at the Grand Exchange on the character's map. Please note there is a 3% listing tax, charged at the time of posting, on the total price. */
43
+ createGrandExchangeSellOrder(name: string, body: CreateGrandExchangeSellOrderApiBody): Promise<CreateGrandExchangeSellOrderApiResult>;
44
+ /** Cancel a sell order at the Grand Exchange on the character's map. */
45
+ cancelGrandExchangeSellOrder(name: string, body: CancelGrandExchangeSellOrderApiBody): Promise<CancelGrandExchangeSellOrderApiResult>;
34
46
  /** Complete a task. */
35
47
  completeTask(name: string): Promise<CompleteTaskApiResult>;
36
- /**
37
- * Exchange 3 tasks coins for a random reward.
38
- * Rewards are exclusive resources for crafting items.
39
- */
48
+ /** Exchange 6 tasks coins for a random reward. Rewards are exclusive items or resources. */
40
49
  exchangeTask(name: string): Promise<ExchangeTaskApiResult>;
50
+ /** Accepting a new task. */
51
+ acceptTask(name: string): Promise<AcceptTaskApiResult>;
52
+ /** Trading items with a Tasks Master. */
53
+ tradeTaskItem(name: string, body: TradeTaskItemApiBody): Promise<TradeTaskItemApiResult>;
54
+ /** Cancel a task for 1 tasks coin. */
55
+ cancelTask(name: string): Promise<CancelTaskApiResult>;
56
+ /** Give gold to another character in your account on the same map. */
57
+ giveGold(name: string, body: GiveGoldApiBody): Promise<GiveGoldApiResult>;
58
+ /** Give items to another character in your account on the same map. The cooldown will be 3 seconds multiplied by the number of different items given. */
59
+ giveItems(name: string, body: GiveItemsApiBody): Promise<GiveItemsApiResult>;
41
60
  /** Delete an item from your character's inventory. */
42
61
  deleteItem(name: string, body: DeleteItemApiBody): Promise<DeleteItemApiResult>;
43
- /** History of the last 100 actions of all your characters. */
44
- getLogs(params?: GetLogsApiQuery): Promise<GetLogsApiResult>;
62
+ /** Change the skin of your character. */
63
+ changeSkin(name: string, body: ChangeSkinApiBody): Promise<ChangeSkinApiResult>;
64
+ /** History of the last 5000 actions of all your characters. */
65
+ getAllLogs(params?: GetAllLogsApiQuery): Promise<GetAllLogsApiResult>;
66
+ /** History of the last actions of your character. */
67
+ getLogs(name: string, params: GetLogsApiQuery): Promise<GetLogsApiResult>;
45
68
  /** List of your characters. */
46
69
  getAll(): Promise<GetMyCharactersApiResult>;
47
- /** Cancel a task for 1 tasks coin. */
48
- cancelTask(name: string): Promise<CancelTaskApiResult>;
49
- /** Buy a 20 slots bank expansion. */
50
- buyBankExpansion(name: string): Promise<BuyExpansionApiResult>;
51
70
  }
@@ -10,6 +10,16 @@ class ArtifactsMyCharactersApi {
10
10
  move(name, body) {
11
11
  return this.httpClient.post(`/my/${name}/action/move`, { body, isSecure: true });
12
12
  }
13
+ /** Execute a transition from the current map to another layer. The character must be on a map that has a transition available. */
14
+ transition(name) {
15
+ return this.httpClient.post(`/my/${name}/action/transition`, {
16
+ isSecure: true,
17
+ });
18
+ }
19
+ /** Recovers hit points by resting. (1 second per 5 HP, minimum 3 seconds) */
20
+ rest(name) {
21
+ return this.httpClient.post(`/my/${name}/action/rest`, { isSecure: true });
22
+ }
13
23
  /** Equip an item on your character. */
14
24
  equipItem(name, body) {
15
25
  return this.httpClient.post(`/my/${name}/action/equip`, {
@@ -24,9 +34,19 @@ class ArtifactsMyCharactersApi {
24
34
  isSecure: true,
25
35
  });
26
36
  }
37
+ /** Use an item as a consumable. */
38
+ useItem(name, body) {
39
+ return this.httpClient.post(`/my/${name}/action/use`, {
40
+ body,
41
+ isSecure: true,
42
+ });
43
+ }
27
44
  /** Start a fight against a monster on the character's map. */
28
- fight(name) {
29
- return this.httpClient.post(`/my/${name}/action/fight`, { isSecure: true });
45
+ fight(name, body) {
46
+ return this.httpClient.post(`/my/${name}/action/fight`, {
47
+ body,
48
+ isSecure: true,
49
+ });
30
50
  }
31
51
  /** Harvest a resource on the character's map. */
32
52
  gathering(name) {
@@ -41,30 +61,53 @@ class ArtifactsMyCharactersApi {
41
61
  isSecure: true,
42
62
  });
43
63
  }
44
- /** Deposit an item in a bank on the character's map. */
45
- depositBank(name, body) {
46
- return this.httpClient.post(`/my/${name}/action/bank/deposit`, {
64
+ /** Deposit golds in a bank on the character's map. */
65
+ depositBankGold(name, body) {
66
+ return this.httpClient.post(`/my/${name}/action/bank/deposit/gold`, {
47
67
  body,
48
68
  isSecure: true,
49
69
  });
50
70
  }
51
- /** Deposit golds in a bank on the character's map. */
52
- depositBankGold(name, body) {
53
- return this.httpClient.post(`/my/${name}/action/bank/deposit/gold`, {
71
+ /** Deposit multiple items in a bank on the character's map. The cooldown will be 3 seconds multiplied by the number of different items deposited. */
72
+ depositBankItem(name, body) {
73
+ return this.httpClient.post(`/my/${name}/action/bank/deposit/item`, {
54
74
  body,
55
75
  isSecure: true,
56
76
  });
57
77
  }
58
- /** Take an item from your bank and put it in the character's inventory. */
59
- withdrawBank(name, body) {
60
- return this.httpClient.post(`/my/${name}/action/bank/withdraw`, {
78
+ /** Take items from your bank and put them in the character's inventory. The cooldown will be 3 seconds multiplied by the number of different items withdrawn. */
79
+ withdrawBankItem(name, body) {
80
+ return this.httpClient.post(`/my/${name}/action/bank/withdraw/item`, {
61
81
  body,
62
82
  isSecure: true,
63
83
  });
64
84
  }
65
85
  /** Withdraw gold from your bank. */
66
86
  withdrawBankGold(name, body) {
67
- return this.httpClient.post(`/my/${name}/action/bank/withdraw/gold`, { body, isSecure: true });
87
+ return this.httpClient.post(`/my/${name}/action/bank/withdraw/gold`, {
88
+ body,
89
+ isSecure: true,
90
+ });
91
+ }
92
+ /** Buy a 20 slots bank expansion. */
93
+ buyBankExpansion(name) {
94
+ return this.httpClient.post(`/my/${name}/action/bank/buy_expansion`, {
95
+ isSecure: true,
96
+ });
97
+ }
98
+ /** Buy an item from an NPC on the character's map. */
99
+ buyNpcItem(name, body) {
100
+ return this.httpClient.post(`/my/${name}/action/npc/buy`, {
101
+ body,
102
+ isSecure: true,
103
+ });
104
+ }
105
+ /** Sell an item to an NPC on the character's map. */
106
+ sellNpcItem(name, body) {
107
+ return this.httpClient.post(`/my/${name}/action/npc/sell`, {
108
+ body,
109
+ isSecure: true,
110
+ });
68
111
  }
69
112
  /** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
70
113
  recycling(name, body) {
@@ -75,21 +118,22 @@ class ArtifactsMyCharactersApi {
75
118
  }
76
119
  /** Buy an item at the Grand Exchange on the character's map. */
77
120
  buyGrandExchangeItem(name, body) {
78
- return this.httpClient.post(`/my/${name}/action/ge/buy`, {
121
+ return this.httpClient.post(`/my/${name}/action/grandexchange/buy`, {
79
122
  body,
80
123
  isSecure: true,
81
124
  });
82
125
  }
83
- /** Sell an item at the Grand Exchange on the character's map. */
84
- sellGrandExchangeItem(name, body) {
85
- return this.httpClient.post(`/my/${name}/action/ge/sell`, {
126
+ /** Create a sell order at the Grand Exchange on the character's map. Please note there is a 3% listing tax, charged at the time of posting, on the total price. */
127
+ createGrandExchangeSellOrder(name, body) {
128
+ return this.httpClient.post(`/my/${name}/action/grandexchange/sell`, {
86
129
  body,
87
130
  isSecure: true,
88
131
  });
89
132
  }
90
- /** Accepting a new task. */
91
- acceptTask(name) {
92
- return this.httpClient.post(`/my/${name}/action/task/new`, {
133
+ /** Cancel a sell order at the Grand Exchange on the character's map. */
134
+ cancelGrandExchangeSellOrder(name, body) {
135
+ return this.httpClient.post(`/my/${name}/action/grandexchange/cancel`, {
136
+ body,
93
137
  isSecure: true,
94
138
  });
95
139
  }
@@ -99,15 +143,45 @@ class ArtifactsMyCharactersApi {
99
143
  isSecure: true,
100
144
  });
101
145
  }
102
- /**
103
- * Exchange 3 tasks coins for a random reward.
104
- * Rewards are exclusive resources for crafting items.
105
- */
146
+ /** Exchange 6 tasks coins for a random reward. Rewards are exclusive items or resources. */
106
147
  exchangeTask(name) {
107
148
  return this.httpClient.post(`/my/${name}/action/task/exchange`, {
108
149
  isSecure: true,
109
150
  });
110
151
  }
152
+ /** Accepting a new task. */
153
+ acceptTask(name) {
154
+ return this.httpClient.post(`/my/${name}/action/task/new`, {
155
+ isSecure: true,
156
+ });
157
+ }
158
+ /** Trading items with a Tasks Master. */
159
+ tradeTaskItem(name, body) {
160
+ return this.httpClient.post(`/my/${name}/action/task/trade`, {
161
+ body,
162
+ isSecure: true,
163
+ });
164
+ }
165
+ /** Cancel a task for 1 tasks coin. */
166
+ cancelTask(name) {
167
+ return this.httpClient.post(`/my/${name}/action/task/cancel`, {
168
+ isSecure: true,
169
+ });
170
+ }
171
+ /** Give gold to another character in your account on the same map. */
172
+ giveGold(name, body) {
173
+ return this.httpClient.post(`/my/${name}/action/give/gold`, {
174
+ body,
175
+ isSecure: true,
176
+ });
177
+ }
178
+ /** Give items to another character in your account on the same map. The cooldown will be 3 seconds multiplied by the number of different items given. */
179
+ giveItems(name, body) {
180
+ return this.httpClient.post(`/my/${name}/action/give/item`, {
181
+ body,
182
+ isSecure: true,
183
+ });
184
+ }
111
185
  /** Delete an item from your character's inventory. */
112
186
  deleteItem(name, body) {
113
187
  return this.httpClient.post(`/my/${name}/action/delete`, {
@@ -115,28 +189,30 @@ class ArtifactsMyCharactersApi {
115
189
  isSecure: true,
116
190
  });
117
191
  }
118
- /** History of the last 100 actions of all your characters. */
119
- getLogs(params = {}) {
120
- return this.httpClient.get(`/my/logs`, {
121
- query: params,
192
+ /** Change the skin of your character. */
193
+ changeSkin(name, body) {
194
+ return this.httpClient.post(`/my/${name}/action/change_skin`, {
195
+ body,
122
196
  isSecure: true,
123
197
  });
124
198
  }
125
- /** List of your characters. */
126
- getAll() {
127
- return this.httpClient.get(`/my/characters`, {
199
+ /** History of the last 5000 actions of all your characters. */
200
+ getAllLogs(params = {}) {
201
+ return this.httpClient.get(`/my/logs`, {
202
+ query: params,
128
203
  isSecure: true,
129
204
  });
130
205
  }
131
- /** Cancel a task for 1 tasks coin. */
132
- cancelTask(name) {
133
- return this.httpClient.post(`/my/${name}/action/task/cancel`, {
206
+ /** History of the last actions of your character. */
207
+ getLogs(name, params) {
208
+ return this.httpClient.get(`/my/logs/${name}`, {
209
+ query: params,
134
210
  isSecure: true,
135
211
  });
136
212
  }
137
- /** Buy a 20 slots bank expansion. */
138
- buyBankExpansion(name) {
139
- return this.httpClient.post(`/my/${name}/action/bank/buy_expansion`, {
213
+ /** List of your characters. */
214
+ getAll() {
215
+ return this.httpClient.get(`/my/characters`, {
140
216
  isSecure: true,
141
217
  });
142
218
  }
@@ -0,0 +1,14 @@
1
+ import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
2
+ import { GetAllNpcsApiQuery, GetAllNpcsApiResult, GetAllNpcsItemsApiQuery, GetAllNpcsItemsApiResult, GetNpcApiResult, GetNpcItemsApiQuery, GetNpcItemsApiResult } from './types/api-schema-bindings.types';
3
+ export declare class ArtifactsNpcsApi {
4
+ private readonly httpClient;
5
+ constructor(httpClient: ArtifactsHttpClient);
6
+ /** Fetch NPCs details. */
7
+ getAll(params?: GetAllNpcsApiQuery): Promise<GetAllNpcsApiResult>;
8
+ /** Retrieve the details of a NPC. */
9
+ get(code: string): Promise<GetNpcApiResult>;
10
+ /** Retrieve the items list of a NPC. If the NPC has items to buy, sell or trade, they will be displayed. */
11
+ getItems(code: string, params?: GetNpcItemsApiQuery): Promise<GetNpcItemsApiResult>;
12
+ /** Retrieve the list of all NPC items. */
13
+ getAllItems(params?: GetAllNpcsItemsApiQuery): Promise<GetAllNpcsItemsApiResult>;
14
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArtifactsNpcsApi = void 0;
4
+ class ArtifactsNpcsApi {
5
+ httpClient;
6
+ constructor(httpClient) {
7
+ this.httpClient = httpClient;
8
+ }
9
+ /** Fetch NPCs details. */
10
+ getAll(params = {}) {
11
+ return this.httpClient.get(`/npcs/details`, {
12
+ query: params,
13
+ });
14
+ }
15
+ /** Retrieve the details of a NPC. */
16
+ get(code) {
17
+ return this.httpClient.get(`/npcs/details/${code}`);
18
+ }
19
+ /** Retrieve the items list of a NPC. If the NPC has items to buy, sell or trade, they will be displayed. */
20
+ getItems(code, params = {}) {
21
+ return this.httpClient.get(`/npcs/items/${code}`, {
22
+ query: params,
23
+ });
24
+ }
25
+ /** Retrieve the list of all NPC items. */
26
+ getAllItems(params = {}) {
27
+ return this.httpClient.get(`/npcs/items`, {
28
+ query: params,
29
+ });
30
+ }
31
+ }
32
+ exports.ArtifactsNpcsApi = ArtifactsNpcsApi;
@@ -0,0 +1,8 @@
1
+ import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
2
+ import { FightSimulationApiBody, FightSimulationApiResult } from './types/api-schema-bindings.types';
3
+ export declare class ArtifactsSimulationApi {
4
+ private readonly httpClient;
5
+ constructor(httpClient: ArtifactsHttpClient);
6
+ /** Simulate combat with fake characters against a monster multiple times. Member or founder account required. */
7
+ simulate(body: FightSimulationApiBody): Promise<FightSimulationApiResult>;
8
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArtifactsSimulationApi = void 0;
4
+ class ArtifactsSimulationApi {
5
+ httpClient;
6
+ constructor(httpClient) {
7
+ this.httpClient = httpClient;
8
+ }
9
+ /** Simulate combat with fake characters against a monster multiple times. Member or founder account required. */
10
+ simulate(body) {
11
+ return this.httpClient.post(`/simulation/fight_simulation`, {
12
+ body,
13
+ isSecure: true,
14
+ });
15
+ }
16
+ }
17
+ exports.ArtifactsSimulationApi = ArtifactsSimulationApi;
@@ -0,0 +1,14 @@
1
+ import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
2
+ import { GetAllTasksApiQuery, GetAllTasksApiResult, GetAllTasksRewardsApiQuery, GetAllTasksRewardsApiResult, GetTaskApiResult, GetTasksRewardsApiResult } from './types/api-schema-bindings.types';
3
+ export declare class ArtifactsTasksApi {
4
+ private readonly httpClient;
5
+ constructor(httpClient: ArtifactsHttpClient);
6
+ /** Fetch the list of all tasks. */
7
+ getAll(params?: GetAllTasksApiQuery): Promise<GetAllTasksApiResult>;
8
+ /** Retrieve the details of a task. */
9
+ get(code: string): Promise<GetTaskApiResult>;
10
+ /** Fetch the list of all tasks rewards. To obtain these rewards, you must exchange 6 task coins with a tasks master. */
11
+ getAllRewards(params?: GetAllTasksRewardsApiQuery): Promise<GetAllTasksRewardsApiResult>;
12
+ /** Retrieve the details of a tasks reward. */
13
+ getReward(code: string): Promise<GetTasksRewardsApiResult>;
14
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArtifactsTasksApi = void 0;
4
+ class ArtifactsTasksApi {
5
+ httpClient;
6
+ constructor(httpClient) {
7
+ this.httpClient = httpClient;
8
+ }
9
+ /** Fetch the list of all tasks. */
10
+ getAll(params = {}) {
11
+ return this.httpClient.get(`/tasks/list`, {
12
+ query: params,
13
+ });
14
+ }
15
+ /** Retrieve the details of a task. */
16
+ get(code) {
17
+ return this.httpClient.get(`/tasks/list/${code}`);
18
+ }
19
+ /** Fetch the list of all tasks rewards. To obtain these rewards, you must exchange 6 task coins with a tasks master. */
20
+ getAllRewards(params = {}) {
21
+ return this.httpClient.get(`/tasks/rewards`, {
22
+ query: params,
23
+ });
24
+ }
25
+ /** Retrieve the details of a tasks reward. */
26
+ getReward(code) {
27
+ return this.httpClient.get(`/tasks/rewards/${code}`);
28
+ }
29
+ }
30
+ exports.ArtifactsTasksApi = ArtifactsTasksApi;
@@ -13,20 +13,32 @@ import { ArtifactsAccountsApi } from './artifacts-accounts.api';
13
13
  import { ArtifactsTokenApi } from './artifacts-token.api';
14
14
  import { GetStatusApiResult } from './types/api-schema-bindings.types';
15
15
  import { ArtifactsLeaderboardApi } from './artifacts-leaderboard.api';
16
+ import { ArtifactsAchievementsApi } from './artifacts-achievements.api';
17
+ import { ArtifactsBadgesApi } from './artifacts-badges.api';
18
+ import { ArtifactsEffectsApi } from './artifacts-effects.api';
19
+ import { ArtifactsNpcsApi } from './artifacts-npcs.api';
20
+ import { ArtifactsTasksApi } from './artifacts-tasks.api';
21
+ import { ArtifactsSimulationApi } from './artifacts-simulation.api';
16
22
  export declare class ArtifactsApi {
17
23
  private readonly httpClient;
18
- readonly myCharacters: ArtifactsMyCharactersApi;
19
24
  readonly myAccount: ArtifactsMyAccountApi;
20
- readonly characters: ArtifactsCharactersApi;
25
+ readonly myCharacters: ArtifactsMyCharactersApi;
21
26
  readonly accounts: ArtifactsAccountsApi;
22
- readonly maps: ArtifactsMapsApi;
27
+ readonly achievements: ArtifactsAchievementsApi;
28
+ readonly badges: ArtifactsBadgesApi;
29
+ readonly characters: ArtifactsCharactersApi;
30
+ readonly effects: ArtifactsEffectsApi;
31
+ readonly events: ArtifactsEventsApi;
32
+ readonly grandExchange: ArtifactsGrandExchangeApi;
23
33
  readonly items: ArtifactsItemsApi;
34
+ readonly leaderboard: ArtifactsLeaderboardApi;
35
+ readonly maps: ArtifactsMapsApi;
24
36
  readonly monsters: ArtifactsMonstersApi;
37
+ readonly npcs: ArtifactsNpcsApi;
25
38
  readonly resources: ArtifactsResourcesApi;
26
- readonly events: ArtifactsEventsApi;
27
- readonly grandExchange: ArtifactsGrandExchangeApi;
39
+ readonly tasks: ArtifactsTasksApi;
40
+ readonly simulation: ArtifactsSimulationApi;
28
41
  readonly token: ArtifactsTokenApi;
29
- readonly leaderboard: ArtifactsLeaderboardApi;
30
42
  protected constructor(httpClient: ArtifactsHttpClient);
31
43
  static create(params?: ArtifactsApiParams): ArtifactsApi;
32
44
  getStatus(): Promise<GetStatusApiResult>;
@@ -14,34 +14,52 @@ const artifacts_grand_exchange_api_1 = require("./artifacts-grand-exchange.api")
14
14
  const artifacts_accounts_api_1 = require("./artifacts-accounts.api");
15
15
  const artifacts_token_api_1 = require("./artifacts-token.api");
16
16
  const artifacts_leaderboard_api_1 = require("./artifacts-leaderboard.api");
17
+ const artifacts_achievements_api_1 = require("./artifacts-achievements.api");
18
+ const artifacts_badges_api_1 = require("./artifacts-badges.api");
19
+ const artifacts_effects_api_1 = require("./artifacts-effects.api");
20
+ const artifacts_npcs_api_1 = require("./artifacts-npcs.api");
21
+ const artifacts_tasks_api_1 = require("./artifacts-tasks.api");
22
+ const artifacts_simulation_api_1 = require("./artifacts-simulation.api");
17
23
  class ArtifactsApi {
18
24
  httpClient;
19
- myCharacters;
20
25
  myAccount;
21
- characters;
26
+ myCharacters;
22
27
  accounts;
23
- maps;
28
+ achievements;
29
+ badges;
30
+ characters;
31
+ effects;
32
+ events;
33
+ grandExchange;
24
34
  items;
35
+ leaderboard;
36
+ maps;
25
37
  monsters;
38
+ npcs;
26
39
  resources;
27
- events;
28
- grandExchange;
40
+ tasks;
41
+ simulation;
29
42
  token;
30
- leaderboard;
31
43
  constructor(httpClient) {
32
44
  this.httpClient = httpClient;
45
+ this.myAccount = new artifacts_my_account_api_1.ArtifactsMyAccountApi(httpClient);
33
46
  this.myCharacters = new artifacts_my_characters_api_1.ArtifactsMyCharactersApi(httpClient);
47
+ this.accounts = new artifacts_accounts_api_1.ArtifactsAccountsApi(httpClient);
48
+ this.achievements = new artifacts_achievements_api_1.ArtifactsAchievementsApi(httpClient);
49
+ this.badges = new artifacts_badges_api_1.ArtifactsBadgesApi(httpClient);
34
50
  this.characters = new artifacts_characters_api_1.ArtifactsCharactersApi(httpClient);
35
- this.myAccount = new artifacts_my_account_api_1.ArtifactsMyAccountApi(httpClient);
36
- this.maps = new artifacts_maps_api_1.ArtifactsMapsApi(httpClient);
51
+ this.effects = new artifacts_effects_api_1.ArtifactsEffectsApi(httpClient);
52
+ this.events = new artifacts_events_api_1.ArtifactsEventsApi(httpClient);
53
+ this.grandExchange = new artifacts_grand_exchange_api_1.ArtifactsGrandExchangeApi(httpClient);
37
54
  this.items = new artifacts_items_api_1.ArtifactsItemsApi(httpClient);
55
+ this.leaderboard = new artifacts_leaderboard_api_1.ArtifactsLeaderboardApi(httpClient);
56
+ this.maps = new artifacts_maps_api_1.ArtifactsMapsApi(httpClient);
38
57
  this.monsters = new artifacts_monsters_api_1.ArtifactsMonstersApi(httpClient);
58
+ this.npcs = new artifacts_npcs_api_1.ArtifactsNpcsApi(httpClient);
39
59
  this.resources = new artifacts_resources_api_1.ArtifactsResourcesApi(httpClient);
40
- this.events = new artifacts_events_api_1.ArtifactsEventsApi(httpClient);
41
- this.grandExchange = new artifacts_grand_exchange_api_1.ArtifactsGrandExchangeApi(httpClient);
42
- this.accounts = new artifacts_accounts_api_1.ArtifactsAccountsApi(httpClient);
60
+ this.tasks = new artifacts_tasks_api_1.ArtifactsTasksApi(httpClient);
61
+ this.simulation = new artifacts_simulation_api_1.ArtifactsSimulationApi(httpClient);
43
62
  this.token = new artifacts_token_api_1.ArtifactsTokenApi(httpClient);
44
- this.leaderboard = new artifacts_leaderboard_api_1.ArtifactsLeaderboardApi(httpClient);
45
63
  }
46
64
  static create(params = {}) {
47
65
  const httpClient = new artifacts_http_client_1.ArtifactsHttpClient(params.baseUrl ?? 'https://api.artifactsmmo.com', params.token ?? '');