@deafwave/osrs-botmaker-types 0.3.1 → 0.4.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.
Files changed (117) 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/attackStyle.d.ts +12 -0
  87. package/dist/src/types/sox/api/bot/bank.d.ts +144 -0
  88. package/dist/src/types/sox/api/bot/bmCache.d.ts +54 -0
  89. package/dist/src/types/sox/api/bot/bmGlobalCache.d.ts +54 -0
  90. package/dist/src/types/sox/api/bot/breakHandler.d.ts +15 -0
  91. package/dist/src/types/sox/api/bot/counters.d.ts +23 -0
  92. package/dist/src/types/sox/api/bot/equipment.d.ts +62 -0
  93. package/dist/src/types/sox/api/bot/events.d.ts +37 -0
  94. package/dist/src/types/sox/api/bot/grandExchange.d.ts +67 -0
  95. package/dist/src/types/sox/api/bot/graphicsObjects.d.ts +16 -0
  96. package/dist/src/types/sox/api/bot/index.d.ts +128 -0
  97. package/dist/src/types/sox/api/bot/inventory.d.ts +153 -0
  98. package/dist/src/types/sox/api/bot/magic.d.ts +122 -0
  99. package/dist/src/types/sox/api/bot/net.d.ts +24 -0
  100. package/dist/src/types/sox/api/bot/notifier.d.ts +16 -0
  101. package/dist/src/types/sox/api/bot/npcs.d.ts +89 -0
  102. package/dist/src/types/sox/api/bot/objects.d.ts +89 -0
  103. package/dist/src/types/sox/api/bot/players.d.ts +35 -0
  104. package/dist/src/types/sox/api/bot/plugins.d.ts +81 -0
  105. package/dist/src/types/sox/api/bot/prayer.d.ts +16 -0
  106. package/dist/src/types/sox/api/bot/projectiles.d.ts +16 -0
  107. package/dist/src/types/sox/api/bot/task.d.ts +30 -0
  108. package/dist/src/types/sox/api/bot/tileItems.d.ts +65 -0
  109. package/dist/src/types/sox/api/bot/variables.d.ts +51 -0
  110. package/dist/src/types/sox/api/bot/walking.d.ts +65 -0
  111. package/dist/src/types/sox/api/bot/widgets.d.ts +32 -0
  112. package/dist/src/types/sox/api/bot.d.ts +2 -115
  113. package/dist/src/types/sox/api/client.d.ts +1 -1
  114. package/dist/src/types/sox/api/clientThread.d.ts +24 -0
  115. package/dist/src/types/sox/api/configManager.d.ts +239 -0
  116. package/dist/src/types/sox/index.d.ts +2 -5
  117. package/package.json +53 -53
