artifacts-api-client 1.1.0 → 1.3.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 +20 -3
- package/dist/api/artifacts-accounts.api.d.ts +2 -2
- package/dist/api/artifacts-characters.api.d.ts +4 -4
- package/dist/api/artifacts-characters.api.js +4 -1
- package/dist/api/artifacts-events.api.d.ts +2 -2
- package/dist/api/artifacts-grand-exchange.api.d.ts +3 -3
- package/dist/api/artifacts-items.api.d.ts +3 -3
- package/dist/api/artifacts-maps.api.d.ts +3 -3
- package/dist/api/artifacts-maps.api.js +2 -4
- package/dist/api/artifacts-monsters.api.d.ts +3 -3
- package/dist/api/artifacts-my-account.api.d.ts +4 -4
- package/dist/api/artifacts-my-account.api.js +4 -1
- package/dist/api/artifacts-my-characters.api.d.ts +24 -21
- package/dist/api/artifacts-my-characters.api.js +56 -15
- package/dist/api/artifacts-resources.api.d.ts +3 -3
- package/dist/api/artifacts-token.api.d.ts +2 -2
- package/dist/api/artifacts.api.d.ts +3 -3
- package/dist/api/types/api-schema-bindings.types.d.ts +64 -0
- package/dist/{types → api/types}/api-schema.types.d.ts +41 -251
- package/dist/http-client/artifacts.http-client.d.ts +1 -1
- package/dist/http-client/types/artifacts-http-client.types.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -0
- package/package.json +2 -3
- /package/dist/{types/artifacts-api.types.js → api/types/api-schema-bindings.types.js} +0 -0
- /package/dist/{types → api/types}/api-schema.types.js +0 -0
- /package/dist/{types → api/types}/artifacts-api.types.d.ts +0 -0
- /package/dist/{types/artifacts-http-client.types.js → api/types/artifacts-api.types.js} +0 -0
- /package/dist/{types → http-client/types}/artifacts-http-client.types.d.ts +0 -0
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ await artifactsApi.myCharacters.fight('name');
|
|
|
33
33
|
|
|
34
34
|
Alternatively, you can set token later:
|
|
35
35
|
|
|
36
|
-
```
|
|
36
|
+
```js
|
|
37
37
|
import { ArtifactsApi } from 'artifacts-api-client';
|
|
38
38
|
|
|
39
39
|
const artifactsApi = ArtifactsApi.create();
|
|
@@ -49,7 +49,7 @@ await artifactsApi.myCharacters.fight('name'); // <-- now it works
|
|
|
49
49
|
## Error handling
|
|
50
50
|
All artifacts API errors are wrapped with `ArtifactsError`.
|
|
51
51
|
Keep in mind, that the others errors like `NetworkError` left as they are:
|
|
52
|
-
```
|
|
52
|
+
```js
|
|
53
53
|
import { ArtifactsApi, ArtifactsError } from 'artifacts-api-client';
|
|
54
54
|
|
|
55
55
|
const artifactsApi = ArtifactsApi.create({
|
|
@@ -58,7 +58,7 @@ const artifactsApi = ArtifactsApi.create({
|
|
|
58
58
|
|
|
59
59
|
try {
|
|
60
60
|
await artifactsApi.myCharacters.fight('name');
|
|
61
|
-
} catch (err
|
|
61
|
+
} catch (err) {
|
|
62
62
|
if (err instanceof ArtifactsError) {
|
|
63
63
|
console.error('Artifacts error', e.message, e.code, e.data);
|
|
64
64
|
} else {
|
|
@@ -66,3 +66,20 @@ try {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
```
|
|
69
|
+
|
|
70
|
+
## Type bindings
|
|
71
|
+
If package being used with TypeScript you'll probably need methods' types.
|
|
72
|
+
They are available to import:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { ArtifactsApi, GetAllMapsApiResult, GetAllMapsApiQuery } from 'artifacts-api-client';
|
|
76
|
+
|
|
77
|
+
const artifactsApi = ArtifactsApi.create({
|
|
78
|
+
token: 'TOKEN'
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
function getMaps(params: GetAllMapsApiQuery): Promise<GetAllMapsApiResult> {
|
|
82
|
+
// ... custom logic ...
|
|
83
|
+
return artifactsApi.maps.getAll(params);
|
|
84
|
+
};
|
|
85
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateAccountApiBody, CreateAccountApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsAccountsApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Create an account. */
|
|
7
|
-
create(body:
|
|
7
|
+
create(body: CreateAccountApiBody): Promise<CreateAccountApiResult>;
|
|
8
8
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateCharacterApiBody, CreateCharacterApiResult, GetAllCharactersApiQuery, GetAllCharactersApiResult, GetCharacterApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsCharactersApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Create new character on your account. You can create up to 5 characters. */
|
|
7
|
-
create(body:
|
|
7
|
+
create(body: CreateCharacterApiBody): Promise<CreateCharacterApiResult>;
|
|
8
8
|
/** Fetch characters details. */
|
|
9
|
-
getAll(params?:
|
|
9
|
+
getAll(params?: GetAllCharactersApiQuery): Promise<GetAllCharactersApiResult>;
|
|
10
10
|
/** Fetch characters details. */
|
|
11
|
-
get(name: string): Promise<
|
|
11
|
+
get(name: string): Promise<GetCharacterApiResult>;
|
|
12
12
|
}
|
|
@@ -8,7 +8,10 @@ class ArtifactsCharactersApi {
|
|
|
8
8
|
}
|
|
9
9
|
/** Create new character on your account. You can create up to 5 characters. */
|
|
10
10
|
create(body) {
|
|
11
|
-
return this.httpClient.post(`/characters/create`, {
|
|
11
|
+
return this.httpClient.post(`/characters/create`, {
|
|
12
|
+
body,
|
|
13
|
+
isSecure: true,
|
|
14
|
+
});
|
|
12
15
|
}
|
|
13
16
|
/** Fetch characters details. */
|
|
14
17
|
getAll(params = {}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllEventsApiQuery, GetAllEventsApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsEventsApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch events details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllEventsApiQuery): Promise<GetAllEventsApiResult>;
|
|
8
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllGrandExchangeApiQuery, GetAllGrandExchangeApiResult, GetGrandExchangeApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsGrandExchangeApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch Grand Exchange items details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllGrandExchangeApiQuery): Promise<GetAllGrandExchangeApiResult>;
|
|
8
8
|
/** Retrieve the details of a Grand Exchange item. */
|
|
9
|
-
get(code: string): Promise<
|
|
9
|
+
get(code: string): Promise<GetGrandExchangeApiResult>;
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllItemsApiQuery, GetAllItemsApiResult, GetItemApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsItemsApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch items details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllItemsApiQuery): Promise<GetAllItemsApiResult>;
|
|
8
8
|
/** Retrieve the details of an item. */
|
|
9
|
-
get(code: string): Promise<
|
|
9
|
+
get(code: string): Promise<GetItemApiResult>;
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllMapsApiQuery, GetAllMapsApiResult, GetMapApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsMapsApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch maps details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllMapsApiQuery): Promise<GetAllMapsApiResult>;
|
|
8
8
|
/** Retrieve the details of a map. */
|
|
9
|
-
get(x: number, y: number
|
|
9
|
+
get(x: number, y: number): Promise<GetMapApiResult>;
|
|
10
10
|
}
|
|
@@ -13,10 +13,8 @@ class ArtifactsMapsApi {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
/** Retrieve the details of a map. */
|
|
16
|
-
get(x, y
|
|
17
|
-
return this.httpClient.get(`/maps/${x}/${y}
|
|
18
|
-
query: params,
|
|
19
|
-
});
|
|
16
|
+
get(x, y) {
|
|
17
|
+
return this.httpClient.get(`/maps/${x}/${y}`);
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
exports.ArtifactsMapsApi = ArtifactsMapsApi;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllMonstersApiQuery, GetAllMonstersApiResult, GetMonsterApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsMonstersApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch monsters details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllMonstersApiQuery): Promise<GetAllMonstersApiResult>;
|
|
8
8
|
/** Retrieve the details of a monster. */
|
|
9
|
-
get(code: string): Promise<
|
|
9
|
+
get(code: string): Promise<GetMonsterApiResult>;
|
|
10
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangePasswordApiBody, ChangePasswordApiResult, GetBankGoldApiResult, GetBankItemsApiQuery, GetBankItemsApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsMyAccountApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch all items in your bank. */
|
|
7
|
-
getBankItems(params?:
|
|
7
|
+
getBankItems(params?: GetBankItemsApiQuery): Promise<GetBankItemsApiResult>;
|
|
8
8
|
/** Fetch golds in your bank. */
|
|
9
|
-
getBankGold(): Promise<
|
|
9
|
+
getBankGold(): Promise<GetBankGoldApiResult>;
|
|
10
10
|
/** Change your account password. Changing the password reset the account token. */
|
|
11
|
-
changePassword(body:
|
|
11
|
+
changePassword(body: ChangePasswordApiBody): Promise<ChangePasswordApiResult>;
|
|
12
12
|
}
|
|
@@ -8,7 +8,10 @@ class ArtifactsMyAccountApi {
|
|
|
8
8
|
}
|
|
9
9
|
/** Fetch all items in your bank. */
|
|
10
10
|
getBankItems(params = {}) {
|
|
11
|
-
return this.httpClient.get(`/my/bank/items`, {
|
|
11
|
+
return this.httpClient.get(`/my/bank/items`, {
|
|
12
|
+
query: params,
|
|
13
|
+
isSecure: true,
|
|
14
|
+
});
|
|
12
15
|
}
|
|
13
16
|
/** Fetch golds in your bank. */
|
|
14
17
|
getBankGold() {
|
|
@@ -1,44 +1,47 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
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 } 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
|
-
move(name: string, body:
|
|
7
|
+
move(name: string, body: MoveApiBody): Promise<MoveApiResult>;
|
|
8
8
|
/** Equip an item on your character. */
|
|
9
|
-
equipItem(name: string, body:
|
|
9
|
+
equipItem(name: string, body: EquipItemApiBody): Promise<EquipItemApiResult>;
|
|
10
10
|
/** Unequip an item on your character. */
|
|
11
|
-
unequipItem(name: string, body:
|
|
11
|
+
unequipItem(name: string, body: UnequipItemApiBody): Promise<UnequipItemApiResult>;
|
|
12
12
|
/** Start a fight against a monster on the character's map. */
|
|
13
|
-
fight(name: string): Promise<
|
|
13
|
+
fight(name: string): Promise<FightApiResult>;
|
|
14
14
|
/** Harvest a resource on the character's map. */
|
|
15
|
-
gathering(name: string): Promise<
|
|
15
|
+
gathering(name: string): Promise<GatheringApiResult>;
|
|
16
16
|
/** Crafting an item. The character must be on a map with a workshop. */
|
|
17
|
-
crafting(name: string, body:
|
|
17
|
+
crafting(name: string, body: CraftingApiBody): Promise<CraftingApiResult>;
|
|
18
18
|
/** Deposit an item in a bank on the character's map. */
|
|
19
|
-
depositBank(name: string, body:
|
|
19
|
+
depositBank(name: string, body: DepositBankApiBody): Promise<DepositBankApiResult>;
|
|
20
20
|
/** Deposit golds in a bank on the character's map. */
|
|
21
|
-
depositBankGold(name: string, body:
|
|
21
|
+
depositBankGold(name: string, body: DepositBankGoldApiBody): Promise<DepositBankGoldApiResult>;
|
|
22
22
|
/** Take an item from your bank and put it in the character's inventory. */
|
|
23
|
-
withdrawBank(name: string, body:
|
|
23
|
+
withdrawBank(name: string, body: WithdrawBankApiBody): Promise<WithdrawBankApiResult>;
|
|
24
24
|
/** Withdraw gold from your bank. */
|
|
25
|
-
withdrawBankGold(name: string, body:
|
|
25
|
+
withdrawBankGold(name: string, body: WithdrawBankGoldApiBody): Promise<WithdrawBankGoldApiResult>;
|
|
26
26
|
/** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
|
|
27
|
-
recycling(name: string, body:
|
|
27
|
+
recycling(name: string, body: RecyclingApiBody): Promise<RecyclingApiResult>;
|
|
28
28
|
/** Buy an item at the Grand Exchange on the character's map. */
|
|
29
|
-
buyGrandExchangeItem(name: string, body:
|
|
29
|
+
buyGrandExchangeItem(name: string, body: BuyGrandExchangeItemApiBody): Promise<BuyGrandExchangeItemApiResult>;
|
|
30
30
|
/** Sell an item at the Grand Exchange on the character's map. */
|
|
31
|
-
sellGrandExchangeItem(name: string, body:
|
|
31
|
+
sellGrandExchangeItem(name: string, body: SellGrandExchangeItemApiBody): Promise<SellGrandExchangeItemApiResult>;
|
|
32
32
|
/** Accepting a new task. */
|
|
33
|
-
acceptTask(name: string): Promise<
|
|
33
|
+
acceptTask(name: string): Promise<AcceptTaskApiResult>;
|
|
34
34
|
/** Complete a task. */
|
|
35
|
-
completeTask(name: string): Promise<
|
|
36
|
-
/**
|
|
37
|
-
|
|
35
|
+
completeTask(name: string): Promise<CompleteTaskApiResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Exchange 3 tasks coins for a random reward.
|
|
38
|
+
* Rewards are exclusive resources for crafting items.
|
|
39
|
+
*/
|
|
40
|
+
exchangeTask(name: string): Promise<ExchangeTaskApiResult>;
|
|
38
41
|
/** Delete an item from your character's inventory. */
|
|
39
|
-
deleteItem(name: string, body:
|
|
42
|
+
deleteItem(name: string, body: DeleteItemApiBody): Promise<DeleteItemApiResult>;
|
|
40
43
|
/** History of the last 100 actions of all your characters. */
|
|
41
|
-
getLogs(params?:
|
|
44
|
+
getLogs(params?: GetLogsApiQuery): Promise<GetLogsApiResult>;
|
|
42
45
|
/** List of your characters. */
|
|
43
|
-
getAll(): Promise<
|
|
46
|
+
getAll(): Promise<GetMyCharactersApiResult>;
|
|
44
47
|
}
|
|
@@ -12,11 +12,17 @@ class ArtifactsMyCharactersApi {
|
|
|
12
12
|
}
|
|
13
13
|
/** Equip an item on your character. */
|
|
14
14
|
equipItem(name, body) {
|
|
15
|
-
return this.httpClient.post(`/my/${name}/action/equip`, {
|
|
15
|
+
return this.httpClient.post(`/my/${name}/action/equip`, {
|
|
16
|
+
body,
|
|
17
|
+
isSecure: true,
|
|
18
|
+
});
|
|
16
19
|
}
|
|
17
20
|
/** Unequip an item on your character. */
|
|
18
21
|
unequipItem(name, body) {
|
|
19
|
-
return this.httpClient.post(`/my/${name}/action/unequip`, {
|
|
22
|
+
return this.httpClient.post(`/my/${name}/action/unequip`, {
|
|
23
|
+
body,
|
|
24
|
+
isSecure: true,
|
|
25
|
+
});
|
|
20
26
|
}
|
|
21
27
|
/** Start a fight against a monster on the character's map. */
|
|
22
28
|
fight(name) {
|
|
@@ -24,23 +30,37 @@ class ArtifactsMyCharactersApi {
|
|
|
24
30
|
}
|
|
25
31
|
/** Harvest a resource on the character's map. */
|
|
26
32
|
gathering(name) {
|
|
27
|
-
return this.httpClient.post(`/my/${name}/action/gathering`, {
|
|
33
|
+
return this.httpClient.post(`/my/${name}/action/gathering`, {
|
|
34
|
+
isSecure: true,
|
|
35
|
+
});
|
|
28
36
|
}
|
|
29
37
|
/** Crafting an item. The character must be on a map with a workshop. */
|
|
30
38
|
crafting(name, body) {
|
|
31
|
-
return this.httpClient.post(`/my/${name}/action/crafting`, {
|
|
39
|
+
return this.httpClient.post(`/my/${name}/action/crafting`, {
|
|
40
|
+
body,
|
|
41
|
+
isSecure: true,
|
|
42
|
+
});
|
|
32
43
|
}
|
|
33
44
|
/** Deposit an item in a bank on the character's map. */
|
|
34
45
|
depositBank(name, body) {
|
|
35
|
-
return this.httpClient.post(`/my/${name}/action/bank/deposit`, {
|
|
46
|
+
return this.httpClient.post(`/my/${name}/action/bank/deposit`, {
|
|
47
|
+
body,
|
|
48
|
+
isSecure: true,
|
|
49
|
+
});
|
|
36
50
|
}
|
|
37
51
|
/** Deposit golds in a bank on the character's map. */
|
|
38
52
|
depositBankGold(name, body) {
|
|
39
|
-
return this.httpClient.post(`/my/${name}/action/bank/deposit/gold`, {
|
|
53
|
+
return this.httpClient.post(`/my/${name}/action/bank/deposit/gold`, {
|
|
54
|
+
body,
|
|
55
|
+
isSecure: true,
|
|
56
|
+
});
|
|
40
57
|
}
|
|
41
58
|
/** Take an item from your bank and put it in the character's inventory. */
|
|
42
59
|
withdrawBank(name, body) {
|
|
43
|
-
return this.httpClient.post(`/my/${name}/action/bank/withdraw`, {
|
|
60
|
+
return this.httpClient.post(`/my/${name}/action/bank/withdraw`, {
|
|
61
|
+
body,
|
|
62
|
+
isSecure: true,
|
|
63
|
+
});
|
|
44
64
|
}
|
|
45
65
|
/** Withdraw gold from your bank. */
|
|
46
66
|
withdrawBankGold(name, body) {
|
|
@@ -48,31 +68,52 @@ class ArtifactsMyCharactersApi {
|
|
|
48
68
|
}
|
|
49
69
|
/** Recycling an item. The character must be on a map with a workshop (only for equipments and weapons). */
|
|
50
70
|
recycling(name, body) {
|
|
51
|
-
return this.httpClient.post(`/my/${name}/action/recycling`, {
|
|
71
|
+
return this.httpClient.post(`/my/${name}/action/recycling`, {
|
|
72
|
+
body,
|
|
73
|
+
isSecure: true,
|
|
74
|
+
});
|
|
52
75
|
}
|
|
53
76
|
/** Buy an item at the Grand Exchange on the character's map. */
|
|
54
77
|
buyGrandExchangeItem(name, body) {
|
|
55
|
-
return this.httpClient.post(`/my/${name}/action/ge/buy`, {
|
|
78
|
+
return this.httpClient.post(`/my/${name}/action/ge/buy`, {
|
|
79
|
+
body,
|
|
80
|
+
isSecure: true,
|
|
81
|
+
});
|
|
56
82
|
}
|
|
57
83
|
/** Sell an item at the Grand Exchange on the character's map. */
|
|
58
84
|
sellGrandExchangeItem(name, body) {
|
|
59
|
-
return this.httpClient.post(`/my/${name}/action/ge/sell`, {
|
|
85
|
+
return this.httpClient.post(`/my/${name}/action/ge/sell`, {
|
|
86
|
+
body,
|
|
87
|
+
isSecure: true,
|
|
88
|
+
});
|
|
60
89
|
}
|
|
61
90
|
/** Accepting a new task. */
|
|
62
91
|
acceptTask(name) {
|
|
63
|
-
return this.httpClient.post(`/my/${name}/action/task/new`, {
|
|
92
|
+
return this.httpClient.post(`/my/${name}/action/task/new`, {
|
|
93
|
+
isSecure: true,
|
|
94
|
+
});
|
|
64
95
|
}
|
|
65
96
|
/** Complete a task. */
|
|
66
97
|
completeTask(name) {
|
|
67
|
-
return this.httpClient.post(`/my/${name}/action/task/complete`, {
|
|
98
|
+
return this.httpClient.post(`/my/${name}/action/task/complete`, {
|
|
99
|
+
isSecure: true,
|
|
100
|
+
});
|
|
68
101
|
}
|
|
69
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Exchange 3 tasks coins for a random reward.
|
|
104
|
+
* Rewards are exclusive resources for crafting items.
|
|
105
|
+
*/
|
|
70
106
|
exchangeTask(name) {
|
|
71
|
-
return this.httpClient.post(`/my/${name}/action/task/exchange`, {
|
|
107
|
+
return this.httpClient.post(`/my/${name}/action/task/exchange`, {
|
|
108
|
+
isSecure: true,
|
|
109
|
+
});
|
|
72
110
|
}
|
|
73
111
|
/** Delete an item from your character's inventory. */
|
|
74
112
|
deleteItem(name, body) {
|
|
75
|
-
return this.httpClient.post(`/my/${name}/action/delete`, {
|
|
113
|
+
return this.httpClient.post(`/my/${name}/action/delete`, {
|
|
114
|
+
body,
|
|
115
|
+
isSecure: true,
|
|
116
|
+
});
|
|
76
117
|
}
|
|
77
118
|
/** History of the last 100 actions of all your characters. */
|
|
78
119
|
getLogs(params = {}) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAllResourcesApiQuery, GetAllResourcesApiResult, GetResourceApiResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsResourcesApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
6
6
|
/** Fetch resources details. */
|
|
7
|
-
getAll(params?:
|
|
7
|
+
getAll(params?: GetAllResourcesApiQuery): Promise<GetAllResourcesApiResult>;
|
|
8
8
|
/** Retrieve the details of a resource. */
|
|
9
|
-
get(code: string): Promise<
|
|
9
|
+
get(code: string): Promise<GetResourceApiResult>;
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
2
|
-
import {
|
|
2
|
+
import { GenerateTokenResult } from './types/api-schema-bindings.types';
|
|
3
3
|
export declare class ArtifactsTokenApi {
|
|
4
4
|
private readonly httpClient;
|
|
5
5
|
constructor(httpClient: ArtifactsHttpClient);
|
|
@@ -7,5 +7,5 @@ export declare class ArtifactsTokenApi {
|
|
|
7
7
|
* Use your account as HTTPBasic Auth to generate your token to use the API.
|
|
8
8
|
* You can also generate your token directly on the website.
|
|
9
9
|
*/
|
|
10
|
-
generate(username: string, password: string): Promise<
|
|
10
|
+
generate(username: string, password: string): Promise<GenerateTokenResult>;
|
|
11
11
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { components } from '../types/api-schema.types';
|
|
2
1
|
import { ArtifactsHttpClient } from '../http-client/artifacts.http-client';
|
|
3
|
-
import { ArtifactsApiParams } from '
|
|
2
|
+
import { ArtifactsApiParams } from './types/artifacts-api.types';
|
|
4
3
|
import { ArtifactsMyCharactersApi } from './artifacts-my-characters.api';
|
|
5
4
|
import { ArtifactsCharactersApi } from './artifacts-characters.api';
|
|
6
5
|
import { ArtifactsMyAccountApi } from './artifacts-my-account.api';
|
|
@@ -12,6 +11,7 @@ import { ArtifactsEventsApi } from './artifacts-events.api';
|
|
|
12
11
|
import { ArtifactsGrandExchangeApi } from './artifacts-grand-exchange.api';
|
|
13
12
|
import { ArtifactsAccountsApi } from './artifacts-accounts.api';
|
|
14
13
|
import { ArtifactsTokenApi } from './artifacts-token.api';
|
|
14
|
+
import { GetStatusApiResult } from './types/api-schema-bindings.types';
|
|
15
15
|
export declare class ArtifactsApi {
|
|
16
16
|
private readonly httpClient;
|
|
17
17
|
readonly myCharacters: ArtifactsMyCharactersApi;
|
|
@@ -27,6 +27,6 @@ export declare class ArtifactsApi {
|
|
|
27
27
|
readonly token: ArtifactsTokenApi;
|
|
28
28
|
protected constructor(httpClient: ArtifactsHttpClient);
|
|
29
29
|
static create(params?: ArtifactsApiParams): ArtifactsApi;
|
|
30
|
-
getStatus(): Promise<
|
|
30
|
+
getStatus(): Promise<GetStatusApiResult>;
|
|
31
31
|
setToken(token: string): void;
|
|
32
32
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { paths } from './api-schema.types';
|
|
2
|
+
export type GetStatusApiResult = paths['/']['get']['responses'][200]['content']['application/json'];
|
|
3
|
+
export type MoveApiBody = paths['/my/{name}/action/move']['post']['requestBody']['content']['application/json'];
|
|
4
|
+
export type MoveApiResult = paths['/my/{name}/action/move']['post']['responses'][200]['content']['application/json'];
|
|
5
|
+
export type EquipItemApiBody = paths['/my/{name}/action/equip']['post']['requestBody']['content']['application/json'];
|
|
6
|
+
export type EquipItemApiResult = paths['/my/{name}/action/equip']['post']['responses'][200]['content']['application/json'];
|
|
7
|
+
export type UnequipItemApiBody = paths['/my/{name}/action/unequip']['post']['requestBody']['content']['application/json'];
|
|
8
|
+
export type UnequipItemApiResult = paths['/my/{name}/action/unequip']['post']['responses'][200]['content']['application/json'];
|
|
9
|
+
export type FightApiResult = paths['/my/{name}/action/fight']['post']['responses'][200]['content']['application/json'];
|
|
10
|
+
export type GatheringApiResult = paths['/my/{name}/action/gathering']['post']['responses'][200]['content']['application/json'];
|
|
11
|
+
export type CraftingApiBody = paths['/my/{name}/action/crafting']['post']['requestBody']['content']['application/json'];
|
|
12
|
+
export type CraftingApiResult = paths['/my/{name}/action/crafting']['post']['responses'][200]['content']['application/json'];
|
|
13
|
+
export type DepositBankApiBody = paths['/my/{name}/action/bank/deposit']['post']['requestBody']['content']['application/json'];
|
|
14
|
+
export type DepositBankApiResult = paths['/my/{name}/action/bank/deposit']['post']['responses'][200]['content']['application/json'];
|
|
15
|
+
export type DepositBankGoldApiBody = paths['/my/{name}/action/bank/deposit/gold']['post']['requestBody']['content']['application/json'];
|
|
16
|
+
export type DepositBankGoldApiResult = paths['/my/{name}/action/bank/deposit/gold']['post']['responses'][200]['content']['application/json'];
|
|
17
|
+
export type WithdrawBankApiBody = paths['/my/{name}/action/bank/withdraw']['post']['requestBody']['content']['application/json'];
|
|
18
|
+
export type WithdrawBankApiResult = paths['/my/{name}/action/bank/withdraw']['post']['responses'][200]['content']['application/json'];
|
|
19
|
+
export type WithdrawBankGoldApiBody = paths['/my/{name}/action/bank/withdraw/gold']['post']['requestBody']['content']['application/json'];
|
|
20
|
+
export type WithdrawBankGoldApiResult = paths['/my/{name}/action/bank/withdraw/gold']['post']['responses'][200]['content']['application/json'];
|
|
21
|
+
export type RecyclingApiBody = paths['/my/{name}/action/recycling']['post']['requestBody']['content']['application/json'];
|
|
22
|
+
export type RecyclingApiResult = paths['/my/{name}/action/recycling']['post']['responses'][200]['content']['application/json'];
|
|
23
|
+
export type BuyGrandExchangeItemApiBody = paths['/my/{name}/action/ge/buy']['post']['requestBody']['content']['application/json'];
|
|
24
|
+
export type BuyGrandExchangeItemApiResult = paths['/my/{name}/action/ge/buy']['post']['responses'][200]['content']['application/json'];
|
|
25
|
+
export type SellGrandExchangeItemApiBody = paths['/my/{name}/action/ge/sell']['post']['requestBody']['content']['application/json'];
|
|
26
|
+
export type SellGrandExchangeItemApiResult = paths['/my/{name}/action/ge/sell']['post']['responses'][200]['content']['application/json'];
|
|
27
|
+
export type AcceptTaskApiResult = paths['/my/{name}/action/task/new']['post']['responses'][200]['content']['application/json'];
|
|
28
|
+
export type CompleteTaskApiResult = paths['/my/{name}/action/task/complete']['post']['responses'][200]['content']['application/json'];
|
|
29
|
+
export type ExchangeTaskApiResult = paths['/my/{name}/action/task/exchange']['post']['responses'][200]['content']['application/json'];
|
|
30
|
+
export type DeleteItemApiBody = paths['/my/{name}/action/delete']['post']['requestBody']['content']['application/json'];
|
|
31
|
+
export type DeleteItemApiResult = paths['/my/{name}/action/delete']['post']['responses'][200]['content']['application/json'];
|
|
32
|
+
export type GetLogsApiQuery = paths['/my/logs']['get']['parameters']['query'];
|
|
33
|
+
export type GetLogsApiResult = paths['/my/logs']['get']['responses'][200]['content']['application/json'];
|
|
34
|
+
export type GetMyCharactersApiResult = paths['/my/characters']['get']['responses'][200]['content']['application/json'];
|
|
35
|
+
export type CreateAccountApiBody = paths['/accounts/create']['post']['requestBody']['content']['application/json'];
|
|
36
|
+
export type CreateAccountApiResult = paths['/accounts/create']['post']['responses'][200]['content']['application/json'];
|
|
37
|
+
export type CreateCharacterApiBody = paths['/characters/create']['post']['requestBody']['content']['application/json'];
|
|
38
|
+
export type CreateCharacterApiResult = paths['/accounts/create']['post']['responses'][200]['content']['application/json'];
|
|
39
|
+
export type GetAllCharactersApiQuery = paths['/characters/']['get']['parameters']['query'];
|
|
40
|
+
export type GetAllCharactersApiResult = paths['/characters/']['get']['responses'][200]['content']['application/json'];
|
|
41
|
+
export type GetCharacterApiResult = paths['/characters/{name}']['get']['responses'][200]['content']['application/json'];
|
|
42
|
+
export type GetAllEventsApiQuery = paths['/events/']['get']['parameters']['query'];
|
|
43
|
+
export type GetAllEventsApiResult = paths['/events/']['get']['responses'][200]['content']['application/json'];
|
|
44
|
+
export type GetAllGrandExchangeApiQuery = paths['/ge/']['get']['parameters']['query'];
|
|
45
|
+
export type GetAllGrandExchangeApiResult = paths['/ge/']['get']['responses'][200]['content']['application/json'];
|
|
46
|
+
export type GetGrandExchangeApiResult = paths['/ge/{code}']['get']['responses'][200]['content']['application/json'];
|
|
47
|
+
export type GetAllItemsApiQuery = paths['/items/']['get']['parameters']['query'];
|
|
48
|
+
export type GetAllItemsApiResult = paths['/items/']['get']['responses'][200]['content']['application/json'];
|
|
49
|
+
export type GetItemApiResult = paths['/items/{code}']['get']['responses'][200]['content']['application/json'];
|
|
50
|
+
export type GetAllMapsApiQuery = paths['/maps/']['get']['parameters']['query'];
|
|
51
|
+
export type GetAllMapsApiResult = paths['/maps/']['get']['responses'][200]['content']['application/json'];
|
|
52
|
+
export type GetMapApiResult = paths['/maps/{x}/{y}']['get']['responses'][200]['content']['application/json'];
|
|
53
|
+
export type GetAllMonstersApiQuery = paths['/monsters/']['get']['parameters']['query'];
|
|
54
|
+
export type GetAllMonstersApiResult = paths['/monsters/']['get']['responses'][200]['content']['application/json'];
|
|
55
|
+
export type GetMonsterApiResult = paths['/monsters/{code}']['get']['responses'][200]['content']['application/json'];
|
|
56
|
+
export type GetBankItemsApiQuery = paths['/my/bank/items']['get']['parameters']['query'];
|
|
57
|
+
export type GetBankItemsApiResult = paths['/my/bank/items']['get']['responses'][200]['content']['application/json'];
|
|
58
|
+
export type GetBankGoldApiResult = paths['/my/bank/gold']['get']['responses'][200]['content']['application/json'];
|
|
59
|
+
export type ChangePasswordApiBody = paths['/my/change_password']['post']['requestBody']['content']['application/json'];
|
|
60
|
+
export type ChangePasswordApiResult = paths['/my/change_password']['post']['responses'][200]['content']['application/json'];
|
|
61
|
+
export type GetAllResourcesApiQuery = paths['/resources/']['get']['parameters']['query'];
|
|
62
|
+
export type GetAllResourcesApiResult = paths['/resources/']['get']['responses'][200]['content']['application/json'];
|
|
63
|
+
export type GetResourceApiResult = paths['/resources/{code}']['get']['responses'][200]['content']['application/json'];
|
|
64
|
+
export type GenerateTokenResult = paths['/token/']['post']['responses'][200]['content']['application/json'];
|
|
@@ -791,6 +791,38 @@ export interface components {
|
|
|
791
791
|
ActionItemBankResponseSchema: {
|
|
792
792
|
data: components['schemas']['BankItemSchema'];
|
|
793
793
|
};
|
|
794
|
+
/** ActiveEventSchema */
|
|
795
|
+
ActiveEventSchema: {
|
|
796
|
+
/**
|
|
797
|
+
* Name
|
|
798
|
+
* @description Name of the event.
|
|
799
|
+
*/
|
|
800
|
+
name: string;
|
|
801
|
+
/** @description Map of the event. */
|
|
802
|
+
map: components['schemas']['MapSchema'];
|
|
803
|
+
/**
|
|
804
|
+
* Previous Skin
|
|
805
|
+
* @description Previous map skin.
|
|
806
|
+
*/
|
|
807
|
+
previous_skin: string;
|
|
808
|
+
/**
|
|
809
|
+
* Duration
|
|
810
|
+
* @description Duration in minutes.
|
|
811
|
+
*/
|
|
812
|
+
duration: number;
|
|
813
|
+
/**
|
|
814
|
+
* Expiration
|
|
815
|
+
* Format: date-time
|
|
816
|
+
* @description Expiration datetime.
|
|
817
|
+
*/
|
|
818
|
+
expiration: string;
|
|
819
|
+
/**
|
|
820
|
+
* Created At
|
|
821
|
+
* Format: date-time
|
|
822
|
+
* @description Start datetime.
|
|
823
|
+
*/
|
|
824
|
+
created_at: string;
|
|
825
|
+
};
|
|
794
826
|
/** AddAccountSchema */
|
|
795
827
|
AddAccountSchema: {
|
|
796
828
|
/**
|
|
@@ -1276,206 +1308,6 @@ export interface components {
|
|
|
1276
1308
|
* @description List of inventory slots.
|
|
1277
1309
|
*/
|
|
1278
1310
|
inventory?: components['schemas']['InventorySlot'][];
|
|
1279
|
-
/**
|
|
1280
|
-
* Inventory Slot1
|
|
1281
|
-
* @description Deprecated** Inventory slot 1.
|
|
1282
|
-
*/
|
|
1283
|
-
inventory_slot1: string;
|
|
1284
|
-
/**
|
|
1285
|
-
* Inventory Slot1 Quantity
|
|
1286
|
-
* @description Deprecated** Inventory 1 quantity.
|
|
1287
|
-
*/
|
|
1288
|
-
inventory_slot1_quantity: number;
|
|
1289
|
-
/**
|
|
1290
|
-
* Inventory Slot2
|
|
1291
|
-
* @description Deprecated** Inventory slot 2.
|
|
1292
|
-
*/
|
|
1293
|
-
inventory_slot2: string;
|
|
1294
|
-
/**
|
|
1295
|
-
* Inventory Slot2 Quantity
|
|
1296
|
-
* @description Deprecated** Inventory 2 quantity.
|
|
1297
|
-
*/
|
|
1298
|
-
inventory_slot2_quantity: number;
|
|
1299
|
-
/**
|
|
1300
|
-
* Inventory Slot3
|
|
1301
|
-
* @description Deprecated** Inventory slot 3.
|
|
1302
|
-
*/
|
|
1303
|
-
inventory_slot3: string;
|
|
1304
|
-
/**
|
|
1305
|
-
* Inventory Slot3 Quantity
|
|
1306
|
-
* @description Deprecated** Inventory 3 quantity.
|
|
1307
|
-
*/
|
|
1308
|
-
inventory_slot3_quantity: number;
|
|
1309
|
-
/**
|
|
1310
|
-
* Inventory Slot4
|
|
1311
|
-
* @description Deprecated** Inventory slot 4.
|
|
1312
|
-
*/
|
|
1313
|
-
inventory_slot4: string;
|
|
1314
|
-
/**
|
|
1315
|
-
* Inventory Slot4 Quantity
|
|
1316
|
-
* @description Deprecated** Inventory 4 quantity.
|
|
1317
|
-
*/
|
|
1318
|
-
inventory_slot4_quantity: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* Inventory Slot5
|
|
1321
|
-
* @description Deprecated** Inventory slot 5.
|
|
1322
|
-
*/
|
|
1323
|
-
inventory_slot5: string;
|
|
1324
|
-
/**
|
|
1325
|
-
* Inventory Slot5 Quantity
|
|
1326
|
-
* @description Deprecated** Inventory 5 quantity.
|
|
1327
|
-
*/
|
|
1328
|
-
inventory_slot5_quantity: number;
|
|
1329
|
-
/**
|
|
1330
|
-
* Inventory Slot6
|
|
1331
|
-
* @description Deprecated** Inventory slot 6.
|
|
1332
|
-
*/
|
|
1333
|
-
inventory_slot6: string;
|
|
1334
|
-
/**
|
|
1335
|
-
* Inventory Slot6 Quantity
|
|
1336
|
-
* @description Deprecated** Inventory 6 quantity.
|
|
1337
|
-
*/
|
|
1338
|
-
inventory_slot6_quantity: number;
|
|
1339
|
-
/**
|
|
1340
|
-
* Inventory Slot7
|
|
1341
|
-
* @description Deprecated** Inventory slot 7.
|
|
1342
|
-
*/
|
|
1343
|
-
inventory_slot7: string;
|
|
1344
|
-
/**
|
|
1345
|
-
* Inventory Slot7 Quantity
|
|
1346
|
-
* @description Deprecated** Inventory 7 quantity.
|
|
1347
|
-
*/
|
|
1348
|
-
inventory_slot7_quantity: number;
|
|
1349
|
-
/**
|
|
1350
|
-
* Inventory Slot8
|
|
1351
|
-
* @description Deprecated** Inventory slot 8.
|
|
1352
|
-
*/
|
|
1353
|
-
inventory_slot8: string;
|
|
1354
|
-
/**
|
|
1355
|
-
* Inventory Slot8 Quantity
|
|
1356
|
-
* @description Deprecated** Inventory 8 quantity.
|
|
1357
|
-
*/
|
|
1358
|
-
inventory_slot8_quantity: number;
|
|
1359
|
-
/**
|
|
1360
|
-
* Inventory Slot9
|
|
1361
|
-
* @description Deprecated** Inventory slot 9.
|
|
1362
|
-
*/
|
|
1363
|
-
inventory_slot9: string;
|
|
1364
|
-
/**
|
|
1365
|
-
* Inventory Slot9 Quantity
|
|
1366
|
-
* @description Deprecated** Inventory 9 quantity.
|
|
1367
|
-
*/
|
|
1368
|
-
inventory_slot9_quantity: number;
|
|
1369
|
-
/**
|
|
1370
|
-
* Inventory Slot10
|
|
1371
|
-
* @description Deprecated** Inventory slot 10.
|
|
1372
|
-
*/
|
|
1373
|
-
inventory_slot10: string;
|
|
1374
|
-
/**
|
|
1375
|
-
* Inventory Slot10 Quantity
|
|
1376
|
-
* @description Deprecated** Inventory 10 quantity.
|
|
1377
|
-
*/
|
|
1378
|
-
inventory_slot10_quantity: number;
|
|
1379
|
-
/**
|
|
1380
|
-
* Inventory Slot11
|
|
1381
|
-
* @description Deprecated** Inventory slot 11.
|
|
1382
|
-
*/
|
|
1383
|
-
inventory_slot11: string;
|
|
1384
|
-
/**
|
|
1385
|
-
* Inventory Slot11 Quantity
|
|
1386
|
-
* @description Deprecated** Inventory 11 quantity.
|
|
1387
|
-
*/
|
|
1388
|
-
inventory_slot11_quantity: number;
|
|
1389
|
-
/**
|
|
1390
|
-
* Inventory Slot12
|
|
1391
|
-
* @description Deprecated** nventory slot 12.
|
|
1392
|
-
*/
|
|
1393
|
-
inventory_slot12: string;
|
|
1394
|
-
/**
|
|
1395
|
-
* Inventory Slot12 Quantity
|
|
1396
|
-
* @description Deprecated** Inventory 12 quantity.
|
|
1397
|
-
*/
|
|
1398
|
-
inventory_slot12_quantity: number;
|
|
1399
|
-
/**
|
|
1400
|
-
* Inventory Slot13
|
|
1401
|
-
* @description Deprecated** Inventory slot 13.
|
|
1402
|
-
*/
|
|
1403
|
-
inventory_slot13: string;
|
|
1404
|
-
/**
|
|
1405
|
-
* Inventory Slot13 Quantity
|
|
1406
|
-
* @description Deprecated** Inventory 13 quantity.
|
|
1407
|
-
*/
|
|
1408
|
-
inventory_slot13_quantity: number;
|
|
1409
|
-
/**
|
|
1410
|
-
* Inventory Slot14
|
|
1411
|
-
* @description Deprecated** Inventory slot 14.
|
|
1412
|
-
*/
|
|
1413
|
-
inventory_slot14: string;
|
|
1414
|
-
/**
|
|
1415
|
-
* Inventory Slot14 Quantity
|
|
1416
|
-
* @description Deprecated** Inventory 14 quantity.
|
|
1417
|
-
*/
|
|
1418
|
-
inventory_slot14_quantity: number;
|
|
1419
|
-
/**
|
|
1420
|
-
* Inventory Slot15
|
|
1421
|
-
* @description Deprecated** Inventory slot 15.
|
|
1422
|
-
*/
|
|
1423
|
-
inventory_slot15: string;
|
|
1424
|
-
/**
|
|
1425
|
-
* Inventory Slot15 Quantity
|
|
1426
|
-
* @description Deprecated** Inventory 15 quantity.
|
|
1427
|
-
*/
|
|
1428
|
-
inventory_slot15_quantity: number;
|
|
1429
|
-
/**
|
|
1430
|
-
* Inventory Slot16
|
|
1431
|
-
* @description Deprecated** Inventory slot 16.
|
|
1432
|
-
*/
|
|
1433
|
-
inventory_slot16: string;
|
|
1434
|
-
/**
|
|
1435
|
-
* Inventory Slot16 Quantity
|
|
1436
|
-
* @description Deprecated** Inventory 16 quantity.
|
|
1437
|
-
*/
|
|
1438
|
-
inventory_slot16_quantity: number;
|
|
1439
|
-
/**
|
|
1440
|
-
* Inventory Slot17
|
|
1441
|
-
* @description Deprecated** Inventory slot 17.
|
|
1442
|
-
*/
|
|
1443
|
-
inventory_slot17: string;
|
|
1444
|
-
/**
|
|
1445
|
-
* Inventory Slot17 Quantity
|
|
1446
|
-
* @description Deprecated** Inventory 17 quantity.
|
|
1447
|
-
*/
|
|
1448
|
-
inventory_slot17_quantity: number;
|
|
1449
|
-
/**
|
|
1450
|
-
* Inventory Slot18
|
|
1451
|
-
* @description Deprecated** Inventory slot 18.
|
|
1452
|
-
*/
|
|
1453
|
-
inventory_slot18: string;
|
|
1454
|
-
/**
|
|
1455
|
-
* Inventory Slot18 Quantity
|
|
1456
|
-
* @description Deprecated** Inventory 18 quantity.
|
|
1457
|
-
*/
|
|
1458
|
-
inventory_slot18_quantity: number;
|
|
1459
|
-
/**
|
|
1460
|
-
* Inventory Slot19
|
|
1461
|
-
* @description Deprecated** Inventory slot 19.
|
|
1462
|
-
*/
|
|
1463
|
-
inventory_slot19: string;
|
|
1464
|
-
/**
|
|
1465
|
-
* Inventory Slot19 Quantity
|
|
1466
|
-
* @description Deprecated** Inventory 19 quantity.
|
|
1467
|
-
*/
|
|
1468
|
-
inventory_slot19_quantity: number;
|
|
1469
|
-
/**
|
|
1470
|
-
* Inventory Slot20
|
|
1471
|
-
* @description Deprecated** Inventory slot 20.
|
|
1472
|
-
*/
|
|
1473
|
-
inventory_slot20: string;
|
|
1474
|
-
/**
|
|
1475
|
-
* Inventory Slot20 Quantity
|
|
1476
|
-
* @description Deprecated** Inventory 20 quantity.
|
|
1477
|
-
*/
|
|
1478
|
-
inventory_slot20_quantity: number;
|
|
1479
1311
|
};
|
|
1480
1312
|
/** CooldownSchema */
|
|
1481
1313
|
CooldownSchema: {
|
|
@@ -1489,16 +1321,6 @@ export interface components {
|
|
|
1489
1321
|
* @description The remaining seconds of the cooldown.
|
|
1490
1322
|
*/
|
|
1491
1323
|
remaining_seconds: number;
|
|
1492
|
-
/**
|
|
1493
|
-
* Totalseconds
|
|
1494
|
-
* @description Deprecated** The total seconds of the cooldown.
|
|
1495
|
-
*/
|
|
1496
|
-
totalSeconds: number;
|
|
1497
|
-
/**
|
|
1498
|
-
* Remainingseconds
|
|
1499
|
-
* @description Deprecated** The remaining seconds of the cooldown.
|
|
1500
|
-
*/
|
|
1501
|
-
remainingSeconds: number;
|
|
1502
1324
|
/**
|
|
1503
1325
|
* Started At
|
|
1504
1326
|
* Format: date-time
|
|
@@ -1555,10 +1377,10 @@ export interface components {
|
|
|
1555
1377
|
*/
|
|
1556
1378
|
quantity: number;
|
|
1557
1379
|
};
|
|
1558
|
-
/** DataPage[
|
|
1559
|
-
|
|
1380
|
+
/** DataPage[ActiveEventSchema] */
|
|
1381
|
+
DataPage_ActiveEventSchema_: {
|
|
1560
1382
|
/** Data */
|
|
1561
|
-
data: components['schemas']['
|
|
1383
|
+
data: components['schemas']['ActiveEventSchema'][];
|
|
1562
1384
|
/** Total */
|
|
1563
1385
|
total: number | null;
|
|
1564
1386
|
/** Page */
|
|
@@ -1568,10 +1390,10 @@ export interface components {
|
|
|
1568
1390
|
/** Pages */
|
|
1569
1391
|
pages?: number | null;
|
|
1570
1392
|
};
|
|
1571
|
-
/** DataPage[
|
|
1572
|
-
|
|
1393
|
+
/** DataPage[CharacterSchema] */
|
|
1394
|
+
DataPage_CharacterSchema_: {
|
|
1573
1395
|
/** Data */
|
|
1574
|
-
data: components['schemas']['
|
|
1396
|
+
data: components['schemas']['CharacterSchema'][];
|
|
1575
1397
|
/** Total */
|
|
1576
1398
|
total: number | null;
|
|
1577
1399
|
/** Page */
|
|
@@ -1798,38 +1620,6 @@ export interface components {
|
|
|
1798
1620
|
EquipmentResponseSchema: {
|
|
1799
1621
|
data: components['schemas']['EquipRequestSchema'];
|
|
1800
1622
|
};
|
|
1801
|
-
/** EventSchema */
|
|
1802
|
-
EventSchema: {
|
|
1803
|
-
/**
|
|
1804
|
-
* Name
|
|
1805
|
-
* @description Name of the event.
|
|
1806
|
-
*/
|
|
1807
|
-
name: string;
|
|
1808
|
-
/** @description Map of the event. */
|
|
1809
|
-
map: components['schemas']['MapSchema'];
|
|
1810
|
-
/**
|
|
1811
|
-
* Previous Skin
|
|
1812
|
-
* @description Previous map skin.
|
|
1813
|
-
*/
|
|
1814
|
-
previous_skin: string;
|
|
1815
|
-
/**
|
|
1816
|
-
* Duration
|
|
1817
|
-
* @description Duration in minutes.
|
|
1818
|
-
*/
|
|
1819
|
-
duration: number;
|
|
1820
|
-
/**
|
|
1821
|
-
* Expiration
|
|
1822
|
-
* Format: date-time
|
|
1823
|
-
* @description Expiration datetime.
|
|
1824
|
-
*/
|
|
1825
|
-
expiration: string;
|
|
1826
|
-
/**
|
|
1827
|
-
* Created At
|
|
1828
|
-
* Format: date-time
|
|
1829
|
-
* @description Start datetime.
|
|
1830
|
-
*/
|
|
1831
|
-
created_at: string;
|
|
1832
|
-
};
|
|
1833
1623
|
/** FightSchema */
|
|
1834
1624
|
FightSchema: {
|
|
1835
1625
|
/**
|
|
@@ -3858,8 +3648,8 @@ export interface operations {
|
|
|
3858
3648
|
get_all_characters_characters__get: {
|
|
3859
3649
|
parameters: {
|
|
3860
3650
|
query?: {
|
|
3861
|
-
/** @description Default sort by total XP. */
|
|
3862
|
-
sort?: 'woodcutting' | 'mining' | 'fishing' | 'weaponcrafting' | 'gearcrafting' | 'jewelrycrafting' | 'cooking';
|
|
3651
|
+
/** @description Default sort by combat total XP. */
|
|
3652
|
+
sort?: 'woodcutting' | 'mining' | 'fishing' | 'weaponcrafting' | 'gearcrafting' | 'jewelrycrafting' | 'cooking' | 'gold';
|
|
3863
3653
|
/** @description Page number */
|
|
3864
3654
|
page?: number;
|
|
3865
3655
|
/** @description Page size */
|
|
@@ -4231,7 +4021,7 @@ export interface operations {
|
|
|
4231
4021
|
[name: string]: unknown;
|
|
4232
4022
|
};
|
|
4233
4023
|
content: {
|
|
4234
|
-
'application/json': components['schemas']['
|
|
4024
|
+
'application/json': components['schemas']['DataPage_ActiveEventSchema_'];
|
|
4235
4025
|
};
|
|
4236
4026
|
};
|
|
4237
4027
|
/** @description Events not found. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetRequestParams, PostRequestParams } from '
|
|
1
|
+
import { GetRequestParams, PostRequestParams } from './types/artifacts-http-client.types';
|
|
2
2
|
export declare class ArtifactsHttpClient {
|
|
3
3
|
private readonly baseUrl;
|
|
4
4
|
private token;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.ArtifactsError = exports.ArtifactsApi = void 0;
|
|
4
18
|
var artifacts_api_1 = require("./api/artifacts.api");
|
|
5
19
|
Object.defineProperty(exports, "ArtifactsApi", { enumerable: true, get: function () { return artifacts_api_1.ArtifactsApi; } });
|
|
6
20
|
var artifacts_error_1 = require("./errors/artifacts.error");
|
|
7
21
|
Object.defineProperty(exports, "ArtifactsError", { enumerable: true, get: function () { return artifacts_error_1.ArtifactsError; } });
|
|
22
|
+
__exportStar(require("./api/types/api-schema-bindings.types"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artifacts-api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Api client for https://artifactsmmo.com",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/siranweb/artifacts-api-client.git",
|
|
@@ -10,12 +10,11 @@
|
|
|
10
10
|
"client"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"test": "jest",
|
|
14
13
|
"build": "tsc",
|
|
15
14
|
"ts-check": "tsc --noEmit",
|
|
16
15
|
"lint": "eslint --max-warnings 0 --ext .ts lib",
|
|
17
16
|
"format": "prettier --log-level warn --write lib",
|
|
18
|
-
"generate-schema": "openapi-typescript https://api.artifactsmmo.com/openapi.json -o
|
|
17
|
+
"generate-schema": "openapi-typescript https://api.artifactsmmo.com/openapi.json -o lib/api/types/api-schema.types.ts"
|
|
19
18
|
},
|
|
20
19
|
"author": "Kirill Gerasimenko <siranweb.public@tuta.io>",
|
|
21
20
|
"license": "MIT",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|