@deafwave/osrs-botmaker-types 0.3.0 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/src/types/java/Java.d.ts +8 -0
  2. package/dist/src/types/java/JavaImporter.d.ts +6 -0
  3. package/dist/src/types/java/awt/BorderLayout.d.ts +16 -0
  4. package/dist/src/types/java/awt/Color.d.ts +2 -0
  5. package/dist/src/types/java/awt/Component.d.ts +5 -0
  6. package/dist/src/types/java/awt/Container.d.ts +12 -0
  7. package/dist/src/types/java/awt/FlowLayout.d.ts +16 -0
  8. package/dist/src/types/java/awt/Font.d.ts +24 -0
  9. package/dist/src/types/java/awt/GradientPaint.d.ts +5 -0
  10. package/dist/src/types/java/awt/Graphics2D.d.ts +3 -1
  11. package/dist/src/types/java/awt/GridBagConstraints.d.ts +56 -0
  12. package/dist/src/types/java/awt/GridBagLayout.d.ts +13 -0
  13. package/dist/src/types/java/awt/Insets.d.ts +28 -0
  14. package/dist/src/types/java/awt/Polygon.d.ts +14 -0
  15. package/dist/src/types/java/awt/Rectangle.d.ts +18 -0
  16. package/dist/src/types/java/awt/ToolKit.d.ts +15 -0
  17. package/dist/src/types/java/awt/datatransfer/Clipboard.d.ts +40 -0
  18. package/dist/src/types/java/awt/datatransfer/ClipboardOwner.d.ts +14 -0
  19. package/dist/src/types/java/awt/datatransfer/DataFlavor.d.ts +33 -0
  20. package/dist/src/types/java/awt/datatransfer/StringSelection.d.ts +34 -0
  21. package/dist/src/types/java/awt/datatransfer/Transferable.d.ts +24 -0
  22. package/dist/src/types/java/awt/event/ActionListener.d.ts +6 -0
  23. package/dist/src/types/java/awt/event/ChangeListener.d.ts +6 -0
  24. package/dist/src/types/java/awt/event/DocumentListener.d.ts +28 -0
  25. package/dist/src/types/java/awt/event/FocusListener.d.ts +15 -0
  26. package/dist/src/types/java/awt/event/ItemListener.d.ts +11 -0
  27. package/dist/src/types/java/awt/event/KeyAdapter.d.ts +9 -0
  28. package/dist/src/types/java/awt/event/KeyEvent.d.ts +72 -8
  29. package/dist/src/types/java/awt/event/KeyListener.d.ts +7 -0
  30. package/dist/src/types/java/awt/event/MouseAdapter.d.ts +11 -0
  31. package/dist/src/types/java/awt/event/MouseListener.d.ts +11 -0
  32. package/dist/src/types/java/awt/event/WindowListener.d.ts +25 -0
  33. package/dist/src/types/java/awt/geom/AffineTransform.d.ts +47 -0
  34. package/dist/src/types/java/index.d.ts +65 -0
  35. package/dist/src/types/java/lang/Object.d.ts +18 -0
  36. package/dist/src/types/java/swing/Border.d.ts +7 -0
  37. package/dist/src/types/java/swing/BorderFactory.d.ts +18 -0
  38. package/dist/src/types/java/swing/BoxLayout.d.ts +11 -0
  39. package/dist/src/types/java/swing/CustomPanel.d.ts +5 -0
  40. package/dist/src/types/java/swing/DefaultListModel.d.ts +15 -0
  41. package/dist/src/types/java/swing/DefaultTableModel.d.ts +17 -0
  42. package/dist/src/types/java/swing/Icon.d.ts +11 -0
  43. package/dist/src/types/java/swing/JButton.d.ts +36 -0
  44. package/dist/src/types/java/swing/JCheckBox.d.ts +17 -0
  45. package/dist/src/types/java/swing/JComboBox.d.ts +25 -0
  46. package/dist/src/types/java/swing/JComponent.d.ts +20 -0
  47. package/dist/src/types/java/swing/JFrame.d.ts +31 -0
  48. package/dist/src/types/java/swing/JLabel.d.ts +27 -0
  49. package/dist/src/types/java/swing/JList.d.ts +22 -0
  50. package/dist/src/types/java/swing/JMenu.d.ts +13 -0
  51. package/dist/src/types/java/swing/JMenuBar.d.ts +11 -0
  52. package/dist/src/types/java/swing/JMenuItem.d.ts +12 -0
  53. package/dist/src/types/java/swing/JPanel.d.ts +33 -0
  54. package/dist/src/types/java/swing/JProgressBar.d.ts +18 -0
  55. package/dist/src/types/java/swing/JScrollPane.d.ts +28 -0
  56. package/dist/src/types/java/swing/JSlider.d.ts +24 -0
  57. package/dist/src/types/java/swing/JSplitPane.d.ts +22 -0
  58. package/dist/src/types/java/swing/JTabbedPane.d.ts +16 -0
  59. package/dist/src/types/java/swing/JTable.d.ts +27 -0
  60. package/dist/src/types/java/swing/JTextArea.d.ts +29 -0
  61. package/dist/src/types/java/swing/JTextField.d.ts +24 -0
  62. package/dist/src/types/java/swing/JToggleButton.d.ts +8 -0
  63. package/dist/src/types/java/swing/JToolBar.d.ts +14 -0
  64. package/dist/src/types/java/swing/ListSelectionModel.d.ts +18 -0
  65. package/dist/src/types/java/swing/TableModel.d.ts +34 -0
  66. package/dist/src/types/java/swing/createToggleboxDropdownPanel.d.ts +10 -0
  67. package/dist/src/types/java/swing/event/ListSelectionEvent.d.ts +10 -0
  68. package/dist/src/types/java/swing/event/ListSelectionListener.d.ts +5 -0
  69. package/dist/src/types/java/swing/table/DefaultTableCellRenderer.d.ts +18 -0
  70. package/dist/src/types/java/swing/table/TableColumn.d.ts +5 -0
  71. package/dist/src/types/java/swing/table/TableColumnModel.d.ts +5 -0
  72. package/dist/src/types/java/util/index.d.ts +90 -53
  73. package/dist/src/types/runelite/net/runelite/api/AnimationID.d.ts +90 -22
  74. package/dist/src/types/runelite/net/runelite/api/EnumID.d.ts +21 -0
  75. package/dist/src/types/runelite/net/runelite/api/ItemID.d.ts +730 -22
  76. package/dist/src/types/runelite/net/runelite/api/KeyCode.d.ts +99 -6
  77. package/dist/src/types/runelite/net/runelite/api/NpcID.d.ts +1222 -45
  78. package/dist/src/types/runelite/net/runelite/api/ObjectID.d.ts +2500 -208
  79. package/dist/src/types/runelite/net/runelite/api/ParamID.d.ts +163 -0
  80. package/dist/src/types/runelite/net/runelite/api/ScriptID.d.ts +96 -7
  81. package/dist/src/types/runelite/net/runelite/api/SpriteID.d.ts +139 -9
  82. package/dist/src/types/runelite/net/runelite/api/coords/WorldPoint.d.ts +16 -72
  83. package/dist/src/types/runelite/net/runelite/api/widgets/ComponentID.d.ts +80 -1789
  84. package/dist/src/types/runelite/net/runelite/api/widgets/WidgetID.d.ts +155 -157
  85. package/dist/src/types/runelite/net/runelite/client/config/ConfigManager.d.ts +101 -112
  86. package/dist/src/types/sox/api/bot.d.ts +93 -4
  87. package/dist/src/types/sox/index.d.ts +45 -2
  88. package/package.json +53 -53