@@ -0,0 +1,65 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+ /// <reference path="./types.d.ts" />
3
+
4
+ declare namespace bot {
5
+
6
+ interface TileItemInfo {
7
+ id: number;
8
+ name: string;
9
+ quantity: number;
10
+ location: net.runelite.api.coords.WorldPoint;
11
+ }
12
+ /**
13
+ * Interface for interacting with items on the ground (tile items)
14
+ * Provides methods to find and loot items from the ground
15
+ */
16
+ interface tileItems {
17
+ /**
18
+ * Gets all items on the ground with a value equal to or greater than the specified value
19
+ * @param value The minimum value of items to find
20
+ * @returns Array of TileItemInfo objects for items meeting the value criteria
21
+ */
22
+ getItemsOfValue: (value: number) => TileItemInfo[];
23
+
24
+ /**
25
+ * Gets all items on the ground that match the specified IDs
26
+ * @param ids Array of item IDs to match
27
+ * @returns Array of TileItemInfo objects for matching items
28
+ */
29
+ getItemsWithIds: (ids: number[]) => TileItemInfo[];
30
+
31
+ /**
32
+ * Gets all items on the ground that match the specified names
33
+ * @param names Array of item names to match
34
+ * @returns Array of TileItemInfo objects for matching items
35
+ */
36
+ getItemsWithNames: (names: string[]) => TileItemInfo[];
37
+
38
+ /**
39
+ * Loots a specific item from the ground
40
+ * @param tileItemInfo The TileItemInfo object representing the item to loot
41
+ */
42
+ lootItem: (tileItemInfo: TileItemInfo) => void;
43
+
44
+ /**
45
+ * Loots all items of the specified minimum value within the maximum distance
46
+ * @param value The minimum value of items to loot
47
+ * @param maxDistance The maximum distance to loot items from
48
+ */
49
+ lootItemsOfValue: (value: number, maxDistance: number) => void;
50
+
51
+ /**
52
+ * Loots all items with the specified IDs within the maximum distance
53
+ * @param lootIds Array of item IDs to loot
54
+ * @param maxDistance The maximum distance to loot items from
55
+ */
56
+ lootItemsWithIds: (lootIds: number[], maxDistance: number) => void;
57
+
58
+ /**
59
+ * Loots all items with the specified names within the maximum distance
60
+ * @param lootNames Array of item names to loot
61
+ * @param maxDistance The maximum distance to loot items from
62
+ */
63
+ lootItemsWithNames: (lootNames: string[], maxDistance: number) => void;
64
+ }
65
+ }
@@ -0,0 +1,51 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for managing script variables
6
+ * Provides methods to get and set various types of variables for script state management
7
+ */
8
+ interface variables {
9
+ /**
10
+ * Gets a boolean variable by name
11
+ * @param variableName The name of the variable to retrieve
12
+ * @returns The boolean value of the variable
13
+ */
14
+ getBooleanVariable: (variableName: string) => boolean;
15
+
16
+ /**
17
+ * Gets an array of integers variable by name
18
+ * @param variableName The name of the variable to retrieve
19
+ * @returns The array of integers value of the variable
20
+ */
21
+ getIntArrayVariable: (variableName: string) => number[];
22
+
23
+ /**
24
+ * Gets an integer variable by name
25
+ * @param variableName The name of the variable to retrieve
26
+ * @returns The integer value of the variable
27
+ */
28
+ getIntVariable: (variableName: string) => number;
29
+
30
+ /**
31
+ * Gets an array of strings variable by name
32
+ * @param variableName The name of the variable to retrieve
33
+ * @returns The array of strings value of the variable
34
+ */
35
+ getStringArrayVariable: (variableName: string) => string[];
36
+
37
+ /**
38
+ * Gets a string variable by name
39
+ * @param variableName The name of the variable to retrieve
40
+ * @returns The string value of the variable
41
+ */
42
+ getStringVariable: (variableName: string) => string;
43
+
44
+ /**
45
+ * Sets a variable of any type by name
46
+ * @param variableName The name of the variable to set
47
+ * @param value The value to set the variable to
48
+ */
49
+ setVariable: (variableName: string, value: any) => void;
50
+ }
51
+ }
@@ -0,0 +1,65 @@
1
+ /// <reference path="../../../runelite/index.d.ts" />
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for player movement and navigation
6
+ * Provides methods to control walking, running, and pathing in the game
7
+ */
8
+ interface walking {
9
+ /**
10
+ * Gets the calculated path for the current web walking operation
11
+ * @returns Array of WorldPoint objects representing the calculated path
12
+ */
13
+ getWebWalkCalculatedPath: () => net.runelite.api.coords.WorldPoint[];
14
+
15
+ /**
16
+ * Checks if the player is currently using the RLPL web walking system
17
+ * @returns True if the player is using RLPL web walking, false otherwise
18
+ */
19
+ isRlplWebWalking: () => boolean;
20
+
21
+ /**
22
+ * Checks if the player is currently running
23
+ * @returns True if the player is running, false otherwise
24
+ */
25
+ isRunning: () => boolean;
26
+
27
+ /**
28
+ * Checks if the player is currently web walking
29
+ * @returns True if the player is web walking, false otherwise
30
+ */
31
+ isWebWalking: () => boolean;
32
+
33
+ /**
34
+ * Toggles run mode on or off
35
+ */
36
+ toggleRun: () => void;
37
+
38
+ /**
39
+ * Walks to a true world point using coordinates
40
+ * @param x The x-coordinate of the destination
41
+ * @param y The y-coordinate of the destination
42
+ * @description Use if you're using a World point provided by the Bot Makers World Point true tile debug
43
+ */
44
+ walkToTrueWorldPoint: (x: number, y: number) => void;
45
+
46
+ /**
47
+ * Walks to a world point using coordinates
48
+ * @param x The x-coordinate of the destination
49
+ * @param y The y-coordinate of the destination
50
+ * @description Use if you're walking to a world point that's already provided by the RL API such as localPlayer.getWorldLocation
51
+ */
52
+ walkToWorldPoint: (x: number, y: number) => void;
53
+
54
+ /**
55
+ * Cancels the current web walking operation
56
+ */
57
+ webWalkCancel: () => void;
58
+
59
+ /**
60
+ * Starts web walking to a specific world point
61
+ * @param worldPoint The WorldPoint destination to walk to
62
+ */
63
+ webWalkStart: (worldPoint: net.runelite.api.coords.WorldPoint) => void;
64
+ }
65
+ }
@@ -0,0 +1,32 @@
1
+
2
+
3
+ declare namespace bot {
4
+ /**
5
+ * Interface for interacting with UI widgets
6
+ * Provides methods to interact with game interface elements
7
+ */
8
+ interface widgets {
9
+ /**
10
+ * Handles dialogue interactions
11
+ */
12
+ handleDialogue: (dialogues: []) => boolean;
13
+
14
+ /**
15
+ * Interacts with a specified widget using its ID and parameters
16
+ * @param packedWidgetId The packed ID of the widget to interact with
17
+ * @param identifier The identifier for the interaction
18
+ * @param opcode The operation code for the interaction
19
+ * @param p0 The first parameter for the interaction
20
+ * @param p1 The second parameter for the interaction (optional)
21
+ */
22
+ interactSpecifiedWidget: {
23
+ (packedWidgetId: number, identifier: number, opcode: number, p0: number): void;
24
+ (packedWidgetId: number, identifier: number, opcode: number, p0: number, p1: number): void;
25
+ };
26
+ /**
27
+ * Interacts with a widget by matching its text content
28
+ * @param text The text to search for in widgets
29
+ */
30
+ interactWidgetText: (text: string) => void;
31
+ }
32
+ }
@@ -1,117 +1,4 @@
1
1
  /// <reference path="../runelite/index.d.ts" />
