Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / src / endpoints / list / transform.ts
Size: Mime:
import { getTyped } from '@skava/modules/___dist/composition/get'

export const transformList = response => {
  const { float, array, string } = getTyped(response)

  const listResponse = {
    // saveforlater: saveForLaterItems,
    type: string('type', 'getlists'),
    count: float('properties.state.count'),
    flags: array('properties.iteminfo.flags'),
    lists: array('children.lists').map(list => {
      return {
        identifier: list.identifier,
        additionalInfo: list.properties.iteminfo.additionalinfo,
      }
    }),
  }
  return listResponse
}