{"size": 1337, "ext": "js", "max_stars_repo_path": "packages/api/test/mocks/pgrest/post_rpc#find_deals_by_content_cids.js", "max_stars_repo_name": "jonyg80/reimagined-octo-spoon", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "packages/api/test/mocks/pgrest/post_rpc#find_deals_by_content_cids.js", "max_issues_repo_name": "jonyg80/reimagined-octo-spoon", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/api/test/mocks/pgrest/post_rpc#find_deals_by_content_cids.js", "max_forks_repo_name": "jonyg80/reimagined-octo-spoon", "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": 31.8333333333, "max_line_length": 97, "alphanum_fraction": 0.6357516829}
/**
 * https://github.com/sinedied/smoke#javascript-mocks
 * @param {{ body: Request }} request
 */
module.exports = ({ body }) => {
  // main cid
  if (body.cids.includes('bafybeifnfkzjeohjf2dch2iqqpef3bfjylwxlcjws2msvdfyze5bvdprfm')) {
    return [
      {
        dealId: 12345,
        storageProvider: 'f99',
        status: 'active',
        pieceCid: 'baga',
        dataCid: 'bafybeifnfkzjeohjf2dch2iqqpef3bfjylwxlcjws2msvdfyze5bvdprfm',
        dataModelSelector: 'Links/0/Links',
        dealActivation: '<iso timestamp>',
        created: '2021-07-14T19:27:14.934572Z',
        updated: '2021-07-14T19:27:14.934572Z'
      },
      {
        dealId: 123456,
        storageProvider: 'f98',
        status: 'terminated',
        pieceCid: 'baga',
        dataCid: 'bafybeifnfkzjeohjf2dch2iqqpef3bfjylwxlcjws2msvdfyze5bvdprfm',
        dataModelSelector: 'Links/0/Links',
        dealActivation: '<iso timestamp>',
        created: '2021-07-14T19:27:14.934572Z',
        updated: '2021-07-14T19:27:14.934572Z'
      }
    ]
  } else if (body.cids.includes('bafybeica6klnrhlrbx6z24icefykpbwyypouglnypvnwb5esdm6yzcie3q')) {
    return [{
      status: 'queued',
      pieceCid: 'baga',
      dataCid: 'bafybeica6klnrhlrbx6z24icefykpbwyypouglnypvnwb5esdm6yzcie3q',
      dataModelSelector: 'Links/0/Links'
    }]
  }
  return []
}
