@casual-simulation/aux-common 3.2.6 → 3.2.7-alpha.6227012901

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 (212) hide show
  1. package/Errors.d.ts +29 -0
  2. package/Errors.js +2 -0
  3. package/Errors.js.map +1 -0
  4. package/{aux-format-2 → bots}/AuxStateHelpers.d.ts +2 -33
  5. package/{aux-format-2 → bots}/AuxStateHelpers.js +1 -116
  6. package/bots/AuxStateHelpers.js.map +1 -0
  7. package/bots/Bot.d.ts +1 -1
  8. package/bots/BotCalculations.d.ts +4 -1
  9. package/bots/BotCalculations.js +62 -0
  10. package/bots/BotCalculations.js.map +1 -1
  11. package/bots/BotEvents.d.ts +859 -3401
  12. package/bots/BotEvents.js +133 -1529
  13. package/bots/BotEvents.js.map +1 -1
  14. package/bots/StateUpdatedEvent.d.ts +1 -1
  15. package/bots/StateUpdatedEvent.js +1 -1
  16. package/bots/StateUpdatedEvent.js.map +1 -1
  17. package/bots/index.d.ts +1 -0
  18. package/bots/index.js +1 -0
  19. package/bots/index.js.map +1 -1
  20. package/common/Action.d.ts +17 -0
  21. package/common/Action.js +2 -0
  22. package/common/Action.js.map +1 -0
  23. package/common/ConnectionIndicator.d.ts +29 -0
  24. package/common/ConnectionIndicator.js +23 -0
  25. package/common/ConnectionIndicator.js.map +1 -0
  26. package/common/ConnectionInfo.d.ts +30 -0
  27. package/common/ConnectionInfo.js +14 -0
  28. package/common/ConnectionInfo.js.map +1 -0
  29. package/common/ConnectionToken.d.ts +37 -0
  30. package/common/ConnectionToken.js +93 -0
  31. package/common/ConnectionToken.js.map +1 -0
  32. package/common/CurrentVersion.d.ts +26 -0
  33. package/common/CurrentVersion.js +2 -0
  34. package/common/CurrentVersion.js.map +1 -0
  35. package/common/Iterators.d.ts +19 -0
  36. package/common/Iterators.js +39 -0
  37. package/common/Iterators.js.map +1 -0
  38. package/common/LoadingProgress.d.ts +26 -0
  39. package/common/LoadingProgress.js +2 -0
  40. package/common/LoadingProgress.js.map +1 -0
  41. package/common/RemoteActions.d.ts +558 -0
  42. package/common/RemoteActions.js +128 -0
  43. package/common/RemoteActions.js.map +1 -0
  44. package/common/StatusUpdate.d.ts +108 -0
  45. package/common/StatusUpdate.js +2 -0
  46. package/common/StatusUpdate.js.map +1 -0
  47. package/common/StatusUpdateUtils.d.ts +3 -0
  48. package/common/StatusUpdateUtils.js +11 -0
  49. package/common/StatusUpdateUtils.js.map +1 -0
  50. package/common/index.d.ts +11 -0
  51. package/common/index.js +11 -0
  52. package/common/index.js.map +1 -0
  53. package/index.d.ts +4 -1
  54. package/index.js +4 -1
  55. package/index.js.map +1 -1
  56. package/package.json +3 -4
  57. package/partitions/AuxPartition.d.ts +1 -11
  58. package/partitions/AuxPartition.js.map +1 -1
  59. package/partitions/AuxPartitionConfig.d.ts +39 -123
  60. package/partitions/MemoryPartition.d.ts +2 -2
  61. package/partitions/MemoryPartition.js +2 -2
  62. package/partitions/MemoryPartition.js.map +1 -1
  63. package/partitions/OtherPlayersPartition.d.ts +6 -7
  64. package/partitions/OtherPlayersPartition.js +40 -54
  65. package/partitions/OtherPlayersPartition.js.map +1 -1
  66. package/partitions/PartitionUtils.d.ts +28 -1
  67. package/partitions/PartitionUtils.js +174 -1
  68. package/partitions/PartitionUtils.js.map +1 -1
  69. package/partitions/ProxyBridgePartition.d.ts +1 -3
  70. package/partitions/ProxyBridgePartition.js +0 -14
  71. package/partitions/ProxyBridgePartition.js.map +1 -1
  72. package/partitions/RemoteYjsPartition.d.ts +7 -6
  73. package/partitions/RemoteYjsPartition.js +55 -75
  74. package/partitions/RemoteYjsPartition.js.map +1 -1
  75. package/partitions/YjsPartition.d.ts +1 -2
  76. package/partitions/YjsPartition.js +3 -6
  77. package/partitions/YjsPartition.js.map +1 -1
  78. package/partitions/index.d.ts +1 -7
  79. package/partitions/index.js +1 -7
  80. package/partitions/index.js.map +1 -1
  81. package/test/FuzzingHelpers.d.ts +1 -1
  82. package/test/FuzzingHelpers.js +1 -1
  83. package/test/FuzzingHelpers.js.map +1 -1
  84. package/test/TestHelpers.d.ts +8 -0
  85. package/test/TestHelpers.js +23 -0
  86. package/test/TestHelpers.js.map +1 -1
  87. package/utils.d.ts +10 -5
  88. package/utils.js +19 -7
  89. package/utils.js.map +1 -1
  90. package/websockets/AuthenticatedConnectionClient.d.ts +26 -0
  91. package/websockets/AuthenticatedConnectionClient.js +61 -0
  92. package/websockets/AuthenticatedConnectionClient.js.map +1 -0
  93. package/websockets/ConnectionClient.d.ts +59 -0
  94. package/websockets/ConnectionClient.js +2 -0
  95. package/websockets/ConnectionClient.js.map +1 -0
  96. package/websockets/InstRecordsClient.d.ts +118 -0
  97. package/websockets/InstRecordsClient.js +387 -0
  98. package/websockets/InstRecordsClient.js.map +1 -0
  99. package/websockets/InstRecordsClientTimeSyncConnection.d.ts +13 -0
  100. package/websockets/InstRecordsClientTimeSyncConnection.js +16 -0
  101. package/websockets/InstRecordsClientTimeSyncConnection.js.map +1 -0
  102. package/websockets/MemoryConnectionClient.d.ts +19 -0
  103. package/websockets/MemoryConnectionClient.js +41 -0
  104. package/websockets/MemoryConnectionClient.js.map +1 -0
  105. package/websockets/WebsocketEvents.d.ts +2670 -0
  106. package/websockets/WebsocketEvents.js +189 -0
  107. package/websockets/WebsocketEvents.js.map +1 -0
  108. package/websockets/index.d.ts +7 -0
  109. package/websockets/index.js +7 -0
  110. package/websockets/index.js.map +1 -0
  111. package/yjs/YjsHelpers.d.ts +1 -1
  112. package/LoadingProgress.d.ts +0 -54
  113. package/LoadingProgress.js +0 -105
  114. package/LoadingProgress.js.map +0 -1
  115. package/aux-format-2/AuxCausalTree2.d.ts +0 -98
  116. package/aux-format-2/AuxCausalTree2.js +0 -616
  117. package/aux-format-2/AuxCausalTree2.js.map +0 -1
  118. package/aux-format-2/AuxOpTypes.d.ts +0 -268
  119. package/aux-format-2/AuxOpTypes.js +0 -240
  120. package/aux-format-2/AuxOpTypes.js.map +0 -1
  121. package/aux-format-2/AuxStateHelpers.js.map +0 -1
  122. package/aux-format-2/AuxWeaveHelpers.d.ts +0 -132
  123. package/aux-format-2/AuxWeaveHelpers.js +0 -335
  124. package/aux-format-2/AuxWeaveHelpers.js.map +0 -1
  125. package/aux-format-2/AuxWeaveReducer.d.ts +0 -37
  126. package/aux-format-2/AuxWeaveReducer.js +0 -980
  127. package/aux-format-2/AuxWeaveReducer.js.map +0 -1
  128. package/aux-format-2/index.d.ts +0 -7
  129. package/aux-format-2/index.js +0 -7
  130. package/aux-format-2/index.js.map +0 -1
  131. package/partitions/AuxPartitionRealtimeEditModeProvider.d.ts +0 -9
  132. package/partitions/AuxPartitionRealtimeEditModeProvider.js +0 -21
  133. package/partitions/AuxPartitionRealtimeEditModeProvider.js.map +0 -1
  134. package/partitions/BotClient.d.ts +0 -24
  135. package/partitions/BotClient.js +0 -2
  136. package/partitions/BotClient.js.map +0 -1
  137. package/partitions/BotPartition.d.ts +0 -45
  138. package/partitions/BotPartition.js +0 -186
  139. package/partitions/BotPartition.js.map +0 -1
  140. package/partitions/CausalRepoPartition.d.ts +0 -45
  141. package/partitions/CausalRepoPartition.js +0 -157
  142. package/partitions/CausalRepoPartition.js.map +0 -1
  143. package/partitions/MemoryBotClient.d.ts +0 -11
  144. package/partitions/MemoryBotClient.js +0 -41
  145. package/partitions/MemoryBotClient.js.map +0 -1
  146. package/partitions/RemoteCausalRepoHistoryPartition.d.ts +0 -53
  147. package/partitions/RemoteCausalRepoHistoryPartition.js +0 -206
  148. package/partitions/RemoteCausalRepoHistoryPartition.js.map +0 -1
  149. package/partitions/RemoteCausalRepoPartition.d.ts +0 -72
  150. package/partitions/RemoteCausalRepoPartition.js +0 -468
  151. package/partitions/RemoteCausalRepoPartition.js.map +0 -1
  152. package/runtime/AuxCompiler.d.ts +0 -258
  153. package/runtime/AuxCompiler.js +0 -722
  154. package/runtime/AuxCompiler.js.map +0 -1
  155. package/runtime/AuxDevice.d.ts +0 -28
  156. package/runtime/AuxDevice.js +0 -2
  157. package/runtime/AuxDevice.js.map +0 -1
  158. package/runtime/AuxGlobalContext.d.ts +0 -571
  159. package/runtime/AuxGlobalContext.js +0 -606
  160. package/runtime/AuxGlobalContext.js.map +0 -1
  161. package/runtime/AuxLibrary.d.ts +0 -2702
  162. package/runtime/AuxLibrary.js +0 -11046
  163. package/runtime/AuxLibrary.js.map +0 -1
  164. package/runtime/AuxLibraryDefinitions.def +0 -13139
  165. package/runtime/AuxRealtimeEditModeProvider.d.ts +0 -35
  166. package/runtime/AuxRealtimeEditModeProvider.js +0 -34
  167. package/runtime/AuxRealtimeEditModeProvider.js.map +0 -1
  168. package/runtime/AuxResults.d.ts +0 -77
  169. package/runtime/AuxResults.js +0 -6
  170. package/runtime/AuxResults.js.map +0 -1
  171. package/runtime/AuxRuntime.d.ts +0 -253
  172. package/runtime/AuxRuntime.js +0 -2700
  173. package/runtime/AuxRuntime.js.map +0 -1
  174. package/runtime/AuxRuntimeDynamicImports.d.ts +0 -14
  175. package/runtime/AuxRuntimeDynamicImports.js +0 -24
  176. package/runtime/AuxRuntimeDynamicImports.js.map +0 -1
  177. package/runtime/AuxVersion.d.ts +0 -39
  178. package/runtime/AuxVersion.js +0 -2
  179. package/runtime/AuxVersion.js.map +0 -1
  180. package/runtime/CasualOSError.d.ts +0 -37
  181. package/runtime/CasualOSError.js +0 -25
  182. package/runtime/CasualOSError.js.map +0 -1
  183. package/runtime/CompiledBot.d.ts +0 -106
  184. package/runtime/CompiledBot.js +0 -44
  185. package/runtime/CompiledBot.js.map +0 -1
  186. package/runtime/PerformanceNowPolyfill.d.ts +0 -1
  187. package/runtime/PerformanceNowPolyfill.js +0 -8
  188. package/runtime/PerformanceNowPolyfill.js.map +0 -1
  189. package/runtime/RuntimeBot.d.ts +0 -176
  190. package/runtime/RuntimeBot.js +0 -732
  191. package/runtime/RuntimeBot.js.map +0 -1
  192. package/runtime/RuntimeStateVersion.d.ts +0 -23
  193. package/runtime/RuntimeStateVersion.js +0 -22
  194. package/runtime/RuntimeStateVersion.js.map +0 -1
  195. package/runtime/Transpiler.d.ts +0 -174
  196. package/runtime/Transpiler.js +0 -611
  197. package/runtime/Transpiler.js.map +0 -1
  198. package/runtime/Utils.d.ts +0 -74
  199. package/runtime/Utils.js +0 -488
  200. package/runtime/Utils.js.map +0 -1
  201. package/runtime/index.d.ts +0 -9
  202. package/runtime/index.js +0 -9
  203. package/runtime/index.js.map +0 -1
  204. package/runtime/test/RuntimeTestHelpers.d.ts +0 -11
  205. package/runtime/test/RuntimeTestHelpers.js +0 -26
  206. package/runtime/test/RuntimeTestHelpers.js.map +0 -1
  207. package/runtime/test/TestScriptBotFactory.d.ts +0 -16
  208. package/runtime/test/TestScriptBotFactory.js +0 -107
  209. package/runtime/test/TestScriptBotFactory.js.map +0 -1
  210. /package/{runtime/BlobPolyfill.d.ts → BlobPolyfill.d.ts} +0 -0
  211. /package/{runtime/BlobPolyfill.js → BlobPolyfill.js} +0 -0
  212. /package/{runtime/BlobPolyfill.js.map → BlobPolyfill.js.map} +0 -0
@@ -1,8 +1,6 @@
1
- import { PartialBot, BotsState, Bot, BotTags, BotSpace, PortalType, Record } from './Bot';
2
- import { Action, DeviceAction, RemoteAction, DeviceSelector, RemoteActionResult, RemoteActionError, DeviceActionResult, DeviceActionError } from '@casual-simulation/causal-trees';
3
- import type { AIChatMessage, RecordFileFailure } from '@casual-simulation/aux-records';
4
- import { AuxRuntime } from '../runtime/AuxRuntime';
1
+ import { PartialBot, BotsState, Bot, BotTags, BotSpace, PortalType } from './Bot';
5
2
  import { InstUpdate } from './StoredAux';
3
+ import { DeviceAction, RemoteAction, RemoteActionError, RemoteActionResult, DeviceActionResult, DeviceActionError, Action } from '../common';
6
4
  /**
7
5
  * Defines a symbol that can be used to signal to the runtime that the action should not be mapped for bots.
8
6
  */
@@ -15,15 +13,15 @@ export type BotAction = BotActions | TransactionAction | ExtraActions | AsyncAct
15
13
  /**
16
14
  * Defines a union type for all the possible actions that manipulate the bot state.
17
15
  */
18
- export type BotActions = AddBotAction | RemoveBotAction | UpdateBotAction | CreateCertificateAction | SignTagAction | RevokeCertificateAction | ApplyStateAction;
16
+ export type BotActions = AddBotAction | RemoveBotAction | UpdateBotAction | ApplyStateAction;
19
17
  /**
20
18
  * Defines a set of possible local event types.
21
19
  */
22
- export type ExtraActions = ShoutAction | RejectAction | ShowToastAction | ShowHtmlAction | HideHtmlAction | OpenQRCodeScannerAction | OpenBarcodeScannerAction | ShowQRCodeAction | ShowBarcodeAction | LoadServerAction | UnloadServerAction | SuperShoutAction | SendWebhookAction | GoToDimensionAction | GoToURLAction | OpenURLAction | ShowInputForTagAction | SetForcedOfflineAction | ShellAction | OpenConsoleAction | DownloadAction | BackupToGithubAction | BackupAsDownloadAction | StartCheckoutAction | CheckoutSubmittedAction | FinishCheckoutAction | PasteStateAction | ReplaceDragBotAction | SetClipboardAction | ShowChatBarAction | ShowUploadAuxFileAction | MarkHistoryAction | BrowseHistoryAction | RestoreHistoryMarkAction | LoadSpaceAction | EnableARAction | EnableVRAction | ShowJoinCodeAction | RequestFullscreenAction | ExitFullscreenAction | LocalFormAnimationAction | GetRemoteCountAction | AddDropSnapTargetsAction | EnableCustomDraggingAction | EnablePOVAction | GoToTagAction | UpdateHtmlAppAction | HtmlAppEventAction | SetAppOutputAction | UnregisterHtmlAppAction | AddDropGridTargetsAction | CustomAppContainerAvailableAction;
20
+ export type ExtraActions = ShoutAction | RejectAction | ShowToastAction | ShowHtmlAction | HideHtmlAction | OpenQRCodeScannerAction | OpenBarcodeScannerAction | ShowQRCodeAction | ShowBarcodeAction | LoadServerAction | UnloadServerAction | SuperShoutAction | SendWebhookAction | GoToDimensionAction | GoToURLAction | OpenURLAction | ShowInputForTagAction | SetForcedOfflineAction | ShellAction | OpenConsoleAction | DownloadAction | PasteStateAction | ReplaceDragBotAction | SetClipboardAction | ShowChatBarAction | ShowUploadAuxFileAction | LoadSpaceAction | EnableARAction | EnableVRAction | ShowJoinCodeAction | RequestFullscreenAction | ExitFullscreenAction | LocalFormAnimationAction | GetRemoteCountAction | AddDropSnapTargetsAction | EnableCustomDraggingAction | EnablePOVAction | GoToTagAction | UpdateHtmlAppAction | HtmlAppEventAction | SetAppOutputAction | UnregisterHtmlAppAction | AddDropGridTargetsAction | CustomAppContainerAvailableAction;
23
21
  /**
24
22
  * Defines a set of possible async action types.
25
23
  */
26
- export type AsyncActions = AsyncResultAction | AsyncErrorAction | ShowInputAction | ShowConfirmAction | ShareAction | ImportAUXAction | RegisterBuiltinPortalAction | RegisterPrefixAction | RunScriptAction | LoadBotsAction | ClearSpaceAction | SendWebhookAction | AnimateTagAction | UnlockSpaceAction | SetSpacePasswordAction | LoadFileAction | SaveFileAction | SetupChannelAction | RpioInitAction | RpioExitAction | RpioOpenAction | RpioModeAction | RpioReadAction | RpioReadSequenceAction | RpioWriteAction | RpioWriteSequenceAction | RpioReadpadAction | RpioWritepadAction | RpioPudAction | RpioPollAction | RpioCloseAction | RpioI2CBeginAction | RpioI2CSetSlaveAddressAction | RpioI2CSetBaudRateAction | RpioI2CSetClockDividerAction | RpioI2CReadAction | RpioI2CWriteAction | RpioI2CEndAction | RpioPWMSetClockDividerAction | RpioPWMSetRangeAction | RpioPWMSetDataAction | RpioSPIBeginAction | RpioSPIChipSelectAction | RpioSPISetCSPolarityAction | RpioSPISetClockDividerAction | RpioSPISetDataModeAction | RpioSPITransferAction | RpioSPIWriteAction | RpioSPIEndAction | SerialConnectAction | SerialStreamAction | SerialOpenAction | SerialUpdateAction | SerialWriteAction | SerialReadAction | SerialCloseAction | SerialFlushAction | SerialDrainAction | SerialPauseAction | SerialResumeAction | CreateCertificateAction | SignTagAction | RevokeCertificateAction | RemoteAction | RemoteActionResult | RemoteActionError | DeviceAction | DeviceActionResult | DeviceActionError | PlaySoundAction | BufferSoundAction | CancelSoundAction | LocalPositionTweenAction | LocalRotationTweenAction | ShowUploadFilesAction | OpenCircleWipeAction | FocusOnBotAction | FocusOnPositionAction | BeginAudioRecordingAction | EndAudioRecordingAction | CancelAnimationAction | BeginRecordingAction | EndRecordingAction | SpeakTextAction | GetVoicesAction | GetGeolocationAction | RegisterCustomAppAction | UnregisterCustomAppAction | RegisterHtmlAppAction | RequestAuthDataAction | DefineGlobalBotAction | ConvertGeolocationToWhat3WordsAction | GetPublicRecordKeyAction | GrantRecordMarkerPermissionAction | RevokeRecordMarkerPermissionAction | GrantInstAdminPermissionAction | GrantRoleAction | RevokeRoleAction | RecordDataAction | GetRecordDataAction | ListRecordDataAction | EraseRecordDataAction | RecordFileAction | GetFileAction | EraseFileAction | RecordEventAction | GetEventCountAction | ARSupportedAction | VRSupportedAction | MediaPermissionAction | GetAverageFrameRateAction | OpenImageClassifierAction | MeetCommandAction | MeetFunctionAction | ShowTooltipAction | HideTooltipAction | JoinRoomAction | LeaveRoomAction | SetRoomOptionsAction | GetRoomOptionsAction | GetRoomTrackOptionsAction | SetRoomTrackOptionsAction | GetRoomRemoteOptionsAction | RaycastFromCameraAction | RaycastInPortalAction | CalculateRayFromCameraAction | BufferFormAddressGLTFAction | StartFormAnimationAction | StopFormAnimationAction | ListFormAnimationsAction | ConfigureWakeLockAction | GetWakeLockConfigurationAction | AnalyticsRecordEventAction | HtmlAppMethodCallAction | AttachRuntimeAction | DetachRuntimeAction | OpenPhotoCameraAction | AIChatAction | AIGenerateSkyboxAction | AIGenerateImageAction | ListUserStudiosAction;
24
+ export type AsyncActions = AsyncResultAction | AsyncErrorAction | ShowInputAction | ShowConfirmAction | ShareAction | ImportAUXAction | RegisterBuiltinPortalAction | RegisterPrefixAction | RunScriptAction | LoadBotsAction | ClearSpaceAction | SendWebhookAction | AnimateTagAction | RemoteAction | RemoteActionResult | RemoteActionError | DeviceAction | DeviceActionResult | DeviceActionError | PlaySoundAction | BufferSoundAction | CancelSoundAction | LocalPositionTweenAction | LocalRotationTweenAction | ShowUploadFilesAction | OpenCircleWipeAction | FocusOnBotAction | FocusOnPositionAction | BeginAudioRecordingAction | EndAudioRecordingAction | CancelAnimationAction | BeginRecordingAction | EndRecordingAction | SpeakTextAction | GetVoicesAction | GetGeolocationAction | RegisterCustomAppAction | UnregisterCustomAppAction | RegisterHtmlAppAction | RequestAuthDataAction | DefineGlobalBotAction | ConvertGeolocationToWhat3WordsAction | ARSupportedAction | VRSupportedAction | MediaPermissionAction | GetAverageFrameRateAction | OpenImageClassifierAction | MeetCommandAction | MeetFunctionAction | ShowTooltipAction | HideTooltipAction | RaycastFromCameraAction | RaycastInPortalAction | CalculateRayFromCameraAction | BufferFormAddressGLTFAction | StartFormAnimationAction | StopFormAnimationAction | ListFormAnimationsAction | ConfigureWakeLockAction | GetWakeLockConfigurationAction | AnalyticsRecordEventAction | HtmlAppMethodCallAction | OpenPhotoCameraAction;
27
25
  /**
28
26
  * Defines an interface for actions that represent asynchronous tasks.
29
27
  */
@@ -86,73 +84,6 @@ export interface UpdateBotAction extends Action {
86
84
  id: string;
87
85
  update: PartialBot;
88
86
  }
89
- /**
90
- * Defines the set of options required for creating a certificate.
91
- */
92
- export interface CreateCertificateOptions {
93
- /**
94
- * The keypair that should be used for the certificate.
95
- */
96
- keypair: string;
97
- /**
98
- * The ID of the certified bot that is signing the new certificate.
99
- */
100
- signingBotId?: string;
101
- /**
102
- * The password that should be used to sign the new certificate.
103
- */
104
- signingPassword: string;
105
- }
106
- /**
107
- * Defines a bot event that creates a new certificate from the given keypair.
108
- */
109
- export interface CreateCertificateAction extends AsyncAction, CreateCertificateOptions {
110
- type: 'create_certificate';
111
- }
112
- /**
113
- * Defines a bot event that creates a signature for the given tag on the given bot using the given certified bot and password.
114
- */
115
- export interface SignTagAction extends AsyncAction {
116
- type: 'sign_tag';
117
- /**
118
- * The ID of the certified bot that is signing the tag value.
119
- */
120
- signingBotId: string;
121
- /**
122
- * The password that should be used to sign the value.
123
- */
124
- signingPassword: string;
125
- /**
126
- * The ID of the bot whose tag is being signed.
127
- */
128
- botId: string;
129
- /**
130
- * The tag that should be signed.
131
- */
132
- tag: string;
133
- /**
134
- * The value that should be signed.
135
- */
136
- value: any;
137
- }
138
- /**
139
- * Defines a bot event that revokes a certificate.
140
- */
141
- export interface RevokeCertificateAction extends AsyncAction {
142
- type: 'revoke_certificate';
143
- /**
144
- * The ID of the bot that should be used to sign the revocation.
145
- */
146
- signingBotId: string;
147
- /**
148
- * The password that should be used to sign the revocation.
149
- */
150
- signingPassword: string;
151
- /**
152
- * The ID of the certificate that should be revoked.
153
- */
154
- certificateBotId: string;
155
- }
156
87
  /**
157
88
  * A set of bot events in one.
158
89
  */
@@ -217,155 +148,6 @@ export interface ReplaceDragBotAction extends Action {
217
148
  */
218
149
  bot: Bot | BotTags;
219
150
  }