@@ -2,24 +2,46 @@
2
2
 
3
3
  declare const bot: SoxBotApi;
4
4
 
5
+ interface ExchangeRequest {
6
+ itemId: number;
7
+ quantity: number;
8
+ aborted: boolean;
9
+ complete: boolean;
10
+ aborting: boolean;
11
+ slot: number | null;
12
+ }
5
13
  interface SoxBotApi {
6
- events: net.runelite.client.eventbus.EventBus;
14
+ events: {
15
+ unregisterAll: () => void;
16
+ } & net.runelite.client.eventbus.EventBus;
7
17
  bank: {
8
18
  close: () => void;
19
+ consumeIds: (ids: number[]) => boolean;
20
+ consumeNames: (names: string[]) => boolean;
21
+ depositAll: () => void;
9
22
  depositAllWithId: (id: number) => void;
10
23
  depositAllWithName: (name: string) => void;
11
24
  depositWithId: (id: number) => void;
12
25
  depositWithName: (name: string) => void;
26
+ getNotedMode: () => boolean;
27
+ getQuantityOfAllIds: (itemIds: number[]) => number[];
28
+ getQuantityOfAllNames: (itemNames: string[]) => number[];
29
+ getQuantityOfId: (itemId: number) => number;
30
+ getQuantityOfName: (itemName: string) => number;
31
+ isBanking: () => boolean;
13
32
  isOpen: () => boolean;
33
+ open: () => void;
34
+ setNotedMode: (value: boolean) => void;
14
35
  withdrawAllWithId: (id: number) => void;
15
36
  withdrawAllWithName: (name: string) => void;
37
+ withdrawQuantityWithId: (id: number, quantity: number) => void;
16
38
  withdrawWithId: (id: number) => void;
17
39
  withdrawWithName: (name: string) => void;
18
40
  };
19
41
  bmCache: {
20
- getBoolean: (key: string) => boolean;
21
- getInt: (key: string) => number;
22
- getString: (key: string) => string;
42
+ getBoolean: (key: string, defaultValue: boolean) => boolean;
43
+ getInt: (key: string, defaultValue: number) => number;
44
+ getString: (key: string, defaultValue: string) => string;
23
45
  saveBoolean: (key: string, value: boolean) => void;
24
46
  saveInt: (key: string, value: number) => void;
25
47
  saveString: (key: string, value: string) => void;
@@ -31,10 +53,38 @@ interface SoxBotApi {
31
53
  getCounter: (name: string) => number;
32
54
  setCounter: (name: string, value: number) => void;
33
55
  };
56
+ equipment: {
57
+ containsAllIds: (ids: number[]) => boolean;
58
+ containsAllNames: (names: string[]) => boolean;
59
+ containsAnyIds: (ids: number[]) => boolean;
60
+ containsAnyNames: (names: string[]) => boolean;
61
+ containsId: (id: number) => boolean;
62
+ containsName: (name: string) => boolean;
63
+ getEquipment: () => any[];
64
+ };
65
+ /** WARNING: QUEUE DOES NOT CLEAR ON GE ADDTOBUY */
66
+ grandExchange: {
67
+ addBuyToQueue: (itemId: number, quantity: number, walkToAndOpenGE: boolean) => ExchangeRequest;
68
+ getExchangeQueueSize: () => number;
69
+ getFreeSlots: () => number;
70
+ isExchanging: () => boolean;
71
+ isOpen: () => boolean;
72
+ };
34
73
  graphicsObjects: {
35
74
  getWithIds: (ids: number[]) => net.runelite.api.GraphicsObject[];
36
75
  };
37
76
  inventory: {
77
+ containsAllIds: (ids: number[]) => boolean;
78
+ containsAllNames: (names: string[]) => boolean;
79
+ containsAnyIds: (ids: number[]) => boolean;
80
+ containsAnyNames: (names: string[]) => boolean;
81
+ containsId: (id: number) => boolean;
82
+ containsName: (name: string) => boolean;
83
+ getEmptySlots: () => number;
84
+ getQuantityOfAllIds: (itemIds: number[]) => number[];
85
+ getQuantityOfAllNames: (itemNames: string[]) => number[];
86
+ getQuantityOfId: (itemId: number) => number;
87
+ getQuantityOfName: (itemName: string) => number;
38
88
  interactWithIds: (itemIds: number[], options: string[]) => void;
39
89
  interactWithNames: (itemNames: string[], options: string[]) => void;
40
90
  itemOnItemWithIds: (itemId1: number, itemId2: number) => void;
@@ -43,6 +93,12 @@ interface SoxBotApi {
43
93
  itemOnPlayerWithIds: (itemId: number, player: net.runelite.api.Player) => void;
44
94
  itemOnPlayerWithNames: (itemNames: string[], playerNames: string[]) => void;
45
95
  };
96
+ notifier: {
97
+ sendMessage: (message: string) => void;
98
+ };
99
+ net: {
100
+ sendMessage: (targetIds: string[], message: string, includeSelf: boolean) => void;
101
+ };
46
102
  npcs: {
47
103
  getAnimationID: (npc: net.runelite.api.NPC) => number;
48
104
  getAttackSpeed: (npcId: number) => number;
@@ -53,12 +109,17 @@ interface SoxBotApi {
53
109
  interactSupplied: (target: net.runelite.api.NPC, action: string) => void;
54
110
  };
55
111
  objects: {
112
+ getClosest: (tileObjects: net.runelite.api.TileObject[]) => net.runelite.api.TileObject;
113
+ getClosestWithin: (tileObjects: net.runelite.api.TileObject[], maxDistance: number) => net.runelite.api.TileObject;
56
114
  getTileObjectComposition: (objectId: number) => net.runelite.api.ObjectComposition;
57
115
  getTileObjectsWithIds: (ids: number[]) => net.runelite.api.TileObject[];
58
116
  getTileObjectsWithNames: (names: string[]) => net.runelite.api.TileObject[];
117
+ getTileObjectsWithOptions: (options: string[]) => net.runelite.api.TileObject[];
59
118
  interactObject: (objectName: string, action: string) => void;
60
119
  interactObjects: (objectNames: string[], actions: string[]) => void;
61
120
  interactSuppliedObject: (target: net.runelite.api.TileObject, action: string) => void;
121
+ isNearIds: (ids: number[], distance: number) => boolean;
122
+ isNearNames: (names: string[], distance: number) => boolean;
62
123
  };
63
124
  players: {
64
125
  attackPlayer: (names: string[]) => void;
@@ -66,6 +127,21 @@ interface SoxBotApi {
66
127
  isNearPlayer: (radius: number, names: string[]) => boolean;
67
128
  tradePlayer: (names: string[]) => void;
68
129
  };
130
+ plugins: {
131
+ questHelper: {
132
+ getCurrentQuestName: () => string;
133
+ getNextItem: () => any[];
134
+ /** TODO: ItemOnItem type */
135
+ getNextItemOnItem: () => any;
136
+ getNextNpc: () => net.runelite.api.NPC;
137
+ getNextTileObject: () => net.runelite.api.TileObject;
138
+ getNextWidget: () => net.runelite.api.widgets.Widget;
139
+ getNextWorldPoint: () => net.runelite.api.coords.WorldPoint;
140
+ getOverlayText: () => string;
141
+ isQuestStarted: () => boolean;
142
+ performNextStep: () => boolean;
143
+ };
144
+ };
69
145
  prayer: {
70
146
  togglePrayer: (prayer: net.runelite.api.Prayer, bypassMouseClicks: boolean) => void;
71
147
  };
@@ -109,9 +185,22 @@ interface SoxBotApi {
109
185
  ) => void;
110
186
  interactWidgetText: (text: string) => void;
111
187
  };
188
+
189
+ menuAction(
190
+ p0: number,
191
+ p1: number,
192
+ action: MenuAction,
193
+ identifier: number,
194
+ itemId: number,
195
+ option: string,
196
+ target: string,
197
+ bounds?: Rectangle,
198
+ ): void;
199
+
112
200
  clearGameChat: () => void;
113
201
  localPlayerIdle: () => boolean;
114
202
  localPlayerMoving: () => boolean;
115
203
  printGameMessage: (message: string) => void;
116
204
  runClientScript: (ints: number[]) => void;
205
+ terminate: () => void;
117
206
  }
@@ -3,6 +3,49 @@
3
3
  /// <reference path="./api/client.d.ts" />
4
4
 
5
5
  declare const configManager: {
6
- getConfiguration: (groupName: string, key: string) => string | null;
7
- setConfiguration: (groupName: string, key: string, value: string) => void;
6
+ // getConfiguration overloads
7
+ getConfiguration: {
8
+ (groupName: string, key: string): string | null;
9
+ (groupName: string, key: string, clazz: Type): object;
10
+ (groupName: string, profile: string, key: string, type: Type): object;
11
+ };
12
+
13
+ // setConfiguration overloads
14
+ setConfiguration: {
15
+ (groupName: string, key: string, value: object | boolean | string): void;
16
+ (groupName: string, profile: string, key: string, value: object | string | boolean): void;
17
+ };
18
+
19
+ // RS profile-specific get/set
20
+ getRSProfileConfiguration: {
21
+ (groupName: string, key: string): string | null;
22
+ (groupName: string, key: string, clazz: Type): object;
23
+ };
24
+ setRSProfileConfiguration: (groupName: string, key: string, value: object) => void;
25
+
26
+ // Other methods
27
+ getConfig: (clazz: Class) => object;
28
+ getConfigDescriptor: (configurationProxy: Config) => ConfigDescriptor;
29
+ getConfigurationKeys: (prefix: string) => List;
30
+ getProfile: () => ConfigProfile;
31
+ getRSProfileKey: () => string;
32
+ getRSProfileConfigurationKeys: (group: string, profile: string, keyPrefix: string) => List;
33
+ getRSProfiles: () => List;
34
+ getWholeKey: (groupName: string, profile: string, key: string) => string;
35
+ importAndMigrate: (lock: ProfileManager.Lock, from: File, targetProfile: ConfigProfile) => void;
36
+ isLoading: () => void;
37
+ onSessionClose: (sessionClose: SessionClose) => void;
38
+ onSessionOpen: (sessionOpen: SessionOpen) => void;
39
+ renameProfile: (profile: ConfigProfile, name: string) => void;
40
+ sendConfig: () => void;
41
+ setDefaultConfiguration: (proxy: Config, override: boolean) => void;
42
+ switchProfile: (profile: ConfigProfile) => void;
43
+ toggleSync: (profile: ConfigProfile, sync: boolean) => void;
44
+
45
+ // unsetConfiguration overloads
46
+ unsetConfiguration: {
47
+ (groupName: string, key: string): void;
48
+ (groupName: string, profile: string, key: string): void;
49
+ };
50
+ unsetRSProfileConfiguration: (groupName: string, key: string) => void;
8
51
  };
package/package.json CHANGED
@@ -1,54 +1,54 @@
1
1
  {
2
- "name": "@deafwave/osrs-botmaker-types",
3
- "version": "0.3.0",
4
- "author": {
5
- "name": "Chandler Ferry",
6
- "url": "https://github.com/ChandlerFerry"
7
- },
8
- "description": "Typescript Types for Sox's Botmaker",
9
- "license": "Apache-2.0",
10
- "type": "module",
11
- "contributors": [],
12
- "publishConfig": {
13
- "access": "public",
14
- "registry": "https://registry.npmjs.org"
15
- },
16
- "exports": {
17
- "types": "./dist/src/index.d.ts",
18
- "default": "./dist/src/exports/index.js"
19
- },
20
- "main": "./dist/src/exports/index.js",
21
- "types": "./dist/src/index.d.ts",
22
- "scripts": {
23
- "lint": "eslint . --quiet",
24
- "build": "tsc && cpy src/index.d.ts dist && cpy src/types dist",
25
- "prepublish": "tsc && cpy src/index.d.ts dist && cpy src/types dist"
26
- },
27
- "files": [
28
- "dist"
29
- ],
30
- "devDependencies": {
31
- "@eslint/eslintrc": "^2.1.1",
32
- "@eslint/js": "~8.48.0",
33
- "@tsconfig/node20": "^20.1.2",
34
- "@tsconfig/strictest": "^2.0.3",
35
- "@types/eslint": "^8.56.5",
36
- "@types/eslint__js": "^8.42.3",
37
- "@types/fs-extra": "^11.0.4",
38
- "@typescript-eslint/eslint-plugin": "^7.1.1",
39
- "@typescript-eslint/parser": "^7.1.1",
40
- "cpy-cli": "^5.0.0",
41
- "eslint": "^8.57.0",
42
- "eslint-config-prettier": "^9.1.0",
43
- "eslint-import-resolver-typescript": "^3.6.1",
44
- "eslint-plugin-import": "^2.29.1",
45
- "eslint-plugin-jest": "^27.9.0",
46
- "eslint-plugin-unicorn": "^51.0.1",
47
- "jsonc-eslint-parser": "^2.4.0",
48
- "prettier": "^3.2.5",
49
- "prettier-eslint": "^16.3.0",
50
- "tsx": "^4.7.1",
51
- "typescript": "5.2.2",
52
- "typescript-eslint": "^7.1.1"
53
- }
54
- }
2
+ "name": "@deafwave/osrs-botmaker-types",
3
+ "version": "0.3.8",
4
+ "author": {
5
+ "name": "Chandler Ferry",
6
+ "url": "https://github.com/ChandlerFerry"
7
+ },
8
+ "description": "Typescript Types for Sox's Botmaker",
9
+ "license": "Apache-2.0",
10
+ "type": "module",
11
+ "contributors": [],
12
+ "publishConfig": {
13
+ "access": "public",
14
+ "registry": "https://registry.npmjs.org"
15
+ },
16
+ "exports": {
17
+ "types": "./dist/src/index.d.ts",
18
+ "default": "./dist/src/exports/index.js"
19
+ },
20
+ "main": "./dist/src/exports/index.js",
21
+ "types": "./dist/src/index.d.ts",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "devDependencies": {
26
+ "@eslint/eslintrc": "^2.1.1",
27
+ "@eslint/js": "~8.48.0",
28
+ "@tsconfig/node20": "^20.1.2",
29
+ "@tsconfig/strictest": "^2.0.3",
30
+ "@types/eslint": "^8.56.5",
31
+ "@types/eslint__js": "^8.42.3",
32
+ "@types/fs-extra": "^11.0.4",
33
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
34
+ "@typescript-eslint/parser": "^7.1.1",
35
+ "cpy-cli": "^5.0.0",
36
+ "eslint": "^8.57.0",
37
+ "eslint-config-prettier": "^9.1.0",
38
+ "eslint-import-resolver-typescript": "^3.6.1",
39
+ "eslint-plugin-import": "^2.29.1",
40
+ "eslint-plugin-jest": "^27.9.0",
41
+ "eslint-plugin-unicorn": "^51.0.1",
42
+ "jsonc-eslint-parser": "^2.4.0",
43
+ "prettier": "^3.2.5",
44
+ "prettier-eslint": "^16.3.0",
45
+ "tsx": "^4.7.1",
46
+ "typescript": "5.2.2",
47
+ "typescript-eslint": "^7.1.1"
48
+ },
49
+ "scripts": {
50
+ "lint": "eslint . --quiet",
51
+ "build": "tsc && cpy src/index.d.ts dist && cpy src/types dist",
52
+ "prepublish": "tsc && cpy src/index.d.ts dist && cpy src/types dist"
53
+ }
54
+ }