2
+ /// <reference path="./bot/index.d.ts" />
2
3
 
3
- declare const bot: SoxBotApi;
4
-
5
- interface SoxBotApi {
6
- events: net.runelite.client.eventbus.EventBus;
7
- bank: {
8
- close: () => void;
9
- depositAllWithId: (id: number) => void;
10
- depositAllWithName: (name: string) => void;
11
- depositWithId: (id: number) => void;
12
- depositWithName: (name: string) => void;
13
- isOpen: () => boolean;
14
- withdrawAllWithId: (id: number) => void;
15
- withdrawAllWithName: (name: string) => void;
16
- withdrawWithId: (id: number) => void;
17
- withdrawWithName: (name: string) => void;
18
- };
19
- bmCache: {
20
- getBoolean: (key: string) => boolean;
21
- getInt: (key: string) => number;
22
- getString: (key: string) => string;
23
- saveBoolean: (key: string, value: boolean) => void;
24
- saveInt: (key: string, value: number) => void;
25
- saveString: (key: string, value: string) => void;
26
- };
27
- breakHandler: {
28
- setBreakHandlerStatus(status: boolean): void;
29
- };
30
- counters: {
31
- getCounter: (name: string) => number;
32
- setCounter: (name: string, value: number) => void;
33
- };
34
- graphicsObjects: {
35
- getWithIds: (ids: number[]) => net.runelite.api.GraphicsObject[];
36
- };
37
- inventory: {
38
- interactWithIds: (itemIds: number[], options: string[]) => void;
39
- interactWithNames: (itemNames: string[], options: string[]) => void;
40
- itemOnItemWithIds: (itemId1: number, itemId2: number) => void;
41
- itemOnNpcWithIds: (itemId: number, npc: net.runelite.api.NPC) => void;
42
- itemOnObjectWithIds: (itemId: number, tileObject: net.runelite.api.TileObject) => void;
43
- itemOnPlayerWithIds: (itemId: number, player: net.runelite.api.Player) => void;
44
- itemOnPlayerWithNames: (itemNames: string[], playerNames: string[]) => void;
45
- };
46
- npcs: {
47
- getAnimationID: (npc: net.runelite.api.NPC) => number;
48
- getAttackSpeed: (npcId: number) => number;
49
- getHeadIcon: (npc: net.runelite.api.NPC) => net.runelite.api.HeadIcon;
50
- getWithIds: (ids: number[]) => net.runelite.api.NPC[];
51
- getWithNames: (names: string[]) => net.runelite.api.NPC[];
52
- interact: (npcName: string, action: string) => void;
53
- interactSupplied: (target: net.runelite.api.NPC, action: string) => void;
54
- };
55
- objects: {
56
- getTileObjectComposition: (objectId: number) => net.runelite.api.ObjectComposition;
57
- getTileObjectsWithIds: (ids: number[]) => net.runelite.api.TileObject[];
58
- getTileObjectsWithNames: (names: string[]) => net.runelite.api.TileObject[];
59
- interactObject: (objectName: string, action: string) => void;
60
- interactObjects: (objectNames: string[], actions: string[]) => void;
61
- interactSuppliedObject: (target: net.runelite.api.TileObject, action: string) => void;
62
- };
63
- players: {
64
- attackPlayer: (names: string[]) => void;
65
- followPlayer: (names: string[]) => void;
66
- isNearPlayer: (radius: number, names: string[]) => boolean;
67
- tradePlayer: (names: string[]) => void;
68
- };
69
- prayer: {
70
- togglePrayer: (prayer: net.runelite.api.Prayer, bypassMouseClicks: boolean) => void;
71
- };
72
- projectiles: {
73
- getProjectilesWithIds: (ids: number[]) => net.runelite.api.Projectile[];
74
- };
75
- tileItems: {
76
- getItemsOfValue: (value: number) => TileItemInfo[];
77
- getItemsWithIds: (ids: number[]) => TileItemInfo[];
78
- getItemsWithNames: (names: string[]) => TileItemInfo[];
79
- lootItem: (tileItemInfo: TileItemInfo) => void;
80
- lootItemsOfValue: (value: number, maxDistance: number) => void;
81
- lootItemsWithIds: (lootIds: number[], maxDistance: number) => void;
82
- lootItemsWithNames: (lootNames: string[], maxDistance: number) => void;
83
- };
84
- variables: {
85
- getBooleanVariable: (variableName: string) => boolean;
86
- getIntArrayVariable: (variableName: string) => number[];
87
- getIntVariable: (variableName: string) => number;
88
- getStringArrayVariable: (variableName: string) => string[];
89
- getStringVariable: (variableName: string) => string;
90
- setVariable: (variableName: string, value: any) => void;
91
- };
92
- walking: {
93
- isWebWalking: () => boolean;
94
- /** Use if you're using a World point provided by the Bot Makers World Point true tile debug */
95
- walkToTrueWorldPoint: (x: number, y: number) => void;
96
- /** Use if you're walking to a world point thats already provided by the RL API such as localPlayer.getWorldLocation */
97
- walkToWorldPoint: (x: number, y: number) => void;
98
- webWalkCancel: () => void;
99
- webWalkStart: (worldPoint: net.runelite.api.coords.WorldPoint) => void;
100
- };
101
- widgets: {
102
- interactSpecifiedWidget: (packedWidgetId: number, identifier: number, opcode: number, param0: number) => void;
103
- interactSpecifiedWidget: (
104
- packedWidgetId: number,
105
- identifier: number,
106
- opcode: number,
107
- param0: number,
108
- param1: number,
109
- ) => void;
110
- interactWidgetText: (text: string) => void;
111
- };
112
- clearGameChat: () => void;
113
- localPlayerIdle: () => boolean;
114
- localPlayerMoving: () => boolean;
115
- printGameMessage: (message: string) => void;
116
- runClientScript: (ints: number[]) => void;
117
- }
4
+ declare const bot: bot.SoxBotApi;
@@ -1,3 +1,3 @@
1
1
  /// <reference path="../../runelite/index.d.ts" />
