@northern.tech/store 0.30.1 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/actions.d.cts +12 -6
  2. package/dist/actions.d.ts +12 -6
  3. package/dist/appSlice/constants.cjs +5 -0
  4. package/dist/appSlice/constants.cjs.map +1 -1
  5. package/dist/appSlice/constants.d.cts +1 -1
  6. package/dist/appSlice/constants.d.ts +1 -1
  7. package/dist/appSlice/constants.js +5 -0
  8. package/dist/appSlice/constants.js.map +1 -1
  9. package/dist/appSlice/index.d.cts +1 -1
  10. package/dist/appSlice/index.d.ts +1 -1
  11. package/dist/appSlice/mocks.d.cts +1 -1
  12. package/dist/appSlice/mocks.d.ts +1 -1
  13. package/dist/appSlice/selectors.d.cts +7 -7
  14. package/dist/appSlice/selectors.d.ts +7 -7
  15. package/dist/appSlice/thunks.d.cts +2 -2
  16. package/dist/appSlice/thunks.d.ts +2 -2
  17. package/dist/auth.d.cts +1 -1
  18. package/dist/auth.d.ts +1 -1
  19. package/dist/commonConstants.d.cts +1 -1
  20. package/dist/commonConstants.d.ts +1 -1
  21. package/dist/commonSelectors.d.cts +10 -10
  22. package/dist/commonSelectors.d.ts +10 -10
  23. package/dist/{constants-DPLHhjVN.d.cts → constants-BFTS6mge.d.cts} +6 -1
  24. package/dist/{constants-C5AU0mCY.d.ts → constants-BIIEMVoG.d.ts} +6 -1
  25. package/dist/{constants-MPLfugsi.d.cts → constants-BrGIx40B.d.cts} +3 -3
  26. package/dist/{constants-DrwXHsJ1.d.ts → constants-CjO3_FOH.d.ts} +3 -3
  27. package/dist/constants.cjs +1 -0
  28. package/dist/constants.d.cts +3 -3
  29. package/dist/constants.d.ts +3 -3
  30. package/dist/constants.js +2 -2
  31. package/dist/deploymentsSlice/selectors.d.cts +7 -7
  32. package/dist/deploymentsSlice/selectors.d.ts +7 -7
  33. package/dist/deploymentsSlice/thunks.d.cts +13 -13
  34. package/dist/deploymentsSlice/thunks.d.ts +13 -13
  35. package/dist/devicesSlice/constants.d.cts +1 -1
  36. package/dist/devicesSlice/constants.d.ts +1 -1
  37. package/dist/devicesSlice/index.d.cts +1 -1
  38. package/dist/devicesSlice/index.d.ts +1 -1
  39. package/dist/devicesSlice/selectors.d.cts +7 -7
  40. package/dist/devicesSlice/selectors.d.ts +7 -7
  41. package/dist/devicesSlice/thunks.d.cts +4 -4
  42. package/dist/devicesSlice/thunks.d.ts +4 -4
  43. package/dist/{index-Lz5JsJ6O.d.cts → index-B64X5ozM.d.cts} +2 -2
  44. package/dist/{index-4eaLEXy_.d.cts → index-BFlHWzjv.d.cts} +2 -2
  45. package/dist/{index-DqyY6oZ3.d.ts → index-BI9O8JWe.d.ts} +2 -2
  46. package/dist/{index-Bwx9jEiL.d.cts → index-BbaS7MzW.d.cts} +2 -2
  47. package/dist/{index-Dv3Hfxk_.d.ts → index-Bp1WpATs.d.ts} +2 -2
  48. package/dist/{index-DJSlDPRX.d.ts → index-C6wNUfiV.d.ts} +2 -2
  49. package/dist/{index-Cvkvcz4r.d.ts → index-CQo3yTUa.d.ts} +31 -5
  50. package/dist/{index-BEVkIiNa.d.cts → index-CT5hgXm9.d.cts} +2 -2
  51. package/dist/{index-CO-py5d4.d.ts → index-DUvrw_Ed.d.ts} +2 -2
  52. package/dist/{index-CTt-eIY8.d.cts → index-DwACbyUg.d.cts} +2 -2
  53. package/dist/{index-FyYBBeN-.d.cts → index-WXwgRjLt.d.cts} +31 -5
  54. package/dist/{index-DtePEQPT.d.ts → index-ez3oxfRo.d.ts} +2 -2
  55. package/dist/locationutils.cjs +3 -0
  56. package/dist/locationutils.cjs.map +1 -1
  57. package/dist/locationutils.d.cts +3 -2
  58. package/dist/locationutils.d.ts +3 -2
  59. package/dist/locationutils.js +3 -0
  60. package/dist/locationutils.js.map +1 -1
  61. package/dist/monitorSlice/constants.d.cts +1 -1
  62. package/dist/monitorSlice/constants.d.ts +1 -1
  63. package/dist/monitorSlice/index.d.cts +1 -1
  64. package/dist/monitorSlice/index.d.ts +1 -1
  65. package/dist/monitorSlice/mocks.d.cts +1 -1
  66. package/dist/monitorSlice/mocks.d.ts +1 -1
  67. package/dist/monitorSlice/selectors.d.cts +1 -1
  68. package/dist/monitorSlice/selectors.d.ts +1 -1
  69. package/dist/monitorSlice/thunks.d.cts +4 -4
  70. package/dist/monitorSlice/thunks.d.ts +4 -4
  71. package/dist/onboardingSlice/selectors.d.cts +1 -1
  72. package/dist/onboardingSlice/selectors.d.ts +1 -1
  73. package/dist/onboardingSlice/thunks.d.cts +2 -2
  74. package/dist/onboardingSlice/thunks.d.ts +2 -2
  75. package/dist/organizationSlice/index.d.cts +1 -1
  76. package/dist/organizationSlice/index.d.ts +1 -1
  77. package/dist/organizationSlice/mocks.d.cts +2 -2
  78. package/dist/organizationSlice/mocks.d.ts +2 -2
  79. package/dist/organizationSlice/selectors.d.cts +8 -8
  80. package/dist/organizationSlice/selectors.d.ts +8 -8
  81. package/dist/organizationSlice/thunks.d.cts +5 -5
  82. package/dist/organizationSlice/thunks.d.ts +5 -5
  83. package/dist/organizationSlice/types.d.cts +1 -1
  84. package/dist/organizationSlice/types.d.ts +1 -1
  85. package/dist/releasesSlice/index.cjs +37 -0
  86. package/dist/releasesSlice/index.cjs.map +1 -1
  87. package/dist/releasesSlice/index.d.cts +2 -2
  88. package/dist/releasesSlice/index.d.ts +2 -2
  89. package/dist/releasesSlice/index.js +37 -0
  90. package/dist/releasesSlice/index.js.map +1 -1
  91. package/dist/releasesSlice/mocks.cjs +34 -0
  92. package/dist/releasesSlice/mocks.cjs.map +1 -1
  93. package/dist/releasesSlice/mocks.d.cts +43 -0
  94. package/dist/releasesSlice/mocks.d.ts +43 -0
  95. package/dist/releasesSlice/mocks.js +34 -0
  96. package/dist/releasesSlice/mocks.js.map +1 -1
  97. package/dist/releasesSlice/selectors.cjs +22 -0
  98. package/dist/releasesSlice/selectors.cjs.map +1 -1
  99. package/dist/releasesSlice/selectors.d.cts +161 -9
  100. package/dist/releasesSlice/selectors.d.ts +161 -9
  101. package/dist/releasesSlice/selectors.js +16 -1
  102. package/dist/releasesSlice/selectors.js.map +1 -1
  103. package/dist/releasesSlice/thunks.cjs +89 -0
  104. package/dist/releasesSlice/thunks.cjs.map +1 -1
  105. package/dist/releasesSlice/thunks.d.cts +56 -6
  106. package/dist/releasesSlice/thunks.d.ts +56 -6
  107. package/dist/releasesSlice/thunks.js +88 -3
  108. package/dist/releasesSlice/thunks.js.map +1 -1
  109. package/dist/selectors.cjs +7 -0
  110. package/dist/selectors.d.cts +2 -2
  111. package/dist/selectors.d.ts +2 -2
  112. package/dist/selectors.js +2 -2
  113. package/dist/{store-BQxOSRC1.d.ts → store-Boqp1x2t.d.ts} +7 -7
  114. package/dist/{store-BiIA0r0A.d.cts → store-NOBz-rVZ.d.cts} +7 -7
  115. package/dist/store.d.cts +2 -2
  116. package/dist/store.d.ts +2 -2
  117. package/dist/storehooks.d.cts +14 -14
  118. package/dist/storehooks.d.ts +14 -14
  119. package/dist/thunks.cjs +55 -9
  120. package/dist/thunks.cjs.map +1 -1
  121. package/dist/thunks.d.cts +2 -2
  122. package/dist/thunks.d.ts +2 -2
  123. package/dist/thunks.js +54 -12
  124. package/dist/thunks.js.map +1 -1
  125. package/dist/{types-B2NRQLFw.d.ts → types-BPyM8Inu.d.ts} +3 -3
  126. package/dist/{types-ClEfo0dK.d.cts → types-COdPU2QQ.d.cts} +3 -3
  127. package/dist/usersSlice/index.d.cts +1 -1
  128. package/dist/usersSlice/index.d.ts +1 -1
  129. package/dist/usersSlice/mocks.d.cts +1 -1
  130. package/dist/usersSlice/mocks.d.ts +1 -1
  131. package/dist/usersSlice/selectors.d.cts +7 -7
  132. package/dist/usersSlice/selectors.d.ts +7 -7
  133. package/dist/usersSlice/thunks.d.cts +79 -79
  134. package/dist/usersSlice/thunks.d.ts +79 -79
  135. package/dist/{utils-DNnSR4S_.d.ts → utils-CHBWS_tH.d.ts} +6 -5
  136. package/dist/{utils-B4I595rf.d.cts → utils-Do9z5TL1.d.cts} +6 -5
  137. package/dist/utils.cjs +2 -0
  138. package/dist/utils.cjs.map +1 -1
  139. package/dist/utils.d.cts +2 -2
  140. package/dist/utils.d.ts +2 -2
  141. package/dist/utils.js +2 -1
  142. package/dist/utils.js.map +1 -1
  143. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"thunks.js","names":["storeActions","GeneralApi","uuid"],"sources":["../../src/releasesSlice/thunks.ts"],"sourcesContent":["// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type {\n ArtifactLink,\n ArtifactUpdateV1,\n DeltaJobDetailsItem,\n DeltaJobsListItem,\n DeviceInventory,\n ReleaseUpdate,\n ReleaseV1,\n ReleaseV2,\n Tags,\n UpdateTypes\n} from '@northern.tech/types/MenderTypes';\nimport { customSort, deepCompare, duplicateFilter, extractSoftwareItem } from '@northern.tech/utils/helpers';\nimport type { AxiosResponse } from 'axios';\nimport { isCancel } from 'axios';\nimport { v4 as uuid } from 'uuid';\n\nimport type { Artifact, Release, ReleaseSliceType, ReleasesList } from '.';\nimport { actions, sliceName } from '.';\nimport storeActions from '../actions';\nimport GeneralApi from '../api/general-api';\nimport {\n DEVICE_LIST_DEFAULTS,\n SORTING_OPTIONS,\n TIMEOUTS,\n deploymentsApiUrl,\n deploymentsApiUrlV2,\n emptyFilter,\n headerNames,\n inventoryApiUrlV2\n} from '../constants';\nimport type { SortOptions } from '../constants';\nimport { formatReleases } from '../locationutils';\nimport type { AppDispatch } from '../store';\nimport { commonErrorFallback, commonErrorHandler, createAppAsyncThunk } from '../store';\nimport { convertDeviceListStateToFilters, progress } from '../utils';\nimport { ARTIFACT_GENERATION_TYPE } from './constants';\nimport { getReleasesById } from './selectors';\n\nconst { setSnackbar, initUpload, uploadProgress, cleanUpUpload } = storeActions;\nconst { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;\n\nconst sortingDefaults = { direction: SORTING_OPTIONS.desc, key: 'modified' };\n\ntype ReceivedRelease = ReleaseV1 & ReleaseV2;\nconst flattenRelease = (release: ReceivedRelease, stateRelease: Release): Release => {\n const updatedArtifacts = release.artifacts?.sort(customSort(true, 'modified')) || [];\n const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce<{ artifacts: Artifact[]; deviceTypes: string[]; modified: undefined | string }>(\n (accu, item) => {\n accu.deviceTypes.push(...item.device_types_compatible);\n const stateArtifact = stateRelease.artifacts?.find(releaseArtifact => releaseArtifact.id === item.id) || {};\n accu.modified = accu.modified ? accu.modified : item.modified;\n accu.artifacts.push({\n ...stateArtifact,\n ...item\n });\n return accu;\n },\n { artifacts: [], deviceTypes: [], modified: undefined }\n );\n return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(duplicateFilter), modified };\n};\n\nconst reduceReceivedReleases = (releases: ReceivedRelease[], stateReleasesById: Record<string, Release>) =>\n releases.reduce<Record<string, Release>>((accu, release) => {\n const name = (release.name ?? release.Name)!;\n const stateRelease = stateReleasesById[name] || {};\n accu[name] = flattenRelease(release, stateRelease);\n return accu;\n }, {});\n\nconst findArtifactIndexInRelease = (releases: Record<string, Release>, id: string) =>\n Object.values(releases).reduce<{ index: number; release: Release | null }>(\n (accu, item) => {\n const index = item.artifacts?.findIndex(releaseArtifact => releaseArtifact.id === id) ?? -1;\n if (index > -1) {\n accu = { release: item, index };\n }\n return accu;\n },\n { release: null, index: -1 }\n );\n\n/* Artifacts */\nexport const getArtifactInstallCount = createAppAsyncThunk(`${sliceName}/getArtifactInstallCount`, (id: string, { dispatch, getState }) => {\n const { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);\n if (!release || index === -1) {\n return;\n }\n const releaseArtifacts = [...release.artifacts];\n const artifact = releaseArtifacts[index];\n const { key, name, version } = extractSoftwareItem(artifact.artifact_provides) ?? {};\n const attribute = `${key}${name ? `.${name}` : ''}.version`;\n const { filterTerms } = convertDeviceListStateToFilters({\n filters: [{ ...emptyFilter, key: attribute, value: version!, scope: 'inventory' }]\n });\n return GeneralApi.post<DeviceInventory[]>(`${inventoryApiUrlV2}/filters/search`, {\n page: 1,\n per_page: 1,\n filters: filterTerms,\n attributes: [{ scope: 'identity', attribute: 'status' }]\n })\n .catch(err => commonErrorHandler(err, `Retrieving artifact installation count failed:`, dispatch, commonErrorFallback))\n .then(({ headers }) => {\n const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);\n const index = foundRelease.index;\n let release = foundRelease.release;\n if (!release || index === -1) {\n return;\n }\n const installCount = Number(headers[headerNames.total]);\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts[index] = { ...releaseArtifacts[index], installCount };\n release = {\n ...release,\n artifacts: releaseArtifacts\n };\n return dispatch(actions.receiveRelease(release));\n });\n});\n\nexport const getArtifactUrl = createAppAsyncThunk(`${sliceName}/getArtifactUrl`, async (id: string, { dispatch, getState }) => {\n const response = await GeneralApi.get<ArtifactLink>(`${deploymentsApiUrl}/artifacts/${id}/download`);\n const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);\n const index = foundRelease.index;\n let release = foundRelease.release;\n if (!release || index === -1) {\n return dispatch(getReleases());\n }\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts[index] = {\n ...releaseArtifacts[index],\n url: response.data.uri\n };\n release = {\n ...release,\n artifacts: releaseArtifacts\n };\n await dispatch(actions.receiveRelease(release));\n return response.data.uri;\n});\n\nconst pollLocation = async (location, attempt = 1, maxAttempts = 5, delay = TIMEOUTS.oneSecond) => {\n try {\n await GeneralApi.get(location);\n return Promise.resolve();\n } catch {\n if (attempt >= maxAttempts) {\n throw new Error(`Couldn't get ${location} after ${maxAttempts} attempts`);\n }\n await new Promise(resolve => setTimeout(resolve, delay));\n return pollLocation(location, attempt + 1, maxAttempts, delay);\n }\n};\n\ntype ArtifactPayload = {\n file: File;\n meta: {\n args?: {\n dest_dir: string;\n filename: string;\n software_filesystem: string;\n software_name: string;\n software_version: string;\n };\n description: string;\n device_types_compatible?: string[];\n name?: string;\n };\n};\nexport const createArtifact = createAppAsyncThunk(`${sliceName}/createArtifact`, ({ file, meta }: ArtifactPayload, { dispatch }) => {\n const formData = Object.entries(meta).reduce((accu, [key, value]) => {\n if (Array.isArray(value)) {\n accu.append(key, value.join(','));\n } else if (value instanceof Object) {\n accu.append(key, JSON.stringify(value));\n } else {\n accu.append(key, value);\n }\n return accu;\n }, new FormData());\n formData.append('type', ARTIFACT_GENERATION_TYPE.SINGLE_FILE);\n formData.append('file', file);\n const uploadId = uuid();\n const cancelSource = new AbortController();\n return Promise.all([\n dispatch(setSnackbar('Generating artifact')),\n dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),\n GeneralApi.upload(\n `${deploymentsApiUrl}/artifacts/generate`,\n formData,\n e => dispatch(uploadProgress({ id: uploadId, progress: progress(e) })),\n cancelSource.signal\n )\n ])\n .then(tasks => {\n const generateResponse = tasks[tasks.length - 1] as AxiosResponse;\n const generateLocation = generateResponse.headers[headerNames.location] as string;\n const location = generateLocation.replace('/generate', '');\n return pollLocation(location);\n })\n .then(() =>\n Promise.all([\n dispatch(getReleases()),\n dispatch(selectRelease(meta.name!)),\n dispatch(setSnackbar({ message: 'Upload successful', autoHideDuration: TIMEOUTS.fiveSeconds }))\n ])\n )\n .catch(err => {\n if (isCancel(err)) {\n return dispatch(setSnackbar({ message: 'The artifact generation has been cancelled', autoHideDuration: TIMEOUTS.fiveSeconds }));\n }\n return commonErrorHandler(err, `Artifact couldn't be generated.`, dispatch);\n })\n .finally(() => dispatch(cleanUpUpload(uploadId)));\n});\n\nexport const uploadArtifact = createAppAsyncThunk(`${sliceName}/uploadArtifact`, ({ file, meta }: ArtifactPayload, { dispatch }) => {\n const formData = new FormData();\n formData.append('size', file.size.toString());\n formData.append('description', meta.description);\n formData.append('artifact', file);\n const uploadId = uuid();\n const cancelSource = new AbortController();\n return Promise.all([\n dispatch(setSnackbar('Uploading artifact')),\n dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),\n GeneralApi.upload(`${deploymentsApiUrl}/artifacts`, formData, e => dispatch(uploadProgress({ id: uploadId, progress: progress(e) })), cancelSource.signal)\n ])\n .then(() => {\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [\n Promise.resolve(dispatch(setSnackbar({ message: 'Upload successful', autoHideDuration: TIMEOUTS.fiveSeconds }))),\n dispatch(getReleases())\n ];\n if (meta.name) {\n tasks.push(dispatch(selectRelease(meta.name)));\n }\n return Promise.all(tasks);\n })\n .catch(err => {\n if (isCancel(err)) {\n return dispatch(setSnackbar({ message: 'The upload has been cancelled', autoHideDuration: TIMEOUTS.fiveSeconds }));\n }\n return commonErrorHandler(err, `Artifact couldn't be uploaded.`, dispatch);\n })\n .finally(() => dispatch(cleanUpUpload(uploadId)));\n});\n\nexport const cancelFileUpload = createAppAsyncThunk(`${sliceName}/cancelFileUpload`, (id: string, { dispatch, getState }) => {\n const { [id]: current } = getState().app.uploadsById;\n current.cancelSource.abort();\n return Promise.resolve(dispatch(cleanUpUpload(id)));\n});\n\nexport const editArtifact = createAppAsyncThunk(\n `${sliceName}/editArtifact`,\n async ({ id, body }: { body: ArtifactUpdateV1; id: string }, { dispatch, getState }) => {\n await GeneralApi.put(`${deploymentsApiUrl}/artifacts/${id}`, body).catch(err => commonErrorHandler(err, `Artifact details couldn't be updated.`, dispatch));\n const { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);\n if (!release || index === -1) {\n await dispatch(getReleases());\n return;\n }\n const updatedRelease = {\n ...release,\n artifacts: release.artifacts.map((artifact, i) => (i === index ? { ...artifact, description: body.description || '' } : artifact))\n };\n await Promise.all([\n dispatch(actions.receiveRelease(updatedRelease)),\n dispatch(setSnackbar({ message: 'Artifact details were updated successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })),\n dispatch(getRelease(release.name)),\n dispatch(selectRelease(release.name))\n ]);\n }\n);\n\nexport const removeArtifact = createAppAsyncThunk(`${sliceName}/removeArtifact`, async (id: string, { dispatch, getState }) => {\n await GeneralApi.delete(`${deploymentsApiUrl}/artifacts/${id}`).catch(err => commonErrorHandler(err, `Error removing artifact:`, dispatch));\n const state = getState();\n const { release, index } = findArtifactIndexInRelease(getReleasesById(state), id);\n if (!release || index === -1) {\n await dispatch(getReleases());\n return;\n }\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts.splice(index, 1);\n if (!releaseArtifacts.length) {\n const { releasesList } = state.releases;\n const releaseIds = releasesList.releaseIds.filter(id => release.name !== id);\n await Promise.all([\n dispatch(actions.removeRelease(release.name)),\n dispatch(\n setReleasesListState({\n releaseIds,\n searchTotal: releasesList.searchTerm ? releasesList.searchTotal - 1 : releasesList.searchTotal,\n total: releasesList.total - 1\n })\n )\n ]);\n return;\n }\n await Promise.all([\n dispatch(setSnackbar({ message: 'Artifact was removed', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })),\n dispatch(actions.receiveRelease(release))\n ]);\n});\n\nexport const removeRelease = createAppAsyncThunk(`${sliceName}/removeRelease`, (releaseId: string, { dispatch, getState }) =>\n Promise.all(getReleasesById(getState())[releaseId].artifacts.map(({ id }) => dispatch(removeArtifact(id)))).then(() => dispatch(selectRelease(null)))\n);\n\nexport const removeReleases = createAppAsyncThunk(`${sliceName}/removeReleases`, (releaseIds: string[], { dispatch, getState }) => {\n const deleteRequests = releaseIds.reduce<Promise<unknown>[]>((accu, releaseId) => {\n const releaseArtifacts = getReleasesById(getState())[releaseId].artifacts;\n accu.push(...releaseArtifacts.map(({ id }) => dispatch(removeArtifact(id)).unwrap()));\n return accu;\n }, []);\n return Promise.all(deleteRequests);\n});\n\nexport const selectRelease = createAppAsyncThunk(`${sliceName}/selectRelease`, (release: Release | string | null, { dispatch }) => {\n const name = (release && typeof release === 'object' ? release.name : release) || null;\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [Promise.resolve(dispatch(actions.selectedRelease(name)))];\n if (name) {\n tasks.push(dispatch(getRelease(name)));\n }\n return Promise.all(tasks);\n});\n\nexport const setReleasesListState = createAppAsyncThunk(\n `${sliceName}/setReleasesListState`,\n (selectionState: Partial<ReleasesList>, { dispatch, getState }) => {\n const currentState = getState().releases.releasesList;\n const nextState = {\n ...currentState,\n ...selectionState,\n sort: { ...currentState.sort, ...selectionState.sort } as SortOptions\n };\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: currentLoading, ...currentRequestState } = currentState;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: selectionLoading, ...selectionRequestState } = nextState;\n if (!deepCompare(currentRequestState, selectionRequestState)) {\n nextState.isLoading = true;\n tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));\n }\n if (\n !nextState.searchOnly &&\n (currentState.page !== nextState.page || currentState.perPage > nextState.perPage || !deepCompare(currentState.sort, nextState.sort))\n ) {\n nextState.selection = [];\n }\n tasks.push(Promise.resolve(dispatch(actions.setReleaseListState(nextState))));\n return Promise.all(tasks);\n }\n);\n\n/* Releases */\n\nconst releaseListRetrieval = (config: Partial<ReleasesList>) => {\n const { searchTerm = '', page = defaultPage, perPage = defaultPerPage, sort = sortingDefaults, selectedTags = [], type = '' } = config;\n const { key: attribute, direction } = sort;\n const filterQuery = formatReleases({ pageState: { searchTerm, selectedTags } });\n const updateType = type ? `update_type=${type}` : '';\n const sorting = attribute ? `sort=${attribute}:${direction}`.toLowerCase() : '';\n return GeneralApi.get<Array<Release>>(\n `${deploymentsApiUrlV2}/deployments/releases?${[`page=${page}`, `per_page=${perPage}`, filterQuery, updateType, sorting].filter(i => i).join('&')}`\n );\n};\n\nconst deductSearchState = (receivedReleases: Release[], config, total: number, state: ReleaseSliceType) => {\n let releaseListState = { ...state.releasesList };\n const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;\n const flattenedReleases = Object.values(receivedReleases).sort(customSort(sort.direction === SORTING_OPTIONS.desc, sort.key));\n const releaseIds = flattenedReleases.map(item => item.name);\n const isFiltering = !!(selectedTags.length || type || searchTerm);\n if (searchOnly) {\n releaseListState = { ...releaseListState, searchedIds: releaseIds };\n } else {\n releaseListState = {\n ...releaseListState,\n releaseIds,\n searchTotal: isFiltering ? total : state.releasesList.searchTotal,\n total: !isFiltering ? total : state.releasesList.total\n };\n }\n return releaseListState;\n};\n\nexport const getReleases = createAppAsyncThunk(`${sliceName}/getReleases`, (passedConfig: Partial<ReleasesList> | undefined = {}, { dispatch, getState }) => {\n const config = { ...getState().releases.releasesList, ...passedConfig };\n return releaseListRetrieval(config)\n .then(({ data: receivedReleases = [], headers = {} }) => {\n const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;\n const state = getState().releases;\n const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);\n const combinedReleases = { ...state.byId, ...flatReleases };\n const tasks: Promise<ReturnType<AppDispatch>>[] = [Promise.resolve(dispatch(actions.receiveReleases(combinedReleases)))];\n const releaseListState = deductSearchState(receivedReleases, config, total, state);\n tasks.push(Promise.resolve(dispatch(actions.setReleaseListState(releaseListState))));\n return Promise.all(tasks);\n })\n .catch(err => commonErrorHandler(err, `Please check your connection`, dispatch));\n});\n\nexport const getRelease = createAppAsyncThunk(`${sliceName}/getReleases`, async (name: string, { dispatch, getState }) => {\n const releaseResponse = await GeneralApi.get<ReceivedRelease>(`${deploymentsApiUrlV2}/deployments/releases/${name}`);\n const { data: release } = releaseResponse;\n if (release) {\n const stateRelease = getReleasesById(getState())[release.name!] || {};\n await dispatch(actions.receiveRelease(flattenRelease(release, stateRelease)));\n }\n return Promise.resolve(null);\n});\n\nexport const updateReleaseInfo = createAppAsyncThunk(\n `${sliceName}/updateReleaseInfo`,\n ({ name, info }: { info: ReleaseUpdate; name: string }, { dispatch, getState }) =>\n GeneralApi.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info)\n .catch(err => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch))\n .then(() =>\n Promise.all([\n dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),\n dispatch(setSnackbar({ message: 'Release details were updated successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' }))\n ])\n )\n);\n\nexport const setSingleReleaseTags = createAppAsyncThunk(\n `${sliceName}/setSingleReleaseTags`,\n ({ name, tags }: { name: string; tags: Tags }, { dispatch, getState }) =>\n GeneralApi.put(`${deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).then(() =>\n Promise.resolve(dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], name, tags })))\n )\n);\n\nexport const setReleaseTags = createAppAsyncThunk(`${sliceName}/setReleaseTags`, ({ name, tags = [] }: { name: string; tags: Tags }, { dispatch }) =>\n dispatch(setSingleReleaseTags({ name, tags }))\n .catch(err => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch))\n .then(() => Promise.resolve(dispatch(setSnackbar({ message: 'Release tags were set successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' }))))\n);\n\nexport const setReleasesTags = createAppAsyncThunk(\n `${sliceName}/setReleasesTags`,\n ({ releases, tags = [] }: { releases: Release[]; tags: Tags }, { dispatch }) => {\n const addRequests = releases.reduce<Promise<ReturnType<AppDispatch> | unknown>[]>((accu, release) => {\n accu.push(dispatch(setSingleReleaseTags({ name: release.name, tags: [...new Set([...(release.tags ? release.tags : []), ...tags])] })));\n return accu;\n }, []);\n return Promise.all(addRequests)\n .catch(err => commonErrorHandler(err, `Releases couldn't be tagged.`, dispatch))\n .then(() =>\n Promise.resolve(dispatch(setSnackbar({ message: 'Releases were tagged successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })))\n );\n }\n);\n\nexport const getExistingReleaseTags = createAppAsyncThunk(`${sliceName}/getReleaseTags`, (_, { dispatch }) =>\n GeneralApi.get<Tags>(`${deploymentsApiUrlV2}/releases/all/tags`)\n .catch(err => commonErrorHandler(err, `Existing release tags couldn't be retrieved.`, dispatch))\n .then(({ data: tags }) => Promise.resolve(dispatch(actions.receiveReleaseTags(tags))))\n);\n\nexport const getUpdateTypes = createAppAsyncThunk(`${sliceName}/getReleaseTypes`, (_, { dispatch }) =>\n GeneralApi.get<UpdateTypes>(`${deploymentsApiUrlV2}/releases/all/types`)\n .catch(err => commonErrorHandler(err, `Existing update types couldn't be retrieved.`, dispatch))\n .then(({ data: types }) => Promise.resolve(dispatch(actions.receiveReleaseTypes(types))))\n);\n\ninterface DeltaListingProps {\n page?: number;\n perPage?: number;\n sort?: SortOptions;\n}\nexport const getDeltaGenerationJobs = createAppAsyncThunk(`${sliceName}/getDeltaGenerationJobs`, (options: DeltaListingProps = {}, { dispatch }) => {\n const { page = defaultPage, perPage = defaultPerPage, sort = {} } = options;\n const { key: sortKey, direction: sortDirection } = sort as SortOptions;\n const sortParam = sortKey && sortDirection ? `&sort=${sortKey}:${sortDirection}` : '';\n return GeneralApi.get<DeltaJobsListItem[]>(`${deploymentsApiUrlV2}/deployments/releases/delta/jobs?page=${page}&per_page=${perPage}${sortParam}`)\n .then(({ data, headers }) => {\n const total = Number(headers[headerNames.total]) || data.length;\n const result = { jobs: data, total };\n return Promise.all([dispatch(actions.receivedDeltaJobs(result)), result]);\n })\n .catch(err => commonErrorHandler(err, 'There was an error retrieving delta generation jobs:', dispatch));\n});\n\nexport const getDeltaGenerationJobDetails = createAppAsyncThunk(`${sliceName}/getDeltaGenerationJobDetails`, (jobId, { dispatch }) =>\n GeneralApi.get<DeltaJobDetailsItem>(`${deploymentsApiUrlV2}/deployments/releases/delta/jobs/${jobId}`)\n .then(({ data }) => dispatch(actions.receivedDeltaJobDetails({ ...data, id: jobId })))\n .catch(err => commonErrorHandler(err, 'There was an error retrieving delta generation job details:', dispatch))\n);\n"],"mappings":";;;;;;;;;;;;;AAoDA,MAAM,EAAE,aAAa,YAAY,gBAAgB,kBAAkBA;AACnE,MAAM,EAAE,MAAM,aAAa,SAAS,mBAAmB;AAEvD,MAAM,kBAAkB;CAAE,WAAW,gBAAgB;CAAM,KAAK;CAAY;AAG5E,MAAM,kBAAkB,SAA0B,iBAAmC;CAEnF,MAAM,EAAE,WAAW,aAAa,cADP,QAAQ,WAAW,KAAK,WAAW,MAAM,WAAW,CAAC,IAAI,EAAE,EACtB,QAC3D,MAAM,SAAS;AACd,OAAK,YAAY,KAAK,GAAG,KAAK,wBAAwB;EACtD,MAAM,gBAAgB,aAAa,WAAW,MAAK,oBAAmB,gBAAgB,OAAO,KAAK,GAAG,IAAI,EAAE;AAC3G,OAAK,WAAW,KAAK,WAAW,KAAK,WAAW,KAAK;AACrD,OAAK,UAAU,KAAK;GAClB,GAAG;GACH,GAAG;GACJ,CAAC;AACF,SAAO;IAET;EAAE,WAAW,EAAE;EAAE,aAAa,EAAE;EAAE,UAAU,KAAA;EAAW,CACxD;AACD,QAAO;EAAE,GAAG;EAAc,GAAG;EAAS;EAAW,yBAAyB,YAAY,OAAO,gBAAgB;EAAE;EAAU;;AAG3H,MAAM,0BAA0B,UAA6B,sBAC3D,SAAS,QAAiC,MAAM,YAAY;CAC1D,MAAM,OAAQ,QAAQ,QAAQ,QAAQ;AAEtC,MAAK,QAAQ,eAAe,SADP,kBAAkB,SAAS,EAAE,CACA;AAClD,QAAO;GACN,EAAE,CAAC;AAER,MAAM,8BAA8B,UAAmC,OACrE,OAAO,OAAO,SAAS,CAAC,QACrB,MAAM,SAAS;CACd,MAAM,QAAQ,KAAK,WAAW,WAAU,oBAAmB,gBAAgB,OAAO,GAAG,IAAI;AACzF,KAAI,QAAQ,GACV,QAAO;EAAE,SAAS;EAAM;EAAO;AAEjC,QAAO;GAET;CAAE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B;CACnD,MAAM,YAAY,WAAW,gBAAgB,SAAS,QAAQ,GAAG,kBAAkB;AACnF,QAAOA,IAAW,IAAyB,GAAG,oBAAoB,wCAAwC,KAAK,YAAY,UAAU,YAAY,CAC9I,MAAM,EAAE,MAAM,cAAc;EAE3B,MAAM,SAAS;GAAE,MAAM;GAAM,OADf,OAAO,QAAQ,YAAY,OAAO,IAAI,KAAK;GACrB;AACpC,SAAO,QAAQ,IAAI,CAAC,SAAS,QAAQ,kBAAkB,OAAO,CAAC,EAAE,OAAO,CAAC;GACzE,CACD,OAAM,QAAO,mBAAmB,KAAK,wDAAwD,SAAS,CAAC;EAC1G;AAEF,MAAa,+BAA+B,oBAAoB,GAAG,UAAU,iCAAiC,OAAO,EAAE,eACrHA,IAAW,IAAyB,GAAG,oBAAoB,mCAAmC,QAAQ,CACnG,MAAM,EAAE,WAAW,SAAS,QAAQ,wBAAwB;CAAE,GAAG;CAAM,IAAI;CAAO,CAAC,CAAC,CAAC,CACrF,OAAM,QAAO,mBAAmB,KAAK,+DAA+D,SAAS,CAAC,CAClH"}
