@northern.tech/store 0.36.2 → 0.37.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 (144) hide show
  1. package/dist/actions.d.cts +2 -1
  2. package/dist/actions.d.ts +2 -1
  3. package/dist/api/general-api.cjs +3 -3
  4. package/dist/api/general-api.cjs.map +1 -1
  5. package/dist/api/users-api.cjs +2 -2
  6. package/dist/api/users-api.cjs.map +1 -1
  7. package/dist/api/users-api.js.map +1 -1
  8. package/dist/appSlice/index.cjs +1 -0
  9. package/dist/appSlice/index.cjs.map +1 -1
  10. package/dist/appSlice/index.js +1 -0
  11. package/dist/appSlice/index.js.map +1 -1
  12. package/dist/appSlice/selectors.cjs +2 -4
  13. package/dist/appSlice/selectors.cjs.map +1 -1
  14. package/dist/appSlice/selectors.d.cts +4 -51
  15. package/dist/appSlice/selectors.d.ts +4 -51
  16. package/dist/appSlice/selectors.js +3 -4
  17. package/dist/appSlice/selectors.js.map +1 -1
  18. package/dist/appSlice/thunks.d.cts +1 -1
  19. package/dist/appSlice/thunks.d.ts +1 -1
  20. package/dist/auth.cjs +2 -2
  21. package/dist/auth.cjs.map +1 -1
  22. package/dist/auth.js.map +1 -1
  23. package/dist/commonSelectors.cjs +2 -2
  24. package/dist/commonSelectors.cjs.map +1 -1
  25. package/dist/commonSelectors.d.cts +10 -2
  26. package/dist/commonSelectors.d.ts +10 -2
  27. package/dist/commonSelectors.js.map +1 -1
  28. package/dist/constants.cjs.map +1 -1
  29. package/dist/constants.js.map +1 -1
  30. package/dist/deploymentsSlice/index.cjs.map +1 -1
  31. package/dist/deploymentsSlice/index.js.map +1 -1
  32. package/dist/deploymentsSlice/selectors.cjs.map +1 -1
  33. package/dist/deploymentsSlice/selectors.d.cts +2 -2
  34. package/dist/deploymentsSlice/selectors.d.ts +2 -2
  35. package/dist/deploymentsSlice/selectors.js.map +1 -1
  36. package/dist/deploymentsSlice/thunks.cjs +1 -0
  37. package/dist/deploymentsSlice/thunks.d.cts +9 -4
  38. package/dist/deploymentsSlice/thunks.d.ts +9 -4
  39. package/dist/deploymentsSlice/thunks.js +2 -2
  40. package/dist/devicesSlice/index.cjs +4 -0
  41. package/dist/devicesSlice/index.cjs.map +1 -1
  42. package/dist/devicesSlice/index.d.cts +1 -1
  43. package/dist/devicesSlice/index.d.ts +1 -1
  44. package/dist/devicesSlice/index.js +4 -0
  45. package/dist/devicesSlice/index.js.map +1 -1
  46. package/dist/devicesSlice/mocks.d.cts +1 -0
  47. package/dist/devicesSlice/mocks.d.ts +1 -0
  48. package/dist/devicesSlice/selectors.cjs +2 -0
  49. package/dist/devicesSlice/selectors.cjs.map +1 -1
  50. package/dist/devicesSlice/selectors.d.cts +4 -3
  51. package/dist/devicesSlice/selectors.d.ts +4 -3
  52. package/dist/devicesSlice/selectors.js +2 -1
  53. package/dist/devicesSlice/selectors.js.map +1 -1
  54. package/dist/devicesSlice/thunks.cjs +2 -0
  55. package/dist/devicesSlice/thunks.d.cts +68 -3
  56. package/dist/devicesSlice/thunks.d.ts +68 -3
  57. package/dist/devicesSlice/thunks.js +2 -2
  58. package/dist/{index-CPdMUfRr.d.ts → index-BqJuhvO_.d.ts} +4 -1
  59. package/dist/{index-DbfM03Gj.d.cts → index-Doc_1P_Y.d.cts} +4 -1
  60. package/dist/liststatehook.cjs.map +1 -1
  61. package/dist/liststatehook.js.map +1 -1
  62. package/dist/locationutils.cjs.map +1 -1
  63. package/dist/locationutils.d.cts +1 -1
  64. package/dist/locationutils.d.ts +1 -1
  65. package/dist/locationutils.js.map +1 -1
  66. package/dist/monitorSlice/index.cjs.map +1 -1
  67. package/dist/monitorSlice/index.js.map +1 -1
  68. package/dist/monitorSlice/mocks.cjs.map +1 -1
  69. package/dist/monitorSlice/mocks.js.map +1 -1
  70. package/dist/monitorSlice/selectors.d.cts +1 -1
  71. package/dist/monitorSlice/selectors.d.ts +1 -1
  72. package/dist/monitorSlice/thunks.cjs.map +1 -1
  73. package/dist/monitorSlice/thunks.d.cts +2 -2
  74. package/dist/monitorSlice/thunks.d.ts +2 -2
  75. package/dist/monitorSlice/thunks.js.map +1 -1
  76. package/dist/onboardingSlice/index.cjs.map +1 -1
  77. package/dist/onboardingSlice/mocks.cjs.map +1 -1
  78. package/dist/onboardingSlice/selectors.d.cts +1 -1
  79. package/dist/onboardingSlice/selectors.d.ts +1 -1
  80. package/dist/onboardingSlice/thunks.d.cts +1 -1
  81. package/dist/onboardingSlice/thunks.d.ts +1 -1
  82. package/dist/organizationSlice/index.cjs.map +1 -1
  83. package/dist/organizationSlice/selectors.cjs.map +1 -1
  84. package/dist/organizationSlice/selectors.d.cts +2 -2
  85. package/dist/organizationSlice/selectors.d.ts +2 -2
  86. package/dist/organizationSlice/selectors.js.map +1 -1
  87. package/dist/organizationSlice/thunks.d.cts +4 -41
  88. package/dist/organizationSlice/thunks.d.ts +4 -41
  89. package/dist/releasesSlice/index.cjs.map +1 -1
  90. package/dist/releasesSlice/selectors.cjs.map +1 -1
  91. package/dist/releasesSlice/selectors.d.cts +2 -2
  92. package/dist/releasesSlice/selectors.d.ts +2 -2
  93. package/dist/releasesSlice/selectors.js.map +1 -1
  94. package/dist/releasesSlice/thunks.cjs +39 -16
  95. package/dist/releasesSlice/thunks.cjs.map +1 -1
  96. package/dist/releasesSlice/thunks.d.cts +3 -9
  97. package/dist/releasesSlice/thunks.d.ts +3 -9
  98. package/dist/releasesSlice/thunks.js +38 -15
  99. package/dist/releasesSlice/thunks.js.map +1 -1
  100. package/dist/selectors.cjs +1 -1
  101. package/dist/selectors.d.cts +3 -3
  102. package/dist/selectors.d.ts +3 -3
  103. package/dist/selectors.js +3 -3
  104. package/dist/sockethook.cjs +3 -3
  105. package/dist/sockethook.cjs.map +1 -1
  106. package/dist/sockethook.js.map +1 -1
  107. package/dist/{store-Co2ptTSm.d.ts → store-BzrMxxAO.d.ts} +112 -4
  108. package/dist/{store-Dd0Y2JCN.d.cts → store-xV2zaXAc.d.cts} +112 -4
  109. package/dist/store.cjs.map +1 -1
  110. package/dist/store.d.cts +1 -2
  111. package/dist/store.d.ts +1 -2
  112. package/dist/store.js.map +1 -1
  113. package/dist/storehooks.cjs +5 -4
  114. package/dist/storehooks.cjs.map +1 -1
  115. package/dist/storehooks.d.cts +1 -1
  116. package/dist/storehooks.d.ts +1 -1
  117. package/dist/storehooks.js +1 -0
  118. package/dist/storehooks.js.map +1 -1
  119. package/dist/thunks.cjs +85 -25
  120. package/dist/thunks.cjs.map +1 -1
  121. package/dist/thunks.d.cts +3 -3
  122. package/dist/thunks.d.ts +3 -3
  123. package/dist/thunks.js +76 -19
  124. package/dist/thunks.js.map +1 -1
  125. package/dist/useDeploymentDevice.cjs +2 -2
  126. package/dist/useDeploymentDevice.cjs.map +1 -1
  127. package/dist/useDeploymentDevice.js.map +1 -1
  128. package/dist/usersSlice/index.cjs.map +1 -1
  129. package/dist/usersSlice/selectors.cjs.map +1 -1
  130. package/dist/usersSlice/selectors.d.cts +2 -2
  131. package/dist/usersSlice/selectors.d.ts +2 -2
  132. package/dist/usersSlice/selectors.js.map +1 -1
  133. package/dist/usersSlice/thunks.d.cts +1 -1
  134. package/dist/usersSlice/thunks.d.ts +1 -1
  135. package/dist/utils.cjs +2 -0
  136. package/dist/utils.cjs.map +1 -1
  137. package/dist/utils.d.cts +2 -2
  138. package/dist/utils.d.ts +2 -2
  139. package/dist/utils.js +3 -2
  140. package/dist/utils.js.map +1 -1
  141. package/package.json +4 -4
  142. package/dist/utils-C_9XEfi_.d.ts +0 -104
  143. package/dist/utils-DbXmZmGq.d.cts +0 -104
  144. /package/dist/{chunk-D6vf50IK.cjs → rolldown-runtime-D6vf50IK.cjs} +0 -0
