@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
package/bots/BotEvents.js CHANGED
@@ -1,6 +1,6 @@
1
- import { remoteResult, remoteError, } from '@casual-simulation/causal-trees';
2
1
  import { clamp } from '../utils';
3
2
  import { hasValue } from './BotCalculations';
3
+ import { remoteError, remoteResult, } from '../common';
4
4
  /**
5
5
  * Defines a symbol that can be used to signal to the runtime that the action should not be mapped for bots.
6
6
  */
@@ -121,45 +121,6 @@ export function toast(message, duration) {
121
121
  duration: 2000,
122
122
  };
123
123
  }
124
- /**
125
- * Creates a new AIChatAction.
126
- *
127
- * @param messages The messages to include in the chat.
128
- * @param options The options for the chat.
129
- * @param taskId The ID of the async task.
130
- */
131
- export function aiChat(messages, options, taskId) {
132
- return {
133
- type: 'ai_chat',
134
- messages,
135
- options: options !== null && options !== void 0 ? options : {},
136
- taskId,
137
- };
138
- }
139
- /**
140
- * Creates a new AIGenerateSkyboxAction.
141
- * @param prompt The prompt that describes what the generated skybox should look like.
142
- * @param negativePrompt The negative prompt that describes what the generated skybox should not look like.
143
- * @param options The options for the skybox.
144
- * @param taskId The ID of the async task.
145
- */
146
- export function aiGenerateSkybox(prompt, negativePrompt, options, taskId) {
147
- return {
148
- type: 'ai_generate_skybox',
149
- prompt,
150
- negativePrompt,
151
- options: options !== null && options !== void 0 ? options : {},
152
- taskId,
153
- };
154
- }
155
- /**
156
- * Creates a new AIGenerateImageAction.
157
- * @param options The options.
158
- * @param taskId The ID of the async task.
159
- */
160
- export function aiGenerateImage(parameters, options, taskId) {
161
- return Object.assign(Object.assign({ type: 'ai_generate_image' }, parameters), { options: options !== null && options !== void 0 ? options : {}, taskId });
162
- }
163
124
  /**
164
125
  * Creates a new ShowTooltipAction.
165
126
  * @param message The message to show with the event.
@@ -513,28 +474,6 @@ export function openConsole() {
513
474
  open: true,
514
475
  };
515
476
  }
516
- /**
517
- * Creates a new BackupToGithub event.
518
- * @param auth The authentication key that should be used.
519
- * @param options The options that should be used.
520
- */
521
- export function backupToGithub(auth, options) {
522
- return {
523
- type: 'backup_to_github',
524
- auth,
525
- options,
526
- };
527
- }
528
- /**
529
- * Creates a new BackupAsDownload event.
530
- */
531
- export function backupAsDownload(target, options) {
532
- return {
533
- type: 'backup_as_download',
534
- target,
535
- options,
536
- };
537
- }
538
477
  /**
539
478
  * Creates a new DownloadAction.
540
479
  * @param data The data that should be downloaded.
@@ -549,44 +488,6 @@ export function download(data, filename, mimeType) {
549
488
  mimeType,
550
489
  };
551
490
  }
552
- /**
553
- * Creates a new StartCheckoutAction.
554
- * @param options The options.
555
- */
556
- export function checkout(options) {
557
- return Object.assign({ type: 'start_checkout' }, options);
558
- }
559
- /**
560
- * Creates a new CheckoutSubmittedAction.
561
- */
562
- export function checkoutSubmitted(productId, token, processingInst) {
563
- return {
564
- type: 'checkout_submitted',
565
- productId: productId,
566
- token: token,
567
- processingInst: processingInst,
568
- };
569
- }
570
- /**
571
- * Creates a new FinishCheckoutAction.
572
- * @param secretKey The secret stripe API Key.
573
- * @param token The token.
574
- * @param amount The amount.
575
- * @param currency The currency.
576
- * @param description The description.
577
- * @param extra Any extra info to send.
578
- */
579
- export function finishCheckout(secretKey, token, amount, currency, description, extra) {
580
- return {
581
- type: 'finish_checkout',
582
- secretKey: secretKey,
583
- amount: amount,
584
- currency: currency,
585
- description: description,
586
- token: token,
587
- extra: extra,
588
- };
589
- }
590
491
  /**
591
492
  * Creates a new SendWebhookAction.
592
493
  * @param options The options for the webhook.
@@ -615,39 +516,17 @@ export function animateTag(botId, tag, options, taskId) {
615
516
  taskId,
616
517
  };
617
518
  }
618
- /**
619
- * Creates a new LoadFileAction.
620
- * @param options The options.
621
- * @param taskId The ID of the async task.
622
- */
623
- export function loadFile(options, taskId) {
624
- return {
625
- type: 'load_file',
626
- options: options,
627
- taskId,
628
- };
629
- }
630
- /**
631
- * Creates a new SaveFileAction.
632
- * @param options The options.
633
- * @param taskId The ID of the async task.
634
- */
635
- export function saveFile(options, taskId) {
636
- return {
637
- type: 'save_file',
638
- options: options,
639
- taskId,
640
- };
641
- }
642
519
  /**
643
520
  * Creates a new GetRemoteCountAction.
644
521
  * @param inst The instance that the device count should be retrieved for.
645
522
  */
646
- export function getRemoteCount(inst) {
523
+ export function getRemoteCount(recordName, inst, branch) {
647
524
  if (hasValue(inst)) {
648
525
  return {
649
526
  type: 'get_remote_count',
527
+ recordName,
650
528
  inst,
529
+ branch,
651
530
  };
652
531
  }
653
532
  else {
@@ -656,23 +535,6 @@ export function getRemoteCount(inst) {
656
535
  };
657
536
  }
658
537
  }
659
- /**
660
- * Creates a new GetServersAction.
661
- */
662
- export function getServers() {
663
- return {
664
- type: 'get_servers',
665
- };
666
- }
667
- /**
668
- * Creates a new GetServersAction that includes statuses.
669
- */
670
- export function getServerStatuses() {
671
- return {
672
- type: 'get_servers',
673
- includeStatuses: true,
674
- };
675
- }
676
538
  /**
677
539
  * Creates a new GetRemotesAction.
678
540
  */
@@ -740,1027 +602,248 @@ export function replaceDragBot(bot) {
740
602
  };
741
603
  }
742
604
  /**
743
- * Creates a channel if it doesn't exist and places the given bot in it.
744
- * @param channel The ID of the channel to setup.
745
- * @param botOrMod The bot that should be cloned into the new channel.
746
- * @param taskId The ID of the async task.
605
+ * Creates a SetClipboardAction.
606
+ * @param text The text that should be set to the clipboard.
747
607
  */