2
2
  import client = net.runelite.api.Client;
3
- declare const client: net.runelite.api.Client;
3
+ declare const client: net.runelite.api.Client;
@@ -0,0 +1,24 @@
1
+ /// <reference path="../runelite/index.d.ts" />
2
+
3
+ /**
4
+ * Provides methods to schedule and invoke functions on the client thread.
5
+ */
6
+ declare const clientThread: {
7
+ /**
8
+ * Schedules the given BooleanSupplier to be invoked on the client thread.
9
+ * @param r - A Java BooleanSupplier to be executed.
10
+ */
11
+ invoke: (r: java.util.function.BooleanSupplier) => void;
12
+
13
+ /**
14
+ * Schedules the given Runnable to be invoked at the end of the current tick on the client thread.
15
+ * @param r - A Java Runnable to be executed.
16
+ */
17
+ invokeAtTickEnd: (r: java.lang.Runnable) => void;
18
+
19
+ /**
20
+ * Schedules the given BooleanSupplier to be invoked later on the client thread.
21
+ * @param r - A Java BooleanSupplier to be executed.
22
+ */
23
+ invokeLater: (r: java.util.function.BooleanSupplier) => void;
24
+ };
@@ -0,0 +1,239 @@
1
+ /// <reference path="../runelite/index.d.ts" />
2
+
3
+
4
+
5
+ /**
6
+ * The configManager provides methods to get, set, and manage configuration values and profiles.
7
+ */
8
+ declare const configManager: {
9
+
10
+ /**
11
+ * Constants for RuneScape profiles
12
+ */
13
+ RSPROFILE_DISPLAY_NAME: string;
14
+ RSPROFILE_GROUP: string;
15
+ RSPROFILE_TYPE: string;
16
+
17
+ /**
18
+ * Retrieves a configuration value as a string or object.
19
+ * @param groupName - The configuration group name.
20
+ * @param key - The configuration key.
21
+ * @returns The configuration value as a string or null.
22
+ * @overload
23
+ */
24
+ getConfiguration: {
25
+ /**
26
+ * Retrieves a configuration value as an object of the specified type.
27
+ * @param groupName - The configuration group name.
28
+ * @param key - The configuration key.
29
+ * @returns The configuration value as an object.
30
+ */
31
+ (groupName: string, key: string): string | null;
32
+ /**
33
+ * Retrieves a configuration value as an object of the specified type.
34
+ * @param groupName - The configuration group name.
35
+ * @param key - The configuration key.
36
+ * @param clazz - The class type to deserialize the value into.
37
+ * @returns The configuration value as an object.
38
+ * @overload
39
+ */
40
+ (groupName: string, key: string, clazz: Type): object;
41
+ /**
42
+ * Retrieves a configuration value for a specific profile as an object of the specified type.
43
+ * @param groupName - The configuration group name.
44
+ * @param profile - The profile name.
45
+ * @param key - The configuration key.
46
+ * @param type - The class type to deserialize the value into.
47
+ * @returns The configuration value as an object.
48
+ * @overload
49
+ */
50
+ (groupName: string, profile: string, key: string, type: Type): object;
51
+ };
52
+
53
+ /**
54
+ * Sets a configuration value.
55
+ * @param groupName - The configuration group name.
56
+ * @param key - The configuration key.
57
+ * @param value - The value to set.
58
+ * @overload
59
+ */
60
+ setConfiguration: {
61
+ (groupName: string, key: string, value: object | boolean | string): void;
62
+ /**
63
+ * Sets a configuration value for a specific profile.
64
+ * @param groupName - The configuration group name.
65
+ * @param profile - The profile name.
66
+ * @param key - The configuration key.
67
+ * @param value - The value to set.
68
+ * @overload
69
+ */
70
+ (groupName: string, profile: string, key: string, value: object | string | boolean): void;
71
+ };
72
+
73
+ /**
74
+ * Retrieves a RuneScape profile-specific configuration value as a string or object.
75
+ * @param groupName - The configuration group name.
76
+ * @param key - The configuration key.
77
+ * @returns The configuration value as a string or null.
78
+ * @overload
79
+ */
80
+ getRSProfileConfiguration: {
81
+ (groupName: string, key: string): string | null;
82
+ /**
83
+ * Retrieves a RuneScape profile-specific configuration value as an object of the specified type.
84
+ * @param groupName - The configuration group name.
85
+ * @param key - The configuration key.
86
+ * @param clazz - The class type to deserialize the value into.
87
+ * @returns The configuration value as an object.
88
+ * @overload
89
+ */
90
+ (groupName: string, key: string, clazz: Type): object;
91
+ };
92
+
93
+ /**
94
+ * Sets a RuneScape profile-specific configuration value.
95
+ * @param groupName - The configuration group name.
96
+ * @param key - The configuration key.
97
+ * @param value - The value to set.
98
+ */
99
+ setRSProfileConfiguration: (groupName: string, key: string, value: object) => void;
100
+
101
+ /**
102
+ * Retrieves the configuration for the specified class.
103
+ * @param clazz - The class to retrieve configuration for.
104
+ * @returns The configuration object.
105
+ */
106
+ getConfig: (clazz: Class) => object;
107
+
108
+ /**
109
+ * Retrieves the configuration descriptor for the given configuration proxy.
110
+ * @param configurationProxy - The configuration proxy object.
111
+ * @returns The configuration descriptor.
112
+ */
113
+ getConfigDescriptor: (configurationProxy: Config) => ConfigDescriptor;
114
+
115
+ /**
116
+ * Retrieves a list of configuration keys with the specified prefix.
117
+ * @param prefix - The prefix to filter configuration keys.
118
+ * @returns A list of configuration keys.
119
+ */
120
+ getConfigurationKeys: (prefix: string) => List;
121
+
122
+ /**
123
+ * Retrieves the current configuration profile.
124
+ * @returns The current configuration profile.
125
+ */
126
+ getProfile: () => ConfigProfile;
127
+
128
+ /**
129
+ * Retrieves the RuneScape profile key.
130
+ * @returns The RuneScape profile key as a string.
131
+ */
132
+ getRSProfileKey: () => string;
133
+
134
+ /**
135
+ * Retrieves a list of RuneScape profile configuration keys for the specified group, profile, and key prefix.
136
+ * @param group - The configuration group name.
137
+ * @param profile - The profile name.
138
+ * @param keyPrefix - The key prefix to filter configuration keys.
139
+ * @returns A list of configuration keys.
140
+ */
141
+ getRSProfileConfigurationKeys: (group: string, profile: string, keyPrefix: string) => List;
142
+
143
+ /**
144
+ * Retrieves a list of all RuneScape profiles.
145
+ * @returns A list of RuneScape profiles.
146
+ */
147
+ getRSProfiles: () => List;
148
+
149
+ /**
150
+ * Constructs the full configuration key for the specified group, profile, and key.
151
+ * @param groupName - The configuration group name.
152
+ * @param profile - The profile name.
153
+ * @param key - The configuration key.
154
+ * @returns The full configuration key as a string.
155
+ */
156
+ getWholeKey: (groupName: string, profile: string, key: string) => string;
157
+
158
+ /**
159
+ * Imports and migrates configuration from a file to the target profile.
160
+ * @param lock - The profile manager lock.
161
+ * @param from - The source file to import from.
162
+ * @param targetProfile - The target configuration profile.
163
+ */
164
+ importAndMigrate: (lock: ProfileManager.Lock, from: File, targetProfile: ConfigProfile) => void;
165
+
166
+ /**
167
+ * Indicates whether the configuration manager is currently loading.
168
+ */
169
+ isLoading: () => void;
170
+
171
+ /**
172
+ * Registers a callback to be invoked when a session is closed.
173
+ * @param sessionClose - The session close event handler.
174
+ */
175
+ onSessionClose: (sessionClose: SessionClose) => void;
176
+
177
+ /**
178
+ * Registers a callback to be invoked when a session is opened.
179
+ * @param sessionOpen - The session open event handler.
180
+ */
181
+ onSessionOpen: (sessionOpen: SessionOpen) => void;
182
+
183
+ /**
184
+ * Renames the specified configuration profile.
185
+ * @param profile - The configuration profile to rename.
186
+ * @param name - The new name for the profile.
187
+ */
188
+ renameProfile: (profile: ConfigProfile, name: string) => void;
189
+
190
+ /**
191
+ * Sends the current configuration to the server or other destination.
192
+ */
193
+ sendConfig: () => void;
194
+
195
+ /**
196
+ * Sets the default configuration for the specified proxy.
197
+ * @param proxy - The configuration proxy object.
198
+ * @param override - Whether to override existing values.
199
+ */
200
+ setDefaultConfiguration: (proxy: Config, override: boolean) => void;
201
+
202
+ /**
203
+ * Switches to the specified configuration profile.
204
+ * @param profile - The configuration profile to switch to.
205
+ */
206
+ switchProfile: (profile: ConfigProfile) => void;
207
+
208
+ /**
209
+ * Toggles synchronization for the specified profile.
210
+ * @param profile - The configuration profile.
211
+ * @param sync - Whether to enable or disable synchronization.
212
+ */
213
+ toggleSync: (profile: ConfigProfile, sync: boolean) => void;
214
+
215
+ /**
216
+ * Unsets a configuration value.
217
+ * @param groupName - The configuration group name.
218
+ * @param key - The configuration key.
219
+ * @overload
220
+ */
221
+ unsetConfiguration: {
222
+ (groupName: string, key: string): void;
223
+ /**
224
+ * Unsets a configuration value for a specific profile.
225
+ * @param groupName - The configuration group name.
226
+ * @param profile - The profile name.
227
+ * @param key - The configuration key.
228
+ * @overload
229
+ */
230
+ (groupName: string, profile: string, key: string): void;
231
+ };
232
+
233
+ /**
234
+ * Unsets a RuneScape profile-specific configuration value.
235
+ * @param groupName - The configuration group name.
236
+ * @param key - The configuration key.
237
+ */
238
+ unsetRSProfileConfiguration: (groupName: string, key: string) => void;
239
+ };
@@ -1,8 +1,5 @@
1
1
  /// <reference path="./api/api.d.ts" />
2
2
  /// <reference path="./api/bot.d.ts" />
3
3
  /// <reference path="./api/client.d.ts" />
4
-
5
- declare const configManager: {
6
- getConfiguration: (groupName: string, key: string) => string | null;
7
- setConfiguration: (groupName: string, key: string, value: string) => void;
8
- };
4
+ /// <reference path="./api/clientThread.d.ts" />
5
+ /// <reference path="./api/configManager.d.ts" />