azul-steam-inventory-loader 3.1.2 → 3.2.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/.eslint.js CHANGED
@@ -1,14 +1,14 @@
1
- module.exports = {
2
- parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3
- parserOptions: {
4
- ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5
- sourceType: "module" // Allows for the use of imports
6
- },
7
- extends: [
8
- "plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9
- ],
10
- rules: {
11
- // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
12
- // e.g. "@typescript-eslint/explicit-function-return-type": "off",
13
- }
1
+ module.exports = {
2
+ parser: "@typescript-eslint/parser", // Specifies the ESLint parser
3
+ parserOptions: {
4
+ ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5
+ sourceType: "module" // Allows for the use of imports
6
+ },
7
+ extends: [
8
+ "plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin
9
+ ],
10
+ rules: {
11
+ // Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
12
+ // e.g. "@typescript-eslint/explicit-function-return-type": "off",
13
+ }
14
14
  };
package/.eslintignore CHANGED
@@ -1,4 +1,4 @@
1
- /*.js
2
- node_modules
3
- dist
1
+ /*.js
2
+ node_modules
3
+ dist
4
4
  test
package/.eslintrc.json CHANGED
@@ -1,39 +1,40 @@
1
- {
2
- "env": {
3
- "es2021": true,
4
- "node": true
5
- },
6
- "extends": [
7
- "airbnb-base",
8
- "plugin:@typescript-eslint/recommended"
9
- ],
10
- "globals": {
11
- "Atomics": "readonly",
12
- "SharedArrayBuffer": "readonly"
13
- },
14
- "parser": "@typescript-eslint/parser",
15
- "parserOptions": {
16
- "ecmaVersion": 12,
17
- "sourceType": "module"
18
- },
19
- "plugins": [
20
- "@typescript-eslint"
21
- ],
22
- "rules": {
23
- "import/extensions": [
24
- "error",
25
- "ignorePackages",
26
- {
27
- "ts": "never"
28
- }
29
- ],
30
- "max-len":"off"
31
- },
32
- "settings": {
33
- "import/resolver": {
34
- "typescript": {
35
-
36
- }
37
- }
38
- }
39
- }
1
+ {
2
+ "env": {
3
+ "es2021": true,
4
+ "node": true
5
+ },
6
+ "extends": [
7
+ "airbnb-base",
8
+ "plugin:@typescript-eslint/recommended"
9
+ ],
10
+ "globals": {
11
+ "Atomics": "readonly",
12
+ "SharedArrayBuffer": "readonly"
13
+ },
14
+ "parser": "@typescript-eslint/parser",
15
+ "parserOptions": {
16
+ "ecmaVersion": 12,
17
+ "sourceType": "module"
18
+ },
19
+ "plugins": [
20
+ "@typescript-eslint"
21
+ ],
22
+ "rules": {
23
+ "import/extensions": [
24
+ "error",
25
+ "ignorePackages",
26
+ {
27
+ "ts": "never"
28
+ }
29
+ ],
30
+ "max-len":"off",
31
+ "linebreak-style": "off"
32
+ },
33
+ "settings": {
34
+ "import/resolver": {
35
+ "typescript": {
36
+
37
+ }
38
+ }
39
+ }
40
+ }
@@ -1,29 +1,29 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "node",
9
- "request": "launch",
10
- "name": "Test Azul Loader",
11
- "program": "${workspaceFolder}\\test\\AzulRaw.js",
12
- "skipFiles": [
13
- "<node_internals>/**"
14
- ],
15
- "env": {"NODE_ENV": "production"},
16
- "runtimeArgs": ["--expose-gc"]
17
- },{
18
- "type": "node",
19
- "request": "launch",
20
- "name": "Test Default Loader",
21
- "program": "${workspaceFolder}\\test\\SteamCommunity.js",
22
- "skipFiles": [
23
- "<node_internals>/**"
24
- ],
25
- "env": {"NODE_ENV": "production"},
26
- "runtimeArgs": ["--expose-gc"]
27
- },
28
- ]
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "request": "launch",
10
+ "name": "Test Azul Loader",
11
+ "program": "${workspaceFolder}//test//AzulRaw.js",
12
+ "skipFiles": [
13
+ "<node_internals>/**"
14
+ ],
15
+ "env": {"NODE_ENV": "production"},
16
+ "runtimeArgs": ["--expose-gc"]
17
+ },{
18
+ "type": "node",
19
+ "request": "launch",
20
+ "name": "Test Default Loader",
21
+ "program": "${workspaceFolder}//test//SteamCommunity.js",
22
+ "skipFiles": [
23
+ "<node_internals>/**"
24
+ ],
25
+ "env": {"NODE_ENV": "production"},
26
+ "runtimeArgs": ["--expose-gc"]
27
+ },
28
+ ]
29
29
  }
package/azul.js CHANGED
File without changes
@@ -1,96 +1,96 @@
1
- export interface ItemAsset {
2
- amount: string;
3
- appid: number;
4
- assetid: string;
5
- classid: string;
6
- contextid: string;
7
- instanceid: string;
8
- is_currency?: any;
9
- currency?: any;
10
- currencyid?: any;
11
- }
12
- export interface Tag {
13
- internal_name: string;
14
- name: string;
15
- category: string;
16
- color: string;
17
- category_name: string;
18
- }
19
- export interface rawTag {
20
- category: string;
21
- internal_name: string;
22
- localized_category_name?: string;
23
- localized_tag_name: string;
24
- category_name: string;
25
- color?: string;
26
- name?: string;
27
- }
28
- export interface InnerItemDescription {
29
- value: string;
30
- }
31
- export interface ItemActions {
32
- link: string;
33
- name: string;
34
- }
35
- export interface ItemDescription {
36
- actions: ItemActions[];
37
- appid: number;
38
- background_color: string;
39
- classid: string;
40
- commodity: number;
41
- currency: number;
42
- descriptions: InnerItemDescription[];
43
- owner_descriptions?: InnerItemDescription[];
44
- icon_url: string;
45
- icon_url_large: string;
46
- instanceid: string;
47
- market_fee_app: number;
48
- market_hash_name: string;
49
- market_marketable_restriction: number;
50
- market_name: string;
51
- market_tradable_restriction: number;
52
- marketable: number;
53
- name: string;
54
- tags: rawTag[];
55
- tradable: number;
56
- owner?: any;
57
- type: string;
58
- item_expiration?: string;
59
- [ListingKey: string]: any;
60
- }
61
- export interface ItemDetails {
62
- id: string;
63
- is_currency: boolean;
64
- instanceid: string;
65
- amount: number;
66
- contextid: string;
67
- appid: number;
68
- assetid: string;
69
- classid: string;
70
- tradable: boolean;
71
- marketable: boolean;
72
- commodity: boolean;
73
- fraudwarnings: [];
74
- descriptions: InnerItemDescription[];
75
- owner_descriptions?: InnerItemDescription[];
76
- market_hash_name: string;
77
- market_tradable_restriction: number;
78
- market_marketable_restriction: number;
79
- market_fee_app?: number;
80
- cache_expiration?: string;
81
- item_expiration?: string;
82
- tags?: Tag[];
83
- actions: ItemActions[];
84
- owner_actions?: ItemActions[];
85
- background_color: string;
86
- currency: number;
87
- icon_url: string;
88
- icon_url_large: string;
89
- market_name: string;
90
- name: string;
91
- type: string;
92
- owner?: any;
93
- }
94
- declare function ItemParser(item: ItemAsset, description: ItemDescription, contextID: string): Promise<ItemDetails>;
95
- export default ItemParser;
1
+ export interface ItemAsset {
2
+ amount: string;
3
+ appid: number;
4
+ assetid: string;
5
+ classid: string;
6
+ contextid: string;
7
+ instanceid: string;
8
+ is_currency?: any;
9
+ currency?: any;
10
+ currencyid?: any;
11
+ }
12
+ export interface Tag {
13
+ internal_name: string;
14
+ name: string;
15
+ category: string;
16
+ color: string;
17
+ category_name: string;
18
+ }
19
+ export interface rawTag {
20
+ category: string;
21
+ internal_name: string;
22
+ localized_category_name?: string;
23
+ localized_tag_name: string;
24
+ category_name: string;
25
+ color?: string;
26
+ name?: string;
27
+ }
28
+ export interface InnerItemDescription {
29
+ value: string;
30
+ }
31
+ export interface ItemActions {
32
+ link: string;
33
+ name: string;
34
+ }
35
+ export interface ItemDescription {
36
+ actions: ItemActions[];
37
+ appid: number;
38
+ background_color: string;
39
+ classid: string;
40
+ commodity: number;
41
+ currency: number;
42
+ descriptions: InnerItemDescription[];
43
+ owner_descriptions?: InnerItemDescription[];
44
+ icon_url: string;
45
+ icon_url_large: string;
46
+ instanceid: string;
47
+ market_fee_app: number;
48
+ market_hash_name: string;
49
+ market_marketable_restriction: number;
50
+ market_name: string;
51
+ market_tradable_restriction: number;
52
+ marketable: number;
53
+ name: string;
54
+ tags: rawTag[];
55
+ tradable: number;
56
+ owner?: any;
57
+ type: string;
58
+ item_expiration?: string;
59
+ [ListingKey: string]: any;
60
+ }
61
+ export interface ItemDetails {
62
+ id: string;
63
+ is_currency: boolean;
64
+ instanceid: string;
65
+ amount: number;
66
+ contextid: string;
67
+ appid: number;
68
+ assetid: string;
69
+ classid: string;
70
+ tradable: boolean;
71
+ marketable: boolean;
72
+ commodity: boolean;
73
+ fraudwarnings: [];
74
+ descriptions: InnerItemDescription[];
75
+ owner_descriptions?: InnerItemDescription[];
76
+ market_hash_name: string;
77
+ market_tradable_restriction: number;
78
+ market_marketable_restriction: number;
79
+ market_fee_app?: number;
80
+ cache_expiration?: string;
81
+ item_expiration?: string;
82
+ tags?: Tag[];
83
+ actions: ItemActions[];
84
+ owner_actions?: ItemActions[];
85
+ background_color: string;
86
+ currency: number;
87
+ icon_url: string;
88
+ icon_url_large: string;
89
+ market_name: string;
90
+ name: string;
91
+ type: string;
92
+ owner?: any;
93
+ }
94
+ declare function ItemParser(item: ItemAsset, description: ItemDescription, contextID: string): Promise<ItemDetails>;
95
+ export default ItemParser;
96
96
  //# sourceMappingURL=CEconItem.d.ts.map
File without changes
package/dist/CEconItem.js CHANGED
@@ -1,88 +1,88 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- async function ParseTags(tags) {
4
- const ParsedTags = [];
5
- {
6
- const Iterate = () => new Promise((resolve) => {
7
- const Execute = (i = 0) => {
8
- if (i === tags.length) {
9
- resolve();
10
- return;
11
- }
12
- const tag = tags[i];
13
- const o = {
14
- internal_name: tag.internal_name,
15
- name: tag?.localized_tag_name || tag.name || '',
16
- category: tag?.category,
17
- color: tag.color || '',
18
- category_name: tag?.localized_category_name || tag.category_name,
19
- };
20
- ParsedTags.push(o);
21
- setImmediate(Execute.bind(null, i + 1));
22
- };
23
- Execute();
24
- });
25
- await Iterate();
26
- }
27
- return ParsedTags;
28
- }
29
- async function ItemParser(item, description, contextID) {
30
- const is_currency = !!(item.is_currency || item.currency) || typeof item.currencyid !== 'undefined';
31
- const id = is_currency ? item.currencyid : item.assetid;
32
- if (description) {
33
- const ListingKey = `${item.classid}_${item.instanceid}`;
34
- if (Object.prototype.hasOwnProperty.call(description, ListingKey))
35
- description = description[ListingKey];
36
- }
37
- const Details = {
38
- is_currency,
39
- id,
40
- appid: item.appid,
41
- classid: item.classid,
42
- assetid: item.assetid,
43
- instanceid: item.instanceid || '0',
44
- amount: parseInt(item.amount, 10),
45
- contextid: item.contextid || contextID,
46
- tradable: !!description?.tradable,
47
- marketable: !!description?.marketable,
48
- commodity: !!description?.commodity,
49
- owner_descriptions: description?.owner_descriptions || undefined,
50
- item_expiration: description?.item_expiration || undefined,
51
- fraudwarnings: description?.fraudwarnings || [],
52
- descriptions: description?.descriptions || [],
53
- market_tradable_restriction: description?.market_tradable_restriction ? parseInt(description.market_tradable_restriction.toString(), 10) : 0,
54
- market_marketable_restriction: description?.market_marketable_restriction ? parseInt(description.market_marketable_restriction.toString(), 10) : 0,
55
- market_hash_name: description?.market_hash_name,
56
- actions: description?.actions || [],
57
- background_color: description.background_color,
58
- currency: description.currency,
59
- icon_url: description.icon_url,
60
- icon_url_large: description.icon_url_large,
61
- market_name: description.market_name,
62
- name: description.name,
63
- type: description.type,
64
- owner: (description.owner && JSON.stringify(description.owner) == '{}') ? undefined : description.owner,
65
- };
66
- if (description?.tags)
67
- Details.tags = await ParseTags(description.tags);
68
- if (Details.appid == 753 && Details.contextid == '6' && Details.market_hash_name) {
69
- const _match = Details.market_hash_name.match(/^(\d+)-/);
70
- if (_match)
71
- Details.market_fee_app = parseInt(_match[1], 10);
72
- }
73
- if (Details.item_expiration)
74
- Details.cache_expiration = Details.item_expiration;
75
- else if (Details.appid == 730 && Details.contextid == '2' && Details.owner_descriptions) {
76
- const Desc = Details.owner_descriptions.find((d) => d.value && d.value.indexOf('Tradable After ') === 0);
77
- if (Desc) {
78
- const date = new Date(Desc.value.substring(15).replace(/[,()]/g, ''));
79
- if (date)
80
- Details.cache_expiration = date.toISOString();
81
- }
82
- }
83
- if (item.currency)
84
- item.currency = null;
85
- return Details;
86
- }
87
- exports.default = ItemParser;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ async function ParseTags(tags) {
4
+ const ParsedTags = [];
5
+ {
6
+ const Iterate = () => new Promise((resolve) => {
7
+ const Execute = (i = 0) => {
8
+ if (i === tags.length) {
9
+ resolve();
10
+ return;
11
+ }
12
+ const tag = tags[i];
13
+ const o = {
14
+ internal_name: tag.internal_name,
15
+ name: tag?.localized_tag_name || tag.name || '',
16
+ category: tag?.category,
17
+ color: tag.color || '',
18
+ category_name: tag?.localized_category_name || tag.category_name,
19
+ };
20
+ ParsedTags.push(o);
21
+ setImmediate(Execute.bind(null, i + 1));
22
+ };
23
+ Execute();
24
+ });
25
+ await Iterate();
26
+ }
27
+ return ParsedTags;
28
+ }
29
+ async function ItemParser(item, description, contextID) {
30
+ const is_currency = !!(item.is_currency || item.currency) || typeof item.currencyid !== 'undefined';
31
+ const id = is_currency ? item.currencyid : item.assetid;
32
+ if (description) {
33
+ const ListingKey = `${item.classid}_${item.instanceid}`;
34
+ if (Object.prototype.hasOwnProperty.call(description, ListingKey))
35
+ description = description[ListingKey];
36
+ }
37
+ const Details = {
38
+ is_currency,
39
+ id,
40
+ appid: item.appid,
41
+ classid: item.classid,
42
+ assetid: item.assetid,
43
+ instanceid: item.instanceid || '0',
44
+ amount: parseInt(item.amount, 10),
45
+ contextid: item.contextid || contextID,
46
+ tradable: !!description?.tradable,
47
+ marketable: !!description?.marketable,
48
+ commodity: !!description?.commodity,
49
+ owner_descriptions: description?.owner_descriptions || undefined,
50
+ item_expiration: description?.item_expiration || undefined,
51
+ fraudwarnings: description?.fraudwarnings || [],
52
+ descriptions: description?.descriptions || [],
53
+ market_tradable_restriction: description?.market_tradable_restriction ? parseInt(description.market_tradable_restriction.toString(), 10) : 0,
54
+ market_marketable_restriction: description?.market_marketable_restriction ? parseInt(description.market_marketable_restriction.toString(), 10) : 0,
55
+ market_hash_name: description?.market_hash_name,
56
+ actions: description?.actions || [],
57
+ background_color: description.background_color,
58
+ currency: description.currency,
59
+ icon_url: description.icon_url,
60
+ icon_url_large: description.icon_url_large,
61
+ market_name: description.market_name,
62
+ name: description.name,
63
+ type: description.type,
64
+ owner: (description.owner && JSON.stringify(description.owner) == '{}') ? undefined : description.owner,
65
+ };
66
+ if (description?.tags)
67
+ Details.tags = await ParseTags(description.tags);
68
+ if (Details.appid == 753 && Details.contextid == '6' && Details.market_hash_name) {
69
+ const _match = Details.market_hash_name.match(/^(\d+)-/);
70
+ if (_match)
71
+ Details.market_fee_app = parseInt(_match[1], 10);
72
+ }
73
+ if (Details.item_expiration)
74
+ Details.cache_expiration = Details.item_expiration;
75
+ else if (Details.appid == 730 && Details.contextid == '2' && Details.owner_descriptions) {
76
+ const Desc = Details.owner_descriptions.find((d) => d.value && d.value.indexOf('Tradable After ') === 0);
77
+ if (Desc) {
78
+ const date = new Date(Desc.value.substring(15).replace(/[,()]/g, ''));
79
+ if (date)
80
+ Details.cache_expiration = date.toISOString();
81
+ }
82
+ }
83
+ if (item.currency)
84
+ item.currency = null;
85
+ return Details;
86
+ }
87
+ exports.default = ItemParser;
88
88
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ0Vjb25JdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0NFY29uSXRlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQW9KQSxLQUFLLFVBQVUsU0FBUyxDQUFDLElBQWM7SUFDckMsTUFBTSxVQUFVLEdBQVMsRUFBRSxDQUFDO0lBRTVCO1F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QkFBaUIsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1FBQ3pHLElBQUksSUFBSSxFQUFFO1lBQ1IsTUFBTSxJQUFJLEdBQUcsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLENBQUMsQ0FBQyxDQUFDO1lBQ3RFLElBQUksSUFBSTtnQkFBRSxPQUFPLENBQUMsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLFdBQVcsRUFBRSxDQUFDO1NBQ3pEO0tBQ0Y7SUFHRCxJQUFJLElBQUksQ0FBQyxRQUFRO1FBQUUsSUFBSSxDQUFDLFFBQVEsR0FBRyxJQUFJLENBQUM7SUFFeEMsT0FBTyxPQUFPLENBQUM7QUFDakIsQ0FBQztBQUVELGtCQUFlLFVBQVUsQ0FBQyJ9
@@ -0,0 +1,5 @@
1
+ import { HttpsAgent } from 'agentkeepalive';
2
+ import { HttpsProxyAgent } from 'hpagent';
3
+ declare function getAgent(proxyAddress: string): HttpsProxyAgent | HttpsAgent;
4
+ export default getAgent;
5
+ //# sourceMappingURL=getAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAgent.d.ts","sourceRoot":"","sources":["../src/getAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,iBAAS,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,GAAG,UAAU,CAUpE;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const agentkeepalive_1 = require("agentkeepalive");
4
+ const hpagent_1 = require("hpagent");
5
+ const DefaultAgent = new agentkeepalive_1.HttpsAgent();
6
+ function getAgent(proxyAddress) {
7
+ if (proxyAddress !== 'false') {
8
+ const ProxyAgent = new hpagent_1.HttpsProxyAgent({
9
+ proxy: proxyAddress,
10
+ });
11
+ return ProxyAgent;
12
+ }
13
+ return DefaultAgent;
14
+ }
15
+ exports.default = getAgent;
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0QWdlbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZ2V0QWdlbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxtREFBNEM7QUFDNUMscUNBQTBDO0FBRTFDLE1BQU0sWUFBWSxHQUFHLElBQUksMkJBQVUsRUFBRSxDQUFDO0FBRXRDLFNBQVMsUUFBUSxDQUFDLFlBQW9CO0lBQ3BDLElBQUksWUFBWSxLQUFLLE9BQU8sRUFBRTtRQUM1QixNQUFNLFVBQVUsR0FBRyxJQUFJLHlCQUFlLENBQUM7WUFDckMsS0FBSyxFQUFFLFlBQVk7U0FDcEIsQ0FBQyxDQUFDO1FBRUgsT0FBTyxVQUFVLENBQUM7S0FDbkI7SUFFRCxPQUFPLFlBQVksQ0FBQztBQUN0QixDQUFDO0FBRUQsa0JBQWUsUUFBUSxDQUFDIn0=
@@ -1,14 +1,15 @@
1
- import steamID from 'steamid';
2
- import { Tag, ItemDescription, ItemDetails } from './CEconItem';
3
- export interface AzulInventoryResponse {
4
- success: boolean;
5
- inventory: ItemDetails[];
6
- count: number;
7
- }
8
- export declare const getTag: (tags: Tag[], category: string) => Tag | null;
9
- export declare const getLargeImageURL: ({ icon_url_large, icon_url }: ItemDescription | ItemDetails) => string;
10
- export declare const getImageURL: ({ icon_url }: ItemDescription | ItemDetails) => string;
11
- export declare const isCardType: (tags: Tag[]) => undefined | false | 'Normal' | 'Foil';
12
- declare function getInventory(SteamID64: string | steamID, appID: string | number, contextID: string | number, tradableOnly: boolean | undefined, SteamCommunity_Jar: any, Language: string): Promise<AzulInventoryResponse>;
13
- export default getInventory;
1
+ import steamID from 'steamid';
2
+ import { CookieJar } from 'tough-cookie';
3
+ import { Tag, ItemDescription, ItemDetails } from './CEconItem';
4
+ export interface AzulInventoryResponse {
5
+ success: boolean;
6
+ inventory: ItemDetails[];
7
+ count: number;
8
+ }
9
+ export declare const getTag: (tags: Tag[], category: string) => Tag | null;
10
+ export declare const getLargeImageURL: ({ icon_url_large, icon_url }: ItemDescription | ItemDetails) => string;
11
+ export declare const getImageURL: ({ icon_url }: ItemDescription | ItemDetails) => string;
12
+ export declare const isCardType: (tags: Tag[]) => undefined | false | 'Normal' | 'Foil';
13
+ declare function getInventory(SteamID64: string | steamID, appID: string | number, contextID: string | number, tradableOnly: boolean | undefined, SteamCommunity_Jar: CookieJar, Language: string, useProxy: boolean, proxyAddress: string): Promise<AzulInventoryResponse>;
14
+ export default getInventory;
14
15
  //# sourceMappingURL=getInventory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getInventory.d.ts","sourceRoot":"","sources":["../src/getInventory.ts"],"names":[],"mappings":"AAKA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAkB,EAChB,GAAG,EAAa,eAAe,EAAE,WAAW,EAC7C,MAAM,aAAa,CAAC;AA6BrB,MAAM,WAAW,qBAAqB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,eAAO,MAAM,MAAM,SAAU,GAAG,EAAE,YAAY,MAAM,KAAG,GAAG,GAAG,IAG5D,CAAC;AAGF,eAAO,MAAM,gBAAgB,iCAAkC,eAAe,GAAG,WAAW,KAAG,MAA8F,CAAC;AAE9L,eAAO,MAAM,WAAW,iBAAkB,eAAe,GAAG,WAAW,KAAG,MAA4E,CAAC;AAEvJ,eAAO,MAAM,UAAU,SAAU,GAAG,EAAE,KAAG,SAAS,GAAE,KAAK,GAAG,QAAQ,GAAG,MAatE,CAAC;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