{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/202011895","pull_request_review_id":136622283,"id":202011895,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjAxMTg5NQ==","diff_hunk":"@@ -0,0 +1,22 @@\n+/** @format */\n+\n+/**\n+ * Internal dependencies\n+ */\n+import makeJsonSchemaParser from 'lib/make-json-schema-parser';\n+import responseSchema from './schema';\n+import { transform as appointmentTransformer } from 'state/data-layer/wpcom/concierge/schedules/appointments/detail/from-api';\n+\n+export const convertToDate = timestampInSeconds => timestampInSeconds * 1000;","path":"client/state/data-layer/wpcom/concierge/schedules/initial/from-api.js","position":10,"original_position":10,"commit_id":"76b8a1bfe59a6f6ac0c2a4b9d6f5b5a4a831af0b","original_commit_id":"76b8a1bfe59a6f6ac0c2a4b9d6f5b5a4a831af0b","user":{"login":"nb","id":27954,"node_id":"MDQ6VXNlcjI3OTU0","avatar_url":"https://avatars1.githubusercontent.com/u/27954?v=4","gravatar_id":"","url":"https://api.github.com/users/nb","html_url":"https://github.com/nb","followers_url":"https://api.github.com/users/nb/followers","following_url":"https://api.github.com/users/nb/following{/other_user}","gists_url":"https://api.github.com/users/nb/gists{/gist_id}","starred_url":"https://api.github.com/users/nb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nb/subscriptions","organizations_url":"https://api.github.com/users/nb/orgs","repos_url":"https://api.github.com/users/nb/repos","events_url":"https://api.github.com/users/nb/events{/privacy}","received_events_url":"https://api.github.com/users/nb/received_events","type":"User","site_admin":false},"body":"> it would make the code a bit more complex\r\n\r\nWhat are the trade-offs of reusing + more complex code vs. simpler and duplicated? What should we take into account in order to make a decision?\r\n\r\nThis is not a loaded question, I honestly don't know which ones is the better solution, but I would like us to think a bit more about what's best.","created_at":"2018-07-12T12:14:16Z","updated_at":"2018-07-12T12:14:17Z","html_url":"https://github.com/Automattic/wp-calypso/pull/25915#discussion_r202011895","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/202011895"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/25915#discussion_r202011895"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915"}},"in_reply_to_id":201868858},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915","id":199897741,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5ODk3NzQx","html_url":"https://github.com/Automattic/wp-calypso/pull/25915","diff_url":"https://github.com/Automattic/wp-calypso/pull/25915.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/25915.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25915","number":25915,"state":"open","locked":false,"title":"Concierge: Add data layer for the new Initial endpoint","user":{"login":"byrobots","id":374522,"node_id":"MDQ6VXNlcjM3NDUyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/374522?v=4","gravatar_id":"","url":"https://api.github.com/users/byrobots","html_url":"https://github.com/byrobots","followers_url":"https://api.github.com/users/byrobots/followers","following_url":"https://api.github.com/users/byrobots/following{/other_user}","gists_url":"https://api.github.com/users/byrobots/gists{/gist_id}","starred_url":"https://api.github.com/users/byrobots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byrobots/subscriptions","organizations_url":"https://api.github.com/users/byrobots/orgs","repos_url":"https://api.github.com/users/byrobots/repos","events_url":"https://api.github.com/users/byrobots/events{/privacy}","received_events_url":"https://api.github.com/users/byrobots/received_events","type":"User","site_admin":false},"body":"Adds the data layer for the new endpoint added in `D15118-code`. This will allow `/concierge/schedules/{schedule id}/initial` to be requested.\r\n\r\nThe new endpoint returns available appointment times, as per available_times, as well as the customer's next scheduled appointment if they have one. Ultimately this will allow a user to be limited to one pending appointment.\r\n\r\nThis PR replaces #25900.\r\n\r\n**Testing**\r\nUnit tests have been added, and can be executed with `npm run test-client concierge`.\r\n\r\ncc @nb","created_at":"2018-07-07T13:46:54Z","updated_at":"2018-07-12T12:14:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"246a38378928af5edd425f2ee774bffd9866aaa9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":285010030,"node_id":"MDU6TGFiZWwyODUwMTAwMzA=","url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Status]%20Ready%20to%20Merge","name":"[Status] Ready to Merge","color":"d4fb79","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/25915/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/76b8a1bfe59a6f6ac0c2a4b9d6f5b5a4a831af0b","head":{"label":"Automattic:add/concierge-initial-endpoint-data-layer","ref":"add/concierge-initial-endpoint-data-layer","sha":"76b8a1bfe59a6f6ac0c2a4b9d6f5b5a4a831af0b","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-07-12T12:12:40Z","pushed_at":"2018-07-12T12:14:15Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":99406,"stargazers_count":10085,"watchers_count":10085,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1426,"mirror_url":null,"archived":false,"open_issues_count":1579,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1426,"open_issues":1579,"watchers":10085,"default_branch":"master"}},"base":{"label":"Automattic:add/actions-for-concierge-initial-endpoint","ref":"add/actions-for-concierge-initial-endpoint","sha":"1dcabc5f6c35f4391e4e5cd5f42ff3172840216f","user":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"node_id":"MDEwOlJlcG9zaXRvcnk0NTkzNjg5NQ==","name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg4NzgwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/887802?v=4","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The JavaScript and API powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2018-07-12T12:12:40Z","pushed_at":"2018-07-12T12:14:15Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":99406,"stargazers_count":10085,"watchers_count":10085,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1426,"mirror_url":null,"archived":false,"open_issues_count":1579,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":1426,"open_issues":1579,"watchers":10085,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/25915"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/25915"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/25915/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/25915/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/76b8a1bfe59a6f6ac0c2a4b9d6f5b5a4a831af0b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nb"}}