1
+ {"version":3,"file":"thunks.js","names":["storeActions","GeneralApi","uuid"],"sources":["../../src/releasesSlice/thunks.ts"],"sourcesContent":["// Copyright 2019 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport type {\n ArtifactLink,\n ArtifactUpdateV1,\n DeltaJobDetailsItem,\n DeltaJobsListItem,\n DeviceInventory,\n Manifest,\n ReleaseUpdate,\n ReleaseV1,\n ReleaseV2,\n Tags,\n UpdateTypes\n} from '@northern.tech/types/MenderTypes';\nimport { customSort, deepCompare, duplicateFilter, extractSoftwareItem } from '@northern.tech/utils/helpers';\nimport type { AxiosResponse } from 'axios';\nimport { isCancel } from 'axios';\nimport { v4 as uuid } from 'uuid';\n\nimport type { Artifact, ManifestsList, Release, ReleaseSliceType, ReleasesList } from '.';\nimport { actions, sliceName } from '.';\nimport storeActions from '../actions';\nimport GeneralApi from '../api/general-api';\nimport {\n DEVICE_LIST_DEFAULTS,\n SORTING_OPTIONS,\n TIMEOUTS,\n deploymentsApiUrl,\n deploymentsApiUrlV1alpha1,\n deploymentsApiUrlV2,\n emptyFilter,\n headerNames,\n inventoryApiUrlV2\n} from '../constants';\nimport type { SortOptions } from '../constants';\nimport { formatReleases } from '../locationutils';\nimport type { AppDispatch } from '../store';\nimport { commonErrorFallback, commonErrorHandler, createAppAsyncThunk } from '../store';\nimport { convertDeviceListStateToFilters, progress } from '../utils';\nimport { ARTIFACT_GENERATION_TYPE } from './constants';\nimport { getManifestsById, getReleasesById } from './selectors';\n\nconst { setSnackbar, initUpload, uploadProgress, cleanUpUpload } = storeActions;\nconst { page: defaultPage, perPage: defaultPerPage } = DEVICE_LIST_DEFAULTS;\n\nconst sortingDefaults = { direction: SORTING_OPTIONS.desc, key: 'modified' };\n\ntype ReceivedRelease = ReleaseV1 & ReleaseV2;\nconst flattenRelease = (release: ReceivedRelease, stateRelease: Release): Release => {\n const updatedArtifacts = release.artifacts?.sort(customSort(true, 'modified')) || [];\n const { artifacts, deviceTypes, modified } = updatedArtifacts.reduce<{ artifacts: Artifact[]; deviceTypes: string[]; modified: undefined | string }>(\n (accu, item) => {\n accu.deviceTypes.push(...item.device_types_compatible);\n const stateArtifact = stateRelease.artifacts?.find(releaseArtifact => releaseArtifact.id === item.id) || {};\n accu.modified = accu.modified ? accu.modified : item.modified;\n accu.artifacts.push({\n ...stateArtifact,\n ...item\n });\n return accu;\n },\n { artifacts: [], deviceTypes: [], modified: undefined }\n );\n return { ...stateRelease, ...release, artifacts, device_types_compatible: deviceTypes.filter(duplicateFilter), modified };\n};\n\nconst reduceReceivedReleases = (releases: ReceivedRelease[], stateReleasesById: Record<string, Release>) =>\n releases.reduce<Record<string, Release>>((accu, release) => {\n const name = (release.name ?? release.Name)!;\n const stateRelease = stateReleasesById[name] || {};\n accu[name] = flattenRelease(release, stateRelease);\n return accu;\n }, {});\n\nconst findArtifactIndexInRelease = (releases: Record<string, Release>, id: string) =>\n Object.values(releases).reduce<{ index: number; release: Release | null }>(\n (accu, item) => {\n const index = item.artifacts?.findIndex(releaseArtifact => releaseArtifact.id === id) ?? -1;\n if (index > -1) {\n accu = { release: item, index };\n }\n return accu;\n },\n { release: null, index: -1 }\n );\n\n/* Artifacts */\nexport const getArtifactInstallCount = createAppAsyncThunk(`${sliceName}/getArtifactInstallCount`, (id: string, { dispatch, getState }) => {\n const { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);\n if (!release || index === -1) {\n return;\n }\n const releaseArtifacts = [...release.artifacts];\n const artifact = releaseArtifacts[index];\n const { key, name, version } = extractSoftwareItem(artifact.artifact_provides) ?? {};\n const attribute = `${key}${name ? `.${name}` : ''}.version`;\n const { filterTerms } = convertDeviceListStateToFilters({\n filters: [{ ...emptyFilter, key: attribute, value: version!, scope: 'inventory' }]\n });\n return GeneralApi.post<DeviceInventory[]>(`${inventoryApiUrlV2}/filters/search`, {\n page: 1,\n per_page: 1,\n filters: filterTerms,\n attributes: [{ scope: 'identity', attribute: 'status' }]\n })\n .catch(err => commonErrorHandler(err, `Retrieving artifact installation count failed:`, dispatch, commonErrorFallback))\n .then(({ headers }) => {\n const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);\n const index = foundRelease.index;\n let release = foundRelease.release;\n if (!release || index === -1) {\n return;\n }\n const installCount = Number(headers[headerNames.total]);\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts[index] = { ...releaseArtifacts[index], installCount };\n release = {\n ...release,\n artifacts: releaseArtifacts\n };\n return dispatch(actions.receiveRelease(release));\n });\n});\n\nexport const getArtifactUrl = createAppAsyncThunk(`${sliceName}/getArtifactUrl`, async (id: string, { dispatch, getState }) => {\n const response = await GeneralApi.get<ArtifactLink>(`${deploymentsApiUrl}/artifacts/${id}/download`);\n const foundRelease = findArtifactIndexInRelease(getReleasesById(getState()), id);\n const index = foundRelease.index;\n let release = foundRelease.release;\n if (!release || index === -1) {\n return dispatch(getReleases());\n }\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts[index] = {\n ...releaseArtifacts[index],\n url: response.data.uri\n };\n release = {\n ...release,\n artifacts: releaseArtifacts\n };\n await dispatch(actions.receiveRelease(release));\n return response.data.uri;\n});\n\nconst pollLocation = async (location, attempt = 1, maxAttempts = 5, delay = TIMEOUTS.oneSecond) => {\n try {\n await GeneralApi.get(location);\n return Promise.resolve();\n } catch {\n if (attempt >= maxAttempts) {\n throw new Error(`Couldn't get ${location} after ${maxAttempts} attempts`);\n }\n await new Promise(resolve => setTimeout(resolve, delay));\n return pollLocation(location, attempt + 1, maxAttempts, delay);\n }\n};\n\ntype ArtifactPayload = {\n file: File;\n meta: {\n args?: {\n dest_dir: string;\n filename: string;\n software_filesystem: string;\n software_name: string;\n software_version: string;\n };\n description: string;\n device_types_compatible?: string[];\n name?: string;\n };\n};\nexport const createArtifact = createAppAsyncThunk(`${sliceName}/createArtifact`, ({ file, meta }: ArtifactPayload, { dispatch }) => {\n const formData = Object.entries(meta).reduce((accu, [key, value]) => {\n if (Array.isArray(value)) {\n accu.append(key, value.join(','));\n } else if (value instanceof Object) {\n accu.append(key, JSON.stringify(value));\n } else {\n accu.append(key, value);\n }\n return accu;\n }, new FormData());\n formData.append('type', ARTIFACT_GENERATION_TYPE.SINGLE_FILE);\n formData.append('file', file);\n const uploadId = uuid();\n const cancelSource = new AbortController();\n return Promise.all([\n dispatch(setSnackbar('Generating artifact')),\n dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),\n GeneralApi.upload(\n `${deploymentsApiUrl}/artifacts/generate`,\n formData,\n e => dispatch(uploadProgress({ id: uploadId, progress: progress(e) })),\n cancelSource.signal\n )\n ])\n .then(tasks => {\n const generateResponse = tasks[tasks.length - 1] as AxiosResponse;\n const generateLocation = generateResponse.headers[headerNames.location] as string;\n const location = generateLocation.replace('/generate', '');\n return pollLocation(location);\n })\n .then(() =>\n Promise.all([\n dispatch(getReleases()),\n dispatch(selectRelease(meta.name!)),\n dispatch(setSnackbar({ message: 'Upload successful', autoHideDuration: TIMEOUTS.fiveSeconds }))\n ])\n )\n .catch(err => {\n if (isCancel(err)) {\n return dispatch(setSnackbar({ message: 'The artifact generation has been cancelled', autoHideDuration: TIMEOUTS.fiveSeconds }));\n }\n return commonErrorHandler(err, `Artifact couldn't be generated.`, dispatch);\n })\n .finally(() => dispatch(cleanUpUpload(uploadId)));\n});\n\nexport const uploadArtifact = createAppAsyncThunk(`${sliceName}/uploadArtifact`, ({ file, meta }: ArtifactPayload, { dispatch }) => {\n const formData = new FormData();\n formData.append('size', file.size.toString());\n formData.append('description', meta.description);\n formData.append('artifact', file);\n const uploadId = uuid();\n const cancelSource = new AbortController();\n return Promise.all([\n dispatch(setSnackbar('Uploading artifact')),\n dispatch(initUpload({ id: uploadId, upload: { name: file.name, size: file.size, progress: 0, cancelSource } })),\n GeneralApi.upload(`${deploymentsApiUrl}/artifacts`, formData, e => dispatch(uploadProgress({ id: uploadId, progress: progress(e) })), cancelSource.signal)\n ])\n .then(() => {\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [\n Promise.resolve(dispatch(setSnackbar({ message: 'Upload successful', autoHideDuration: TIMEOUTS.fiveSeconds }))),\n dispatch(getReleases())\n ];\n if (meta.name) {\n tasks.push(dispatch(selectRelease(meta.name)));\n }\n return Promise.all(tasks);\n })\n .catch(err => {\n if (isCancel(err)) {\n return dispatch(setSnackbar({ message: 'The upload has been cancelled', autoHideDuration: TIMEOUTS.fiveSeconds }));\n }\n return commonErrorHandler(err, `Artifact couldn't be uploaded.`, dispatch);\n })\n .finally(() => dispatch(cleanUpUpload(uploadId)));\n});\n\nexport const cancelFileUpload = createAppAsyncThunk(`${sliceName}/cancelFileUpload`, (id: string, { dispatch, getState }) => {\n const { [id]: current } = getState().app.uploadsById;\n current.cancelSource.abort();\n return Promise.resolve(dispatch(cleanUpUpload(id)));\n});\n\nexport const editArtifact = createAppAsyncThunk(\n `${sliceName}/editArtifact`,\n async ({ id, body }: { body: ArtifactUpdateV1; id: string }, { dispatch, getState }) => {\n await GeneralApi.put(`${deploymentsApiUrl}/artifacts/${id}`, body).catch(err => commonErrorHandler(err, `Artifact details couldn't be updated.`, dispatch));\n const { release, index } = findArtifactIndexInRelease(getReleasesById(getState()), id);\n if (!release || index === -1) {\n await dispatch(getReleases());\n return;\n }\n const updatedRelease = {\n ...release,\n artifacts: release.artifacts.map((artifact, i) => (i === index ? { ...artifact, description: body.description || '' } : artifact))\n };\n await Promise.all([\n dispatch(actions.receiveRelease(updatedRelease)),\n dispatch(setSnackbar({ message: 'Artifact details were updated successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })),\n dispatch(getRelease(release.name)),\n dispatch(selectRelease(release.name))\n ]);\n }\n);\n\nexport const removeArtifact = createAppAsyncThunk(`${sliceName}/removeArtifact`, async (id: string, { dispatch, getState }) => {\n await GeneralApi.delete(`${deploymentsApiUrl}/artifacts/${id}`).catch(err => commonErrorHandler(err, `Error removing artifact:`, dispatch));\n const state = getState();\n const { release, index } = findArtifactIndexInRelease(getReleasesById(state), id);\n if (!release || index === -1) {\n await dispatch(getReleases());\n return;\n }\n const releaseArtifacts = [...release.artifacts];\n releaseArtifacts.splice(index, 1);\n if (!releaseArtifacts.length) {\n const { releasesList } = state.releases;\n const releaseIds = releasesList.releaseIds.filter(id => release.name !== id);\n await Promise.all([\n dispatch(actions.removeRelease(release.name)),\n dispatch(\n setReleasesListState({\n releaseIds,\n searchTotal: releasesList.searchTerm ? releasesList.searchTotal - 1 : releasesList.searchTotal,\n total: releasesList.total - 1\n })\n )\n ]);\n return;\n }\n await Promise.all([\n dispatch(setSnackbar({ message: 'Artifact was removed', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })),\n dispatch(actions.receiveRelease(release))\n ]);\n});\n\nexport const removeRelease = createAppAsyncThunk(`${sliceName}/removeRelease`, (releaseId: string, { dispatch, getState }) =>\n Promise.all(getReleasesById(getState())[releaseId].artifacts.map(({ id }) => dispatch(removeArtifact(id)))).then(() => dispatch(selectRelease(null)))\n);\n\nexport const removeReleases = createAppAsyncThunk(`${sliceName}/removeReleases`, (releaseIds: string[], { dispatch, getState }) => {\n const deleteRequests = releaseIds.reduce<Promise<unknown>[]>((accu, releaseId) => {\n const releaseArtifacts = getReleasesById(getState())[releaseId].artifacts;\n accu.push(...releaseArtifacts.map(({ id }) => dispatch(removeArtifact(id)).unwrap()));\n return accu;\n }, []);\n return Promise.all(deleteRequests);\n});\n\nexport const selectRelease = createAppAsyncThunk(`${sliceName}/selectRelease`, (release: Release | string | null, { dispatch }) => {\n const name = (release && typeof release === 'object' ? release.name : release) || null;\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [Promise.resolve(dispatch(actions.selectedRelease(name)))];\n if (name) {\n tasks.push(dispatch(getRelease(name)));\n }\n return Promise.all(tasks);\n});\n\nexport const setReleasesListState = createAppAsyncThunk(\n `${sliceName}/setReleasesListState`,\n (selectionState: Partial<ReleasesList>, { dispatch, getState }) => {\n const currentState = getState().releases.releasesList;\n const nextState = {\n ...currentState,\n ...selectionState,\n sort: { ...currentState.sort, ...selectionState.sort } as SortOptions\n };\n const tasks: Promise<ReturnType<AppDispatch> | unknown>[] = [];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: currentLoading, ...currentRequestState } = currentState;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: selectionLoading, ...selectionRequestState } = nextState;\n if (!deepCompare(currentRequestState, selectionRequestState)) {\n nextState.isLoading = true;\n tasks.push(dispatch(getReleases(nextState)).finally(() => dispatch(setReleasesListState({ isLoading: false }))));\n }\n if (\n !nextState.searchOnly &&\n (currentState.page !== nextState.page || currentState.perPage > nextState.perPage || !deepCompare(currentState.sort, nextState.sort))\n ) {\n nextState.selection = [];\n }\n tasks.push(Promise.resolve(dispatch(actions.setReleaseListState(nextState))));\n return Promise.all(tasks);\n }\n);\n\n/* Releases */\n\nconst releaseListRetrieval = (config: Partial<ReleasesList>) => {\n const { searchTerm = '', page = defaultPage, perPage = defaultPerPage, sort = sortingDefaults, selectedTags = [], type = '' } = config;\n const { key: attribute, direction } = sort;\n const filterQuery = formatReleases({ pageState: { searchTerm, selectedTags } });\n const updateType = type ? `update_type=${type}` : '';\n const sorting = attribute ? `sort=${attribute}:${direction}`.toLowerCase() : '';\n return GeneralApi.get<Array<Release>>(\n `${deploymentsApiUrlV2}/deployments/releases?${[`page=${page}`, `per_page=${perPage}`, filterQuery, updateType, sorting].filter(i => i).join('&')}`\n );\n};\n\nconst deductSearchState = (receivedReleases: Release[], config, total: number, state: ReleaseSliceType) => {\n let releaseListState = { ...state.releasesList };\n const { searchTerm, searchOnly, sort = {}, selectedTags = [], type } = config;\n const flattenedReleases = Object.values(receivedReleases).sort(customSort(sort.direction === SORTING_OPTIONS.desc, sort.key));\n const releaseIds = flattenedReleases.map(item => item.name);\n const isFiltering = !!(selectedTags.length || type || searchTerm);\n if (searchOnly) {\n releaseListState = { ...releaseListState, searchedIds: releaseIds };\n } else {\n releaseListState = {\n ...releaseListState,\n releaseIds,\n searchTotal: isFiltering ? total : state.releasesList.searchTotal,\n total: !isFiltering ? total : state.releasesList.total\n };\n }\n return releaseListState;\n};\n\nexport const getReleases = createAppAsyncThunk(`${sliceName}/getReleases`, (passedConfig: Partial<ReleasesList> | undefined = {}, { dispatch, getState }) => {\n const config = { ...getState().releases.releasesList, ...passedConfig };\n return releaseListRetrieval(config)\n .then(({ data: receivedReleases = [], headers = {} }) => {\n const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;\n const state = getState().releases;\n const flatReleases = reduceReceivedReleases(receivedReleases, state.byId);\n const combinedReleases = { ...state.byId, ...flatReleases };\n const tasks: Promise<ReturnType<AppDispatch>>[] = [Promise.resolve(dispatch(actions.receiveReleases(combinedReleases)))];\n const releaseListState = deductSearchState(receivedReleases, config, total, state);\n tasks.push(Promise.resolve(dispatch(actions.setReleaseListState(releaseListState))));\n return Promise.all(tasks);\n })\n .catch(err => commonErrorHandler(err, `Please check your connection`, dispatch));\n});\n\nexport const getRelease = createAppAsyncThunk(`${sliceName}/getReleases`, async (name: string, { dispatch, getState }) => {\n const releaseResponse = await GeneralApi.get<ReceivedRelease>(`${deploymentsApiUrlV2}/deployments/releases/${name}`);\n const { data: release } = releaseResponse;\n if (release) {\n const stateRelease = getReleasesById(getState())[release.name!] || {};\n await dispatch(actions.receiveRelease(flattenRelease(release, stateRelease)));\n }\n return Promise.resolve(null);\n});\n\nexport const updateReleaseInfo = createAppAsyncThunk(\n `${sliceName}/updateReleaseInfo`,\n ({ name, info }: { info: ReleaseUpdate; name: string }, { dispatch, getState }) =>\n GeneralApi.patch(`${deploymentsApiUrlV2}/deployments/releases/${name}`, info)\n .catch(err => commonErrorHandler(err, `Release details couldn't be updated.`, dispatch))\n .then(() =>\n Promise.all([\n dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], ...info, name })),\n dispatch(setSnackbar({ message: 'Release details were updated successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' }))\n ])\n )\n);\n\nexport const setSingleReleaseTags = createAppAsyncThunk(\n `${sliceName}/setSingleReleaseTags`,\n ({ name, tags }: { name: string; tags: Tags }, { dispatch, getState }) =>\n GeneralApi.put(`${deploymentsApiUrlV2}/deployments/releases/${name}/tags`, tags).then(() =>\n Promise.resolve(dispatch(actions.receiveRelease({ ...getReleasesById(getState())[name], name, tags })))\n )\n);\n\nexport const setReleaseTags = createAppAsyncThunk(`${sliceName}/setReleaseTags`, ({ name, tags = [] }: { name: string; tags: Tags }, { dispatch }) =>\n dispatch(setSingleReleaseTags({ name, tags }))\n .catch(err => commonErrorHandler(err, `Release tags couldn't be set.`, dispatch))\n .then(() => Promise.resolve(dispatch(setSnackbar({ message: 'Release tags were set successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' }))))\n);\n\nexport const setReleasesTags = createAppAsyncThunk(\n `${sliceName}/setReleasesTags`,\n ({ releases, tags = [] }: { releases: Release[]; tags: Tags }, { dispatch }) => {\n const addRequests = releases.reduce<Promise<ReturnType<AppDispatch> | unknown>[]>((accu, release) => {\n accu.push(dispatch(setSingleReleaseTags({ name: release.name, tags: [...new Set([...(release.tags ? release.tags : []), ...tags])] })));\n return accu;\n }, []);\n return Promise.all(addRequests)\n .catch(err => commonErrorHandler(err, `Releases couldn't be tagged.`, dispatch))\n .then(() =>\n Promise.resolve(dispatch(setSnackbar({ message: 'Releases were tagged successfully.', autoHideDuration: TIMEOUTS.fiveSeconds, action: '' })))\n );\n }\n);\n\nexport const getExistingReleaseTags = createAppAsyncThunk(`${sliceName}/getReleaseTags`, (_, { dispatch }) =>\n GeneralApi.get<Tags>(`${deploymentsApiUrlV2}/releases/all/tags`)\n .catch(err => commonErrorHandler(err, `Existing release tags couldn't be retrieved.`, dispatch))\n .then(({ data: tags }) => Promise.resolve(dispatch(actions.receiveReleaseTags(tags))))\n);\n\nexport const getUpdateTypes = createAppAsyncThunk(`${sliceName}/getReleaseTypes`, (_, { dispatch }) =>\n GeneralApi.get<UpdateTypes>(`${deploymentsApiUrlV2}/releases/all/types`)\n .catch(err => commonErrorHandler(err, `Existing update types couldn't be retrieved.`, dispatch))\n .then(({ data: types }) => Promise.resolve(dispatch(actions.receiveReleaseTypes(types))))\n);\n\ninterface DeltaListingProps {\n page?: number;\n perPage?: number;\n sort?: SortOptions;\n}\nexport const getDeltaGenerationJobs = createAppAsyncThunk(`${sliceName}/getDeltaGenerationJobs`, (options: DeltaListingProps = {}, { dispatch }) => {\n const { page = defaultPage, perPage = defaultPerPage, sort = {} } = options;\n const { key: sortKey, direction: sortDirection } = sort as SortOptions;\n const sortParam = sortKey && sortDirection ? `&sort=${sortKey}:${sortDirection}` : '';\n return GeneralApi.get<DeltaJobsListItem[]>(`${deploymentsApiUrlV2}/deployments/releases/delta/jobs?page=${page}&per_page=${perPage}${sortParam}`)\n .then(({ data, headers }) => {\n const total = Number(headers[headerNames.total]) || data.length;\n const result = { jobs: data, total };\n return Promise.all([dispatch(actions.receivedDeltaJobs(result)), result]);\n })\n .catch(err => commonErrorHandler(err, 'There was an error retrieving delta generation jobs:', dispatch));\n});\n\nexport const getDeltaGenerationJobDetails = createAppAsyncThunk(`${sliceName}/getDeltaGenerationJobDetails`, (jobId, { dispatch }) =>\n GeneralApi.get<DeltaJobDetailsItem>(`${deploymentsApiUrlV2}/deployments/releases/delta/jobs/${jobId}`)\n .then(({ data }) => dispatch(actions.receivedDeltaJobDetails({ ...data, id: jobId })))\n .catch(err => commonErrorHandler(err, 'There was an error retrieving delta generation job details:', dispatch))\n);\n\n/* Manifests */\n\nconst manifestSortingDefaults = { direction: SORTING_OPTIONS.desc, key: 'modified' };\n\nconst reduceReceivedManifests = (manifests: Manifest[]) =>\n manifests.reduce<Record<string, Manifest>>((accu, manifest) => {\n accu[manifest.name] = manifest;\n return accu;\n }, {});\n\nconst manifestListRetrieval = (config: Partial<ManifestsList>) => {\n const { searchTerm = '', page = defaultPage, perPage = defaultPerPage, sort = manifestSortingDefaults } = config;\n const { key: attribute, direction } = sort;\n const nameFilter = searchTerm ? `name=${encodeURIComponent(searchTerm)}` : '';\n const sorting = attribute ? `sort=${attribute}:${direction}`.toLowerCase() : '';\n return GeneralApi.get<Array<Manifest>>(\n `${deploymentsApiUrlV1alpha1}/manifests?${[`page=${page}`, `per_page=${perPage}`, nameFilter, sorting].filter(i => i).join('&')}`\n );\n};\n\nconst deductManifestSearchState = (receivedManifests: Manifest[], config, total: number, state: ReleaseSliceType) => {\n let manifestsListState = { ...state.manifestsList };\n const { searchTerm, sort = {} } = config;\n const sortedManifests = Object.values(receivedManifests).sort(customSort(sort.direction === SORTING_OPTIONS.desc, sort.key));\n const manifestIds = sortedManifests.map(item => item.name);\n const isFiltering = !!searchTerm;\n manifestsListState = {\n ...manifestsListState,\n manifestIds,\n searchTotal: isFiltering ? total : state.manifestsList.searchTotal,\n total: !isFiltering ? total : state.manifestsList.total\n };\n return manifestsListState;\n};\n\nexport const getManifests = createAppAsyncThunk(\n `${sliceName}/getManifests`,\n async (passedConfig: Partial<ManifestsList> | undefined = {}, { dispatch, getState }) => {\n const config = { ...getState().releases.manifestsList, ...passedConfig };\n const { data: receivedManifests = [], headers = {} } = await manifestListRetrieval(config).catch(err =>\n commonErrorHandler(err, `Please check your connection`, dispatch)\n );\n const total = headers[headerNames.total] ? Number(headers[headerNames.total]) : 0;\n const state = getState().releases;\n const flatManifests = reduceReceivedManifests(receivedManifests);\n const combinedManifests = { ...state.manifestsById, ...flatManifests };\n dispatch(actions.receiveManifests(combinedManifests));\n const manifestsListState = deductManifestSearchState(receivedManifests, config, total, state);\n dispatch(actions.setManifestsListState(manifestsListState));\n return combinedManifests;\n }\n);\n\nexport const getManifest = createAppAsyncThunk(`${sliceName}/getManifest`, async (name: string, { dispatch, getState }) => {\n const { data } = await GeneralApi.get<Manifest>(`${deploymentsApiUrlV1alpha1}/manifests/${name}`);\n if (!data) {\n return null;\n }\n const stateManifest = getManifestsById(getState())[data.name] || {};\n const manifest = { ...stateManifest, ...data };\n dispatch(actions.receiveManifest(manifest));\n return manifest;\n});\n\nexport const selectManifest = createAppAsyncThunk(`${sliceName}/selectManifest`, async (manifest: Manifest | string | null, { dispatch }) => {\n const name = (manifest && typeof manifest === 'object' ? manifest.name : manifest) || null;\n dispatch(actions.selectedManifest(name));\n if (name) {\n await dispatch(getManifest(name)).unwrap();\n }\n});\n\nexport const setManifestsListState = createAppAsyncThunk(\n `${sliceName}/setManifestsListState`,\n async (selectionState: Partial<ManifestsList>, { dispatch, getState }) => {\n const currentState = getState().releases.manifestsList;\n const nextState = {\n ...currentState,\n ...selectionState,\n sort: { ...currentState.sort, ...selectionState.sort } as SortOptions\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: currentLoading, ...currentRequestState } = currentState;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { isLoading: selectionLoading, ...selectionRequestState } = nextState;\n if (!deepCompare(currentRequestState, selectionRequestState)) {\n nextState.isLoading = true;\n dispatch(getManifests(nextState)) // don't await here as this would otherwise overwrite setting the `nextState` below\n .unwrap()\n .finally(() => dispatch(setManifestsListState({ isLoading: false })).unwrap());\n }\n if (currentState.page !== nextState.page || currentState.perPage > nextState.perPage || !deepCompare(currentState.sort, nextState.sort)) {\n nextState.selection = [];\n }\n dispatch(actions.setManifestsListState(nextState));\n }\n);\n"],"mappings":";;;;;;;;;;;;;AAsDA,MAAM,EAAE,aAAa,YAAY,gBAAgB,kBAAkBA;AACnE,MAAM,EAAE,MAAM,aAAa,SAAS,mBAAmB;AAEvD,MAAM,kBAAkB;CAAE,WAAW,gBAAgB;CAAM,KAAK;CAAY;AAG5E,MAAM,kBAAkB,SAA0B,iBAAmC;CAEnF,MAAM,EAAE,WAAW,aAAa,cADP,QAAQ,WAAW,KAAK,WAAW,MAAM,WAAW,CAAC,IAAI,EAAE,EACtB,QAC3D,MAAM,SAAS;AACd,OAAK,YAAY,KAAK,GAAG,KAAK,wBAAwB;EACtD,MAAM,gBAAgB,aAAa,WAAW,MAAK,oBAAmB,gBAAgB,OAAO,KAAK,GAAG,IAAI,EAAE;AAC3G,OAAK,WAAW,KAAK,WAAW,KAAK,WAAW,KAAK;AACrD,OAAK,UAAU,KAAK;GAClB,GAAG;GACH,GAAG;GACJ,CAAC;AACF,SAAO;IAET;EAAE,WAAW,EAAE;EAAE,aAAa,EAAE;EAAE,UAAU,KAAA;EAAW,CACxD;AACD,QAAO;EAAE,GAAG;EAAc,GAAG;EAAS;EAAW,yBAAyB,YAAY,OAAO,gBAAgB;EAAE;EAAU;;AAG3H,MAAM,0BAA0B,UAA6B,sBAC3D,SAAS,QAAi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C,CAAC,CAAC,QAAQ,CAAC;;AAElF,KAAI,aAAa,SAAS,UAAU,QAAQ,aAAa,UAAU,UAAU,WAAW,CAAC,YAAY,aAAa,MAAM,UAAU,KAAK,CACrI,WAAU,YAAY,EAAE;AAE1B,UAAS,QAAQ,sBAAsB,UAAU,CAAC;EAErD"}
@@ -10,6 +10,7 @@ const require_usersSlice_selectors = require("./usersSlice/selectors.cjs");
10
10
  const require_commonSelectors = require("./commonSelectors.cjs");
