@ecmaos/kernel 0.8.1 → 0.9.2

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 (205) hide show
  1. package/README.md +103 -17
  2. package/dist/.vite/manifest.json +23 -12
  3. package/dist/ecmaos-figlet.png +0 -0
  4. package/dist/ecmaos-screenshot.png +0 -0
  5. package/dist/ecmaos.sh-lighthouse-report.png +0 -0
  6. package/dist/index-CyR7px7Y.js +1651 -0
  7. package/dist/index-CyR7px7Y.js.map +1 -0
  8. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/assets/dmt/dmt-component-data.js +1 -1
  9. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/assets/dmt/dmt-search.cmp +0 -0
  10. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/assets/highlight.css +12 -12
  11. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_auth.Auth.html +2 -2
  12. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_components.Component.html +2 -2
  13. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_components.Components.html +2 -2
  14. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_dom.Dom.html +2 -2
  15. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_events.Events.html +8 -8
  16. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_fdtable.FDTable.html +14 -14
  17. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_filesystem.Filesystem.html +13 -11
  18. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_i18n.I18n.html +2 -2
  19. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_intervals.Intervals.html +2 -2
  20. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_kernel.Kernel.html +64 -61
  21. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_lib_commands.TerminalCommand.html +4 -4
  22. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_log.Log.html +3 -3
  23. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_memory.Memory.html +2 -2
  24. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_processes.Process.html +33 -33
  25. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_processes.ProcessManager.html +2 -2
  26. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_protocol.Protocol.html +2 -2
  27. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_service.Service.html +10 -10
  28. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_shell.Shell.html +16 -16
  29. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_sockets.Sockets.html +7 -7
  30. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_storage.Storage.html +8 -8
  31. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_telemetry.Telemetry.html +2 -2
  32. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_terminal.Spinner.html +2 -2
  33. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_terminal.Terminal.html +32 -32
  34. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_users.Users.html +13 -13
  35. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_wasm.Wasm.html +4 -4
  36. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_windows.Windows.html +8 -8
  37. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/classes/kernel_src_tree_workers.Workers.html +4 -4
  38. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/enums/kernel_src_tree_terminal.CommandPath.html +2 -2
  39. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/enums/types_kernel.KernelEvents.html +2 -2
  40. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/enums/types_kernel.KernelState.html +2 -2
  41. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/enums/types_processes.ProcessEvents.html +2 -2
  42. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/enums/types_terminal.TerminalEvents.html +2 -2
  43. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.TerminalCommands.html +1 -1
  44. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.chown.html +1 -1
  45. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.clear.html +1 -1
  46. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.df.html +1 -1
  47. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.download.html +1 -1
  48. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.load.html +1 -1
  49. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.passwd.html +1 -1
  50. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.ps.html +1 -1
  51. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.reboot.html +1 -1
  52. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.screensaver.html +1 -1
  53. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.snake.html +1 -1
  54. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.su.html +1 -1
  55. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands.upload.html +1 -1
  56. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands_install.default.html +1 -1
  57. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_commands_uninstall.default.html +1 -1
  58. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_crontab.parseCrontabFile.html +1 -1
  59. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_crontab.parseCrontabLine.html +1 -1
  60. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_fstab.parseFstabFile.html +5 -0
  61. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_fstab.parseFstabLine.html +5 -0
  62. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_screensavers_blank.default.html +1 -1
  63. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_screensavers_blank.exit.html +1 -1
  64. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_screensavers_matrix.default.html +1 -1
  65. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/functions/kernel_src_tree_lib_screensavers_matrix.exit.html +1 -1
  66. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/index.html +64 -14
  67. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/kernel_src_tree_lib_commands.CommandArgs.html +2 -2
  68. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/kernel_src_tree_lib_crontab.CrontabEntry.html +2 -2
  69. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_auth.Auth.html +2 -2
  70. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_components.Components.html +2 -2
  71. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_device.KernelDevice.html +4 -4
  72. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_device.KernelDeviceCLIOptions.html +6 -6
  73. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_device.KernelDeviceData.html +1 -1
  74. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_dom.Dom.html +4 -4
  75. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_dom.DomOptions.html +2 -2
  76. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_events.Events.html +8 -8
  77. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_filesystem.FileHeader.html +4 -4
  78. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_filesystem.Filesystem.html +11 -9
  79. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_filesystem.FilesystemDescriptions.html +2 -2
  80. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_filesystem.FstabEntry.html +13 -0
  81. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_i18n.I18n.html +4 -4
  82. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_i18n.I18nOptions.html +7 -7
  83. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_intervals.ITimerHandle.html +2 -2
  84. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_intervals.Intervals.html +8 -8
  85. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.BootOptions.html +2 -2
  86. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.Kernel.html +46 -46
  87. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelExecuteEvent.html +2 -2
  88. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelExecuteOptions.html +2 -2
  89. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelOptions.html +2 -2
  90. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelPanicEvent.html +2 -2
  91. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelShutdownEvent.html +2 -2
  92. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_kernel.KernelUploadEvent.html +2 -2
  93. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_keyboard.Keyboard.html +2 -2
  94. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_log.Log.html +10 -10
  95. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_log.LogOptions.html +4 -4
  96. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_memory.Memory.html +16 -16
  97. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_modules.KernelModule.html +2 -2
  98. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.FDTable.html +13 -13
  99. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.FileHandle.html +8 -8
  100. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.Process.html +31 -31
  101. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessEntryParams.html +16 -16
  102. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessExitEvent.html +2 -2
  103. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessManager.html +8 -8
  104. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessOptions.html +18 -18
  105. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessPauseEvent.html +2 -2
  106. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessResumeEvent.html +2 -2
  107. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessStartEvent.html +2 -2
  108. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_processes.ProcessStopEvent.html +2 -2
  109. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_protocol.Protocol.html +3 -3
  110. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_protocol.ProtocolOptions.html +3 -3
  111. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_service.Service.html +9 -9
  112. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_service.ServiceOptions.html +4 -4
  113. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_shell.Shell.html +13 -13
  114. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_shell.ShellOptions.html +7 -7
  115. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_sockets.Sockets.html +7 -7
  116. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_sockets.SocketsOptions.html +2 -2
  117. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_sockets.WebSocketConnection.html +8 -8
  118. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_sockets.WebTransportConnection.html +8 -8
  119. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_storage.StorageOptions.html +3 -3
  120. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_storage.StorageProvider.html +7 -7
  121. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_telemetry.Telemetry.html +3 -3
  122. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_telemetry.TelemetryOptions.html +2 -2
  123. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.Terminal.html +30 -30
  124. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalAttachEvent.html +2 -2
  125. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalCommand.html +4 -4
  126. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalCreatedEvent.html +2 -2
  127. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalExecuteEvent.html +2 -2
  128. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalInputEvent.html +2 -2
  129. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalInterruptEvent.html +2 -2
  130. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalKeyEvent.html +2 -2
  131. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalListenEvent.html +2 -2
  132. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalMessageEvent.html +2 -2
  133. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalMountEvent.html +2 -2
  134. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalOptions.html +6 -6
  135. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalPasteEvent.html +2 -2
  136. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalResizeEvent.html +2 -2
  137. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalUnlistenEvent.html +2 -2
  138. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalWriteEvent.html +2 -2
  139. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_terminal.TerminalWritelnEvent.html +2 -2
  140. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_users.AddUserOptions.html +4 -4
  141. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_users.Passkey.html +7 -7
  142. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_users.User.html +9 -9
  143. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_users.Users.html +14 -14
  144. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_users.UsersOptions.html +2 -2
  145. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_wasm.Wasm.html +3 -3
  146. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_wasm.WasmOptions.html +2 -2
  147. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_windows.WindowOptions.html +2 -2
  148. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_windows.Windows.html +7 -7
  149. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/interfaces/types_workers.Workers.html +3 -3
  150. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/media/package.json +7 -4
  151. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/media/turbo.json +9 -7
  152. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/modules/kernel_src_tree_lib_commands.html +1 -1
  153. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/modules/kernel_src_tree_lib_fstab.html +2 -0
  154. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/modules/types_filesystem.html +1 -1
  155. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/modules.html +1 -1
  156. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/tutorials/ai.md +114 -0
  157. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/tutorials/passkey.md +147 -0
  158. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/kernel_src_tree_fdtable.ZenFSFileHandle.html +1 -1
  159. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_auth.PasswordCredentialInit.html +1 -1
  160. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_components.ComponentListener.html +1 -1
  161. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_events.EventCallback.html +1 -1
  162. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_filesystem.FilesystemConfigMounts.html +1 -1
  163. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_filesystem.FilesystemOptions.html +1 -1
  164. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_filesystem.Fstab.html +3 -0
  165. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_filesystem.Path.html +1 -1
  166. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_intervals.CronMap.html +1 -1
  167. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_intervals.IntervalMap.html +1 -1
  168. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.Address.html +1 -1
  169. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.Collection.html +1 -1
  170. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.Config.html +1 -1
  171. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.Heap.html +1 -1
  172. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.Stack.html +1 -1
  173. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_memory.StackFrame.html +1 -1
  174. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_modules.KernelModules.html +1 -1
  175. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_processes.ProcessStatus.html +1 -1
  176. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_processes.ProcessesMap.html +1 -1
  177. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_sockets.SocketConnection.html +1 -1
  178. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_sockets.WebSocketState.html +1 -1
  179. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_sockets.WebTransportState.html +1 -1
  180. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_users.GID.html +1 -1
  181. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_users.UID.html +1 -1
  182. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/types/types_windows.WindowId.html +1 -1
  183. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_device.DefaultDevices.html +1 -1
  184. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_dom.DefaultDomOptions.html +1 -1
  185. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_filesystem.DefaultFilesystemOptions.html +1 -1
  186. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_i18n.DefaultI18nOptions.html +1 -1
  187. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_log.DefaultLogOptions.html +1 -1
  188. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_service.DefaultServiceOptions.html +1 -1
  189. package/dist/initfs/usr/share/docs/@ecmaos/kernel/docs/variables/kernel_src_tree_terminal.DefaultTerminalOptions.html +1 -1
  190. package/dist/initfs/usr/share/docs/@ecmaos/kernel/index.md +103 -17
  191. package/dist/initfs.tar.gz +0 -0
  192. package/dist/{install-DPcyci9f.js → install-D0LkoGOT.js} +2 -2
  193. package/dist/{install-DPcyci9f.js.map → install-D0LkoGOT.js.map} +1 -1
  194. package/dist/{kernel-BRRljz7g.js → kernel-C6epJL8R.js} +45793 -14749
  195. package/dist/kernel-C6epJL8R.js.map +1 -0
  196. package/dist/kernel.d.ts +5 -0
  197. package/dist/kernel.js +1 -1
  198. package/dist/{topbar.min-B0DZo7_n.js → topbar.min-vu2vh4R-.js} +2 -2
  199. package/dist/{topbar.min-B0DZo7_n.js.map → topbar.min-vu2vh4R-.js.map} +1 -1
  200. package/dist/ui.js +1 -1
  201. package/dist/ui.js.map +1 -1
  202. package/dist/{uninstall-DMgPDmXl.js → uninstall-B0_dI4uT.js} +2 -2
  203. package/dist/{uninstall-DMgPDmXl.js.map → uninstall-B0_dI4uT.js.map} +1 -1
  204. package/package.json +8 -6
  205. package/dist/kernel-BRRljz7g.js.map +0 -1