220
- /**
221
- * An event that is used to request that the instance be backed up to github.
222
- */
223
- export interface BackupToGithubAction extends Action {
224
- type: 'backup_to_github';
225
- /**
226
- * The authentication key to use.
227
- */
228
- auth: string;
229
- /**
230
- * The options that should be used for backing up.
231
- */
232
- options?: BackupOptions;
233
- }
234
- /**
235
- * An event that is used to request that the instance be backed up to a zip bot and downloaded.
236
- */
237
- export interface BackupAsDownloadAction extends Action {
238
- type: 'backup_as_download';
239
- /**
240
- * The options that should be used for backing up.
241
- */
242
- options?: BackupOptions;
243
- /**
244
- * The device(s) that the download should be sent to.
245
- */
246
- target: DeviceSelector;
247
- }
248
- /**
249
- * Defines the list of possible options for backing up a instance.
250
- */
251
- export interface BackupOptions {
252
- /**
253
- * Whether to include archived atoms.
254
- */
255
- includeArchived?: boolean;
256
- }
257
- export interface StartCheckoutOptions {
258
- /**
259
- * The publishable API key that should be used for interfacing with the Stripe API.
260
- */
261
- publishableKey: string;
262
- /**
263
- * The ID of the product that is being checked out.
264
- */
265
- productId: string;
266
- /**
267
- * The title of the product.
268
- */
269
- title: string;
270
- /**
271
- * The description of the product.
272
- */
273
- description: string;
274
- /**
275
- * The instance that the payment processing should occur in.
276
- */
277
- processingInst: string;
278
- /**
279
- * Whether to request the payer's billing address.
280
- */
281
- requestBillingAddress?: boolean;
282
- /**
283
- * Specifies the options that should be used for requesting payment from Apple Pay or the Payment Request API.
284
- */
285
- paymentRequest?: PaymentRequestOptions;
286
- }
287
- /**
288
- * Defines an interface of payment request options.
289
- */
290
- export interface PaymentRequestOptions {
291
- /**
292
- * The two letter country code of your payment processor account.
293
- */
294
- country: string;
295
- /**
296
- * The three character currency code.
297
- */
298
- currency: string;
299
- /**
300
- * The total that should be charged to the user.
301
- */
302
- total: {
303
- /**
304
- * The label that should be displayed for the total.
305
- */
306
- label: string;
307
- /**
308
- * The amount in the currency's smallest unit. (cents, etc.)
309
- */
310
- amount: number;
311
- };
312
- }
313
- /**
314
- * An event that is used to initiate the checkout flow.
315
- */
316
- export interface StartCheckoutAction extends Action, StartCheckoutOptions {
317
- type: 'start_checkout';
318
- }
319
- /**
320
- * An event that is used to indicate that the checkout was submitted.
321
- */
322
- export interface CheckoutSubmittedAction extends Action {
323
- type: 'checkout_submitted';
324
- /**
325
- * The ID of the product that was checked out.
326
- */
327
- productId: string;
328
- /**
329
- * The token that allows payment.
330
- */
331
- token: string;
332
- /**
333
- * The inst that processing should happen in.
334
- */
335
- processingInst: string;
336
- }
337
- /**
338
- * An event that is used to finish the checkout process by charging the user's card/account.
339
- */
340
- export interface FinishCheckoutAction extends Action {
341
- type: 'finish_checkout';
342
- /**
343
- * The Secret API Key that should be used to finish the checkout process.
344
- */
345
- secretKey: string;
346
- /**
347
- * The token that was created from the checkout process.
348
- * You should have recieved this from the onCheckout() event.
349
- */
350
- token: string;
351
- /**
352
- * The amount to charge in the smallest currency unit.
353
- * For USD, this is cents. So an amount of 100 equals $1.00.
354
- */
355
- amount: number;
356
- /**
357
- * The currency that the amount is in.
358
- */
359
- currency: string;
360
- /**
361
- * The description for the charge.
362
- */
363
- description: string;
364
- /**
365
- * The extra info that this event contains.
366
- */
367
- extra: any;
368
- }
369
151
  /**
370
152
  * An event that is used to run a shell script.
371
153
  */
@@ -376,188 +158,6 @@ export interface ShellAction extends Action {
376
158
  */
377
159
  script: string;
378
160
  }
379
- /**
380
- * An event that is used to chat with an AI.
381
- */
382
- export interface AIChatAction extends AsyncAction {
383
- type: 'ai_chat';
384
- /**
385
- * The options for the action.
386
- */
387
- options: AIChatOptions;
388
- /**
389
- * The list of messages comprising the conversation so far.
390
- */
391
- messages: AIChatMessage[];
392
- }
393
- /**
394
- * Defines an interface that represents options for {@link ai.chat-string}.
395
- *
396
- * @dochash types/ai
397
- * @doctitle AI Types
398
- * @docsidebar AI
399
- * @docdescription Types that are used in AI actions.
400
- * @docname AIChatOptions
401
- */
402
- export interface AIChatOptions extends RecordActionOptions {
403
- /**
404
- * The model that should be used.
405
- *
406
- * If not specified, then a default will be used.
407
- *
408
- * Currently, the following models are supported:
409
- *
410
- * - `gpt-4`
411
- * - `gpt-3.5-turbo`
412
- */
413
- preferredModel?: 'gpt-4' | 'gpt-3.5-turbo';
414
- /**
415
- * The temperature that should be used.
416
- *
417
- * If not specified, then a default will be used.
418
- */
419
- temperature?: number;
420
- /**
421
- * The nucleus sampling probability.
422
- */
423
- topP?: number;
424
- /**
425
- * The presence penalty.
426
- *
427
- * Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
428
- */
429
- presencePenalty?: number;
430
- /**
431
- * The frequency penalty.
432
- *
433
- * Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
434
- */
435
- frequencyPenalty?: number;
436
- }
437
- /**
438
- * An event that is used to generate a skybox using AI.
439
- *
440
- * @dochash types/ai
441
- * @docname AIGenerateSkyboxAction
442
- */
443
- export interface AIGenerateSkyboxAction extends AsyncAction {
444
- type: 'ai_generate_skybox';
445
- /**
446
- * The prompt to use for the skybox.
447
- *
448
- * Describes things that you want the skybox to look like.
449
- */
450
- prompt: string;
451
- /**
452
- * The negative prompt to use for the skybox.
453
- *
454
- * Describes the things that you don't want the skybox to look like.
455
- */
456
- negativePrompt?: string;
457
- /**
458
- * The options that should be included in the request.
459
- */
460
- options: AIGenerateSkyboxOptions;
461
- }
462
- /**
463
- * Defines an interface that represents options for {@link ai.generateSkybox-string}.
464
- *
465
- * @dochash types/ai
466
- * @docname AIGenerateSkyboxOptions
467
- */
468
- export interface AIGenerateSkyboxOptions extends RecordActionOptions {
469
- /**
470
- * Options that are specific to blockade-labs.
471
- */
472
- blockadeLabs?: AIGenerateSkyboxBlockadeLabsOptions;
473
- }
474
- /**
475
- * Options that are specific to Blockade Labs implementations for {@link ai.generateSkybox-string}.
476
- *
477
- * @dochash types/ai
478
- * @docname AIGenerateSkyboxOptions
479
- */
480
- export interface AIGenerateSkyboxBlockadeLabsOptions {
481
- /**
482
- * The pre-defined style ID for the skybox.
483
- */
484
- skyboxStyleId?: number;
485
- /**
486
- * The ID of a previously generated skybox.
487
- */
488
- remixImagineId?: number;
489
- /**
490
- * The random seed to use for generating the skybox.
491
- */
492
- seed?: number;
493
- }
494
- /**
495
- * An event that is used to generate an image using AI.
496
- */
497
- export interface AIGenerateImageAction extends AsyncAction, AIGenerateImageOptions {
498
- type: 'ai_generate_image';
499
- /**
500
- * The options for the action.
501
- */
502
- options: RecordActionOptions;
503
- }
504
- /**
505
- * Defines an interface that represents options for {@link ai.generateImage-string}.
506
- *
507
- * @dochash types/ai
508
- * @docname AIGenerateImageOptions
509
- */
510
- export interface AIGenerateImageOptions {
511
- /**
512
- * The description of what the generated image(s) should look like.
513
- */
514
- prompt: string;
515
- /**
516
- * The description of what the generated image(s) should not look like.
517
- */
518
- negativePrompt?: string;
519
- /**
520
- * The model that should be used to generate the image(s).
521
- */
522
- model?: string;
523
- /**
524
- * The desired width of the image(s) in pixels.
525
- */
526
- width?: number;
527
- /**
528
- * The desired height of the image(s) in pixels.
529
- */
530
- height?: number;
531
- /**
532
- * The number of images that should be generated.
533
- */
534
- numberOfImages?: number;
535
- /**
536
- * The random noise seed that should be used.
537
- */
538
- seed?: number;
539
- /**
540
- * The number of diffusion steps to run.
541
- */
542
- steps?: number;
543
- /**
544
- * How strictly the diffusion process adheres to the prompt text.
545
- * Higher values keep the image closer to the prompt.
546
- */
547
- cfgScale?: number;
548
- /**
549
- * The sampler to use for the diffusion process.
550
- */
551
- sampler?: string;
552
- /**
553
- * The clip guidance preset.
554
- */
555
- clipGuidancePreset?: string;
556
- /**
557
- * The style preset that should be used to guide the image model torwards a specific style.
558
- */
559
- stylePreset?: string;
560
- }
561
161
  /**
562
162
  * An event that is used to show a toast message to the user.
563
163
  */
@@ -1090,80 +690,24 @@ export interface AnimateTagOptions {
1090
690
  */
1091
691
  tagMaskSpace: BotSpace | false;
1092
692
  }
1093
- /**
1094
- * Defines an event that is used to load a file.
1095
- */
1096
- export interface LoadFileAction extends AsyncAction {
1097
- type: 'load_file';
1098
- /**
1099
- * The options for the action.
1100
- */
1101
- options: LoadFileOptions;
1102
- }
1103
- /**
1104
- * Options for loading a file.
1105
- */
1106
- export interface LoadFileOptions {
1107
- /**
1108
- * The file path that should be loaded.
1109
- */
1110
- path?: string;
1111
- /**
1112
- * The shout that should be made when the request finishes.
1113
- */
1114
- callbackShout?: string;
1115
- }
1116
- /**
1117
- * Defines an event that is used to save a file to a drive.
1118
- */
1119
- export interface SaveFileAction extends AsyncAction {
1120
- type: 'save_file';
1121
- /**
1122
- * The options for the action.
1123
- */
1124
- options: SaveFileOptions;
1125
- }
1126
- /**
1127
- * Options for saving a file.
1128
- */
1129
- export interface SaveFileOptions {
1130
- /**
1131
- * The path that the mod should be saved.
1132
- */
1133
- path: string;
1134
- /**
1135
- * The data to save to the file.
1136
- */
1137
- data: string;
1138
- /**
1139
- * The shout that should be made when the request finishes.
1140
- */
1141
- callbackShout?: string;
1142
- /**
1143
- * Whether to overwrite existing files.
1144
- */
1145
- overwriteExistingFile?: boolean;
1146
- }
1147
693
  /**
1148
694
  * Defines an event that is used to get the player count.
1149
695
  */
1150
696
  export interface GetRemoteCountAction extends Action {
1151
697
  type: 'get_remote_count';
698
+ /**
699
+ * The name of the record.
700
+ */
701
+ recordName?: string | null;
1152
702
  /**
1153
703
  * The instance that the device count should be retrieved for.
1154
704
  * If omitted, then the total device count will be returned.
1155
705
  */
1156
706
  inst?: string;
1157
- }
1158
- /**
1159
- * Defines an event that is used to get the list of instances from the server.
1160
- */
1161
- export interface GetServersAction extends Action {
1162
- type: 'get_servers';
1163
707
  /**
1164
- * Whether to get the instance statuses.
708
+ * The name of the branch.
1165
709
  */
1166
- includeStatuses?: boolean;
710
+ branch?: string;
1167
711
  }
1168
712
  /**
1169
713
  * Defines an event that is used to get the list of remote devices on the instance.
@@ -1464,2455 +1008,1184 @@ export interface RejectAction {
1464
1008
  actions: Action[];
1465
1009
  }
1466
1010
  /**
1467
- * Defines an event that creates a channel if it doesn't exist.
1011
+ * Defines an event that sets some text on the user's clipboard.
1468
1012
  */