@@ -1,104 +0,0 @@
1
- import { H as emptyUiPermissions, S as Role, m as DeviceIssueOptionKey, xt as FilterOperator } from "./constants-OcdoVk6f.js";
2
- import { a as PricePreview } from "./types-BjtmX60L.js";
3
- import { t as Deployment } from "./index-Bb4yvvgG.js";
4
- import { c as InventoryAttributes, n as DeviceFilter, r as DeviceGroup } from "./index-CPdMUfRr.js";
5
- import { AxiosError } from "axios";
6
- import { Attribute, AttributeFilterPredicate, FilterV2, InvoiceLineItem, Scope } from "@northern.tech/types/MenderTypes";
7
-
8
- //#region src/utils.d.ts
9
- type FilterProcessorValue = string | string[] | number | boolean;
10
- type FilterTerm = {
11
- attribute: string;
12
- scope: Scope;
13
- type: FilterOperator;
14
- value: FilterProcessorValue;
15
- };
16
- declare const mapFiltersToTerms: (filters: DeviceFilter[]) => FilterTerm[];
17
- declare const mapTermsToFilters: (terms: FilterTerm[]) => DeviceFilter[];
18
- declare const convertDeviceListStateToFilters: ({
19
- filters,
20
- group,
21
- groups,
22
- offlineThreshold,
23
- selectedIssues,
24
- status
25
- }: {
26
- filters?: DeviceFilter[];
27
- group?: string;
28
- groups?: {
29
- byId: Record<string, DeviceGroup>;
30
- };
31
- offlineThreshold?: string;
32
- selectedIssues?: DeviceIssueOptionKey[];
33
- status?: string;
34
- }) => {
35
- applicableFilters: DeviceFilter[];
36
- filterTerms: FilterTerm[];
37
- };
38
- declare const filtersFilter: (item: DeviceFilter, index: number, array: DeviceFilter[]) => boolean;
39
- declare const stripUndefined: <T extends Record<string, unknown>>(obj: T) => Partial<T>;
40
- declare const listItemMapper: <T extends object>(byId: Record<string, T>, ids: string[], {
41
- cutOffSize,
42
- defaultObject
43
- }: {
44
- cutOffSize?: number;
45
- defaultObject?: Partial<T>;
46
- }) => T[];
47
- type UiPermissions = typeof emptyUiPermissions;
48
- declare const mergePermissions: (existingPermissions: UiPermissions | undefined, addedPermissions: UiPermissions) => UiPermissions;
49
- declare const mapUserRolesToUiPermissions: (userRoles: string[], roles: Record<string, Role>) => UiPermissions;
50
- declare const progress: ({
51
- loaded,
52
- total
53
- }: {
54
- loaded: number;
55
- total?: number;
56
- }) => number;
57
- type ErrorWithResponse = AxiosError<{
58
- error?: {
59
- message?: string;
60
- } | string;
61
- }> & {
62
- error?: string;
63
- };
64
- declare const extractErrorMessage: (err: ErrorWithResponse, fallback?: string) => string;
65
- declare const ensureVersionString: (software: string, fallback: string) => string;
66
- declare const stringToBoolean: (content: string | number | undefined) => boolean;
67
- type DeploymentStats = {
68
- failures: number;
69
- inprogress: number;
70
- paused: number;
71
- pending: number;
72
- skipped?: number;
73
- successes: number;
74
- };
75
- declare const groupDeploymentDevicesStats: (deployment: Pick<Deployment, "devices">) => DeploymentStats;
76
- declare const statCollector: (items: string[], statistics: Record<string, number>) => number;
77
- declare const groupDeploymentStats: (deployment: Partial<Deployment>, withSkipped?: boolean) => DeploymentStats;
78
- declare const getDeploymentState: (deployment: Partial<Deployment>) => string;
79
- type DeploymentFilter = FilterV2 | {
80
- terms?: Array<AttributeFilterPredicate | {
81
- key: string;
82
- }>;
83
- };
84
- declare const generateDeploymentGroupDetails: (filter: DeploymentFilter | undefined, groupName: string) => string;
85
- type DeviceAttributeMap = {
86
- identity: Record<string, string>;
87
- inventory: InventoryAttributes;
88
- monitor: Record<string, string>;
89
- system: Record<string, string>;
90
- tags: Record<string, string>;
91
- };
92
- declare const mapDeviceAttributes: (attributes?: Attribute[]) => DeviceAttributeMap;
93
- declare const isDarkMode: (mode: string) => boolean;
94
- type Line = InvoiceLineItem & {
95
- product: 'mender_standard' | 'mender_micro';
96
- };
97
- declare const parseSubscriptionPreview: (lines: Line[]) => PricePreview["items"];
98
- declare const convertToBackendSPLimits: (limits: Record<string, number | string>, spLimits: Record<string, object>) => Record<string, {
99
- Name: string;
100
- value: number;
101
- }>;
102
- //#endregion
103
- export { stringToBoolean as C, statCollector as S, mapTermsToFilters as _, convertToBackendSPLimits as a, parseSubscriptionPreview as b, filtersFilter as c, groupDeploymentDevicesStats as d, groupDeploymentStats as f, mapFiltersToTerms as g, mapDeviceAttributes as h, convertDeviceListStateToFilters as i, generateDeploymentGroupDetails as l, listItemMapper as m, ErrorWithResponse as n, ensureVersionString as o, isDarkMode as p, FilterTerm as r, extractErrorMessage as s, DeploymentStats as t, getDeploymentState as u, mapUserRolesToUiPermissions as v, stripUndefined as w, progress as x, mergePermissions as y };
104
- //# sourceMappingURL=utils-C_9XEfi_.d.ts.map
@@ -1,104 +0,0 @@
1
- import { H as emptyUiPermissions, S as Role, m as DeviceIssueOptionKey, xt as FilterOperator } from "./constants-_p6w8uEp.cjs";
2
- import { a as PricePreview } from "./types-B33vKVhi.cjs";
3
- import { t as Deployment } from "./index-EPmsL6Lb.cjs";
4
- import { c as InventoryAttributes, n as DeviceFilter, r as DeviceGroup } from "./index-DbfM03Gj.cjs";
5
- import { Attribute, AttributeFilterPredicate, FilterV2, InvoiceLineItem, Scope } from "@northern.tech/types/MenderTypes";
6
- import { AxiosError } from "axios";
7
-
8
- //#region src/utils.d.ts
9
- type FilterProcessorValue = string | string[] | number | boolean;
10
- type FilterTerm = {
11
- attribute: string;
12
- scope: Scope;
13
- type: FilterOperator;
14
- value: FilterProcessorValue;
15
- };
16
- declare const mapFiltersToTerms: (filters: DeviceFilter[]) => FilterTerm[];
17
- declare const mapTermsToFilters: (terms: FilterTerm[]) => DeviceFilter[];
18
- declare const convertDeviceListStateToFilters: ({
19
- filters,
20
- group,
21
- groups,
22
- offlineThreshold,
23
- selectedIssues,
24
- status
25
- }: {
26
- filters?: DeviceFilter[];
27
- group?: string;
28
- groups?: {
29
- byId: Record<string, DeviceGroup>;
30
- };
31
- offlineThreshold?: string;
32
- selectedIssues?: DeviceIssueOptionKey[];
33
- status?: string;
34
- }) => {
35
- applicableFilters: DeviceFilter[];
36
- filterTerms: FilterTerm[];
37
- };
38
- declare const filtersFilter: (item: DeviceFilter, index: number, array: DeviceFilter[]) => boolean;
39
- declare const stripUndefined: <T extends Record<string, unknown>>(obj: T) => Partial<T>;
40
- declare const listItemMapper: <T extends object>(byId: Record<string, T>, ids: string[], {
41
- cutOffSize,
42
- defaultObject
43
- }: {
44
- cutOffSize?: number;
45
- defaultObject?: Partial<T>;
46
- }) => T[];
47
- type UiPermissions = typeof emptyUiPermissions;
48
- declare const mergePermissions: (existingPermissions: UiPermissions | undefined, addedPermissions: UiPermissions) => UiPermissions;
49
- declare const mapUserRolesToUiPermissions: (userRoles: string[], roles: Record<string, Role>) => UiPermissions;
50
- declare const progress: ({
51
- loaded,
52
- total
53
- }: {
54
- loaded: number;
55
- total?: number;
56
- }) => number;
57
- type ErrorWithResponse = AxiosError<{
58
- error?: {
59
- message?: string;
60
- } | string;
61
- }> & {
62
- error?: string;
63
- };
64
- declare const extractErrorMessage: (err: ErrorWithResponse, fallback?: string) => string;
65
- declare const ensureVersionString: (software: string, fallback: string) => string;
66
- declare const stringToBoolean: (content: string | number | undefined) => boolean;
67
- type DeploymentStats = {
68
- failures: number;
69
- inprogress: number;
70
- paused: number;
71
- pending: number;
72
- skipped?: number;
73
- successes: number;
74
- };
75
- declare const groupDeploymentDevicesStats: (deployment: Pick<Deployment, "devices">) => DeploymentStats;
76
- declare const statCollector: (items: string[], statistics: Record<string, number>) => number;
77
- declare const groupDeploymentStats: (deployment: Partial<Deployment>, withSkipped?: boolean) => DeploymentStats;
78
- declare const getDeploymentState: (deployment: Partial<Deployment>) => string;
79
- type DeploymentFilter = FilterV2 | {
80
- terms?: Array<AttributeFilterPredicate | {
81
- key: string;
82
- }>;
83
- };
84
- declare const generateDeploymentGroupDetails: (filter: DeploymentFilter | undefined, groupName: string) => string;
85
- type DeviceAttributeMap = {
86
- identity: Record<string, string>;
87
- inventory: InventoryAttributes;
88
- monitor: Record<string, string>;
89
- system: Record<string, string>;
90
- tags: Record<string, string>;
91
- };
92
- declare const mapDeviceAttributes: (attributes?: Attribute[]) => DeviceAttributeMap;
93
- declare const isDarkMode: (mode: string) => boolean;
94
- type Line = InvoiceLineItem & {
95
- product: 'mender_standard' | 'mender_micro';
96
- };
97
- declare const parseSubscriptionPreview: (lines: Line[]) => PricePreview["items"];
98
- declare const convertToBackendSPLimits: (limits: Record<string, number | string>, spLimits: Record<string, object>) => Record<string, {
99
- Name: string;
100
- value: number;
101
- }>;
102
- //#endregion
103
- export { stringToBoolean as C, statCollector as S, mapTermsToFilters as _, convertToBackendSPLimits as a, parseSubscriptionPreview as b, filtersFilter as c, groupDeploymentDevicesStats as d, groupDeploymentStats as f, mapFiltersToTerms as g, mapDeviceAttributes as h, convertDeviceListStateToFilters as i, generateDeploymentGroupDetails as l, listItemMapper as m, ErrorWithResponse as n, ensureVersionString as o, isDarkMode as p, FilterTerm as r, extractErrorMessage as s, DeploymentStats as t, getDeploymentState as u, mapUserRolesToUiPermissions as v, stripUndefined as w, progress as x, mergePermissions as y };
104
- //# sourceMappingURL=utils-DbXmZmGq.d.cts.map