@@ -0,0 +1,1651 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { B as Buffer2 } from "./kernel-C6epJL8R.js";
4
+ var RPC = "rpc";
5
+ var UPLOAD = "upload";
6
+ var DOWNLOAD = "download";
7
+ var APP_AUTH = "app";
8
+ var USER_AUTH = "user";
9
+ var TEAM_AUTH = "team";
10
+ var NO_AUTH = "noauth";
11
+ var COOKIE = "cookie";
12
+ var DEFAULT_API_DOMAIN = "dropboxapi.com";
13
+ var DEFAULT_DOMAIN = "dropbox.com";
14
+ var TEST_DOMAIN_MAPPINGS = {
15
+ api: "api",
16
+ notify: "bolt",
17
+ content: "api-content"
18
+ };
19
+ var routes = {};
20
+ routes.accountSetProfilePhoto = function(arg) {
21
+ return this.request("account/set_profile_photo", arg, "user", "api", "rpc", "account_info.write");
22
+ };
23
+ routes.authTokenFromOauth1 = function(arg) {
24
+ return this.request("auth/token/from_oauth1", arg, "app", "api", "rpc", null);
25
+ };
26
+ routes.authTokenRevoke = function() {
27
+ return this.request("auth/token/revoke", null, "user", "api", "rpc", null);
28
+ };
29
+ routes.checkApp = function(arg) {
30
+ return this.request("check/app", arg, "app", "api", "rpc", null);
31
+ };
32
+ routes.checkUser = function(arg) {
33
+ return this.request("check/user", arg, "user", "api", "rpc", "account_info.read");
34
+ };
35
+ routes.contactsDeleteManualContacts = function() {
36
+ return this.request("contacts/delete_manual_contacts", null, "user", "api", "rpc", "contacts.write");
37
+ };
38
+ routes.contactsDeleteManualContactsBatch = function(arg) {
39
+ return this.request("contacts/delete_manual_contacts_batch", arg, "user", "api", "rpc", "contacts.write");
40
+ };
41
+ routes.filePropertiesPropertiesAdd = function(arg) {
42
+ return this.request("file_properties/properties/add", arg, "user", "api", "rpc", "files.metadata.write");
43
+ };
44
+ routes.filePropertiesPropertiesOverwrite = function(arg) {
45
+ return this.request("file_properties/properties/overwrite", arg, "user", "api", "rpc", "files.metadata.write");
46
+ };
47
+ routes.filePropertiesPropertiesRemove = function(arg) {
48
+ return this.request("file_properties/properties/remove", arg, "user", "api", "rpc", "files.metadata.write");
49
+ };
50
+ routes.filePropertiesPropertiesSearch = function(arg) {
51
+ return this.request("file_properties/properties/search", arg, "user", "api", "rpc", "files.metadata.read");
52
+ };
53
+ routes.filePropertiesPropertiesSearchContinue = function(arg) {
54
+ return this.request("file_properties/properties/search/continue", arg, "user", "api", "rpc", "files.metadata.read");
55
+ };
56
+ routes.filePropertiesPropertiesUpdate = function(arg) {
57
+ return this.request("file_properties/properties/update", arg, "user", "api", "rpc", "files.metadata.write");
58
+ };
59
+ routes.filePropertiesTemplatesAddForTeam = function(arg) {
60
+ return this.request("file_properties/templates/add_for_team", arg, "team", "api", "rpc", "files.team_metadata.write");
61
+ };
62
+ routes.filePropertiesTemplatesAddForUser = function(arg) {
63
+ return this.request("file_properties/templates/add_for_user", arg, "user", "api", "rpc", "files.metadata.write");
64
+ };
65
+ routes.filePropertiesTemplatesGetForTeam = function(arg) {
66
+ return this.request("file_properties/templates/get_for_team", arg, "team", "api", "rpc", "files.team_metadata.write");
67
+ };
68
+ routes.filePropertiesTemplatesGetForUser = function(arg) {
69
+ return this.request("file_properties/templates/get_for_user", arg, "user", "api", "rpc", "files.metadata.read");
70
+ };
71
+ routes.filePropertiesTemplatesListForTeam = function() {
72
+ return this.request("file_properties/templates/list_for_team", null, "team", "api", "rpc", "files.team_metadata.write");
73
+ };
74
+ routes.filePropertiesTemplatesListForUser = function() {
75
+ return this.request("file_properties/templates/list_for_user", null, "user", "api", "rpc", "files.metadata.read");
76
+ };
77
+ routes.filePropertiesTemplatesRemoveForTeam = function(arg) {
78
+ return this.request("file_properties/templates/remove_for_team", arg, "team", "api", "rpc", "files.team_metadata.write");
79
+ };
80
+ routes.filePropertiesTemplatesRemoveForUser = function(arg) {
81
+ return this.request("file_properties/templates/remove_for_user", arg, "user", "api", "rpc", "files.metadata.write");
82
+ };
83
+ routes.filePropertiesTemplatesUpdateForTeam = function(arg) {
84
+ return this.request("file_properties/templates/update_for_team", arg, "team", "api", "rpc", "files.team_metadata.write");
85
+ };
86
+ routes.filePropertiesTemplatesUpdateForUser = function(arg) {
87
+ return this.request("file_properties/templates/update_for_user", arg, "user", "api", "rpc", "files.metadata.write");
88
+ };
89
+ routes.fileRequestsCount = function() {
90
+ return this.request("file_requests/count", null, "user", "api", "rpc", "file_requests.read");
91
+ };
92
+ routes.fileRequestsCreate = function(arg) {
93
+ return this.request("file_requests/create", arg, "user", "api", "rpc", "file_requests.write");
94
+ };
95
+ routes.fileRequestsDelete = function(arg) {
96
+ return this.request("file_requests/delete", arg, "user", "api", "rpc", "file_requests.write");
97
+ };
98
+ routes.fileRequestsDeleteAllClosed = function() {
99
+ return this.request("file_requests/delete_all_closed", null, "user", "api", "rpc", "file_requests.write");
100
+ };
101
+ routes.fileRequestsGet = function(arg) {
102
+ return this.request("file_requests/get", arg, "user", "api", "rpc", "file_requests.read");
103
+ };
104
+ routes.fileRequestsListV2 = function(arg) {
105
+ return this.request("file_requests/list_v2", arg, "user", "api", "rpc", "file_requests.read");
106
+ };
107
+ routes.fileRequestsList = function() {
108
+ return this.request("file_requests/list", null, "user", "api", "rpc", "file_requests.read");
109
+ };
110
+ routes.fileRequestsListContinue = function(arg) {
111
+ return this.request("file_requests/list/continue", arg, "user", "api", "rpc", "file_requests.read");
112
+ };
113
+ routes.fileRequestsUpdate = function(arg) {
114
+ return this.request("file_requests/update", arg, "user", "api", "rpc", "file_requests.write");
115
+ };
116
+ routes.filesAlphaGetMetadata = function(arg) {
117
+ return this.request("files/alpha/get_metadata", arg, "user", "api", "rpc", "files.metadata.read");
118
+ };
119
+ routes.filesAlphaUpload = function(arg) {
120
+ return this.request("files/alpha/upload", arg, "user", "content", "upload", "files.content.write");
121
+ };
122
+ routes.filesCopyV2 = function(arg) {
123
+ return this.request("files/copy_v2", arg, "user", "api", "rpc", "files.content.write");
124
+ };
125
+ routes.filesCopy = function(arg) {
126
+ return this.request("files/copy", arg, "user", "api", "rpc", "files.content.write");
127
+ };
128
+ routes.filesCopyBatchV2 = function(arg) {
129
+ return this.request("files/copy_batch_v2", arg, "user", "api", "rpc", "files.content.write");
130
+ };
131
+ routes.filesCopyBatch = function(arg) {
132
+ return this.request("files/copy_batch", arg, "user", "api", "rpc", "files.content.write");
133
+ };
134
+ routes.filesCopyBatchCheckV2 = function(arg) {
135
+ return this.request("files/copy_batch/check_v2", arg, "user", "api", "rpc", "files.content.write");
136
+ };
137
+ routes.filesCopyBatchCheck = function(arg) {
138
+ return this.request("files/copy_batch/check", arg, "user", "api", "rpc", "files.content.write");
139
+ };
140
+ routes.filesCopyReferenceGet = function(arg) {
141
+ return this.request("files/copy_reference/get", arg, "user", "api", "rpc", "files.content.write");
142
+ };
143
+ routes.filesCopyReferenceSave = function(arg) {
144
+ return this.request("files/copy_reference/save", arg, "user", "api", "rpc", "files.content.write");
145
+ };
146
+ routes.filesCreateFolderV2 = function(arg) {
147
+ return this.request("files/create_folder_v2", arg, "user", "api", "rpc", "files.content.write");
148
+ };
149
+ routes.filesCreateFolder = function(arg) {
150
+ return this.request("files/create_folder", arg, "user", "api", "rpc", "files.content.write");
151
+ };
152
+ routes.filesCreateFolderBatch = function(arg) {
153
+ return this.request("files/create_folder_batch", arg, "user", "api", "rpc", "files.content.write");
154
+ };
155
+ routes.filesCreateFolderBatchCheck = function(arg) {
156
+ return this.request("files/create_folder_batch/check", arg, "user", "api", "rpc", "files.content.write");
157
+ };
158
+ routes.filesDeleteV2 = function(arg) {
159
+ return this.request("files/delete_v2", arg, "user", "api", "rpc", "files.content.write");
160
+ };
161
+ routes.filesDelete = function(arg) {
162
+ return this.request("files/delete", arg, "user", "api", "rpc", "files.content.write");
163
+ };
164
+ routes.filesDeleteBatch = function(arg) {
165
+ return this.request("files/delete_batch", arg, "user", "api", "rpc", "files.content.write");
166
+ };
167
+ routes.filesDeleteBatchCheck = function(arg) {
168
+ return this.request("files/delete_batch/check", arg, "user", "api", "rpc", "files.content.write");
169
+ };
170
+ routes.filesDownload = function(arg) {
171
+ return this.request("files/download", arg, "user", "content", "download", "files.content.read");
172
+ };
173
+ routes.filesDownloadZip = function(arg) {
174
+ return this.request("files/download_zip", arg, "user", "content", "download", "files.content.read");
175
+ };
176
+ routes.filesExport = function(arg) {
177
+ return this.request("files/export", arg, "user", "content", "download", "files.content.read");
178
+ };
179
+ routes.filesGetFileLockBatch = function(arg) {
180
+ return this.request("files/get_file_lock_batch", arg, "user", "api", "rpc", "files.content.read");
181
+ };
182
+ routes.filesGetMetadata = function(arg) {
183
+ return this.request("files/get_metadata", arg, "user", "api", "rpc", "files.metadata.read");
184
+ };
185
+ routes.filesGetPreview = function(arg) {
186
+ return this.request("files/get_preview", arg, "user", "content", "download", "files.content.read");
187
+ };
188
+ routes.filesGetTemporaryLink = function(arg) {
189
+ return this.request("files/get_temporary_link", arg, "user", "api", "rpc", "files.content.read");
190
+ };
191
+ routes.filesGetTemporaryUploadLink = function(arg) {
192
+ return this.request("files/get_temporary_upload_link", arg, "user", "api", "rpc", "files.content.write");
193
+ };
194
+ routes.filesGetThumbnail = function(arg) {
195
+ return this.request("files/get_thumbnail", arg, "user", "content", "download", "files.content.read");
196
+ };
197
+ routes.filesGetThumbnailV2 = function(arg) {
198
+ return this.request("files/get_thumbnail_v2", arg, "app, user", "content", "download", "files.content.read");
199
+ };
200
+ routes.filesGetThumbnailBatch = function(arg) {
201
+ return this.request("files/get_thumbnail_batch", arg, "user", "content", "rpc", "files.content.read");
202
+ };
203
+ routes.filesListFolder = function(arg) {
204
+ return this.request("files/list_folder", arg, "app, user", "api", "rpc", "files.metadata.read");
205
+ };
206
+ routes.filesListFolderContinue = function(arg) {
207
+ return this.request("files/list_folder/continue", arg, "app, user", "api", "rpc", "files.metadata.read");
208
+ };
209
+ routes.filesListFolderGetLatestCursor = function(arg) {
210
+ return this.request("files/list_folder/get_latest_cursor", arg, "user", "api", "rpc", "files.metadata.read");
211
+ };
212
+ routes.filesListFolderLongpoll = function(arg) {
213
+ return this.request("files/list_folder/longpoll", arg, "noauth", "notify", "rpc", "files.metadata.read");
214
+ };
215
+ routes.filesListRevisions = function(arg) {
216
+ return this.request("files/list_revisions", arg, "user", "api", "rpc", "files.metadata.read");
217
+ };
218
+ routes.filesLockFileBatch = function(arg) {
219
+ return this.request("files/lock_file_batch", arg, "user", "api", "rpc", "files.content.write");
220
+ };
221
+ routes.filesMoveV2 = function(arg) {
222
+ return this.request("files/move_v2", arg, "user", "api", "rpc", "files.content.write");
223
+ };
224
+ routes.filesMove = function(arg) {
225
+ return this.request("files/move", arg, "user", "api", "rpc", "files.content.write");
226
+ };
227
+ routes.filesMoveBatchV2 = function(arg) {
228
+ return this.request("files/move_batch_v2", arg, "user", "api", "rpc", "files.content.write");
229
+ };
230
+ routes.filesMoveBatch = function(arg) {
231
+ return this.request("files/move_batch", arg, "user", "api", "rpc", "files.content.write");
232
+ };
233
+ routes.filesMoveBatchCheckV2 = function(arg) {
234
+ return this.request("files/move_batch/check_v2", arg, "user", "api", "rpc", "files.content.write");
235
+ };
236
+ routes.filesMoveBatchCheck = function(arg) {
237
+ return this.request("files/move_batch/check", arg, "user", "api", "rpc", "files.content.write");
238
+ };
239
+ routes.filesPaperCreate = function(arg) {
240
+ return this.request("files/paper/create", arg, "user", "api", "upload", "files.content.write");
241
+ };
242
+ routes.filesPaperUpdate = function(arg) {
243
+ return this.request("files/paper/update", arg, "user", "api", "upload", "files.content.write");
244
+ };
245
+ routes.filesPermanentlyDelete = function(arg) {
246
+ return this.request("files/permanently_delete", arg, "user", "api", "rpc", "files.permanent_delete");
247
+ };
248
+ routes.filesPropertiesAdd = function(arg) {
249
+ return this.request("files/properties/add", arg, "user", "api", "rpc", "files.metadata.write");
250
+ };
251
+ routes.filesPropertiesOverwrite = function(arg) {
252
+ return this.request("files/properties/overwrite", arg, "user", "api", "rpc", "files.metadata.write");
253
+ };
254
+ routes.filesPropertiesRemove = function(arg) {
255
+ return this.request("files/properties/remove", arg, "user", "api", "rpc", "files.metadata.write");
256
+ };
257
+ routes.filesPropertiesTemplateGet = function(arg) {
258
+ return this.request("files/properties/template/get", arg, "user", "api", "rpc", "files.metadata.read");
259
+ };
260
+ routes.filesPropertiesTemplateList = function() {
261
+ return this.request("files/properties/template/list", null, "user", "api", "rpc", "files.metadata.read");
262
+ };
263
+ routes.filesPropertiesUpdate = function(arg) {
264
+ return this.request("files/properties/update", arg, "user", "api", "rpc", "files.metadata.write");
265
+ };
266
+ routes.filesRestore = function(arg) {
267
+ return this.request("files/restore", arg, "user", "api", "rpc", "files.content.write");
268
+ };
269
+ routes.filesSaveUrl = function(arg) {
270
+ return this.request("files/save_url", arg, "user", "api", "rpc", "files.content.write");
271
+ };
272
+ routes.filesSaveUrlCheckJobStatus = function(arg) {
273
+ return this.request("files/save_url/check_job_status", arg, "user", "api", "rpc", "files.content.write");
274
+ };
275
+ routes.filesSearch = function(arg) {
276
+ return this.request("files/search", arg, "user", "api", "rpc", "files.metadata.read");
277
+ };
278
+ routes.filesSearchV2 = function(arg) {
279
+ return this.request("files/search_v2", arg, "user", "api", "rpc", "files.metadata.read");
280
+ };
281
+ routes.filesSearchContinueV2 = function(arg) {
282
+ return this.request("files/search/continue_v2", arg, "user", "api", "rpc", "files.metadata.read");
283
+ };
284
+ routes.filesTagsAdd = function(arg) {
285
+ return this.request("files/tags/add", arg, "user", "api", "rpc", "files.metadata.write");
286
+ };
287
+ routes.filesTagsGet = function(arg) {
288
+ return this.request("files/tags/get", arg, "user", "api", "rpc", "files.metadata.read");
289
+ };
290
+ routes.filesTagsRemove = function(arg) {
291
+ return this.request("files/tags/remove", arg, "user", "api", "rpc", "files.metadata.write");
292
+ };
293
+ routes.filesUnlockFileBatch = function(arg) {
294
+ return this.request("files/unlock_file_batch", arg, "user", "api", "rpc", "files.content.write");
295
+ };
296
+ routes.filesUpload = function(arg) {
297
+ return this.request("files/upload", arg, "user", "content", "upload", "files.content.write");
298
+ };
299
+ routes.filesUploadSessionAppendV2 = function(arg) {
300
+ return this.request("files/upload_session/append_v2", arg, "user", "content", "upload", "files.content.write");
301
+ };
302
+ routes.filesUploadSessionAppend = function(arg) {
303
+ return this.request("files/upload_session/append", arg, "user", "content", "upload", "files.content.write");
304
+ };
305
+ routes.filesUploadSessionFinish = function(arg) {
306
+ return this.request("files/upload_session/finish", arg, "user", "content", "upload", "files.content.write");
307
+ };
308
+ routes.filesUploadSessionFinishBatch = function(arg) {
309
+ return this.request("files/upload_session/finish_batch", arg, "user", "api", "rpc", "files.content.write");
310
+ };
311
+ routes.filesUploadSessionFinishBatchV2 = function(arg) {
312
+ return this.request("files/upload_session/finish_batch_v2", arg, "user", "api", "rpc", "files.content.write");
313
+ };
314
+ routes.filesUploadSessionFinishBatchCheck = function(arg) {
315
+ return this.request("files/upload_session/finish_batch/check", arg, "user", "api", "rpc", "files.content.write");
316
+ };
317
+ routes.filesUploadSessionStart = function(arg) {
318
+ return this.request("files/upload_session/start", arg, "user", "content", "upload", "files.content.write");
319
+ };
320
+ routes.filesUploadSessionStartBatch = function(arg) {
321
+ return this.request("files/upload_session/start_batch", arg, "user", "api", "rpc", "files.content.write");
322
+ };
323
+ routes.openidUserinfo = function(arg) {
324
+ return this.request("openid/userinfo", arg, "user", "api", "rpc", "openid");
325
+ };
326
+ routes.paperDocsArchive = function(arg) {
327
+ return this.request("paper/docs/archive", arg, "user", "api", "rpc", "files.content.write");
328
+ };
329
+ routes.paperDocsCreate = function(arg) {
330
+ return this.request("paper/docs/create", arg, "user", "api", "upload", "files.content.write");
331
+ };
332
+ routes.paperDocsDownload = function(arg) {
333
+ return this.request("paper/docs/download", arg, "user", "api", "download", "files.content.read");
334
+ };
335
+ routes.paperDocsFolderUsersList = function(arg) {
336
+ return this.request("paper/docs/folder_users/list", arg, "user", "api", "rpc", "sharing.read");
337
+ };
338
+ routes.paperDocsFolderUsersListContinue = function(arg) {
339
+ return this.request("paper/docs/folder_users/list/continue", arg, "user", "api", "rpc", "sharing.read");
340
+ };
341
+ routes.paperDocsGetFolderInfo = function(arg) {
342
+ return this.request("paper/docs/get_folder_info", arg, "user", "api", "rpc", "sharing.read");
343
+ };
344
+ routes.paperDocsList = function(arg) {
345
+ return this.request("paper/docs/list", arg, "user", "api", "rpc", "files.metadata.read");
346
+ };
347
+ routes.paperDocsListContinue = function(arg) {
348
+ return this.request("paper/docs/list/continue", arg, "user", "api", "rpc", "files.metadata.read");
349
+ };
350
+ routes.paperDocsPermanentlyDelete = function(arg) {
351
+ return this.request("paper/docs/permanently_delete", arg, "user", "api", "rpc", "files.permanent_delete");
352
+ };
353
+ routes.paperDocsSharingPolicyGet = function(arg) {
354
+ return this.request("paper/docs/sharing_policy/get", arg, "user", "api", "rpc", "sharing.read");
355
+ };
356
+ routes.paperDocsSharingPolicySet = function(arg) {
357
+ return this.request("paper/docs/sharing_policy/set", arg, "user", "api", "rpc", "sharing.write");
358
+ };
359
+ routes.paperDocsUpdate = function(arg) {
360
+ return this.request("paper/docs/update", arg, "user", "api", "upload", "files.content.write");
361
+ };
362
+ routes.paperDocsUsersAdd = function(arg) {
363
+ return this.request("paper/docs/users/add", arg, "user", "api", "rpc", "sharing.write");
364
+ };
365
+ routes.paperDocsUsersList = function(arg) {
366
+ return this.request("paper/docs/users/list", arg, "user", "api", "rpc", "sharing.read");
367
+ };
368
+ routes.paperDocsUsersListContinue = function(arg) {
369
+ return this.request("paper/docs/users/list/continue", arg, "user", "api", "rpc", "sharing.read");
370
+ };
371
+ routes.paperDocsUsersRemove = function(arg) {
372
+ return this.request("paper/docs/users/remove", arg, "user", "api", "rpc", "sharing.write");
373
+ };
374
+ routes.paperFoldersCreate = function(arg) {
375
+ return this.request("paper/folders/create", arg, "user", "api", "rpc", "files.content.write");
376
+ };
377
+ routes.sharingAddFileMember = function(arg) {
378
+ return this.request("sharing/add_file_member", arg, "user", "api", "rpc", "sharing.write");
379
+ };
380
+ routes.sharingAddFolderMember = function(arg) {
381
+ return this.request("sharing/add_folder_member", arg, "user", "api", "rpc", "sharing.write");
382
+ };
383
+ routes.sharingCheckJobStatus = function(arg) {
384
+ return this.request("sharing/check_job_status", arg, "user", "api", "rpc", "sharing.write");
385
+ };
386
+ routes.sharingCheckRemoveMemberJobStatus = function(arg) {
387
+ return this.request("sharing/check_remove_member_job_status", arg, "user", "api", "rpc", "sharing.write");
388
+ };
389
+ routes.sharingCheckShareJobStatus = function(arg) {
390
+ return this.request("sharing/check_share_job_status", arg, "user", "api", "rpc", "sharing.write");
391
+ };
392
+ routes.sharingCreateSharedLink = function(arg) {
393
+ return this.request("sharing/create_shared_link", arg, "user", "api", "rpc", "sharing.write");
394
+ };
395
+ routes.sharingCreateSharedLinkWithSettings = function(arg) {
396
+ return this.request("sharing/create_shared_link_with_settings", arg, "user", "api", "rpc", "sharing.write");
397
+ };
398
+ routes.sharingGetFileMetadata = function(arg) {
399
+ return this.request("sharing/get_file_metadata", arg, "user", "api", "rpc", "sharing.read");
400
+ };
401
+ routes.sharingGetFileMetadataBatch = function(arg) {
402
+ return this.request("sharing/get_file_metadata/batch", arg, "user", "api", "rpc", "sharing.read");
403
+ };
404
+ routes.sharingGetFolderMetadata = function(arg) {
405
+ return this.request("sharing/get_folder_metadata", arg, "user", "api", "rpc", "sharing.read");
406
+ };
407
+ routes.sharingGetSharedLinkFile = function(arg) {
408
+ return this.request("sharing/get_shared_link_file", arg, "user", "content", "download", "sharing.read");
409
+ };
410
+ routes.sharingGetSharedLinkMetadata = function(arg) {
411
+ return this.request("sharing/get_shared_link_metadata", arg, "app, user", "api", "rpc", "sharing.read");
412
+ };
413
+ routes.sharingGetSharedLinks = function(arg) {
414
+ return this.request("sharing/get_shared_links", arg, "user", "api", "rpc", "sharing.read");
415
+ };
416
+ routes.sharingListFileMembers = function(arg) {
417
+ return this.request("sharing/list_file_members", arg, "user", "api", "rpc", "sharing.read");
418
+ };
419
+ routes.sharingListFileMembersBatch = function(arg) {
420
+ return this.request("sharing/list_file_members/batch", arg, "user", "api", "rpc", "sharing.read");
421
+ };
422
+ routes.sharingListFileMembersContinue = function(arg) {
423
+ return this.request("sharing/list_file_members/continue", arg, "user", "api", "rpc", "sharing.read");
424
+ };
425
+ routes.sharingListFolderMembers = function(arg) {
426
+ return this.request("sharing/list_folder_members", arg, "user", "api", "rpc", "sharing.read");
427
+ };
428
+ routes.sharingListFolderMembersContinue = function(arg) {
429
+ return this.request("sharing/list_folder_members/continue", arg, "user", "api", "rpc", "sharing.read");
430
+ };
431
+ routes.sharingListFolders = function(arg) {
432
+ return this.request("sharing/list_folders", arg, "user", "api", "rpc", "sharing.read");
433
+ };
434
+ routes.sharingListFoldersContinue = function(arg) {
435
+ return this.request("sharing/list_folders/continue", arg, "user", "api", "rpc", "sharing.read");
436
+ };
437
+ routes.sharingListMountableFolders = function(arg) {
438
+ return this.request("sharing/list_mountable_folders", arg, "user", "api", "rpc", "sharing.read");
439
+ };
440
+ routes.sharingListMountableFoldersContinue = function(arg) {
441
+ return this.request("sharing/list_mountable_folders/continue", arg, "user", "api", "rpc", "sharing.read");
442
+ };
443
+ routes.sharingListReceivedFiles = function(arg) {
444
+ return this.request("sharing/list_received_files", arg, "user", "api", "rpc", "sharing.read");
445
+ };
446
+ routes.sharingListReceivedFilesContinue = function(arg) {
447
+ return this.request("sharing/list_received_files/continue", arg, "user", "api", "rpc", "sharing.read");
448
+ };
449
+ routes.sharingListSharedLinks = function(arg) {
450
+ return this.request("sharing/list_shared_links", arg, "user", "api", "rpc", "sharing.read");
451
+ };
452
+ routes.sharingModifySharedLinkSettings = function(arg) {
453
+ return this.request("sharing/modify_shared_link_settings", arg, "user", "api", "rpc", "sharing.write");
454
+ };
455
+ routes.sharingMountFolder = function(arg) {
456
+ return this.request("sharing/mount_folder", arg, "user", "api", "rpc", "sharing.write");
457
+ };
458
+ routes.sharingRelinquishFileMembership = function(arg) {
459
+ return this.request("sharing/relinquish_file_membership", arg, "user", "api", "rpc", "sharing.write");
460
+ };
461
+ routes.sharingRelinquishFolderMembership = function(arg) {
462
+ return this.request("sharing/relinquish_folder_membership", arg, "user", "api", "rpc", "sharing.write");
463
+ };
464
+ routes.sharingRemoveFileMember = function(arg) {
465
+ return this.request("sharing/remove_file_member", arg, "user", "api", "rpc", "sharing.write");
466
+ };
467
+ routes.sharingRemoveFileMember2 = function(arg) {
468
+ return this.request("sharing/remove_file_member_2", arg, "user", "api", "rpc", "sharing.write");
469
+ };
470
+ routes.sharingRemoveFolderMember = function(arg) {
471
+ return this.request("sharing/remove_folder_member", arg, "user", "api", "rpc", "sharing.write");
472
+ };
473
+ routes.sharingRevokeSharedLink = function(arg) {
474
+ return this.request("sharing/revoke_shared_link", arg, "user", "api", "rpc", "sharing.write");
475
+ };
476
+ routes.sharingSetAccessInheritance = function(arg) {
477
+ return this.request("sharing/set_access_inheritance", arg, "user", "api", "rpc", "sharing.write");
478
+ };
479
+ routes.sharingShareFolder = function(arg) {
480
+ return this.request("sharing/share_folder", arg, "user", "api", "rpc", "sharing.write");
481
+ };
482
+ routes.sharingTransferFolder = function(arg) {
483
+ return this.request("sharing/transfer_folder", arg, "user", "api", "rpc", "sharing.write");
484
+ };
485
+ routes.sharingUnmountFolder = function(arg) {
486
+ return this.request("sharing/unmount_folder", arg, "user", "api", "rpc", "sharing.write");
487
+ };
488
+ routes.sharingUnshareFile = function(arg) {
489
+ return this.request("sharing/unshare_file", arg, "user", "api", "rpc", "sharing.write");
490
+ };
491
+ routes.sharingUnshareFolder = function(arg) {
492
+ return this.request("sharing/unshare_folder", arg, "user", "api", "rpc", "sharing.write");
493
+ };
494
+ routes.sharingUpdateFileMember = function(arg) {
495
+ return this.request("sharing/update_file_member", arg, "user", "api", "rpc", "sharing.write");
496
+ };
497
+ routes.sharingUpdateFolderMember = function(arg) {
498
+ return this.request("sharing/update_folder_member", arg, "user", "api", "rpc", "sharing.write");
499
+ };
500
+ routes.sharingUpdateFolderPolicy = function(arg) {
501
+ return this.request("sharing/update_folder_policy", arg, "user", "api", "rpc", "sharing.write");
502
+ };
503
+ routes.teamDevicesListMemberDevices = function(arg) {
504
+ return this.request("team/devices/list_member_devices", arg, "team", "api", "rpc", "sessions.list");
505
+ };
506
+ routes.teamDevicesListMembersDevices = function(arg) {
507
+ return this.request("team/devices/list_members_devices", arg, "team", "api", "rpc", "sessions.list");
508
+ };
509
+ routes.teamDevicesListTeamDevices = function(arg) {
510
+ return this.request("team/devices/list_team_devices", arg, "team", "api", "rpc", "sessions.list");
511
+ };
512
+ routes.teamDevicesRevokeDeviceSession = function(arg) {
513
+ return this.request("team/devices/revoke_device_session", arg, "team", "api", "rpc", "sessions.modify");
514
+ };
515
+ routes.teamDevicesRevokeDeviceSessionBatch = function(arg) {
516
+ return this.request("team/devices/revoke_device_session_batch", arg, "team", "api", "rpc", "sessions.modify");
517
+ };
518
+ routes.teamFeaturesGetValues = function(arg) {
519
+ return this.request("team/features/get_values", arg, "team", "api", "rpc", "team_info.read");
520
+ };
521
+ routes.teamGetInfo = function() {
522
+ return this.request("team/get_info", null, "team", "api", "rpc", "team_info.read");
523
+ };
524
+ routes.teamGroupsCreate = function(arg) {
525
+ return this.request("team/groups/create", arg, "team", "api", "rpc", "groups.write");
526
+ };
527
+ routes.teamGroupsDelete = function(arg) {
528
+ return this.request("team/groups/delete", arg, "team", "api", "rpc", "groups.write");
529
+ };
530
+ routes.teamGroupsGetInfo = function(arg) {
531
+ return this.request("team/groups/get_info", arg, "team", "api", "rpc", "groups.read");
532
+ };
533
+ routes.teamGroupsJobStatusGet = function(arg) {
534
+ return this.request("team/groups/job_status/get", arg, "team", "api", "rpc", "groups.write");
535
+ };
536
+ routes.teamGroupsList = function(arg) {
537
+ return this.request("team/groups/list", arg, "team", "api", "rpc", "groups.read");
538
+ };
539
+ routes.teamGroupsListContinue = function(arg) {
540
+ return this.request("team/groups/list/continue", arg, "team", "api", "rpc", "groups.read");
541
+ };
542
+ routes.teamGroupsMembersAdd = function(arg) {
543
+ return this.request("team/groups/members/add", arg, "team", "api", "rpc", "groups.write");
544
+ };
545
+ routes.teamGroupsMembersList = function(arg) {
546
+ return this.request("team/groups/members/list", arg, "team", "api", "rpc", "groups.read");
547
+ };
548
+ routes.teamGroupsMembersListContinue = function(arg) {
549
+ return this.request("team/groups/members/list/continue", arg, "team", "api", "rpc", "groups.read");
550
+ };
551
+ routes.teamGroupsMembersRemove = function(arg) {
552
+ return this.request("team/groups/members/remove", arg, "team", "api", "rpc", "groups.write");
553
+ };
554
+ routes.teamGroupsMembersSetAccessType = function(arg) {
555
+ return this.request("team/groups/members/set_access_type", arg, "team", "api", "rpc", "groups.write");
556
+ };
557
+ routes.teamGroupsUpdate = function(arg) {
558
+ return this.request("team/groups/update", arg, "team", "api", "rpc", "groups.write");
559
+ };
560
+ routes.teamLegalHoldsCreatePolicy = function(arg) {
561
+ return this.request("team/legal_holds/create_policy", arg, "team", "api", "rpc", "team_data.governance.write");
562
+ };
563
+ routes.teamLegalHoldsGetPolicy = function(arg) {
564
+ return this.request("team/legal_holds/get_policy", arg, "team", "api", "rpc", "team_data.governance.write");
565
+ };
566
+ routes.teamLegalHoldsListHeldRevisions = function(arg) {
567
+ return this.request("team/legal_holds/list_held_revisions", arg, "team", "api", "rpc", "team_data.governance.write");
568
+ };
569
+ routes.teamLegalHoldsListHeldRevisionsContinue = function(arg) {
570
+ return this.request("team/legal_holds/list_held_revisions_continue", arg, "team", "api", "rpc", "team_data.governance.write");
571
+ };
572
+ routes.teamLegalHoldsListPolicies = function(arg) {
573
+ return this.request("team/legal_holds/list_policies", arg, "team", "api", "rpc", "team_data.governance.write");
574
+ };
575
+ routes.teamLegalHoldsReleasePolicy = function(arg) {
576
+ return this.request("team/legal_holds/release_policy", arg, "team", "api", "rpc", "team_data.governance.write");
577
+ };
578
+ routes.teamLegalHoldsUpdatePolicy = function(arg) {
579
+ return this.request("team/legal_holds/update_policy", arg, "team", "api", "rpc", "team_data.governance.write");
580
+ };
581
+ routes.teamLinkedAppsListMemberLinkedApps = function(arg) {
582
+ return this.request("team/linked_apps/list_member_linked_apps", arg, "team", "api", "rpc", "sessions.list");
583
+ };
584
+ routes.teamLinkedAppsListMembersLinkedApps = function(arg) {
585
+ return this.request("team/linked_apps/list_members_linked_apps", arg, "team", "api", "rpc", "sessions.list");
586
+ };
587
+ routes.teamLinkedAppsListTeamLinkedApps = function(arg) {
588
+ return this.request("team/linked_apps/list_team_linked_apps", arg, "team", "api", "rpc", "sessions.list");
589
+ };
590
+ routes.teamLinkedAppsRevokeLinkedApp = function(arg) {
591
+ return this.request("team/linked_apps/revoke_linked_app", arg, "team", "api", "rpc", "sessions.modify");
592
+ };
593
+ routes.teamLinkedAppsRevokeLinkedAppBatch = function(arg) {
594
+ return this.request("team/linked_apps/revoke_linked_app_batch", arg, "team", "api", "rpc", "sessions.modify");
595
+ };
596
+ routes.teamMemberSpaceLimitsExcludedUsersAdd = function(arg) {
597
+ return this.request("team/member_space_limits/excluded_users/add", arg, "team", "api", "rpc", "members.write");
598
+ };
599
+ routes.teamMemberSpaceLimitsExcludedUsersList = function(arg) {
600
+ return this.request("team/member_space_limits/excluded_users/list", arg, "team", "api", "rpc", "members.read");
601
+ };
602
+ routes.teamMemberSpaceLimitsExcludedUsersListContinue = function(arg) {
603
+ return this.request("team/member_space_limits/excluded_users/list/continue", arg, "team", "api", "rpc", "members.read");
604
+ };
605
+ routes.teamMemberSpaceLimitsExcludedUsersRemove = function(arg) {
606
+ return this.request("team/member_space_limits/excluded_users/remove", arg, "team", "api", "rpc", "members.write");
607
+ };
608
+ routes.teamMemberSpaceLimitsGetCustomQuota = function(arg) {
609
+ return this.request("team/member_space_limits/get_custom_quota", arg, "team", "api", "rpc", "members.read");
610
+ };
611
+ routes.teamMemberSpaceLimitsRemoveCustomQuota = function(arg) {
612
+ return this.request("team/member_space_limits/remove_custom_quota", arg, "team", "api", "rpc", "members.write");
613
+ };
614
+ routes.teamMemberSpaceLimitsSetCustomQuota = function(arg) {
615
+ return this.request("team/member_space_limits/set_custom_quota", arg, "team", "api", "rpc", "members.read");
616
+ };
617
+ routes.teamMembersAddV2 = function(arg) {
618
+ return this.request("team/members/add_v2", arg, "team", "api", "rpc", "members.write");
619
+ };
620
+ routes.teamMembersAdd = function(arg) {
621
+ return this.request("team/members/add", arg, "team", "api", "rpc", "members.write");
622
+ };
623
+ routes.teamMembersAddJobStatusGetV2 = function(arg) {
624
+ return this.request("team/members/add/job_status/get_v2", arg, "team", "api", "rpc", "members.write");
625
+ };
626
+ routes.teamMembersAddJobStatusGet = function(arg) {
627
+ return this.request("team/members/add/job_status/get", arg, "team", "api", "rpc", "members.write");
628
+ };
629
+ routes.teamMembersDeleteProfilePhotoV2 = function(arg) {
630
+ return this.request("team/members/delete_profile_photo_v2", arg, "team", "api", "rpc", "members.write");
631
+ };
632
+ routes.teamMembersDeleteProfilePhoto = function(arg) {
633
+ return this.request("team/members/delete_profile_photo", arg, "team", "api", "rpc", "members.write");
634
+ };
635
+ routes.teamMembersGetAvailableTeamMemberRoles = function() {
636
+ return this.request("team/members/get_available_team_member_roles", null, "team", "api", "rpc", "members.read");
637
+ };
638
+ routes.teamMembersGetInfoV2 = function(arg) {
639
+ return this.request("team/members/get_info_v2", arg, "team", "api", "rpc", "members.read");
640
+ };
641
+ routes.teamMembersGetInfo = function(arg) {
642
+ return this.request("team/members/get_info", arg, "team", "api", "rpc", "members.read");
643
+ };
644
+ routes.teamMembersListV2 = function(arg) {
645
+ return this.request("team/members/list_v2", arg, "team", "api", "rpc", "members.read");
646
+ };
647
+ routes.teamMembersList = function(arg) {
648
+ return this.request("team/members/list", arg, "team", "api", "rpc", "members.read");
649
+ };
650
+ routes.teamMembersListContinueV2 = function(arg) {
651
+ return this.request("team/members/list/continue_v2", arg, "team", "api", "rpc", "members.read");
652
+ };
653
+ routes.teamMembersListContinue = function(arg) {
654
+ return this.request("team/members/list/continue", arg, "team", "api", "rpc", "members.read");
655
+ };
656
+ routes.teamMembersMoveFormerMemberFiles = function(arg) {
657
+ return this.request("team/members/move_former_member_files", arg, "team", "api", "rpc", "members.write");
658
+ };
659
+ routes.teamMembersMoveFormerMemberFilesJobStatusCheck = function(arg) {
660
+ return this.request("team/members/move_former_member_files/job_status/check", arg, "team", "api", "rpc", "members.write");
661
+ };
662
+ routes.teamMembersRecover = function(arg) {
663
+ return this.request("team/members/recover", arg, "team", "api", "rpc", "members.delete");
664
+ };
665
+ routes.teamMembersRemove = function(arg) {
666
+ return this.request("team/members/remove", arg, "team", "api", "rpc", "members.delete");
667
+ };
668
+ routes.teamMembersRemoveJobStatusGet = function(arg) {
669
+ return this.request("team/members/remove/job_status/get", arg, "team", "api", "rpc", "members.delete");
670
+ };
671
+ routes.teamMembersSecondaryEmailsAdd = function(arg) {
672
+ return this.request("team/members/secondary_emails/add", arg, "team", "api", "rpc", "members.write");
673
+ };
674
+ routes.teamMembersSecondaryEmailsDelete = function(arg) {
675
+ return this.request("team/members/secondary_emails/delete", arg, "team", "api", "rpc", "members.write");
676
+ };
677
+ routes.teamMembersSecondaryEmailsResendVerificationEmails = function(arg) {
678
+ return this.request("team/members/secondary_emails/resend_verification_emails", arg, "team", "api", "rpc", "members.write");
679
+ };
680
+ routes.teamMembersSendWelcomeEmail = function(arg) {
681
+ return this.request("team/members/send_welcome_email", arg, "team", "api", "rpc", "members.write");
682
+ };
683
+ routes.teamMembersSetAdminPermissionsV2 = function(arg) {
684
+ return this.request("team/members/set_admin_permissions_v2", arg, "team", "api", "rpc", "members.write");
685
+ };
686
+ routes.teamMembersSetAdminPermissions = function(arg) {
687
+ return this.request("team/members/set_admin_permissions", arg, "team", "api", "rpc", "members.write");
688
+ };
689
+ routes.teamMembersSetProfileV2 = function(arg) {
690
+ return this.request("team/members/set_profile_v2", arg, "team", "api", "rpc", "members.write");
691
+ };
692
+ routes.teamMembersSetProfile = function(arg) {
693
+ return this.request("team/members/set_profile", arg, "team", "api", "rpc", "members.write");
694
+ };
695
+ routes.teamMembersSetProfilePhotoV2 = function(arg) {
696
+ return this.request("team/members/set_profile_photo_v2", arg, "team", "api", "rpc", "members.write");
697
+ };
698
+ routes.teamMembersSetProfilePhoto = function(arg) {
699
+ return this.request("team/members/set_profile_photo", arg, "team", "api", "rpc", "members.write");
700
+ };
701
+ routes.teamMembersSuspend = function(arg) {
702
+ return this.request("team/members/suspend", arg, "team", "api", "rpc", "members.write");
703
+ };
704
+ routes.teamMembersUnsuspend = function(arg) {
705
+ return this.request("team/members/unsuspend", arg, "team", "api", "rpc", "members.write");
706
+ };
707
+ routes.teamNamespacesList = function(arg) {
708
+ return this.request("team/namespaces/list", arg, "team", "api", "rpc", "team_data.member");
709
+ };
710
+ routes.teamNamespacesListContinue = function(arg) {
711
+ return this.request("team/namespaces/list/continue", arg, "team", "api", "rpc", "team_data.member");
712
+ };
713
+ routes.teamPropertiesTemplateAdd = function(arg) {
714
+ return this.request("team/properties/template/add", arg, "team", "api", "rpc", "files.team_metadata.write");
715
+ };
716
+ routes.teamPropertiesTemplateGet = function(arg) {
717
+ return this.request("team/properties/template/get", arg, "team", "api", "rpc", "files.team_metadata.write");
718
+ };
719
+ routes.teamPropertiesTemplateList = function() {
720
+ return this.request("team/properties/template/list", null, "team", "api", "rpc", "files.team_metadata.write");
721
+ };
722
+ routes.teamPropertiesTemplateUpdate = function(arg) {
723
+ return this.request("team/properties/template/update", arg, "team", "api", "rpc", "files.team_metadata.write");
724
+ };
725
+ routes.teamReportsGetActivity = function(arg) {
726
+ return this.request("team/reports/get_activity", arg, "team", "api", "rpc", "team_info.read");
727
+ };
728
+ routes.teamReportsGetDevices = function(arg) {
729
+ return this.request("team/reports/get_devices", arg, "team", "api", "rpc", "team_info.read");
730
+ };
731
+ routes.teamReportsGetMembership = function(arg) {
732
+ return this.request("team/reports/get_membership", arg, "team", "api", "rpc", "team_info.read");
733
+ };
734
+ routes.teamReportsGetStorage = function(arg) {
735
+ return this.request("team/reports/get_storage", arg, "team", "api", "rpc", "team_info.read");
736
+ };
737
+ routes.teamSharingAllowlistAdd = function(arg) {
738
+ return this.request("team/sharing_allowlist/add", arg, "team", "api", "rpc", "team_info.write");
739
+ };
740
+ routes.teamSharingAllowlistList = function(arg) {
741
+ return this.request("team/sharing_allowlist/list", arg, "team", "api", "rpc", "team_info.read");
742
+ };
743
+ routes.teamSharingAllowlistListContinue = function(arg) {
744
+ return this.request("team/sharing_allowlist/list/continue", arg, "team", "api", "rpc", "team_info.read");
745
+ };
746
+ routes.teamSharingAllowlistRemove = function(arg) {
747
+ return this.request("team/sharing_allowlist/remove", arg, "team", "api", "rpc", "team_info.write");
748
+ };
749
+ routes.teamTeamFolderActivate = function(arg) {
750
+ return this.request("team/team_folder/activate", arg, "team", "api", "rpc", "team_data.content.write");
751
+ };
752
+ routes.teamTeamFolderArchive = function(arg) {
753
+ return this.request("team/team_folder/archive", arg, "team", "api", "rpc", "team_data.content.write");
754
+ };
755
+ routes.teamTeamFolderArchiveCheck = function(arg) {
756
+ return this.request("team/team_folder/archive/check", arg, "team", "api", "rpc", "team_data.content.write");
757
+ };
758
+ routes.teamTeamFolderCreate = function(arg) {
759
+ return this.request("team/team_folder/create", arg, "team", "api", "rpc", "team_data.content.write");
760
+ };
761
+ routes.teamTeamFolderGetInfo = function(arg) {
762
+ return this.request("team/team_folder/get_info", arg, "team", "api", "rpc", "team_data.content.read");
763
+ };
764
+ routes.teamTeamFolderList = function(arg) {
765
+ return this.request("team/team_folder/list", arg, "team", "api", "rpc", "team_data.content.read");
766
+ };
767
+ routes.teamTeamFolderListContinue = function(arg) {
768
+ return this.request("team/team_folder/list/continue", arg, "team", "api", "rpc", "team_data.content.read");
769
+ };
770
+ routes.teamTeamFolderPermanentlyDelete = function(arg) {
771
+ return this.request("team/team_folder/permanently_delete", arg, "team", "api", "rpc", "team_data.content.write");
772
+ };
773
+ routes.teamTeamFolderRename = function(arg) {
774
+ return this.request("team/team_folder/rename", arg, "team", "api", "rpc", "team_data.content.write");
775
+ };
776
+ routes.teamTeamFolderUpdateSyncSettings = function(arg) {
777
+ return this.request("team/team_folder/update_sync_settings", arg, "team", "api", "rpc", "team_data.content.write");
778
+ };
779
+ routes.teamTokenGetAuthenticatedAdmin = function() {
780
+ return this.request("team/token/get_authenticated_admin", null, "team", "api", "rpc", "team_info.read");
781
+ };
782
+ routes.teamLogGetEvents = function(arg) {
783
+ return this.request("team_log/get_events", arg, "team", "api", "rpc", "events.read");
784
+ };
785
+ routes.teamLogGetEventsContinue = function(arg) {
786
+ return this.request("team_log/get_events/continue", arg, "team", "api", "rpc", "events.read");
787
+ };
788
+ routes.usersFeaturesGetValues = function(arg) {
789
+ return this.request("users/features/get_values", arg, "user", "api", "rpc", "account_info.read");
790
+ };
791
+ routes.usersGetAccount = function(arg) {
792
+ return this.request("users/get_account", arg, "user", "api", "rpc", "sharing.read");
793
+ };
794
+ routes.usersGetAccountBatch = function(arg) {
795
+ return this.request("users/get_account_batch", arg, "user", "api", "rpc", "sharing.read");
796
+ };
797
+ routes.usersGetCurrentAccount = function() {
798
+ return this.request("users/get_current_account", null, "user", "api", "rpc", "account_info.read");
799
+ };
800
+ routes.usersGetSpaceUsage = function() {
801
+ return this.request("users/get_space_usage", null, "user", "api", "rpc", "account_info.read");
802
+ };
803
+ function getSafeUnicode(c) {
804
+ var unicode = "000".concat(c.charCodeAt(0).toString(16)).slice(-4);
805
+ return "\\u".concat(unicode);
806
+ }
807
+ __name(getSafeUnicode, "getSafeUnicode");
808
+ var baseApiUrl = /* @__PURE__ */ __name(function baseApiUrl2(subdomain) {
809
+ var domain = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_API_DOMAIN;
810
+ var domainDelimiter = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
811
+ if (!domainDelimiter) {
812
+ return "https://".concat(domain, "/2/");
813
+ }
814
+ if (domain !== DEFAULT_API_DOMAIN && TEST_DOMAIN_MAPPINGS[subdomain] !== void 0) {
815
+ subdomain = TEST_DOMAIN_MAPPINGS[subdomain];
816
+ domainDelimiter = "-";
817
+ }
818
+ return "https://".concat(subdomain).concat(domainDelimiter).concat(domain, "/2/");
819
+ }, "baseApiUrl");
820
+ var OAuth2AuthorizationUrl = /* @__PURE__ */ __name(function OAuth2AuthorizationUrl2() {
821
+ var domain = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_DOMAIN;
822
+ if (domain !== DEFAULT_DOMAIN) {
823
+ domain = "meta-".concat(domain);
824
+ }
825
+ return "https://".concat(domain, "/oauth2/authorize");
826
+ }, "OAuth2AuthorizationUrl");
827
+ var OAuth2TokenUrl = /* @__PURE__ */ __name(function OAuth2TokenUrl2() {
828
+ var domain = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_API_DOMAIN;
829
+ var domainDelimiter = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ".";
830
+ var subdomain = "api";
831
+ if (domain !== DEFAULT_API_DOMAIN) {
832
+ subdomain = TEST_DOMAIN_MAPPINGS[subdomain];
833
+ domainDelimiter = "-";
834
+ }
835
+ return "https://".concat(subdomain).concat(domainDelimiter).concat(domain, "/oauth2/token");
836
+ }, "OAuth2TokenUrl");
837
+ function httpHeaderSafeJson(args) {
838
+ return JSON.stringify(args).replace(/[\u007f-\uffff]/g, getSafeUnicode);
839
+ }
840
+ __name(httpHeaderSafeJson, "httpHeaderSafeJson");
841
+ function getTokenExpiresAtDate(expiresIn) {
842
+ return new Date(Date.now() + expiresIn * 1e3);
843
+ }
844
+ __name(getTokenExpiresAtDate, "getTokenExpiresAtDate");
845
+ function isWindowOrWorker() {
846
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope || typeof module === "undefined" || typeof window !== "undefined";
847
+ }
848
+ __name(isWindowOrWorker, "isWindowOrWorker");
849
+ function isBrowserEnv() {
850
+ return typeof window !== "undefined";
851
+ }
852
+ __name(isBrowserEnv, "isBrowserEnv");
853
+ function isWorkerEnv() {
854
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
855
+ }
856
+ __name(isWorkerEnv, "isWorkerEnv");
857
+ function createBrowserSafeString(toBeConverted) {
858
+ var convertedString = toBeConverted.toString("base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
859
+ return convertedString;
860
+ }
861
+ __name(createBrowserSafeString, "createBrowserSafeString");
862
+ function _typeof(obj) {
863
+ "@babel/helpers - typeof";
864
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
865
+ _typeof = /* @__PURE__ */ __name(function _typeof2(obj2) {
866
+ return typeof obj2;
867
+ }, "_typeof");
868
+ } else {
869
+ _typeof = /* @__PURE__ */ __name(function _typeof2(obj2) {
870
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
871
+ }, "_typeof");
872
+ }
873
+ return _typeof(obj);
874
+ }
875
+ __name(_typeof, "_typeof");
876
+ function _classCallCheck$3(instance, Constructor) {
877
+ if (!(instance instanceof Constructor)) {
878
+ throw new TypeError("Cannot call a class as a function");
879
+ }
880
+ }
881
+ __name(_classCallCheck$3, "_classCallCheck$3");
882
+ function _inherits(subClass, superClass) {
883
+ if (typeof superClass !== "function" && superClass !== null) {
884
+ throw new TypeError("Super expression must either be null or a function");
885
+ }
886
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
887
+ if (superClass) _setPrototypeOf(subClass, superClass);
888
+ }
889
+ __name(_inherits, "_inherits");
890
+ function _createSuper(Derived) {
891
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
892
+ return /* @__PURE__ */ __name(function _createSuperInternal() {
893
+ var Super = _getPrototypeOf(Derived), result;
894
+ if (hasNativeReflectConstruct) {
895
+ var NewTarget = _getPrototypeOf(this).constructor;
896
+ result = Reflect.construct(Super, arguments, NewTarget);
897
+ } else {
898
+ result = Super.apply(this, arguments);
899
+ }
900
+ return _possibleConstructorReturn(this, result);
901
+ }, "_createSuperInternal");
902
+ }
903
+ __name(_createSuper, "_createSuper");
904
+ function _possibleConstructorReturn(self2, call) {
905
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
906
+ return call;
907
+ }
908
+ return _assertThisInitialized(self2);
909
+ }
910
+ __name(_possibleConstructorReturn, "_possibleConstructorReturn");
911
+ function _assertThisInitialized(self2) {
912
+ if (self2 === void 0) {
913
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
914
+ }
915
+ return self2;
916
+ }
917
+ __name(_assertThisInitialized, "_assertThisInitialized");
918
+ function _wrapNativeSuper(Class) {
919
+ var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
920
+ _wrapNativeSuper = /* @__PURE__ */ __name(function _wrapNativeSuper2(Class2) {
921
+ if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
922
+ if (typeof Class2 !== "function") {
923
+ throw new TypeError("Super expression must either be null or a function");
924
+ }
925
+ if (typeof _cache !== "undefined") {
926
+ if (_cache.has(Class2)) return _cache.get(Class2);
927
+ _cache.set(Class2, Wrapper);
928
+ }
929
+ function Wrapper() {
930
+ return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
931
+ }
932
+ __name(Wrapper, "Wrapper");
933
+ Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });
934
+ return _setPrototypeOf(Wrapper, Class2);
935
+ }, "_wrapNativeSuper");
936
+ return _wrapNativeSuper(Class);
937
+ }
938
+ __name(_wrapNativeSuper, "_wrapNativeSuper");
939
+ function _construct(Parent, args, Class) {
940
+ if (_isNativeReflectConstruct()) {
941
+ _construct = Reflect.construct;
942
+ } else {
943
+ _construct = /* @__PURE__ */ __name(function _construct2(Parent2, args2, Class2) {
944
+ var a = [null];
945
+ a.push.apply(a, args2);
946
+ var Constructor = Function.bind.apply(Parent2, a);
947
+ var instance = new Constructor();
948
+ if (Class2) _setPrototypeOf(instance, Class2.prototype);
949
+ return instance;
950
+ }, "_construct");
951
+ }
952
+ return _construct.apply(null, arguments);
953
+ }
954
+ __name(_construct, "_construct");
955
+ function _isNativeReflectConstruct() {
956
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
957
+ if (Reflect.construct.sham) return false;
958
+ if (typeof Proxy === "function") return true;
959
+ try {
960
+ Date.prototype.toString.call(Reflect.construct(Date, [], function() {
961
+ }));
962
+ return true;
963
+ } catch (e) {
964
+ return false;
965
+ }
966
+ }
967
+ __name(_isNativeReflectConstruct, "_isNativeReflectConstruct");
968
+ function _isNativeFunction(fn) {
969
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
970
+ }
971
+ __name(_isNativeFunction, "_isNativeFunction");
972
+ function _setPrototypeOf(o, p) {
973
+ _setPrototypeOf = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf2(o2, p2) {
974
+ o2.__proto__ = p2;
975
+ return o2;
976
+ }, "_setPrototypeOf");
977
+ return _setPrototypeOf(o, p);
978
+ }
979
+ __name(_setPrototypeOf, "_setPrototypeOf");
980
+ function _getPrototypeOf(o) {
981
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : /* @__PURE__ */ __name(function _getPrototypeOf2(o2) {
982
+ return o2.__proto__ || Object.getPrototypeOf(o2);
983
+ }, "_getPrototypeOf");
984
+ return _getPrototypeOf(o);
985
+ }
986
+ __name(_getPrototypeOf, "_getPrototypeOf");
987
+ var DropboxResponseError = /* @__PURE__ */ (function(_Error) {
988
+ _inherits(DropboxResponseError2, _Error);
989
+ var _super = _createSuper(DropboxResponseError2);
990
+ function DropboxResponseError2(status, headers, error) {
991
+ var _this;
992
+ _classCallCheck$3(this, DropboxResponseError2);
993
+ _this = _super.call(this, "Response failed with a ".concat(status, " code"));
994
+ _this.name = "DropboxResponseError";
995
+ _this.status = status;
996
+ _this.headers = headers;
997
+ _this.error = error;
998
+ return _this;
999
+ }
1000
+ __name(DropboxResponseError2, "DropboxResponseError");
1001
+ return DropboxResponseError2;
1002
+ })(/* @__PURE__ */ _wrapNativeSuper(Error));
1003
+ function _classCallCheck$2(instance, Constructor) {
1004
+ if (!(instance instanceof Constructor)) {
1005
+ throw new TypeError("Cannot call a class as a function");
1006
+ }
1007
+ }
1008
+ __name(_classCallCheck$2, "_classCallCheck$2");
1009
+ var DropboxResponse = /* @__PURE__ */ __name(function DropboxResponse2(status, headers, result) {
1010
+ _classCallCheck$2(this, DropboxResponse2);
1011
+ this.status = status;
1012
+ this.headers = headers;
1013
+ this.result = result;
1014
+ }, "DropboxResponse");
1015
+ function throwAsError(res) {
1016
+ return res.text().then(function(data) {
1017
+ var errorObject;
1018
+ try {
1019
+ errorObject = JSON.parse(data);
1020
+ } catch (error) {
1021
+ errorObject = data;
1022
+ }
1023
+ throw new DropboxResponseError(res.status, res.headers, errorObject);
1024
+ });
1025
+ }
1026
+ __name(throwAsError, "throwAsError");
1027
+ function parseResponse(res) {
1028
+ if (!res.ok) {
1029
+ return throwAsError(res);
1030
+ }
1031
+ return res.text().then(function(data) {
1032
+ var responseObject;
1033
+ try {
1034
+ responseObject = JSON.parse(data);
1035
+ } catch (error) {
1036
+ responseObject = data;
1037
+ }
1038
+ return new DropboxResponse(res.status, res.headers, responseObject);
1039
+ });
1040
+ }
1041
+ __name(parseResponse, "parseResponse");
1042
+ function parseDownloadResponse(res) {
1043
+ if (!res.ok) {
1044
+ return throwAsError(res);
1045
+ }
1046
+ return new Promise(function(resolve) {
1047
+ if (isWindowOrWorker()) {
1048
+ res.blob().then(function(data) {
1049
+ return resolve(data);
1050
+ });
1051
+ } else {
1052
+ res.buffer().then(function(data) {
1053
+ return resolve(data);
1054
+ });
1055
+ }
1056
+ }).then(function(data) {
1057
+ var result = JSON.parse(res.headers.get("dropbox-api-result"));
1058
+ if (isWindowOrWorker()) {
1059
+ result.fileBlob = data;
1060
+ } else {
1061
+ result.fileBinary = data;
1062
+ }
1063
+ return new DropboxResponse(res.status, res.headers, result);
1064
+ });
1065
+ }
1066
+ __name(parseDownloadResponse, "parseDownloadResponse");
1067
+ function _classCallCheck$1(instance, Constructor) {
1068
+ if (!(instance instanceof Constructor)) {
1069
+ throw new TypeError("Cannot call a class as a function");
1070
+ }
1071
+ }
1072
+ __name(_classCallCheck$1, "_classCallCheck$1");
1073
+ function _defineProperties$1(target, props) {
1074
+ for (var i = 0; i < props.length; i++) {
1075
+ var descriptor = props[i];
1076
+ descriptor.enumerable = descriptor.enumerable || false;
1077
+ descriptor.configurable = true;
1078
+ if ("value" in descriptor) descriptor.writable = true;
1079
+ Object.defineProperty(target, descriptor.key, descriptor);
1080
+ }
1081
+ }
1082
+ __name(_defineProperties$1, "_defineProperties$1");
1083
+ function _createClass$1(Constructor, protoProps, staticProps) {
1084
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
1085
+ return Constructor;
1086
+ }
1087
+ __name(_createClass$1, "_createClass$1");
1088
+ var fetch;
1089
+ var crypto;
1090
+ var Encoder;
1091
+ var TokenExpirationBuffer = 300 * 1e3;
1092
+ var PKCELength = 128;
1093
+ var TokenAccessTypes = ["legacy", "offline", "online"];
1094
+ var GrantTypes = ["code", "token"];
1095
+ var IncludeGrantedScopes = ["none", "user", "team"];
1096
+ var DropboxAuth = /* @__PURE__ */ (function() {
1097
+ function DropboxAuth2(options) {
1098
+ _classCallCheck$1(this, DropboxAuth2);
1099
+ options = options || {};
1100
+ if (isBrowserEnv()) {
1101
+ fetch = window.fetch.bind(window);
1102
+ crypto = window.crypto || window.msCrypto;
1103
+ } else if (isWorkerEnv()) {
1104
+ fetch = self.fetch.bind(self);
1105
+ crypto = self.crypto;
1106
+ } else {
1107
+ fetch = require("node-fetch");
1108
+ crypto = require("crypto");
1109
+ }
1110
+ if (typeof TextEncoder === "undefined") {
1111
+ Encoder = require("util").TextEncoder;
1112
+ } else {
1113
+ Encoder = TextEncoder;
1114
+ }
1115
+ this.fetch = options.fetch || fetch;
1116
+ this.accessToken = options.accessToken;
1117
+ this.accessTokenExpiresAt = options.accessTokenExpiresAt;
1118
+ this.refreshToken = options.refreshToken;
1119
+ this.clientId = options.clientId;
1120
+ this.clientSecret = options.clientSecret;
1121
+ this.domain = options.domain;
1122
+ this.domainDelimiter = options.domainDelimiter;
1123
+ this.customHeaders = options.customHeaders;
1124
+ this.dataOnBody = options.dataOnBody;
1125
+ }
1126
+ __name(DropboxAuth2, "DropboxAuth");
1127
+ _createClass$1(DropboxAuth2, [{
1128
+ key: "setAccessToken",
1129
+ value: /* @__PURE__ */ __name(function setAccessToken(accessToken) {
1130
+ this.accessToken = accessToken;
1131
+ }, "setAccessToken")
1132
+ /**
1133
+ * Get the access token
1134
+ * @returns {String} Access token
1135
+ */
1136
+ }, {
1137
+ key: "getAccessToken",
1138
+ value: /* @__PURE__ */ __name(function getAccessToken() {
1139
+ return this.accessToken;
1140
+ }, "getAccessToken")
1141
+ /**
1142
+ * Set the client id, which is used to help gain an access token.
1143
+ * @arg {String} clientId - Your apps client id
1144
+ * @returns {undefined}
1145
+ */
1146
+ }, {
1147
+ key: "setClientId",
1148
+ value: /* @__PURE__ */ __name(function setClientId(clientId) {
1149
+ this.clientId = clientId;
1150
+ }, "setClientId")
1151
+ /**
1152
+ * Get the client id
1153
+ * @returns {String} Client id
1154
+ */
1155
+ }, {
1156
+ key: "getClientId",
1157
+ value: /* @__PURE__ */ __name(function getClientId() {
1158
+ return this.clientId;
1159
+ }, "getClientId")
1160
+ /**
1161
+ * Set the client secret
1162
+ * @arg {String} clientSecret - Your app's client secret
1163
+ * @returns {undefined}
1164
+ */
1165
+ }, {
1166
+ key: "setClientSecret",
1167
+ value: /* @__PURE__ */ __name(function setClientSecret(clientSecret) {
1168
+ this.clientSecret = clientSecret;
1169
+ }, "setClientSecret")
1170
+ /**
1171
+ * Get the client secret
1172
+ * @returns {String} Client secret
1173
+ */
1174
+ }, {
1175
+ key: "getClientSecret",
1176
+ value: /* @__PURE__ */ __name(function getClientSecret() {
1177
+ return this.clientSecret;
1178
+ }, "getClientSecret")
1179
+ /**
1180
+ * Gets the refresh token
1181
+ * @returns {String} Refresh token
1182
+ */
1183
+ }, {
1184
+ key: "getRefreshToken",
1185
+ value: /* @__PURE__ */ __name(function getRefreshToken() {
1186
+ return this.refreshToken;
1187
+ }, "getRefreshToken")
1188
+ /**
1189
+ * Sets the refresh token
1190
+ * @param refreshToken - A refresh token
1191
+ */
1192
+ }, {
1193
+ key: "setRefreshToken",
1194
+ value: /* @__PURE__ */ __name(function setRefreshToken(refreshToken) {
1195
+ this.refreshToken = refreshToken;
1196
+ }, "setRefreshToken")
1197
+ /**
1198
+ * Gets the access token's expiration date
1199
+ * @returns {Date} date of token expiration
1200
+ */
1201
+ }, {
1202
+ key: "getAccessTokenExpiresAt",
1203
+ value: /* @__PURE__ */ __name(function getAccessTokenExpiresAt() {
1204
+ return this.accessTokenExpiresAt;
1205
+ }, "getAccessTokenExpiresAt")
1206
+ /**
1207
+ * Sets the access token's expiration date
1208
+ * @param accessTokenExpiresAt - new expiration date
1209
+ */
1210
+ }, {
1211
+ key: "setAccessTokenExpiresAt",
1212
+ value: /* @__PURE__ */ __name(function setAccessTokenExpiresAt(accessTokenExpiresAt) {
1213
+ this.accessTokenExpiresAt = accessTokenExpiresAt;
1214
+ }, "setAccessTokenExpiresAt")
1215
+ /**
1216
+ * Sets the code verifier for PKCE flow
1217
+ * @param {String} codeVerifier - new code verifier
1218
+ */
1219
+ }, {
1220
+ key: "setCodeVerifier",
1221
+ value: /* @__PURE__ */ __name(function setCodeVerifier(codeVerifier) {
1222
+ this.codeVerifier = codeVerifier;
1223
+ }, "setCodeVerifier")
1224
+ /**
1225
+ * Gets the code verifier for PKCE flow
1226
+ * @returns {String} - code verifier for PKCE
1227
+ */
1228
+ }, {
1229
+ key: "getCodeVerifier",
1230
+ value: /* @__PURE__ */ __name(function getCodeVerifier() {
1231
+ return this.codeVerifier;
1232
+ }, "getCodeVerifier")
1233
+ }, {
1234
+ key: "generateCodeChallenge",
1235
+ value: /* @__PURE__ */ __name(function generateCodeChallenge() {
1236
+ var _this = this;
1237
+ var encoder = new Encoder();
1238
+ var codeData = encoder.encode(this.codeVerifier);
1239
+ var codeChallenge;
1240
+ if (isBrowserEnv() || isWorkerEnv()) {
1241
+ return crypto.subtle.digest("SHA-256", codeData).then(function(digestedHash2) {
1242
+ var base64String = btoa(String.fromCharCode.apply(null, new Uint8Array(digestedHash2)));
1243
+ codeChallenge = createBrowserSafeString(base64String).substr(0, 128);
1244
+ _this.codeChallenge = codeChallenge;
1245
+ });
1246
+ }
1247
+ var digestedHash = crypto.createHash("sha256").update(codeData).digest();
1248
+ codeChallenge = createBrowserSafeString(digestedHash);
1249
+ this.codeChallenge = codeChallenge;
1250
+ return Promise.resolve();
1251
+ }, "generateCodeChallenge")
1252
+ }, {
1253
+ key: "generatePKCECodes",
1254
+ value: /* @__PURE__ */ __name(function generatePKCECodes() {
1255
+ var codeVerifier;
1256
+ if (isBrowserEnv() || isWorkerEnv()) {
1257
+ var array = new Uint8Array(PKCELength);
1258
+ var randomValueArray = crypto.getRandomValues(array);
1259
+ var base64String = btoa(randomValueArray);
1260
+ codeVerifier = createBrowserSafeString(base64String).substr(0, 128);
1261
+ } else {
1262
+ var randomBytes = crypto.randomBytes(PKCELength);
1263
+ codeVerifier = createBrowserSafeString(randomBytes).substr(0, 128);
1264
+ }
1265
+ this.codeVerifier = codeVerifier;
1266
+ return this.generateCodeChallenge();
1267
+ }, "generatePKCECodes")
1268
+ /**
1269
+ * Get a URL that can be used to authenticate users for the Dropbox API.
1270
+ * @arg {String} redirectUri - A URL to redirect the user to after
1271
+ * authenticating. This must be added to your app through the admin interface.
1272
+ * @arg {String} [state] - State that will be returned in the redirect URL to help
1273
+ * prevent cross site scripting attacks.
1274
+ * @arg {String} [authType] - auth type, defaults to 'token', other option is 'code'
1275
+ * @arg {String} [tokenAccessType] - type of token to request. From the following:
1276
+ * null - creates a token with the app default (either legacy or online)
1277
+ * legacy - creates one long-lived token with no expiration
1278
+ * online - create one short-lived token with an expiration
1279
+ * offline - create one short-lived token with an expiration with a refresh token
1280
+ * @arg {Array<String>} [scope] - scopes to request for the grant
1281
+ * @arg {String} [includeGrantedScopes] - whether or not to include previously granted scopes.
1282
+ * From the following:
1283
+ * user - include user scopes in the grant
1284
+ * team - include team scopes in the grant
1285
+ * Note: if this user has never linked the app, include_granted_scopes must be None
1286
+ * @arg {boolean} [usePKCE] - Whether or not to use Sha256 based PKCE. PKCE should be only use
1287
+ * on client apps which doesn't call your server. It is less secure than non-PKCE flow but
1288
+ * can be used if you are unable to safely retrieve your app secret
1289
+ * @returns {Promise<String>} - Url to send user to for Dropbox API authentication
1290
+ * returned in a promise
1291
+ */
1292
+ }, {
1293
+ key: "getAuthenticationUrl",
1294
+ value: /* @__PURE__ */ __name(function getAuthenticationUrl(redirectUri, state) {
1295
+ var _this2 = this;
1296
+ var authType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "token";
1297
+ var tokenAccessType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
1298
+ var scope = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : null;
1299
+ var includeGrantedScopes = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "none";
1300
+ var usePKCE = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
1301
+ var clientId = this.getClientId();
1302
+ var baseUrl = OAuth2AuthorizationUrl(this.domain);
1303
+ if (!clientId) {
1304
+ throw new Error("A client id is required. You can set the client id using .setClientId().");
1305
+ }
1306
+ if (authType !== "code" && !redirectUri) {
1307
+ throw new Error("A redirect uri is required.");
1308
+ }
1309
+ if (!GrantTypes.includes(authType)) {
1310
+ throw new Error("Authorization type must be code or token");
1311
+ }
1312
+ if (tokenAccessType && !TokenAccessTypes.includes(tokenAccessType)) {
1313
+ throw new Error("Token Access Type must be legacy, offline, or online");
1314
+ }
1315
+ if (scope && !(scope instanceof Array)) {
1316
+ throw new Error("Scope must be an array of strings");
1317
+ }
1318
+ if (!IncludeGrantedScopes.includes(includeGrantedScopes)) {
1319
+ throw new Error("includeGrantedScopes must be none, user, or team");
1320
+ }
1321
+ var authUrl;
1322
+ if (authType === "code") {
1323
+ authUrl = "".concat(baseUrl, "?response_type=code&client_id=").concat(clientId);
1324
+ } else {
1325
+ authUrl = "".concat(baseUrl, "?response_type=token&client_id=").concat(clientId);
1326
+ }
1327
+ if (redirectUri) {
1328
+ authUrl += "&redirect_uri=".concat(redirectUri);
1329
+ }
1330
+ if (state) {
1331
+ authUrl += "&state=".concat(state);
1332
+ }
1333
+ if (tokenAccessType) {
1334
+ authUrl += "&token_access_type=".concat(tokenAccessType);
1335
+ }
1336
+ if (scope) {
1337
+ authUrl += "&scope=".concat(scope.join(" "));
1338
+ }
1339
+ if (includeGrantedScopes !== "none") {
1340
+ authUrl += "&include_granted_scopes=".concat(includeGrantedScopes);
1341
+ }
1342
+ if (usePKCE) {
1343
+ return this.generatePKCECodes().then(function() {
1344
+ authUrl += "&code_challenge_method=S256";
1345
+ authUrl += "&code_challenge=".concat(_this2.codeChallenge);
1346
+ return authUrl;
1347
+ });
1348
+ }
1349
+ return Promise.resolve(authUrl);
1350
+ }, "getAuthenticationUrl")
1351
+ /**
1352
+ * Get an OAuth2 access token from an OAuth2 Code.
1353
+ * @arg {String} redirectUri - A URL to redirect the user to after
1354
+ * authenticating. This must be added to your app through the admin interface.
1355
+ * @arg {String} code - An OAuth2 code.
1356
+ * @returns {Object} An object containing the token and related info (if applicable)
1357
+ */
1358
+ }, {
1359
+ key: "getAccessTokenFromCode",
1360
+ value: /* @__PURE__ */ __name(function getAccessTokenFromCode(redirectUri, code) {
1361
+ var clientId = this.getClientId();
1362
+ var clientSecret = this.getClientSecret();
1363
+ if (!clientId) {
1364
+ throw new Error("A client id is required. You can set the client id using .setClientId().");
1365
+ }
1366
+ var path = OAuth2TokenUrl(this.domain, this.domainDelimiter);
1367
+ path += "?grant_type=authorization_code";
1368
+ path += "&code=".concat(code);
1369
+ path += "&client_id=".concat(clientId);
1370
+ if (clientSecret) {
1371
+ path += "&client_secret=".concat(clientSecret);
1372
+ } else {
1373
+ if (!this.codeVerifier) {
1374
+ throw new Error("You must use PKCE when generating the authorization URL to not include a client secret");
1375
+ }
1376
+ path += "&code_verifier=".concat(this.codeVerifier);
1377
+ }
1378
+ if (redirectUri) {
1379
+ path += "&redirect_uri=".concat(redirectUri);
1380
+ }
1381
+ var fetchOptions = {
1382
+ method: "POST",
1383
+ headers: {
1384
+ "Content-Type": "application/x-www-form-urlencoded"
1385
+ }
1386
+ };
1387
+ return this.fetch(path, fetchOptions).then(function(res) {
1388
+ return parseResponse(res);
1389
+ });
1390
+ }, "getAccessTokenFromCode")
1391
+ /**
1392
+ * Checks if a token is needed, can be refreshed and if the token is expired.
1393
+ * If so, attempts to refresh access token
1394
+ * @returns {Promise<*>}
1395
+ */
1396
+ }, {
1397
+ key: "checkAndRefreshAccessToken",
1398
+ value: /* @__PURE__ */ __name(function checkAndRefreshAccessToken() {
1399
+ var canRefresh = this.getRefreshToken() && this.getClientId();
1400
+ var needsRefresh = !this.getAccessTokenExpiresAt() || new Date(Date.now() + TokenExpirationBuffer) >= this.getAccessTokenExpiresAt();
1401
+ var needsToken = !this.getAccessToken();
1402
+ if ((needsRefresh || needsToken) && canRefresh) {
1403
+ return this.refreshAccessToken();
1404
+ }
1405
+ return Promise.resolve();
1406
+ }, "checkAndRefreshAccessToken")
1407
+ /**
1408
+ * Refreshes the access token using the refresh token, if available
1409
+ * @arg {Array<String>} scope - a subset of scopes from the original
1410
+ * refresh to acquire with an access token
1411
+ * @returns {Promise<*>}
1412
+ */
1413
+ }, {
1414
+ key: "refreshAccessToken",
1415
+ value: /* @__PURE__ */ __name(function refreshAccessToken() {
1416
+ var _this3 = this;
1417
+ var scope = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
1418
+ var clientId = this.getClientId();
1419
+ var clientSecret = this.getClientSecret();
1420
+ if (!clientId) {
1421
+ throw new Error("A client id is required. You can set the client id using .setClientId().");
1422
+ }
1423
+ if (scope && !(scope instanceof Array)) {
1424
+ throw new Error("Scope must be an array of strings");
1425
+ }
1426
+ var refreshUrl = OAuth2TokenUrl(this.domain, this.domainDelimiter);
1427
+ var fetchOptions = {
1428
+ headers: {
1429
+ "Content-Type": "application/json"
1430
+ },
1431
+ method: "POST"
1432
+ };
1433
+ if (this.dataOnBody) {
1434
+ var body = {
1435
+ grant_type: "refresh_token",
1436
+ client_id: clientId,
1437
+ refresh_token: this.getRefreshToken()
1438
+ };
1439
+ if (clientSecret) {
1440
+ body.client_secret = clientSecret;
1441
+ }
1442
+ if (scope) {
1443
+ body.scope = scope.join(" ");
1444
+ }
1445
+ fetchOptions.body = body;
1446
+ } else {
1447
+ refreshUrl += "?grant_type=refresh_token&refresh_token=".concat(this.getRefreshToken());
1448
+ refreshUrl += "&client_id=".concat(clientId);
1449
+ if (clientSecret) {
1450
+ refreshUrl += "&client_secret=".concat(clientSecret);
1451
+ }
1452
+ if (scope) {
1453
+ refreshUrl += "&scope=".concat(scope.join(" "));
1454
+ }
1455
+ }
1456
+ return this.fetch(refreshUrl, fetchOptions).then(function(res) {
1457
+ return parseResponse(res);
1458
+ }).then(function(res) {
1459
+ _this3.setAccessToken(res.result.access_token);
1460
+ _this3.setAccessTokenExpiresAt(getTokenExpiresAtDate(res.result.expires_in));
1461
+ });
1462
+ }, "refreshAccessToken")
1463
+ }]);
1464
+ return DropboxAuth2;
1465
+ })();
1466
+ function _classCallCheck(instance, Constructor) {
1467
+ if (!(instance instanceof Constructor)) {
1468
+ throw new TypeError("Cannot call a class as a function");
1469
+ }
1470
+ }
1471
+ __name(_classCallCheck, "_classCallCheck");
1472
+ function _defineProperties(target, props) {
1473
+ for (var i = 0; i < props.length; i++) {
1474
+ var descriptor = props[i];
1475
+ descriptor.enumerable = descriptor.enumerable || false;
1476
+ descriptor.configurable = true;
1477
+ if ("value" in descriptor) descriptor.writable = true;
1478
+ Object.defineProperty(target, descriptor.key, descriptor);
1479
+ }
1480
+ }
1481
+ __name(_defineProperties, "_defineProperties");
1482
+ function _createClass(Constructor, protoProps, staticProps) {
1483
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1484
+ return Constructor;
1485
+ }
1486
+ __name(_createClass, "_createClass");
1487
+ var b64 = typeof btoa === "undefined" ? function(str) {
1488
+ return Buffer2.from(str).toString("base64");
1489
+ } : btoa;
1490
+ var Dropbox = /* @__PURE__ */ (function() {
1491
+ function Dropbox2(options) {
1492
+ _classCallCheck(this, Dropbox2);
1493
+ options = options || {};
1494
+ if (options.auth) {
1495
+ this.auth = options.auth;
1496
+ } else {
1497
+ this.auth = new DropboxAuth(options);
1498
+ }
1499
+ this.fetch = options.fetch || this.auth.fetch;
1500
+ this.selectUser = options.selectUser;
1501
+ this.selectAdmin = options.selectAdmin;
1502
+ this.pathRoot = options.pathRoot;
1503
+ this.domain = options.domain || this.auth.domain;
1504
+ this.domainDelimiter = options.domainDelimiter || this.auth.domainDelimiter;
1505
+ this.customHeaders = options.customHeaders || this.auth.customHeaders;
1506
+ Object.assign(this, routes);
1507
+ }
1508
+ __name(Dropbox2, "Dropbox");
1509
+ _createClass(Dropbox2, [{
1510
+ key: "request",
1511
+ value: /* @__PURE__ */ __name(function request(path, args, auth, host, style) {
1512
+ switch (style) {
1513
+ case RPC:
1514
+ return this.rpcRequest(path, args, auth, host);
1515
+ case DOWNLOAD:
1516
+ return this.downloadRequest(path, args, auth, host);
1517
+ case UPLOAD:
1518
+ return this.uploadRequest(path, args, auth, host);
1519
+ default:
1520
+ throw new Error("Invalid request style: ".concat(style));
1521
+ }
1522
+ }, "request")
1523
+ }, {
1524
+ key: "rpcRequest",
1525
+ value: /* @__PURE__ */ __name(function rpcRequest(path, body, auth, host) {
1526
+ var _this = this;
1527
+ return this.auth.checkAndRefreshAccessToken().then(function() {
1528
+ var fetchOptions = {
1529
+ method: "POST",
1530
+ body: body ? JSON.stringify(body) : null,
1531
+ headers: {}
1532
+ };
1533
+ if (body) {
1534
+ fetchOptions.headers["Content-Type"] = "application/json";
1535
+ }
1536
+ _this.setAuthHeaders(auth, fetchOptions);
1537
+ _this.setCommonHeaders(fetchOptions);
1538
+ return fetchOptions;
1539
+ }).then(function(fetchOptions) {
1540
+ return _this.fetch(baseApiUrl(host, _this.domain, _this.domainDelimiter) + path, fetchOptions);
1541
+ }).then(function(res) {
1542
+ return parseResponse(res);
1543
+ });
1544
+ }, "rpcRequest")
1545
+ }, {
1546
+ key: "downloadRequest",
1547
+ value: /* @__PURE__ */ __name(function downloadRequest(path, args, auth, host) {
1548
+ var _this2 = this;
1549
+ return this.auth.checkAndRefreshAccessToken().then(function() {
1550
+ var fetchOptions = {
1551
+ method: "POST",
1552
+ headers: {
1553
+ "Dropbox-API-Arg": httpHeaderSafeJson(args)
1554
+ }
1555
+ };
1556
+ _this2.setAuthHeaders(auth, fetchOptions);
1557
+ _this2.setCommonHeaders(fetchOptions);
1558
+ return fetchOptions;
1559
+ }).then(function(fetchOptions) {
1560
+ return _this2.fetch(baseApiUrl(host, _this2.domain, _this2.domainDelimiter) + path, fetchOptions);
1561
+ }).then(function(res) {
1562
+ return parseDownloadResponse(res);
1563
+ });
1564
+ }, "downloadRequest")
1565
+ }, {
1566
+ key: "uploadRequest",
1567
+ value: /* @__PURE__ */ __name(function uploadRequest(path, args, auth, host) {
1568
+ var _this3 = this;
1569
+ return this.auth.checkAndRefreshAccessToken().then(function() {
1570
+ var contents = args.contents;
1571
+ delete args.contents;
1572
+ var fetchOptions = {
1573
+ body: contents,
1574
+ method: "POST",
1575
+ headers: {
1576
+ "Content-Type": "application/octet-stream",
1577
+ "Dropbox-API-Arg": httpHeaderSafeJson(args)
1578
+ }
1579
+ };
1580
+ _this3.setAuthHeaders(auth, fetchOptions);
1581
+ _this3.setCommonHeaders(fetchOptions);
1582
+ return fetchOptions;
1583
+ }).then(function(fetchOptions) {
1584
+ return _this3.fetch(baseApiUrl(host, _this3.domain, _this3.domainDelimiter) + path, fetchOptions);
1585
+ }).then(function(res) {
1586
+ return parseResponse(res);
1587
+ });
1588
+ }, "uploadRequest")
1589
+ }, {
1590
+ key: "setAuthHeaders",
1591
+ value: /* @__PURE__ */ __name(function setAuthHeaders(auth, fetchOptions) {
1592
+ if (auth.split(",").length > 1) {
1593
+ var authTypes = auth.replace(" ", "").split(",");
1594
+ if (authTypes.includes(USER_AUTH) && this.auth.getAccessToken()) {
1595
+ auth = USER_AUTH;
1596
+ } else if (authTypes.includes(TEAM_AUTH) && this.auth.getAccessToken()) {
1597
+ auth = TEAM_AUTH;
1598
+ } else if (authTypes.includes(APP_AUTH)) {
1599
+ auth = APP_AUTH;
1600
+ }
1601
+ }
1602
+ switch (auth) {
1603
+ case APP_AUTH:
1604
+ if (this.auth.clientId && this.auth.clientSecret) {
1605
+ var authHeader = b64("".concat(this.auth.clientId, ":").concat(this.auth.clientSecret));
1606
+ fetchOptions.headers.Authorization = "Basic ".concat(authHeader);
1607
+ }
1608
+ break;
1609
+ case TEAM_AUTH:
1610
+ case USER_AUTH:
1611
+ if (this.auth.getAccessToken()) {
1612
+ fetchOptions.headers.Authorization = "Bearer ".concat(this.auth.getAccessToken());
1613
+ }
1614
+ break;
1615
+ case NO_AUTH:
1616
+ case COOKIE:
1617
+ break;
1618
+ default:
1619
+ throw new Error("Unhandled auth type: ".concat(auth));
1620
+ }
1621
+ }, "setAuthHeaders")
1622
+ }, {
1623
+ key: "setCommonHeaders",
1624
+ value: /* @__PURE__ */ __name(function setCommonHeaders(options) {
1625
+ var _this4 = this;
1626
+ if (this.selectUser) {
1627
+ options.headers["Dropbox-API-Select-User"] = this.selectUser;
1628
+ }
1629
+ if (this.selectAdmin) {
1630
+ options.headers["Dropbox-API-Select-Admin"] = this.selectAdmin;
1631
+ }
1632
+ if (this.pathRoot) {
1633
+ options.headers["Dropbox-API-Path-Root"] = this.pathRoot;
1634
+ }
1635
+ if (this.customHeaders) {
1636
+ var headerKeys = Object.keys(this.customHeaders);
1637
+ headerKeys.forEach(function(header) {
1638
+ options.headers[header] = _this4.customHeaders[header];
1639
+ });
1640
+ }
1641
+ }, "setCommonHeaders")
1642
+ }]);
1643
+ return Dropbox2;
1644
+ })();
1645
+ export {
1646
+ Dropbox,
1647
+ DropboxAuth,
1648
+ DropboxResponse,
1649
+ DropboxResponseError
1650
+ };
1651
+ //# sourceMappingURL=index-CyR7px7Y.js.map