11
11
  exports.DEPLOYMENT_CUTOFF = require_deploymentsSlice_selectors.DEPLOYMENT_CUTOFF;
12
12
  exports.getAcceptedDevices = require_devicesSlice_selectors.getAcceptedDevices;
13
+ exports.getActiveTab = require_releasesSlice_selectors.getActiveTab;
13
14
  exports.getAppInitDone = require_appSlice_selectors.getAppInitDone;
14
15
  exports.getAttributesList = require_devicesSlice_selectors.getAttributesList;
15
16
  exports.getAuditLog = require_organizationSlice_selectors.getAuditLog;
@@ -64,6 +65,7 @@ exports.getGroups = require_devicesSlice_selectors.getGroups;
64
65
  exports.getGroupsById = require_devicesSlice_selectors.getGroupsById;
65
66
  exports.getGroupsByIdWithoutUngrouped = require_devicesSlice_selectors.getGroupsByIdWithoutUngrouped;
66
67
  exports.getHas2FA = require_usersSlice_selectors.getHas2FA;
68
+ exports.getHasManifests = require_releasesSlice_selectors.getHasManifests;
67
69
  exports.getHasReleases = require_releasesSlice_selectors.getHasReleases;
68
70
  exports.getHostAddress = require_appSlice_selectors.getHostAddress;