748
- export function setupServer(channel, botOrMod, taskId, playerId) {
608
+ export function setClipboard(text) {
749
609
  return {
750
- type: 'setup_server',
751
- channel,
752
- botOrMod,
753
- taskId,
754
- playerId,
610
+ type: 'set_clipboard',
611
+ text,
755
612
  };
756
613
  }
757
614
  /**
758
- * Sends an event to the server to initialize rpio with provided settings
759
- * @param options An object containing values to initilize with.
760
- * @param taskId The ID of the async task.
761
- *
762
- * @example
763
- * // Initialize with default settings
764
- * server.rpioInit({
765
- * gpiomem: true,
766
- * mapping: 'physical',
767
- * mock: undefined,
768
- * close_on_exit: false
769
- * });
770
- */
771
- export function rpioInitPin(options, taskId, playerId) {
772
- return {
773
- type: 'rpio_init',
774
- options,
615
+ * Creates a RunScriptAction.
616
+ * @param script The script that should be executed.
617
+ * @param taskId The ID of the async task that this script represents.
618
+ */
619
+ export function runScript(script, taskId) {
620
+ return {
621
+ type: 'run_script',
622
+ script,
775
623
  taskId,
776
- playerId,
777
624
  };
778
625
  }
779
626
  /**
780
- * Shuts down rpio, unmaps, and clears everything.
781
- * @param taskId The ID of the async task.
627
+ * Creates a showUploadAuxFileAction.
782
628
  */
783
- export function rpioExitPin(taskId, playerId) {
629
+ export function showUploadAuxFile() {
784
630
  return {
785
- type: 'rpio_exit',
786
- taskId,
787
- playerId,
631
+ type: 'show_upload_aux_file',
788
632
  };
789
633
  }
790
634
  /**
791
- * Opens a pin up for use and sets its initial mode/state.
792
- * @param pin The physical pin on the server.
793
- * @param mode The mode of the pin.
794
- * @param taskId The ID of the async task.
635
+ * Creates a ShowUploadFilesAction.
795
636
  */
796
- export function rpioOpenPin(pin, mode, options, taskId, playerId) {
637
+ export function showUploadFiles(taskId) {
797
638
  return {
798
- type: 'rpio_open',
799
- pin,
800
- mode,
801
- options,
639
+ type: 'show_upload_files',
802
640
  taskId,
803
- playerId,
804
641
  };
805
642
  }
806
643
  /**
807
- * Changes a pin's mode/value.
808
- * @param pin The physical pin on the server.
809
- * @param mode The mode of the pin.
644
+ * Loads a space into the instance.
645
+ * @param space The space to load.
646
+ * @param config The config which specifies how the space should be loaded.
810
647
  * @param taskId The ID of the async task.
811
648
  */
812
- export function rpioModePin(pin, mode, options, taskId, playerId) {
649
+ export function loadSpace(space, config, taskId) {
813
650
  return {
814
- type: 'rpio_mode',
815
- pin,
816
- mode,
817
- options,
651
+ type: 'load_space',
652
+ space,
653
+ config,
818
654
  taskId,
819
- playerId,
820
655
  };
821
656
  }
822
657
  /**
823
- * Reads a pin's current value.
824
- * @param pin The physical BCM Pin on the server.
825
- * @param taskId The ID of the async task.
658
+ * Creates a EnableARAction.
826
659
  */
827
- export function rpioReadPin(pin, taskId, playerId) {
660
+ export function enableAR(options = {}) {
828
661
  return {
829
- type: 'rpio_read',
830
- pin,
831
- taskId,
832
- playerId,
662
+ type: 'enable_ar',
663
+ enabled: true,
664
+ options,
833
665
  };
834
666
  }
835
667
  /**
836
- * Reads a pin's current buffer.
837
- * @param pin The physical BCM Pin on the server.
838
- * @param length The length of the buffer.
839
- * @param taskId The ID of the async task.
668
+ * Creates a EnableVRAction.
840
669
  */
841
- export function rpioReadSequencePin(pin, length, taskId, playerId) {
670
+ export function enableVR(options = {}) {
842
671
  return {
843
- type: 'rpio_read_sequence',
844
- pin,
845
- length,
846
- taskId,
847
- playerId,
672
+ type: 'enable_vr',
673
+ enabled: true,
674
+ options,
848
675
  };
849
676
  }
850
677
  /**
851
- * Sets a pin's value.
852
- * @param pin The physical BCM Pin on the server.
853
- * @param value The value of the BCM pin whether it's HIGH or LOW.
854
- * @param taskId The ID of the async task.
678
+ * Creates a EnableARAction that disables AR.
855
679
  */
856
- export function rpioWritePin(pin, value, taskId, playerId) {
680
+ export function disableAR() {
857
681
  return {
858
- type: 'rpio_write',
859
- pin,
860
- value,
861
- taskId,
862
- playerId,
682
+ type: 'enable_ar',
683
+ enabled: false,
684
+ options: {},
863
685
  };
864
686
  }
865
687
  /**
866
- * Writes to a pin's buffer.
867
- * @param pin The physical BCM Pin on the server.
868
- * @param buffer The buffer to write to the pin.
869
- * @param taskId The ID of the async task.
688
+ * Creates a EnableVRAction that disables VR.
870
689
  */
871
- export function rpioWriteSequencePin(pin, buffer, taskId, playerId) {
690
+ export function disableVR() {
872
691
  return {
873
- type: 'rpio_write_sequence',
874
- pin,
875
- buffer,
876
- taskId,
877
- playerId,
692
+ type: 'enable_vr',
693
+ enabled: false,
694
+ options: {},
878
695
  };
879
696
  }
880
697
  /**
881
- * Read the current state of the GPIO pad control for the specified GPIO group.
882
- * On current models of Raspberry Pi there are three groups.
883
- *
884
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
885
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
886
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
887
- *
888
- * @param group The GPIO group to be read.
889
- * @param bitmask The bitmask you want to check.
698
+ * Creates a new ARSupportedAction.
890
699
  * @param taskId The ID of the async task.
891
700
  */
892
- export function rpioReadpadPin(group, bitmask, taskId, playerId) {
701
+ export function arSupported(taskId) {
893
702
  return {
894
- group,
895
- bitmask,
896
- type: 'rpio_readpad',
703
+ type: 'ar_supported',
897
704
  taskId,
898
- playerId,
899
705
  };
900
706
  }
901
707
  /**
902
- * Write `control` settings to the pad control for `group`.
903
- *
904
- * 'PAD_GROUP_0_27' is GPIO0 - GPIO27. Use this for the main GPIO header.
905
- * 'PAD_GROUP_28_45' is GPIO28 - GPIO45. Use this to configure the P5 header.
906
- * 'PAD_GROUP_46_53' is GPIO46 - GPIO53. Internal, you probably won't need this.
907
- *
908
- * @param group The GPIO group to be read.
909
- * @param slew Slew rate unlimited if set to true.
910
- * @param hysteresis Hysteresis is enabled if set to true.
911
- * @param current Drive current set in mA. Must be an even number 2-16.
708
+ * Creates a new VRSupportedAction.
912
709
  * @param taskId The ID of the async task.
913
710
  */
914
- export function rpioWritepadPin(group, slew, hysteresis, current, taskId, playerId) {
711
+ export function vrSupported(taskId) {
915
712
  return {
916
- group,
917
- slew,
918
- hysteresis,
919
- current,
920
- type: 'rpio_writepad',
713
+ type: 'vr_supported',
921
714
  taskId,
922
- playerId,
923
715
  };
924
716
  }
925
717
  /**
926
- * Configure the pin's internal pullup or pulldown resistors.
927
- * @param pin The pin that you want to use.
928
- * @param state Configure the pin's resistors as: 'PULL_OFF', 'PULL_DOWN' or 'PULL_UP'
929
- * @param taskId The ID of the async task.
718
+ * Creates a EnablePOVAction that enables point-of-view mode.
719
+ * @param center
720
+ * @returns
930
721
  */
931
- export function rpioPudPin(pin, state, taskId, playerId) {
722
+ export function enablePOV(center, imu) {
932
723
  return {
933
- pin,
934
- state,
935
- type: 'rpio_pud',
936
- taskId,
937
- playerId,
724
+ type: 'enable_pov',
725
+ enabled: true,
726
+ center,
727
+ imu,
938
728
  };
939
729
  }
940
730
  /**
941
- * Watch `pin` for changes and execute the callback `cb()` on events.
942
- * @param pin The pin that you want to use.
943
- * @param cb The callback executed on events.
944
- * @param options Optional. Used to watch for specific events.
945
- * @param taskId The ID of the async task.
731
+ * Creates a EnablePOVAction that disables point-of-view mode.
946
732
  */
947
- export function rpioPollPin(pin, cb, options, taskId, playerId) {
733
+ export function disablePOV() {
948
734
  return {
949
- pin,
950
- cb,
951
- options,
952
- type: 'rpio_poll',
953
- taskId,
954
- playerId,
735
+ type: 'enable_pov',
736
+ enabled: false,
955
737
  };
956
738
  }
957
739
  /**
958
- * Sends an event to the server to close a pin and what state to leave it in.
959
- * @param pin The physical pin number.
960
- * @param options The state to leave the pin in upon closing.
961
- * @param taskId The ID of the async task.
740
+ * Creates a ShowJoinCodeAction.
741
+ * @param inst The instance to link to.
742
+ * @param dimension The dimension to link to.
962
743
  */
963
- export function rpioClosePin(pin, options, taskId, playerId) {
744
+ export function showJoinCode(inst, dimension) {
964
745
  return {
965
- type: 'rpio_close',
966
- pin,
967
- options,
968
- taskId,
969
- playerId,
746
+ type: 'show_join_code',
747
+ inst,
748
+ dimension,
970
749
  };
971
750
  }
972
751
  /**
973
- * Initializes i2c for use.
974
- * @param taskId The ID of the async task.
752
+ * Requests that the app go into fullscreen mode.
975
753
  */
976
- export function rpioI2CBeginPin(taskId, playerId) {
754
+ export function requestFullscreen() {
977
755
  return {
978
- type: 'rpio_i2c_begin',
979
- taskId,
980
- playerId,
756
+ type: 'request_fullscreen_mode',
981
757
  };
982
758
  }
983
759
  /**
984
- * Configure the slave address.
985
- * @param address The slave address to set.
986
- * @param taskId The ID of the async task.
760
+ * Exists fullscreen mode.
987
761
  */
988
- export function rpioI2CSetSlaveAddressPin(address, taskId, playerId) {
762
+ export function exitFullscreen() {
989
763
  return {
990
- address,
991
- type: 'rpio_i2c_setslaveaddress',
992
- taskId,
993
- playerId,
764
+ type: 'exit_fullscreen_mode',
994
765
  };
995
766
  }
996
767
  /**
997
- * Set the baud rate. Directly set the speed in hertz.
998
- * @param rate The i2c refresh rate in hertz.
999
- * @param taskId The ID of the async task.
768
+ * Requests that bots matching the given tags be loaded from the given space.
769
+ * @param space The space that the bots should be loaded from.
770
+ * @param tags The tags that should be on the loaded bots.
771
+ * @param taskId The ID of the async task for this action.
1000
772
  */
1001
- export function rpioI2CSetBaudRatePin(rate, taskId, playerId) {
773
+ export function loadBots(space, tags, taskId) {
1002
774
  return {
1003
- rate,
1004
- type: 'rpio_i2c_setbaudrate',
775
+ type: 'load_bots',
776
+ space: space,
777
+ tags: tags,
1005
778
  taskId,
1006
- playerId,
1007
779
  };
1008
780
  }
1009
781
  /**
1010
- * Set the baud rate. Set it based on a divisor of the base 250MHz rate.
1011
- * @param rate The i2c refresh rate based on a divisor of the base 250MHz rate.
782
+ * Requests that all the bots in the given space be cleared.
783
+ *
784
+ * Only supported for the following spaces:
785
+ * - error
786
+ *
787
+ * @param space The space to clear.
1012
788
  * @param taskId The ID of the async task.
1013
789
  */
1014
- export function rpioI2CSetClockDividerPin(rate, taskId, playerId) {
790
+ export function clearSpace(space, taskId) {
1015
791
  return {
1016
- rate,
1017
- type: 'rpio_i2c_setclockdivider',
792
+ type: 'clear_space',
793
+ space: space,
1018
794
  taskId,
1019
- playerId,
1020
795
  };
1021
796
  }
1022
797
  /**
1023
- * Read from the i2c slave.
1024
- * @param rx Buffer to read.
1025
- * @param length Optional. Length of the buffer to read.
1026
- * @param taskId The ID of the async task.
798
+ * Requests that the given animation be played for the given bot locally.
799
+ * @param botId The bot ID.
800
+ * @param animation The animation.
1027
801
  */
1028
- export function rpioI2CReadPin(rx, length, taskId, playerId) {
802
+ export function localFormAnimation(botId, animation) {
1029
803
  return {
1030
- rx,
1031
- length,
1032
- type: 'rpio_i2c_read',
1033
- taskId,
1034
- playerId,
804
+ type: 'local_form_animation',
805
+ botId,
806
+ animation,
1035
807
  };
1036
808
  }
1037
809
  /**
1038
- * Write to the i2c slave.
1039
- * @param tx Buffer to write.
1040
- * @param length Optional. Length of the buffer to write.
1041
- * @param taskId The ID of the async task.
810
+ * Requests that the given bot be tweened to the given position using the given easing.
811
+ * @param botId The ID of the bot.
812
+ * @param dimension The dimension that the bot should be tweened in.
813
+ * @param position The position of the bot.
814
+ * @param easing The easing to use.
815
+ * @param duration The duration of the tween in seconds.
1042
816
  */
1043
- export function rpioI2CWritePin(tx, length, taskId, playerId) {
817
+ export function localPositionTween(botId, dimension, position, easing = { type: 'linear', mode: 'inout' }, duration = 1, taskId) {
1044
818
  return {
1045
- tx,
1046
- length,
1047
- type: 'rpio_i2c_write',
819
+ type: 'local_tween',
820
+ tweenType: 'position',
821
+ botId,
822
+ dimension,
823
+ easing,
824
+ position,
825
+ duration: clamp(duration, 0, MAX_TWEEN_DURATION),
1048
826
  taskId,
1049
- playerId,
1050
827
  };
1051
828
  }
1052
829
  /**
830
+ * Requests that the given bot be tweened to the given rotation using the given easing.
831
+ * @param botId The ID of the bot.
832
+ * @param dimension The dimension that the bot should be tweened in.
833
+ * @param position The position of the bot.
834
+ * @param easing The easing to use.
835
+ * @param duration The duration of the tween in seconds.
1053
836
  *
1054
- * @param taskId The ID of the async task.
1055
- */
1056
- // export function rpioI2CReadRegisterRestartPin(
1057
- // taskId?: string | number,
1058
- // playerId?: string
1059
- // ): RpioI2CReadRegisterRestartAction {
1060
- // return {
1061
- // type: 'rpio_i2c_readregisterrestart',
1062
- // taskId,
1063
- // playerId,
1064
- // };
1065
- // }
1066
- /**
1067
- *
1068
- * @param taskId The ID of the async task.
1069
- */
1070
- // export function rpioI2CWriteReadRestartPin(
1071
- // taskId?: string | number,
1072
- // playerId?: string
1073
- // ): RpioI2CWriteReadRestartAction {
1074
- // return {
1075
- // type: 'rpio_i2c_writereadrestart',
1076
- // taskId,
1077
- // playerId,
1078
- // };
1079
- // }
1080
- /**
1081
- * Turn off the i²c interface and return the pins to GPIO.
1082
- * @param taskId The ID of the async task.
1083
837
  */
1084
- export function rpioI2CEndPin(taskId, playerId) {
838
+ export function localRotationTween(botId, dimension, rotation, easing = { type: 'linear', mode: 'inout' }, duration = 1, taskId) {
1085
839
  return {
1086
- type: 'rpio_i2c_end',
1087
- taskId,
1088
- playerId,
1089
- };
1090
- }
1091
- /**
1092
- * This is a power-of-two divisor of the base 19.2MHz rate, with a maximum value of 4096 (4.6875kHz).
1093
- * @param rate The PWM refresh rate.
1094
- * @param taskId The ID of the async task.
1095
- */
1096
- export function rpioPWMSetClockDividerPin(rate, taskId, playerId) {
1097
- return {
1098
- type: 'rpio_pwm_setclockdivider',
1099
- rate,
1100
- taskId,
1101
- playerId,
1102
- };
1103
- }
1104
- /**
1105
- * This determines the maximum pulse width.
1106
- * @param pin The physical pin number.
1107
- * @param range The PWM range for a pin.
1108
- * @param taskId The ID of the async task.
1109
- */
1110
- export function rpioPWMSetRangePin(pin, range, taskId, playerId) {
1111
- return {
1112
- pin,
1113
- range,
1114
- type: 'rpio_pwm_setrange',
1115
- taskId,
1116
- playerId,
1117
- };
1118
- }
1119
- /**
1120
- * Set the width for a given pin.
1121
- * @param pin The physical pin number.
1122
- * @param width The PWM width for a pin.
1123
- * @param taskId The ID of the async task.
1124
- */
1125
- export function rpioPWMSetDataPin(pin, width, taskId, playerId) {
1126
- return {
1127
- pin,
1128
- width,
1129
- type: 'rpio_pwm_setdata',
1130
- taskId,
1131
- playerId,
1132
- };
1133
- }
1134
- /**
1135
- * Initiate SPI mode.
1136
- * @param taskId The ID of the async task.
1137
- */
1138
- export function rpioSPIBeginPin(taskId, playerId) {
1139
- return {
1140
- type: 'rpio_spi_begin',
1141
- taskId,
1142
- playerId,
1143
- };
1144
- }
1145
- /**
1146
- * Choose which of the chip select / chip enable pins to control.
1147
- * Value | Pin
1148
- * ------|---------------------
1149
- * 0 | SPI_CE0 (24 / GPIO8)
1150
- * 1 | SPI_CE1 (26 / GPIO7)
1151
- * 2 | Both
1152
- * @param value The value correlating to pin(s) to control.
1153
- * @param taskId The ID of the async task.
1154
- */
1155
- export function rpioSPIChipSelectPin(value, taskId, playerId) {
1156
- return {
1157
- value,
1158
- type: 'rpio_spi_chipselect',
1159
- taskId,
1160
- playerId,
1161
- };
1162
- }
1163
- /**
1164
- * If your device's CE pin is active high, use this to change the polarity.
1165
- * Value | Pin
1166
- * ------|---------------------
1167
- * 0 | SPI_CE0 (24 / GPIO8)
1168
- * 1 | SPI_CE1 (26 / GPIO7)
1169
- * 2 | Both
1170
- * @param value The value correlating to pin(s) to control.
1171
- * @param polarity Set the polarity it activates on. HIGH or LOW
1172
- * @param taskId The ID of the async task.
1173
- */
1174
- export function rpioSPISetCSPolarityPin(value, polarity, taskId, playerId) {
1175
- return {
1176
- value,
1177
- polarity,
1178
- type: 'rpio_spi_setcspolarity',
1179
- taskId,
1180
- playerId,
1181
- };
1182
- }
1183
- /**
1184
- * Set the SPI clock speed.
1185
- * @param rate It is an even divisor of the base 250MHz rate ranging between 0 and 65536.
1186
- * @param taskId The ID of the async task.
1187
- */
1188
- export function rpioSPISetClockDividerPin(rate, taskId, playerId) {
1189
- return {
1190
- rate,
1191
- type: 'rpio_spi_setclockdivider',
1192
- taskId,
1193
- playerId,
1194
- };
1195
- }
1196
- /**
1197
- * Set the SPI Data Mode.
1198
- * Mode | CPOL | CPHA
1199
- * -----|------|-----
1200
- * 0 | 0 | 0
1201
- * 1 | 0 | 1
1202
- * 2 | 1 | 0
1203
- * 3 | 1 | 1
1204
- * @param mode The SPI Data Mode.
1205
- * @param taskId The ID of the async task.
1206
- */
1207
- export function rpioSPISetDataModePin(mode, taskId, playerId) {
1208
- return {
1209
- mode,
1210
- type: 'rpio_spi_setdatamode',
1211
- taskId,
1212
- playerId,
1213
- };
1214
- }
1215
- /**
1216
- *
1217
- * @param taskId The ID of the async task.
1218
- */
1219
- export function rpioSPITransferPin(tx, taskId, playerId) {
1220
- return {
1221
- tx,
1222
- type: 'rpio_spi_transfer',
1223
- taskId,
1224
- playerId,
1225
- };
1226
- }
1227
- /**
1228
- *
1229
- * @param taskId The ID of the async task.
1230
- */
1231
- export function rpioSPIWritePin(tx, taskId, playerId) {
1232
- return {
1233
- tx,
1234
- type: 'rpio_spi_write',
1235
- taskId,
1236
- playerId,
1237
- };
1238
- }
1239
- /**
1240
- * Release the pins back to general purpose use.
1241
- * @param taskId The ID of the async task.
1242
- */
1243
- export function rpioSPIEndPin(taskId, playerId) {
1244
- return {
1245
- type: 'rpio_spi_end',
1246
- taskId,
1247
- playerId,
1248
- };
1249
- }
1250
- /**
1251
- */
1252
- /**
1253
- * Establish the connection to the bluetooth serial device
1254
- * @param name A friendly device name. Example: Brush01
1255
- * @param path The device path. Example: /dev/rfcomm0
1256
- * @param options
1257
- * {boolean} [autoOpen=true] Automatically opens the port on `nextTick`.
1258
- *
1259
- * {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.
1260
- *
1261
- * {number} [dataBits=8] Must be one of these: 8, 7, 6, or 5.
1262
- *
1263
- * {number} [highWaterMark=65536] The size of the read and write buffers defaults to 64k.
1264
- *
1265
- * {boolean} [lock=true] Prevent other processes from opening the port. Windows does not currently support `false`.
1266
- *
1267
- * {number} [stopBits=1] Must be one of these: 1 or 2.
1268
- *
1269
- * {string} [parity=none] Must be one of these: 'none', 'even', 'mark', 'odd', 'space'.
1270
- *
1271
- * {boolean} [rtscts=false] flow control setting
1272
- *
1273
- * {boolean} [xon=false] flow control setting
1274
- *
1275
- * {boolean} [xoff=false] flow control setting
1276
- *
1277
- * {boolean} [xany=false] flow control setting
1278
- *
1279
- * {object=} bindingOptions sets binding-specific options
1280
- *
1281
- * {Binding=} Binding The hardware access binding. `Bindings` are how Node-Serialport talks to the underlying system. Will default to the static property `Serialport.Binding`.
1282
- *
1283
- * {number} [bindingOptions.vmin=1] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
1284
- *
1285
- * {number} [bindingOptions.vtime=0] see [`man termios`](http://linux.die.net/man/3/termios) LinuxBinding and DarwinBinding
1286
- * @param taskId The ID of the async task.
1287
- */
1288
- export function serialConnectPin(name, device, mac, channel, options, taskId, playerId) {
1289
- return {
1290
- name,
1291
- device,
1292
- mac,
1293
- channel,
1294
- options,
1295
- type: 'serial_connect',
1296
- taskId,
1297
- playerId,
1298
- };
1299
- }
1300
- /**
1301
- * Parses and returns the serial stream to the event tag 'onSerialData'.
1302
- * @param bot The id of the bot you want data streamed to. The bot needs the 'onSerialData' tag.
1303
- * @param name A friendly device name. Example: Brush01
1304
- * @param taskId The ID of the async task.
1305
- */
1306
- export function serialStreamPin(bot, name, taskId, playerId) {
1307
- return {
1308
- bot,
1309
- name,
1310
- type: 'serial_stream',
1311
- taskId,
1312
- playerId,
1313
- };
1314
- }
1315
- /**
1316
- * Opens the serial connection if you set the option in serialConnect to {autoOpen: false}
1317
- * @param name A friendly device name. Example: Brush01
1318
- * @param taskId The ID of the async task.
1319
- */
1320
- export function serialOpenPin(name, taskId, playerId) {
1321
- return {
1322
- name,
1323
- type: 'serial_open',
1324
- taskId,
1325
- playerId,
1326
- };
1327
- }
1328
- /**
1329
- * Updates the SerialPort object with a new baudRate.
1330
- * @param name A friendly device name. Example: Brush01
1331
- * @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.
1332
- * @param cb
1333
- * @param taskId The ID of the async task.
1334
- */
1335
- export function serialUpdatePin(name, options, cb, taskId, playerId) {
1336
- return {
1337
- name,
1338
- options,
1339
- cb,
1340
- type: 'serial_update',
1341
- taskId,
1342
- playerId,
1343
- };
1344
- }
1345
- /**
1346
- * Writes the provided data/command to the device
1347
- * @param name A friendly device name. Example: Brush01
1348
- * @param data The data/command to send
1349
- * @param encoding The encoding, if chunk is a string. Defaults to 'utf8'. Also accepts 'utf16le', 'latin1', 'ascii', 'base64', 'binary', 'ucs2', and 'hex'
1350
- * @param cb
1351
- * @param taskId The ID of the async task.
1352
- */
1353
- export function serialWritePin(name, data, encoding, cb, taskId, playerId) {
1354
- return {
1355
- name,
1356
- data,
1357
- encoding,
1358
- cb,
1359
- type: 'serial_write',
1360
- taskId,
1361
- playerId,
1362
- };
1363
- }
1364
- /**
1365
- * Request a number of bytes from the SerialPort.
1366
- * @param name A friendly device name. Example: Brush01
1367
- * @param size Specify how many bytes of data to return, if available.
1368
- * @param taskId The ID of the async task.
1369
- */
1370
- export function serialReadPin(name, size, taskId, playerId) {
1371
- return {
1372
- name,
1373
- size,
1374
- type: 'serial_read',
1375
- taskId,
1376
- playerId,
1377
- };
1378
- }
1379
- /**
1380
- * Closes an open connection.
1381
- * @param name A friendly device name. Example: Brush01
1382
- * @param cb
1383
- * @param device The device path. Example: /dev/rfcomm0
1384
- * @param taskId The ID of the async task.
1385
- */
1386
- export function serialClosePin(name, device, cb, taskId, playerId) {
1387
- return {
1388
- name,
1389
- device,
1390
- cb,
1391
- type: 'serial_close',
1392
- taskId,
1393
- playerId,
1394
- };
1395
- }
1396
- /**
1397
- * Flush discards data that has been received but not read, or written but not transmitted by the operating system.
1398
- * @param name A friendly device name. Example: Brush01
1399
- * @param taskId The ID of the async task.
1400
- */
1401
- export function serialFlushPin(name, taskId, playerId) {
1402
- return {
1403
- name,
1404
- type: 'serial_flush',
1405
- taskId,
1406
- playerId,
1407
- };
1408
- }
1409
- /**
1410
- * 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.
1411
- * @param name A friendly device name. Example: Brush01
1412
- * @param taskId The ID of the async task.
1413
- */
1414
- export function serialDrainPin(name, taskId, playerId) {
1415
- return {
1416
- name,
1417
- type: 'serial_drain',
1418
- taskId,
1419
- playerId,
1420
- };
1421
- }
1422
- /**
1423
- * 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.
1424
- * @param name A friendly device name. Example: Brush01
1425
- * @param taskId The ID of the async task.
1426
- */
1427
- export function serialPausePin(name, taskId, playerId) {
1428
- return {
1429
- name,
1430
- type: 'serial_pause',
1431
- taskId,
1432
- playerId,
1433
- };
1434
- }
1435
- /**
1436
- * Causes an explicitly paused, Readable stream to resume emitting 'data' events, switching the stream into flowing mode.
1437
- * @param name A friendly device name. Example: Brush01
1438
- * @param taskId The ID of the async task.
1439
- */
1440
- export function serialResumePin(name, taskId, playerId) {
1441
- return {
1442
- name,
1443
- type: 'serial_resume',
1444
- taskId,
1445
- playerId,
1446
- };
1447
- }
1448
- /**
1449
- * Creates a SetClipboardAction.
1450
- * @param text The text that should be set to the clipboard.
1451
- */
1452
- export function setClipboard(text) {
1453
- return {
1454
- type: 'set_clipboard',
1455
- text,
1456
- };
1457
- }
1458
- /**
1459
- * Creates a RunScriptAction.
1460
- * @param script The script that should be executed.
1461
- * @param taskId The ID of the async task that this script represents.
1462
- */
1463
- export function runScript(script, taskId) {
1464
- return {
1465
- type: 'run_script',
1466
- script,
1467
- taskId,
1468
- };
1469
- }
1470
- /**
1471
- * Creates a showUploadAuxFileAction.
1472
- */
1473
- export function showUploadAuxFile() {
1474
- return {
1475
- type: 'show_upload_aux_file',
1476
- };
1477
- }
1478
- /**
1479
- * Creates a ShowUploadFilesAction.
1480
- */
1481
- export function showUploadFiles(taskId) {
1482
- return {
1483
- type: 'show_upload_files',
1484
- taskId,
1485
- };
1486
- }
1487
- /**
1488
- * Creates a MarkHistoryAction.
1489
- * @param options The options to use.
1490
- */
1491
- export function markHistory(options) {
1492
- return Object.assign({ type: 'mark_history' }, options);
1493
- }
1494
- /**
1495
- * Creates a BrowseHistoryAction.
1496
- */
1497
- export function browseHistory() {
1498
- return {
1499
- type: 'browse_history',
1500
- };
1501
- }
1502
- /**
1503
- * Creates a RestoreHistoryMarkAction.
1504
- * @param mark The ID of the mark that history should be restored to.
1505
- * @param inst The instance that the mark should be restored to. If not specified, then the current instance will be used.
1506
- */
1507
- export function restoreHistoryMark(mark, inst) {
1508
- if (!inst) {
1509
- return {
1510
- type: 'restore_history_mark',
1511
- mark,
1512
- };
1513
- }
1514
- else {
1515
- return {
1516
- type: 'restore_history_mark',
1517
- mark,
1518
- inst,
1519
- };
1520
- }
1521
- }
1522
- /**
1523
- * Loads a space into the instance.
1524
- * @param space The space to load.
1525
- * @param config The config which specifies how the space should be loaded.
1526
- * @param taskId The ID of the async task.
1527
- */
1528
- export function loadSpace(space, config, taskId) {
1529
- return {
1530
- type: 'load_space',
1531
- space,
1532
- config,
1533
- taskId,
1534
- };
1535
- }
1536
- /**
1537
- * Creates a EnableARAction.
1538
- */
1539
- export function enableAR(options = {}) {
1540
- return {
1541
- type: 'enable_ar',
1542
- enabled: true,
1543
- options,
1544
- };
1545
- }
1546
- /**
1547
- * Creates a EnableVRAction.
1548
- */
1549
- export function enableVR(options = {}) {
1550
- return {
1551
- type: 'enable_vr',
1552
- enabled: true,
1553
- options,
1554
- };
1555
- }
1556
- /**
1557
- * Creates a EnableARAction that disables AR.
1558
- */
1559
- export function disableAR() {
1560
- return {
1561
- type: 'enable_ar',
1562
- enabled: false,
1563
- options: {},
1564
- };
1565
- }
1566
- /**
1567
- * Creates a EnableVRAction that disables VR.
1568
- */
1569
- export function disableVR() {
1570
- return {
1571
- type: 'enable_vr',
1572
- enabled: false,
1573
- options: {},
1574
- };
1575
- }
1576
- /**
1577
- * Creates a new ARSupportedAction.
1578
- * @param taskId The ID of the async task.
1579
- */
1580
- export function arSupported(taskId) {
1581
- return {
1582
- type: 'ar_supported',
1583
- taskId,
1584
- };
1585
- }
1586
- /**
1587
- * Creates a new VRSupportedAction.
1588
- * @param taskId The ID of the async task.
1589
- */
1590
- export function vrSupported(taskId) {
1591
- return {
1592
- type: 'vr_supported',
1593
- taskId,
1594
- };
1595
- }
1596
- /**
1597
- * Creates a EnablePOVAction that enables point-of-view mode.
1598
- * @param center
1599
- * @returns
1600
- */
1601
- export function enablePOV(center, imu) {
1602
- return {
1603
- type: 'enable_pov',
1604
- enabled: true,
1605
- center,
1606
- imu,
1607
- };
1608
- }
1609
- /**
1610
- * Creates a EnablePOVAction that disables point-of-view mode.
1611
- */
1612
- export function disablePOV() {
1613
- return {
1614
- type: 'enable_pov',
1615
- enabled: false,
1616
- };
1617
- }
1618
- /**
1619
- * Creates a ShowJoinCodeAction.
1620
- * @param inst The instance to link to.
1621
- * @param dimension The dimension to link to.
1622
- */
1623
- export function showJoinCode(inst, dimension) {
1624
- return {
1625
- type: 'show_join_code',
1626
- inst,
1627
- dimension,
1628
- };
1629
- }
1630
- /**
1631
- * Requests that the app go into fullscreen mode.
1632
- */
1633
- export function requestFullscreen() {
1634
- return {
1635
- type: 'request_fullscreen_mode',
1636
- };
1637
- }
1638
- /**
1639
- * Exists fullscreen mode.
1640
- */
1641
- export function exitFullscreen() {
1642
- return {
1643
- type: 'exit_fullscreen_mode',
1644
- };
1645
- }
1646
- /**
1647
- * Requests that bots matching the given tags be loaded from the given space.
1648
- * @param space The space that the bots should be loaded from.
1649
- * @param tags The tags that should be on the loaded bots.
1650
- * @param taskId The ID of the async task for this action.
1651
- */
1652
- export function loadBots(space, tags, taskId) {
1653
- return {
1654
- type: 'load_bots',
1655
- space: space,
1656
- tags: tags,
1657
- taskId,
1658
- };
1659
- }
1660
- /**
1661
- * Requests that all the bots in the given space be cleared.
1662
- *
1663
- * Only supported for the following spaces:
1664
- * - error
1665
- *
1666
- * @param space The space to clear.
1667
- * @param taskId The ID of the async task.
1668
- */
1669
- export function clearSpace(space, taskId) {
1670
- return {
1671
- type: 'clear_space',
1672
- space: space,
1673
- taskId,
1674
- };
1675
- }
1676
- /**
1677
- * Requests that the given space be unlocked for editing.
1678
- *
1679
- * Only supported for the following spaces:
1680
- * - admin
1681
- *
1682
- * @param space The space to unlock.
1683
- * @param password The password to use to unlock the space.
1684
- * @param taskId The ID of the task that this event represents.
1685
- */
1686
- export function unlockSpace(space, password, taskId) {
1687
- return {
1688
- type: 'unlock_space',
1689
- space,
1690
- password,
1691
- taskId,
1692
- };
1693
- }
1694
- /**
1695
- * Requests that the given new password be used to unlock the space for editing.
1696
- *
1697
- * Only supported for the following spaces:
1698
- * - admin
1699
- *
1700
- * @param space The space to unlock.
1701
- * @param oldPassword The old password.
1702
- * @param newPassword The new password to use to unlock the space.
1703
- * @param taskId The ID of the task that this event represents.
1704
- */
1705
- export function setSpacePassword(space, oldPassword, newPassword, taskId) {
1706
- return {
1707
- type: 'set_space_password',
1708
- space,
1709
- oldPassword,
1710
- newPassword,
1711
- taskId,
1712
- };
1713
- }
1714
- /**
1715
- * Requests that the given animation be played for the given bot locally.
1716
- * @param botId The bot ID.
1717
- * @param animation The animation.
1718
- */
1719
- export function localFormAnimation(botId, animation) {
1720
- return {
1721
- type: 'local_form_animation',
1722
- botId,
1723
- animation,
1724
- };
1725
- }
1726
- /**
1727
- * Requests that the given bot be tweened to the given position using the given easing.
1728
- * @param botId The ID of the bot.
1729
- * @param dimension The dimension that the bot should be tweened in.
1730
- * @param position The position of the bot.
1731
- * @param easing The easing to use.
1732
- * @param duration The duration of the tween in seconds.
1733
- */
1734
- export function localPositionTween(botId, dimension, position, easing = { type: 'linear', mode: 'inout' }, duration = 1, taskId) {
1735
- return {
1736
- type: 'local_tween',
1737
- tweenType: 'position',
1738
- botId,
1739
- dimension,
1740
- easing,
1741
- position,
1742
- duration: clamp(duration, 0, MAX_TWEEN_DURATION),
1743
- taskId,
1744
- };
1745
- }
1746
- /**
1747
- * Requests that the given bot be tweened to the given rotation using the given easing.
1748
- * @param botId The ID of the bot.
1749
- * @param dimension The dimension that the bot should be tweened in.
1750
- * @param position The position of the bot.
1751
- * @param easing The easing to use.
1752
- * @param duration The duration of the tween in seconds.
1753
- *
1754
- */
1755
- export function localRotationTween(botId, dimension, rotation, easing = { type: 'linear', mode: 'inout' }, duration = 1, taskId) {
1756
- return {
1757
- type: 'local_tween',
1758
- tweenType: 'rotation',
1759
- botId,
1760
- dimension,
1761
- easing,
1762
- rotation,
1763
- duration: clamp(duration, 0, MAX_TWEEN_DURATION),
840
+ type: 'local_tween',
841
+ tweenType: 'rotation',
842
+ botId,
843
+ dimension,
844
+ easing,
845
+ rotation,
846
+ duration: clamp(duration, 0, MAX_TWEEN_DURATION),
1764
847
  taskId,
1765
848
  };
1766
849
  }
@@ -1905,49 +988,6 @@ export function registerPrefix(prefix, options, taskId) {
1905
988
  taskId,
1906
989
  };
1907
990
  }
1908
- /**
1909
- * Creates an action that requests a new certificate be created.
1910
- * @param options The options.
1911
- * @param taskId The ID of the task.
1912
- */
1913
- export function createCertificate(options, taskId) {
1914
- return Object.assign(Object.assign({ type: 'create_certificate' }, options), { taskId });
1915
- }
1916
- /**
1917
- * Creates an action that requests a tag on a bot be signed.
1918
- * @param signingBotId The ID of the certificate bot that is creating the signature.
1919
- * @param signingPassword The password used to decrypt the certificate's private key.
1920
- * @param botId The ID of the bot whose tag is being signed.
1921
- * @param tag The tag that is being signed.
1922
- * @param value The value that is being signed.
1923
- */
1924
- export function signTag(signingBotId, signingPassword, botId, tag, value, taskId) {
1925
- return {
1926
- type: 'sign_tag',
1927
- signingBotId,
1928
- signingPassword,
1929
- botId,
1930
- tag,
1931
- value,
1932
- taskId,
1933
- };
1934
- }
1935
- /**
1936
- * Creates an action that requests that a certificate be revoked.
1937
- * @param signingBotId The ID of the certificate that is signing the revocation.
1938
- * @param signingPassword The password used to decrypt the signing certificate's private key.
1939
- * @param certificateBotId The ID of the bot whose tag is being signed.
1940
- * @param taskId The task ID.
1941
- */
1942
- export function revokeCertificate(signingBotId, signingPassword, certificateBotId, taskId) {
1943
- return {
1944
- type: 'revoke_certificate',
1945
- signingBotId,
1946
- signingPassword,
1947
- certificateBotId,
1948
- taskId,
1949
- };
1950
- }
1951
991
  /**
1952
992
  * Creates a BeginAudioRecordingAction.
1953
993
  * @param options The options for the audio recording.
@@ -2186,219 +1226,6 @@ export function defineGlobalBot(name, botId, taskId) {
2186
1226
  export function convertGeolocationToWhat3Words(options, taskId) {
2187
1227
  return Object.assign(Object.assign({ type: 'convert_geolocation_to_w3w' }, options), { taskId });
2188
1228
  }
2189
- /**
2190
- * Creates a GetPublicRecordKeyAction.
2191
- * @param recordName The name of the record.
2192
- * @param policy The policy that the requested record key should have.
2193
- * @param taskId The ID of the task.
2194
- */
2195
- export function getPublicRecordKey(recordName, policy, taskId) {
2196
- return {
2197
- type: 'get_public_record_key',
2198
- recordName,
2199
- policy,
2200
- taskId,
2201
- };
2202
- }
2203
- /**
2204
- * Creates a GrantRecordMarkerPermissionAction.
2205
- * @param recordName The name of the record.
2206
- * @param marker The marker.
2207
- * @param permission The permission that should be granted.
2208
- * @param options The options for the action.
2209
- * @param taskId The ID of the task.
2210
- */
2211
- export function grantRecordMarkerPermission(recordName, marker, permission, options, taskId) {
2212
- return {
2213
- type: 'grant_record_marker_permission',
2214
- recordName,
2215
- marker,
2216
- permission,
2217
- options,
2218
- taskId,
2219
- };
2220
- }
2221
- /**
2222
- * Creates a RevokeRecordMarkerPermissionAction.
2223
- * @param recordName The name of the record.
2224
- * @param marker The marker.
2225
- * @param permission The permission that should be granted.
2226
- * @param options The options for the action.
2227
- * @param taskId The ID of the task.
2228
- */
2229
- export function revokeRecordMarkerPermission(recordName, marker, permission, options, taskId) {
2230
- return {
2231
- type: 'revoke_record_marker_permission',
2232
- recordName,
2233
- marker,
2234
- permission,
2235
- options,
2236
- taskId,
2237
- };
2238
- }
2239
- /**
2240
- * Creates a GrantRoleAction for a user.
2241
- * @param recordName The name of the record.
2242
- * @param role The role that should be granted.
2243
- * @param userId The ID of the user.
2244
- * @param expireTimeMs The Unix time (in miliseconds) that the role grant expires.
2245
- * @param options The options for the action.
2246
- * @param taskId The ID of the task.
2247
- */
2248
- export function grantUserRole(recordName, role, userId, expireTimeMs, options, taskId) {
2249
- return {
2250
- type: 'grant_role',
2251
- recordName,
2252
- role,
2253
- userId,
2254
- expireTimeMs,
2255
- options,
2256
- taskId,
2257
- };
2258
- }
2259
- /**
2260
- * Creates a GrantRoleAction for an inst.
2261
- * @param recordName The name of the record.
2262
- * @param role The role that should be granted.
2263
- * @param inst The ID of the inst.
2264
- * @param expireTimeMs The Unix time (in miliseconds) that the role grant expires.
2265
- * @param options The options for the action.
2266
- * @param taskId The ID of the task.
2267
- */
2268
- export function grantInstRole(recordName, role, inst, expireTimeMs, options, taskId) {
2269
- return {
2270
- type: 'grant_role',
2271
- recordName,
2272
- role,
2273
- inst,
2274
- expireTimeMs,
2275
- options,
2276
- taskId,
2277
- };
2278
- }
2279
- /**
2280
- * Creates a GrantRoleAction for a user.
2281
- * @param recordName The name of the record.
2282
- * @param role The role that should be granted.
2283
- * @param userId The ID of the user.
2284
- * @param options The options for the action.
2285
- * @param taskId The ID of the task.
2286
- */
2287
- export function revokeUserRole(recordName, role, userId, options, taskId) {
2288
- return {
2289
- type: 'revoke_role',
2290
- recordName,
2291
- role,
2292
- userId,
2293
- options,
2294
- taskId,
2295
- };
2296
- }
2297
- /**
2298
- * Creates a revokeRoleAction for an inst.
2299
- * @param recordName The name of the record.
2300
- * @param role The role that should be revokeed.
2301
- * @param inst The ID of the inst.
2302
- * @param options The options for the action.
2303
- * @param taskId The ID of the task.
2304
- */
2305
- export function revokeInstRole(recordName, role, inst, options, taskId) {
2306
- return {
2307
- type: 'revoke_role',
2308
- recordName,
2309
- role,
2310
- inst,
2311
- options,
2312
- taskId,
2313
- };
2314
- }
2315
- /**
2316
- * Creates a GrantInstAdminPermissionAction.
2317
- * @param recordName The name of the record.
2318
- * @param options The options for the action.
2319
- * @param taskId The ID of the task.
2320
- */
2321
- export function grantInstAdminPermission(recordName, options, taskId) {
2322
- return {
2323
- type: 'grant_inst_admin_permission',
2324
- recordName,
2325
- options,
2326
- taskId,
2327
- };
2328
- }
2329
- /**
2330
- * Creates a RecordDataAction.
2331
- * @param recordKey The key that should be used to access the record.
2332
- * @param address The address that the data should be stored at in the record.
2333
- * @param data The data to store.
2334
- * @param requiresApproval Whether to try to record data that requires approval.
2335
- * @param options The options that should be used for the action.
2336
- * @param taskId The ID of the task.
2337
- */
2338
- export function recordData(recordKey, address, data, requiresApproval, options, taskId) {
2339
- return {
2340
- type: 'record_data',
2341
- recordKey,
2342
- address,
2343
- data,
2344
- requiresApproval,
2345
- options,
2346
- taskId,
2347
- };
2348
- }
2349
- /**
2350
- * Creates a GetRecordDataAction.
2351
- * @param recordName The name of the record to retrieve.
2352
- * @param address The address of the data to retrieve.
2353
- * @param requiresApproval Whether to try to get a record that requires manual approval.
2354
- * @param options The options that should be used for the action.
2355
- * @param taskId The ID of the task.
2356
- */
2357
- export function getRecordData(recordName, address, requiresApproval, options, taskId) {
2358
- return {
2359
- type: 'get_record_data',
2360
- recordName,
2361
- address,
2362
- requiresApproval,
2363
- options,
2364
- taskId,
2365
- };
2366
- }
2367
- /**
2368
- * Creates a ListRecordDataAction.
2369
- * @param recordName The name of the record.
2370
- * @param startingAddress The address that the list should start with.
2371
- * @param options The options that should be used for the action.
2372
- * @param taskId The ID of the task.
2373
- */
2374
- export function listDataRecord(recordName, startingAddress, options, taskId) {
2375
- return {
2376
- type: 'list_record_data',
2377
- recordName,
2378
- startingAddress,
2379
- requiresApproval: false,
2380
- options,
2381
- taskId,
2382
- };
2383
- }
2384
- /**
2385
- * Creates a EraseRecordDataAction.
2386
- * @param recordKey The key that should be used to access the record.
2387
- * @param address The address of the data to erase.
2388
- * @param requiresApproval Whether to try to erase a record that requires manual approval.
2389
- * @param options The options that should be used for the action.
2390
- * @param taskId The ID of the task.
2391
- */
2392
- export function eraseRecordData(recordKey, address, requiresApproval, options, taskId) {
2393
- return {
2394
- type: 'erase_record_data',
2395
- recordKey,
2396
- address,
2397
- requiresApproval,
2398
- options,
2399
- taskId,
2400
- };
2401
- }
2402
1229
  /**
2403
1230
  * Approves the given data record action and returns a new action that has been approved.
2404
1231
  * @param action The action to approve.
@@ -2406,103 +1233,6 @@ export function eraseRecordData(recordKey, address, requiresApproval, options, t
2406
1233
  export function approveAction(action) {
2407
1234
  return Object.assign(Object.assign({}, action), { [APPROVED_SYMBOL]: true });
2408
1235
  }
2409
- /**
2410
- * Creates a RecordFileAction.
2411
- * @param recordKey The key that should be used to access the record.
2412
- * @param data The data to store.
2413
- * @param description The description of the file.
2414
- * @param mimeType The MIME type of the file.
2415
- * @param markers The markers to associate with the file.
2416
- * @param options The options that should be used for the action.
2417
- */
2418
- export function recordFile(recordKey, data, description, mimeType, options, taskId) {
2419
- return {
2420
- type: 'record_file',
2421
- recordKey,
2422
- data,
2423
- description,
2424
- mimeType,
2425
- options,
2426
- taskId,
2427
- };
2428
- }
2429
- /**
2430
- * Creates a GetFileAction.
2431
- * @param recordKey The key that should be used to access the record.
2432
- * @param fileUrl The URL that the file was stored at.
2433
- * @param options The options that should be used for the action.
2434
- * @param taskId The ID of the task.
2435
- */
2436
- export function getFile(fileUrl, options, taskId) {
2437
- return {
2438
- type: 'get_file',
2439
- fileUrl,
2440
- options,
2441
- taskId,
2442
- };
2443
- }
2444
- /**
2445
- * Creates a EraseFileAction.
2446
- * @param recordKey The key that should be used to access the record.
2447
- * @param fileUrl The URL that the file was stored at.
2448
- * @param options The options that should be used for the action.
2449
- * @param taskId The ID of the task.
2450
- */
2451
- export function eraseFile(recordKey, fileUrl, options, taskId) {
2452
- return {
2453
- type: 'erase_file',
2454
- recordKey,
2455
- fileUrl,
2456
- options,
2457
- taskId,
2458
- };
2459
- }
2460
- /**
2461
- * Creates a RecordEventAction.
2462
- * @param recordKey The key that should be used to access the record.
2463
- * @param eventName The name of the event.
2464
- * @param count The number of times that the event occurred.
2465
- * @param options The options that should be used for the action.
2466
- * @param taskId The Id of the task.
2467
- */
2468
- export function recordEvent(recordKey, eventName, count, options, taskId) {
2469
- return {
2470
- type: 'record_event',
2471
- recordKey,
2472
- eventName,
2473
- count,
2474
- options,
2475
- taskId,
2476
- };
2477
- }
2478
- /**
2479
- * Creates a GetEventCountAction.
2480
- * @param recordName The name of the record.
2481
- * @param eventName The name of the events.
2482
- * @param options The options that should be used for the action.
2483
- * @param taskId The ID.
2484
- */
2485
- export function getEventCount(recordName, eventName, options, taskId) {
2486
- return {
2487
- type: 'get_event_count',
2488
- recordName,
2489
- eventName,
2490
- options,
2491
- taskId,
2492
- };
2493
- }
2494
- /**
2495
- * Creates a ListUserStudiosAction.
2496
- * @param options The options that should be used for the action.
2497
- * @param taskId The ID of the task.
2498
- */
2499
- export function listUserStudios(options, taskId) {
2500
- return {
2501
- type: 'list_user_studios',
2502
- options,
2503
- taskId,
2504
- };
2505
- }
2506
1236
  /**
2507
1237
  * Creates a new MediaPermissionAction
2508
1238
  * @param options The options.
@@ -2521,104 +1251,6 @@ export function getAverageFrameRate(taskId) {
2521
1251
  taskId,
2522
1252
  };
2523
1253
  }
2524
- /**
2525
- * Creates a new JoinRoomAction.
2526
- * @param roomName The name of the room.
2527
- * @param options The options to use for the event.
2528
- * @param taskId The ID of the async task.
2529
- */
2530
- export function joinRoom(roomName, options, taskId) {
2531
- return {
2532
- type: 'join_room',
2533
- roomName,
2534
- options,
2535
- taskId,
2536
- };
2537
- }
2538
- /**
2539
- * Creates a new LeaveRoomAction.
2540
- * @param roomName The name of the room.
2541
- * @param options The options to use for the event.
2542
- * @param taskId The ID of the async task.
2543
- */
2544
- export function leaveRoom(roomName, options, taskId) {
2545
- return {
2546
- type: 'leave_room',
2547
- roomName,
2548
- options,
2549
- taskId,
2550
- };
2551
- }
2552
- /**
2553
- * Creates a new SetRoomOptionsAction.
2554
- * @param roomName The name of the room.
2555
- * @param options The options to use for the event.
2556
- * @param taskId The ID of the async task.
2557
- */
2558
- export function setRoomOptions(roomName, options, taskId) {
2559
- return {
2560
- type: 'set_room_options',
2561
- roomName,
2562
- options,
2563
- taskId,
2564
- };
2565
- }
2566
- /**
2567
- * Creates a new GetRoomOptionsAction.
2568
- * @param roomName The name of the room.
2569
- * @param taskId The ID of the async task.
2570
- */
2571
- export function getRoomOptions(roomName, taskId) {
2572
- return {
2573
- type: 'get_room_options',
2574
- roomName,
2575
- taskId,
2576
- };
2577
- }
2578
- /**
2579
- * Creates a new GetRoomTrackOptionsAction.
2580
- * @param roomName The name of the room.
2581
- * @param address The address of the track.
2582
- * @param taskId The ID of the task.
2583
- */
2584
- export function getRoomTrackOptions(roomName, address, taskId) {
2585
- return {
2586
- type: 'get_room_track_options',
2587
- roomName,
2588
- address,
2589
- taskId,
2590
- };
2591
- }
2592
- /**
2593
- * Creates a new SetRoomTrackOptionsAction.
2594
- * @param roomName The name of the room.
2595
- * @param address The address of the track.
2596
- * @param options The options that should be set.
2597
- * @param taskId The ID of the task.
2598
- */
2599
- export function setRoomTrackOptions(roomName, address, options, taskId) {
2600
- return {
2601
- type: 'set_room_track_options',
2602
- roomName,
2603
- address,
2604
- options,
2605
- taskId,
2606
- };
2607
- }
2608
- /**
2609
- * Creates a new GetRoomRemoteOptionsAction.
2610
- * @param roomName The name of the room.
2611
- * @param remoteId The ID of the remote user.
2612
- * @param taskId The ID of the task.
2613
- */
2614
- export function getRoomRemoteOptions(roomName, remoteId, taskId) {
2615
- return {
2616
- type: 'get_room_remote_options',
2617
- roomName,
2618
- remoteId,
2619
- taskId,
2620
- };
2621
- }
2622
1254
  /**
2623
1255
  * Creates a new RaycastFromCameraAction.
2624
1256
  * @param portal The portal that the raycast should occur in.
@@ -2738,32 +1370,4 @@ export function analyticsRecordEvent(name, metadata, taskId) {
2738
1370
  taskId,
2739
1371
  };
2740
1372
  }
2741
- /**
2742
- * Creates a AttachRuntimeAction.
2743
- * @param runtime The runtime that should be attached.
2744
- * @param tagNameMapper The function that should be used to map tag names.
2745
- * @param taskId The ID of the async task.
2746
- */
2747
- export function attachRuntime(runtime, tagNameMapper, taskId) {
2748
- return {
2749
- type: 'attach_runtime',
2750
- uncopiable: true,
2751
- runtime,
2752
- tagNameMapper,
2753
- taskId,
2754
- };
2755
- }
2756
- /**
2757
- * Creates a DetachRuntimeAction.
2758
- * @param runtime The runtime that should be attached.
2759
- * @param taskId The ID of the async task.
2760
- */
2761
- export function detachRuntime(runtime, taskId) {
2762
- return {
2763
- type: 'detach_runtime',
2764
- uncopiable: true,
2765
- runtime,
2766
- taskId,
2767
- };
2768
- }
2769
1373
  //# sourceMappingURL=BotEvents.js.map