@fdm-monster/client-next 0.0.1 → 0.0.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 (198) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/dist/assets/MaterialIcons-Regular-BjXOXp5c.eot +0 -0
  3. package/dist/assets/MaterialIcons-Regular-DEUTIz1o.ttf +0 -0
  4. package/dist/assets/MaterialIcons-Regular-DOtZ65Va.woff2 +0 -0
  5. package/dist/assets/MaterialIcons-Regular-FsbMSDLx.woff +0 -0
  6. package/dist/assets/index-CHzfWKPO.css +5 -0
  7. package/dist/assets/index-CnWtkGvw.js +90 -0
  8. package/dist/assets/index-CnWtkGvw.js.map +1 -0
  9. package/dist/favicon.ico +0 -0
  10. package/dist/img/DavidZwart.jpg +0 -0
  11. package/dist/img/OIG.JYDC2RaWdz7g9.jpg +0 -0
  12. package/dist/img/OIG.jpg +0 -0
  13. package/dist/img/icons/android-chrome-256x256.png +0 -0
  14. package/dist/img/icons/android-chrome-384x384.png +0 -0
  15. package/dist/img/icons/android-chrome-512x512.png +0 -0
  16. package/dist/img/icons/favicon.svg +1 -0
  17. package/dist/img/logo.png +0 -0
  18. package/dist/img/logo.svg +1 -0
  19. package/dist/img/manifest.webmanifest +33 -0
  20. package/dist/img/octoprint-tentacle.svg +144 -0
  21. package/dist/img/thumbail_unknown.jpg +0 -0
  22. package/dist/img/vbanner.jpg +0 -0
  23. package/dist/index.html +24 -0
  24. package/dist/robots.txt +2 -0
  25. package/package.json +1 -1
  26. package/.all-contributorsrc +0 -57
  27. package/.editorconfig +0 -5
  28. package/.eslintrc.js +0 -126
  29. package/.github/FUNDING.yml +0 -3
  30. package/.github/workflows/release-client.yml +0 -94
  31. package/.github/workflows/vue-publish.yml +0 -26
  32. package/.prettierignore +0 -15
  33. package/.whitesource +0 -12
  34. package/renovate.json +0 -30
  35. package/src/App.vue +0 -60
  36. package/src/AppLoader.vue +0 -383
  37. package/src/assets/adjectives.json +0 -1468
  38. package/src/assets/logo.svg +0 -6
  39. package/src/assets/nouns.json +0 -4309
  40. package/src/auto-imports.d.ts +0 -139
  41. package/src/backend/app.service.ts +0 -39
  42. package/src/backend/auth.service.ts +0 -56
  43. package/src/backend/base.service.ts +0 -57
  44. package/src/backend/batch.service.ts +0 -37
  45. package/src/backend/camera-stream.service.ts +0 -33
  46. package/src/backend/custom-gcode.service.ts +0 -11
  47. package/src/backend/dto/octoprint-settings.dto.ts +0 -168
  48. package/src/backend/first-time-setup.service.ts +0 -17
  49. package/src/backend/floor.service.ts +0 -84
  50. package/src/backend/index.ts +0 -4
  51. package/src/backend/print-completions.service.ts +0 -11
  52. package/src/backend/printer-file.service.ts +0 -91
  53. package/src/backend/printer-group.service.ts +0 -62
  54. package/src/backend/printer-job.service.ts +0 -20
  55. package/src/backend/printer-settings.service.ts +0 -28
  56. package/src/backend/printers.service.ts +0 -136
  57. package/src/backend/server-private.service.ts +0 -55
  58. package/src/backend/server.api.ts +0 -132
  59. package/src/backend/settings.service.ts +0 -85
  60. package/src/backend/user.service.ts +0 -51
  61. package/src/components/AboutHelp/AboutView.vue +0 -164
  62. package/src/components/CameraGrid/CameraGridView.vue +0 -111
  63. package/src/components/FirstTimeSetup/FirstTimeSetupView.vue +0 -354
  64. package/src/components/Generic/Actions/PrinterConnectionAction.vue +0 -56
  65. package/src/components/Generic/Actions/PrinterCreateAction.vue +0 -22
  66. package/src/components/Generic/Actions/PrinterDeleteAction.vue +0 -29
  67. package/src/components/Generic/Actions/PrinterQuickStopAction.vue +0 -35
  68. package/src/components/Generic/Actions/PrinterSettingsAction.vue +0 -35
  69. package/src/components/Generic/Actions/PrinterUrlAction.vue +0 -24
  70. package/src/components/Generic/Actions/RefreshFilesAction.vue +0 -50
  71. package/src/components/Generic/Actions/SyncPrinterNameAction.vue +0 -36
  72. package/src/components/Generic/Dialogs/AddOrUpdateCameraStreamDialog.vue +0 -131
  73. package/src/components/Generic/Dialogs/AddOrUpdateFloorDialog.vue +0 -141
  74. package/src/components/Generic/Dialogs/AddOrUpdatePrinterDialog.vue +0 -303
  75. package/src/components/Generic/Dialogs/BaseDialog.vue +0 -81
  76. package/src/components/Generic/Dialogs/BatchJsonCreateDialog.vue +0 -109
  77. package/src/components/Generic/Dialogs/BatchReprintDialog.vue +0 -190
  78. package/src/components/Generic/Dialogs/PrinterChecksPanel.vue +0 -37
  79. package/src/components/Generic/Dialogs/PrinterControlDialog.vue +0 -202
  80. package/src/components/Generic/Dialogs/PrinterMaintenanceDialog.vue +0 -130
  81. package/src/components/Generic/Dialogs/YamlImportExportDialog.vue +0 -186
  82. package/src/components/Generic/Dialogs/dialog.constants.ts +0 -19
  83. package/src/components/Generic/FileExplorerSideNav.vue +0 -734
  84. package/src/components/Generic/Loaders/GridLoader.vue +0 -68
  85. package/src/components/Generic/NavigationDrawer.vue +0 -69
  86. package/src/components/Generic/PrintJobsMenu.vue +0 -148
  87. package/src/components/Generic/Snackbars/AppErrorSnackbar.vue +0 -64
  88. package/src/components/Generic/Snackbars/AppInfoSnackbar.vue +0 -63
  89. package/src/components/Generic/Snackbars/AppProgressSnackbar.vue +0 -158
  90. package/src/components/Generic/Vuetify/TooltipButton.vue +0 -47
  91. package/src/components/HelpOverlay/HelpOverlay.vue +0 -57
  92. package/src/components/Login/LoginForm.vue +0 -206
  93. package/src/components/Login/LoginView.spec.ts +0 -64
  94. package/src/components/Login/LoginView.vue +0 -65
  95. package/src/components/Login/Logo.vue +0 -13
  96. package/src/components/Login/PermissionDenied.vue +0 -109
  97. package/src/components/Login/RegistrationForm.vue +0 -207
  98. package/src/components/Login/RegistrationView.vue +0 -17
  99. package/src/components/Login/__snapshots__/LoginView.spec.ts.snap +0 -1051
  100. package/src/components/NotFound/NotFoundView.vue +0 -39
  101. package/src/components/PrintStatistics/PrintStatistics.vue +0 -168
  102. package/src/components/PrintStatistics/PrintStatisticsView.vue +0 -15
  103. package/src/components/PrinterGrid/HomeToolbar.vue +0 -90
  104. package/src/components/PrinterGrid/PrinterGrid.vue +0 -164
  105. package/src/components/PrinterGrid/PrinterGridTile.vue +0 -438
  106. package/src/components/PrinterGrid/PrinterGridView.vue +0 -210
  107. package/src/components/PrinterList/FileControlList.vue +0 -40
  108. package/src/components/PrinterList/PrinterDetails.vue +0 -91
  109. package/src/components/PrinterList/PrintersView.vue +0 -492
  110. package/src/components/Settings/AccountSettings.vue +0 -163
  111. package/src/components/Settings/DiagnosticsSettings.vue +0 -137
  112. package/src/components/Settings/EmergencyCommands.vue +0 -265
  113. package/src/components/Settings/FloorSettings.vue +0 -276
  114. package/src/components/Settings/GridSettings.vue +0 -127
  115. package/src/components/Settings/OctoPrintSettings.vue +0 -188
  116. package/src/components/Settings/ServerProtectionSettings.vue +0 -370
  117. package/src/components/Settings/SettingsView.vue +0 -73
  118. package/src/components/Settings/SoftwareUpgradeSettings.vue +0 -297
  119. package/src/components/Settings/UserManagementSettings.vue +0 -257
  120. package/src/components/TopBar.vue +0 -147
  121. package/src/components.d.ts +0 -70
  122. package/src/directives/file-upload.directive.ts +0 -117
  123. package/src/directives/printer-drop-position.directive.ts +0 -92
  124. package/src/env.d.ts +0 -6
  125. package/src/main.ts +0 -76
  126. package/src/models/batch/reprint.dto.ts +0 -79
  127. package/src/models/batch.model.ts +0 -11
  128. package/src/models/camera-streams/camera-stream.ts +0 -19
  129. package/src/models/floors/floor.model.ts +0 -30
  130. package/src/models/octoprint/connection-options.model.ts +0 -8
  131. package/src/models/plugins/firmware-updates/prusa-firmware-release.model.ts +0 -57
  132. package/src/models/print-completions/print-completions.model.ts +0 -49
  133. package/src/models/printers/crud/create-printer.model.ts +0 -26
  134. package/src/models/printers/file-upload-commands.model.ts +0 -4
  135. package/src/models/printers/gcode/gcode-analysis.model.ts +0 -30
  136. package/src/models/printers/printer-current-job.model.ts +0 -90
  137. package/src/models/printers/printer-file.model.ts +0 -48
  138. package/src/models/printers/printer.model.ts +0 -18
  139. package/src/models/server/client-releases.model.ts +0 -27
  140. package/src/models/server/export-yaml.model.ts +0 -11
  141. package/src/models/server/features.model.ts +0 -37
  142. package/src/models/server/github-rate-limit.model.ts +0 -21
  143. package/src/models/server/version.model.ts +0 -14
  144. package/src/models/settings/printer-file-clean-settings.model.ts +0 -5
  145. package/src/models/settings/server-settings.dto.ts +0 -19
  146. package/src/models/settings/settings.model.ts +0 -57
  147. package/src/models/socketio-messages/socketio-message.model.ts +0 -53
  148. package/src/models/uploads/queued-upload.model.ts +0 -12
  149. package/src/models/user.model.ts +0 -15
  150. package/src/plugins/README.md +0 -3
  151. package/src/plugins/index.ts +0 -17
  152. package/src/plugins/vuetify.ts +0 -53
  153. package/src/router/index.ts +0 -192
  154. package/src/router/route-names.ts +0 -14
  155. package/src/router/utils.ts +0 -23
  156. package/src/shared/alert.events.ts +0 -14
  157. package/src/shared/app.constants.ts +0 -23
  158. package/src/shared/auth.constants.ts +0 -34
  159. package/src/shared/dialog.composable.ts +0 -41
  160. package/src/shared/drag.constants.ts +0 -19
  161. package/src/shared/experimental.constants.ts +0 -1
  162. package/src/shared/http-client.ts +0 -162
  163. package/src/shared/noun-adjectives.data.ts +0 -24
  164. package/src/shared/printer-grid.constants.ts +0 -5
  165. package/src/shared/printer-state.constants.ts +0 -194
  166. package/src/shared/snackbar.composable.ts +0 -66
  167. package/src/shared/socketio.service.ts +0 -104
  168. package/src/store/auth.store.ts +0 -255
  169. package/src/store/connection.store.ts +0 -66
  170. package/src/store/dialog.store.ts +0 -114
  171. package/src/store/features.store.ts +0 -57
  172. package/src/store/floor.store.ts +0 -173
  173. package/src/store/grid.store.ts +0 -10
  174. package/src/store/index.ts +0 -4
  175. package/src/store/printer-state.store.ts +0 -246
  176. package/src/store/printer.store.ts +0 -236
  177. package/src/store/profile.store.ts +0 -25
  178. package/src/store/settings.store.ts +0 -64
  179. package/src/store/test-printer.store.ts +0 -70
  180. package/src/store/uploads.store.ts +0 -75
  181. package/src/styles/README.md +0 -3
  182. package/src/styles/settings.scss +0 -10
  183. package/src/types/global.d.ts +0 -15
  184. package/src/utils/array.utils.ts +0 -15
  185. package/src/utils/date.utils.ts +0 -5
  186. package/src/utils/download-file.util.ts +0 -25
  187. package/src/utils/error.utils.ts +0 -3
  188. package/src/utils/file-size.util.ts +0 -11
  189. package/src/utils/id.type.ts +0 -1
  190. package/src/utils/sentry.util.ts +0 -8
  191. package/src/utils/test.util.ts +0 -30
  192. package/src/utils/time.utils.ts +0 -2
  193. package/src/utils/uploads-state.utils.ts +0 -58
  194. package/src/utils/validation.utils.ts +0 -14
  195. package/src/vite-env.d.ts +0 -7
  196. package/test/setup-axios-mock.ts +0 -15
  197. /package/{src/assets/logo.png → dist/assets/logo-CJVdjy51.png} +0 -0
  198. /package/{src/assets → dist/img/icons}/android-chrome-192x192.png +0 -0
