-
Notifications
You must be signed in to change notification settings - Fork 19
/
csgo-cdn.d.ts
64 lines (54 loc) · 2.08 KB
/
csgo-cdn.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
declare module "csgo-cdn" {
import {EventEmitter} from 'events';
type StringToStringObject = {
[key:string]: string
}
type DeepStringToStringObject = {
[key:string]: string | DeepStringToStringObject
}
type ItemsEnglishObject = StringToStringObject & {
"inverted": {
[key:string]: Array<string>
}
}
export enum CsgoCdnLogLevel {
Error = 'error',
Warn = 'warn',
Info = 'info',
Verbose = 'verbose',
Debug = 'debug',
Silly = 'silly'
}
export enum CsgoCdnSkinPhases {
Ruby = 'am_ruby_marbleized',
Sapphire = 'am_sapphire_marbleized',
Blackpearl = 'am_blackpearl_marbleized',
Emerald = 'am_emerald_marbleized',
Phase1 = 'phase1',
Phase2 = 'phase2',
Phase3 = 'phase3',
Phase4 = 'phase4'
}
export interface CsgoCdnOptions {
directory: string, // relative data directory for VPK files
updateInterval: number, // seconds between update checks, -1 to disable auto-updates
logLevel: CsgoCdnLogLevel, // logging level, (error, warn, info, verbose, debug, silly)
stickers: boolean, // whether to obtain the vpk for stickers
graffiti: boolean, // whether to obtain the vpk for graffiti
characters: boolean, // whether to obtain the vpk for characters
musicKits: boolean, // whether to obtain the vpk for music kits
cases: boolean, // whether to obtain the vpk for cases
tools: boolean, // whether to obtain the vpk for tools
statusIcons: boolean, // whether to obtain the vpk for status icons
}
export default class CsgoCdn extends EventEmitter {
public itemsGame: DeepStringToStringObject;
public csgoEnglish: ItemsEnglishObject;
public itemsGameCDN: StringToStringObject;
constructor(steamUser: any, options?: Partial<CsgoCdnOptions>);
getItemNameURL(marketHashName: string, phase?: CsgoCdnSkinPhases): string | undefined | null;
getStickerURL(stickerName: string, large?: boolean): string | undefined | null;
getWeaponURL(defindex: number, paintindex: number): string | undefined | null;
on( event: 'ready', listener: () => void ): this;
}
}