artifacts-api-client 1.7.0 → 2.1.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.
- package/README.md +90 -88
- package/dist/api/artifacts-accounts.api.d.ts +11 -1
- package/dist/api/artifacts-accounts.api.js +26 -0
- package/dist/api/artifacts-achievements.api.d.ts +10 -0
- package/dist/api/artifacts-achievements.api.js +20 -0
- package/dist/api/artifacts-badges.api.d.ts +10 -0
- package/dist/api/artifacts-badges.api.js +20 -0
- package/dist/api/artifacts-characters.api.d.ts +10 -5
- package/dist/api/artifacts-characters.api.js +17 -10
- package/dist/api/artifacts-effects.api.d.ts +10 -0
- package/dist/api/artifacts-effects.api.js +20 -0
- package/dist/api/artifacts-events.api.d.ts +3 -1
- package/dist/api/artifacts-events.api.js +6 -0
- package/dist/api/artifacts-game-assistant.api.d.ts +11 -0
- package/dist/api/artifacts-game-assistant.api.js +20 -0
- package/dist/api/artifacts-gems-shop.api.d.ts +16 -0
- package/dist/api/artifacts-gems-shop.api.js +44 -0
- package/dist/api/artifacts-grand-exchange.api.d.ts +10 -5
- package/dist/api/artifacts-grand-exchange.api.js +14 -5
- package/dist/api/artifacts-leaderboard.api.d.ts +4 -2
- package/dist/api/artifacts-leaderboard.api.js +8 -2
- package/dist/api/artifacts-maps.api.d.ts +7 -3
- package/dist/api/artifacts-maps.api.js +13 -3
- package/dist/api/artifacts-my-account.api.d.ts +32 -3
- package/dist/api/artifacts-my-account.api.js +88 -3
- package/dist/api/artifacts-my-characters.api.d.ts +67 -24
- package/dist/api/artifacts-my-characters.api.js +159 -40
- package/dist/api/artifacts-npcs.api.d.ts +14 -0
- package/dist/api/artifacts-npcs.api.js +32 -0
- package/dist/api/artifacts-raids.api.d.ts +12 -0
- package/dist/api/artifacts-raids.api.js +26 -0
- package/dist/api/artifacts-season-rewards.api.d.ts +10 -0
- package/dist/api/artifacts-season-rewards.api.js +22 -0
- package/dist/api/artifacts-simulation.api.d.ts +8 -0
- package/dist/api/artifacts-simulation.api.js +17 -0
- package/dist/api/artifacts-skins.api.d.ts +10 -0
- package/dist/api/artifacts-skins.api.js +20 -0
- package/dist/api/artifacts-tasks.api.d.ts +14 -0
- package/dist/api/artifacts-tasks.api.js +30 -0
- package/dist/api/artifacts-token.api.d.ts +2 -2
- package/dist/api/artifacts.api.d.ts +28 -6
- package/dist/api/artifacts.api.js +45 -12
- package/dist/api/types/api-schema-bindings.types.d.ts +145 -34
- package/dist/api/types/api-schema.types.d.ts +13292 -2700
- package/dist/http-client/types/artifacts-http-client.types.d.ts +6 -6
- package/package.json +49 -42
|
@@ -12,9 +12,19 @@ class ArtifactsMapsApi {
|
|
|
12
12
|
query: params,
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
return this.httpClient.get(`/maps/${
|
|
15
|
+
/** Fetch maps details. */
|
|
16
|
+
getLayerMaps(layer, params = {}) {
|
|
17
|
+
return this.httpClient.get(`/maps/${layer}`, {
|
|
18
|
+
query: params,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Retrieve the details of a map by layer and coordinates. */
|
|
22
|
+
getByPosition(layer, x, y) {
|
|
23
|
+
return this.httpClient.get(`/maps/${layer}/${x}/${y}`);
|
|
24
|
+
}
|
|
25
|
+
/** Retrieve the details of a map by its unique ID. */
|
|
26
|
+
getById(map_id) {
|
|
27
|
+
return this.httpClient.get(`/maps/id/${map_id}`);
|
|
18
28
|
}
|
|
19
29
|
}
|
|
20
30
|
exports.ArtifactsMapsApi = ArtifactsMapsApi;
|
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import { ChangePasswordApiBody, ChangePasswordApiResult, GetBankApiResult, GetBankItemsApiQuery, GetBankItemsApiResult } from './types/api-schema-bindings.types';
|
|
2
|
+
import { BuyGemsApiBody, BuyGemsApiResult, CancelSubscriptionApiResult, ChangeEmailApiBody, ChangeEmailApiResult, ChangePasswordApiBody, ChangePasswordApiResult, GetAccountDetailsApiResult, GetBankApiResult, GetBankItemsApiQuery, GetBankItemsApiResult, GetMyGemsHistoryApiResult, GetMyGrandExchangeHistoryApiRequest, GetMyGrandExchangeHistoryApiResult, GetMyGrandExchangeOrdersApiRequest, GetMyGrandExchangeOrdersApiResult, GetMyPurchaseHistoryApiResult, GetMySubscriptionApiResult, GetPendingItemsApiRequest, GetPendingItemsApiResult, GetRateLimitsApiResult, SubscribeWithMemberTokenApiResult, SubscribeWithStripeApiBody, SubscribeWithStripeApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsMyAccountApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
|
-
/** Fetch all items in your bank. */
|
|
7
|
-
getBankItems(params?: GetBankItemsApiQuery): Promise<GetBankItemsApiResult>;
|
|
8
6
|
/** Fetch bank details. */
|
|
9
7
|
getBank(): Promise<GetBankApiResult>;
|
|
8
|
+
/** Fetch all items in your bank. */
|
|
9
|
+
getBankItems(params?: GetBankItemsApiQuery): Promise<GetBankItemsApiResult>;
|
|
10
|
+
/** Fetch your orders details (sell and buy orders). */
|
|
11
|
+
getGrandExchangeOrders(params?: GetMyGrandExchangeOrdersApiRequest): Promise<GetMyGrandExchangeOrdersApiResult>;
|
|
12
|
+
/** Fetch your transaction history of the last 7 days (buy and sell orders). */
|
|
13
|
+
getGrandExchangeHistory(params?: GetMyGrandExchangeHistoryApiRequest): Promise<GetMyGrandExchangeHistoryApiResult>;
|
|
14
|
+
/** Fetch account details. */
|
|
15
|
+
get(): Promise<GetAccountDetailsApiResult>;
|
|
16
|
+
/** Retrieve all unclaimed pending items for your account. */
|
|
17
|
+
getPendingItems(params?: GetPendingItemsApiRequest): Promise<GetPendingItemsApiResult>;
|
|
18
|
+
/** Get all rate limits. */
|
|
19
|
+
getRateLimits(): Promise<GetRateLimitsApiResult>;
|
|
10
20
|
/** Change your account password. Changing the password reset the account token. */
|
|
11
21
|
changePassword(body: ChangePasswordApiBody): Promise<ChangePasswordApiResult>;
|
|
22
|
+
/** Change your account email. */
|
|
23
|
+
changeEmail(body: ChangeEmailApiBody): Promise<ChangeEmailApiResult>;
|
|
24
|
+
/** Get current subscription details. */
|
|
25
|
+
getSubscription(): Promise<GetMySubscriptionApiResult>;
|
|
26
|
+
/** Subscribe to become a member and unlock the benefits tied to your selected plan.
|
|
27
|
+
* You will receive a secure Stripe checkout URL to complete the payment. */
|
|
28
|
+
subscribeWithStripe(body: SubscribeWithStripeApiBody): Promise<SubscribeWithStripeApiResult>;
|
|
29
|
+
/** Redeem a member token to start or extend membership by 30 days.
|
|
30
|
+
* Member tokens are manually granted as rewards for events.
|
|
31
|
+
* Member tokens cannot be redeemed while a Stripe subscription is active. */
|
|
32
|
+
subscribeWithMemberToken(): Promise<SubscribeWithMemberTokenApiResult>;
|
|
33
|
+
/** Cancel subscription at the end of the current billing period. */
|
|
34
|
+
cancelSubscription(): Promise<CancelSubscriptionApiResult>;
|
|
35
|
+
/** List all purchases (subscriptions and gem packs). */
|
|
36
|
+
getPurchaseHistory(): Promise<GetMyPurchaseHistoryApiResult>;
|
|
37
|
+
/** List all gem credits and debits. */
|
|
38
|
+
getGemsHistory(): Promise<GetMyGemsHistoryApiResult>;
|
|
39
|
+
/** Purchase gems. Returns a Stripe checkout URL for payment. */
|
|
40
|
+
buyGems(body: BuyGemsApiBody): Promise<BuyGemsApiResult>;
|
|
12
41
|
}
|
|
@@ -6,6 +6,12 @@ class ArtifactsMyAccountApi {
|
|
|
6
6
|
constructor(httpClient) {
|
|
7
7
|
this.httpClient = httpClient;
|
|
8
8
|
}
|
|
9
|
+
/** Fetch bank details. */
|
|
10
|
+
getBank() {
|
|
11
|
+
return this.httpClient.get(`/my/bank`, {
|
|
12
|
+
isSecure: true,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
9
15
|
/** Fetch all items in your bank. */
|
|
10
16
|
getBankItems(params = {}) {
|
|
11
17
|
return this.httpClient.get(`/my/bank/items`, {
|
|
@@ -13,9 +19,34 @@ class ArtifactsMyAccountApi {
|
|
|
13
19
|
isSecure: true,
|
|
14
20
|
});
|
|
15
21
|
}
|
|
16
|
-
/** Fetch
|
|
17
|
-
|
|
18
|
-
return this.httpClient.get(`/my/
|
|
22
|
+
/** Fetch your orders details (sell and buy orders). */
|
|
23
|
+
getGrandExchangeOrders(params = {}) {
|
|
24
|
+
return this.httpClient.get(`/my/grandexchange/orders`, {
|
|
25
|
+
query: params,
|
|
26
|
+
isSecure: true,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Fetch your transaction history of the last 7 days (buy and sell orders). */
|
|
30
|
+
getGrandExchangeHistory(params = {}) {
|
|
31
|
+
return this.httpClient.get(`/my/grandexchange/history`, {
|
|
32
|
+
query: params,
|
|
33
|
+
isSecure: true,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** Fetch account details. */
|
|
37
|
+
get() {
|
|
38
|
+
return this.httpClient.get(`/my/details`, { isSecure: true });
|
|
39
|
+
}
|
|
40
|
+
/** Retrieve all unclaimed pending items for your account. */
|
|
41
|
+
getPendingItems(params = {}) {
|
|
42
|
+
return this.httpClient.get(`/my/pending_items`, {
|
|
43
|
+
query: params,
|
|
44
|
+
isSecure: true,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/** Get all rate limits. */
|
|
48
|
+
getRateLimits() {
|
|
49
|
+
return this.httpClient.get(`/my/rates`, {
|
|
19
50
|
isSecure: true,
|
|
20
51
|
});
|
|
21
52
|
}
|
|
@@ -26,5 +57,59 @@ class ArtifactsMyAccountApi {
|
|
|
26
57
|
isSecure: true,
|
|
27
58
|
});
|
|
28
59
|
}
|
|
60
|
+
/** Change your account email. */
|
|
61
|
+
changeEmail(body) {
|
|
62
|
+
return this.httpClient.post(`/my/change_email`, {
|
|
63
|
+
body,
|
|
64
|
+
isSecure: true,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** Get current subscription details. */
|
|
68
|
+
getSubscription() {
|
|
69
|
+
return this.httpClient.get(`/my/subscription`, {
|
|
70
|
+
isSecure: true,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/** Subscribe to become a member and unlock the benefits tied to your selected plan.
|
|
74
|
+
* You will receive a secure Stripe checkout URL to complete the payment. */
|
|
75
|
+
subscribeWithStripe(body) {
|
|
76
|
+
return this.httpClient.post(`/my/subscribe/stripe`, {
|
|
77
|
+
body,
|
|
78
|
+
isSecure: true,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/** Redeem a member token to start or extend membership by 30 days.
|
|
82
|
+
* Member tokens are manually granted as rewards for events.
|
|
83
|
+
* Member tokens cannot be redeemed while a Stripe subscription is active. */
|
|
84
|
+
subscribeWithMemberToken() {
|
|
85
|
+
return this.httpClient.post(`/my/subscribe/member_token`, {
|
|
86
|
+
isSecure: true,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Cancel subscription at the end of the current billing period. */
|
|
90
|
+
cancelSubscription() {
|
|
91
|
+
return this.httpClient.post(`/my/subscribe/cancel`, {
|
|
92
|
+
isSecure: true,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/** List all purchases (subscriptions and gem packs). */
|
|
96
|
+
getPurchaseHistory() {
|
|
97
|
+
return this.httpClient.get(`/my/purchase_history`, {
|
|
98
|
+
isSecure: true,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/** List all gem credits and debits. */
|
|
102
|
+
getGemsHistory() {
|
|
103
|
+
return this.httpClient.get(`/my/gems_history`, {
|
|
104
|
+
isSecure: true,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/** Purchase gems. Returns a Stripe checkout URL for payment. */
|
|
108
|
+
buyGems(body) {
|
|
109
|
+
return this.httpClient.post(`/my/buy_gems`, {
|
|
110
|
+
body,
|
|
111
|
+
isSecure: true,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
29
114
|
}
|
|
30
115
|
exports.ArtifactsMyAccountApi = ArtifactsMyAccountApi;
|
|
@@ -1,51 +1,94 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import { CraftingApiBody, CraftingApiResult,
|
|
2
|
+
import { CraftingApiBody, CraftingApiResult, DepositBankItemApiBody, DepositBankGoldApiBody, DepositBankGoldApiResult, DepositBankItemApiResult, EquipItemsApiBody, EquipItemsApiResult, FightApiResult, GatheringApiResult, MoveApiBody, MoveApiResult, UnequipItemsApiBody, UnequipItemsApiResult, 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, CancelGrandExchangeOrderApiBody, CancelGrandExchangeOrderApiResult, TradeTaskItemApiBody, TradeTaskItemApiResult, GiveGoldApiBody, GiveGoldApiResult, GiveItemsApiBody, GiveItemsApiResult, ChangeSkinApiBody, ChangeSkinApiResult, GetLogsApiQuery, GetLogsApiResult, CreateGrandExchangeBuyOrderApiBody, CreateGrandExchangeBuyOrderApiResult, FillGrandExchangeApiBody, FillGrandExchangeApiResult, ClaimPendingItemApiResult, RenameApiBody, RenameApiResult } 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
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
/** Execute a transition from the current map to another layer.
|
|
9
|
+
* The character must be on a map that has a transition available. */
|
|
10
|
+
transition(name: string): Promise<TransitionApiResult>;
|
|
11
|
+
/** Recovers hit points by resting. (1 second per 5 HP, minimum 3 seconds) */
|
|
12
|
+
rest(name: string): Promise<RestApiResult>;
|
|
13
|
+
/** Equip multiple items on your character.
|
|
14
|
+
* The cooldown will be 3 seconds multiplied by the number of different items equipped. */
|
|
15
|
+
equipItems(name: string, body: EquipItemsApiBody): Promise<EquipItemsApiResult>;
|
|
16
|
+
/** Unequip multiple items on your character.
|
|
17
|
+
* The cooldown will be 3 seconds multiplied by the number of different items unequipped. */
|
|
18
|
+
unequipItems(name: string, body: UnequipItemsApiBody): Promise<UnequipItemsApiResult>;
|
|
19
|
+
/** Use an item as a consumable. */
|
|
20
|
+
useItem(name: string, body: UseItemApiBody): Promise<UseItemApiResult>;
|
|
12
21
|
/** Start a fight against a monster on the character's map. */
|
|
13
|
-
fight(name: string): Promise<FightApiResult>;
|
|
22
|
+
fight(name: string, body?: FightApiBody): Promise<FightApiResult>;
|
|
14
23
|
/** Harvest a resource on the character's map. */
|
|
15
24
|
gathering(name: string): Promise<GatheringApiResult>;
|
|
16
25
|
/** Crafting an item. The character must be on a map with a workshop. */
|
|
17
26
|
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
27
|
/** Deposit golds in a bank on the character's map. */
|
|
21
28
|
depositBankGold(name: string, body: DepositBankGoldApiBody): Promise<DepositBankGoldApiResult>;
|
|
22
|
-
/**
|
|
23
|
-
|
|
29
|
+
/** Deposit multiple items in a bank on the character's map.
|
|
30
|
+
* The cooldown will be 3 seconds multiplied by the number of different items deposited. */
|
|
31
|
+
depositBankItem(name: string, body: DepositBankItemApiBody): Promise<DepositBankItemApiResult>;
|
|
32
|
+
/** Take items from your bank and put them in the character's inventory.
|
|
33
|
+
* The cooldown will be 3 seconds multiplied by the number of different items withdrawn. */
|
|
34
|
+
withdrawBankItem(name: string, body: WithdrawBankItemApiBody): Promise<WithdrawBankItemApiResult>;
|
|
24
35
|
/** Withdraw gold from your bank. */
|
|
25
36
|
withdrawBankGold(name: string, body: WithdrawBankGoldApiBody): Promise<WithdrawBankGoldApiResult>;
|
|
37
|
+
/** Buy a 20 slots bank expansion. */
|
|
38
|
+
buyBankExpansion(name: string): Promise<BuyExpansionApiResult>;
|
|
39
|
+
/** Buy an item from an NPC on the character's map. */
|
|
40
|
+
buyNpcItem(name: string, body: NpcBuyItemApiBody): Promise<NpcBuyItemApiResult>;
|
|
41
|
+
/** Sell an item to an NPC on the character's map. */
|
|
42
|
+
sellNpcItem(name: string, body: NpcSellItemApiBody): Promise<NpcSellItemApiResult>;
|
|
26
43
|
/** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
|
|
27
44
|
recycling(name: string, body: RecyclingApiBody): Promise<RecyclingApiResult>;
|
|
28
45
|
/** Buy an item at the Grand Exchange on the character's map. */
|
|
29
46
|
buyGrandExchangeItem(name: string, body: BuyGrandExchangeItemApiBody): Promise<BuyGrandExchangeItemApiResult>;
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
47
|
+
/** Create a sell order at the Grand Exchange on the character's map. */
|
|
48
|
+
createGrandExchangeSellOrder(name: string, body: CreateGrandExchangeSellOrderApiBody): Promise<CreateGrandExchangeSellOrderApiResult>;
|
|
49
|
+
/** Cancel an order (sell or buy) at the Grand Exchange on the character's map.
|
|
50
|
+
|
|
51
|
+
For sell orders: Items are returned to your inventory.
|
|
52
|
+
For buy orders: Gold is refunded to your character. */
|
|
53
|
+
cancelGrandExchangeOrder(name: string, body: CancelGrandExchangeOrderApiBody): Promise<CancelGrandExchangeOrderApiResult>;
|
|
54
|
+
/** Create a buy order at the Grand Exchange on the character's map.
|
|
55
|
+
|
|
56
|
+
The total gold (price * quantity) is locked when creating the order.
|
|
57
|
+
Other players can then sell items to fulfill your order.
|
|
58
|
+
Items will be delivered to your pending items when the order is filled. */
|
|
59
|
+
createGrandExchangeBuyOrder(name: string, body: CreateGrandExchangeBuyOrderApiBody): Promise<CreateGrandExchangeBuyOrderApiResult>;
|
|
60
|
+
/** Sell items to an existing buy order at the Grand Exchange on the character's map.
|
|
61
|
+
|
|
62
|
+
You will receive the gold immediately.
|
|
63
|
+
The buyer will receive the items in their pending items. */
|
|
64
|
+
fillGrandExchange(name: string, body: FillGrandExchangeApiBody): Promise<FillGrandExchangeApiResult>;
|
|
34
65
|
/** Complete a task. */
|
|
35
66
|
completeTask(name: string): Promise<CompleteTaskApiResult>;
|
|
36
|
-
/**
|
|
37
|
-
* Exchange 3 tasks coins for a random reward.
|
|
38
|
-
* Rewards are exclusive resources for crafting items.
|
|
39
|
-
*/
|
|
67
|
+
/** Exchange 6 tasks coins for a random reward. Rewards are exclusive items or resources. */
|
|
40
68
|
exchangeTask(name: string): Promise<ExchangeTaskApiResult>;
|
|
69
|
+
/** Accepting a new task. */
|
|
70
|
+
acceptTask(name: string): Promise<AcceptTaskApiResult>;
|
|
71
|
+
/** Trading items with a Tasks Master. */
|
|
72
|
+
tradeTaskItem(name: string, body: TradeTaskItemApiBody): Promise<TradeTaskItemApiResult>;
|
|
73
|
+
/** Cancel a task for 1 tasks coin. */
|
|
74
|
+
cancelTask(name: string): Promise<CancelTaskApiResult>;
|
|
75
|
+
/** Give gold to another character in your account on the same map. */
|
|
76
|
+
giveGold(name: string, body: GiveGoldApiBody): Promise<GiveGoldApiResult>;
|
|
77
|
+
/** Give items to another character in your account on the same map.
|
|
78
|
+
* The cooldown will be 3 seconds multiplied by the number of different items given. */
|
|
79
|
+
giveItems(name: string, body: GiveItemsApiBody): Promise<GiveItemsApiResult>;
|
|
80
|
+
/** Claim a pending item with a specific character. */
|
|
81
|
+
claimPendingItem(id: string, name: string): Promise<ClaimPendingItemApiResult>;
|
|
41
82
|
/** Delete an item from your character's inventory. */
|
|
42
83
|
deleteItem(name: string, body: DeleteItemApiBody): Promise<DeleteItemApiResult>;
|
|
43
|
-
/**
|
|
44
|
-
|
|
84
|
+
/** Change the skin of your character. */
|
|
85
|
+
changeSkin(name: string, body: ChangeSkinApiBody): Promise<ChangeSkinApiResult>;
|
|
86
|
+
/** Rename a character. An active membership is required. */
|
|
87
|
+
rename(name: string, body: RenameApiBody): Promise<RenameApiResult>;
|
|
88
|
+
/** History of the last 5000 actions of all your characters. */
|
|
89
|
+
getAllLogs(params?: GetAllLogsApiQuery): Promise<GetAllLogsApiResult>;
|
|
90
|
+
/** History of the last actions of your character. */
|
|
91
|
+
getLogs(name: string, params: GetLogsApiQuery): Promise<GetLogsApiResult>;
|
|
45
92
|
/** List of your characters. */
|
|
46
93
|
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
94
|
}
|
|
@@ -10,23 +10,46 @@ class ArtifactsMyCharactersApi {
|
|
|
10
10
|
move(name, body) {
|
|
11
11
|
return this.httpClient.post(`/my/${name}/action/move`, { body, isSecure: true });
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** Execute a transition from the current map to another layer.
|
|
14
|
+
* The character must be on a map that has a transition available. */
|
|
15
|
+
transition(name) {
|
|
16
|
+
return this.httpClient.post(`/my/${name}/action/transition`, {
|
|
17
|
+
isSecure: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Recovers hit points by resting. (1 second per 5 HP, minimum 3 seconds) */
|
|
21
|
+
rest(name) {
|
|
22
|
+
return this.httpClient.post(`/my/${name}/action/rest`, { isSecure: true });
|
|
23
|
+
}
|
|
24
|
+
/** Equip multiple items on your character.
|
|
25
|
+
* The cooldown will be 3 seconds multiplied by the number of different items equipped. */
|
|
26
|
+
equipItems(name, body) {
|
|
15
27
|
return this.httpClient.post(`/my/${name}/action/equip`, {
|
|
16
28
|
body,
|
|
17
29
|
isSecure: true,
|
|
18
30
|
});
|
|
19
31
|
}
|
|
20
|
-
/** Unequip
|
|
21
|
-
|
|
32
|
+
/** Unequip multiple items on your character.
|
|
33
|
+
* The cooldown will be 3 seconds multiplied by the number of different items unequipped. */
|
|
34
|
+
unequipItems(name, body) {
|
|
22
35
|
return this.httpClient.post(`/my/${name}/action/unequip`, {
|
|
23
36
|
body,
|
|
24
37
|
isSecure: true,
|
|
25
38
|
});
|
|
26
39
|
}
|
|
40
|
+
/** Use an item as a consumable. */
|
|
41
|
+
useItem(name, body) {
|
|
42
|
+
return this.httpClient.post(`/my/${name}/action/use`, {
|
|
43
|
+
body,
|
|
44
|
+
isSecure: true,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
27
47
|
/** Start a fight against a monster on the character's map. */
|
|
28
|
-
fight(name) {
|
|
29
|
-
return this.httpClient.post(`/my/${name}/action/fight`, {
|
|
48
|
+
fight(name, body) {
|
|
49
|
+
return this.httpClient.post(`/my/${name}/action/fight`, {
|
|
50
|
+
body,
|
|
51
|
+
isSecure: true,
|
|
52
|
+
});
|
|
30
53
|
}
|
|
31
54
|
/** Harvest a resource on the character's map. */
|
|
32
55
|
gathering(name) {
|
|
@@ -41,30 +64,55 @@ class ArtifactsMyCharactersApi {
|
|
|
41
64
|
isSecure: true,
|
|
42
65
|
});
|
|
43
66
|
}
|
|
44
|
-
/** Deposit
|
|
45
|
-
|
|
46
|
-
return this.httpClient.post(`/my/${name}/action/bank/deposit`, {
|
|
67
|
+
/** Deposit golds in a bank on the character's map. */
|
|
68
|
+
depositBankGold(name, body) {
|
|
69
|
+
return this.httpClient.post(`/my/${name}/action/bank/deposit/gold`, {
|
|
47
70
|
body,
|
|
48
71
|
isSecure: true,
|
|
49
72
|
});
|
|
50
73
|
}
|
|
51
|
-
/** Deposit
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
/** Deposit multiple items in a bank on the character's map.
|
|
75
|
+
* The cooldown will be 3 seconds multiplied by the number of different items deposited. */
|
|
76
|
+
depositBankItem(name, body) {
|
|
77
|
+
return this.httpClient.post(`/my/${name}/action/bank/deposit/item`, {
|
|
54
78
|
body,
|
|
55
79
|
isSecure: true,
|
|
56
80
|
});
|
|
57
81
|
}
|
|
58
|
-
/** Take
|
|
59
|
-
|
|
60
|
-
|
|
82
|
+
/** Take items from your bank and put them in the character's inventory.
|
|
83
|
+
* The cooldown will be 3 seconds multiplied by the number of different items withdrawn. */
|
|
84
|
+
withdrawBankItem(name, body) {
|
|
85
|
+
return this.httpClient.post(`/my/${name}/action/bank/withdraw/item`, {
|
|
61
86
|
body,
|
|
62
87
|
isSecure: true,
|
|
63
88
|
});
|
|
64
89
|
}
|
|
65
90
|
/** Withdraw gold from your bank. */
|
|
66
91
|
withdrawBankGold(name, body) {
|
|
67
|
-
return this.httpClient.post(`/my/${name}/action/bank/withdraw/gold`, {
|
|
92
|
+
return this.httpClient.post(`/my/${name}/action/bank/withdraw/gold`, {
|
|
93
|
+
body,
|
|
94
|
+
isSecure: true,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/** Buy a 20 slots bank expansion. */
|
|
98
|
+
buyBankExpansion(name) {
|
|
99
|
+
return this.httpClient.post(`/my/${name}/action/bank/buy_expansion`, {
|
|
100
|
+
isSecure: true,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/** Buy an item from an NPC on the character's map. */
|
|
104
|
+
buyNpcItem(name, body) {
|
|
105
|
+
return this.httpClient.post(`/my/${name}/action/npc/buy`, {
|
|
106
|
+
body,
|
|
107
|
+
isSecure: true,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/** Sell an item to an NPC on the character's map. */
|
|
111
|
+
sellNpcItem(name, body) {
|
|
112
|
+
return this.httpClient.post(`/my/${name}/action/npc/sell`, {
|
|
113
|
+
body,
|
|
114
|
+
isSecure: true,
|
|
115
|
+
});
|
|
68
116
|
}
|
|
69
117
|
/** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
|
|
70
118
|
recycling(name, body) {
|
|
@@ -75,21 +123,46 @@ class ArtifactsMyCharactersApi {
|
|
|
75
123
|
}
|
|
76
124
|
/** Buy an item at the Grand Exchange on the character's map. */
|
|
77
125
|
buyGrandExchangeItem(name, body) {
|
|
78
|
-
return this.httpClient.post(`/my/${name}/action/
|
|
126
|
+
return this.httpClient.post(`/my/${name}/action/grandexchange/buy`, {
|
|
79
127
|
body,
|
|
80
128
|
isSecure: true,
|
|
81
129
|
});
|
|
82
130
|
}
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
return this.httpClient.post(`/my/${name}/action/
|
|
131
|
+
/** Create a sell order at the Grand Exchange on the character's map. */
|
|
132
|
+
createGrandExchangeSellOrder(name, body) {
|
|
133
|
+
return this.httpClient.post(`/my/${name}/action/grandexchange/create_sell_order`, {
|
|
86
134
|
body,
|
|
87
135
|
isSecure: true,
|
|
88
136
|
});
|
|
89
137
|
}
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
138
|
+
/** Cancel an order (sell or buy) at the Grand Exchange on the character's map.
|
|
139
|
+
|
|
140
|
+
For sell orders: Items are returned to your inventory.
|
|
141
|
+
For buy orders: Gold is refunded to your character. */
|
|
142
|
+
cancelGrandExchangeOrder(name, body) {
|
|
143
|
+
return this.httpClient.post(`/my/${name}/action/grandexchange/cancel`, {
|
|
144
|
+
body,
|
|
145
|
+
isSecure: true,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/** Create a buy order at the Grand Exchange on the character's map.
|
|
149
|
+
|
|
150
|
+
The total gold (price * quantity) is locked when creating the order.
|
|
151
|
+
Other players can then sell items to fulfill your order.
|
|
152
|
+
Items will be delivered to your pending items when the order is filled. */
|
|
153
|
+
createGrandExchangeBuyOrder(name, body) {
|
|
154
|
+
return this.httpClient.post(`/my/${name}/action/grandexchange/create_buy_order`, {
|
|
155
|
+
body,
|
|
156
|
+
isSecure: true,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/** Sell items to an existing buy order at the Grand Exchange on the character's map.
|
|
160
|
+
|
|
161
|
+
You will receive the gold immediately.
|
|
162
|
+
The buyer will receive the items in their pending items. */
|
|
163
|
+
fillGrandExchange(name, body) {
|
|
164
|
+
return this.httpClient.post(`/my/${name}/action/grandexchange/fill`, {
|
|
165
|
+
body,
|
|
93
166
|
isSecure: true,
|
|
94
167
|
});
|
|
95
168
|
}
|
|
@@ -99,15 +172,52 @@ class ArtifactsMyCharactersApi {
|
|
|
99
172
|
isSecure: true,
|
|
100
173
|
});
|
|
101
174
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Exchange 3 tasks coins for a random reward.
|
|
104
|
-
* Rewards are exclusive resources for crafting items.
|
|
105
|
-
*/
|
|
175
|
+
/** Exchange 6 tasks coins for a random reward. Rewards are exclusive items or resources. */
|
|
106
176
|
exchangeTask(name) {
|
|
107
177
|
return this.httpClient.post(`/my/${name}/action/task/exchange`, {
|
|
108
178
|
isSecure: true,
|
|
109
179
|
});
|
|
110
180
|
}
|
|
181
|
+
/** Accepting a new task. */
|
|
182
|
+
acceptTask(name) {
|
|
183
|
+
return this.httpClient.post(`/my/${name}/action/task/new`, {
|
|
184
|
+
isSecure: true,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/** Trading items with a Tasks Master. */
|
|
188
|
+
tradeTaskItem(name, body) {
|
|
189
|
+
return this.httpClient.post(`/my/${name}/action/task/trade`, {
|
|
190
|
+
body,
|
|
191
|
+
isSecure: true,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/** Cancel a task for 1 tasks coin. */
|
|
195
|
+
cancelTask(name) {
|
|
196
|
+
return this.httpClient.post(`/my/${name}/action/task/cancel`, {
|
|
197
|
+
isSecure: true,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/** Give gold to another character in your account on the same map. */
|
|
201
|
+
giveGold(name, body) {
|
|
202
|
+
return this.httpClient.post(`/my/${name}/action/give/gold`, {
|
|
203
|
+
body,
|
|
204
|
+
isSecure: true,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/** Give items to another character in your account on the same map.
|
|
208
|
+
* The cooldown will be 3 seconds multiplied by the number of different items given. */
|
|
209
|
+
giveItems(name, body) {
|
|
210
|
+
return this.httpClient.post(`/my/${name}/action/give/item`, {
|
|
211
|
+
body,
|
|
212
|
+
isSecure: true,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/** Claim a pending item with a specific character. */
|
|
216
|
+
claimPendingItem(id, name) {
|
|
217
|
+
return this.httpClient.post(`/my/${name}/action/claim_item/${id}`, {
|
|
218
|
+
isSecure: true,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
111
221
|
/** Delete an item from your character's inventory. */
|
|
112
222
|
deleteItem(name, body) {
|
|
113
223
|
return this.httpClient.post(`/my/${name}/action/delete`, {
|
|
@@ -115,28 +225,37 @@ class ArtifactsMyCharactersApi {
|
|
|
115
225
|
isSecure: true,
|
|
116
226
|
});
|
|
117
227
|
}
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
return this.httpClient.
|
|
121
|
-
|
|
228
|
+
/** Change the skin of your character. */
|
|
229
|
+
changeSkin(name, body) {
|
|
230
|
+
return this.httpClient.post(`/my/${name}/action/change_skin`, {
|
|
231
|
+
body,
|
|
122
232
|
isSecure: true,
|
|
123
233
|
});
|
|
124
234
|
}
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
return this.httpClient.
|
|
235
|
+
/** Rename a character. An active membership is required. */
|
|
236
|
+
rename(name, body) {
|
|
237
|
+
return this.httpClient.post(`/my/${name}/action/rename`, {
|
|
238
|
+
body,
|
|
128
239
|
isSecure: true,
|
|
129
240
|
});
|
|
130
241
|
}
|
|
131
|
-
/**
|
|
132
|
-
|
|
133
|
-
return this.httpClient.
|
|
242
|
+
/** History of the last 5000 actions of all your characters. */
|
|
243
|
+
getAllLogs(params = {}) {
|
|
244
|
+
return this.httpClient.get(`/my/logs`, {
|
|
245
|
+
query: params,
|
|
134
246
|
isSecure: true,
|
|
135
247
|
});
|
|
136
248
|
}
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
return this.httpClient.
|
|
249
|
+
/** History of the last actions of your character. */
|
|
250
|
+
getLogs(name, params) {
|
|
251
|
+
return this.httpClient.get(`/my/logs/${name}`, {
|
|
252
|
+
query: params,
|
|
253
|
+
isSecure: true,
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/** List of your characters. */
|
|
257
|
+
getAll() {
|
|
258
|
+
return this.httpClient.get(`/my/characters`, {
|
|
140
259
|
isSecure: true,
|
|
141
260
|
});
|
|
142
261
|
}
|
|
@@ -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,12 @@
|
|
|
1
|
+
import { ArtifactsHttpClient } from "../http-client/artifacts.http-client";
|
|
2
|
+
import { GetAllRaidsApiQuery, GetAllRaidsApiResult, GetRaidApiResult, GetRaidLeaderboardApiQuery, GetRaidLeaderboardApiResult } from "./types/api-schema-bindings.types";
|
|
3
|
+
export declare class ArtifactsRaidsApi {
|
|
4
|
+
private readonly httpClient;
|
|
5
|
+
constructor(httpClient: ArtifactsHttpClient);
|
|
6
|
+
/** Fetch the list of all raids. */
|
|
7
|
+
getAll(params: GetAllRaidsApiQuery): Promise<GetAllRaidsApiResult>;
|
|
8
|
+
/** Retrieve the details of a specific raid. */
|
|
9
|
+
get(code: string): Promise<GetRaidApiResult>;
|
|
10
|
+
/** Retrieve the leaderboard for the active or latest raid instance. */
|
|
11
|
+
getLeaderboard(code: string, params: GetRaidLeaderboardApiQuery): Promise<GetRaidLeaderboardApiResult>;
|
|
12
|
+
}
|