@@ -1,139 +0,0 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- // @ts-nocheck
4
- // noinspection JSUnusedGlobalSymbols
5
- // Generated by unplugin-auto-import
6
- // biome-ignore lint: disable
7
- export {}
8
- declare global {
9
- const EffectScope: typeof import('vue')['EffectScope']
10
- const computed: typeof import('vue')['computed']
11
- const createApp: typeof import('vue')['createApp']
12
- const customRef: typeof import('vue')['customRef']
13
- const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
14
- const defineComponent: typeof import('vue')['defineComponent']
15
- const effectScope: typeof import('vue')['effectScope']
16
- const getCurrentInstance: typeof import('vue')['getCurrentInstance']
17
- const getCurrentScope: typeof import('vue')['getCurrentScope']
18
- const h: typeof import('vue')['h']
19
- const inject: typeof import('vue')['inject']
20
- const isProxy: typeof import('vue')['isProxy']
21
- const isReactive: typeof import('vue')['isReactive']
22
- const isReadonly: typeof import('vue')['isReadonly']
23
- const isRef: typeof import('vue')['isRef']
24
- const markRaw: typeof import('vue')['markRaw']
25
- const nextTick: typeof import('vue')['nextTick']
26
- const onActivated: typeof import('vue')['onActivated']
27
- const onBeforeMount: typeof import('vue')['onBeforeMount']
28
- const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
29
- const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
30
- const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
31
- const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
32
- const onDeactivated: typeof import('vue')['onDeactivated']
33
- const onErrorCaptured: typeof import('vue')['onErrorCaptured']
34
- const onMounted: typeof import('vue')['onMounted']
35
- const onRenderTracked: typeof import('vue')['onRenderTracked']
36
- const onRenderTriggered: typeof import('vue')['onRenderTriggered']
37
- const onScopeDispose: typeof import('vue')['onScopeDispose']
38
- const onServerPrefetch: typeof import('vue')['onServerPrefetch']
39
- const onUnmounted: typeof import('vue')['onUnmounted']
40
- const onUpdated: typeof import('vue')['onUpdated']
41
- const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
42
- const provide: typeof import('vue')['provide']
43
- const reactive: typeof import('vue')['reactive']
44
- const readonly: typeof import('vue')['readonly']
45
- const ref: typeof import('vue')['ref']
46
- const resolveComponent: typeof import('vue')['resolveComponent']
47
- const shallowReactive: typeof import('vue')['shallowReactive']
48
- const shallowReadonly: typeof import('vue')['shallowReadonly']
49
- const shallowRef: typeof import('vue')['shallowRef']
50
- const toRaw: typeof import('vue')['toRaw']
51
- const toRef: typeof import('vue')['toRef']
52
- const toRefs: typeof import('vue')['toRefs']
53
- const toValue: typeof import('vue')['toValue']
54
- const triggerRef: typeof import('vue')['triggerRef']
55
- const unref: typeof import('vue')['unref']
56
- const useAttrs: typeof import('vue')['useAttrs']
57
- const useCssModule: typeof import('vue')['useCssModule']
58
- const useCssVars: typeof import('vue')['useCssVars']
59
- const useId: typeof import('vue')['useId']
60
- const useLink: typeof import('vue-router')['useLink']
61
- const useModel: typeof import('vue')['useModel']
62
- const useRoute: typeof import('vue-router/auto')['useRoute']
63
- const useRouter: typeof import('vue-router/auto')['useRouter']
64
- const useSlots: typeof import('vue')['useSlots']
65
- const useTemplateRef: typeof import('vue')['useTemplateRef']
66
- const watch: typeof import('vue')['watch']
67
- const watchEffect: typeof import('vue')['watchEffect']
68
- const watchPostEffect: typeof import('vue')['watchPostEffect']
69
- const watchSyncEffect: typeof import('vue')['watchSyncEffect']
70
- }
71
- // for type re-export
72
- declare global {
73
- // @ts-ignore
74
- export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
75
- import('vue')
76
- }
77
- // for vue template auto import
78
- import { UnwrapRef } from 'vue'
79
- declare module 'vue' {
80
- interface GlobalComponents {}
81
- interface ComponentCustomProperties {
82
- readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
83
- readonly computed: UnwrapRef<typeof import('vue')['computed']>
84
- readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
85
- readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
86
- readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
87
- readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
88
- readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
89
- readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
90
- readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
91
- readonly h: UnwrapRef<typeof import('vue')['h']>
92
- readonly inject: UnwrapRef<typeof import('vue')['inject']>
93
- readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
94
- readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
95
- readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
96
- readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
97
- readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
98
- readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
99
- readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
100
- readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
101
- readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
102
- readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
103
- readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
104
- readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
105
- readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
106
- readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
107
- readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
108
- readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
109
- readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
110
- readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
111
- readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
112
- readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
113
- readonly provide: UnwrapRef<typeof import('vue')['provide']>
114
- readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
115
- readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
116
- readonly ref: UnwrapRef<typeof import('vue')['ref']>
117
- readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
118
- readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
119
- readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
120
- readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
121
- readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
122
- readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
123
- readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
124
- readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
125
- readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
126
- readonly unref: UnwrapRef<typeof import('vue')['unref']>
127
- readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
128
- readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
129
- readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
130
- readonly useId: UnwrapRef<typeof import('vue')['useId']>
131
- readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
132
- readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
133
- readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
134
- readonly watch: UnwrapRef<typeof import('vue')['watch']>
135
- readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
136
- readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
137
- readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
138
- }
139
- }
@@ -1,39 +0,0 @@
1
- import { BaseService } from './base.service'
2
- import { VersionModel } from '@/models/server/version.model'
3
- import { FeaturesModel } from '@/models/server/features.model'
4
- import { IClientReleases } from '@/models/server/client-releases.model'
5
- import { getHttpClient } from '@/shared/http-client'
6
- import { GithubRateLimit } from '@/models/server/github-rate-limit.model'
7
-
8
- export class AppService extends BaseService {
9
- static async updateClientDistGithub(
10
- version?: string,
11
- allowDowngrade?: boolean
12
- ) {
13
- return await this.post('api/server/update-client-bundle-github', {
14
- downloadRelease: version,
15
- allowDowngrade
16
- })
17
- }
18
-
19
- static async getGithubRateLimit() {
20
- return (await this.get('api/server/github-rate-limit')) as GithubRateLimit
21
- }
22
-
23
- static async getClientReleases() {
24
- return (await this.get('api/server/client-releases')) as IClientReleases
25
- }
26
-
27
- static async getVersion() {
28
- return (await this.get('api/version')) as VersionModel
29
- }
30
-
31
- static async getFeatures() {
32
- return (await this.get('api/features')) as FeaturesModel
33
- }
34
-
35
- static async test() {
36
- const httpClient = await getHttpClient(false, false)
37
- return (await httpClient.get('api/test')) as { message: string }
38
- }
39
- }
@@ -1,56 +0,0 @@
1
- import { getHttpClient } from '@/shared/http-client'
2
- import { WizardSettingsDto } from '@/models/settings/settings.model'
3
-
4
- export interface Tokens {
5
- token: string
6
- refreshToken: string
7
- }
8
-
9
- export interface LoginRequiredResponse {
10
- loginRequired: boolean
11
- registration: boolean
12
- wizardState: WizardSettingsDto
13
- isDemoMode: boolean
14
- }
15
-
16
- export class AuthService {
17
- static async getLoginRequired() {
18
- const httpClient = await getHttpClient(false, false)
19
- return await httpClient.get<LoginRequiredResponse>(
20
- 'api/auth/login-required'
21
- )
22
- }
23
-
24
- static async postLogin(username: string, password: string) {
25
- const httpClient = await getHttpClient(false, false)
26
- return await httpClient.post<Tokens>('api/auth/login', {
27
- username,
28
- password
29
- })
30
- }
31
-
32
- static async logout() {
33
- const httpClient = await getHttpClient(true, false)
34
- return await httpClient.post('api/auth/logout')
35
- }
36
-
37
- static async refreshLogin(refreshToken: string) {
38
- const httpClient = await getHttpClient(false, false)
39
- return await httpClient.post<{
40
- token: string
41
- }>('api/auth/refresh', { refreshToken })
42
- }
43
-
44
- static async verifyLogin() {
45
- const httpClient = await getHttpClient(true, false)
46
- return await httpClient.post('api/auth/verify')
47
- }
48
-
49
- static async registerAccount(username: string, password: string) {
50
- const httpClient = await getHttpClient(true, false)
51
- return await httpClient.post('api/auth/register', {
52
- username,
53
- password
54
- })
55
- }
56
- }
@@ -1,57 +0,0 @@
1
- import { AxiosRequestConfig } from 'axios'
2
- import { getHttpClient } from '@/shared/http-client'
3
-
4
- export class BaseService {
5
- protected static async get<R>(path: string) {
6
- const httpClient = await getHttpClient(true)
7
- const response = await httpClient.get<R>(path)
8
- return response.data
9
- }
10
-
11
- protected static async put<T>(path: string, body?: any) {
12
- const httpClient = await getHttpClient(true)
13
- const response = await httpClient.put<T>(path, body)
14
- return response.data
15
- }
16
-
17
- protected static async post<T>(path: string, body?: any) {
18
- const httpClient = await getHttpClient(true)
19
- const response = await httpClient.post<T>(path, body)
20
- return response.data
21
- }
22
-
23
- protected static async postUpload<FormData>(
24
- path: string,
25
- formData: FormData,
26
- config: AxiosRequestConfig
27
- ) {
28
- const httpClient = await getHttpClient(true)
29
- return await httpClient.post(path, formData, config)
30
- }
31
-
32
- protected static async getDownload<T = ArrayBuffer>(uri: string, body?: any) {
33
- const httpClient = await getHttpClient(true)
34
- return await httpClient.request<T>({
35
- method: 'GET',
36
- url: uri,
37
- data: body,
38
- responseType: 'arraybuffer'
39
- })
40
- }
41
-
42
- protected static async delete<T>(path: string, body?: any) {
43
- const httpClient = await getHttpClient(true)
44
- const response = await httpClient.request<T>({
45
- url: path,
46
- method: 'delete',
47
- data: body
48
- })
49
- return response.data
50
- }
51
-
52
- protected static async patch<T>(path: string, body: any) {
53
- const httpClient = await getHttpClient(true)
54
- const response = await httpClient.patch<T>(path, body)
55
- return response.data
56
- }
57
- }
@@ -1,37 +0,0 @@
1
- import { BaseService } from './base.service'
2
- import { IdType } from '@/utils/id.type'
3
- import { ServerApi } from '@/backend/server.api'
4
- import { ReprintFileDto } from '@/models/batch/reprint.dto'
5
-
6
- export class BatchService extends BaseService {
7
- static async batchSettingsGet<T = any>(printerIds: IdType[]) {
8
- return await this.post<T>('api/batch/settings/get', { printerIds })
9
- }
10
-
11
- static async batchConnectUsb(printerIds: IdType[]) {
12
- return await this.post('api/batch/connect/usb', { printerIds })
13
- }
14
-
15
- static async batchConnectSocket(printerIds: IdType[]) {
16
- return await this.post('api/batch/connect/socket', { printerIds })
17
- }
18
-
19
- static async batchToggleEnabled(printerIds: IdType[], enabled: boolean) {
20
- return await this.post('api/batch/toggle-enabled', {
21
- printerIds,
22
- enabled
23
- })
24
- }
25
-
26
- static async batchGetLastPrintedFiles(printerIds: IdType[]) {
27
- const path = ServerApi.batchGetLastPrintedFilesRoute
28
- return await this.post<ReprintFileDto[]>(path, { printerIds })
29
- }
30
-
31
- static async batchReprintFiles(
32
- prints: { printerId: IdType; path: string }[]
33
- ) {
34
- const path = ServerApi.batchReprintFilesRoute
35
- return await this.post(path, { prints })
36
- }
37
- }
@@ -1,33 +0,0 @@
1
- import { BaseService } from './base.service'
2
- import {
3
- CameraStream,
4
- CreateCameraStreamDto
5
- } from '@/models/camera-streams/camera-stream'
6
-
7
- export class CameraStreamService extends BaseService {
8
- static async listCameraStreams() {
9
- return await this.get<CameraStream[]>('api/camera-stream/')
10
- }
11
-
12
- static async createCameraStream(cameraStreamDto: CreateCameraStreamDto) {
13
- return await this.post<CameraStream>('api/camera-stream/', cameraStreamDto)
14
- }
15
-
16
- static async getCameraStream(cameraStreamId: string | number) {
17
- return await this.get<CameraStream>(`api/camera-stream/${cameraStreamId}`)
18
- }
19
-
20
- static async updateCameraStream(
21
- cameraStreamId: string | number,
22
- cameraStreamDto: CreateCameraStreamDto
23
- ) {
24
- return await this.put<CameraStream>(
25
- `api/camera-stream/${cameraStreamId}`,
26
- cameraStreamDto
27
- )
28
- }
29
-
30
- static async deleteCameraStream(cameraStreamId: string | number) {
31
- return await this.delete(`api/camera-stream/${cameraStreamId}`)
32
- }
33
- }
@@ -1,11 +0,0 @@
1
- import { BaseService } from '@/backend/base.service'
2
- import { ServerApi } from '@/backend/server.api'
3
- import { IdType } from '@/utils/id.type'
4
-
5
- export class CustomGcodeService extends BaseService {
6
- static async postQuickStopM112Command(printerId: IdType) {
7
- const path = ServerApi.sendQuickStopM112Route(printerId)
8
-
9
- return await this.post(path)
10
- }
11
- }
@@ -1,168 +0,0 @@
1
- export type OctoPrintSettingsDto = {
2
- api: {
3
- allowCrossOrigin?: boolean
4
- key?: string
5
- }
6
- appearance: {
7
- closeModalsWithClick?: boolean
8
- color?: string
9
- colorIcon?: boolean
10
- colorTransparent?: boolean
11
- defaultLanguage?: string
12
- fuzzyTimes?: boolean
13
- name?: string
14
- showFahrenheitAlso?: boolean
15
- showInternalFilename?: boolean
16
- }
17
- devel: {
18
- pluginTimings?: boolean
19
- }
20
- feature: {
21
- autoUppercaseBlacklist?: Array<string>
22
- g90InfluencesExtruder?: boolean
23
- keyboardControl?: boolean
24
- modelSizeDetection?: boolean
25
- pollWatched?: boolean
26
- printCancelConfirmation?: boolean
27
- printStartConfirmation?: boolean
28
- sdSupport?: boolean
29
- temperatureGraph?: boolean
30
- }
31
- folder: {
32
- logs?: string
33
- timelapse?: string
34
- timelapseTmp?: string
35
- uploads?: string
36
- watched?: string
37
- }
38
- gcodeAnalysis: {
39
- runAt?: string
40
- }
41
- printer: {
42
- defaultExtrusionLength?: number
43
- }
44
- scripts: {
45
- gcode?: {
46
- afterPrintCancelled?: string
47
- 'snippets/disable_bed'?: string
48
- 'snippets/disable_hotends'?: string
49
- }
50
- }
51
- serial: {
52
- abortHeatupOnCancel?: boolean
53
- ackMax?: number
54
- additionalBaudrates?: Array<Record<string, any>>
55
- additionalPorts?: Array<Record<string, any>>
56
- alwaysSendChecksum?: boolean
57
- autoconnect?: boolean
58
- baudrate?: number
59
- baudrateOptions?: Array<number>
60
- blacklistedBaudrates?: Array<Record<string, any>>
61
- blacklistedPorts?: Array<Record<string, any>>
62
- blockWhileDwelling?: boolean
63
- blockedCommands?: Array<string>
64
- capAutoreportSdStatus?: boolean
65
- capAutoreportTemp?: boolean
66
- capBusyProtocol?: boolean
67
- capEmergencyParser?: boolean
68
- checksumRequiringCommands?: Array<string>
69
- disableSdPrintingDetection?: boolean
70
- disconnectOnErrors?: boolean
71
- emergencyCommands?: Array<string>
72
- exclusive?: boolean
73
- externalHeatupDetection?: boolean
74
- firmwareDetection?: boolean
75
- helloCommand?: string
76
- ignoreErrorsFromFirmware?: boolean
77
- ignoreIdenticalResends?: boolean
78
- log?: boolean
79
- logPositionOnCancel?: boolean
80
- logPositionOnPause?: boolean
81
- longRunningCommands?: Array<string>
82
- maxTimeoutsIdle?: number
83
- maxTimeoutsLong?: number
84
- maxTimeoutsPrinting?: number
85
- neverSendChecksum?: boolean
86
- notifySuppressedCommands?: string
87
- pausingCommands?: Array<string>
88
- port?: number
89
- portOptions?: Array<Record<string, any>>
90
- repetierTargetTemp?: boolean
91
- resendRatioStart?: number
92
- resendRatioThreshold?: number
93
- sanityCheckTools?: boolean
94
- sdAlwaysAvailable?: boolean
95
- sdRelativePath?: boolean
96
- sendM112OnError?: boolean
97
- supportResendsWithoutOk?: string
98
- swallowOkAfterResend?: boolean
99
- timeoutBaudrateDetectionPause?: number
100
- timeoutCommunication?: number
101
- timeoutCommunicationBusy?: number
102
- timeoutConnection?: number
103
- timeoutDetectionConsecutive?: number
104
- timeoutDetectionFirst?: number
105
- timeoutPositionLogWait?: number
106
- timeoutSdStatus?: number
107
- timeoutSdStatusAutoreport?: number
108
- timeoutTemperature?: number
109
- timeoutTemperatureAutoreport?: number
110
- timeoutTemperatureTargetSet?: number
111
- triggerOkForM29?: boolean
112
- useParityWorkaround?: string
113
- waitForStart?: boolean
114
- }
115
- server: {
116
- allowFraming?: boolean
117
- commands?: {
118
- serverRestartCommand?: string
119
- systemRestartCommand?: string
120
- systemShutdownCommand?: string
121
- }
122
- diskspace?: {
123
- critical?: number
124
- warning?: number
125
- }
126
- onlineCheck?: {
127
- enabled?: boolean
128
- host?: string
129
- interval?: number
130
- name?: string
131
- port?: number
132
- }
133
- pluginBlacklist?: {
134
- enabled?: boolean
135
- ttl?: number
136
- url?: string
137
- }
138
- }
139
- system: {
140
- actions?: Array<Record<string, any>>
141
- events?: Record<string, any>
142
- }
143
- temperature: {
144
- cutoff?: number
145
- profiles?: Array<Record<string, any>>
146
- sendAutomatically?: boolean
147
- sendAutomaticallyAfter?: number
148
- }
149
- terminalFilters?: Array<Record<string, any>>
150
- webcam: {
151
- bitrate?: string
152
- ffmpegPath?: string
153
- ffmpegThreads?: number
154
- ffmpegVideoCodec?: string
155
- flipH?: boolean
156
- flipV?: boolean
157
- rotate90?: boolean
158
- snapshotSslValidation?: boolean
159
- snapshotTimeout?: number
160
- snapshotUrl?: string
161
- streamRatio?: string
162
- streamTimeout?: number
163
- streamUrl?: string
164
- timelapseEnabled?: boolean
165
- watermark?: boolean
166
- webcamEnabled?: boolean
167
- }
168
- }
@@ -1,17 +0,0 @@
1
- import { BaseService } from '@/backend/base.service'
2
- import { ServerApi } from '@/backend/server.api'
3
-
4
- interface FirstTimeSetupData {
5
- loginRequired: boolean
6
- registration: boolean
7
- rootUsername: string
8
- rootPassword: string
9
- }
10
-
11
- export class FirstTimeSetupService extends BaseService {
12
- static async postFirstTimeSetup(data: FirstTimeSetupData) {
13
- const path = ServerApi.completeFirstTimeSetupRoute
14
-
15
- return await this.post(path, data)
16
- }
17
- }
@@ -1,84 +0,0 @@
1
- import { BaseService } from '@/backend/base.service'
2
- import { ServerApi } from '@/backend/server.api'
3
- import { newRandomNamePair } from '@/shared/noun-adjectives.data'
4
- import {
5
- FloorDto,
6
- getDefaultCreateFloor,
7
- PreCreateFloor
8
- } from '@/models/floors/floor.model'
9
- import { IdType } from '@/utils/id.type'
10
-
11
- export class FloorService extends BaseService {
12
- static convertPrinterFloorToCreateForm(
13
- printerFloor?: FloorDto
14
- ): PreCreateFloor {
15
- // Inverse transformation
16
- const newFormData = getDefaultCreateFloor()
17
-
18
- newFormData.id = printerFloor?.id
19
- newFormData.name = printerFloor?.name || newRandomNamePair()
20
- newFormData.printers = []
21
-
22
- newFormData.floor = (printerFloor?.floor || 1).toString()
23
-
24
- return newFormData
25
- }
26
-
27
- static convertCreateFormToFloor(formData: PreCreateFloor) {
28
- const modifiedData: any = { ...formData }
29
-
30
- // Fix the string properties to become int
31
- modifiedData.floor = parseInt(modifiedData.floor)
32
-
33
- if (Number.isNaN(modifiedData.floor)) {
34
- throw new Error('Floor number did not convert to number.')
35
- }
36
-
37
- return modifiedData as FloorDto
38
- }
39
-
40
- static async getFloors() {
41
- const path = `${ServerApi.floorRoute}/`
42
-
43
- return (await this.get<FloorDto[]>(path)) as FloorDto[]
44
- }
45
-
46
- static async createFloor(floor: FloorDto) {
47
- const path = `${ServerApi.floorRoute}/`
48
-
49
- return (await this.post(path, floor)) as FloorDto
50
- }
51
-
52
- static async updateFloorName(floorId: IdType, name: string) {
53
- const path = `${ServerApi.updatePrinterFloorNameRoute(floorId)}/`
54
-
55
- return (await this.patch(path, { name })) as FloorDto
56
- }
57
-
58
- static async updateFloorNumber(floorId: IdType, floor: number) {
59
- const path = `${ServerApi.updatePrinterFloorNumberRoute(floorId)}/`
60
-
61
- return (await this.patch(path, { floor })) as FloorDto
62
- }
63
-
64
- static async deleteFloor(floorId: IdType) {
65
- const path = `${ServerApi.getFloorRoute(floorId)}/`
66
-
67
- return await this.delete(path)
68
- }
69
-
70
- static async addPrinterToFloor(
71
- floorId: IdType,
72
- body: { printerId: IdType; x: number; y: number }
73
- ) {
74
- const path = `${ServerApi.addOrRemovePrinterFromFloorRoute(floorId)}/`
75
-
76
- return (await this.post(path, body)) as FloorDto
77
- }
78
-
79
- static async deletePrinterFromFloor(floorId: IdType, printerId: IdType) {
80
- const path = `${ServerApi.addOrRemovePrinterFromFloorRoute(floorId)}/`
81
-
82
- return (await this.delete(path, { printerId })) as FloorDto
83
- }
84
- }
@@ -1,4 +0,0 @@
1
- export * from './printer-file.service'
2
- export * from './printers.service'
3
- export * from './server.api'
4
- export * from './settings.service'
@@ -1,11 +0,0 @@
1
- import { BaseService } from '@/backend/base.service'
2
- import { ServerApi } from '@/backend/server.api'
3
- import { PrintCompletionsModel } from '@/models/print-completions/print-completions.model'
4
-
5
- export class PrintCompletionsService extends BaseService {
6
- static async getCompletions() {
7
- const path = `${ServerApi.printCompletionRoute}`
8
-
9
- return (await this.get(path)) as PrintCompletionsModel
10
- }
11
- }