69
71
  exports.getHostedAnnouncement = require_appSlice_selectors.getHostedAnnouncement;
@@ -77,6 +79,9 @@ exports.getIsUploading = require_appSlice_selectors.getIsUploading;
77
79
  exports.getIssueCountsByType = require_monitorSlice_selectors.getIssueCountsByType;
78
80
  exports.getLimitMaxed = require_devicesSlice_selectors.getLimitMaxed;
79
81
  exports.getListedDevices = require_devicesSlice_selectors.getListedDevices;
82
+ exports.getManifestsById = require_releasesSlice_selectors.getManifestsById;
83
+ exports.getManifestsList = require_releasesSlice_selectors.getManifestsList;
84
+ exports.getManifestsListState = require_releasesSlice_selectors.getManifestsListState;
80
85
  exports.getMappedDeploymentSelection = require_deploymentsSlice_selectors.getMappedDeploymentSelection;
81
86
  exports.getMappedDevicesList = require_commonSelectors.getMappedDevicesList;
82
87
  exports.getOfflineThresholdSettings = require_usersSlice_selectors.getOfflineThresholdSettings;
@@ -105,6 +110,8 @@ exports.getSelectedDeviceAttribute = require_usersSlice_selectors.getSelectedDev
105
110
  exports.getSelectedGroup = require_devicesSlice_selectors.getSelectedGroup;
