Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | /** |
| 6 | * @fileoverview Hotlist actions, selectors, and reducers organized into |
| 7 | * a single Redux "Duck" that manages updating and retrieving hotlist state |
| 8 | * on the frontend. |
| 9 | * |
| 10 | * The Hotlist data is stored in a normalized format. |
| 11 | * `name` is a reference to the currently viewed Hotlist. |
| 12 | * `hotlists` stores all Hotlist data indexed by Hotlist name. |
| 13 | * `hotlistItems` stores all Hotlist items indexed by Hotlist name. |
| 14 | * `hotlist` is a selector that gets the currently viewed Hotlist data. |
| 15 | * |
| 16 | * Reference: https://github.com/erikras/ducks-modular-redux |
| 17 | */ |
| 18 | |
| 19 | import {combineReducers} from 'redux'; |
| 20 | import {createSelector} from 'reselect'; |
| 21 | import {createReducer, createRequestReducer} from './redux-helpers.js'; |
| 22 | |
| 23 | import {prpcClient} from 'prpc-client-instance.js'; |
| 24 | import {userIdOrDisplayNameToUserRef, issueNameToRef} |
| 25 | from 'shared/convertersV0.js'; |
| 26 | import {pathsToFieldMask} from 'shared/converters.js'; |
| 27 | |
| 28 | import * as issueV0 from './issueV0.js'; |
| 29 | import * as permissions from './permissions.js'; |
| 30 | import * as sitewide from './sitewide.js'; |
| 31 | import * as ui from './ui.js'; |
| 32 | import * as users from './users.js'; |
| 33 | |
| 34 | import 'shared/typedef.js'; |
| 35 | /** @typedef {import('redux').AnyAction} AnyAction */ |
| 36 | |
| 37 | /** @type {Array<string>} */ |
| 38 | export const DEFAULT_COLUMNS = [ |
| 39 | 'Rank', 'ID', 'Status', 'Owner', 'Summary', 'Modified', |
| 40 | ]; |
| 41 | |
| 42 | // Permissions |
| 43 | // TODO(crbug.com/monorail/7879): Move these to a permissions constants file. |
| 44 | export const EDIT = 'HOTLIST_EDIT'; |
| 45 | export const ADMINISTER = 'HOTLIST_ADMINISTER'; |
| 46 | |
| 47 | // Actions |
| 48 | export const SELECT = 'hotlist/SELECT'; |
| 49 | export const RECEIVE_HOTLIST = 'hotlist/RECEIVE_HOTLIST'; |
| 50 | |
| 51 | export const DELETE_START = 'hotlist/DELETE_START'; |
| 52 | export const DELETE_SUCCESS = 'hotlist/DELETE_SUCCESS'; |
| 53 | export const DELETE_FAILURE = 'hotlist/DELETE_FAILURE'; |
| 54 | |
| 55 | export const FETCH_START = 'hotlist/FETCH_START'; |
| 56 | export const FETCH_SUCCESS = 'hotlist/FETCH_SUCCESS'; |
| 57 | export const FETCH_FAILURE = 'hotlist/FETCH_FAILURE'; |
| 58 | |
| 59 | export const FETCH_ITEMS_START = 'hotlist/FETCH_ITEMS_START'; |
| 60 | export const FETCH_ITEMS_SUCCESS = 'hotlist/FETCH_ITEMS_SUCCESS'; |
| 61 | export const FETCH_ITEMS_FAILURE = 'hotlist/FETCH_ITEMS_FAILURE'; |
| 62 | |
| 63 | export const REMOVE_EDITORS_START = 'hotlist/REMOVE_EDITORS_START'; |
| 64 | export const REMOVE_EDITORS_SUCCESS = 'hotlist/REMOVE_EDITORS_SUCCESS'; |
| 65 | export const REMOVE_EDITORS_FAILURE = 'hotlist/REMOVE_EDITORS_FAILURE'; |
| 66 | |
| 67 | export const REMOVE_ITEMS_START = 'hotlist/REMOVE_ITEMS_START'; |
| 68 | export const REMOVE_ITEMS_SUCCESS = 'hotlist/REMOVE_ITEMS_SUCCESS'; |
| 69 | export const REMOVE_ITEMS_FAILURE = 'hotlist/REMOVE_ITEMS_FAILURE'; |
| 70 | |
| 71 | export const RERANK_ITEMS_START = 'hotlist/RERANK_ITEMS_START'; |
| 72 | export const RERANK_ITEMS_SUCCESS = 'hotlist/RERANK_ITEMS_SUCCESS'; |
| 73 | export const RERANK_ITEMS_FAILURE = 'hotlist/RERANK_ITEMS_FAILURE'; |
| 74 | |
| 75 | export const UPDATE_START = 'hotlist/UPDATE_START'; |
| 76 | export const UPDATE_SUCCESS = 'hotlist/UPDATE_SUCCESS'; |
| 77 | export const UPDATE_FAILURE = 'hotlist/UPDATE_FAILURE'; |
| 78 | |
| 79 | /* State Shape |
| 80 | { |
| 81 | name: string, |
| 82 | |
| 83 | byName: Object<string, Hotlist>, |
| 84 | hotlistItems: Object<string, Array<HotlistItem>>, |
| 85 | |
| 86 | requests: { |
| 87 | fetch: ReduxRequestState, |
| 88 | fetchItems: ReduxRequestState, |
| 89 | update: ReduxRequestState, |
| 90 | }, |
| 91 | } |
| 92 | */ |
| 93 | |
| 94 | // Reducers |
| 95 | |
| 96 | /** |
| 97 | * A reference to the currently viewed Hotlist. |
| 98 | * @param {?string} state The existing Hotlist resource name. |
| 99 | * @param {AnyAction} action |
| 100 | * @return {?string} |
| 101 | */ |
| 102 | export const nameReducer = createReducer(null, { |
| 103 | [SELECT]: (_state, {name}) => name, |
| 104 | }); |
| 105 | |
| 106 | /** |
| 107 | * All Hotlist data indexed by Hotlist resource name. |
| 108 | * @param {Object<string, Hotlist>} state The existing Hotlist data. |
| 109 | * @param {AnyAction} action |
| 110 | * @param {Hotlist} action.hotlist The Hotlist that was fetched. |
| 111 | * @return {Object<string, Hotlist>} |
| 112 | */ |
| 113 | export const byNameReducer = createReducer({}, { |
| 114 | [RECEIVE_HOTLIST]: (state, {hotlist}) => { |
| 115 | if (!hotlist.defaultColumns) hotlist.defaultColumns = []; |
| 116 | if (!hotlist.editors) hotlist.editors = []; |
| 117 | return {...state, [hotlist.name]: hotlist}; |
| 118 | }, |
| 119 | }); |
| 120 | |
| 121 | /** |
| 122 | * All Hotlist items indexed by Hotlist resource name. |
| 123 | * @param {Object<string, Array<HotlistItem>>} state The existing items. |
| 124 | * @param {AnyAction} action |
| 125 | * @param {name} action.name The Hotlist resource name. |
| 126 | * @param {Array<HotlistItem>} action.items The Hotlist items fetched. |
| 127 | * @return {Object<string, Array<HotlistItem>>} |
| 128 | */ |
| 129 | export const hotlistItemsReducer = createReducer({}, { |
| 130 | [FETCH_ITEMS_SUCCESS]: (state, {name, items}) => ({...state, [name]: items}), |
| 131 | }); |
| 132 | |
| 133 | export const requestsReducer = combineReducers({ |
| 134 | deleteHotlist: createRequestReducer( |
| 135 | DELETE_START, DELETE_SUCCESS, DELETE_FAILURE), |
| 136 | fetch: createRequestReducer( |
| 137 | FETCH_START, FETCH_SUCCESS, FETCH_FAILURE), |
| 138 | fetchItems: createRequestReducer( |
| 139 | FETCH_ITEMS_START, FETCH_ITEMS_SUCCESS, FETCH_ITEMS_FAILURE), |
| 140 | removeEditors: createRequestReducer( |
| 141 | REMOVE_EDITORS_START, REMOVE_EDITORS_SUCCESS, REMOVE_EDITORS_FAILURE), |
| 142 | removeItems: createRequestReducer( |
| 143 | REMOVE_ITEMS_START, REMOVE_ITEMS_SUCCESS, REMOVE_ITEMS_FAILURE), |
| 144 | rerankItems: createRequestReducer( |
| 145 | RERANK_ITEMS_START, RERANK_ITEMS_SUCCESS, RERANK_ITEMS_FAILURE), |
| 146 | update: createRequestReducer( |
| 147 | UPDATE_START, UPDATE_SUCCESS, UPDATE_FAILURE), |
| 148 | }); |
| 149 | |
| 150 | export const reducer = combineReducers({ |
| 151 | name: nameReducer, |
| 152 | |
| 153 | byName: byNameReducer, |
| 154 | hotlistItems: hotlistItemsReducer, |
| 155 | |
| 156 | requests: requestsReducer, |
| 157 | }); |
| 158 | |
| 159 | // Selectors |
| 160 | |
| 161 | /** |
| 162 | * Returns the currently viewed Hotlist resource name, or null if there is none. |
| 163 | * @param {any} state |
| 164 | * @return {?string} |
| 165 | */ |
| 166 | export const name = (state) => state.hotlists.name; |
| 167 | |
| 168 | /** |
| 169 | * Returns all the Hotlist data in the store as a mapping from name to Hotlist. |
| 170 | * @param {any} state |
| 171 | * @return {Object<string, Hotlist>} |
| 172 | */ |
| 173 | export const byName = (state) => state.hotlists.byName; |
| 174 | |
| 175 | /** |
| 176 | * Returns all the Hotlist items in the store as a mapping from a |
| 177 | * Hotlist resource name to its respective array of HotlistItems. |
| 178 | * @param {any} state |
| 179 | * @return {Object<string, Array<HotlistItem>>} |
| 180 | */ |
| 181 | export const hotlistItems = (state) => state.hotlists.hotlistItems; |
| 182 | |
| 183 | /** |
| 184 | * Returns the currently viewed Hotlist, or null if there is none. |
| 185 | * @param {any} state |
| 186 | * @return {?Hotlist} |
| 187 | */ |
| 188 | export const viewedHotlist = createSelector( |
| 189 | [byName, name], |
| 190 | (byName, name) => name && byName[name] || null); |
| 191 | |
| 192 | /** |
| 193 | * Returns the owner of the currently viewed Hotlist, or null if there is none. |
| 194 | * @param {any} state |
| 195 | * @return {?User} |
| 196 | */ |
| 197 | export const viewedHotlistOwner = createSelector( |
| 198 | [viewedHotlist, users.byName], |
| 199 | (hotlist, usersByName) => { |
| 200 | return hotlist && usersByName[hotlist.owner] || null; |
| 201 | }); |
| 202 | |
| 203 | /** |
| 204 | * Returns the editors of the currently viewed Hotlist. Returns null if there |
| 205 | * is no hotlist data. Includes a null in the array for each editor whose User |
| 206 | * data is not in the store. |
| 207 | * @param {any} state |
| 208 | * @return {Array<User>} |
| 209 | */ |
| 210 | export const viewedHotlistEditors = createSelector( |
| 211 | [viewedHotlist, users.byName], |
| 212 | (hotlist, usersByName) => { |
| 213 | if (!hotlist) return null; |
| 214 | return hotlist.editors.map((editor) => usersByName[editor] || null); |
| 215 | }); |
| 216 | |
| 217 | /** |
| 218 | * Returns an Array containing the items in the currently viewed Hotlist, |
| 219 | * or [] if there is no current Hotlist or no Hotlist data. |
| 220 | * @param {any} state |
| 221 | * @return {Array<HotlistItem>} |
| 222 | */ |
| 223 | export const viewedHotlistItems = createSelector( |
| 224 | [hotlistItems, name], |
| 225 | (hotlistItems, name) => name && hotlistItems[name] || []); |
| 226 | |
| 227 | /** |
| 228 | * Returns an Array containing the HotlistIssues in the currently viewed |
| 229 | * Hotlist, or [] if there is no current Hotlist or no Hotlist data. |
| 230 | * A HotlistIssue merges the HotlistItem and Issue into one flat object. |
| 231 | * @param {any} state |
| 232 | * @return {Array<HotlistIssue>} |
| 233 | */ |
| 234 | export const viewedHotlistIssues = createSelector( |
| 235 | [viewedHotlistItems, issueV0.issue, users.byName], |
| 236 | (items, getIssue, usersByName) => { |
| 237 | // Filter out issues that haven't been fetched yet or failed to fetch. |
| 238 | // Example: if the user doesn't have permissions to view the issue. |
| 239 | // <mr-issue-list> assumes that every Issue is populated. |
| 240 | const itemsWithData = items.filter((item) => getIssue(item.issue)); |
| 241 | return itemsWithData.map((item) => ({ |
| 242 | ...getIssue(item.issue), |
| 243 | ...item, |
| 244 | adder: usersByName[item.adder], |
| 245 | })); |
| 246 | }); |
| 247 | |
| 248 | /** |
| 249 | * Returns the currently viewed Hotlist columns. |
| 250 | * @param {any} state |
| 251 | * @return {Array<string>} |
| 252 | */ |
| 253 | export const viewedHotlistColumns = createSelector( |
| 254 | [viewedHotlist, sitewide.currentColumns], |
| 255 | (hotlist, sitewideCurrentColumns) => { |
| 256 | if (sitewideCurrentColumns) return sitewideCurrentColumns; |
| 257 | if (!hotlist) return DEFAULT_COLUMNS; |
| 258 | if (!hotlist.defaultColumns.length) return DEFAULT_COLUMNS; |
| 259 | return hotlist.defaultColumns.map((col) => col.column); |
| 260 | }); |
| 261 | |
| 262 | /** |
| 263 | * Returns the currently viewed Hotlist permissions, or [] if there is none. |
| 264 | * @param {any} state |
| 265 | * @return {Array<Permission>} |
| 266 | */ |
| 267 | export const viewedHotlistPermissions = createSelector( |
| 268 | [viewedHotlist, permissions.byName], |
| 269 | (hotlist, permissionsByName) => { |
| 270 | if (!hotlist) return []; |
| 271 | const permissionSet = permissionsByName[hotlist.name]; |
| 272 | if (!permissionSet) return []; |
| 273 | return permissionSet.permissions; |
| 274 | }); |
| 275 | |
| 276 | /** |
| 277 | * Returns the Hotlist requests. |
| 278 | * @param {any} state |
| 279 | * @return {Object<string, ReduxRequestState>} |
| 280 | */ |
| 281 | export const requests = (state) => state.hotlists.requests; |
| 282 | |
| 283 | // Action Creators |
| 284 | |
| 285 | /** |
| 286 | * Action creator to delete the Hotlist. We would have liked to have named this |
| 287 | * `delete` but it's a reserved word in JS. |
| 288 | * @param {string} name The resource name of the Hotlist to delete. |
| 289 | * @return {function(function): Promise<void>} |
| 290 | */ |
| 291 | export const deleteHotlist = (name) => async (dispatch) => { |
| 292 | dispatch({type: DELETE_START}); |
| 293 | |
| 294 | try { |
| 295 | const args = {name}; |
| 296 | await prpcClient.call('monorail.v3.Hotlists', 'DeleteHotlist', args); |
| 297 | |
| 298 | dispatch({type: DELETE_SUCCESS}); |
| 299 | } catch (error) { |
| 300 | dispatch({type: DELETE_FAILURE, error}); |
| 301 | }; |
| 302 | }; |
| 303 | |
| 304 | /** |
| 305 | * Action creator to fetch a Hotlist object. |
| 306 | * @param {string} name The resource name of the Hotlist to fetch. |
| 307 | * @return {function(function): Promise<void>} |
| 308 | */ |
| 309 | export const fetch = (name) => async (dispatch) => { |
| 310 | dispatch({type: FETCH_START}); |
| 311 | |
| 312 | try { |
| 313 | /** @type {Hotlist} */ |
| 314 | const hotlist = await prpcClient.call( |
| 315 | 'monorail.v3.Hotlists', 'GetHotlist', {name}); |
| 316 | dispatch({type: FETCH_SUCCESS}); |
| 317 | dispatch({type: RECEIVE_HOTLIST, hotlist}); |
| 318 | |
| 319 | const editors = hotlist.editors.map((editor) => editor); |
| 320 | editors.push(hotlist.owner); |
| 321 | await dispatch(users.batchGet(editors)); |
| 322 | } catch (error) { |
| 323 | dispatch({type: FETCH_FAILURE, error}); |
| 324 | }; |
| 325 | }; |
| 326 | |
| 327 | /** |
| 328 | * Action creator to fetch the items in a Hotlist. |
| 329 | * @param {string} name The resource name of the Hotlist to fetch. |
| 330 | * @return {function(function): Promise<Array<HotlistItem>>} |
| 331 | */ |
| 332 | export const fetchItems = (name) => async (dispatch) => { |
| 333 | dispatch({type: FETCH_ITEMS_START}); |
| 334 | |
| 335 | try { |
| 336 | const args = {parent: name, orderBy: 'rank'}; |
| 337 | /** @type {{items: Array<HotlistItem>}} */ |
| 338 | const {items} = await prpcClient.call( |
| 339 | 'monorail.v3.Hotlists', 'ListHotlistItems', args); |
| 340 | if (!items) { |
| 341 | dispatch({type: FETCH_ITEMS_SUCCESS, name, items: []}); |
| 342 | } |
| 343 | const itemsWithRank = |
| 344 | items.map((item) => item.rank ? item : {...item, rank: 0}); |
| 345 | |
| 346 | const issueRefs = items.map((item) => issueNameToRef(item.issue)); |
| 347 | await dispatch(issueV0.fetchIssues(issueRefs)); |
| 348 | |
| 349 | const adderNames = [...new Set(items.map((item) => item.adder))]; |
| 350 | await dispatch(users.batchGet(adderNames)); |
| 351 | |
| 352 | dispatch({type: FETCH_ITEMS_SUCCESS, name, items: itemsWithRank}); |
| 353 | return itemsWithRank; |
| 354 | } catch (error) { |
| 355 | dispatch({type: FETCH_ITEMS_FAILURE, error}); |
| 356 | }; |
| 357 | }; |
| 358 | |
| 359 | /** |
| 360 | * Action creator to remove editors from a Hotlist. |
| 361 | * @param {string} name The resource name of the Hotlist. |
| 362 | * @param {Array<string>} editors The resource names of the Users to remove. |
| 363 | * @return {function(function): Promise<void>} |
| 364 | */ |
| 365 | export const removeEditors = (name, editors) => async (dispatch) => { |
| 366 | dispatch({type: REMOVE_EDITORS_START}); |
| 367 | |
| 368 | try { |
| 369 | const args = {name, editors}; |
| 370 | await prpcClient.call('monorail.v3.Hotlists', 'RemoveHotlistEditors', args); |
| 371 | |
| 372 | dispatch({type: REMOVE_EDITORS_SUCCESS}); |
| 373 | |
| 374 | await dispatch(fetch(name)); |
| 375 | } catch (error) { |
| 376 | dispatch({type: REMOVE_EDITORS_FAILURE, error}); |
| 377 | }; |
| 378 | }; |
| 379 | |
| 380 | /** |
| 381 | * Action creator to remove items from a Hotlist. |
| 382 | * @param {string} name The resource name of the Hotlist. |
| 383 | * @param {Array<string>} issues The resource names of the Issues to remove. |
| 384 | * @return {function(function): Promise<void>} |
| 385 | */ |
| 386 | export const removeItems = (name, issues) => async (dispatch) => { |
| 387 | dispatch({type: REMOVE_ITEMS_START}); |
| 388 | |
| 389 | try { |
| 390 | const args = {parent: name, issues}; |
| 391 | await prpcClient.call('monorail.v3.Hotlists', 'RemoveHotlistItems', args); |
| 392 | |
| 393 | dispatch({type: REMOVE_ITEMS_SUCCESS}); |
| 394 | |
| 395 | await dispatch(fetchItems(name)); |
| 396 | } catch (error) { |
| 397 | dispatch({type: REMOVE_ITEMS_FAILURE, error}); |
| 398 | }; |
| 399 | }; |
| 400 | |
| 401 | /** |
| 402 | * Action creator to rerank the items in a Hotlist. |
| 403 | * @param {string} name The resource name of the Hotlist. |
| 404 | * @param {Array<string>} items The resource names of the HotlistItems to move. |
| 405 | * @param {number} index The index to insert the moved items. |
| 406 | * @return {function(function): Promise<void>} |
| 407 | */ |
| 408 | export const rerankItems = (name, items, index) => async (dispatch) => { |
| 409 | dispatch({type: RERANK_ITEMS_START}); |
| 410 | |
| 411 | try { |
| 412 | const args = {name, hotlistItems: items, targetPosition: index}; |
| 413 | await prpcClient.call('monorail.v3.Hotlists', 'RerankHotlistItems', args); |
| 414 | |
| 415 | dispatch({type: RERANK_ITEMS_SUCCESS}); |
| 416 | |
| 417 | await dispatch(fetchItems(name)); |
| 418 | } catch (error) { |
| 419 | dispatch({type: RERANK_ITEMS_FAILURE, error}); |
| 420 | }; |
| 421 | }; |
| 422 | |
| 423 | /** |
| 424 | * Action creator to set the currently viewed Hotlist. |
| 425 | * @param {string} name The resource name of the Hotlist to select. |
| 426 | * @return {AnyAction} |
| 427 | */ |
| 428 | export const select = (name) => ({type: SELECT, name}); |
| 429 | |
| 430 | /** |
| 431 | * Action creator to update the Hotlist metadata. |
| 432 | * @param {string} name The resource name of the Hotlist to delete. |
| 433 | * @param {Hotlist} hotlist This represents the updated version of the Hotlist |
| 434 | * with only the fields that need to be updated. |
| 435 | * @return {function(function): Promise<void>} |
| 436 | */ |
| 437 | export const update = (name, hotlist) => async (dispatch) => { |
| 438 | dispatch({type: UPDATE_START}); |
| 439 | try { |
| 440 | const paths = pathsToFieldMask(Object.keys(hotlist)); |
| 441 | const hotlistArg = {...hotlist, name}; |
| 442 | const args = {hotlist: hotlistArg, updateMask: paths}; |
| 443 | |
| 444 | /** @type {Hotlist} */ |
| 445 | const updatedHotlist = await prpcClient.call( |
| 446 | 'monorail.v3.Hotlists', 'UpdateHotlist', args); |
| 447 | dispatch({type: UPDATE_SUCCESS}); |
| 448 | dispatch({type: RECEIVE_HOTLIST, hotlist: updatedHotlist}); |
| 449 | |
| 450 | const editors = updatedHotlist.editors.map((editor) => editor); |
| 451 | editors.push(updatedHotlist.owner); |
| 452 | await dispatch(users.batchGet(editors)); |
| 453 | } catch (error) { |
| 454 | dispatch({type: UPDATE_FAILURE, error}); |
| 455 | dispatch(ui.showSnackbar(UPDATE_FAILURE, error.description)); |
| 456 | throw error; |
| 457 | } |
| 458 | }; |
| 459 | |
| 460 | // Helpers |
| 461 | |
| 462 | /** |
| 463 | * Helper to fetch a Hotlist ID given its owner and display name. |
| 464 | * @param {string} owner The Hotlist owner's user id or display name. |
| 465 | * @param {string} hotlist The Hotlist's id or display name. |
| 466 | * @return {Promise<?string>} |
| 467 | */ |
| 468 | export const getHotlistName = async (owner, hotlist) => { |
| 469 | const hotlistRef = { |
| 470 | owner: userIdOrDisplayNameToUserRef(owner), |
| 471 | name: hotlist, |
| 472 | }; |
| 473 | |
| 474 | try { |
| 475 | /** @type {{hotlistId: number}} */ |
| 476 | const {hotlistId} = await prpcClient.call( |
| 477 | 'monorail.Features', 'GetHotlistID', {hotlistRef}); |
| 478 | return 'hotlists/' + hotlistId; |
| 479 | } catch (error) { |
| 480 | return null; |
| 481 | }; |
| 482 | }; |
| 483 | |
| 484 | export const hotlists = { |
| 485 | // Permissions |
| 486 | EDIT, |
| 487 | ADMINISTER, |
| 488 | |
| 489 | // Reducer |
| 490 | reducer, |
| 491 | |
| 492 | // Selectors |
| 493 | name, |
| 494 | byName, |
| 495 | hotlistItems, |
| 496 | viewedHotlist, |
| 497 | viewedHotlistOwner, |
| 498 | viewedHotlistEditors, |
| 499 | viewedHotlistItems, |
| 500 | viewedHotlistIssues, |
| 501 | viewedHotlistColumns, |
| 502 | viewedHotlistPermissions, |
| 503 | requests, |
| 504 | |
| 505 | // Action creators |
| 506 | deleteHotlist, |
| 507 | fetch, |
| 508 | fetchItems, |
| 509 | removeEditors, |
| 510 | removeItems, |
| 511 | rerankItems, |
| 512 | select, |
| 513 | update, |
| 514 | |
| 515 | // Helpers |
| 516 | getHotlistName, |
| 517 | }; |