{"size": 946, "ext": "js", "max_stars_repo_path": "client/src/types/posts.js", "max_stars_repo_name": "Kalipts/crud-redux-saga", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/types/posts.js", "max_issues_repo_name": "Kalipts/crud-redux-saga", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/types/posts.js", "max_forks_repo_name": "Kalipts/crud-redux-saga", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.2777777778, "max_line_length": 53, "alphanum_fraction": 0.6405919662}
// @flow

export type Post = {
  +id: number,
  +title: string,
  +body: string
}

export type PostPayload = $Diff<Post, { id: number }>

export type Posts = Array<Post>

export type PostsState = {
  +items: Posts,
  +loading: boolean
}

export type PostsAction =
  | { type: 'FETCH_POSTS' }
  | { type: 'FETCH_POSTS_IF_NEEDED' }
  | { type: 'FETCH_POSTS_PENDING' }
  | { type: 'FETCH_POSTS_SUCCESS', payload: Posts }
  | { type: 'FETCH_POSTS_FAILURE' }
  | { type: 'DELETE_POST' }
  | { type: 'DELETE_POST_PENDING', id: number }
  | { type: 'DELETE_POST_SUCCESS', id: number }
  | { type: 'DELETE_POST_FAILURE' }
  | { type: 'CREATE_POST', payload: Post }
  | { type: 'CREATE_POST_PENDING' }
  | { type: 'CREATE_POST_SUCCESS', payload: Post }
  | { type: 'CREATE_POST_FAILURE' }
  | { type: 'UPDATE_POST', payload: Post }
  | { type: 'UPDATE_POST_PENDING' }
  | { type: 'UPDATE_POST_SUCCESS', payload: Post }
  | { type: 'UPDATE_POST_FAILURE' }