106
111
  exports.getSelectedGroupInfo = require_devicesSlice_selectors.getSelectedGroupInfo;
107
112
  exports.getSelectedJob = require_releasesSlice_selectors.getSelectedJob;
113
+ exports.getSelectedManifest = require_releasesSlice_selectors.getSelectedManifest;
114
+ exports.getSelectedManifests = require_releasesSlice_selectors.getSelectedManifests;
108
115
  exports.getSelectedRelease = require_releasesSlice_selectors.getSelectedRelease;
109
116
  exports.getSelectedReleases = require_releasesSlice_selectors.getSelectedReleases;
110
117
  exports.getSentryConfig = require_appSlice_selectors.getSentryConfig;
@@ -5,6 +5,6 @@ import { getAcceptedDevices, getAttributesList, getCombinedLimit, getDeviceById,
5
5
  import { getIssueCountsByType } from "./monitorSlice/selectors.cjs";
6
6
  import { getOnboarding } from "./onboardingSlice/selectors.cjs";
7
7
  import { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks } from "./organizationSlice/selectors.cjs";
8
- import { getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasReleases, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.cjs";
8
+ import { getActiveTab, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasManifests, getHasReleases, getManifestsById, getManifestsList, getManifestsListState, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.cjs";
9
9
  import { getCurrentSession, getCurrentUser, getGlobalSettings, getGlobalSettingsInitialized, getHas2FA, getIdAttribute, getIsDarkMode, getOfflineThresholdSettings, getReadAllHelptips, getRolesById, getRolesInitialized, getRolesList, getSecurityAlertDismissedTimestamp, getSelectedDeviceAttribute, getTooltipsById, getTooltipsState, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList } from "./usersSlice/selectors.cjs";
10
- export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
10
+ export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
@@ -5,6 +5,6 @@ import { getAcceptedDevices, getAttributesList, getCombinedLimit, getDeviceById,
5
5
  import { getIssueCountsByType } from "./monitorSlice/selectors.js";
6
6
  import { getOnboarding } from "./onboardingSlice/selectors.js";
7
7
  import { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks } from "./organizationSlice/selectors.js";
8
- import { getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasReleases, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.js";
8
+ import { getActiveTab, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasManifests, getHasReleases, getManifestsById, getManifestsList, getManifestsListState, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.js";
9
9
  import { getCurrentSession, getCurrentUser, getGlobalSettings, getGlobalSettingsInitialized, getHas2FA, getIdAttribute, getIsDarkMode, getOfflineThresholdSettings, getReadAllHelptips, getRolesById, getRolesInitialized, getRolesList, getSecurityAlertDismissedTimestamp, getSelectedDeviceAttribute, getTooltipsById, getTooltipsState, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList } from "./usersSlice/selectors.js";
10
- export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
10
+ export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
package/dist/selectors.js CHANGED
@@ -4,7 +4,7 @@ import { getAcceptedDevices, getAttributesList, getCombinedLimit, getDeviceById,
4
4
  import { getIssueCountsByType } from "./monitorSlice/selectors.js";
5
5
  import { getOnboarding } from "./onboardingSlice/selectors.js";
6
6
  import { getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogState, getBillingProfile, getCard, getDeviceTwinIntegrations, getDisabledTiers, getExternalIntegrations, getIsServiceProvider, getOrganization, getProducts, getSpLimits, getSsoConfig, getSubscription, getTenantListWithLimits, getTenantsList, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks } from "./organizationSlice/selectors.js";
7
- import { getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasReleases, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.js";
7
+ import { getActiveTab, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getHasManifests, getHasReleases, getManifestsById, getManifestsList, getManifestsListState, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getUpdateTypes } from "./releasesSlice/selectors.js";
8
8
  import { getCurrentSession, getCurrentUser, getGlobalSettings, getGlobalSettingsInitialized, getHas2FA, getIdAttribute, getIsDarkMode, getOfflineThresholdSettings, getReadAllHelptips, getRolesById, getRolesInitialized, getRolesList, getSecurityAlertDismissedTimestamp, getSelectedDeviceAttribute, getTooltipsById, getTooltipsState, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList } from "./usersSlice/selectors.js";
9
9
  import { getAuditlogDevice, getAvailableIssueOptionsByType, getDemoDeviceAddress, getDeploymentRelease, getDeviceConfigDeployment, getDeviceReportsForUser, getFilterAttributes, getGroupNames, getIsEnterprise, getMappedDevicesList, getOnboardingState, getRelevantRoles, getSelectedDeploymentData, getShowSecurityAlert, getTenantCapabilities, getUserCapabilities, getUserRoles } from "./commonSelectors.js";
10
- export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
10
+ export { DEPLOYMENT_CUTOFF, getAcceptedDevices, getActiveTab, getAppInitDone, getAttributesList, getAuditLog, getAuditLogEntry, getAuditLogSelectionState, getAuditlogDevice, getAuditlogState, getAvailableIssueOptionsByType, getBillingProfile, getCard, getCombinedLimit, getCommit, getCurrentSession, getCurrentUser, getDeltaJobById, getDeltaJobsById, getDeltaJobsListState, getDemoDeviceAddress, getDeploymentById, getDeploymentRelease, getDeploymentsById, getDeploymentsByStatus, getDeploymentsSelectionState, getDeviceById, getDeviceConfigDeployment, getDeviceCountsByStatus, getDeviceFilters, getDeviceIdentityAttributes, getDeviceLimitStats, getDeviceLimits, getDeviceListState, getDeviceReports, getDeviceReportsForUser, getDeviceTwinIntegrations, getDeviceTypes, getDevicesById, getDevicesByStatus, getDisabledTiers, getDocsVersion, getEnabledTiers, getExternalIntegrations, getFeatures, getFeedbackProbability, getFilterAttributes, getFilteringAttributes, getFullVersionInformation, getGlobalSettings, getGlobalSettingsInitialized, getGroupData, getGroupNames, getGroups, getGroupsById, getGroupsByIdWithoutUngrouped, getHas2FA, getHasManifests, getHasReleases, getHostAddress, getHostedAnnouncement, getIdAttribute, getIsDarkMode, getIsEnterprise, getIsFirstLogin, getIsPreview, getIsServiceProvider, getIsUploading, getIssueCountsByType, getLimitMaxed, getListedDevices, getManifestsById, getManifestsList, getManifestsListState, getMappedDeploymentSelection, getMappedDevicesList, getOfflineThresholdSettings, getOnboarding, getOnboardingState, getOrganization, getProducts, getReadAllHelptips, getRecaptchaKey, getRecentDeployments, getReleaseListState, getReleaseTags, getReleaseTagsById, getReleasesById, getReleasesList, getRelevantRoles, getRolesById, getRolesInitialized, getRolesList, getSearchState, getSearchedDevices, getSecurityAlertDismissedTimestamp, getSelectedDeploymentData, getSelectedDeploymentDeviceIds, getSelectedDeviceAttribute, getSelectedGroup, getSelectedGroupInfo, getSelectedJob, getSelectedManifest, getSelectedManifests, getSelectedRelease, getSelectedReleases, getSentryConfig, getShowSecurityAlert, getSnackbar, getSortedFilteringAttributes, getSpLimits, getSsoConfig, getStripeKey, getSubscription, getTenantCapabilities, getTenantListWithLimits, getTenantsList, getTooltipsById, getTooltipsState, getTrackerCode, getUpdateTypes, getUploads, getUserCapabilities, getUserRoles, getUserSettings, getUserSettingsInitialized, getUsersById, getUsersList, getVersionInformation, getWebhookEventInfo, getWebhookEventTotal, getWebhookEvents, getWebhooks };
@@ -1,11 +1,11 @@
1
- import { o as UserSliceType } from "./index-DtePEQPT.js";
2
- import { r as ReleaseSliceType } from "./index-Cvkvcz4r.js";
1
+ import { o as UserSliceType } from "./index-ez3oxfRo.js";
2
+ import { i as ReleaseSliceType } from "./index-CQo3yTUa.js";
3
3
  import { n as OnboardingSliceType } from "./index-CJkrL0oA.js";
4
4
  import { o as DeploymentsSliceType } from "./index-CkwVnIqd.js";
5
- import { s as DeviceSliceType } from "./index-DqyY6oZ3.js";
6
- import { t as AppSliceType } from "./index-Dv3Hfxk_.js";
7
- import { t as MonitorSliceType } from "./index-CO-py5d4.js";
8
- import { t as OrganizationSliceType } from "./index-DJSlDPRX.js";
5
+ import { s as DeviceSliceType } from "./index-BI9O8JWe.js";
6
+ import { t as AppSliceType } from "./index-Bp1WpATs.js";
7
+ import { t as MonitorSliceType } from "./index-DUvrw_Ed.js";
8
+ import { t as OrganizationSliceType } from "./index-C6wNUfiV.js";
9
9
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
10
10
  import { Reducer, UnknownAction } from "@reduxjs/toolkit";
11
11
  import { TypedUseSelectorHook } from "react-redux";
@@ -231,4 +231,4 @@ declare const createAppAsyncThunk: _$_reduxjs_toolkit0.CreateAsyncThunkFunction<
231
231
  };
232
232
  //#endregion
233
233
  export { commonErrorHandler as a, sessionReducer as c, useAppSelector as d, commonErrorFallback as i, store as l, MenderEnvironment as n, createAppAsyncThunk as o, RootState as r, getConfiguredStore as s, AppDispatch as t, useAppDispatch as u };
234
- //# sourceMappingURL=store-BQxOSRC1.d.ts.map
234
+ //# sourceMappingURL=store-Boqp1x2t.d.ts.map
@@ -1,11 +1,11 @@
1
- import { o as UserSliceType } from "./index-4eaLEXy_.cjs";
2
- import { r as ReleaseSliceType } from "./index-FyYBBeN-.cjs";
1
+ import { o as UserSliceType } from "./index-BFlHWzjv.cjs";
2
+ import { i as ReleaseSliceType } from "./index-WXwgRjLt.cjs";
3
3
  import { n as OnboardingSliceType } from "./index-UPc3wvVd.cjs";
4
4
  import { o as DeploymentsSliceType } from "./index-BP0uAq36.cjs";
5
- import { s as DeviceSliceType } from "./index-Lz5JsJ6O.cjs";
6
- import { t as AppSliceType } from "./index-CTt-eIY8.cjs";
7
- import { t as MonitorSliceType } from "./index-BEVkIiNa.cjs";
8
- import { t as OrganizationSliceType } from "./index-Bwx9jEiL.cjs";
5
+ import { s as DeviceSliceType } from "./index-B64X5ozM.cjs";
6
+ import { t as AppSliceType } from "./index-DwACbyUg.cjs";
7
+ import { t as MonitorSliceType } from "./index-CT5hgXm9.cjs";
8
+ import { t as OrganizationSliceType } from "./index-BbaS7MzW.cjs";
9
9
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
10
10
  import { Reducer, UnknownAction } from "@reduxjs/toolkit";
11
11
  import * as _$redux from "redux";
@@ -231,4 +231,4 @@ declare const createAppAsyncThunk: _$_reduxjs_toolkit0.CreateAsyncThunkFunction<
231
231
  };
232
232
  //#endregion
233
233
  export { commonErrorHandler as a, sessionReducer as c, useAppSelector as d, commonErrorFallback as i, store as l, MenderEnvironment as n, createAppAsyncThunk as o, RootState as r, getConfiguredStore as s, AppDispatch as t, useAppDispatch as u };
234
- //# sourceMappingURL=store-BiIA0r0A.d.cts.map
234
+ //# sourceMappingURL=store-NOBz-rVZ.d.cts.map
package/dist/store.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { n as ErrorWithResponse } from "./utils-B4I595rf.cjs";
2
- import { a as commonErrorHandler, c as sessionReducer, d as useAppSelector, i as commonErrorFallback, l as store, n as MenderEnvironment, o as createAppAsyncThunk, r as RootState, s as getConfiguredStore, t as AppDispatch, u as useAppDispatch } from "./store-BiIA0r0A.cjs";
1
+ import { n as ErrorWithResponse } from "./utils-Do9z5TL1.cjs";
2
+ import { a as commonErrorHandler, c as sessionReducer, d as useAppSelector, i as commonErrorFallback, l as store, n as MenderEnvironment, o as createAppAsyncThunk, r as RootState, s as getConfiguredStore, t as AppDispatch, u as useAppDispatch } from "./store-NOBz-rVZ.cjs";
3
3
  export { AppDispatch, ErrorWithResponse, MenderEnvironment, RootState, commonErrorFallback, commonErrorHandler, createAppAsyncThunk, getConfiguredStore, sessionReducer, store, useAppDispatch, useAppSelector };
package/dist/store.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { n as ErrorWithResponse } from "./utils-DNnSR4S_.js";
2
- import { a as commonErrorHandler, c as sessionReducer, d as useAppSelector, i as commonErrorFallback, l as store, n as MenderEnvironment, o as createAppAsyncThunk, r as RootState, s as getConfiguredStore, t as AppDispatch, u as useAppDispatch } from "./store-BQxOSRC1.js";
1
+ import { n as ErrorWithResponse } from "./utils-CHBWS_tH.js";
2
+ import { a as commonErrorHandler, c as sessionReducer, d as useAppSelector, i as commonErrorFallback, l as store, n as MenderEnvironment, o as createAppAsyncThunk, r as RootState, s as getConfiguredStore, t as AppDispatch, u as useAppDispatch } from "./store-Boqp1x2t.js";
3
3
  export { AppDispatch, ErrorWithResponse, MenderEnvironment, RootState, commonErrorFallback, commonErrorHandler, createAppAsyncThunk, getConfiguredStore, sessionReducer, store, useAppDispatch, useAppSelector };
@@ -1,5 +1,5 @@
1
- import { i as UserSession } from "./index-4eaLEXy_.cjs";
2
- import { r as RootState, t as AppDispatch } from "./store-BiIA0r0A.cjs";
1
+ import { i as UserSession } from "./index-BFlHWzjv.cjs";
2
+ import { r as RootState, t as AppDispatch } from "./store-NOBz-rVZ.cjs";
3
3
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
4
4
 
5
5
  //#region src/storehooks.d.ts
@@ -32,7 +32,17 @@ declare const parseEnvironmentInfo: _$_reduxjs_toolkit0.AsyncThunk<[{
32
32
  }, {
33
33
  payload: any;
34
34
  type: "app/setEnvironmentData";
35
- }, _$_reduxjs_toolkit0.PayloadAction<{
35
+ }, _$_reduxjs_toolkit0.PayloadAction<unknown, string, {
36
+ arg: void;
37
+ requestId: string;
38
+ requestStatus: "rejected";
39
+ aborted: boolean;
40
+ condition: boolean;
41
+ } & ({
42
+ rejectedWithValue: true;
43
+ } | ({
44
+ rejectedWithValue: false;
45
+ } & {})), _$_reduxjs_toolkit0.SerializedError> | _$_reduxjs_toolkit0.PayloadAction<{
36
46
  payload: {
37
47
  [key: string]: string | {
38
48
  releaseDate: string;
@@ -50,17 +60,7 @@ declare const parseEnvironmentInfo: _$_reduxjs_toolkit0.AsyncThunk<[{
50
60
  arg: void;
51
61
  requestId: string;
52
62
  requestStatus: "fulfilled";
53
- }, never> | _$_reduxjs_toolkit0.PayloadAction<unknown, string, {
54
- arg: void;
55
- requestId: string;
56
- requestStatus: "rejected";
57
- aborted: boolean;
58
- condition: boolean;
59
- } & ({
60
- rejectedWithValue: true;
61
- } | ({
62
- rejectedWithValue: false;
63
- } & {})), _$_reduxjs_toolkit0.SerializedError>], void, {
63
+ }, never>], void, {
64
64
  dispatch: AppDispatch;
65
65
  state: RootState;
66
66
  extra?: unknown;
@@ -1,5 +1,5 @@
1
- import { i as UserSession } from "./index-DtePEQPT.js";
2
- import { r as RootState, t as AppDispatch } from "./store-BQxOSRC1.js";
1
+ import { i as UserSession } from "./index-ez3oxfRo.js";
2
+ import { r as RootState, t as AppDispatch } from "./store-Boqp1x2t.js";
3
3
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
4
4
 
5
5
  //#region src/storehooks.d.ts
@@ -32,7 +32,17 @@ declare const parseEnvironmentInfo: _$_reduxjs_toolkit0.AsyncThunk<[{
32
32
  }, {
33
33
  payload: any;
34
34
  type: "app/setEnvironmentData";
35
- }, _$_reduxjs_toolkit0.PayloadAction<{
35
+ }, _$_reduxjs_toolkit0.PayloadAction<unknown, string, {
36
+ arg: void;
37
+ requestId: string;
38
+ requestStatus: "rejected";
39
+ aborted: boolean;
40
+ condition: boolean;
41
+ } & ({
42
+ rejectedWithValue: true;
43
+ } | ({
44
+ rejectedWithValue: false;
45
+ } & {})), _$_reduxjs_toolkit0.SerializedError> | _$_reduxjs_toolkit0.PayloadAction<{
36
46
  payload: {
37
47
  [key: string]: string | {
38
48
  releaseDate: string;
@@ -50,17 +60,7 @@ declare const parseEnvironmentInfo: _$_reduxjs_toolkit0.AsyncThunk<[{
50
60
  arg: void;
51
61
  requestId: string;
52
62
  requestStatus: "fulfilled";
53
- }, never> | _$_reduxjs_toolkit0.PayloadAction<unknown, string, {
54
- arg: void;
55
- requestId: string;
56
- requestStatus: "rejected";
57
- aborted: boolean;
58
- condition: boolean;
59
- } & ({
60
- rejectedWithValue: true;
61
- } | ({
62
- rejectedWithValue: false;
63
- } & {})), _$_reduxjs_toolkit0.SerializedError>], void, {
63
+ }, never>], void, {
64
64
  dispatch: AppDispatch;
65
65
  state: RootState;
66
66
  extra?: unknown;
package/dist/thunks.cjs CHANGED
@@ -230,12 +230,45 @@ const trackDeploymentCreation = (totalDeploymentCount, hasDeployments, trial_exp
230
230
  });
231
231
  }
232
232
  };
233
+ const cleanPhases = (phases) => phases?.map(({ batch_size, batch_size_devices, start_ts }) => require_utils.stripUndefined({
234
+ batch_size,
235
+ batch_size_devices,
236
+ start_ts
237
+ }));
233
238
  const MAX_PREVIOUS_PHASES_COUNT = 5;
234
239
  const createDeployment = require_store.createAppAsyncThunk(`${require_deploymentsSlice_index.sliceName}/createDeployment`, ({ newDeployment, hasNewRetryDefault = false }, { dispatch, getState }) => {
235
240
  let request;
236
- if ("filter_id" in newDeployment && newDeployment.filter_id) request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrlV2}/deployments`, newDeployment);
237
- else if ("group" in newDeployment && newDeployment.group) request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrl}/deployments/group/${newDeployment.group}`, newDeployment);
238
- else request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrl}/deployments`, newDeployment);
241
+ const { name, artifact_name, retries, update_control_map, autogenerate_delta } = newDeployment;
242
+ const common = require_utils.stripUndefined({
243
+ name,
244
+ artifact_name,
245
+ phases: cleanPhases(newDeployment.phases),
246
+ retries,
247
+ update_control_map,
248
+ autogenerate_delta
249
+ });
250
+ if ("filter_id" in newDeployment && newDeployment.filter_id) {
251
+ const { filter_id, max_devices } = newDeployment;
252
+ request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrlV2}/deployments`, require_utils.stripUndefined({
253
+ ...common,
254
+ filter_id,
255
+ max_devices
256
+ }));
257
+ } else if ("group" in newDeployment && newDeployment.group) {
258
+ const { force_installation, group } = newDeployment;
259
+ request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrl}/deployments/group/${group}`, require_utils.stripUndefined({
260
+ ...common,
261
+ force_installation
262
+ }));
263
+ } else {
264
+ const { devices, all_devices, force_installation } = newDeployment;
265
+ request = require_api_general_api.default.post(`${_northern_tech_utils_constants.deploymentsApiUrl}/deployments`, require_utils.stripUndefined({
266
+ ...common,
267
+ devices,
268
+ all_devices,
269
+ force_installation
270
+ }));
271
+ }
239
272
  const totalDeploymentCount = Object.values(require_deploymentsSlice_selectors.getDeploymentsByStatus(getState())).reduce((accu, item) => accu + item.total, 0);
240
273
  const { hasDeployments } = require_usersSlice_selectors.getGlobalSettings(getState());
241
274
  const { trial_expiration } = require_organizationSlice_selectors.getOrganization(getState());
@@ -1620,10 +1653,11 @@ const getTargetLocation = (key) => {
1620
1653
  };
1621
1654
  const devLocations = ["localhost", "docker.mender.io"];
1622
1655
  const createOrganizationTrial = require_store.createAppAsyncThunk(`${require_organizationSlice_index.sliceName}/createOrganizationTrial`, async (data, { dispatch }) => {
1623
- const { key } = require_appSlice_constants.locations[data.location];
1656
+ const { location, tos: _tos, ...trialPayload } = data;
1657
+ const { key } = require_appSlice_constants.locations[location];
1624
1658
  const targetLocation = getTargetLocation(key);
1625
1659
  const target = `${targetLocation}${_northern_tech_utils_constants.tenantadmApiUrlv2}/tenants/trial`;
1626
- const { headers } = await require_api_general_api.default.postUnauthorized(target, data).catch((err) => {
1660
+ const { headers } = await require_api_general_api.default.postUnauthorized(target, trialPayload).catch((err) => {
1627
1661
  if (err.response?.status >= 400 && err.response?.status < 500) dispatch(setSnackbar$1({
1628
1662
  message: err.response.data.error,
1629
1663
  autoHideDuration: require_constants.TIMEOUTS.fiveSeconds
@@ -2043,10 +2077,18 @@ const removeUser = require_store.createAppAsyncThunk(`${require_usersSlice_index
2043
2077
  dispatch(getUserList()),
2044
2078
  dispatch(setSnackbar(userActions.remove.successMessage))
2045
2079
  ])).catch((err) => userActionErrorHandler(err, "remove", dispatch)));
2046
- const editUser = require_store.createAppAsyncThunk(`${require_usersSlice_index.sliceName}/editUser`, ({ id, ...userData }, { dispatch, getState }) => require_api_general_api.default.put(`${_northern_tech_utils_constants.useradmApiUrl}/users/${id}`, userData).then(() => Promise.all([dispatch(require_usersSlice_index.actions.updatedUser({
2047
- ...userData,
2048
- id: id === "me" ? require_usersSlice_selectors.getCurrentUser(getState()).id : id
2049
- })), dispatch(setSnackbar(userActions.edit.successMessage))])).catch((err) => userActionErrorHandler(err, "edit", dispatch)));
2080
+ const editUser = require_store.createAppAsyncThunk(`${require_usersSlice_index.sliceName}/editUser`, ({ id, email, password, current_password, roles }, { dispatch, getState }) => {
2081
+ const userData = require_utils.stripUndefined({
2082
+ email,
2083
+ password,
2084
+ current_password,
2085
+ roles
2086
+ });
2087
+ return require_api_general_api.default.put(`${_northern_tech_utils_constants.useradmApiUrl}/users/${id}`, userData).then(() => Promise.all([dispatch(require_usersSlice_index.actions.updatedUser({
2088
+ ...userData,
2089
+ id: id === "me" ? require_usersSlice_selectors.getCurrentUser(getState()).id : id
2090
+ })), dispatch(setSnackbar(userActions.edit.successMessage))])).catch((err) => userActionErrorHandler(err, "edit", dispatch));
2091
+ });
2050
2092
  const checkEmailExists = require_store.createAppAsyncThunk(`${require_usersSlice_index.sliceName}/checkEmailExists`, async (email) => {
2051
2093
  return (await require_api_general_api.default.get(`${_northern_tech_utils_constants.useradmApiUrl}/users/exists?email=${encodeURIComponent(email)}`)).data.exists;
2052
2094
  });
@@ -2529,6 +2571,8 @@ exports.getIntegrations = getIntegrations;
2529
2571
  exports.getIssueCountsByType = require_monitorSlice_thunks.getIssueCountsByType;
2530
2572
  exports.getLatestDeviceAlerts = require_monitorSlice_thunks.getLatestDeviceAlerts;
2531
2573
  exports.getLatestReleaseInfo = getLatestReleaseInfo;
2574
+ exports.getManifest = require_releasesSlice_thunks.getManifest;
2575
+ exports.getManifests = require_releasesSlice_thunks.getManifests;
2532
2576
  exports.getOnboardingState = getOnboardingState;
2533
2577
  exports.getPermissionSets = getPermissionSets;
2534
2578
  exports.getProducts = getProducts;
@@ -2578,6 +2622,7 @@ exports.saveGlobalSettings = saveGlobalSettings;
2578
2622
  exports.saveUserSettings = saveUserSettings;
2579
2623
  exports.searchDevices = searchDevices;
2580
2624
  exports.selectGroup = selectGroup;
2625
+ exports.selectManifest = require_releasesSlice_thunks.selectManifest;
2581
2626
  exports.selectRelease = require_releasesSlice_thunks.selectRelease;
2582
2627
  exports.sendSupportMessage = sendSupportMessage;
2583
2628
  exports.setAllTooltipsReadState = setAllTooltipsReadState;
@@ -2589,6 +2634,7 @@ exports.setDeviceTags = setDeviceTags;
2589
2634
  exports.setDeviceTwin = setDeviceTwin;
2590
2635
  exports.setFirstLoginAfterSignup = setFirstLoginAfterSignup;
2591
2636
  exports.setHideAnnouncement = setHideAnnouncement;
2637
+ exports.setManifestsListState = require_releasesSlice_thunks.setManifestsListState;
2592
2638
  exports.setOfflineThreshold = setOfflineThreshold;
2593
2639
  exports.setOnboardingApproach = setOnboardingApproach;
2594
2640
  exports.setOnboardingCanceled = setOnboardingCanceled;