1469
- export interface SetupChannelAction extends AsyncAction {
1470
- type: 'setup_server';
1471
- /**
1472
- * The channel that should be created.
1473
- */
1474
- channel: string;
1013
+ export interface SetClipboardAction {
1014
+ type: 'set_clipboard';
1475
1015
  /**
1476
- * The bot or mod that should be cloned into the new channel.
1016
+ * The text that the clipboard should be set to.
1477
1017
  */
1478
- botOrMod?: Bot | BotTags;
1018
+ text: string;
1479
1019
  }
1480
1020
  /**
1481
- * Initialize rpio with the provided settings.
1021
+ * Defines an event that shows the chat bar.
1482
1022
  */
1483
- export interface RpioInitAction extends AsyncAction {
1484
- type: 'rpio_init';
1023
+ export interface ShowChatBarAction {
1024
+ type: 'show_chat_bar';
1485
1025
  /**
1486
- * Defaults:
1487
- * gpiomem: true Use /dev/gpiomem
1488
- * true | false
1489
- * mapping: 'physical' Use the P1-P40 numbering scheme
1490
- * gpio | physical
1491
- * mock: undefined Emulate specific hardware in mock mode
1492
- * raspi-b-r1 | raspi-a | raspi-b | raspi-a+ | raspi-b+ | raspi-2 | raspi-3 | raspi-zero | raspi-zero-w
1493
- * close_on_exit: true On node process exit automatically close rpio
1494
- * true | false
1026
+ * Whether the chat bar should be visible.
1495
1027
  */
1496
- options: object;
1497
- }
1498
- /**
1499
- * Shuts down rpio, unmaps, and clears everything.
1500
- */
1501
- export interface RpioExitAction extends AsyncAction {
1502
- type: 'rpio_exit';
1503
- }
1504
- /**
1505
- * Open a pin for use.
1506
- */
1507
- export interface RpioOpenAction extends AsyncAction {
1508
- type: 'rpio_open';
1509
- /**
1510
- * The pin that you want to configure.
1511
- */
1512
- pin: number;
1028
+ visible: boolean;
1513
1029
  /**
1514
- * The mode you want toconfigure your pin as.
1030
+ * The text that the bar should be filled with by default.
1515
1031
  */
1516
- mode: 'INPUT' | 'OUTPUT' | 'PWM';
1032
+ prefill?: string;
1517
1033
  /**
1518
- * The state you want to initialize your pin as.
1034
+ * The text that the bar should have as the placeholder.
1519
1035
  */
1520
- options?: 'HIGH' | 'LOW' | 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP';
1521
- }
1522
- /**
1523
- * Set the mode of the provided pin.
1524
- */
1525
- export interface RpioModeAction extends AsyncAction {
1526
- type: 'rpio_mode';
1036
+ placeholder?: string;
1527
1037
  /**
1528
- * The pin that you want to configure.
1038
+ * The color to use for the placeholder.
1529
1039
  */
1530
- pin: number;
1040
+ placeholderColor?: string;
1531
1041
  /**
1532
- * The mode you want to set your pin as.
1042
+ * The color to use for the background.
1533
1043
  */
1534
- mode: 'INPUT' | 'OUTPUT' | 'PWM';
1044
+ backgroundColor?: string;
1535
1045
  /**
1536
- * The state you want to initialize your pin as.
1046
+ * The color to use for the foreground (text).
1537
1047
  */
1538
- options?: 'HIGH' | 'LOW' | 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP';
1048
+ foregroundColor?: string;
1539
1049
  }
1540
1050
  /**
1541
- * Read the value of the provided pin.
1051
+ * Defines the possible options for showing the chat bar.
1052
+ *
1053
+ * @dochash types/os
1054
+ * @docname ShowChatOptions
1542
1055
  */
1543
- export interface RpioReadAction extends AsyncAction {
1544
- type: 'rpio_read';
1056
+ export interface ShowChatOptions {
1545
1057
  /**
1546
- * The pin that you want to use.
1058
+ * The text that the bar should be filled with by default.
1547
1059
  */
1548
- pin: number;
1549
- }
1550
- /**
1551
- * Read the buffer of the provided pin.
1552
- */
1553
- export interface RpioReadSequenceAction extends AsyncAction {
1554
- type: 'rpio_read_sequence';
1060
+ prefill?: string;
1555
1061
  /**
1556
- * The pin that you want to use.
1062
+ * The text that the bar should have as the placeholder.
1557
1063
  */
1558
- pin: number;
1064
+ placeholder?: string;
1559
1065
  /**
1560
- * The length of the buffer.
1066
+ * The color to use for the placeholder.
1561
1067
  */
1562
- length: number;
1563
- }
1564
- /**
1565
- * Write a new value for the provided pin.
1566
- */
1567
- export interface RpioWriteAction extends AsyncAction {
1568
- type: 'rpio_write';
1068
+ placeholderColor?: string;
1569
1069
  /**
1570
- * The pin that you want to use.
1070
+ * The color to use for the background.
1571
1071
  */
1572
- pin: number;
1072
+ backgroundColor?: string;
1573
1073
  /**
1574
- * The value of the pin. Either High (0) or Low (1)
1074
+ * The color to use for the foreground (text).
1575
1075
  */
1576
- value: 'HIGH' | 'LOW';
1076
+ foregroundColor?: string;
1577
1077
  }
1578
1078
  /**
1579
- * Write the buffer to the provided pin.
1079
+ * Defines an event that executes a script.
1580
1080
  */
1581
- export interface RpioWriteSequenceAction extends AsyncAction {
1582
- type: 'rpio_write_sequence';
1583
- /**
1584
- * The pin that you want to use.
1585
- */
1586
- pin: number;
1081
+ export interface RunScriptAction extends AsyncAction {
1082
+ type: 'run_script';
1587
1083
  /**
1588
- * The buffer that you want write.
1084
+ * The script that should be executed.
1589
1085
  */
1590
- buffer: number[];
1086
+ script: string;
1591
1087
  }
1592
1088
  /**
1593
- * Read the current state of the GPIO pad control for the specified GPIO group.
1594
- * On current models of Raspberry Pi there are three groups.
1089
+ * Defines an event that shows the "upload AUX file" dialog.
1595
1090
  */
1596
- export interface RpioReadpadAction extends AsyncAction {
1597
- type: 'rpio_readpad';
1598
- /**
1599
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
1600
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
1601
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
1602
- */
1603
- group: 'PAD_GROUP_0_27' | 'PAD_GROUP_28_45' | 'PAD_GROUP_46_53';
1604
- /**
1605
- * The bitmask you want to check.
1606
- */
1607
- bitmask: 'slew' | 'hysteresis' | 'current';
1091
+ export interface ShowUploadAuxFileAction {
1092
+ type: 'show_upload_aux_file';
1608
1093
  }
1609
1094
  /**
1610
- * Write `control` settings to the pad control for `group`.
1095
+ * Defines an event that shows the "uplaod file" dialog.
1611
1096
  */
1612
- export interface RpioWritepadAction extends AsyncAction {
1613
- type: 'rpio_writepad';
1614
- /**
1615
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
1616
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
1617
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
1618
- */
1619
- group: 'PAD_GROUP_0_27' | 'PAD_GROUP_28_45' | 'PAD_GROUP_46_53';
1620
- /**
1621
- * Slew rate unlimited if set to true.
1622
- */
1623
- slew?: boolean;
1097
+ export interface ShowUploadFilesAction extends AsyncAction {
1098
+ type: 'show_upload_files';
1099
+ }
1100
+ /**
1101
+ * Defines an event that loads a space into the instance.
1102
+ */
1103
+ export interface LoadSpaceAction extends Partial<AsyncAction> {
1104
+ type: 'load_space';
1624
1105
  /**
1625
- * Hysteresis is enabled if set to true.
1106
+ * The space that should be loaded.
1626
1107
  */
1627
- hysteresis?: boolean;
1108
+ space: BotSpace;
1628
1109
  /**
1629
- * Drive current set in mA. Must be an even number 2-16.
1110
+ * The config that should be used to load the space.
1630
1111
  */
1631
- current?: 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16;
1112
+ config: any;
1632
1113
  }
1633
1114
  /**
1634
- * Configure the pin's internal pullup or pulldown resistors.
1115
+ * Defines an event that loads bots from the given space that match the given tags and values.
1635
1116
  */
1636
- export interface RpioPudAction extends AsyncAction {
1637
- type: 'rpio_pud';
1117
+ export interface LoadBotsAction extends AsyncAction {
1118
+ type: 'load_bots';
1638
1119
  /**
1639
- * The pin that you want to use.
1120
+ * The space that should be searched.
1640
1121
  */
1641
- pin: number;
1122
+ space: string;
1642
1123
  /**
1643
- * Configure the pin's resistors as: 'PULL_OFF', 'PULL_DOWN' or 'PULL_UP'
1124
+ * The tags that the loaded bots should have.
1644
1125
  */
1645
- state: 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP';
1126
+ tags: TagFilter[];
1646
1127
  }
1647
1128
  /**
1648
- * Watch `pin` for changes and execute the callback `cb()` on events.
1129
+ * Defines an interface for objects that specify a tag and value
1130
+ * that a bot should have to be loaded.
1649
1131
  */
1650
- export interface RpioPollAction extends AsyncAction {
1651
- type: 'rpio_poll';
1132
+ export interface TagFilter {
1652
1133
  /**
1653
- * The pin that you want to use.
1134
+ * The tag that the bot should have.
1654
1135
  */
1655
- pin: number;
1136
+ tag: string;
1656
1137
  /**
1657
- * The callback executed on events.
1138
+ * The value that the bot should have.
1658
1139
  */
1659
- cb: any;
1140
+ value?: any;
1141
+ }
1142
+ /**
1143
+ * Defines an event that clears all bots from a space.
1144
+ *
1145
+ * Only supported for the following spaces:
1146
+ * - error
1147
+ */
1148
+ export interface ClearSpaceAction extends AsyncAction {
1149
+ type: 'clear_space';
1660
1150
  /**
1661
- * Optional. Used to watch for specific events.
1151
+ * The space to clear.
1662
1152
  */
1663
- options?: 'POLL_LOW' | 'POLL_HIGH' | 'POLL_BOTH';
1153
+ space: string;
1664
1154
  }
1665
1155
  /**
1666
- * Close a pin to remove it from use.
1156
+ * Defines an event that runs an animation locally over
1157
+ * whatever existing animations are playing.
1667
1158
  */
1668
- export interface RpioCloseAction extends AsyncAction {
1669
- type: 'rpio_close';
1159
+ export interface LocalFormAnimationAction {
1160
+ type: 'local_form_animation';
1670
1161
  /**
1671
- * The pin that you want to use.
1162
+ * The bot to run the animation on.
1672
1163
  */
1673
- pin: number;
1164
+ botId: string;
1674
1165
  /**
1675
- * The state you want to leave the pin in. Either PIN_RESET or PIN_PRESERVE
1166
+ * The animation to run.
1676
1167
  */
1677
- options?: 'PIN_RESET' | 'PIN_PRESERVE';
1168
+ animation: number | string;
1678
1169
  }
1170
+ export type TweenType = 'position' | 'rotation';
1679
1171
  /**
1680
- *Initializes i2c for use.
1172
+ * The possible easing types.
1173
+ * @dochash types/animation
1174
+ * @docname EaseType
1681
1175
  */
1682
- export interface RpioI2CBeginAction extends AsyncAction {
1683
- type: 'rpio_i2c_begin';
1684
- }
1176
+ export type EaseType = 'linear' | 'quadratic' | 'cubic' | 'quartic' | 'quintic' | 'sinusoidal' | 'exponential' | 'circular' | 'elastic';
1685
1177
  /**
1686
- * Configure the slave address.
1178
+ * The possible easing modes.
1179
+ * @dochash types/animation
1180
+ * @docname EaseMode
1687
1181
  */
1688
- export interface RpioI2CSetSlaveAddressAction extends AsyncAction {
1689
- type: 'rpio_i2c_setslaveaddress';
1690
- /**
1691
- * The slave address to set.
1692
- */
1693
- address: number;
1694
- }
1182
+ export type EaseMode = 'in' | 'out' | 'inout';
1695
1183
  /**
1696
- * Set the baud rate. Directly set the speed in hertz.
1184
+ * Defines an interface that represents easing types.
1185
+ *
1186
+ * @example Create an object that represents "quadratic" "inout" easing
1187
+ * let easing = {
1188
+ * type: "quadratic",
1189
+ * mode: "inout"
1190
+ * };
1191
+ *
1192
+ * @dochash types/animation
1193
+ * @docname Easing
1697
1194
  */
1698
- export interface RpioI2CSetBaudRateAction extends AsyncAction {
1699
- type: 'rpio_i2c_setbaudrate';
1195
+ export interface Easing {
1196
+ /**
1197
+ * The type of easing to use.
1198
+ */
1199
+ type: EaseType;
1700
1200
  /**
1701
- * The i2c refresh rate in hertz.
1201
+ * The mode of easing to use.
1702
1202
  */
1703
- rate: number;
1203
+ mode: EaseMode;
1704
1204
  }
1705
1205
  /**
1706
- * Set the baud rate. Set it based on a divisor of the base 250MHz rate.
1206
+ * The maximum allowed duration for tweens.
1707
1207
  */
1708
- export interface RpioI2CSetClockDividerAction extends AsyncAction {
1709
- type: 'rpio_i2c_setclockdivider';
1710
- /**
1711
- * The i2c refresh rate based on a divisor of the base 250MHz rate.
1712
- */
1713
- rate: number;
1714
- }
1208
+ export declare const MAX_TWEEN_DURATION: number;
1715
1209
  /**
1716
- * Read from the i2c slave.
1210
+ * Defines an event that runs a tween locally.
1717
1211
  */
1718
- export interface RpioI2CReadAction extends AsyncAction {
1719
- type: 'rpio_i2c_read';
1212
+ export interface LocalTweenAction extends AsyncAction {
1213
+ type: 'local_tween';
1720
1214
  /**
1721
- * Buffer to read.
1215
+ * The bot to run the tween on.
1722
1216
  */
1723
- rx: number[];
1217
+ botId: string;
1724
1218
  /**
1725
- * Optional. Length of the buffer to read.
1219
+ * The dimension that the bot should be tweened in.
1726
1220
  */
1727
- length?: number;
1728
- }
1729
- /**
1730
- * Write to the i2c slave.
1731
- */
1732
- export interface RpioI2CWriteAction extends AsyncAction {
1733
- type: 'rpio_i2c_write';
1221
+ dimension: string;
1734
1222
  /**
1735
- * Buffer to write.
1223
+ * The type of the tween.
1736
1224
  */
1737
- tx: number[];
1225
+ tweenType: TweenType;
1738
1226
  /**
1739
- * Optional. Length of the buffer to write.
1227
+ * The easing that should be used.
1740
1228
  */
1741
- length?: number;
1742
- }
1743
- /**
1744
- *
1745
- */
1746
- /**
1747
- *
1748
- */
1749
- /**
1750
- * Turn off the i²c interface and return the pins to GPIO.
1751
- */
1752
- export interface RpioI2CEndAction extends AsyncAction {
1753
- type: 'rpio_i2c_end';
1229
+ easing: Easing;
1230
+ /**
1231
+ * The duration of the tween in seconds.
1232
+ */
1233
+ duration: number;
1754
1234
  }
1755
1235
  /**
1756
- * This is a power-of-two divisor of the base 19.2MHz rate, with a maximum value of 4096 (4.6875kHz).
1236
+ * Defines an event that runs a position tween locally.
1757
1237
  */
1758
- export interface RpioPWMSetClockDividerAction extends AsyncAction {
1759
- type: 'rpio_pwm_setclockdivider';
1238
+ export interface LocalPositionTweenAction extends LocalTweenAction {
1239
+ tweenType: 'position';
1760
1240
  /**
1761
- * The PWM refresh rate.
1241
+ * The target position of the tween.
1762
1242
  */
1763
- rate: number;
1243
+ position: {
1244
+ x?: number;
1245
+ y?: number;
1246
+ z?: number;
1247
+ };
1248
+ }
1249
+ export interface LocalRotationTweenAction extends LocalTweenAction {
1250
+ tweenType: 'rotation';
1251
+ rotation: {
1252
+ x?: number;
1253
+ y?: number;
1254
+ z?: number;
1255
+ };
1764
1256
  }
1765
1257
  /**
1766
- * This determines the maximum pulse width.
1258
+ * Defines an interface that represents the options that an EnableARAction or EnableVRAction can have.
1259
+ *
1260
+ * @dochash types/os
1261
+ * @docname EnableXROptions
1767
1262
  */
1768
- export interface RpioPWMSetRangeAction extends AsyncAction {
1769
- type: 'rpio_pwm_setrange';
1770
- /**
1771
- * The pin that you want to use.
1772
- */
1773
- pin: number;
1263
+ export interface EnableXROptions {
1774
1264
  /**
1775
- * The PWM range for a pin.
1265
+ * The frame buffer scale factor that should be used for the XR session.
1266
+ * (see https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getNativeFramebufferScaleFactor)
1267
+ * - Null or undefined indicates that the default should be used. (usually 1)
1268
+ * - A number indicates the ratio of frame buffer pixels to output pixels. (e.g. a value of 2 will cause every 2 frame buffer pixels to be correlated with 1 output pixel, meaning that the render resolution is doubled)
1269
+ * - "recommended" indicates that CasualOS should try to pick the optimal number.
1776
1270
  */
1777
- range: number;
1271
+ frameBufferScaleFactor?: number | 'recommended';
1778
1272
  }
1779
1273
  /**
1780
- * Set the width for a given pin.
1274
+ * Defines an event that enables AR on the device.
1781
1275
  */
1782
- export interface RpioPWMSetDataAction extends AsyncAction {
1783
- type: 'rpio_pwm_setdata';
1276
+ export interface EnableARAction {
1277
+ type: 'enable_ar';
1784
1278
  /**
1785
- * The pin that you want to use.
1279
+ * Whether AR features should be enabled.
1786
1280
  */
1787
- pin: number;
1281
+ enabled: boolean;
1788
1282
  /**
1789
- * The PWM width for a pin.
1283
+ * The additional options that should be used.
1790
1284
  */
1791
- width: number;
1285
+ options: EnableXROptions;
1792
1286
  }
1793
1287
  /**
1794
- * Initiate SPI mode.
1288
+ * Defines an event that checks for AR support on the device.
1795
1289
  */
1796
- export interface RpioSPIBeginAction extends AsyncAction {
1797
- type: 'rpio_spi_begin';
1290
+ export interface ARSupportedAction extends AsyncAction {
1291
+ type: 'ar_supported';
1798
1292
  }
1799
1293
  /**
1800
- * Choose which of the chip select / chip enable pins to control.
1294
+ * Defines an event that checks for VR support on the device.
1801
1295
  */
1802
- export interface RpioSPIChipSelectAction extends AsyncAction {
1803
- type: 'rpio_spi_chipselect';
1804
- value: 0 | 1 | 2;
1296
+ export interface VRSupportedAction extends AsyncAction {
1297
+ type: 'vr_supported';
1805
1298
  }
1806
1299
  /**
1807
- * If your device's CE pin is active high, use this to change the polarity.
1300
+ * Defines an event that enables VR on the device.
1808
1301
  */
1809
- export interface RpioSPISetCSPolarityAction extends AsyncAction {
1810
- type: 'rpio_spi_setcspolarity';
1811
- value: 0 | 1 | 2;
1302
+ export interface EnableVRAction {
1303
+ type: 'enable_vr';
1812
1304
  /**
1813
- * Set the polarity it activates on. HIGH or LOW
1305
+ * Whether VR features should be enabled.
1814
1306
  */
1815
- polarity: 'HIGH' | 'LOW';
1816
- }
1817
- /**
1818
- * Set the SPI clock speed.
1819
- */
1820
- export interface RpioSPISetClockDividerAction extends AsyncAction {
1821
- type: 'rpio_spi_setclockdivider';
1307
+ enabled: boolean;
1822
1308
  /**
1823
- * It is an even divisor of the base 250MHz rate ranging between 0 and 65536.
1309
+ * The additional options that should be used.
1824
1310
  */
1825
- rate: number;
1311
+ options: EnableXROptions;
1826
1312
  }
1827
1313
  /**
1828
- * Set the SPI Data Mode.
1314
+ * Defines an event that enables POV on the device.
1829
1315
  */
1830
- export interface RpioSPISetDataModeAction extends AsyncAction {
1831
- type: 'rpio_spi_setdatamode';
1316
+ export interface EnablePOVAction {
1317
+ type: 'enable_pov';
1832
1318
  /**
1833
- * Mode | CPOL | CPHA
1834
- * -----|------|-----
1835
- * 0 | 0 | 0
1836
- * 1 | 0 | 1
1837
- * 2 | 1 | 0
1838
- * 3 | 1 | 1
1319
+ * Whether POV features should be enabled.
1839
1320
  */
1840
- mode: 0 | 1 | 2 | 3;
1841
- }
1842
- /**
1843
- *
1844
- */
1845
- export interface RpioSPITransferAction extends AsyncAction {
1846
- type: 'rpio_spi_transfer';
1321
+ enabled: boolean;
1847
1322
  /**
1848
- *
1323
+ * The point that the camera should be placed at for POV.
1324
+ */
1325
+ center?: {
1326
+ x: number;
1327
+ y: number;
1328
+ z: number;
1329
+ };
1330
+ /**
1331
+ * Whether IMU features should be enabled while in POV mode.
1849
1332
  */
1850
- tx: number[];
1333
+ imu?: boolean;
1851
1334
  }
1852
1335
  /**
1853
- *
1336
+ * Defines an event that shows a QR code that is a link to a instance & dimension.
1854
1337
  */
1855
- export interface RpioSPIWriteAction extends AsyncAction {
1856
- type: 'rpio_spi_write';
1338
+ export interface ShowJoinCodeAction {
1339
+ type: 'show_join_code';
1857
1340
  /**
1858
- *
1341
+ * The instance that should be joined.
1342
+ */
1343
+ inst?: string;
1344
+ /**
1345
+ * The dimension that should be joined.
1859
1346
  */
1860
- tx: number[];
1347
+ dimension?: string;
1861
1348
  }
1862
1349
  /**
1863
- * Release the pins back to general purpose use.
1350
+ * Defines an event that requests that AUX enter fullscreen mode.
1351
+ * This can be denied by the user.
1864
1352
  */
1865
- export interface RpioSPIEndAction extends AsyncAction {
1866
- type: 'rpio_spi_end';
1353
+ export interface RequestFullscreenAction {
1354
+ type: 'request_fullscreen_mode';
1867
1355
  }
1868
1356
  /**
1869
- * Establish the connection to the bluetooth serial device
1357
+ * Defines an event that exits fullscreen mode.
1870
1358
  */
1871
- export interface SerialConnectAction extends AsyncAction {
1872
- type: 'serial_connect';
1873
- /**
1874
- * A friendly device name. Example: Brush01
1875
- */
1876
- name: string;
1359
+ export interface ExitFullscreenAction {
1360
+ type: 'exit_fullscreen_mode';
1361
+ }
1362
+ /**
1363
+ * Defines the options that a share action can have.
1364
+ *
1365
+ * @dochash types/os
1366
+ * @docname ShareOptions
1367
+ */
1368
+ export interface ShareOptions {
1877
1369
  /**
1878
- * The device path. Example: /dev/rfcomm0
1370
+ * The title of the document being shared.
1879
1371
  */
1880
- device: string;
1372
+ title?: string;
1881
1373
  /**
1882
- * The device MAC address. Example: AA:BB:CC:DD:EE
1374
+ * The text that should be shared.
1883
1375
  */
1884
- mac: string;
1376
+ text?: string;
1885
1377
  /**
1886
- * The device channel. Example: 1
1378
+ * The URL of the document being shared.
1887
1379
  */
1888
- channel: number;
1380
+ url?: string;
1381
+ }
1382
+ /**
1383
+ * Defines an event that shares the given information using the
1384
+ * device's native social sharing capabilities.
1385
+ */
1386
+ export interface ShareAction extends AsyncAction, ShareOptions {
1387
+ type: 'share';
1388
+ }
1389
+ /**
1390
+ * Defines an event that ensures a portal bot has been created for a portal.
1391
+ */
1392
+ export interface RegisterBuiltinPortalAction {
1393
+ type: 'register_builtin_portal';
1889
1394
  /**
1890
- * {boolean} [autoOpen=true] Automatically opens the port on `nextTick`.
1891
- *
1892
- * {number=} [baudRate=9600] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
1893
- *
1894
- * {number} [dataBits=8] Must be one of these: 8, 7, 6, or 5.
1895
- *
1896
- * {number} [highWaterMark=65536] The size of the read and write buffers defaults to 64k.
1897
- *
1898
- * {boolean} [lock=true] Prevent other processes from opening the port. Windows does not currently support `false`.
1899
- *
1900
- * {number} [stopBits=1] Must be one of these: 1 or 2.
1901
- *
1902
- * {string} [parity=none] Must be one of these: 'none', 'even', 'mark', 'odd', 'space'.
1903
- *
1904
- * {boolean} [rtscts=false] flow control setting
1905
- *
1906
- * {boolean} [xon=false] flow control setting
1907
- *
1908
- * {boolean} [xoff=false] flow control setting
1909
- *
1910
- * {boolean} [xany=false] flow control setting
1911
- *
1912
- * {object=} bindingOptions sets binding-specific options
1913
- *
1914
- * {Binding=} Binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. Will default to the static property `Serialport.Binding`.
1915
- *
1916
- * {number} [bindingOptions.vmin=1] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
1917
- *
1918
- * {number} [bindingOptions.vtime=0] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
1395
+ * The ID of the portal.
1919
1396
  */
1920
- options?: object;
1397
+ portalId: string;
1398
+ }
1399
+ /**
1400
+ * The list of types of output that custom portals support.
1401
+ */
1402
+ export type CustomAppOutputType = 'html';
1403
+ /**
1404
+ * the list of modes that custom portals support.
1405
+ */
1406
+ export type CustomPortalOutputMode = 'push' | 'pull';
1407
+ /**
1408
+ * Defines an event that registers a custom app container.
1409
+ */
1410
+ export interface CustomAppContainerAvailableAction extends Action {
1411
+ type: 'custom_app_container_available';
1921
1412
  }
1922
1413
  /**
1923
- * Parses and returns the serial stream to the event tag 'onSerialData'.
1414
+ * Defines an event that registers a custom portal.
1924
1415
  */
1925
- export interface SerialStreamAction extends AsyncAction {
1926
- type: 'serial_stream';
1416
+ export interface RegisterCustomAppAction extends AsyncAction {
1417
+ type: 'register_custom_app';
1927
1418
  /**
1928
- * The id of the bot you want data streamed to. The bot needs the 'onSerialData' tag.
1419
+ * The ID of the app.
1929
1420
  */
1930
- bot: string;
1421
+ appId: string;
1931
1422
  /**
1932
- * A friendly device name. Example: Brush01
1423
+ * The ID of the bot that should be used to configure the portal.
1933
1424
  */
1934
- name: string;
1425
+ botId: string;
1935
1426
  }
1936
1427
  /**
1937
- * Opens the serial connection if you set the option in serialConnect to {autoOpen: false}
1428
+ * Defines an event that unregisters a custom app.
1938
1429
  */
1939
- export interface SerialOpenAction extends AsyncAction {
1940
- type: 'serial_open';
1430
+ export interface UnregisterCustomAppAction extends AsyncAction {
1431
+ type: 'unregister_custom_app';
1941
1432
  /**
1942
- * A friendly device name. Example: Brush01
1433
+ * The ID of the app.
1943
1434
  */
1944
- name: string;
1435
+ appId: string;
1945
1436
  }
1946
1437
  /**
1947
- * Updates the SerialPort object with a new baudRate.
1438
+ * Defines an event that requests that a HTML app be created.
1948
1439
  */
1949
- export interface SerialUpdateAction extends AsyncAction {
1950
- type: 'serial_update';
1440
+ export interface RegisterHtmlAppAction extends AsyncAction {
1441
+ type: 'register_html_app';
1951
1442
  /**
1952
- * A friendly device name. Example: Brush01
1443
+ * The ID of the app.
1953
1444
  */
1954
- name: string;
1445
+ appId: string;
1446
+ /**
1447
+ * The ID of the app instance.
1448
+ * Used to distinguish between multiple instances of the same app.
1449
+ */
1450
+ instanceId: string;
1451
+ }
1452
+ /**
1453
+ * Defines an event that requests that a HTML app be deleted.
1454
+ */
1455
+ export interface UnregisterHtmlAppAction extends Action {
1456
+ type: 'unregister_html_app';
1955
1457
  /**
1956
- * {number=} [baudRate=9600] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
1458
+ * The ID of the app.
1957
1459
  */
1958
- options: object;
1460
+ appId: string;
1959
1461
  /**
1960
- *
1462
+ * The ID of the app instance.
1463
+ * Used to distinguish between multiple instances of the same app.
1961
1464
  */
1962
- cb?: any;
1465
+ instanceId: string;
1963
1466
  }
1964
1467
  /**
1965
- * Writes the provided data/command to the device
1468
+ * Defines an event that notifies that the output of a app should be updated with the given data.
1966
1469
  */
1967
- export interface SerialWriteAction extends AsyncAction {
1968
- type: 'serial_write';
1470
+ export interface SetAppOutputAction extends Action {
1471
+ type: 'set_app_output';
1969
1472
  /**
1970
- * A friendly device name. Example: Brush01
1473
+ * The ID of the app.
1971
1474
  */
1972
- name: string;
1475
+ appId: string;
1973
1476
  /**
1974
- * The data/command to send.
1477
+ * The output that the app should show.
1975
1478
  */
1976
- data: string | number[];
1479
+ output: any;
1480
+ uncopiable: true;
1481
+ }
1482
+ /**
1483
+ * Defines an event that notifies that a custom app has recieved a HTML update.
1484
+ */
1485
+ export interface UpdateHtmlAppAction extends Action {
1486
+ type: 'update_html_app';
1977
1487
  /**
1978
- * The encoding, if chunk is a string. Defaults to 'utf8'. Also accepts 'utf16le', 'latin1', 'ascii', 'base64', 'binary', 'ucs2', and 'hex'
1488
+ * The ID of the app.
1979
1489
  */
1980
- encoding?: string;
1490
+ appId: string;
1981
1491
  /**
1982
- *
1492
+ * The array of mutation rectords that represent the changes to the HTML.
1983
1493
  */
1984
- cb?: any;
1494
+ updates: SerializableMutationRecord[];
1495
+ [UNMAPPABLE]: true;
1985
1496
  }
1986
1497
  /**
1987
- * Request a number of bytes from the SerialPort.
1498
+ * Defines an event that represents an event that was dispatched from HTML in a portal.
1988
1499
  */
1989
- export interface SerialReadAction extends AsyncAction {
1990
- type: 'serial_read';
1500
+ export interface HtmlAppEventAction extends Action {
1501
+ type: 'html_app_event';
1991
1502
  /**
1992
- * A friendly device name. Example: Brush01
1503
+ * The ID of the app.
1993
1504
  */
1994
- name: string;
1505
+ appId: string;
1995
1506
  /**
1996
- * Specify how many bytes of data to return, if available
1507
+ * The event.
1997
1508
  */
1998
- size?: number;
1509
+ event: any;
1999
1510
  }
2000
1511
  /**
2001
- * Closes an open connection.
1512
+ * Defines an event that represents a method call that was dispatched from HTML in a portal.
2002
1513
  */
2003
- export interface SerialCloseAction extends AsyncAction {
2004
- type: 'serial_close';
1514
+ export interface HtmlAppMethodCallAction extends AsyncAction {
1515
+ type: 'html_app_method_call';
2005
1516
  /**
2006
- * A friendly device name. Example: Brush01
1517
+ * The ID of the app.
2007
1518
  */
2008
- name: string;
1519
+ appId: string;
2009
1520
  /**
2010
- * The device path. Example: /dev/rfcomm0
1521
+ * The ID of the node that the method was called on.
2011
1522
  */
2012
- device: string;
1523
+ nodeId: string;
2013
1524
  /**
2014
- *
1525
+ * The name of the method.
2015
1526
  */
2016
- cb?: any;
2017
- }
2018
- /**
2019
- * Flush discards data that has been received but not read, or written but not transmitted by the operating system.
2020
- */
2021
- export interface SerialFlushAction extends AsyncAction {
2022
- type: 'serial_flush';
1527
+ methodName: string;
2023
1528
  /**
2024
- * A friendly device name. Example: Brush01
1529
+ * The arguments that the method was called with.
2025
1530
  */
2026
- name: string;
1531
+ args: any[];
2027
1532
  }
2028
1533
  /**
2029
- * Waits until all output data is transmitted to the serial port. After any pending write has completed, it calls `tcdrain()` or `FlushFileBuffers()` to ensure it has been written to the device.
1534
+ * Defines a mutation record that can be serialized and sent over a web worker pipe.
2030
1535
  */
2031
- export interface SerialDrainAction extends AsyncAction {
2032
- type: 'serial_drain';
1536
+ export interface SerializableMutationRecord {
1537
+ type: 'attributes' | 'characterData' | 'childList' | 'event_listener';
1538
+ target: NodeReference;
1539
+ addedNodes: NodeReference[];
1540
+ removedNodes: NodeReference[];
1541
+ previousSibling: NodeReference;
1542
+ nextSibling: NodeReference;
1543
+ attributeName: string;
1544
+ attributeNamespace: string;
1545
+ oldValue: string;
2033
1546
  /**
2034
- * A friendly device name. Example: Brush01
1547
+ * The name of the event listener.
2035
1548
  */
2036
- name: string;
2037
- }
2038
- /**
2039
- * Causes a stream in flowing mode to stop emitting 'data' events, switching out of flowing mode. Any data that becomes available remains in the internal buffer.
2040
- */
2041
- export interface SerialPauseAction extends AsyncAction {
2042
- type: 'serial_pause';
1549
+ listenerName?: string;
2043
1550
  /**
2044
- * A friendly device name. Example: Brush01
1551
+ * The number of event listeners that were added (positive number) or removed (negative number).
2045
1552
  */
2046
- name: string;
1553
+ listenerDelta?: number;
1554
+ }
1555
+ export interface NodeReference {
1556
+ __id: string;
2047
1557
  }
2048
1558
  /**
2049
- * Causes an explicitly paused, Readable stream to resume emitting 'data' events, switching the stream into flowing mode.
1559
+ * Defines an event that adds an entry point to a custom portal.
2050
1560
  */
2051
- export interface SerialResumeAction extends AsyncAction {
2052
- type: 'serial_resume';
1561
+ export interface RegisterPrefixAction extends AsyncAction {
1562
+ type: 'register_prefix';
2053
1563
  /**
2054
- * A friendly device name. Example: Brush01
1564
+ * The prefix that should be registered.
2055
1565
  */
2056
- name: string;
1566
+ prefix: string;
1567
+ /**
1568
+ * The options that should be used for the prefix.
1569
+ */
1570
+ options: RegisterPrefixOptions;
2057
1571
  }
2058
1572
  /**
2059
- * Defines an event that sets some text on the user's clipboard.
1573
+ * Defines an interface that contains options for register prefix actions.
1574
+ *
1575
+ * @dochash types/core
1576
+ * @docname RegisterPrefixOptions
2060
1577
  */
2061
- export interface SetClipboardAction {
2062
- type: 'set_clipboard';
1578
+ export interface RegisterPrefixOptions {
2063
1579
  /**
2064
- * The text that the clipboard should be set to.
1580
+ * The possible languages that prefixes can use.
2065
1581
  */
2066
- text: string;
1582
+ language?: 'javascript' | 'typescript' | 'json' | 'jsx' | 'tsx' | 'text';
1583
+ /**
1584
+ * The name of the prefix.
1585
+ */
1586
+ name?: string;
2067
1587
  }
2068
1588
  /**
2069
- * Defines an event that shows the chat bar.
1589
+ * An event that is used to show or hide the circle wipe.
2070
1590
  */
2071
- export interface ShowChatBarAction {
2072
- type: 'show_chat_bar';
1591
+ export interface OpenCircleWipeAction extends AsyncAction {
1592
+ type: 'show_circle_wipe';
2073
1593
  /**
2074
- * Whether the chat bar should be visible.
1594
+ * Whether the circle wipe should be visible.
2075
1595
  */
2076
- visible: boolean;
1596
+ open: boolean;
2077
1597
  /**
2078
- * The text that the bar should be filled with by default.
1598
+ * The options for the circle wipe.
2079
1599
  */
2080
- prefill?: string;
1600
+ options: OpenCircleWipeOptions;
1601
+ }
1602
+ /**
1603
+ * The options for the circle wipe.
1604
+ */
1605
+ export interface OpenCircleWipeOptions {
2081
1606
  /**
2082
- * The text that the bar should have as the placeholder.
1607
+ * The duration of this half of the circle wipe animation in seconds.
2083
1608
  */
2084
- placeholder?: string;
1609
+ duration: number;
2085
1610
  /**
2086
- * The color to use for the placeholder.
1611
+ * The color that the circle wipe should be.
2087
1612
  */
2088
- placeholderColor?: string;
1613
+ color: string;
1614
+ }
1615
+ /**
1616
+ * Defines a base interface for actions that can add drop snap points.
1617
+ */
1618
+ export interface AddDropSnapAction extends Action {
2089
1619
  /**
2090
- * The color to use for the background.
1620
+ * The ID of the bot that, when it is a drop target, the snap points should be enabled.
1621
+ * If null, then the targets apply globally during the drag operation.
2091
1622
  */
2092
- backgroundColor?: string;
1623
+ botId?: string;
1624
+ }
1625
+ /**
1626
+ * An event that is used to add some snap points for a drag operation.
1627
+ */
1628
+ export interface AddDropSnapTargetsAction extends AddDropSnapAction {
1629
+ type: 'add_drop_snap_targets';
2093
1630
  /**
2094
- * The color to use for the foreground (text).
1631
+ * The list of snap targets that should be used.
2095
1632
  */
2096
- foregroundColor?: string;
1633
+ targets: SnapTarget[];
2097
1634
  }
2098
1635
  /**
2099
- * Defines the possible options for showing the chat bar.
1636
+ * Defines an interface that represents a snap point.
1637
+ * That is, a point in 3D space with an associated snap distance.
2100
1638
  *
2101
1639
  * @dochash types/os
2102
- * @docname ShowChatOptions
1640
+ * @docgroup 10-snap
1641
+ * @docorder 1
1642
+ * @docname SnapPoint
2103
1643
  */
2104
- export interface ShowChatOptions {
1644
+ export interface SnapPoint {
2105
1645
  /**
2106
- * The text that the bar should be filled with by default.
1646
+ * The 3D position for the point.
1647
+ *
1648
+ * @docsource Vector3
2107
1649
  */
2108
- prefill?: string;
2109
- /**
2110
- * The text that the bar should have as the placeholder.
2111
- */
2112
- placeholder?: string;
2113
- /**
2114
- * The color to use for the placeholder.
2115
- */
2116
- placeholderColor?: string;
2117
- /**
2118
- * The color to use for the background.
2119
- */
2120
- backgroundColor?: string;
2121
- /**
2122
- * The color to use for the foreground (text).
2123
- */
2124
- foregroundColor?: string;
2125
- }
2126
- /**
2127
- * Defines an event that executes a script.
2128
- */
2129
- export interface RunScriptAction extends AsyncAction {
2130
- type: 'run_script';
2131
- /**
2132
- * The script that should be executed.
2133
- */
2134
- script: string;
2135
- }
2136
- /**
2137
- * Defines an event that shows the "upload AUX file" dialog.
2138
- */
2139
- export interface ShowUploadAuxFileAction {
2140
- type: 'show_upload_aux_file';
2141
- }
2142
- /**
2143
- * Defines an event that shows the "uplaod file" dialog.
2144
- */
2145
- export interface ShowUploadFilesAction extends AsyncAction {
2146
- type: 'show_upload_files';
2147
- }
2148
- /**
2149
- * Defines an event that marks a specific point in history.
2150
- */
2151
- export interface MarkHistoryAction {
2152
- type: 'mark_history';
2153
- /**
2154
- * The message that the mark should contain.
2155
- */
2156
- message: string;
2157
- }
2158
- /**
2159
- * Defines an event that loads the history into the instance.
2160
- */
2161
- export interface BrowseHistoryAction {
2162
- type: 'browse_history';
2163
- }
2164
- /**
2165
- * Defines an event that restores the current state to a specific bookmark.
2166
- */
2167
- export interface RestoreHistoryMarkAction {
2168
- type: 'restore_history_mark';
2169
- /**
2170
- * The ID of the mark that should be restored.
2171
- */
2172
- mark: string;
2173
- /**
2174
- * The instance that the mark should be restored to.
2175
- * If not specified, then the current instance will be used.
2176
- */
2177
- inst?: string;
2178
- }
2179
- /**
2180
- * Defines an event that loads a space into the instance.
2181
- */
2182
- export interface LoadSpaceAction extends Partial<AsyncAction> {
2183
- type: 'load_space';
2184
- /**
2185
- * The space that should be loaded.
2186
- */
2187
- space: BotSpace;
2188
- /**
2189
- * The config that should be used to load the space.
2190
- */
2191
- config: any;
2192
- }
2193
- /**
2194
- * Defines an event that loads bots from the given space that match the given tags and values.
2195
- */
2196
- export interface LoadBotsAction extends AsyncAction {
2197
- type: 'load_bots';
2198
- /**
2199
- * The space that should be searched.
2200
- */
2201
- space: string;
2202
- /**
2203
- * The tags that the loaded bots should have.
2204
- */
2205
- tags: TagFilter[];
2206
- }
2207
- /**
2208
- * Defines an interface for objects that specify a tag and value
2209
- * that a bot should have to be loaded.
2210
- */
2211
- export interface TagFilter {
2212
- /**
2213
- * The tag that the bot should have.
2214
- */
2215
- tag: string;
2216
- /**
2217
- * The value that the bot should have.
2218
- */
2219
- value?: any;
2220
- }
2221
- /**
2222
- * Defines an event that clears all bots from a space.
2223
- *
2224
- * Only supported for the following spaces:
2225
- * - error
2226
- */
2227
- export interface ClearSpaceAction extends AsyncAction {
2228
- type: 'clear_space';
2229
- /**
2230
- * The space to clear.
2231
- */
2232
- space: string;
2233
- }
2234
- /**
2235
- * Defines an event that unlocks the given space for editing.
2236
- * Once a space is unlocked, it cannot be locked for the remainder of the session.
2237
- *
2238
- * Only supported for the following spaces:
2239
- * - admin
2240
- */
2241
- export interface UnlockSpaceAction extends AsyncAction {
2242
- type: 'unlock_space';
2243
- /**
2244
- * The space to unlock.
2245
- */
2246
- space: BotSpace;
2247
- /**
2248
- * The password to use to unlock the space.
2249
- */
2250
- password: string;
2251
- }
2252
- /**
2253
- * Defines an event that sets the password used to unlock the given space for editing.
2254
- */
2255
- export interface SetSpacePasswordAction extends AsyncAction {
2256
- type: 'set_space_password';
2257
- /**
2258
- * The space to set the password for.
2259
- */
2260
- space: BotSpace;
2261
- /**
2262
- * The old password for the space.
2263
- */
2264
- oldPassword: string;
2265
- /**
2266
- * The new password for the space.
2267
- */
2268
- newPassword: string;
2269
- }
2270
- /**
2271
- * Defines an event that runs an animation locally over
2272
- * whatever existing animations are playing.
2273
- */
2274
- export interface LocalFormAnimationAction {
2275
- type: 'local_form_animation';
2276
- /**
2277
- * The bot to run the animation on.
2278
- */
2279
- botId: string;
2280
- /**
2281
- * The animation to run.
2282
- */
2283
- animation: number | string;
2284
- }
2285
- export type TweenType = 'position' | 'rotation';
2286
- /**
2287
- * The possible easing types.
2288
- * @dochash types/animation
2289
- * @docname EaseType
2290
- */
2291
- export type EaseType = 'linear' | 'quadratic' | 'cubic' | 'quartic' | 'quintic' | 'sinusoidal' | 'exponential' | 'circular' | 'elastic';
2292
- /**
2293
- * The possible easing modes.
2294
- * @dochash types/animation
2295
- * @docname EaseMode
2296
- */
2297
- export type EaseMode = 'in' | 'out' | 'inout';
2298
- /**
2299
- * Defines an interface that represents easing types.
2300
- *
2301
- * @example Create an object that represents "quadratic" "inout" easing
2302
- * let easing = {
2303
- * type: "quadratic",
2304
- * mode: "inout"
2305
- * };
2306
- *
2307
- * @dochash types/animation
2308
- * @docname Easing
2309
- */
2310
- export interface Easing {
2311
- /**
2312
- * The type of easing to use.
2313
- */
2314
- type: EaseType;
2315
- /**
2316
- * The mode of easing to use.
2317
- */
2318
- mode: EaseMode;
2319
- }
2320
- /**
2321
- * The maximum allowed duration for tweens.
2322
- */
2323
- export declare const MAX_TWEEN_DURATION: number;
2324
- /**
2325
- * Defines an event that runs a tween locally.
2326
- */
2327
- export interface LocalTweenAction extends AsyncAction {
2328
- type: 'local_tween';
2329
- /**
2330
- * The bot to run the tween on.
2331
- */
2332
- botId: string;
2333
- /**
2334
- * The dimension that the bot should be tweened in.
2335
- */
2336
- dimension: string;
2337
- /**
2338
- * The type of the tween.
2339
- */
2340
- tweenType: TweenType;
2341
- /**
2342
- * The easing that should be used.
2343
- */
2344
- easing: Easing;
2345
- /**
2346
- * The duration of the tween in seconds.
2347
- */
2348
- duration: number;
2349
- }
2350
- /**
2351
- * Defines an event that runs a position tween locally.
2352
- */
2353
- export interface LocalPositionTweenAction extends LocalTweenAction {
2354
- tweenType: 'position';
2355
- /**
2356
- * The target position of the tween.
2357
- */
2358
- position: {
2359
- x?: number;
2360
- y?: number;
2361
- z?: number;
2362
- };
2363
- }
2364
- export interface LocalRotationTweenAction extends LocalTweenAction {
2365
- tweenType: 'rotation';
2366
- rotation: {
2367
- x?: number;
2368
- y?: number;
2369
- z?: number;
2370
- };
2371
- }
2372
- /**
2373
- * Defines an interface that represents the options that an EnableARAction or EnableVRAction can have.
2374
- *
2375
- * @dochash types/os
2376
- * @docname EnableXROptions
2377
- */
2378
- export interface EnableXROptions {
2379
- /**
2380
- * The frame buffer scale factor that should be used for the XR session.
2381
- * (see https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLLayer/getNativeFramebufferScaleFactor)
2382
- * - Null or undefined indicates that the default should be used. (usually 1)
2383
- * - A number indicates the ratio of frame buffer pixels to output pixels. (e.g. a value of 2 will cause every 2 frame buffer pixels to be correlated with 1 output pixel, meaning that the render resolution is doubled)
2384
- * - "recommended" indicates that CasualOS should try to pick the optimal number.
2385
- */
2386
- frameBufferScaleFactor?: number | 'recommended';
2387
- }
2388
- /**
2389
- * Defines an event that enables AR on the device.
2390
- */
2391
- export interface EnableARAction {
2392
- type: 'enable_ar';
2393
- /**
2394
- * Whether AR features should be enabled.
2395
- */
2396
- enabled: boolean;
2397
- /**
2398
- * The additional options that should be used.
2399
- */
2400
- options: EnableXROptions;
2401
- }
2402
- /**
2403
- * Defines an event that checks for AR support on the device.
2404
- */
2405
- export interface ARSupportedAction extends AsyncAction {
2406
- type: 'ar_supported';
2407
- }
2408
- /**
2409
- * Defines an event that checks for VR support on the device.
2410
- */
2411
- export interface VRSupportedAction extends AsyncAction {
2412
- type: 'vr_supported';
2413
- }
2414
- /**
2415
- * Defines an event that enables VR on the device.
2416
- */
2417
- export interface EnableVRAction {
2418
- type: 'enable_vr';
2419
- /**
2420
- * Whether VR features should be enabled.
2421
- */
2422
- enabled: boolean;
2423
- /**
2424
- * The additional options that should be used.
2425
- */
2426
- options: EnableXROptions;
2427
- }
2428
- /**
2429
- * Defines an event that enables POV on the device.
2430
- */
2431
- export interface EnablePOVAction {
2432
- type: 'enable_pov';
2433
- /**
2434
- * Whether POV features should be enabled.
2435
- */
2436
- enabled: boolean;
2437
- /**
2438
- * The point that the camera should be placed at for POV.
2439
- */
2440
- center?: {
2441
- x: number;
2442
- y: number;
2443
- z: number;
2444
- };
2445
- /**
2446
- * Whether IMU features should be enabled while in POV mode.
2447
- */
2448
- imu?: boolean;
2449
- }
2450
- /**
2451
- * Defines an event that shows a QR code that is a link to a instance & dimension.
2452
- */
2453
- export interface ShowJoinCodeAction {
2454
- type: 'show_join_code';
2455
- /**
2456
- * The instance that should be joined.
2457
- */
2458
- inst?: string;
2459
- /**
2460
- * The dimension that should be joined.
2461
- */
2462
- dimension?: string;
2463
- }
2464
- /**
2465
- * Defines an event that requests that AUX enter fullscreen mode.
2466
- * This can be denied by the user.
2467
- */
2468
- export interface RequestFullscreenAction {
2469
- type: 'request_fullscreen_mode';
2470
- }
2471
- /**
2472
- * Defines an event that exits fullscreen mode.
2473
- */
2474
- export interface ExitFullscreenAction {
2475
- type: 'exit_fullscreen_mode';
2476
- }
2477
- /**
2478
- * Defines the options that a share action can have.
2479
- *
2480
- * @dochash types/os
2481
- * @docname ShareOptions
2482
- */
2483
- export interface ShareOptions {
2484
- /**
2485
- * The title of the document being shared.
2486
- */
2487
- title?: string;
2488
- /**
2489
- * The text that should be shared.
2490
- */
2491
- text?: string;
2492
- /**
2493
- * The URL of the document being shared.
2494
- */
2495
- url?: string;
2496
- }
2497
- /**
2498
- * Defines an event that shares the given information using the
2499
- * device's native social sharing capabilities.
2500
- */
2501
- export interface ShareAction extends AsyncAction, ShareOptions {
2502
- type: 'share';
2503
- }
2504
- /**
2505
- * Defines an event that ensures a portal bot has been created for a portal.
2506
- */
2507
- export interface RegisterBuiltinPortalAction {
2508
- type: 'register_builtin_portal';
2509
- /**
2510
- * The ID of the portal.
2511
- */
2512
- portalId: string;
2513
- }
2514
- /**
2515
- * The list of types of output that custom portals support.
2516
- */
2517
- export type CustomAppOutputType = 'html';
2518
- /**
2519
- * the list of modes that custom portals support.
2520
- */
2521
- export type CustomPortalOutputMode = 'push' | 'pull';
2522
- /**
2523
- * Defines an event that registers a custom app container.
2524
- */
2525
- export interface CustomAppContainerAvailableAction extends Action {
2526
- type: 'custom_app_container_available';
2527
- }
2528
- /**
2529
- * Defines an event that registers a custom portal.
2530
- */
2531
- export interface RegisterCustomAppAction extends AsyncAction {
2532
- type: 'register_custom_app';
2533
- /**
2534
- * The ID of the app.
2535
- */
2536
- appId: string;
2537
- /**
2538
- * The ID of the bot that should be used to configure the portal.
2539
- */
2540
- botId: string;
2541
- }
2542
- /**
2543
- * Defines an event that unregisters a custom app.
2544
- */
2545
- export interface UnregisterCustomAppAction extends AsyncAction {
2546
- type: 'unregister_custom_app';
2547
- /**
2548
- * The ID of the app.
2549
- */
2550
- appId: string;
2551
- }
2552
- /**
2553
- * Defines an event that requests that a HTML app be created.
2554
- */
2555
- export interface RegisterHtmlAppAction extends AsyncAction {
2556
- type: 'register_html_app';
2557
- /**
2558
- * The ID of the app.
2559
- */
2560
- appId: string;
2561
- /**
2562
- * The ID of the app instance.
2563
- * Used to distinguish between multiple instances of the same app.
2564
- */
2565
- instanceId: string;
2566
- }
2567
- /**
2568
- * Defines an event that requests that a HTML app be deleted.
2569
- */
2570
- export interface UnregisterHtmlAppAction extends Action {
2571
- type: 'unregister_html_app';
2572
- /**
2573
- * The ID of the app.
2574
- */
2575
- appId: string;
2576
- /**
2577
- * The ID of the app instance.
2578
- * Used to distinguish between multiple instances of the same app.
2579
- */
2580
- instanceId: string;
2581
- }
2582
- /**
2583
- * Defines an event that notifies that the output of a app should be updated with the given data.
2584
- */
2585
- export interface SetAppOutputAction extends Action {
2586
- type: 'set_app_output';
2587
- /**
2588
- * The ID of the app.
2589
- */
2590
- appId: string;
2591
- /**
2592
- * The output that the app should show.
2593
- */
2594
- output: any;
2595
- uncopiable: true;
2596
- }
2597
- /**
2598
- * Defines an event that notifies that a custom app has recieved a HTML update.
2599
- */
2600
- export interface UpdateHtmlAppAction extends Action {
2601
- type: 'update_html_app';
2602
- /**
2603
- * The ID of the app.
2604
- */
2605
- appId: string;
2606
- /**
2607
- * The array of mutation rectords that represent the changes to the HTML.
2608
- */
2609
- updates: SerializableMutationRecord[];
2610
- [UNMAPPABLE]: true;
2611
- }
2612
- /**
2613
- * Defines an event that represents an event that was dispatched from HTML in a portal.
2614
- */
2615
- export interface HtmlAppEventAction extends Action {
2616
- type: 'html_app_event';
2617
- /**
2618
- * The ID of the app.
2619
- */
2620
- appId: string;
2621
- /**
2622
- * The event.
2623
- */
2624
- event: any;
2625
- }
2626
- /**
2627
- * Defines an event that represents a method call that was dispatched from HTML in a portal.
2628
- */
2629
- export interface HtmlAppMethodCallAction extends AsyncAction {
2630
- type: 'html_app_method_call';
2631
- /**
2632
- * The ID of the app.
2633
- */
2634
- appId: string;
2635
- /**
2636
- * The ID of the node that the method was called on.
2637
- */
2638
- nodeId: string;
2639
- /**
2640
- * The name of the method.
2641
- */
2642
- methodName: string;
2643
- /**
2644
- * The arguments that the method was called with.
2645
- */
2646
- args: any[];
2647
- }
2648
- /**
2649
- * Defines a mutation record that can be serialized and sent over a web worker pipe.
2650
- */
2651
- export interface SerializableMutationRecord {
2652
- type: 'attributes' | 'characterData' | 'childList' | 'event_listener';
2653
- target: NodeReference;
2654
- addedNodes: NodeReference[];
2655
- removedNodes: NodeReference[];
2656
- previousSibling: NodeReference;
2657
- nextSibling: NodeReference;
2658
- attributeName: string;
2659
- attributeNamespace: string;
2660
- oldValue: string;
2661
- /**
2662
- * The name of the event listener.
2663
- */
2664
- listenerName?: string;
2665
- /**
2666
- * The number of event listeners that were added (positive number) or removed (negative number).
2667
- */
2668
- listenerDelta?: number;
2669
- }
2670
- export interface NodeReference {
2671
- __id: string;
2672
- }
2673
- /**
2674
- * Defines an event that adds an entry point to a custom portal.
2675
- */
2676
- export interface RegisterPrefixAction extends AsyncAction {
2677
- type: 'register_prefix';
2678
- /**
2679
- * The prefix that should be registered.
2680
- */
2681
- prefix: string;
2682
- /**
2683
- * The options that should be used for the prefix.
2684
- */
2685
- options: RegisterPrefixOptions;
2686
- }
2687
- /**
2688
- * Defines an interface that contains options for register prefix actions.
2689
- *
2690
- * @dochash types/core
2691
- * @docname RegisterPrefixOptions
2692
- */
2693
- export interface RegisterPrefixOptions {
2694
- /**
2695
- * The possible languages that prefixes can use.
2696
- */
2697
- language?: 'javascript' | 'typescript' | 'json' | 'jsx' | 'tsx' | 'text';
2698
- /**
2699
- * The name of the prefix.
2700
- */
2701
- name?: string;
2702
- }
2703
- /**
2704
- * An event that is used to show or hide the circle wipe.
2705
- */
2706
- export interface OpenCircleWipeAction extends AsyncAction {
2707
- type: 'show_circle_wipe';
2708
- /**
2709
- * Whether the circle wipe should be visible.
2710
- */
2711
- open: boolean;
2712
- /**
2713
- * The options for the circle wipe.
2714
- */
2715
- options: OpenCircleWipeOptions;
2716
- }
2717
- /**
2718
- * The options for the circle wipe.
2719
- */
2720
- export interface OpenCircleWipeOptions {
2721
- /**
2722
- * The duration of this half of the circle wipe animation in seconds.
2723
- */
2724
- duration: number;
2725
- /**
2726
- * The color that the circle wipe should be.
2727
- */
2728
- color: string;
2729
- }
2730
- /**
2731
- * Defines a base interface for actions that can add drop snap points.
2732
- */
2733
- export interface AddDropSnapAction extends Action {
2734
- /**
2735
- * The ID of the bot that, when it is a drop target, the snap points should be enabled.
2736
- * If null, then the targets apply globally during the drag operation.
2737
- */
2738
- botId?: string;
2739
- }
2740
- /**
2741
- * An event that is used to add some snap points for a drag operation.
2742
- */
2743
- export interface AddDropSnapTargetsAction extends AddDropSnapAction {
2744
- type: 'add_drop_snap_targets';
2745
- /**
2746
- * The list of snap targets that should be used.
2747
- */
2748
- targets: SnapTarget[];
2749
- }
2750
- /**
2751
- * Defines an interface that represents a snap point.
2752
- * That is, a point in 3D space with an associated snap distance.
2753
- *
2754
- * @dochash types/os
2755
- * @docgroup 10-snap
2756
- * @docorder 1
2757
- * @docname SnapPoint
2758
- */
2759
- export interface SnapPoint {
2760
- /**
2761
- * The 3D position for the point.
2762
- *
2763
- * @docsource Vector3
2764
- */
2765
- position: {
2766
- x: number;
2767
- y: number;
2768
- z: number;
2769
- };
2770
- /**
2771
- * The distance that the snap point should take effect at.
2772
- */
2773
- distance: number;
2774
- }
2775
- /**
2776
- * Defines an interface that represents a snap axis.
2777
- * That is, a ray in 3D space with an associated snap distance.
2778
- *
2779
- * @dochash types/os
2780
- * @docgroup 10-snap
2781
- * @docorder 2
2782
- * @docname SnapAxis
2783
- */
2784
- export interface SnapAxis {
2785
- /**
2786
- * The 3D direction that the axis ray travels along.
2787
- *
2788
- * @docsource Vector3
2789
- */
2790
- direction: {
2791
- x: number;
2792
- y: number;
2793
- z: number;
2794
- };
2795
- /**
2796
- * The 3D position that the ray starts at.
2797
- *
2798
- * @docsource Vector3
2799
- */
2800
- origin: {
2801
- x: number;
2802
- y: number;
2803
- z: number;
2804
- };
2805
- /**
2806
- * The distance from the ray line that the snap point should take effect at.
2807
- */
2808
- distance: number;
2809
- }
2810
- /**
2811
- * The list of possible snap targets.
2812
- * - `"ground"` means that the dragged bot should snap to the ground plane. This option is overriden by "grid".
2813
- * - `"grid"` means that the dragged bot should snap to grid tiles.
2814
- * - `"face"` means that the dragged bot should snap to other bot faces.
2815
- * - `"bots"` means that the dragged bot will snap to other bots.
2816
- *
2817
- * @dochash types/os
2818
- * @docgroup 10-snap
2819
- * @docorder 0
2820
- * @docname SnapTarget
2821
- */
2822
- export type SnapTarget = 'ground' | 'grid' | 'face' | 'bots' | SnapPoint | SnapAxis;
2823
- /**
2824
- * An event that is used to add grids as possible drop locations for a drag operation.
2825
- */
2826
- export interface AddDropGridTargetsAction extends AddDropSnapAction {
2827
- type: 'add_drop_grid_targets';
2828
- /**
2829
- * The list of grids that bots should be snapped to.
2830
- */
2831
- targets: SnapGrid[];
2832
- }
2833
- /**
2834
- * Defines an interface that represents a snap grid.
2835
- * That is, a 2D plane that is segmented into discrete sections.
2836
- */
2837
- export interface SnapGrid {
2838
- /**
2839
- * The 3D position of the grid.
2840
- * If not specified, then 0,0,0 is used.
2841
- */
2842
- position?: {
2843
- x: number;
2844
- y: number;
2845
- z: number;
2846
- };
2847
- /**
2848
- * The 3D rotation of the grid.
2849
- * If not specified, then the identity rotation is used.
2850
- */
2851
- rotation?: {
2852
- x: number;
2853
- y: number;
2854
- z: number;
2855
- w?: number;
2856
- };
2857
- /**
2858
- * The ID of the bot that defines the portal that this grid should use.
2859
- * If not specifed, then the config bot is used.
2860
- */
2861
- portalBotId?: string;
2862
- /**
2863
- * The tag that contains the portal dimension.
2864
- * If a portalBotId is specified, then this defaults to formAddress.
2865
- * If a portalBotId is not specified, then this defaults to gridPortal.
2866
- */
2867
- portalTag?: string;
2868
- /**
2869
- * The priority that the snap grid has.
2870
- * Higher numbers mean higher priority.
2871
- */
2872
- priority?: number;
2873
- /**
2874
- * The bounds that the snap grid has.
2875
- * If not specified, then default bounds are used.
2876
- */
2877
- bounds?: {
2878
- x: number;
2879
- y: number;
2880
- };
2881
- /**
2882
- * Whether to visualize the grid when dragging bots around.
2883
- * Defaults to false.
2884
- */
2885
- showGrid?: boolean;
2886
- /**
2887
- * The type of grid that this snap grid should be.
2888
- * Defaults to the type of grid that the portal bot uses.
2889
- *
2890
- * - "grid" indicates that the snap target should be a flat grid.
2891
- * - "sphere" indicates that the snap target should be a sphere.
2892
- */
2893
- type?: 'grid' | 'sphere';
2894
- }
2895
- /**
2896
- * An event that is used to disable the default dragging logic (moving the bot) and enable
2897
- * "onDragging" shouts and whispers.
2898
- */
2899
- export interface EnableCustomDraggingAction extends Action {
2900
- type: 'enable_custom_dragging';
2901
- }
2902
- /**
2903
- * An event that is used to start audio recording.
2904
- */
2905
- export interface BeginAudioRecordingAction extends AsyncAction {
2906
- type: 'begin_audio_recording';
2907
- /**
2908
- * Whether to stream the audio recording.
2909
- * If streaming is enabled, then @onAudioChunk will be triggered whenever a new
2910
- * piece of audio is available.
2911
- */
2912
- stream?: boolean;
2913
- /**
2914
- * The MIME type that should be produced.
2915
- * Defaults to a containerized format (audio/mp3, audio/webm, etc.) if not specified.
2916
- */
2917
- mimeType?: string;
2918
- /**
2919
- * The number of samples per second (Hz) that audio/x-raw recordings should use.
2920
- * Defaults to 44100 if not specified.
2921
- */
2922
- sampleRate?: number;
2923
- }
2924
- /**
2925
- * An event that is used to finish audio recording.
2926
- */
2927
- export interface EndAudioRecordingAction extends AsyncAction {
2928
- type: 'end_audio_recording';
2929
- }
2930
- /**
2931
- * An interface that represents the options that can be used for making recordings.
2932
- *
2933
- * @dochash types/experimental
2934
- * @doctitle Experimental Types
2935
- * @docsidebar Experimental
2936
- * @docdescription Defines the types that are used by experimental actions.
2937
- * @docname RecordingOptions
2938
- */
2939
- export interface RecordingOptions {
2940
- /**
2941
- * Whether to record audio.
2942
- *
2943
- * If the computer does not have an audio device attached, then setting this to true
2944
- * will cause an error.
2945
- *
2946
- * If an array is specified, only the specified audio sources will be recorded.
2947
- *
2948
- * Defaults to true.
2949
- */
2950
- audio: boolean | ('screen' | 'microphone')[];
2951
- /**
2952
- * Whether to record video.
2953
- *
2954
- * If the computer does not have a video device attached (like a web cam),
2955
- * then setting this to true will cause an error.
2956
- *
2957
- * Defaults to true.
2958
- */
2959
- video: boolean;
2960
- /**
2961
- * Whether to record the screen.
2962
- *
2963
- * Defaults to false.
2964
- */
2965
- screen: boolean;
2966
- }
2967
- /**
2968
- * An event that is used to start audio recording.
2969
- */
2970
- export interface BeginRecordingAction extends AsyncAction, RecordingOptions {
2971
- type: 'begin_recording';
2972
- }
2973
- /**
2974
- * An event that is used to finish audio recording.
2975
- */
2976
- export interface EndRecordingAction extends AsyncAction {
2977
- type: 'end_recording';
2978
- }
2979
- /**
2980
- * An event that is used to send a command to the Jitsi Meet API.
2981
- */
2982
- export interface MeetCommandAction extends AsyncAction {
2983
- type: 'meet_command';
2984
- /**
2985
- * The name of the command to execute.
2986
- */
2987
- command: string;
2988
- /**
2989
- * The arguments for the command (if any).
2990
- */
2991
- args?: any[];
2992
- }
2993
- /**
2994
- * An event that is used to call Jitsi Meet functions.
2995
- */
2996
- export interface MeetFunctionAction extends AsyncAction {
2997
- type: 'meet_function';
2998
- /**
2999
- * The name of the function to execute.
3000
- */
3001
- functionName: string;
3002
- /**
3003
- * The arguments for the function (if any).
3004
- */
3005
- args?: any[];
3006
- }
3007
- export interface SpeakTextOptions {
3008
- /**
3009
- * The pitch that the text should be spoken at.
3010
- */
3011
- pitch?: number;
3012
- /**
3013
- * The rate that the text should be spoken at.
3014
- */
3015
- rate?: number;
3016
- /**
3017
- * The name of the voice that the text should be spoken with.
3018
- */
3019
- voice?: string;
3020
- }
3021
- /**
3022
- * An event that is used to speak some text using the builtin text to speech engine.
3023
- */
3024
- export interface SpeakTextAction extends AsyncAction, SpeakTextOptions {
3025
- type: 'speak_text';
3026
- /**
3027
- * The text that should be spoken.
3028
- */
3029
- text: string;
3030
- }
3031
- /**
3032
- * An event that is used to retrieve the synthetic voices that are supported by the current system.
3033
- */
3034
- export interface GetVoicesAction extends AsyncAction {
3035
- type: 'get_voices';
3036
- }
3037
- /**
3038
- * Defines an interface that represents a synthetic voice.
3039
- *
3040
- * @dochash types/experimental
3041
- * @docname SyntheticVoice
3042
- */
3043
- export interface SyntheticVoice {
3044
- /**
3045
- * Whether this voice is the default synthetic voice.
3046
- */
3047
- default: boolean;
3048
- /**
3049
- * The language that this voice can speak.
3050
- */
3051
- language: string;
3052
- /**
3053
- * The name of the voice.
3054
- */
3055
- name: string;
3056
- }
3057
- /**
3058
- * An event that is used to retrieve the current geolocation of the device.
3059
- */
3060
- export interface GetGeolocationAction extends AsyncAction {
3061
- type: 'get_geolocation';
3062
- }
3063
- /**
3064
- * Defines the possible geolocation results.
3065
- *
3066
- * @dochash types/os
3067
- * @doctitle OS Types
3068
- * @docsidebar OS
3069
- * @docdescription Defines the types that are used by OS actions.
3070
- * @docgroup 01-geo
3071
- * @docorder 0
3072
- * @docname Geolocation
3073
- */
3074
- export type Geolocation = SuccessfulGeolocation | UnsuccessfulGeolocation;
3075
- /**
3076
- * Defines an interface that represents a successful geolocation result.
3077
- *
3078
- * @dochash types/os
3079
- * @docgroup 01-geo
3080
- * @docorder 1
3081
- * @docname SuccessfulGeolocation
3082
- */
3083
- export interface SuccessfulGeolocation {
3084
- success: true;
3085
- /**
3086
- * The altitude that the device is near.
3087
- * Null if the device does not support determining the altitude.
3088
- */
3089
- altitude?: number;
3090
- /**
3091
- * The accuracy of the altitude in meters.
3092
- * Null if the device does not support altitude.
3093
- */
3094
- altitudeAccuracy?: number;
3095
- /**
3096
- * The latitude that the device is near.
3097
- */
3098
- latitude?: number;
3099
- /**
3100
- * The longitude that the device is near.
3101
- */
3102
- longitude?: number;
3103
- /**
3104
- * The accuracy of the positional location (latitude and longitude) in meters.
3105
- */
3106
- positionalAccuracy?: number;
3107
- /**
3108
- * The heading of the device from north in radians.
3109
- * 0 is true north, Math.PI/2 is east, Math.PI is south and 3/2*Math.PI is west.
3110
- * This value is null if the device is unable to determine the heading.
3111
- */
3112
- heading: number;
3113
- /**
3114
- * The speed that the device is moving in meters per second.
3115
- * Null if the device does not support calculating the speed.
3116
- */
3117
- speed: number;
1650
+ position: {
1651
+ x: number;
1652
+ y: number;
1653
+ z: number;
1654
+ };
3118
1655
  /**
3119
- * The timestamp of the geolocation result.
1656
+ * The distance that the snap point should take effect at.
3120
1657
  */
3121
- timestamp: number;
1658
+ distance: number;
3122
1659
  }
3123
1660
  /**
3124
- * Defines an interface that represents an unsuccessful geolocation result.
1661
+ * Defines an interface that represents a snap axis.
1662
+ * That is, a ray in 3D space with an associated snap distance.
3125
1663
  *
3126
1664
  * @dochash types/os
3127
- * @docgroup 01-geo
1665
+ * @docgroup 10-snap
3128
1666
  * @docorder 2
3129
- * @docname UnsuccessfulGeolocation
3130
- */
3131
- export interface UnsuccessfulGeolocation {
3132
- success: false;
3133
- /**
3134
- * The code of the error that occurred.
3135
- */
3136
- errorCode?: 'permission_denied' | 'position_unavailable' | 'timeout' | 'unknown';
3137
- /**
3138
- * The message of the error that occurred.
3139
- */
3140
- errorMessage?: string;
3141
- }
3142
- /**
3143
- * Defines an interface that contains recorded data.
3144
- *
3145
- * @dochash types/experimental
3146
- * @docname Recording
3147
- */
3148
- export interface Recording {
3149
- /**
3150
- * The list of files that were produced when recording.
3151
- */
3152
- files: RecordedFile[];
3153
- }
3154
- /**
3155
- * Defines an interface that represents a recorded file.
3156
- *
3157
- * @dochash types/experimental
3158
- * @docname RecordedFile
3159
- */
3160
- export interface RecordedFile {
3161
- /**
3162
- * Whether the file contains the recorded audio.
3163
- */
3164
- containsAudio: boolean;
3165
- /**
3166
- * Whether the file contains the recorded video.
3167
- */
3168
- containsVideo: boolean;
3169
- /**
3170
- * Whether the file contains the recorded screen data.
3171
- */
3172
- containsScreen: boolean;
3173
- /**
3174
- * The data that the file contains.
3175
- */
3176
- data: Blob;
3177
- }
3178
- /**
3179
- * Defines an event that tells the IDE portal to open the given bot and tag.
3180
- */
3181
- export interface GoToTagAction {
3182
- type: 'go_to_tag';
3183
- /**
3184
- * The ID of the bot.
3185
- */
3186
- botId: string;
3187
- /**
3188
- * The tag to open.
3189
- */
3190
- tag: string;
3191
- /**
3192
- * The space to open.
3193
- */
3194
- space: string | null;
3195
- }
3196
- /**
3197
- * Defines an event that requests a Auth data from the OS.
3198
- */
3199
- export interface RequestAuthDataAction extends AsyncAction {
3200
- type: 'request_auth_data';
3201
- }
3202
- /**
3203
- * Defines an interface that represents a authenticated user.
3204
- */
3205
- export interface AuthData {
3206
- /**
3207
- * The ID of the user.
3208
- */
3209
- userId: string;
3210
- /**
3211
- * The name of the user.
3212
- * Null if the user has not set a name.
3213
- */
3214
- name: string;
3215
- /**
3216
- * The URL of the user's avatar.
3217
- * Null if the user does not have an avatar.
3218
- */
3219
- avatarUrl: string;
3220
- /**
3221
- * The URL that the user's avatar portrait is at.
3222
- * Null if the user does not have an avatar.
3223
- */
3224
- avatarPortraitUrl: string;
3225
- /**
3226
- * Whether the user has an active subscription to the beta program.
3227
- */
3228
- hasActiveSubscription: boolean;
3229
- /**
3230
- * The subscription tier that is currently active for the user.
3231
- */
3232
- subscriptionTier: string | null;
3233
- }
3234
- /**
3235
- * Defines an event that defines a global variable that points to the given bot.
3236
- */
3237
- export interface DefineGlobalBotAction extends AsyncAction {
3238
- type: 'define_global_bot';
3239
- /**
3240
- * The ID of the bot that should be defined.
3241
- */
3242
- botId: string;
3243
- /**
3244
- * The name of the global variable that should reference the bot.
3245
- */
3246
- name: string;
3247
- }
3248
- export declare const APPROVED_SYMBOL: unique symbol;
3249
- /**
3250
- * Defines an interface that represents the base for options for a records action.
3251
- *
3252
- * @dochash types/records/extra
3253
- * @doctitle Extra Record Types
3254
- * @docsidebar Extra
3255
- * @docdescription Extra types that are used for records.
3256
- * @docname RecordActionOptions
3257
- */
3258
- export interface RecordActionOptions {
3259
- /**
3260
- * The HTTP endpoint that the request should interface with.
3261
- */
3262
- endpoint?: string;
3263
- }
3264
- /**
3265
- * Defines an interface that represents the base for actions that deal with records.
3266
- */
3267
- export interface RecordsAction extends AsyncAction {
3268
- /**
3269
- * The options that the action should use.
3270
- */
3271
- options: RecordActionOptions;
3272
- }
3273
- /**
3274
- * Defines a type that represents a policy that indicates which users are allowed to affect a record.
3275
- *
3276
- * - `true` indicates that any user can edit the record.
3277
- * - An array of strings indicates the list of users that are allowed to edit the record.
3278
- *
3279
- * @dochash types/records
3280
- * @docname RecordUserPolicyType
3281
- */
3282
- export type RecordUserPolicyType = true | string[];
3283
- /**
3284
- * The options for data record actions.
3285
- *
3286
- * @dochash types/records
3287
- * @docName DataRecordOptions
3288
- */
3289
- export interface DataRecordOptions extends RecordActionOptions {
3290
- /**
3291
- * The policy that should be used for updating the record.
3292
- */
3293
- updatePolicy?: RecordUserPolicyType;
3294
- /**
3295
- * The policy that should be used for deleting the record.
3296
- */
3297
- deletePolicy?: RecordUserPolicyType;
3298
- /**
3299
- * The markers that should be applied to the record.
3300
- */
3301
- markers?: string[];
3302
- /**
3303
- * The marker that should be applied to the record.
3304
- */
3305
- marker?: string;
3306
- }
3307
- /**
3308
- * Defines an interface that represents the base for actions that deal with data records.
1667
+ * @docname SnapAxis
3309
1668
  */
3310
- export interface DataRecordAction extends RecordsAction {
3311
- /**
3312
- * Whether this action is trying to publish data that requires manual approval.
3313
- */
3314
- requiresApproval: boolean;
1669
+ export interface SnapAxis {
3315
1670
  /**
3316
- * Whether this action has been manually approved.
1671
+ * The 3D direction that the axis ray travels along.
3317
1672
  *
3318
- * Uses a symbol to ensure that it cannot be copied across security boundaries.
3319
- * As a result, it should be impossible to generate actions that are pre-approved.
3320
- */
3321
- [APPROVED_SYMBOL]?: boolean;
3322
- }
3323
- /**
3324
- * Defines an event that publishes data to a record.
3325
- */
3326
- export interface RecordDataAction extends DataRecordAction {
3327
- type: 'record_data';
3328
- /**
3329
- * The record key that should be used to publish the data.
1673
+ * @docsource Vector3
3330
1674
  */
3331
- recordKey: string;
1675
+ direction: {
1676
+ x: number;
1677
+ y: number;
1678
+ z: number;
1679
+ };
3332
1680
  /**
3333
- * The address that the data should be recorded to.
1681
+ * The 3D position that the ray starts at.
1682
+ *
1683
+ * @docsource Vector3
3334
1684
  */
3335
- address: string;
1685
+ origin: {
1686
+ x: number;
1687
+ y: number;
1688
+ z: number;
1689
+ };
3336
1690
  /**
3337
- * The data that should be recorded.
1691
+ * The distance from the ray line that the snap point should take effect at.
3338
1692
  */
3339
- data: any;
3340
- options: DataRecordOptions;
1693
+ distance: number;
3341
1694
  }
3342
1695
  /**
3343
- * Defines an event that requests some data in a record.
3344
- */
3345
- export interface GetRecordDataAction extends DataRecordAction {
3346
- type: 'get_record_data';
3347
- /**
3348
- * The name of the record.
3349
- */
3350
- recordName: string;
3351
- /**
3352
- * The address of the data that should be retrieved.
3353
- */
3354
- address: string;
3355
- }
3356
- export interface ListRecordDataAction extends DataRecordAction {
3357
- type: 'list_record_data';
3358
- /**
3359
- * The name of the record.
3360
- */
3361
- recordName: string;
3362
- /**
3363
- * The address that the list should start with.
3364
- */
3365
- startingAddress?: string;
3366
- }
1696
+ * The list of possible snap targets.
1697
+ * - `"ground"` means that the dragged bot should snap to the ground plane. This option is overriden by "grid".
1698
+ * - `"grid"` means that the dragged bot should snap to grid tiles.
1699
+ * - `"face"` means that the dragged bot should snap to other bot faces.
1700
+ * - `"bots"` means that the dragged bot will snap to other bots.
1701
+ *
1702
+ * @dochash types/os
1703
+ * @docgroup 10-snap
1704
+ * @docorder 0
1705
+ * @docname SnapTarget
1706
+ */
1707
+ export type SnapTarget = 'ground' | 'grid' | 'face' | 'bots' | SnapPoint | SnapAxis;
3367
1708
  /**
3368
- * Defines an event that erases some data in a record.
1709
+ * An event that is used to add grids as possible drop locations for a drag operation.
3369
1710
  */
3370
- export interface EraseRecordDataAction extends DataRecordAction {
3371
- type: 'erase_record_data';
3372
- /**
3373
- * The record key that should be used to erase the data.
3374
- */
3375
- recordKey: string;
3376
- /**
3377
- * The address that the data from.
3378
- */
3379
- address: string;
3380
- }
3381
- export interface RecordFileActionOptions extends RecordActionOptions {
1711
+ export interface AddDropGridTargetsAction extends AddDropSnapAction {
1712
+ type: 'add_drop_grid_targets';
3382
1713
  /**
3383
- * The markers that should be applied to the record.
1714
+ * The list of grids that bots should be snapped to.
3384
1715
  */
3385
- markers?: string[];
1716
+ targets: SnapGrid[];
3386
1717
  }
3387
1718
  /**
3388
- * Defines an event that publishes a file to a record.
1719
+ * Defines an interface that represents a snap grid.
1720
+ * That is, a 2D plane that is segmented into discrete sections.
3389
1721
  */
3390
- export interface RecordFileAction extends RecordsAction {
3391
- type: 'record_file';
1722
+ export interface SnapGrid {
3392
1723
  /**
3393
- * The record key that should be used to publish the file.
1724
+ * The 3D position of the grid.
1725
+ * If not specified, then 0,0,0 is used.
3394
1726
  */
3395
- recordKey: string;
1727
+ position?: {
1728
+ x: number;
1729
+ y: number;
1730
+ z: number;
1731
+ };
3396
1732
  /**
3397
- * The data that should be recorded.
1733
+ * The 3D rotation of the grid.
1734
+ * If not specified, then the identity rotation is used.
3398
1735
  */
3399
- data: any;
1736
+ rotation?: {
1737
+ x: number;
1738
+ y: number;
1739
+ z: number;
1740
+ w?: number;
1741
+ };
3400
1742
  /**
3401
- * The description of the file.
1743
+ * The ID of the bot that defines the portal that this grid should use.
1744
+ * If not specifed, then the config bot is used.
3402
1745
  */
3403
- description: string;
1746
+ portalBotId?: string;
3404
1747
  /**
3405
- * The MIME type of the uploaded file.
1748
+ * The tag that contains the portal dimension.
1749
+ * If a portalBotId is specified, then this defaults to formAddress.
1750
+ * If a portalBotId is not specified, then this defaults to gridPortal.
3406
1751
  */
3407
- mimeType?: string;
1752
+ portalTag?: string;
3408
1753
  /**
3409
- * The options for the action.
1754
+ * The priority that the snap grid has.
1755
+ * Higher numbers mean higher priority.
3410
1756
  */
3411
- options: RecordFileActionOptions;
3412
- }
3413
- /**
3414
- * Defines an event that requests a file from a record.
3415
- */
3416
- export interface GetFileAction extends RecordsAction {
3417
- type: 'get_file';
1757
+ priority?: number;
3418
1758
  /**
3419
- * The URL that the file is stored at.
1759
+ * The bounds that the snap grid has.
1760
+ * If not specified, then default bounds are used.
3420
1761
  */
3421
- fileUrl: string;
3422
- }
3423
- /**
3424
- * Defines an event that erases a file from a record.
3425
- */
3426
- export interface EraseFileAction extends RecordsAction {
3427
- type: 'erase_file';
1762
+ bounds?: {
1763
+ x: number;
1764
+ y: number;
1765
+ };
3428
1766
  /**
3429
- * The record key that should be used to erase the file.
1767
+ * Whether to visualize the grid when dragging bots around.
1768
+ * Defaults to false.
3430
1769
  */
3431
- recordKey: string;
1770
+ showGrid?: boolean;
3432
1771
  /**
3433
- * The URL that the file is stored at.
1772
+ * The type of grid that this snap grid should be.
1773
+ * Defaults to the type of grid that the portal bot uses.
1774
+ *
1775
+ * - "grid" indicates that the snap target should be a flat grid.
1776
+ * - "sphere" indicates that the snap target should be a sphere.
3434
1777
  */
3435
- fileUrl: string;
3436
- }
3437
- export type FileRecordedResult = FileRecordedSuccess | FileRecordedFailure;
3438
- export interface FileRecordedSuccess {
3439
- success: true;
3440
- url: string;
3441
- sha256Hash: string;
3442
- }
3443
- export interface FileRecordedFailure {
3444
- success: false;
3445
- errorCode: RecordFileFailure['errorCode'] | 'upload_failed';
3446
- errorMessage: string;
1778
+ type?: 'grid' | 'sphere';
3447
1779
  }
3448
1780
  /**
3449
- * Defines an action that records that an event happened.
1781
+ * An event that is used to disable the default dragging logic (moving the bot) and enable
1782
+ * "onDragging" shouts and whispers.
3450
1783
  */
3451
- export interface RecordEventAction extends RecordsAction {
3452
- type: 'record_event';
3453
- /**
3454
- * The key that should be used to access the record.
3455
- */
3456
- recordKey: string;
3457
- /**
3458
- * The name of the event.
3459
- */
3460
- eventName: string;
3461
- /**
3462
- * The number of events to record.
3463
- */
3464
- count: number;
1784
+ export interface EnableCustomDraggingAction extends Action {
1785
+ type: 'enable_custom_dragging';
3465
1786
  }
3466
1787
  /**
3467
- * Defines an action that retrieves the number of times an event has happened.
1788
+ * An event that is used to start audio recording.
3468
1789
  */
3469
- export interface GetEventCountAction extends RecordsAction {
3470
- type: 'get_event_count';
1790
+ export interface BeginAudioRecordingAction extends AsyncAction {
1791
+ type: 'begin_audio_recording';
3471
1792
  /**
3472
- * The name of the record.
1793
+ * Whether to stream the audio recording.
1794
+ * If streaming is enabled, then @onAudioChunk will be triggered whenever a new
1795
+ * piece of audio is available.
3473
1796
  */
3474
- recordName: string;
1797
+ stream?: boolean;
3475
1798
  /**
3476
- * The name of the event.
1799
+ * The MIME type that should be produced.
1800
+ * Defaults to a containerized format (audio/mp3, audio/webm, etc.) if not specified.
3477
1801
  */
3478
- eventName: string;
3479
- }
3480
- export interface GetRecordsActionResult {
3481
- records: Record[];
3482
- hasMoreRecords: boolean;
3483
- totalCount: number;
3484
- cursor?: string;
1802
+ mimeType?: string;
1803
+ /**
1804
+ * The number of samples per second (Hz) that audio/x-raw recordings should use.
1805
+ * Defaults to 44100 if not specified.
1806
+ */
1807
+ sampleRate?: number;
3485
1808
  }
3486
1809
  /**
3487
- * Defines an action that retrieves the list of studios that the user has access to.
1810
+ * An event that is used to finish audio recording.
3488
1811
  */
3489
- export interface ListUserStudiosAction extends RecordsAction {
3490
- type: 'list_user_studios';
1812
+ export interface EndAudioRecordingAction extends AsyncAction {
1813
+ type: 'end_audio_recording';
3491
1814
  }
3492
1815
  /**
3493
- * Defines an interface that represents options for converting a geolocation to a what3words address.
1816
+ * An interface that represents the options that can be used for making recordings.
3494
1817
  *
3495
- * @dochash types/os
3496
- * @docgroup 01-geo
3497
- * @docorder 3
3498
- * @docname ConvertGeolocationToWhat3WordsOptions
1818
+ * @dochash types/experimental
1819
+ * @doctitle Experimental Types
1820
+ * @docsidebar Experimental
1821
+ * @docdescription Defines the types that are used by experimental actions.
1822
+ * @docname RecordingOptions
3499
1823
  */
3500
- export interface ConvertGeolocationToWhat3WordsOptions {
1824
+ export interface RecordingOptions {
3501
1825
  /**
3502
- * The latitude to convert.
1826
+ * Whether to record audio.
1827
+ *
1828
+ * If the computer does not have an audio device attached, then setting this to true
1829
+ * will cause an error.
1830
+ *
1831
+ * If an array is specified, only the specified audio sources will be recorded.
1832
+ *
1833
+ * Defaults to true.
3503
1834
  */
3504
- latitude: number;
1835
+ audio: boolean | ('screen' | 'microphone')[];
3505
1836
  /**
3506
- * The longitude to convert.
1837
+ * Whether to record video.
1838
+ *
1839
+ * If the computer does not have a video device attached (like a web cam),
1840
+ * then setting this to true will cause an error.
1841
+ *
1842
+ * Defaults to true.
3507
1843
  */
3508
- longitude: number;
1844
+ video: boolean;
3509
1845
  /**
3510
- * The identifier of the language that should be used for the resulting what3words address.
1846
+ * Whether to record the screen.
1847
+ *
1848
+ * Defaults to false.
3511
1849
  */
3512
- language?: string;
1850
+ screen: boolean;
3513
1851
  }
3514
1852
  /**
3515
- * Defines an interface that represents an action that converts a geolocation (latitude and longitude) to a what3words address (see https://what3words.com/).
1853
+ * An event that is used to start audio recording.
3516
1854
  */
3517
- export interface ConvertGeolocationToWhat3WordsAction extends AsyncAction, ConvertGeolocationToWhat3WordsOptions {
3518
- type: 'convert_geolocation_to_w3w';
1855
+ export interface BeginRecordingAction extends AsyncAction, RecordingOptions {
1856
+ type: 'begin_recording';
3519
1857
  }
3520
1858
  /**
3521
- * Defines a type that represents the different kinds of policies that a record key can have.
3522
- *
3523
- * - null and "subjectfull" indicate that actions performed with this key must require a subject to provide their access token in order for operations to succeed.
3524
- * - "subjectless" indicates that actions may be performed with key despite not having an access key from a subject.
1859
+ * An event that is used to finish audio recording.
3525
1860
  */
3526
- export type PublicRecordKeyPolicy = null | 'subjectfull' | 'subjectless';
1861
+ export interface EndRecordingAction extends AsyncAction {
1862
+ type: 'end_recording';
1863
+ }
3527
1864
  /**
3528
- * Defines an interface that represents an action that requests a key to a public record.
1865
+ * An event that is used to send a command to the Jitsi Meet API.
3529
1866
  */
3530
- export interface GetPublicRecordKeyAction extends AsyncAction {
3531
- type: 'get_public_record_key';
1867
+ export interface MeetCommandAction extends AsyncAction {
1868
+ type: 'meet_command';
3532
1869
  /**
3533
- * The name of the record.
1870
+ * The name of the command to execute.
3534
1871
  */
3535
- recordName: string;
1872
+ command: string;
3536
1873
  /**
3537
- * The policy that the record key should have.
1874
+ * The arguments for the command (if any).
3538
1875
  */
3539
- policy?: PublicRecordKeyPolicy;
1876
+ args?: any[];
3540
1877
  }
3541
1878
  /**
3542
- * Defines an interface that represents an action that grants a permission to a record marker.
1879
+ * An event that is used to call Jitsi Meet functions.
3543
1880
  */
3544
- export interface GrantRecordMarkerPermissionAction extends RecordsAction {
3545
- type: 'grant_record_marker_permission';
3546
- /**
3547
- * The name of the record.
3548
- */
3549
- recordName: string;
1881
+ export interface MeetFunctionAction extends AsyncAction {
1882
+ type: 'meet_function';
3550
1883
  /**
3551
- * The marker that should be granted permission.
1884
+ * The name of the function to execute.
3552
1885
  */
3553
- marker: string;
1886
+ functionName: string;
3554
1887
  /**
3555
- * The permission that should be granted.
1888
+ * The arguments for the function (if any).
3556
1889
  */
3557
- permission: object;
1890
+ args?: any[];
3558
1891
  }
3559
- /**
3560
- * Defines an interface that represents an action that revokes a permission from a record marker.
3561
- */
3562
- export interface RevokeRecordMarkerPermissionAction extends RecordsAction {
3563
- type: 'revoke_record_marker_permission';
1892
+ export interface SpeakTextOptions {
3564
1893
  /**
3565
- * The name of the record.
1894
+ * The pitch that the text should be spoken at.
3566
1895
  */
3567
- recordName: string;
1896
+ pitch?: number;
3568
1897
  /**
3569
- * The marker that should be revoked permission.
1898
+ * The rate that the text should be spoken at.
3570
1899
  */
3571
- marker: string;
1900
+ rate?: number;
3572
1901
  /**
3573
- * The permission that should be revoked.
1902
+ * The name of the voice that the text should be spoken with.
3574
1903
  */
3575
- permission: object;
1904
+ voice?: string;
3576
1905
  }
3577
1906
  /**
3578
- * Defines an action that represents an action that grants admin permissions to the inst for the day.
1907
+ * An event that is used to speak some text using the builtin text to speech engine.
3579
1908
  */
3580
- export interface GrantInstAdminPermissionAction extends RecordsAction {
3581
- type: 'grant_inst_admin_permission';
3582
- /**
3583
- * The name of the record.
3584
- */
3585
- recordName: string;
1909
+ export interface SpeakTextAction extends AsyncAction, SpeakTextOptions {
1910
+ type: 'speak_text';
3586
1911
  /**
3587
- * Whether this action has been manually approved.
3588
- *
3589
- * Uses a symbol to ensure that it cannot be copied across security boundaries.
3590
- * As a result, it should be impossible to generate actions that are pre-approved.
1912
+ * The text that should be spoken.
3591
1913
  */
3592
- [APPROVED_SYMBOL]?: boolean;
1914
+ text: string;
3593
1915
  }
3594
1916
  /**
3595
- * Defines an action that grants a role to a user or inst.
1917
+ * An event that is used to retrieve the synthetic voices that are supported by the current system.
3596
1918
  */
3597
- export interface GrantRoleAction extends RecordsAction {
3598
- type: 'grant_role';
3599
- /**
3600
- * The name of the record.
3601
- */
3602
- recordName: string;
3603
- /**
3604
- * The role that should be granted.
3605
- */
3606
- role: string;
3607
- /**
3608
- * The ID of the user that should be granted the role.
3609
- */
3610
- userId?: string;
3611
- /**
3612
- * The ID of the inst that should be granted the role.
3613
- */
3614
- inst?: string;
3615
- /**
3616
- * The Unix time (in miliseconds) that the role grant expires.
3617
- */
3618
- expireTimeMs: number | null;
1919
+ export interface GetVoicesAction extends AsyncAction {
1920
+ type: 'get_voices';
3619
1921
  }
3620
1922
  /**
3621
- * Defines an action that revokes a role from a user or inst.
1923
+ * Defines an interface that represents a synthetic voice.
1924
+ *
1925
+ * @dochash types/experimental
1926
+ * @docname SyntheticVoice
3622
1927
  */
3623
- export interface RevokeRoleAction extends RecordsAction {
3624
- type: 'revoke_role';
3625
- /**
3626
- * The name of the record.
3627
- */
3628
- recordName: string;
3629
- /**
3630
- * The role that should be revoked.
3631
- */
3632
- role: string;
3633
- /**
3634
- * The ID of the user that should be revoked the role.
3635
- */
3636
- userId?: string;
1928
+ export interface SyntheticVoice {
3637
1929
  /**
3638
- * The ID of the inst that should be revoked the role.
1930
+ * Whether this voice is the default synthetic voice.
3639
1931
  */
3640
- inst?: string;
3641
- }
3642
- /**
3643
- * Defines an interface that represents options for requesting media permissions.
3644
- *
3645
- * @dochash types/os
3646
- * @docname MediaPermissionOptions
3647
- */
3648
- export interface MediaPermssionOptions {
1932
+ default: boolean;
3649
1933
  /**
3650
- * Should include audio permission.
1934
+ * The language that this voice can speak.
3651
1935
  */
3652
- audio?: boolean;
1936
+ language: string;
3653
1937
  /**
3654
- * Should include video permission.
1938
+ * The name of the voice.
3655
1939
  */
3656
- video?: boolean;
3657
- }
3658
- /**
3659
- * Defines an event that gets permission for audio and/or video.
3660
- */
3661
- export interface MediaPermissionAction extends AsyncAction, MediaPermssionOptions {
3662
- type: 'media_permission';
1940
+ name: string;
3663
1941
  }
3664
1942
  /**
3665
- * Defines an event that retrieves the current average frame rate.
1943
+ * An event that is used to retrieve the current geolocation of the device.
3666
1944
  */
3667
- export interface GetAverageFrameRateAction extends AsyncAction {
3668
- type: 'get_average_frame_rate';
1945
+ export interface GetGeolocationAction extends AsyncAction {
1946
+ type: 'get_geolocation';
3669
1947
  }
3670
1948
  /**
3671
- * @docid JoinRoomActionOptions
3672
- * @docrename RoomJoinOptions
1949
+ * Defines the possible geolocation results.
1950
+ *
1951
+ * @dochash types/os
1952
+ * @doctitle OS Types
1953
+ * @docsidebar OS
1954
+ * @docdescription Defines the types that are used by OS actions.
1955
+ * @docgroup 01-geo
1956
+ * @docorder 0
1957
+ * @docname Geolocation
3673
1958
  */
3674
- export type JoinRoomActionOptions = RecordActionOptions & Partial<RoomJoinOptions>;
1959
+ export type Geolocation = SuccessfulGeolocation | UnsuccessfulGeolocation;
3675
1960
  /**
3676
- * Defines an event that attempts to join a meeting room.
1961
+ * Defines an interface that represents a successful geolocation result.
1962
+ *
1963
+ * @dochash types/os
1964
+ * @docgroup 01-geo
1965
+ * @docorder 1
1966
+ * @docname SuccessfulGeolocation
3677
1967
  */
3678
- export interface JoinRoomAction extends RecordsAction {
3679
- type: 'join_room';
1968
+ export interface SuccessfulGeolocation {
1969
+ success: true;
3680
1970
  /**
3681
- * The name of the room that should be joined.
1971
+ * The altitude that the device is near.
1972
+ * Null if the device does not support determining the altitude.
3682
1973
  */
3683
- roomName: string;
1974
+ altitude?: number;
3684
1975
  /**
3685
- * The options that should be used to join the room.
1976
+ * The accuracy of the altitude in meters.
1977
+ * Null if the device does not support altitude.
3686
1978
  */
3687
- options: JoinRoomActionOptions;
3688
- }
3689
- /**
3690
- * Defines an event that attempts to leave a meeting room.
3691
- */
3692
- export interface LeaveRoomAction extends RecordsAction {
3693
- type: 'leave_room';
1979
+ altitudeAccuracy?: number;
3694
1980
  /**
3695
- * The name of the room that should be exited.
1981
+ * The latitude that the device is near.
3696
1982
  */
3697
- roomName: string;
3698
- }
3699
- /**
3700
- * Defines an event that attempts to set some options on a meeting room.
3701
- */
3702
- export interface SetRoomOptionsAction extends AsyncAction {
3703
- type: 'set_room_options';
1983
+ latitude?: number;
3704
1984
  /**
3705
- * The name of the room whose options should be changed.
1985
+ * The longitude that the device is near.
3706
1986
  */
3707
- roomName: string;
1987
+ longitude?: number;
3708
1988
  /**
3709
- * The options that should be set.
1989
+ * The accuracy of the positional location (latitude and longitude) in meters.
3710
1990
  */
3711
- options: Partial<RoomOptions>;
3712
- }
3713
- /**
3714
- * Defines a set of options that the local user can have for a room.
3715
- *
3716
- * @dochash types/os
3717
- * @docname RoomOptions
3718
- */
3719
- export interface RoomOptions {
1991
+ positionalAccuracy?: number;
3720
1992
  /**
3721
- * Whether to stream video.
1993
+ * The heading of the device from north in radians.
1994
+ * 0 is true north, Math.PI/2 is east, Math.PI is south and 3/2*Math.PI is west.
1995
+ * This value is null if the device is unable to determine the heading.
3722
1996
  */
3723
- video: boolean;
1997
+ heading: number;
3724
1998
  /**
3725
- * Whether to stream audio.
1999
+ * The speed that the device is moving in meters per second.
2000
+ * Null if the device does not support calculating the speed.
3726
2001
  */
3727
- audio: boolean;
2002
+ speed: number;
3728
2003
  /**
3729
- * Whether to stream the screen.
2004
+ * The timestamp of the geolocation result.
3730
2005
  */
3731
- screen: boolean;
2006
+ timestamp: number;
3732
2007
  }
3733
2008
  /**
3734
- * Defines a set of options that the local usr can specify when joining a room.
2009
+ * Defines an interface that represents an unsuccessful geolocation result.
3735
2010
  *
3736
2011
  * @dochash types/os
3737
- * @docname RoomJoinOptions
2012
+ * @docgroup 01-geo
2013
+ * @docorder 2
2014
+ * @docname UnsuccessfulGeolocation
3738
2015
  */
3739
- export interface RoomJoinOptions extends RoomOptions {
3740
- /**
3741
- * The defaults that should be used for recording audio.
3742
- * Should be an object.
3743
- * See https://docs.livekit.io/client-sdk-js/interfaces/AudioCaptureOptions.html for a full list of properties.
3744
- */
3745
- audioCaptureDefaults: object;
3746
- /**
3747
- * The defaults that should be used for recording video. Should be an object.
3748
- * See https://docs.livekit.io/client-sdk-js/interfaces/VideoCaptureOptions.html for a full list of properties.
3749
- */
3750
- videoCaptureDefaults: object;
3751
- /**
3752
- * The defaults that should be used for uploading audio/video content.
3753
- * See https://docs.livekit.io/client-sdk-js/interfaces/TrackPublishDefaults.html for a full list of properties.
3754
- */
3755
- publishDefaults: object;
2016
+ export interface UnsuccessfulGeolocation {
2017
+ success: false;
3756
2018
  /**
3757
- * Whether to enable dynacast.
3758
- * See https://docs.livekit.io/client-sdk-js/interfaces/RoomOptions.html#dynacast for more info.
2019
+ * The code of the error that occurred.
3759
2020
  */
3760
- dynacast: boolean;
2021
+ errorCode?: 'permission_denied' | 'position_unavailable' | 'timeout' | 'unknown';
3761
2022
  /**
3762
- * Whether to enable adaptive streaming. Alternatively accepts an object with properties from this page: https://docs.livekit.io/client-sdk-js/modules.html#AdaptiveStreamSettings
2023
+ * The message of the error that occurred.
3763
2024
  */
3764
- adaptiveStream: boolean | object;
2025
+ errorMessage?: string;
3765
2026
  }
3766
2027
  /**
3767
- * Defines an event that retrieves the set of options that the local user has for a room.
2028
+ * Defines an interface that contains recorded data.
2029
+ *
2030
+ * @dochash types/experimental
2031
+ * @docname Recording
3768
2032
  */
3769
- export interface GetRoomOptionsAction extends AsyncAction {
3770
- type: 'get_room_options';
2033
+ export interface Recording {
3771
2034
  /**
3772
- * The name of the room.
2035
+ * The list of files that were produced when recording.
3773
2036
  */
3774
- roomName: string;
2037
+ files: RecordedFile[];
3775
2038
  }
3776
2039
  /**
3777
- * Defines an event that retrieves the set of options that the local user has for a track.
2040
+ * Defines an interface that represents a recorded file.
2041
+ *
2042
+ * @dochash types/experimental
2043
+ * @docname RecordedFile
3778
2044
  */
3779
- export interface GetRoomTrackOptionsAction extends AsyncAction {
3780
- type: 'get_room_track_options';
3781
- /**
3782
- * The name of the room.
3783
- */
3784
- roomName: string;
2045
+ export interface RecordedFile {
3785
2046
  /**
3786
- * The address of the track.
2047
+ * Whether the file contains the recorded audio.
3787
2048
  */
3788
- address: string;
3789
- }
3790
- export interface SetRoomTrackOptionsAction extends AsyncAction {
3791
- type: 'set_room_track_options';
2049
+ containsAudio: boolean;
3792
2050
  /**
3793
- * The name of the room.
2051
+ * Whether the file contains the recorded video.
3794
2052
  */
3795
- roomName: string;
2053
+ containsVideo: boolean;
3796
2054
  /**
3797
- * The address of the track.
2055
+ * Whether the file contains the recorded screen data.
3798
2056
  */
3799
- address: string;
2057
+ containsScreen: boolean;
3800
2058
  /**
3801
- * The options that should be set for the track.
2059
+ * The data that the file contains.
3802
2060
  */
3803
- options: SetRoomTrackOptions;
2061
+ data: Blob;
3804
2062
  }
3805
2063
  /**
3806
- * Defines an interface that represents the set of options that can be set on a room video/audio track.
3807
- *
3808
- * @dochash types/os
3809
- * @docname SetRoomTrackOptions
2064
+ * Defines an event that tells the IDE portal to open the given bot and tag.
3810
2065
  */
3811
- export interface SetRoomTrackOptions {
2066
+ export interface GoToTagAction {
2067
+ type: 'go_to_tag';
3812
2068
  /**
3813
- * Whether to mute the track locally.
3814
- * This will prevent the track from streaming from the server to this device.
2069
+ * The ID of the bot.
2070
+ */
2071
+ botId: string;
2072
+ /**
2073
+ * The tag to open.
3815
2074
  */
3816
- muted?: boolean;
2075
+ tag: string;
3817
2076
  /**
3818
- * The video quality that the track should stream at.
2077
+ * The space to open.
3819
2078
  */
3820
- videoQuality?: TrackVideoQuality;
2079
+ space: string | null;
3821
2080
  }
3822
2081
  /**
3823
- * Defines an interface that represents the options that a audio/video track has.
3824
- *
3825
- * @dochash types/os
3826
- * @docname RoomTrackOptions
2082
+ * Defines an event that requests a Auth data from the OS.
3827
2083
  */
3828
- export interface RoomTrackOptions {
3829
- /**
3830
- * Whether the track is being sourced from a remote user.
3831
- */
3832
- isRemote: boolean;
3833
- /**
3834
- * The ID of the remote that is publishing this track.
3835
- */
3836
- remoteId: string;
2084
+ export interface RequestAuthDataAction extends AsyncAction {
2085
+ type: 'request_auth_data';
2086
+ }
2087
+ /**
2088
+ * Defines an interface that represents a authenticated user.
2089
+ */
2090
+ export interface AuthData {
3837
2091
  /**
3838
- * Whether the track is muted locally.
2092
+ * The ID of the user.
3839
2093
  */
3840
- muted: boolean;
2094
+ userId: string;
3841
2095
  /**
3842
- * The type of the track.
2096
+ * The name of the user.
2097
+ * Null if the user has not set a name.
3843
2098
  */
3844
- kind: TrackKind;
2099
+ name: string;
3845
2100
  /**
3846
- * The source of the track.
2101
+ * The URL of the user's avatar.
2102
+ * Null if the user does not have an avatar.
3847
2103
  */
3848
- source: TrackSource;
2104
+ avatarUrl: string;
3849
2105
  /**
3850
- * The video quality of the track if the track represents video.
2106
+ * The URL that the user's avatar portrait is at.
2107
+ * Null if the user does not have an avatar.
3851
2108
  */
3852
- videoQuality?: TrackVideoQuality;
2109
+ avatarPortraitUrl: string;
3853
2110
  /**
3854
- * The dimensions of the video if the track represents a video.
2111
+ * Whether the user has an active subscription to the beta program.
3855
2112
  */
3856
- dimensions?: {
3857
- width: number;
3858
- height: number;
3859
- };
2113
+ hasActiveSubscription: boolean;
3860
2114
  /**
3861
- * The aspect ratio of the video if the track represents a video.
2115
+ * The subscription tier that is currently active for the user.
3862
2116
  */
3863
- aspectRatio?: number;
2117
+ subscriptionTier: string | null;
3864
2118
  }
3865
- export type TrackKind = 'video' | 'audio';
3866
- export type TrackSource = 'camera' | 'microphone' | 'screen_share' | 'screen_share_audio';
3867
2119
  /**
3868
- * Defines the possible qualities that a track can stream at.
3869
- *
3870
- * @dochash types/os
3871
- * @docname TrackVideoQuality
3872
- */
3873
- export type TrackVideoQuality = 'high' | 'medium' | 'low' | 'off';
3874
- /**
3875
- * Defines an event that retrieves the options for a remote multimedia chat room user.
2120
+ * Defines an event that defines a global variable that points to the given bot.
3876
2121
  */
3877
- export interface GetRoomRemoteOptionsAction extends AsyncAction {
3878
- type: 'get_room_remote_options';
2122
+ export interface DefineGlobalBotAction extends AsyncAction {
2123
+ type: 'define_global_bot';
3879
2124
  /**
3880
- * The name of the room.
2125
+ * The ID of the bot that should be defined.
3881
2126
  */
3882
- roomName: string;
2127
+ botId: string;
3883
2128
  /**
3884
- * The ID of the remote user.
2129
+ * The name of the global variable that should reference the bot.
3885
2130
  */
3886
- remoteId: string;
2131
+ name: string;
3887
2132
  }
2133
+ export declare const APPROVED_SYMBOL: unique symbol;
3888
2134
  /**
3889
- * Defines an interface that contains options for a remote room user.
2135
+ * Defines an interface that represents options for converting a geolocation to a what3words address.
3890
2136
  *
3891
2137
  * @dochash types/os
3892
- * @docname RoomRemoteOptions
2138
+ * @docgroup 01-geo
2139
+ * @docorder 3
2140
+ * @docname ConvertGeolocationToWhat3WordsOptions
3893
2141
  */
3894
- export interface RoomRemoteOptions {
2142
+ export interface ConvertGeolocationToWhat3WordsOptions {
3895
2143
  /**
3896
- * Gets the connection quality of the remote user.
2144
+ * The latitude to convert.
3897
2145
  */
3898
- connectionQuality: 'excellent' | 'good' | 'poor' | 'unknown';
2146
+ latitude: number;
3899
2147
  /**
3900
- * Whether the remote user has enabled their camera video.
2148
+ * The longitude to convert.
3901
2149
  */
3902
- video: boolean;
2150
+ longitude: number;
3903
2151
  /**
3904
- * Whether the remote user has enabled their microphone audio.
2152
+ * The identifier of the language that should be used for the resulting what3words address.
3905
2153
  */
3906
- audio: boolean;
2154
+ language?: string;
2155
+ }
2156
+ /**
2157
+ * Defines an interface that represents an action that converts a geolocation (latitude and longitude) to a what3words address (see https://what3words.com/).
2158
+ */
2159
+ export interface ConvertGeolocationToWhat3WordsAction extends AsyncAction, ConvertGeolocationToWhat3WordsOptions {
2160
+ type: 'convert_geolocation_to_w3w';
2161
+ }
2162
+ /**
2163
+ * Defines an interface that represents options for requesting media permissions.
2164
+ *
2165
+ * @dochash types/os
2166
+ * @docname MediaPermissionOptions
2167
+ */
2168
+ export interface MediaPermssionOptions {
3907
2169
  /**
3908
- * Whether the remote user has enabled their screen share.
2170
+ * Should include audio permission.
3909
2171
  */
3910
- screen: boolean;
2172
+ audio?: boolean;
3911
2173
  /**
3912
- * The audio level that is being transmitted by the user.
3913
- * Between 0 and 1 with 1 being the loudest and 0 being the quietest.
2174
+ * Should include video permission.
3914
2175
  */
3915
- audioLevel: number;
2176
+ video?: boolean;
2177
+ }
2178
+ /**
2179
+ * Defines an event that gets permission for audio and/or video.
2180
+ */
2181
+ export interface MediaPermissionAction extends AsyncAction, MediaPermssionOptions {
2182
+ type: 'media_permission';
2183
+ }
2184
+ /**
2185
+ * Defines an event that retrieves the current average frame rate.
2186
+ */
2187
+ export interface GetAverageFrameRateAction extends AsyncAction {
2188
+ type: 'get_average_frame_rate';
3916
2189
  }
3917
2190
  /**
3918
2191
  * Defines an event that performs a raycast from the camera in the given portal.
@@ -4143,118 +2416,11 @@ export interface AnalyticsRecordEventAction extends AsyncAction {
4143
2416
  /**
4144
2417
  * The name of the event.
4145
2418
  */
4146
- name: string;
4147
- /**
4148
- * The metadata for the event.
4149
- */
4150
- metadata: any;
4151
- }
4152
- /**
4153
- * Defines an interface for a tag mapper.
4154
- */
4155
- export interface TagMapper {
4156
- /**
4157
- * Maps a tag name from its internal name to the name that should be used by the frontend.
4158
- */
4159
- forward?: (name: string) => string;
4160
- /**
4161
- * Maps a tag name from its frontend name to the name that is used internally.
4162
- */
4163
- reverse?: (name: string) => string;
4164
- }
4165
- /**
4166
- * An action that is used to attach a runtime to the CasualOS frontend.
4167
- */
4168
- export interface AttachRuntimeAction extends AsyncAction {
4169
- type: 'attach_runtime';
4170
- /**
4171
- * The runtime that should be attached.
4172
- */
4173
- runtime: AuxRuntime;
4174
- /**
4175
- * The tag mapper that should be used.
4176
- */
4177
- tagNameMapper?: TagMapper;
4178
- uncopiable: true;
4179
- }
4180
- /**
4181
- * An action that is used to detach a runtime from the CasualOS frontend.
4182
- */
4183
- export interface DetachRuntimeAction extends AsyncAction {
4184
- type: 'detach_runtime';
4185
- /**
4186
- * The runtime that should be detached.
4187
- */
4188
- runtime: AuxRuntime;
4189
- uncopiable: true;
4190
- }
4191
- /**
4192
- * Defines an interface for a debugger trace that represents when a tag was updated.
4193
- */
4194
- export interface DebuggerTagUpdate {
4195
- /**
4196
- * The ID of the bot that was updated.
4197
- */
4198
- botId: string;
4199
- /**
4200
- * The tag that was updated.
4201
- */
4202
- tag: string;
4203
- /**
4204
- * The old value of the tag.
4205
- */
4206
- oldValue: any;
4207
- /**
4208
- * The new value for the tag.
4209
- */
4210
- newValue: any;
4211
- }
4212
- /**
4213
- * Defines an interface for a debugger trace that represents when a tag mask was updated.
4214
- */
4215
- export interface DebuggerTagMaskUpdate extends DebuggerTagUpdate {
4216
- /**
4217
- * The space of the tag mask.
4218
- */
4219
- space: string;
4220
- }
4221
- /**
4222
- * Defines an interface for a debugger trace that is sent right before when the debugger starts executing a script.
4223
- */
4224
- export interface DebuggerScriptEnterTrace {
4225
- /**
4226
- * The ID of the bot that the debugger started executing.
4227
- */
4228
- botId: string;
4229
- /**
4230
- * The tag of the bot that the debugger started executing.
4231
- */
4232
- tag: string;
4233
- /**
4234
- * The type of entry into the script.
4235
- * - "call" means that the script was started by a function call.
4236
- * - "task" means that execution in the script was started by the resumption of a task (setTimeout(), setInterval(), async/await, etc).
4237
- */
4238
- enterType: 'call' | 'task';
4239
- }
4240
- /**
4241
- * Defines an interface for a debugger trace that is sent right after when the debugger stops executing a script.
4242
- */
4243
- export interface DebuggerScriptExitTrace {
4244
- /**
4245
- * The ID of the bot.
4246
- */
4247
- botId: string;
4248
- /**
4249
- * The ID of the tag that the debugger stopped executing.
4250
- */
4251
- tag: string;
2419
+ name: string;
4252
2420
  /**
4253
- * The type of exit from the script.
4254
- * - "return" means the script stopped because it returned a value.
4255
- * - "throw" means the script stopped because it
2421
+ * The metadata for the event.
4256
2422
  */
4257
- exitType: 'return' | 'throw';
2423
+ metadata: any;
4258
2424
  }
4259
2425
  /**z
4260
2426
  * Creates a new AddBotAction.
@@ -4285,7 +2451,7 @@ export declare function transaction(events: BotAction[]): TransactionAction;
4285
2451
  * @param arg The optional argument to provide.
4286
2452
  * @param sortIds Whether the bots should be processed in order of their Bot IDs.
4287
2453
  */
4288
- export declare function action(eventName: string, botIds?: string[] | null, userId?: string, arg?: any, sortIds?: boolean): ShoutAction;
2454
+ export declare function action(eventName: string, botIds?: string[] | null, userId?: string | null, arg?: any, sortIds?: boolean): ShoutAction;
4289
2455
  /**
4290
2456
  * Creates a new RejectAction.
4291
2457
  * @param event The action to reject.
@@ -4307,28 +2473,6 @@ export declare function pasteState(state: BotsState, options: PasteStateOptions)
4307
2473
  * @param message The message to show with the event.
4308
2474
  */
4309
2475
  export declare function toast(message: string | number | boolean | object | Array<any> | null, duration?: number): ShowToastAction;
4310
- /**
4311
- * Creates a new AIChatAction.
4312
- *
4313
- * @param messages The messages to include in the chat.
4314
- * @param options The options for the chat.
4315
- * @param taskId The ID of the async task.
4316
- */
4317
- export declare function aiChat(messages: AIChatMessage[], options?: AIChatOptions, taskId?: number | string): AIChatAction;
4318
- /**
4319
- * Creates a new AIGenerateSkyboxAction.
4320
- * @param prompt The prompt that describes what the generated skybox should look like.
4321
- * @param negativePrompt The negative prompt that describes what the generated skybox should not look like.
4322
- * @param options The options for the skybox.
4323
- * @param taskId The ID of the async task.
4324
- */
4325
- export declare function aiGenerateSkybox(prompt: string, negativePrompt: string | null | undefined, options?: AIGenerateSkyboxOptions, taskId?: number | string): AIGenerateSkyboxAction;
4326
- /**
4327
- * Creates a new AIGenerateImageAction.
4328
- * @param options The options.
4329
- * @param taskId The ID of the async task.
4330
- */
4331
- export declare function aiGenerateImage(parameters: AIGenerateImageOptions, options?: RecordActionOptions, taskId?: number | string): AIGenerateImageAction;
4332
2476
  /**
4333
2477
  * Creates a new ShowTooltipAction.
4334
2478
  * @param message The message to show with the event.
@@ -4407,579 +2551,174 @@ export declare function openPhotoCamera(open: boolean, singlePhoto: boolean, opt
4407
2551
  * Creates a new ShowBarcodeAction.
4408
2552
  * @param open Whether the barcode should be visible.
4409
2553
  * @param code The code that should be shown.
4410
- * @param format The format that the code should be shown in. Defaults to 'code128'.
4411
- */
4412
- export declare function showBarcode(open: boolean, code?: string, format?: BarcodeFormat): ShowBarcodeAction;
4413
- /**
4414
- * Creates a new OpenImageClassifierAction.
4415
- * @param open Whether the image classifier should be opened or closed.
4416
- * @param options The options for the classifier.
4417
- * @param taskId The ID of the async task.
4418
- */
4419
- export declare function openImageClassifier(open: boolean, options: ImageClassifierOptions, taskId?: number | string): OpenImageClassifierAction;
4420
- /**
4421
- * Creates a new ShowRunBarAction that shows the run bar.
4422
- * @param options The options that should be used.
4423
- */
4424
- export declare function showChat(options?: ShowChatOptions): ShowChatBarAction;
4425
- /**
4426
- * Creates a new ShowRunBarAction that hides the run bar.
4427
- */
4428
- export declare function hideChat(): ShowChatBarAction;
4429
- /**
4430
- * Creates a new LoadSimulationAction.
4431
- * @param id The ID of the simulation to load.
4432
- */
4433
- export declare function loadSimulation(id: string): LoadServerAction;
4434
- /**
4435
- * Creates a new UnloadSimulationAction.
4436
- * @param id The ID of the simulation to unload.
4437
- */
4438
- export declare function unloadSimulation(id: string): UnloadServerAction;
4439
- /**
4440
- * Creates a new SuperShoutAction.
4441
- * @param eventName The name of the event.
4442
- * @param arg The argument to send as the "that" variable to scripts.
4443
- */
4444
- export declare function superShout(eventName: string, arg?: any): SuperShoutAction;
4445
- /**
4446
- * Creates a new GoToContextAction.
4447
- * @param dimension The simulation ID or dimension to go to. If a simulation ID is being provided, then the dimension parameter must also be provided.
4448
- */
4449
- export declare function goToDimension(dimension: string): GoToDimensionAction;
4450
- /**
4451
- * Creates a new ImportAUXAction.
4452
- * @param url The URL that should be loaded.
4453
- * @param taskId The ID of the async task.
4454
- */
4455
- export declare function importAUX(url: string, taskId?: string | number): ImportAUXAction;
4456
- /**
4457
- * Creates a new ShowInputForTagAction.
4458
- * @param botId The ID of the bot to edit.
4459
- * @param tag The tag to edit.
4460
- */
4461
- export declare function showInputForTag(botId: string, tag: string, options?: Partial<ShowInputOptions>): ShowInputForTagAction;
4462
- /**
4463
- * Creates a new ShowInputAction.
4464
- * @param currentValue The value that the input should be prefilled with.
4465
- * @param options The options for the input.
4466
- * @param taskId The ID of the async task.
4467
- */
4468
- export declare function showInput(currentValue?: any, options?: Partial<ShowInputOptions>, taskId?: number | string): ShowInputAction;
4469
- /**
4470
- * Creates a new ShowConfirmAction.
4471
- * @param options The options for the action.
4472
- * @param taskId The ID of the async task.
4473
- */
4474
- export declare function showConfirm(options: ShowConfirmOptions, taskId?: number | string): ShowConfirmAction;
4475
- /**
4476
- * Creates a new SetForcedOfflineAction event.
4477
- * @param offline Whether the connection should be offline.
4478
- */
4479
- export declare function setForcedOffline(offline: boolean): SetForcedOfflineAction;
4480
- /**
4481
- * Creates a new GoToURLAction.
4482
- * @param url The URL to go to.
4483
- */
4484
- export declare function goToURL(url: string): GoToURLAction;
4485
- /**
4486
- * Creates a new OpenURLAction.
4487
- * @param url The URL to go to.
4488
- */
4489
- export declare function openURL(url: string): OpenURLAction;
4490
- /**
4491
- * Creates a new PlaySoundAction.
4492
- * @param url The URL of the sound to play.
4493
- * @param soundID The ID of the sound.
4494
- * @param taskId The ID of the task.
4495
- */
4496
- export declare function playSound(url: string, soundID: string | number, taskId?: string | number): PlaySoundAction;
4497
- /**
4498
- * Creates a new BufferSoundAction.
4499
- * @param url The URL of the sound to play.
4500
- * @param taskId The ID of the async task.
4501
- */
4502
- export declare function bufferSound(url: string, taskId?: string | number): BufferSoundAction;
4503
- /**
4504
- * Creates a new CancelSoundAction.
4505
- * @param soundId The ID of the sound to cancel.
4506
- * @param taskId The ID of the async task.
4507
- */
4508
- export declare function cancelSound(soundID: number | string, taskId?: string | number): CancelSoundAction;
4509
- /**
4510
- * Creates a new ShellAction.
4511
- * @param script The script that should be run.
4512
- */
4513
- export declare function shell(script: string): ShellAction;
4514
- /**
4515
- * Creates a new ToggleConsoleEvent.
4516
- */
4517
- export declare function openConsole(): OpenConsoleAction;
4518
- /**
4519
- * Creates a new BackupToGithub event.
4520
- * @param auth The authentication key that should be used.
4521
- * @param options The options that should be used.
4522
- */
4523
- export declare function backupToGithub(auth: string, options?: BackupOptions): BackupToGithubAction;
4524
- /**
4525
- * Creates a new BackupAsDownload event.
4526
- */
4527
- export declare function backupAsDownload(target: DeviceSelector, options?: BackupOptions): BackupAsDownloadAction;
4528
- /**
4529
- * Creates a new DownloadAction.
4530
- * @param data The data that should be downloaded.
4531
- * @param filename The name of the file.
4532
- * @param mimeType The MIME type of the data.
4533
- */
4534
- export declare function download(data: any, filename: string, mimeType: string): DownloadAction;
4535
- /**
4536
- * Creates a new StartCheckoutAction.
4537
- * @param options The options.
4538
- */
4539
- export declare function checkout(options: StartCheckoutOptions): StartCheckoutAction;
4540
- /**
4541
- * Creates a new CheckoutSubmittedAction.
4542
- */
4543
- export declare function checkoutSubmitted(productId: string, token: string, processingInst: string): CheckoutSubmittedAction;
4544
- /**
4545
- * Creates a new FinishCheckoutAction.
4546
- * @param secretKey The secret stripe API Key.
4547
- * @param token The token.
4548
- * @param amount The amount.
4549
- * @param currency The currency.
4550
- * @param description The description.
4551
- * @param extra Any extra info to send.
4552
- */
4553
- export declare function finishCheckout(secretKey: string, token: string, amount: number, currency: string, description: string, extra?: any): FinishCheckoutAction;
4554
- /**
4555
- * Creates a new SendWebhookAction.
4556
- * @param options The options for the webhook.
4557
- * @param taskId The ID of the task.
4558
- */
4559
- export declare function webhook(options: WebhookOptions, taskId?: number | string): SendWebhookAction;
4560
- /**
4561
- * Animates the given tag on the given bot using the given options.
4562
- * @param botId The ID of the bot.
4563
- * @param tag The tag to animate.
4564
- * @param options The options.
4565
- * @param taskId The ID of the task that this event represents.
4566
- */
4567
- export declare function animateTag(botId: string, tag: string, options: AnimateTagOptions, taskId?: number | string): AnimateTagAction;
4568
- /**
4569
- * Creates a new LoadFileAction.
4570
- * @param options The options.
4571
- * @param taskId The ID of the async task.
4572
- */
4573
- export declare function loadFile(options: LoadFileOptions, taskId?: number | string): LoadFileAction;
4574
- /**
4575
- * Creates a new SaveFileAction.
4576
- * @param options The options.
4577
- * @param taskId The ID of the async task.
4578
- */
4579
- export declare function saveFile(options: SaveFileOptions, taskId?: number | string): SaveFileAction;
4580
- /**
4581
- * Creates a new GetRemoteCountAction.
4582
- * @param inst The instance that the device count should be retrieved for.
4583
- */
4584
- export declare function getRemoteCount(inst?: string): GetRemoteCountAction;
4585
- /**
4586
- * Creates a new GetServersAction.
4587
- */
4588
- export declare function getServers(): GetServersAction;
4589
- /**
4590
- * Creates a new GetServersAction that includes statuses.
4591
- */
4592
- export declare function getServerStatuses(): GetServersAction;
4593
- /**
4594
- * Creates a new GetRemotesAction.
4595
- */
4596
- export declare function getRemotes(): GetRemotesAction;
4597
- /**
4598
- * Creates a new ListInstUpdatesAction.
4599
- */
4600
- export declare function listInstUpdates(): ListInstUpdatesAction;
4601
- /**
4602
- * Creates a new GetInstStateFromUpdatesAction.
4603
- * @param updates The list of updates to use.
4604
- */
4605
- export declare function getInstStateFromUpdates(updates: InstUpdate[]): GetInstStateFromUpdatesAction;
4606
- /**
4607
- * Creates a new CreateInitializationUpdateAction.
4608
- * @param bots The bots that should be encoded into the update.
4609
- * @param taskId The ID of the task.
4610
- */
4611
- export declare function createInitializationUpdate(bots: Bot[]): CreateInitializationUpdateAction;
4612
- /**
4613
- * Creates a new ApplyUpdatesToInstAction.
4614
- * @param updates The list of updates that should be applied.
4615
- * @param taskId The ID of the task.
4616
- */
4617
- export declare function applyUpdatesToInst(updates: InstUpdate[]): ApplyUpdatesToInstAction;
4618
- /**
4619
- * Creates a new GetCurrentInstUpdateAction.
4620
- */
4621
- export declare function getCurrentInstUpdate(): GetCurrentInstUpdateAction;
4622
- /**
4623
- * Creates a new ReplaceDragBotAction.
4624
- * @param bot The bot/mod that should be dragged instead.
4625
- */
4626
- export declare function replaceDragBot(bot: Bot | BotTags): ReplaceDragBotAction;
4627
- /**
4628
- * Creates a channel if it doesn't exist and places the given bot in it.
4629
- * @param channel The ID of the channel to setup.
4630
- * @param botOrMod The bot that should be cloned into the new channel.
4631
- * @param taskId The ID of the async task.
4632
- */
4633
- export declare function setupServer(channel: string, botOrMod?: Bot | BotTags, taskId?: string | number, playerId?: string): SetupChannelAction;
4634
- /**
4635
- * Sends an event to the server to initialize rpio with provided settings
4636
- * @param options An object containing values to initilize with.
4637
- * @param taskId The ID of the async task.
4638
- *
4639
- * @example
4640
- * // Initialize with default settings
4641
- * server.rpioInit({
4642
- * gpiomem: true,
4643
- * mapping: 'physical',
4644
- * mock: undefined,
4645
- * close_on_exit: false
4646
- * });
4647
- */
4648
- export declare function rpioInitPin(options: object, taskId?: string | number, playerId?: string): RpioInitAction;
4649
- /**
4650
- * Shuts down rpio, unmaps, and clears everything.
4651
- * @param taskId The ID of the async task.
4652
- */
4653
- export declare function rpioExitPin(taskId?: string | number, playerId?: string): RpioExitAction;
4654
- /**
4655
- * Opens a pin up for use and sets its initial mode/state.
4656
- * @param pin The physical pin on the server.
4657
- * @param mode The mode of the pin.
4658
- * @param taskId The ID of the async task.
4659
- */
4660
- export declare function rpioOpenPin(pin: number, mode: 'INPUT' | 'OUTPUT' | 'PWM', options?: 'HIGH' | 'LOW' | 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP', taskId?: string | number, playerId?: string): RpioOpenAction;
4661
- /**
4662
- * Changes a pin's mode/value.
4663
- * @param pin The physical pin on the server.
4664
- * @param mode The mode of the pin.
4665
- * @param taskId The ID of the async task.
4666
- */
4667
- export declare function rpioModePin(pin: number, mode: 'INPUT' | 'OUTPUT' | 'PWM', options?: 'HIGH' | 'LOW' | 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP', taskId?: string | number, playerId?: string): RpioModeAction;
4668
- /**
4669
- * Reads a pin's current value.
4670
- * @param pin The physical BCM Pin on the server.
4671
- * @param taskId The ID of the async task.
4672
- */
4673
- export declare function rpioReadPin(pin: number, taskId?: string | number, playerId?: string): RpioReadAction;
4674
- /**
4675
- * Reads a pin's current buffer.
4676
- * @param pin The physical BCM Pin on the server.
4677
- * @param length The length of the buffer.
4678
- * @param taskId The ID of the async task.
4679
- */
4680
- export declare function rpioReadSequencePin(pin: number, length: number, taskId?: string | number, playerId?: string): RpioReadSequenceAction;
4681
- /**
4682
- * Sets a pin's value.
4683
- * @param pin The physical BCM Pin on the server.
4684
- * @param value The value of the BCM pin whether it's HIGH or LOW.
4685
- * @param taskId The ID of the async task.
4686
- */
4687
- export declare function rpioWritePin(pin: number, value: 'HIGH' | 'LOW', taskId?: string | number, playerId?: string): RpioWriteAction;
4688
- /**
4689
- * Writes to a pin's buffer.
4690
- * @param pin The physical BCM Pin on the server.
4691
- * @param buffer The buffer to write to the pin.
4692
- * @param taskId The ID of the async task.
4693
- */
4694
- export declare function rpioWriteSequencePin(pin: number, buffer: number[], taskId?: string | number, playerId?: string): RpioWriteSequenceAction;
4695
- /**
4696
- * Read the current state of the GPIO pad control for the specified GPIO group.
4697
- * On current models of Raspberry Pi there are three groups.
4698
- *
4699
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
4700
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
4701
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
4702
- *
4703
- * @param group The GPIO group to be read.
4704
- * @param bitmask The bitmask you want to check.
4705
- * @param taskId The ID of the async task.
4706
- */
4707
- export declare function rpioReadpadPin(group: 'PAD_GROUP_0_27' | 'PAD_GROUP_28_45' | 'PAD_GROUP_46_53', bitmask: 'slew' | 'hysteresis' | 'current', taskId?: string | number, playerId?: string): RpioReadpadAction;
4708
- /**
4709
- * Write `control` settings to the pad control for `group`.
4710
- *
4711
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
4712
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
4713
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
4714
- *
4715
- * @param group The GPIO group to be read.
4716
- * @param slew Slew rate unlimited if set to true.
4717
- * @param hysteresis Hysteresis is enabled if set to true.
4718
- * @param current Drive current set in mA. Must be an even number 2-16.
4719
- * @param taskId The ID of the async task.
4720
- */
4721
- export declare function rpioWritepadPin(group: 'PAD_GROUP_0_27' | 'PAD_GROUP_28_45' | 'PAD_GROUP_46_53', slew?: boolean, hysteresis?: boolean, current?: 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16, taskId?: string | number, playerId?: string): RpioWritepadAction;
4722
- /**
4723
- * Configure the pin's internal pullup or pulldown resistors.
4724
- * @param pin The pin that you want to use.
4725
- * @param state Configure the pin's resistors as: 'PULL_OFF', 'PULL_DOWN' or 'PULL_UP'
4726
- * @param taskId The ID of the async task.
4727
- */
4728
- export declare function rpioPudPin(pin: number, state: 'PULL_OFF' | 'PULL_DOWN' | 'PULL_UP', taskId?: string | number, playerId?: string): RpioPudAction;
4729
- /**
4730
- * Watch `pin` for changes and execute the callback `cb()` on events.
4731
- * @param pin The pin that you want to use.
4732
- * @param cb The callback executed on events.
4733
- * @param options Optional. Used to watch for specific events.
4734
- * @param taskId The ID of the async task.
4735
- */
4736
- export declare function rpioPollPin(pin: number, cb: any, options?: 'POLL_LOW' | 'POLL_HIGH' | 'POLL_BOTH', taskId?: string | number, playerId?: string): RpioPollAction;
4737
- /**
4738
- * Sends an event to the server to close a pin and what state to leave it in.
4739
- * @param pin The physical pin number.
4740
- * @param options The state to leave the pin in upon closing.
4741
- * @param taskId The ID of the async task.
4742
- */
4743
- export declare function rpioClosePin(pin: number, options?: 'PIN_RESET' | 'PIN_PRESERVE', taskId?: string | number, playerId?: string): RpioCloseAction;
4744
- /**
4745
- * Initializes i2c for use.
4746
- * @param taskId The ID of the async task.
4747
- */
4748
- export declare function rpioI2CBeginPin(taskId?: string | number, playerId?: string): RpioI2CBeginAction;
4749
- /**
4750
- * Configure the slave address.
4751
- * @param address The slave address to set.
4752
- * @param taskId The ID of the async task.
2554
+ * @param format The format that the code should be shown in. Defaults to 'code128'.
4753
2555
  */
4754
- export declare function rpioI2CSetSlaveAddressPin(address: number, taskId?: string | number, playerId?: string): RpioI2CSetSlaveAddressAction;
2556
+ export declare function showBarcode(open: boolean, code?: string, format?: BarcodeFormat): ShowBarcodeAction;
4755
2557
  /**
4756
- * Set the baud rate. Directly set the speed in hertz.
4757
- * @param rate The i2c refresh rate in hertz.
2558
+ * Creates a new OpenImageClassifierAction.
2559
+ * @param open Whether the image classifier should be opened or closed.
2560
+ * @param options The options for the classifier.
4758
2561
  * @param taskId The ID of the async task.
4759
2562
  */
4760
- export declare function rpioI2CSetBaudRatePin(rate: number, taskId?: string | number, playerId?: string): RpioI2CSetBaudRateAction;
2563
+ export declare function openImageClassifier(open: boolean, options: ImageClassifierOptions, taskId?: number | string): OpenImageClassifierAction;
4761
2564
  /**
4762
- * Set the baud rate. Set it based on a divisor of the base 250MHz rate.
4763
- * @param rate The i2c refresh rate based on a divisor of the base 250MHz rate.
4764
- * @param taskId The ID of the async task.
2565
+ * Creates a new ShowRunBarAction that shows the run bar.
2566
+ * @param options The options that should be used.
4765
2567
  */
4766
- export declare function rpioI2CSetClockDividerPin(rate: number, taskId?: string | number, playerId?: string): RpioI2CSetClockDividerAction;
2568
+ export declare function showChat(options?: ShowChatOptions): ShowChatBarAction;
4767
2569
  /**
4768
- * Read from the i2c slave.
4769
- * @param rx Buffer to read.
4770
- * @param length Optional. Length of the buffer to read.
4771
- * @param taskId The ID of the async task.
2570
+ * Creates a new ShowRunBarAction that hides the run bar.
4772
2571
  */
4773
- export declare function rpioI2CReadPin(rx: number[], length?: number, taskId?: string | number, playerId?: string): RpioI2CReadAction;
2572
+ export declare function hideChat(): ShowChatBarAction;
4774
2573
  /**
4775
- * Write to the i2c slave.
4776
- * @param tx Buffer to write.
4777
- * @param length Optional. Length of the buffer to write.
4778
- * @param taskId The ID of the async task.
2574
+ * Creates a new LoadSimulationAction.
2575
+ * @param id The ID of the simulation to load.
4779
2576
  */
4780
- export declare function rpioI2CWritePin(tx: number[], length?: number, taskId?: string | number, playerId?: string): RpioI2CWriteAction;
2577
+ export declare function loadSimulation(id: string): LoadServerAction;
4781
2578
  /**
4782
- *
4783
- * @param taskId The ID of the async task.
2579
+ * Creates a new UnloadSimulationAction.
2580
+ * @param id The ID of the simulation to unload.
4784
2581
  */
2582
+ export declare function unloadSimulation(id: string): UnloadServerAction;
4785
2583
  /**
4786
- *
4787
- * @param taskId The ID of the async task.
2584
+ * Creates a new SuperShoutAction.
2585
+ * @param eventName The name of the event.
2586
+ * @param arg The argument to send as the "that" variable to scripts.
4788
2587
  */
2588
+ export declare function superShout(eventName: string, arg?: any): SuperShoutAction;
4789
2589
  /**
4790
- * Turn off the i²c interface and return the pins to GPIO.
4791
- * @param taskId The ID of the async task.
2590
+ * Creates a new GoToContextAction.
2591
+ * @param dimension The simulation ID or dimension to go to. If a simulation ID is being provided, then the dimension parameter must also be provided.
4792
2592
  */
4793
- export declare function rpioI2CEndPin(taskId?: string | number, playerId?: string): RpioI2CEndAction;
2593
+ export declare function goToDimension(dimension: string): GoToDimensionAction;
4794
2594
  /**
4795
- * This is a power-of-two divisor of the base 19.2MHz rate, with a maximum value of 4096 (4.6875kHz).
4796
- * @param rate The PWM refresh rate.
2595
+ * Creates a new ImportAUXAction.
2596
+ * @param url The URL that should be loaded.
4797
2597
  * @param taskId The ID of the async task.
4798
2598
  */
4799
- export declare function rpioPWMSetClockDividerPin(rate: number, taskId?: string | number, playerId?: string): RpioPWMSetClockDividerAction;
2599
+ export declare function importAUX(url: string, taskId?: string | number): ImportAUXAction;
4800
2600
  /**
4801
- * This determines the maximum pulse width.
4802
- * @param pin The physical pin number.
4803
- * @param range The PWM range for a pin.
4804
- * @param taskId The ID of the async task.
2601
+ * Creates a new ShowInputForTagAction.
2602
+ * @param botId The ID of the bot to edit.
2603
+ * @param tag The tag to edit.
4805
2604
  */
4806
- export declare function rpioPWMSetRangePin(pin: number, range: number, taskId?: string | number, playerId?: string): RpioPWMSetRangeAction;
2605
+ export declare function showInputForTag(botId: string, tag: string, options?: Partial<ShowInputOptions>): ShowInputForTagAction;
4807
2606
  /**
4808
- * Set the width for a given pin.
4809
- * @param pin The physical pin number.
4810
- * @param width The PWM width for a pin.
2607
+ * Creates a new ShowInputAction.
2608
+ * @param currentValue The value that the input should be prefilled with.
2609
+ * @param options The options for the input.
4811
2610
  * @param taskId The ID of the async task.
4812
2611
  */
4813
- export declare function rpioPWMSetDataPin(pin: number, width: number, taskId?: string | number, playerId?: string): RpioPWMSetDataAction;
2612
+ export declare function showInput(currentValue?: any, options?: Partial<ShowInputOptions>, taskId?: number | string): ShowInputAction;
4814
2613
  /**
4815
- * Initiate SPI mode.
2614
+ * Creates a new ShowConfirmAction.
2615
+ * @param options The options for the action.
4816
2616
  * @param taskId The ID of the async task.
4817
2617
  */
4818
- export declare function rpioSPIBeginPin(taskId?: string | number, playerId?: string): RpioSPIBeginAction;
2618
+ export declare function showConfirm(options: ShowConfirmOptions, taskId?: number | string): ShowConfirmAction;
4819
2619
  /**
4820
- * Choose which of the chip select / chip enable pins to control.
4821
- * Value | Pin
4822
- * ------|---------------------
4823
- * 0 | SPI_CE0 (24 / GPIO8)
4824
- * 1 | SPI_CE1 (26 / GPIO7)
4825
- * 2 | Both
4826
- * @param value The value correlating to pin(s) to control.
4827
- * @param taskId The ID of the async task.
2620
+ * Creates a new SetForcedOfflineAction event.
2621
+ * @param offline Whether the connection should be offline.
4828
2622
  */
4829
- export declare function rpioSPIChipSelectPin(value: 0 | 1 | 2, taskId?: string | number, playerId?: string): RpioSPIChipSelectAction;
2623
+ export declare function setForcedOffline(offline: boolean): SetForcedOfflineAction;
4830
2624
  /**
4831
- * If your device's CE pin is active high, use this to change the polarity.
4832
- * Value | Pin
4833
- * ------|---------------------
4834
- * 0 | SPI_CE0 (24 / GPIO8)
4835
- * 1 | SPI_CE1 (26 / GPIO7)
4836
- * 2 | Both
4837
- * @param value The value correlating to pin(s) to control.
4838
- * @param polarity Set the polarity it activates on. HIGH or LOW
4839
- * @param taskId The ID of the async task.
2625
+ * Creates a new GoToURLAction.
2626
+ * @param url The URL to go to.
4840
2627
  */
4841
- export declare function rpioSPISetCSPolarityPin(value: 0 | 1 | 2, polarity: 'HIGH' | 'LOW', taskId?: string | number, playerId?: string): RpioSPISetCSPolarityAction;
2628
+ export declare function goToURL(url: string): GoToURLAction;
4842
2629
  /**
4843
- * Set the SPI clock speed.
4844
- * @param rate It is an even divisor of the base 250MHz rate ranging between 0 and 65536.
4845
- * @param taskId The ID of the async task.
2630
+ * Creates a new OpenURLAction.
2631
+ * @param url The URL to go to.
4846
2632
  */
4847
- export declare function rpioSPISetClockDividerPin(rate: number, taskId?: string | number, playerId?: string): RpioSPISetClockDividerAction;
2633
+ export declare function openURL(url: string): OpenURLAction;
4848
2634
  /**
4849
- * Set the SPI Data Mode.
4850
- * Mode | CPOL | CPHA
4851
- * -----|------|-----
4852
- * 0 | 0 | 0
4853
- * 1 | 0 | 1
4854
- * 2 | 1 | 0
4855
- * 3 | 1 | 1
4856
- * @param mode The SPI Data Mode.
4857
- * @param taskId The ID of the async task.
2635
+ * Creates a new PlaySoundAction.
2636
+ * @param url The URL of the sound to play.
2637
+ * @param soundID The ID of the sound.
2638
+ * @param taskId The ID of the task.
4858
2639
  */
4859
- export declare function rpioSPISetDataModePin(mode: 0 | 1 | 2 | 3, taskId?: string | number, playerId?: string): RpioSPISetDataModeAction;
2640
+ export declare function playSound(url: string, soundID: string | number, taskId?: string | number): PlaySoundAction;
4860
2641
  /**
4861
- *
2642
+ * Creates a new BufferSoundAction.
2643
+ * @param url The URL of the sound to play.
4862
2644
  * @param taskId The ID of the async task.
4863
2645
  */
4864
- export declare function rpioSPITransferPin(tx: number[], taskId?: string | number, playerId?: string): RpioSPITransferAction;
2646
+ export declare function bufferSound(url: string, taskId?: string | number): BufferSoundAction;
4865
2647
  /**
4866
- *
2648
+ * Creates a new CancelSoundAction.
2649
+ * @param soundId The ID of the sound to cancel.
4867
2650
  * @param taskId The ID of the async task.
4868
2651
  */
4869
- export declare function rpioSPIWritePin(tx: number[], taskId?: string | number, playerId?: string): RpioSPIWriteAction;
2652
+ export declare function cancelSound(soundID: number | string, taskId?: string | number): CancelSoundAction;
4870
2653
  /**
4871
- * Release the pins back to general purpose use.
4872
- * @param taskId The ID of the async task.
2654
+ * Creates a new ShellAction.
2655
+ * @param script The script that should be run.
4873
2656
  */
4874
- export declare function rpioSPIEndPin(taskId?: string | number, playerId?: string): RpioSPIEndAction;
2657
+ export declare function shell(script: string): ShellAction;
4875
2658
  /**
2659
+ * Creates a new ToggleConsoleEvent.
4876
2660
  */
2661
+ export declare function openConsole(): OpenConsoleAction;
4877
2662
  /**
4878
- * Establish the connection to the bluetooth serial device
4879
- * @param name A friendly device name. Example: Brush01
4880
- * @param path The device path. Example: /dev/rfcomm0
4881
- * @param options
4882
- * {boolean} [autoOpen=true] Automatically opens the port on `nextTick`.
4883
- *
4884
- * {number=} [baudRate=9600] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
4885
- *
4886
- * {number} [dataBits=8] Must be one of these: 8, 7, 6, or 5.
4887
- *
4888
- * {number} [highWaterMark=65536] The size of the read and write buffers defaults to 64k.
4889
- *
4890
- * {boolean} [lock=true] Prevent other processes from opening the port. Windows does not currently support `false`.
4891
- *
4892
- * {number} [stopBits=1] Must be one of these: 1 or 2.
4893
- *
4894
- * {string} [parity=none] Must be one of these: 'none', 'even', 'mark', 'odd', 'space'.
4895
- *
4896
- * {boolean} [rtscts=false] flow control setting
4897
- *
4898
- * {boolean} [xon=false] flow control setting
4899
- *
4900
- * {boolean} [xoff=false] flow control setting
4901
- *
4902
- * {boolean} [xany=false] flow control setting
4903
- *
4904
- * {object=} bindingOptions sets binding-specific options
4905
- *
4906
- * {Binding=} Binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. Will default to the static property `Serialport.Binding`.
4907
- *
4908
- * {number} [bindingOptions.vmin=1] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
4909
- *
4910
- * {number} [bindingOptions.vtime=0] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
4911
- * @param taskId The ID of the async task.
2663
+ * Creates a new DownloadAction.
2664
+ * @param data The data that should be downloaded.
2665
+ * @param filename The name of the file.
2666
+ * @param mimeType The MIME type of the data.
4912
2667
  */
4913
- export declare function serialConnectPin(name: string, device: string, mac: string, channel: number, options?: object, taskId?: string | number, playerId?: string): SerialConnectAction;
2668
+ export declare function download(data: any, filename: string, mimeType: string): DownloadAction;
4914
2669
  /**
4915
- * Parses and returns the serial stream to the event tag 'onSerialData'.
4916
- * @param bot The id of the bot you want data streamed to. The bot needs the 'onSerialData' tag.
4917
- * @param name A friendly device name. Example: Brush01
4918
- * @param taskId The ID of the async task.
2670
+ * Creates a new SendWebhookAction.
2671
+ * @param options The options for the webhook.
2672
+ * @param taskId The ID of the task.
4919
2673
  */
4920
- export declare function serialStreamPin(bot: string, name: string, taskId?: string | number, playerId?: string): SerialStreamAction;
2674
+ export declare function webhook(options: WebhookOptions, taskId?: number | string): SendWebhookAction;
4921
2675
  /**
4922
- * Opens the serial connection if you set the option in serialConnect to {autoOpen: false}
4923
- * @param name A friendly device name. Example: Brush01
4924
- * @param taskId The ID of the async task.
2676
+ * Animates the given tag on the given bot using the given options.
2677
+ * @param botId The ID of the bot.
2678
+ * @param tag The tag to animate.
2679
+ * @param options The options.
2680
+ * @param taskId The ID of the task that this event represents.
4925
2681
  */
4926
- export declare function serialOpenPin(name: string, taskId?: string | number, playerId?: string): SerialOpenAction;
2682
+ export declare function animateTag(botId: string, tag: string, options: AnimateTagOptions, taskId?: number | string): AnimateTagAction;
4927
2683
  /**
4928
- * Updates the SerialPort object with a new baudRate.
4929
- * @param name A friendly device name. Example: Brush01
4930
- * @param options {number=} [baudRate=9600] The baud rate of the port to be opened. This should match one of the commonly available baud rates, such as 110, 300, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, or 115200. Custom rates are supported best effort per platform. The device connected to the serial port is not guaranteed to support the requested baud rate, even if the port itself supports that baud rate.
4931
- * @param cb
4932
- * @param taskId The ID of the async task.
2684
+ * Creates a new GetRemoteCountAction.
2685
+ * @param inst The instance that the device count should be retrieved for.
4933
2686
  */
4934
- export declare function serialUpdatePin(name: string, options: object, cb?: any, taskId?: string | number, playerId?: string): SerialUpdateAction;
2687
+ export declare function getRemoteCount(recordName?: string | null, inst?: string | null, branch?: string | null): GetRemoteCountAction;
4935
2688
  /**
4936
- * Writes the provided data/command to the device
4937
- * @param name A friendly device name. Example: Brush01
4938
- * @param data The data/command to send
4939
- * @param encoding The encoding, if chunk is a string. Defaults to 'utf8'. Also accepts 'utf16le', 'latin1', 'ascii', 'base64', 'binary', 'ucs2', and 'hex'
4940
- * @param cb
4941
- * @param taskId The ID of the async task.
2689
+ * Creates a new GetRemotesAction.
4942
2690
  */
4943
- export declare function serialWritePin(name: string, data: string | number[], encoding?: string, cb?: any, taskId?: string | number, playerId?: string): SerialWriteAction;
2691
+ export declare function getRemotes(): GetRemotesAction;
4944
2692
  /**
4945
- * Request a number of bytes from the SerialPort.
4946
- * @param name A friendly device name. Example: Brush01
4947
- * @param size Specify how many bytes of data to return, if available.
4948
- * @param taskId The ID of the async task.
2693
+ * Creates a new ListInstUpdatesAction.
4949
2694
  */
4950
- export declare function serialReadPin(name: string, size?: number, taskId?: string | number, playerId?: string): SerialReadAction;
2695
+ export declare function listInstUpdates(): ListInstUpdatesAction;
4951
2696
  /**
4952
- * Closes an open connection.
4953
- * @param name A friendly device name. Example: Brush01
4954
- * @param cb
4955
- * @param device The device path. Example: /dev/rfcomm0
4956
- * @param taskId The ID of the async task.
2697
+ * Creates a new GetInstStateFromUpdatesAction.
2698
+ * @param updates The list of updates to use.
4957
2699
  */
4958
- export declare function serialClosePin(name: string, device: string, cb?: any, taskId?: string | number, playerId?: string): SerialCloseAction;
2700
+ export declare function getInstStateFromUpdates(updates: InstUpdate[]): GetInstStateFromUpdatesAction;
4959
2701
  /**
4960
- * Flush discards data that has been received but not read, or written but not transmitted by the operating system.
4961
- * @param name A friendly device name. Example: Brush01
4962
- * @param taskId The ID of the async task.
2702
+ * Creates a new CreateInitializationUpdateAction.
2703
+ * @param bots The bots that should be encoded into the update.
2704
+ * @param taskId The ID of the task.
4963
2705
  */
4964
- export declare function serialFlushPin(name: string, taskId?: string | number, playerId?: string): SerialFlushAction;
2706
+ export declare function createInitializationUpdate(bots: Bot[]): CreateInitializationUpdateAction;
4965
2707
  /**
4966
- * Waits until all output data is transmitted to the serial port. After any pending write has completed, it calls `tcdrain()` or `FlushFileBuffers()` to ensure it has been written to the device.
4967
- * @param name A friendly device name. Example: Brush01
4968
- * @param taskId The ID of the async task.
2708
+ * Creates a new ApplyUpdatesToInstAction.
2709
+ * @param updates The list of updates that should be applied.
2710
+ * @param taskId The ID of the task.
4969
2711
  */
4970
- export declare function serialDrainPin(name: string, taskId?: string | number, playerId?: string): SerialDrainAction;
2712
+ export declare function applyUpdatesToInst(updates: InstUpdate[]): ApplyUpdatesToInstAction;
4971
2713
  /**
4972
- * Causes a stream in flowing mode to stop emitting 'data' events, switching out of flowing mode. Any data that becomes available remains in the internal buffer.
4973
- * @param name A friendly device name. Example: Brush01
4974
- * @param taskId The ID of the async task.
2714
+ * Creates a new GetCurrentInstUpdateAction.
4975
2715
  */
4976
- export declare function serialPausePin(name: string, taskId?: string | number, playerId?: string): SerialPauseAction;
2716
+ export declare function getCurrentInstUpdate(): GetCurrentInstUpdateAction;
4977
2717
  /**
4978
- * Causes an explicitly paused, Readable stream to resume emitting 'data' events, switching the stream into flowing mode.
4979
- * @param name A friendly device name. Example: Brush01
4980
- * @param taskId The ID of the async task.
2718
+ * Creates a new ReplaceDragBotAction.
2719
+ * @param bot The bot/mod that should be dragged instead.
4981
2720
  */
4982
- export declare function serialResumePin(name: string, taskId?: string | number, playerId?: string): SerialResumeAction;
2721
+ export declare function replaceDragBot(bot: Bot | BotTags): ReplaceDragBotAction;
4983
2722
  /**
4984
2723
  * Creates a SetClipboardAction.
4985
2724
  * @param text The text that should be set to the clipboard.
@@ -4999,24 +2738,6 @@ export declare function showUploadAuxFile(): ShowUploadAuxFileAction;
4999
2738
  * Creates a ShowUploadFilesAction.
5000
2739
  */
5001
2740
  export declare function showUploadFiles(taskId: number | string): ShowUploadFilesAction;
5002
- /**
5003
- * Creates a MarkHistoryAction.
5004
- * @param options The options to use.
5005
- */
5006
- export declare function markHistory(options: MarkHistoryOptions): MarkHistoryAction;
5007
- export interface MarkHistoryOptions {
5008
- message: string;
5009
- }
5010
- /**
5011
- * Creates a BrowseHistoryAction.
5012
- */
5013
- export declare function browseHistory(): BrowseHistoryAction;
5014
- /**
5015
- * Creates a RestoreHistoryMarkAction.
5016
- * @param mark The ID of the mark that history should be restored to.
5017
- * @param inst The instance that the mark should be restored to. If not specified, then the current instance will be used.
5018
- */
5019
- export declare function restoreHistoryMark(mark: string, inst?: string): RestoreHistoryMarkAction;
5020
2741
  /**
5021
2742
  * Loads a space into the instance.
5022
2743
  * @param space The space to load.
@@ -5095,29 +2816,6 @@ export declare function loadBots(space: string, tags: TagFilter[], taskId?: numb
5095
2816
  * @param taskId The ID of the async task.
5096
2817
  */
5097
2818
  export declare function clearSpace(space: string, taskId?: number | string): ClearSpaceAction;
5098
- /**
5099
- * Requests that the given space be unlocked for editing.
5100
- *
5101
- * Only supported for the following spaces:
5102
- * - admin
5103
- *
5104
- * @param space The space to unlock.
5105
- * @param password The password to use to unlock the space.
5106
- * @param taskId The ID of the task that this event represents.
5107
- */
5108
- export declare function unlockSpace(space: BotSpace, password: string, taskId?: number | string): UnlockSpaceAction;
5109
- /**
5110
- * Requests that the given new password be used to unlock the space for editing.
5111
- *
5112
- * Only supported for the following spaces:
5113
- * - admin
5114
- *
5115
- * @param space The space to unlock.
5116
- * @param oldPassword The old password.
5117
- * @param newPassword The new password to use to unlock the space.
5118
- * @param taskId The ID of the task that this event represents.
5119
- */
5120
- export declare function setSpacePassword(space: BotSpace, oldPassword: string, newPassword: string, taskId?: number | string): SetSpacePasswordAction;
5121
2819
  /**
5122
2820
  * Requests that the given animation be played for the given bot locally.
5123
2821
  * @param botId The bot ID.
@@ -5220,29 +2918,6 @@ export declare function registerBuiltinPortal(portalId: string): RegisterBuiltin
5220
2918
  * @param taskId The ID of the task.
5221
2919
  */
5222
2920
  export declare function registerPrefix(prefix: string, options: RegisterPrefixOptions, taskId?: number | string): RegisterPrefixAction;
5223
- /**
5224
- * Creates an action that requests a new certificate be created.
5225
- * @param options The options.
5226
- * @param taskId The ID of the task.
5227
- */
5228
- export declare function createCertificate(options: CreateCertificateOptions, taskId?: number | string): CreateCertificateAction;
5229
- /**
5230
- * Creates an action that requests a tag on a bot be signed.
5231
- * @param signingBotId The ID of the certificate bot that is creating the signature.
5232
- * @param signingPassword The password used to decrypt the certificate's private key.
5233
- * @param botId The ID of the bot whose tag is being signed.
5234
- * @param tag The tag that is being signed.
5235
- * @param value The value that is being signed.
5236
- */
5237
- export declare function signTag(signingBotId: string, signingPassword: string, botId: string, tag: string, value: any, taskId?: number | string): SignTagAction;
5238
- /**
5239
- * Creates an action that requests that a certificate be revoked.
5240
- * @param signingBotId The ID of the certificate that is signing the revocation.
5241
- * @param signingPassword The password used to decrypt the signing certificate's private key.
5242
- * @param certificateBotId The ID of the bot whose tag is being signed.
5243
- * @param taskId The task ID.
5244
- */
5245
- export declare function revokeCertificate(signingBotId: string, signingPassword: string, certificateBotId: string, taskId?: number | string): RevokeCertificateAction;
5246
2921
  /**
5247
2922
  * Creates a BeginAudioRecordingAction.
5248
2923
  * @param options The options for the audio recording.
@@ -5361,112 +3036,6 @@ export declare function defineGlobalBot(name: string, botId: string, taskId?: st
5361
3036
  * @param taskId The ID of the async task.
5362
3037
  */
5363
3038
  export declare function convertGeolocationToWhat3Words(options: ConvertGeolocationToWhat3WordsOptions, taskId: number | string): ConvertGeolocationToWhat3WordsAction;
5364
- /**
5365
- * Creates a GetPublicRecordKeyAction.
5366
- * @param recordName The name of the record.
5367
- * @param policy The policy that the requested record key should have.
5368
- * @param taskId The ID of the task.
5369
- */
5370
- export declare function getPublicRecordKey(recordName: string, policy: PublicRecordKeyPolicy, taskId: number | string): GetPublicRecordKeyAction;
5371
- /**
5372
- * Creates a GrantRecordMarkerPermissionAction.
5373
- * @param recordName The name of the record.
5374
- * @param marker The marker.
5375
- * @param permission The permission that should be granted.
5376
- * @param options The options for the action.
5377
- * @param taskId The ID of the task.
5378
- */
5379
- export declare function grantRecordMarkerPermission(recordName: string, marker: string, permission: object, options: RecordActionOptions, taskId: number | string): GrantRecordMarkerPermissionAction;
5380
- /**
5381
- * Creates a RevokeRecordMarkerPermissionAction.
5382
- * @param recordName The name of the record.
5383
- * @param marker The marker.
5384
- * @param permission The permission that should be granted.
5385
- * @param options The options for the action.
5386
- * @param taskId The ID of the task.
5387
- */
5388
- export declare function revokeRecordMarkerPermission(recordName: string, marker: string, permission: object, options: RecordActionOptions, taskId: number | string): RevokeRecordMarkerPermissionAction;
5389
- /**
5390
- * Creates a GrantRoleAction for a user.
5391
- * @param recordName The name of the record.
5392
- * @param role The role that should be granted.
5393
- * @param userId The ID of the user.
5394
- * @param expireTimeMs The Unix time (in miliseconds) that the role grant expires.
5395
- * @param options The options for the action.
5396
- * @param taskId The ID of the task.
5397
- */
5398
- export declare function grantUserRole(recordName: string, role: string, userId: string, expireTimeMs: number | null, options: RecordActionOptions, taskId: number | string): GrantRoleAction;
5399
- /**
5400
- * Creates a GrantRoleAction for an inst.
5401
- * @param recordName The name of the record.
5402
- * @param role The role that should be granted.
5403
- * @param inst The ID of the inst.
5404
- * @param expireTimeMs The Unix time (in miliseconds) that the role grant expires.
5405
- * @param options The options for the action.
5406
- * @param taskId The ID of the task.
5407
- */
5408
- export declare function grantInstRole(recordName: string, role: string, inst: string, expireTimeMs: number | null, options: RecordActionOptions, taskId: number | string): GrantRoleAction;
5409
- /**
5410
- * Creates a GrantRoleAction for a user.
5411
- * @param recordName The name of the record.
5412
- * @param role The role that should be granted.
5413
- * @param userId The ID of the user.
5414
- * @param options The options for the action.
5415
- * @param taskId The ID of the task.
5416
- */
5417
- export declare function revokeUserRole(recordName: string, role: string, userId: string, options: RecordActionOptions, taskId: number | string): RevokeRoleAction;
5418
- /**
5419
- * Creates a revokeRoleAction for an inst.
5420
- * @param recordName The name of the record.
5421
- * @param role The role that should be revokeed.
5422
- * @param inst The ID of the inst.
5423
- * @param options The options for the action.
5424
- * @param taskId The ID of the task.
5425
- */
5426
- export declare function revokeInstRole(recordName: string, role: string, inst: string, options: RecordActionOptions, taskId: number | string): RevokeRoleAction;
5427
- /**
5428
- * Creates a GrantInstAdminPermissionAction.
5429
- * @param recordName The name of the record.
5430
- * @param options The options for the action.
5431
- * @param taskId The ID of the task.
5432
- */
5433
- export declare function grantInstAdminPermission(recordName: string, options: RecordActionOptions, taskId: number | string): GrantInstAdminPermissionAction;
5434
- /**
5435
- * Creates a RecordDataAction.
5436
- * @param recordKey The key that should be used to access the record.
5437
- * @param address The address that the data should be stored at in the record.
5438
- * @param data The data to store.
5439
- * @param requiresApproval Whether to try to record data that requires approval.
5440
- * @param options The options that should be used for the action.
5441
- * @param taskId The ID of the task.
5442
- */
5443
- export declare function recordData(recordKey: string, address: string, data: any, requiresApproval: boolean, options: DataRecordOptions, taskId: number | string): RecordDataAction;
5444
- /**
5445
- * Creates a GetRecordDataAction.
5446
- * @param recordName The name of the record to retrieve.
5447
- * @param address The address of the data to retrieve.
5448
- * @param requiresApproval Whether to try to get a record that requires manual approval.
5449
- * @param options The options that should be used for the action.
5450
- * @param taskId The ID of the task.
5451
- */
5452
- export declare function getRecordData(recordName: string, address: string, requiresApproval: boolean, options: RecordActionOptions, taskId?: number | string): GetRecordDataAction;
5453
- /**
5454
- * Creates a ListRecordDataAction.
5455
- * @param recordName The name of the record.
5456
- * @param startingAddress The address that the list should start with.
5457
- * @param options The options that should be used for the action.
5458
- * @param taskId The ID of the task.
5459
- */
5460
- export declare function listDataRecord(recordName: string, startingAddress: string, options: RecordActionOptions, taskId?: number | string): ListRecordDataAction;
5461
- /**
5462
- * Creates a EraseRecordDataAction.
5463
- * @param recordKey The key that should be used to access the record.
5464
- * @param address The address of the data to erase.
5465
- * @param requiresApproval Whether to try to erase a record that requires manual approval.
5466
- * @param options The options that should be used for the action.
5467
- * @param taskId The ID of the task.
5468
- */
5469
- export declare function eraseRecordData(recordKey: string, address: string, requiresApproval: boolean, options: RecordActionOptions, taskId?: number | string): EraseRecordDataAction;
5470
3039
  export interface ApprovableAction {
5471
3040
  /**
5472
3041
  * Whether this action has been manually approved.
@@ -5481,55 +3050,6 @@ export interface ApprovableAction {
5481
3050
  * @param action The action to approve.
5482
3051
  */
5483
3052
  export declare function approveAction<T extends ApprovableAction>(action: T): T;
5484
- /**
5485
- * Creates a RecordFileAction.
5486
- * @param recordKey The key that should be used to access the record.
5487
- * @param data The data to store.
5488
- * @param description The description of the file.
5489
- * @param mimeType The MIME type of the file.
5490
- * @param markers The markers to associate with the file.
5491
- * @param options The options that should be used for the action.
5492
- */
5493
- export declare function recordFile(recordKey: string, data: any, description: string, mimeType: string, options: RecordFileActionOptions, taskId?: number | string): RecordFileAction;
5494
- /**
5495
- * Creates a GetFileAction.
5496
- * @param recordKey The key that should be used to access the record.
5497
- * @param fileUrl The URL that the file was stored at.
5498
- * @param options The options that should be used for the action.
5499
- * @param taskId The ID of the task.
5500
- */
5501
- export declare function getFile(fileUrl: string, options: RecordActionOptions, taskId?: number | string): GetFileAction;
5502
- /**
5503
- * Creates a EraseFileAction.
5504
- * @param recordKey The key that should be used to access the record.
5505
- * @param fileUrl The URL that the file was stored at.
5506
- * @param options The options that should be used for the action.
5507
- * @param taskId The ID of the task.
5508
- */
5509
- export declare function eraseFile(recordKey: string, fileUrl: string, options: RecordActionOptions, taskId?: number | string): EraseFileAction;
5510
- /**
5511
- * Creates a RecordEventAction.
5512
- * @param recordKey The key that should be used to access the record.
5513
- * @param eventName The name of the event.
5514
- * @param count The number of times that the event occurred.
5515
- * @param options The options that should be used for the action.
5516
- * @param taskId The Id of the task.
5517
- */
5518
- export declare function recordEvent(recordKey: string, eventName: string, count: number, options: RecordActionOptions, taskId?: number | string): RecordEventAction;
5519
- /**
5520
- * Creates a GetEventCountAction.
5521
- * @param recordName The name of the record.
5522
- * @param eventName The name of the events.
5523
- * @param options The options that should be used for the action.
5524
- * @param taskId The ID.
5525
- */
5526
- export declare function getEventCount(recordName: string, eventName: string, options: RecordActionOptions, taskId?: number | string): GetEventCountAction;
5527
- /**
5528
- * Creates a ListUserStudiosAction.
5529
- * @param options The options that should be used for the action.
5530
- * @param taskId The ID of the task.
5531
- */
5532
- export declare function listUserStudios(options: RecordActionOptions, taskId?: number | string): ListUserStudiosAction;
5533
3053
  /**
5534
3054
  * Creates a new MediaPermissionAction
5535
3055
  * @param options The options.
@@ -5541,55 +3061,6 @@ export declare function getMediaPermission(options: MediaPermssionOptions, taskI
5541
3061
  * @param taskId The ID of the async task.
5542
3062
  */
5543
3063
  export declare function getAverageFrameRate(taskId?: number | string): GetAverageFrameRateAction;
5544
- /**
5545
- * Creates a new JoinRoomAction.
5546
- * @param roomName The name of the room.
5547
- * @param options The options to use for the event.
5548
- * @param taskId The ID of the async task.
5549
- */
5550
- export declare function joinRoom(roomName: string, options: JoinRoomActionOptions, taskId?: number | string): JoinRoomAction;
5551
- /**
5552
- * Creates a new LeaveRoomAction.
5553
- * @param roomName The name of the room.
5554
- * @param options The options to use for the event.
5555
- * @param taskId The ID of the async task.
5556
- */
5557
- export declare function leaveRoom(roomName: string, options: RecordActionOptions, taskId?: number | string): LeaveRoomAction;
5558
- /**
5559
- * Creates a new SetRoomOptionsAction.
5560
- * @param roomName The name of the room.
5561
- * @param options The options to use for the event.
5562
- * @param taskId The ID of the async task.
5563
- */
5564
- export declare function setRoomOptions(roomName: string, options: Partial<RoomOptions>, taskId?: number | string): SetRoomOptionsAction;
5565
- /**
5566
- * Creates a new GetRoomOptionsAction.
5567
- * @param roomName The name of the room.
5568
- * @param taskId The ID of the async task.
5569
- */
5570
- export declare function getRoomOptions(roomName: string, taskId?: number | string): GetRoomOptionsAction;
5571
- /**
5572
- * Creates a new GetRoomTrackOptionsAction.
5573
- * @param roomName The name of the room.
5574
- * @param address The address of the track.
5575
- * @param taskId The ID of the task.
5576
- */
5577
- export declare function getRoomTrackOptions(roomName: string, address: string, taskId?: number | string): GetRoomTrackOptionsAction;
5578
- /**
5579
- * Creates a new SetRoomTrackOptionsAction.
5580
- * @param roomName The name of the room.
5581
- * @param address The address of the track.
5582
- * @param options The options that should be set.
5583
- * @param taskId The ID of the task.
5584
- */
5585
- export declare function setRoomTrackOptions(roomName: string, address: string, options: SetRoomTrackOptions, taskId?: number | string): SetRoomTrackOptionsAction;
5586
- /**
5587
- * Creates a new GetRoomRemoteOptionsAction.
5588
- * @param roomName The name of the room.
5589
- * @param remoteId The ID of the remote user.
5590
- * @param taskId The ID of the task.
5591
- */
5592
- export declare function getRoomRemoteOptions(roomName: string, remoteId: string, taskId?: number | string): GetRoomRemoteOptionsAction;
5593
3064
  /**
5594
3065
  * Creates a new RaycastFromCameraAction.
5595
3066
  * @param portal The portal that the raycast should occur in.
@@ -5652,17 +3123,4 @@ export declare function getWakeLockConfiguration(taskId?: number | string): GetW
5652
3123
  * @param taskId The ID of the async task.
5653
3124
  */
5654
3125
  export declare function analyticsRecordEvent(name: string, metadata: any, taskId?: number | string): AnalyticsRecordEventAction;
5655
- /**
5656
- * Creates a AttachRuntimeAction.
5657
- * @param runtime The runtime that should be attached.
5658
- * @param tagNameMapper The function that should be used to map tag names.
5659
- * @param taskId The ID of the async task.
5660
- */
5661
- export declare function attachRuntime(runtime: AuxRuntime, tagNameMapper?: AttachRuntimeAction['tagNameMapper'], taskId?: number | string): AttachRuntimeAction;
5662
- /**
5663
- * Creates a DetachRuntimeAction.
5664
- * @param runtime The runtime that should be attached.
5665
- * @param taskId The ID of the async task.
5666
- */
5667
- export declare function detachRuntime(runtime: AuxRuntime, taskId?: number | string): DetachRuntimeAction;
5668
3126
  //# sourceMappingURL=BotEvents.d.ts.map